Compare commits
No commits in common. "932215b81a3e7eae7eab4ac9673d2631961f5560" and "0f29e795d23a2171a3ff01247146d7a13256cee4" have entirely different histories.
932215b81a
...
0f29e795d2
@ -22,10 +22,10 @@ RUN mkdir -p /work
|
|||||||
ENV TZ="America/Caracas"
|
ENV TZ="America/Caracas"
|
||||||
ENV LANGUAGE='en_US:en'
|
ENV LANGUAGE='en_US:en'
|
||||||
VOLUME /tmp
|
VOLUME /tmp
|
||||||
COPY /file/*-runner /work/app
|
COPY /file/*-runner /work/recLegalCustomerProductDirectory
|
||||||
RUN chmod -R 775 /work
|
RUN chmod -R 775 /work
|
||||||
RUN ls -ltra /work/
|
RUN ls -ltra /work/
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
WORKDIR /work/
|
WORKDIR /work/
|
||||||
|
|
||||||
ENTRYPOINT ["./app", "-Dquarkus.http.host=0.0.0.0"]
|
ENTRYPOINT ["./recLegalCustomerProductDirectory", "-Dquarkus.http.host=0.0.0.0"]
|
||||||
Binary file not shown.
@ -1,26 +0,0 @@
|
|||||||
package com.banesco.common.domain.model;
|
|
||||||
|
|
||||||
public enum BalanceType {
|
|
||||||
OPENING_BALANCE,
|
|
||||||
CLOSING_BALANCE,
|
|
||||||
CURRENT_BALANCE,
|
|
||||||
AVAILABLE_BALANCE,
|
|
||||||
LEDGER_BALANCE,
|
|
||||||
RESERVE_BALANCE,
|
|
||||||
FREE_BALANCE,
|
|
||||||
PRINCIPAL_BALANCE,
|
|
||||||
CLOSING_AVAILABLE,
|
|
||||||
CLOSING_BOOKED,
|
|
||||||
FORWARD_AVAILABLE,
|
|
||||||
INFORMATION,
|
|
||||||
INTERIM_AVAILABLE,
|
|
||||||
INTERIM_BOOKED,
|
|
||||||
OPENING_AVAILABLE,
|
|
||||||
OPENING_BOOKED,
|
|
||||||
PREVIOUSLY_CLOSED_BOOKED,
|
|
||||||
EXPECTED,
|
|
||||||
DAILY_MAXIMUM,
|
|
||||||
MONTHLY_MAXIMUM,
|
|
||||||
TRANSACTION_MAXIMUM,
|
|
||||||
TRANSACTION_MINIMUM,
|
|
||||||
}
|
|
||||||
@ -11,4 +11,5 @@ import lombok.*;
|
|||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class Identifier {
|
public class Identifier {
|
||||||
private String identifierValue;
|
private String identifierValue;
|
||||||
|
private String issuingAuthority;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
package com.banesco.module.account.domain.model;
|
package com.banesco.module.account.domain.model;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -13,20 +11,15 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
||||||
public class Account {
|
public class Account {
|
||||||
@Schema(description = "Estado de la cuenta")
|
|
||||||
private AccountStatus accountStatus;
|
private AccountStatus accountStatus;
|
||||||
@Schema(description = "Lista de datos de identificación de la cuenta")
|
|
||||||
private List<AccountIdentification> accountIdentification;
|
private List<AccountIdentification> accountIdentification;
|
||||||
@Schema(description = "Tipo de cuenta")
|
private List<AccountDateTime> accountDate;
|
||||||
private String accountType;
|
private String accountType;
|
||||||
@Schema(description = "Información de los tipos de balances de la cuenta")
|
private String accountPurpose;
|
||||||
private List<AccountBalance> accountBalance;
|
private List<AccountBalance> accountBalance;
|
||||||
@Schema(description = "Información de la moneda de la cuenta")
|
|
||||||
private List<AccountCurrency> accountCurrency;
|
private List<AccountCurrency> accountCurrency;
|
||||||
@Schema(description = "Información complementaria de la cuenta")
|
private String accountDescription;
|
||||||
|
private String accountName;
|
||||||
private List<AccountInvolvement> accountInvolvement;
|
private List<AccountInvolvement> accountInvolvement;
|
||||||
@Schema(description = "Información relacional de la cuenta con otras o consigo misma")
|
|
||||||
private List<AccountRelationship> accountRelationship;
|
|
||||||
}
|
}
|
||||||
@ -1,6 +1,5 @@
|
|||||||
package com.banesco.module.account.domain.model;
|
package com.banesco.module.account.domain.model;
|
||||||
|
|
||||||
import com.banesco.common.domain.model.BalanceType;
|
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -14,5 +13,5 @@ import java.math.BigDecimal;
|
|||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class AccountBalance {
|
public class AccountBalance {
|
||||||
private BigDecimal balanceAmount;
|
private BigDecimal balanceAmount;
|
||||||
private BalanceType balanceType;
|
private String balanceType;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import lombok.*;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class AccountRelationship {
|
public class AccountDateTime {
|
||||||
private AccountRelationshipType accountRelationshipType;
|
private String dateType;
|
||||||
|
private String date;
|
||||||
}
|
}
|
||||||
@ -11,6 +11,6 @@ import lombok.*;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class AccountIdentification {
|
public class AccountIdentification {
|
||||||
private AccountIdentificationType accountIdentificationType;
|
private String accountIdentificationType;
|
||||||
private Identifier accountIdentification;
|
private Identifier accountIdentification;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
package com.banesco.module.account.domain.model;
|
|
||||||
|
|
||||||
public enum AccountIdentificationType {
|
|
||||||
BBAN,
|
|
||||||
IBAN,
|
|
||||||
UPIC,
|
|
||||||
ACCOUNT_NUMBER,
|
|
||||||
PAN,
|
|
||||||
PAYM,
|
|
||||||
WALLET,
|
|
||||||
SORT_CODE_AND_ACCOUNT_NUMBER,
|
|
||||||
PRODUCT_CODE,
|
|
||||||
BANK_NUMBER,
|
|
||||||
ACCOUNT_CLASS
|
|
||||||
}
|
|
||||||
@ -11,6 +11,6 @@ import lombok.*;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class AccountInvolvement {
|
public class AccountInvolvement {
|
||||||
private AccountInvolvementType accountInvolvementType;
|
private String accountInvolvementType;
|
||||||
private Party partyReference;
|
private Party partyReference;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
package com.banesco.module.account.domain.model;
|
|
||||||
|
|
||||||
public enum AccountInvolvementType {
|
|
||||||
PARTY_IS_OWNER_OF_ACCOUNT,
|
|
||||||
PARTY_IS_SERVICER_OF_ACCOUNT,
|
|
||||||
PARTY_IS_PAYEE_ON_ACCOUNT,
|
|
||||||
PARTY_IS_PRIMARY_OWNER_OF_ACCOUNT,
|
|
||||||
PARTY_IS_CO_OWNER_OF_ACCOUNT,
|
|
||||||
PARTY_IS_JOINT_OWNER_OF_ACCOUNT,
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
package com.banesco.module.account.domain.model;
|
|
||||||
|
|
||||||
public enum AccountRelationshipType {
|
|
||||||
ACCOUNT_IS_PARENT_ACCOUNT_FOR_ACCOUNT,
|
|
||||||
ACCOUNT_IS_SUB_ACCOUNT_FOR_ACCOUNT,
|
|
||||||
ACCOUNT_IS_LINKED_TO_ACCOUNT,
|
|
||||||
}
|
|
||||||
@ -11,5 +11,5 @@ import lombok.*;
|
|||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class AccountStatus {
|
public class AccountStatus {
|
||||||
private String status;
|
private String status;
|
||||||
private AccountStatusType statusType;
|
private String statusType;
|
||||||
}
|
}
|
||||||
@ -1,9 +0,0 @@
|
|||||||
package com.banesco.module.account.domain.model;
|
|
||||||
|
|
||||||
public enum AccountStatusType {
|
|
||||||
ENABLED,
|
|
||||||
DISABLED,
|
|
||||||
DELETED,
|
|
||||||
PROFORMA,
|
|
||||||
PENDING,
|
|
||||||
}
|
|
||||||
@ -1,5 +1,6 @@
|
|||||||
package com.banesco.module.legal_customer_product_directory.application.service;
|
package com.banesco.module.legal_customer_product_directory.application.service;
|
||||||
|
|
||||||
|
import com.banesco.common.application.helper.ErrorResponseHelper;
|
||||||
import com.banesco.common.application.helper.RequestValidatorHelper;
|
import com.banesco.common.application.helper.RequestValidatorHelper;
|
||||||
import com.banesco.common.domain.exception.BaseApiException;
|
import com.banesco.common.domain.exception.BaseApiException;
|
||||||
import com.banesco.common.domain.exception.ServiceUnavailableException;
|
import com.banesco.common.domain.exception.ServiceUnavailableException;
|
||||||
@ -20,7 +21,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -32,6 +32,7 @@ public class LegalCustomerProductDirectoryService implements LegalCustomerProduc
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public LegalCustomerProductDirectoryService(
|
public LegalCustomerProductDirectoryService(
|
||||||
|
ErrorResponseHelper errorResponseHelper,
|
||||||
RequestValidatorHelper requestValidatorHelper,
|
RequestValidatorHelper requestValidatorHelper,
|
||||||
BusinessUseCase businessUseCase
|
BusinessUseCase businessUseCase
|
||||||
) {
|
) {
|
||||||
@ -67,6 +68,7 @@ public class LegalCustomerProductDirectoryService implements LegalCustomerProduc
|
|||||||
LegalCustomerProductDirectoryRequest request
|
LegalCustomerProductDirectoryRequest request
|
||||||
) {
|
) {
|
||||||
requestValidatorHelper.validateRequired(request);
|
requestValidatorHelper.validateRequired(request);
|
||||||
|
requestValidatorHelper.validateFieldValues(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiResponse<LegalCustomerProductDirectoryResponse> business(
|
private ApiResponse<LegalCustomerProductDirectoryResponse> business(
|
||||||
@ -77,101 +79,103 @@ public class LegalCustomerProductDirectoryService implements LegalCustomerProduc
|
|||||||
return businessUseCase.execute(
|
return businessUseCase.execute(
|
||||||
true,
|
true,
|
||||||
request.getCustomerIbsNumber(),
|
request.getCustomerIbsNumber(),
|
||||||
Map.of(),
|
request.toBusinessRequest(),
|
||||||
request.toBusinessHeaders(),
|
request.toBusinessHeaders(),
|
||||||
LegalCustomerProductDirectoryResponse.class
|
LegalCustomerProductDirectoryResponse.class
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiResponse<LegalCustomerProductDirectoryResponse> createSuccessMock() {
|
private ApiResponse<LegalCustomerProductDirectoryResponse> createSuccessMock() {
|
||||||
return new ApiResponse<>(
|
StatusResponse statusResponse = StatusResponse.builder()
|
||||||
LegalCustomerProductDirectoryResponse.builder()
|
|
||||||
.customerProductAndServiceDirectory(
|
|
||||||
CustomerProductAndServiceDirectory.builder()
|
|
||||||
.party(getParty())
|
|
||||||
.accounts(List.of(getAccount()))
|
|
||||||
.build()
|
|
||||||
)
|
|
||||||
.build(),
|
|
||||||
StatusResponse.builder()
|
|
||||||
.statusCode("200")
|
.statusCode("200")
|
||||||
.message("Operación exitosa")
|
.message("Operación exitosa")
|
||||||
.build()
|
.build();
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Party getParty() {
|
return new ApiResponse<>(
|
||||||
return Party.builder()
|
LegalCustomerProductDirectoryResponse.builder()
|
||||||
|
.customerProductAndServiceDirectory(CustomerProductAndServiceDirectory.builder()
|
||||||
|
.party(Party.builder()
|
||||||
.partyName(List.of(
|
.partyName(List.of(
|
||||||
Name.builder()
|
Name.builder()
|
||||||
.fullName("TASCA RESTAURANT GOOD WORLD CEN, C.A.")
|
.fullName("TASCA RESTAURANT GOOD WORLD CEN, C.A.")
|
||||||
.build()
|
.build()
|
||||||
))
|
))
|
||||||
.partyType(PartyType.ORGANISATION)
|
.partyType(PartyType.ORGANISATION)
|
||||||
|
.partyDateTime(List.of())
|
||||||
.partyIdentification(List.of(
|
.partyIdentification(List.of(
|
||||||
PartyIdentification.builder()
|
PartyIdentification.builder()
|
||||||
.partyIdentificationType(PartyIdentificationType.TAX_IDENTIFICATION_NUMBER)
|
.partyIdentificationType(PartyIdentificationType.TAX_IDENTIFICATION_NUMBER)
|
||||||
.partyIdentification(Identifier.builder()
|
.partyIdentification(Identifier.builder()
|
||||||
.identifierValue("J000000001")
|
.identifierValue("J000000001")
|
||||||
|
.issuingAuthority("")
|
||||||
.build())
|
.build())
|
||||||
.build()
|
.build()
|
||||||
))
|
))
|
||||||
.build();
|
.partyLegalStructureType("")
|
||||||
}
|
.build())
|
||||||
|
.accounts(List.of(
|
||||||
private Account getAccount() {
|
Account.builder()
|
||||||
return Account.builder()
|
.accountStatus(AccountStatus.builder()
|
||||||
.accountStatus(AccountStatus.builder()
|
.status("D")
|
||||||
.status("A")
|
|
||||||
.statusType(AccountStatusType.ENABLED)
|
|
||||||
.build())
|
.build())
|
||||||
.accountType("MMK")
|
|
||||||
.accountIdentification(List.of(
|
.accountIdentification(List.of(
|
||||||
AccountIdentification.builder()
|
AccountIdentification.builder()
|
||||||
.accountIdentificationType(AccountIdentificationType.ACCOUNT_NUMBER)
|
.accountIdentificationType("NUMERO_CUENTA")
|
||||||
.accountIdentification(Identifier.builder()
|
.accountIdentification(Identifier.builder()
|
||||||
.identifierValue("01340025330253093528")
|
.identifierValue("01340025330253093528")
|
||||||
|
.issuingAuthority("")
|
||||||
.build())
|
.build())
|
||||||
.build(),
|
.build(),
|
||||||
AccountIdentification.builder()
|
AccountIdentification.builder()
|
||||||
.accountIdentificationType(AccountIdentificationType.BANK_NUMBER)
|
.accountIdentificationType("NUMERO_BANCO")
|
||||||
.accountIdentification(Identifier.builder()
|
.accountIdentification(Identifier.builder()
|
||||||
.identifierValue("01")
|
.identifierValue("01")
|
||||||
|
.issuingAuthority("")
|
||||||
.build())
|
.build())
|
||||||
.build(),
|
.build(),
|
||||||
AccountIdentification.builder()
|
AccountIdentification.builder()
|
||||||
.accountIdentificationType(AccountIdentificationType.PRODUCT_CODE)
|
.accountIdentificationType("CODIGO_PRODUCTO")
|
||||||
.accountIdentification(Identifier.builder()
|
.accountIdentification(Identifier.builder()
|
||||||
.identifierValue("3980")
|
.identifierValue("3980")
|
||||||
|
.issuingAuthority("")
|
||||||
.build())
|
.build())
|
||||||
.build(),
|
.build(),
|
||||||
AccountIdentification.builder()
|
AccountIdentification.builder()
|
||||||
.accountIdentificationType(AccountIdentificationType.ACCOUNT_CLASS)
|
.accountIdentificationType("CLASE_CUENTA")
|
||||||
.accountIdentification(Identifier.builder()
|
.accountIdentification(Identifier.builder()
|
||||||
.identifierValue("80")
|
.identifierValue("80")
|
||||||
|
.issuingAuthority("")
|
||||||
|
.build())
|
||||||
|
.build(),
|
||||||
|
AccountIdentification.builder()
|
||||||
|
.accountIdentificationType("TIPO_CUENTA")
|
||||||
|
.accountIdentification(Identifier.builder()
|
||||||
|
.identifierValue("MMK")
|
||||||
|
.issuingAuthority("")
|
||||||
.build())
|
.build())
|
||||||
.build()
|
.build()
|
||||||
))
|
))
|
||||||
|
.accountDate(List.of())
|
||||||
.accountBalance(List.of(
|
.accountBalance(List.of(
|
||||||
AccountBalance.builder()
|
AccountBalance.builder()
|
||||||
.balanceAmount(BigDecimal.valueOf(390417.36))
|
.balanceAmount(BigDecimal.valueOf(390417.36))
|
||||||
.balanceType(BalanceType.AVAILABLE_BALANCE)
|
.balanceType("SALDO_DISPONIBLE")
|
||||||
.build(),
|
.build(),
|
||||||
AccountBalance.builder()
|
AccountBalance.builder()
|
||||||
.balanceAmount(BigDecimal.valueOf(100000.00))
|
.balanceAmount(BigDecimal.valueOf(100000.00))
|
||||||
.balanceType(BalanceType.DAILY_MAXIMUM)
|
.balanceType("MAXIMO_DIARIO")
|
||||||
|
.build(),
|
||||||
|
AccountBalance.builder()
|
||||||
|
.balanceAmount(BigDecimal.valueOf(100000.00))
|
||||||
|
.balanceType("MAXIMO_TRANSACCION")
|
||||||
.build(),
|
.build(),
|
||||||
AccountBalance.builder()
|
AccountBalance.builder()
|
||||||
.balanceAmount(BigDecimal.valueOf(3000000.00))
|
.balanceAmount(BigDecimal.valueOf(3000000.00))
|
||||||
.balanceType(BalanceType.MONTHLY_MAXIMUM)
|
.balanceType("MAXIMO_MENSUAL")
|
||||||
.build(),
|
.build(),
|
||||||
AccountBalance.builder()
|
AccountBalance.builder()
|
||||||
.balanceAmount(BigDecimal.valueOf(0.01))
|
.balanceAmount(BigDecimal.valueOf(0.01))
|
||||||
.balanceType(BalanceType.TRANSACTION_MINIMUM)
|
.balanceType("MINIMO_TRANSACCION")
|
||||||
.build(),
|
|
||||||
AccountBalance.builder()
|
|
||||||
.balanceAmount(BigDecimal.valueOf(100000.00))
|
|
||||||
.balanceType(BalanceType.TRANSACTION_MAXIMUM)
|
|
||||||
.build()
|
.build()
|
||||||
))
|
))
|
||||||
.accountCurrency(List.of(
|
.accountCurrency(List.of(
|
||||||
@ -180,34 +184,29 @@ public class LegalCustomerProductDirectoryService implements LegalCustomerProduc
|
|||||||
.currencyType(CurrencyType.BASE)
|
.currencyType(CurrencyType.BASE)
|
||||||
.build()
|
.build()
|
||||||
))
|
))
|
||||||
|
.accountDescription("TASCA RESTAURANT GOOD WORLD CEN, C.A.")
|
||||||
|
.accountName("")
|
||||||
.accountInvolvement(List.of(
|
.accountInvolvement(List.of(
|
||||||
AccountInvolvement.builder()
|
AccountInvolvement.builder()
|
||||||
.accountInvolvementType(AccountInvolvementType.PARTY_IS_OWNER_OF_ACCOUNT)
|
.accountInvolvementType("CONTACTO_TELEFONICO")
|
||||||
.partyReference(
|
.partyReference(Party.builder()
|
||||||
Party.builder()
|
|
||||||
.partyIdentification(List.of(
|
.partyIdentification(List.of(
|
||||||
PartyIdentification.builder()
|
PartyIdentification.builder()
|
||||||
.partyIdentificationType(PartyIdentificationType.TELEPHONE_NUMBER)
|
.partyIdentificationType(PartyIdentificationType.TELEPHONE_NUMBER)
|
||||||
.partyIdentification(Identifier.builder()
|
.partyIdentification(Identifier.builder()
|
||||||
.identifierValue("04122710660")
|
.identifierValue("04122710660")
|
||||||
|
.issuingAuthority("")
|
||||||
|
.build())
|
||||||
|
.build()
|
||||||
|
))
|
||||||
|
.build())
|
||||||
|
.build()
|
||||||
|
))
|
||||||
|
.build()
|
||||||
|
))
|
||||||
.build())
|
.build())
|
||||||
.build(),
|
.build(),
|
||||||
PartyIdentification.builder()
|
statusResponse
|
||||||
.partyIdentificationType(PartyIdentificationType.TELEPHONE_OPERATOR)
|
);
|
||||||
.partyIdentification(Identifier.builder()
|
|
||||||
.identifierValue("0412")
|
|
||||||
.build())
|
|
||||||
.build()
|
|
||||||
))
|
|
||||||
.build()
|
|
||||||
)
|
|
||||||
.build()
|
|
||||||
))
|
|
||||||
.accountRelationship(List.of(
|
|
||||||
AccountRelationship.builder()
|
|
||||||
.accountRelationshipType(AccountRelationshipType.ACCOUNT_IS_SUB_ACCOUNT_FOR_ACCOUNT)
|
|
||||||
.build()
|
|
||||||
))
|
|
||||||
.build();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3,7 +3,6 @@ package com.banesco.module.legal_customer_product_directory.domain.dto.response;
|
|||||||
import com.banesco.module.legal_customer_product_directory.domain.model.CustomerProductAndServiceDirectory;
|
import com.banesco.module.legal_customer_product_directory.domain.model.CustomerProductAndServiceDirectory;
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@ToString
|
@ToString
|
||||||
@ -11,8 +10,6 @@ import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
@Schema(description = "Respuesta del directorio de cuentas de cliente legal")
|
|
||||||
public class LegalCustomerProductDirectoryResponse {
|
public class LegalCustomerProductDirectoryResponse {
|
||||||
@Schema(description = "Directorio de cuentas")
|
|
||||||
private CustomerProductAndServiceDirectory customerProductAndServiceDirectory;
|
private CustomerProductAndServiceDirectory customerProductAndServiceDirectory;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import com.banesco.module.account.domain.model.Account;
|
|||||||
import com.banesco.module.party.domain.model.Party;
|
import com.banesco.module.party.domain.model.Party;
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -14,10 +13,7 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
@Schema(description = "Directorio de cuentas")
|
|
||||||
public class CustomerProductAndServiceDirectory {
|
public class CustomerProductAndServiceDirectory {
|
||||||
@Schema(description = "Información del cliente")
|
|
||||||
private Party party;
|
private Party party;
|
||||||
@Schema(description = "Lista de cuentas")
|
|
||||||
private List<Account> accounts;
|
private List<Account> accounts;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,10 +3,8 @@ package com.banesco.module.legal_customer_product_directory.infrastructure.resou
|
|||||||
import com.banesco.common.application.helper.ErrorResponseHelper;
|
import com.banesco.common.application.helper.ErrorResponseHelper;
|
||||||
import com.banesco.common.domain.exception.BaseApiException;
|
import com.banesco.common.domain.exception.BaseApiException;
|
||||||
import com.banesco.common.domain.model.ApiResponse;
|
import com.banesco.common.domain.model.ApiResponse;
|
||||||
import com.banesco.common.domain.model.StatusResponse;
|
|
||||||
import com.banesco.module.legal_customer_product_directory.application.usecase.LegalCustomerProductDirectoryUseCase;
|
import com.banesco.module.legal_customer_product_directory.application.usecase.LegalCustomerProductDirectoryUseCase;
|
||||||
import com.banesco.module.legal_customer_product_directory.domain.dto.request.LegalCustomerProductDirectoryRequest;
|
import com.banesco.module.legal_customer_product_directory.domain.dto.request.LegalCustomerProductDirectoryRequest;
|
||||||
import com.banesco.module.legal_customer_product_directory.domain.dto.response.LegalCustomerProductDirectoryResponse;
|
|
||||||
import jakarta.inject.Inject;
|
import jakarta.inject.Inject;
|
||||||
import jakarta.ws.rs.*;
|
import jakarta.ws.rs.*;
|
||||||
import jakarta.ws.rs.core.MediaType;
|
import jakarta.ws.rs.core.MediaType;
|
||||||
@ -16,7 +14,6 @@ import org.eclipse.microprofile.openapi.annotations.Operation;
|
|||||||
import org.eclipse.microprofile.openapi.annotations.media.Content;
|
import org.eclipse.microprofile.openapi.annotations.media.Content;
|
||||||
import org.eclipse.microprofile.openapi.annotations.media.ExampleObject;
|
import org.eclipse.microprofile.openapi.annotations.media.ExampleObject;
|
||||||
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
import org.eclipse.microprofile.openapi.annotations.media.SchemaProperty;
|
|
||||||
import org.eclipse.microprofile.openapi.annotations.parameters.Parameter;
|
import org.eclipse.microprofile.openapi.annotations.parameters.Parameter;
|
||||||
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
|
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
|
||||||
import org.eclipse.microprofile.openapi.annotations.responses.APIResponses;
|
import org.eclipse.microprofile.openapi.annotations.responses.APIResponses;
|
||||||
@ -52,19 +49,7 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
description = "Operación exitosa",
|
description = "Operación exitosa",
|
||||||
content = @Content(
|
content = @Content(
|
||||||
mediaType = MediaType.APPLICATION_JSON,
|
mediaType = MediaType.APPLICATION_JSON,
|
||||||
schema = @Schema(
|
schema = @Schema(implementation = ApiResponse.class),
|
||||||
implementation = ApiResponse.class,
|
|
||||||
properties = {
|
|
||||||
@SchemaProperty(
|
|
||||||
name = "data",
|
|
||||||
oneOf = {LegalCustomerProductDirectoryResponse.class}
|
|
||||||
),
|
|
||||||
@SchemaProperty(
|
|
||||||
name = "statusResponse",
|
|
||||||
implementation = StatusResponse.class
|
|
||||||
)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
examples = @ExampleObject(
|
examples = @ExampleObject(
|
||||||
name = "Ejemplo exitoso",
|
name = "Ejemplo exitoso",
|
||||||
value = """
|
value = """
|
||||||
@ -78,68 +63,80 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"partyType": "ORGANISATION",
|
"partyType": "ORGANISATION",
|
||||||
|
"partyDateTime": [],
|
||||||
"partyIdentification": [
|
"partyIdentification": [
|
||||||
{
|
{
|
||||||
"partyIdentificationType": "TAX_IDENTIFICATION_NUMBER",
|
"partyIdentificationType": "TAX_IDENTIFICATION_NUMBER",
|
||||||
"partyIdentification": {
|
"partyIdentification": {
|
||||||
"identifierValue": "J000000001"
|
"identifierValue": "J000000001",
|
||||||
|
"issuingAuthority": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"partyLegalStructureType": ""
|
||||||
},
|
},
|
||||||
"accounts": [
|
"accounts": [
|
||||||
{
|
{
|
||||||
"accountStatus": {
|
"accountStatus": {
|
||||||
"status": "A",
|
"status": "D"
|
||||||
"statusType": "ENABLED"
|
|
||||||
},
|
},
|
||||||
"accountType": "MMK",
|
|
||||||
"accountIdentification": [
|
"accountIdentification": [
|
||||||
{
|
{
|
||||||
"accountIdentificationType": "ACCOUNT_NUMBER",
|
"accountIdentificationType": "NUMERO_CUENTA",
|
||||||
"accountIdentification": {
|
"accountIdentification": {
|
||||||
"identifierValue": "01340025330253093528"
|
"identifierValue": "01340025330253093528",
|
||||||
|
"issuingAuthority": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"accountIdentificationType": "BANK_NUMBER",
|
"accountIdentificationType": "NUMERO_BANCO",
|
||||||
"accountIdentification": {
|
"accountIdentification": {
|
||||||
"identifierValue": "01"
|
"identifierValue": "01",
|
||||||
|
"issuingAuthority": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"accountIdentificationType": "PRODUCT_CODE",
|
"accountIdentificationType": "CODIGO_PRODUCTO",
|
||||||
"accountIdentification": {
|
"accountIdentification": {
|
||||||
"identifierValue": "3980"
|
"identifierValue": "3980",
|
||||||
|
"issuingAuthority": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"accountIdentificationType": "ACCOUNT_CLASS",
|
"accountIdentificationType": "CLASE_CUENTA",
|
||||||
"accountIdentification": {
|
"accountIdentification": {
|
||||||
"identifierValue": "80"
|
"identifierValue": "80",
|
||||||
|
"issuingAuthority": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"accountIdentificationType": "TIPO_CUENTA",
|
||||||
|
"accountIdentification": {
|
||||||
|
"identifierValue": "MMK",
|
||||||
|
"issuingAuthority": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"accountBalance": [
|
"accountBalance": [
|
||||||
{
|
{
|
||||||
"balanceAmount": 390417.36,
|
"balanceAmount": 390417.36,
|
||||||
"balanceType": "AVAILABLE_BALANCE"
|
"balanceType": "SALDO_DISPONIBLE"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"balanceAmount": 100000.00,
|
"balanceAmount": 100000.00,
|
||||||
"balanceType": "DAILY_MAXIMUM"
|
"balanceType": "MAXIMO_DIARIO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"balanceAmount": 100000.00,
|
||||||
|
"balanceType": "MAXIMO_TRANSACCION"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"balanceAmount": 3000000.00,
|
"balanceAmount": 3000000.00,
|
||||||
"balanceType": "MONTHLY_MAXIMUM"
|
"balanceType": "MAXIMO_MENSUAL"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"balanceAmount": 0.01,
|
"balanceAmount": 0.01,
|
||||||
"balanceType": "TRANSACTION_MINIMUM"
|
"balanceType": "MINIMO_TRANSACCION"
|
||||||
},
|
|
||||||
{
|
|
||||||
"balanceAmount": 100000.00,
|
|
||||||
"balanceType": "TRANSACTION_MAXIMUM"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"accountCurrency": [
|
"accountCurrency": [
|
||||||
@ -148,31 +145,22 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
"currencyType": "BASE"
|
"currencyType": "BASE"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"accountDescription": "TASCA RESTAURANT GOOD WORLD CEN, C.A.",
|
||||||
"accountInvolvement": [
|
"accountInvolvement": [
|
||||||
{
|
{
|
||||||
"accountInvolvementType": "PARTY_IS_OWNER_OF_ACCOUNT",
|
"accountInvolvementType": "CONTACTO_TELEFONICO",
|
||||||
"partyReference": {
|
"partyReference": {
|
||||||
"partyIdentification": [
|
"partyIdentification": [
|
||||||
{
|
{
|
||||||
"partyIdentificationType": "TELEPHONE_NUMBER",
|
"partyIdentificationType": "TELEPHONE_NUMBER",
|
||||||
"partyIdentification": {
|
"partyIdentification": {
|
||||||
"identifierValue": "04122710660"
|
"identifierValue": "04122710660",
|
||||||
}
|
"issuingAuthority": ""
|
||||||
},
|
|
||||||
{
|
|
||||||
"partyIdentificationType": "TELEPHONE_OPERATOR",
|
|
||||||
"partyIdentification": {
|
|
||||||
"identifierValue": "0412"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"accountRelationship": [
|
|
||||||
{
|
|
||||||
"accountRelationshipType": "ACCOUNT_IS_SUB_ACCOUNT_FOR_ACCOUNT"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -192,19 +180,7 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
description = "Error en formato o campo requerido",
|
description = "Error en formato o campo requerido",
|
||||||
content = @Content(
|
content = @Content(
|
||||||
mediaType = MediaType.APPLICATION_JSON,
|
mediaType = MediaType.APPLICATION_JSON,
|
||||||
schema = @Schema(
|
schema = @Schema(implementation = ApiResponse.class),
|
||||||
implementation = ApiResponse.class,
|
|
||||||
properties = {
|
|
||||||
@SchemaProperty(
|
|
||||||
name = "data",
|
|
||||||
oneOf = {LegalCustomerProductDirectoryResponse.class}
|
|
||||||
),
|
|
||||||
@SchemaProperty(
|
|
||||||
name = "statusResponse",
|
|
||||||
implementation = StatusResponse.class
|
|
||||||
)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
examples = {
|
examples = {
|
||||||
@ExampleObject(
|
@ExampleObject(
|
||||||
name = "Error VDE01 - Campo obligatorio",
|
name = "Error VDE01 - Campo obligatorio",
|
||||||
@ -238,19 +214,7 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
description = "No autorizado",
|
description = "No autorizado",
|
||||||
content = @Content(
|
content = @Content(
|
||||||
mediaType = MediaType.APPLICATION_JSON,
|
mediaType = MediaType.APPLICATION_JSON,
|
||||||
schema = @Schema(
|
schema = @Schema(implementation = ApiResponse.class),
|
||||||
implementation = ApiResponse.class,
|
|
||||||
properties = {
|
|
||||||
@SchemaProperty(
|
|
||||||
name = "data",
|
|
||||||
oneOf = {LegalCustomerProductDirectoryResponse.class}
|
|
||||||
),
|
|
||||||
@SchemaProperty(
|
|
||||||
name = "statusResponse",
|
|
||||||
implementation = StatusResponse.class
|
|
||||||
)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
examples = {
|
examples = {
|
||||||
@ExampleObject(
|
@ExampleObject(
|
||||||
name = "Error VRN08 - Identificación del fintechId no coincide",
|
name = "Error VRN08 - Identificación del fintechId no coincide",
|
||||||
@ -272,19 +236,7 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
description = "Servicio no disponible",
|
description = "Servicio no disponible",
|
||||||
content = @Content(
|
content = @Content(
|
||||||
mediaType = MediaType.APPLICATION_JSON,
|
mediaType = MediaType.APPLICATION_JSON,
|
||||||
schema = @Schema(
|
schema = @Schema(implementation = ApiResponse.class),
|
||||||
implementation = ApiResponse.class,
|
|
||||||
properties = {
|
|
||||||
@SchemaProperty(
|
|
||||||
name = "data",
|
|
||||||
oneOf = {LegalCustomerProductDirectoryResponse.class}
|
|
||||||
),
|
|
||||||
@SchemaProperty(
|
|
||||||
name = "statusResponse",
|
|
||||||
implementation = StatusResponse.class
|
|
||||||
)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
examples = {
|
examples = {
|
||||||
@ExampleObject(
|
@ExampleObject(
|
||||||
name = "Error VRN04 - Fuera de horario",
|
name = "Error VRN04 - Fuera de horario",
|
||||||
@ -325,7 +277,47 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
|
|
||||||
@PathParam("customerIbsNumber")
|
@PathParam("customerIbsNumber")
|
||||||
@Parameter(description = "Número de cliente IBS (VCUSCUN)", example = "200053197")
|
@Parameter(description = "Número de cliente IBS (VCUSCUN)", example = "200053197")
|
||||||
String customerIbsNumber
|
String customerIbsNumber,
|
||||||
|
|
||||||
|
@QueryParam("bankNumber")
|
||||||
|
@Parameter(description = "Número de banco (VACMBNK)", example = "01")
|
||||||
|
String bankNumber,
|
||||||
|
|
||||||
|
@QueryParam("currencyCode")
|
||||||
|
@Parameter(description = "Código de moneda (VACMCCY)", example = "BS")
|
||||||
|
String currencyCode,
|
||||||
|
|
||||||
|
@QueryParam("accountStatus")
|
||||||
|
@Parameter(description = "Estatus de cuenta (VACMAST). 'A'=Activa BS, 'O'=Activa USD, 'ACTBSUSD'=Ambas", example = "A")
|
||||||
|
String accountStatus,
|
||||||
|
|
||||||
|
@QueryParam("productCvCode")
|
||||||
|
@Parameter(description = "Código de Producto Cuenta Verde (VACMPROCV). 'CV'=Cuenta verde, 'CVFL'=Cuenta verde con opción activa", example = "CV")
|
||||||
|
String productCvCode,
|
||||||
|
|
||||||
|
@QueryParam("productCode")
|
||||||
|
@Parameter(description = "Código de producto (VACMPRO)", example = "3980")
|
||||||
|
String productCode,
|
||||||
|
|
||||||
|
@QueryParam("channelCode")
|
||||||
|
@Parameter(description = "Código de canal (VAFILICANAL)", example = "APP")
|
||||||
|
String channelCode,
|
||||||
|
|
||||||
|
@QueryParam("serviceType")
|
||||||
|
@Parameter(description = "Tipo de servicio (VAFILICOSER)", example = "P2P")
|
||||||
|
String serviceType,
|
||||||
|
|
||||||
|
@QueryParam("affiliationStatus")
|
||||||
|
@Parameter(description = "Estatus de afiliación (VAFILISTATU)", example = "A")
|
||||||
|
String affiliationStatus,
|
||||||
|
|
||||||
|
@QueryParam("limitType")
|
||||||
|
@Parameter(description = "Pagador/Receptor (VALIMIT). 'PAG'=Pagadora, 'REC'=Receptora", example = "PAG")
|
||||||
|
String limitType,
|
||||||
|
|
||||||
|
@QueryParam("casheaIndicator")
|
||||||
|
@Parameter(description = "Indicador cash (VCASHEA). 'SI'=En tabla cashea, 'NO'=No en tabla cashea", example = "SI")
|
||||||
|
String casheaIndicator
|
||||||
) {
|
) {
|
||||||
log.info("Iniciando consulta para cliente IBS: {}", customerIbsNumber);
|
log.info("Iniciando consulta para cliente IBS: {}", customerIbsNumber);
|
||||||
|
|
||||||
@ -335,6 +327,16 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
.customerIbsNumber(Objects.toString(customerIbsNumber, ""))
|
.customerIbsNumber(Objects.toString(customerIbsNumber, ""))
|
||||||
.customerReferenceFintechId(customerReferenceFintechId)
|
.customerReferenceFintechId(customerReferenceFintechId)
|
||||||
.appId(appId)
|
.appId(appId)
|
||||||
|
.bankNumber(Objects.toString(bankNumber, ""))
|
||||||
|
.currencyCode(Objects.toString(currencyCode, ""))
|
||||||
|
.accountStatus(Objects.toString(accountStatus, ""))
|
||||||
|
.productCvCode(Objects.toString(productCvCode, ""))
|
||||||
|
.productCode(Objects.toString(productCode, ""))
|
||||||
|
.channelCode(Objects.toString(channelCode, ""))
|
||||||
|
.serviceType(Objects.toString(serviceType, ""))
|
||||||
|
.affiliationStatus(Objects.toString(affiliationStatus, ""))
|
||||||
|
.limitType(Objects.toString(limitType, ""))
|
||||||
|
.casheaIndicator(Objects.toString(casheaIndicator, ""))
|
||||||
.build()
|
.build()
|
||||||
)).build();
|
)).build();
|
||||||
} catch (BaseApiException e) {
|
} catch (BaseApiException e) {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package com.banesco.module.party.domain.model;
|
package com.banesco.module.party.domain.model;
|
||||||
|
|
||||||
import com.banesco.common.domain.model.Name;
|
import com.banesco.common.domain.model.Name;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -13,9 +12,10 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
||||||
public class Party {
|
public class Party {
|
||||||
private List<Name> partyName;
|
private List<Name> partyName;
|
||||||
private PartyType partyType;
|
private PartyType partyType;
|
||||||
|
private List<PartyDateTime> partyDateTime;
|
||||||
private List<PartyIdentification> partyIdentification;
|
private List<PartyIdentification> partyIdentification;
|
||||||
|
private String partyLegalStructureType;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,5 @@ public enum PartyIdentificationType {
|
|||||||
IDENTITY_CARD_NUMBER,
|
IDENTITY_CARD_NUMBER,
|
||||||
CONCAT,
|
CONCAT,
|
||||||
NATIONAL_REGISTRATION_IDENTIFICATION_NUMBER,
|
NATIONAL_REGISTRATION_IDENTIFICATION_NUMBER,
|
||||||
TELEPHONE_NUMBER,
|
TELEPHONE_NUMBER
|
||||||
TELEPHONE_OPERATOR,
|
|
||||||
}
|
}
|
||||||
@ -11,7 +11,7 @@ api:
|
|||||||
allowed:
|
allowed:
|
||||||
request-validation:
|
request-validation:
|
||||||
customer-ibs-number: '\d+'
|
customer-ibs-number: '\d+'
|
||||||
account-status: '^(A)$'
|
account-status: '^(A|O|ACTBSUSD)$'
|
||||||
product-cv-code: '^(CV|CVFL)$'
|
product-cv-code: '^(CV|CVFL)$'
|
||||||
limit-type: '^(PAG|REC)$'
|
limit-type: '^(PAG|REC)$'
|
||||||
cachea-indicator: '^(SI|NO)$'
|
cachea-indicator: '^(SI|NO)$'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user