Add accountType & agreement properties

This commit is contained in:
Ramon Ramirez 2026-01-09 10:38:34 -04:00
parent 932215b81a
commit f34510028b
8 changed files with 117 additions and 3 deletions

View File

@ -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> arrangement;
}

View File

@ -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;
}

View File

@ -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,
}

View File

@ -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> 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> accountBalance;
@Schema(description = "Información de la moneda de la cuenta")
@ -29,4 +30,6 @@ public class Account {
private List<AccountInvolvement> accountInvolvement;
@Schema(description = "Información relacional de la cuenta con otras o consigo misma")
private List<AccountRelationship> accountRelationship;
@Schema(description = "Información del acuerdo de la cuenta")
private List<Agreement> agreement;
}

View File

@ -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,
}

View File

@ -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();
}
}

View File

@ -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"
}
]
}
]
}
]