update payload request account
This commit is contained in:
parent
186dc8ec36
commit
932215b81a
Binary file not shown.
@ -1,7 +1,9 @@
|
|||||||
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;
|
||||||
|
|
||||||
@ -11,12 +13,20 @@ 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 String accountType;
|
private String accountType;
|
||||||
|
@Schema(description = "Información de los tipos de balances de la cuenta")
|
||||||
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 List<AccountInvolvement> accountInvolvement;
|
private List<AccountInvolvement> accountInvolvement;
|
||||||
|
@Schema(description = "Información relacional de la cuenta con otras o consigo misma")
|
||||||
private List<AccountRelationship> accountRelationship;
|
private List<AccountRelationship> accountRelationship;
|
||||||
}
|
}
|
||||||
@ -14,13 +14,13 @@ import com.banesco.module.party.domain.model.Party;
|
|||||||
import com.banesco.module.party.domain.model.PartyIdentification;
|
import com.banesco.module.party.domain.model.PartyIdentification;
|
||||||
import com.banesco.module.party.domain.model.PartyIdentificationType;
|
import com.banesco.module.party.domain.model.PartyIdentificationType;
|
||||||
import com.banesco.module.party.domain.model.PartyType;
|
import com.banesco.module.party.domain.model.PartyType;
|
||||||
import com.banesco.module.servicing_issue.domain.model.ServicingIssue;
|
|
||||||
import jakarta.enterprise.context.ApplicationScoped;
|
import jakarta.enterprise.context.ApplicationScoped;
|
||||||
import jakarta.inject.Inject;
|
import jakarta.inject.Inject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
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
|
||||||
@ -77,7 +77,7 @@ public class LegalCustomerProductDirectoryService implements LegalCustomerProduc
|
|||||||
return businessUseCase.execute(
|
return businessUseCase.execute(
|
||||||
true,
|
true,
|
||||||
request.getCustomerIbsNumber(),
|
request.getCustomerIbsNumber(),
|
||||||
request.toBusinessRequest(),
|
Map.of(),
|
||||||
request.toBusinessHeaders(),
|
request.toBusinessHeaders(),
|
||||||
LegalCustomerProductDirectoryResponse.class
|
LegalCustomerProductDirectoryResponse.class
|
||||||
);
|
);
|
||||||
@ -92,12 +92,6 @@ public class LegalCustomerProductDirectoryService implements LegalCustomerProduc
|
|||||||
.accounts(List.of(getAccount()))
|
.accounts(List.of(getAccount()))
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
.servicingIssue(
|
|
||||||
ServicingIssue.builder()
|
|
||||||
.procedureCode("")
|
|
||||||
.issueDescription("")
|
|
||||||
.build()
|
|
||||||
)
|
|
||||||
.build(),
|
.build(),
|
||||||
StatusResponse.builder()
|
StatusResponse.builder()
|
||||||
.statusCode("200")
|
.statusCode("200")
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package com.banesco.module.legal_customer_product_directory.domain.dto.response;
|
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 com.banesco.module.servicing_issue.domain.model.ServicingIssue;
|
|
||||||
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,7 +11,8 @@ import lombok.*;
|
|||||||
@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;
|
||||||
private ServicingIssue servicingIssue;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ 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;
|
||||||
|
|
||||||
@ -13,7 +14,10 @@ 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,8 +3,10 @@ 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;
|
||||||
@ -14,6 +16,7 @@ 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;
|
||||||
@ -49,7 +52,19 @@ 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(implementation = ApiResponse.class),
|
schema = @Schema(
|
||||||
|
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 = """
|
||||||
@ -70,7 +85,7 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
"identifierValue": "J000000001"
|
"identifierValue": "J000000001"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
"accounts": [
|
"accounts": [
|
||||||
{
|
{
|
||||||
@ -141,13 +156,13 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
{
|
{
|
||||||
"partyIdentificationType": "TELEPHONE_NUMBER",
|
"partyIdentificationType": "TELEPHONE_NUMBER",
|
||||||
"partyIdentification": {
|
"partyIdentification": {
|
||||||
"identifierValue": "04122710660",
|
"identifierValue": "04122710660"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"partyIdentificationType": "TELEPHONE_OPERATOR",
|
"partyIdentificationType": "TELEPHONE_OPERATOR",
|
||||||
"partyIdentification": {
|
"partyIdentification": {
|
||||||
"identifierValue": "0412",
|
"identifierValue": "0412"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -161,10 +176,6 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"servicingIssue": {
|
|
||||||
"procedureCode": "",
|
|
||||||
"issueDescription": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"statusResponse": {
|
"statusResponse": {
|
||||||
@ -181,7 +192,19 @@ 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(implementation = ApiResponse.class),
|
schema = @Schema(
|
||||||
|
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",
|
||||||
@ -215,7 +238,19 @@ public class LegalCustomerProductDirectoryResource {
|
|||||||
description = "No autorizado",
|
description = "No autorizado",
|
||||||
content = @Content(
|
content = @Content(
|
||||||
mediaType = MediaType.APPLICATION_JSON,
|
mediaType = MediaType.APPLICATION_JSON,
|
||||||
schema = @Schema(implementation = ApiResponse.class),
|
schema = @Schema(
|
||||||
|
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",
|
||||||
@ -237,7 +272,19 @@ 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(implementation = ApiResponse.class),
|
schema = @Schema(
|
||||||
|
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",
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
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.*;
|
||||||
|
|
||||||
@ -12,6 +13,7 @@ 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;
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
package com.banesco.module.servicing_issue.domain.model;
|
|
||||||
|
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
|
||||||
import lombok.*;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@ToString
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@RegisterForReflection
|
|
||||||
public class ServicingIssue {
|
|
||||||
private String procedureCode;
|
|
||||||
private String issueDescription;
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user