diff --git a/scripts/native/file/rec-legal-customer-product-directory-1.0-native-quarkus-jdk17-runner b/scripts/native/file/rec-legal-customer-product-directory-1.0-native-quarkus-jdk17-runner index 8df5198..a39ca24 100644 Binary files a/scripts/native/file/rec-legal-customer-product-directory-1.0-native-quarkus-jdk17-runner and b/scripts/native/file/rec-legal-customer-product-directory-1.0-native-quarkus-jdk17-runner differ diff --git a/src/main/java/com/banesco/common/domain/model/Agreement.java b/src/main/java/com/banesco/common/domain/model/Agreement.java new file mode 100644 index 0000000..eabbaff --- /dev/null +++ b/src/main/java/com/banesco/common/domain/model/Agreement.java @@ -0,0 +1,20 @@ +package com.banesco.common.domain.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.quarkus.runtime.annotations.RegisterForReflection; +import lombok.*; +import org.eclipse.microprofile.openapi.annotations.media.Schema; + +import java.util.List; + +@Getter +@ToString +@Builder +@NoArgsConstructor +@AllArgsConstructor +@RegisterForReflection +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Agreement { + @Schema(description = "Información del arreglo de la cuenta") + private List arrangement; +} diff --git a/src/main/java/com/banesco/common/domain/model/Arrangement.java b/src/main/java/com/banesco/common/domain/model/Arrangement.java new file mode 100644 index 0000000..52ee99a --- /dev/null +++ b/src/main/java/com/banesco/common/domain/model/Arrangement.java @@ -0,0 +1,18 @@ +package com.banesco.common.domain.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.quarkus.runtime.annotations.RegisterForReflection; +import lombok.*; +import org.eclipse.microprofile.openapi.annotations.media.Schema; + +@Getter +@ToString +@Builder +@NoArgsConstructor +@AllArgsConstructor +@RegisterForReflection +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Arrangement { + @Schema(description = "Información del tipo de arreglo de la cuenta (Si la cuenta corriente tiene interés)") + private ArrangementType arrangementType; +} diff --git a/src/main/java/com/banesco/common/domain/model/ArrangementType.java b/src/main/java/com/banesco/common/domain/model/ArrangementType.java new file mode 100644 index 0000000..732ea42 --- /dev/null +++ b/src/main/java/com/banesco/common/domain/model/ArrangementType.java @@ -0,0 +1,32 @@ +package com.banesco.common.domain.model; + +public enum ArrangementType { + SWEEP_ARRANGEMENT, + WITHDRAWAL_ARRANGEMENT, + DEPOSIT_ARRANGEMENT, + INTEREST_ARRANGEMENT, + FEE_ARRANGEMENT, + LIEN_ARRANGEMENT, + INFORMATION_ARRANGEMENT, + PAYMENT_ARRANGEMENT, + ENTITLEMENT_ARRANGEMENT, + PERIOD_ARRANGEMENT, + COLLATERAL_ARRANGEMENT, + LIMIT_ARRANGEMENT, + ACCESS_ARRANGEMENT, + CARD_PAYMENT_ARRANGEMENT, + STANDING_ORDER_ARRANGEMENT, + OVERDRAFT_ARRANGEMENT, + REPAYMENT_ARRANGEMENT, + STATEMENT_ARRANGEMENT, + CREDIT_TRANSFER_ARRANGEMENT, + PRODUCT_AND_SERVICE_ARRANGEMENT, + FACTORING_ARRANGEMENT, + ROLLOVER_ARRANGEMENT, + RESTRUCTURING_ARRANGEMENT, + INSURANCE_ARRANGEMENT, + COLLECTION_ARRANGEMENT, + UNDERWRITING_ARRANGEMENT, + TERMINATION_ARRANGEMENT, + MATURITY_ARRANGEMENT, +} diff --git a/src/main/java/com/banesco/module/account/domain/model/Account.java b/src/main/java/com/banesco/module/account/domain/model/Account.java index 0df1dc6..c3d5ca4 100644 --- a/src/main/java/com/banesco/module/account/domain/model/Account.java +++ b/src/main/java/com/banesco/module/account/domain/model/Account.java @@ -1,5 +1,6 @@ package com.banesco.module.account.domain.model; +import com.banesco.common.domain.model.Agreement; import com.fasterxml.jackson.annotation.JsonInclude; import io.quarkus.runtime.annotations.RegisterForReflection; import lombok.*; @@ -20,7 +21,7 @@ public class Account { @Schema(description = "Lista de datos de identificación de la cuenta") private List accountIdentification; @Schema(description = "Tipo de cuenta") - private String accountType; + private AccountType accountType; @Schema(description = "Información de los tipos de balances de la cuenta") private List accountBalance; @Schema(description = "Información de la moneda de la cuenta") @@ -29,4 +30,6 @@ public class Account { private List accountInvolvement; @Schema(description = "Información relacional de la cuenta con otras o consigo misma") private List accountRelationship; + @Schema(description = "Información del acuerdo de la cuenta") + private List agreement; } \ No newline at end of file diff --git a/src/main/java/com/banesco/module/account/domain/model/AccountType.java b/src/main/java/com/banesco/module/account/domain/model/AccountType.java new file mode 100644 index 0000000..e73892e --- /dev/null +++ b/src/main/java/com/banesco/module/account/domain/model/AccountType.java @@ -0,0 +1,20 @@ +package com.banesco.module.account.domain.model; + +public enum AccountType { + INDIVIDUAL_ACCOUNT, + JOINT_ACCOUNT, + LIQUIDATION_ACCOUNT, + PROVISION_ACCOUNT, + PARTNERSHIP_ACCOUNT, + DEBIT_ACCOUNT, + CREDIT_ACCOUNT, + VOSTRO_ACCOUNT, + NOSTRO_ACCOUNT, + PAYMENT_ACCOUNT, + SETTLEMENT_ACCOUNT, + SAVING_ACCOUNT, + CURRENT_ACCOUNT, + CASH_ACCOUNT, + LOAN_ACCOUNT, + INVESTMENT_ACCOUNT, +} diff --git a/src/main/java/com/banesco/module/legal_customer_product_directory/application/service/LegalCustomerProductDirectoryService.java b/src/main/java/com/banesco/module/legal_customer_product_directory/application/service/LegalCustomerProductDirectoryService.java index 426ad52..c5d9c93 100644 --- a/src/main/java/com/banesco/module/legal_customer_product_directory/application/service/LegalCustomerProductDirectoryService.java +++ b/src/main/java/com/banesco/module/legal_customer_product_directory/application/service/LegalCustomerProductDirectoryService.java @@ -5,6 +5,9 @@ import com.banesco.common.domain.exception.BaseApiException; import com.banesco.common.domain.exception.ServiceUnavailableException; import com.banesco.common.domain.model.*; import com.banesco.module.account.domain.model.*; +import com.banesco.common.domain.model.Agreement; +import com.banesco.common.domain.model.Arrangement; +import com.banesco.common.domain.model.ArrangementType; import com.banesco.module.legal_customer_product_directory.application.usecase.BusinessUseCase; import com.banesco.module.legal_customer_product_directory.application.usecase.LegalCustomerProductDirectoryUseCase; import com.banesco.module.legal_customer_product_directory.domain.dto.request.LegalCustomerProductDirectoryRequest; @@ -125,7 +128,7 @@ public class LegalCustomerProductDirectoryService implements LegalCustomerProduc .status("A") .statusType(AccountStatusType.ENABLED) .build()) - .accountType("MMK") + .accountType(AccountType.CURRENT_ACCOUNT) .accountIdentification(List.of( AccountIdentification.builder() .accountIdentificationType(AccountIdentificationType.ACCOUNT_NUMBER) @@ -208,6 +211,15 @@ public class LegalCustomerProductDirectoryService implements LegalCustomerProduc .accountRelationshipType(AccountRelationshipType.ACCOUNT_IS_SUB_ACCOUNT_FOR_ACCOUNT) .build() )) + .agreement(List.of( + Agreement.builder() + .arrangement(List.of( + Arrangement.builder() + .arrangementType(ArrangementType.INTEREST_ARRANGEMENT) + .build() + )) + .build() + )) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/banesco/module/legal_customer_product_directory/infrastructure/resource/LegalCustomerProductDirectoryResource.java b/src/main/java/com/banesco/module/legal_customer_product_directory/infrastructure/resource/LegalCustomerProductDirectoryResource.java index 261aecc..0c5856f 100644 --- a/src/main/java/com/banesco/module/legal_customer_product_directory/infrastructure/resource/LegalCustomerProductDirectoryResource.java +++ b/src/main/java/com/banesco/module/legal_customer_product_directory/infrastructure/resource/LegalCustomerProductDirectoryResource.java @@ -93,7 +93,7 @@ public class LegalCustomerProductDirectoryResource { "status": "A", "statusType": "ENABLED" }, - "accountType": "MMK", + "accountType": "CURRENT_ACCOUNT", "accountIdentification": [ { "accountIdentificationType": "ACCOUNT_NUMBER", @@ -173,6 +173,15 @@ public class LegalCustomerProductDirectoryResource { { "accountRelationshipType": "ACCOUNT_IS_SUB_ACCOUNT_FOR_ACCOUNT" } + ], + "agreement": [ + { + "arrangement": [ + { + "arrangementType": "INTEREST_ARRANGEMENT" + } + ] + } ] } ]