update signature generation & add BOL response
This commit is contained in:
parent
39227f7cca
commit
c16e2b468c
@ -22,9 +22,8 @@ public class RequestValidatorHelper {
|
|||||||
public void validateRequired(
|
public void validateRequired(
|
||||||
ServiceOrderPaymentSearchRequest request
|
ServiceOrderPaymentSearchRequest request
|
||||||
) {
|
) {
|
||||||
required(request.getId(), "partyReferenceId");
|
required(request.getPartyId(), "partyReferenceId");
|
||||||
required(request.getChannelCode(), "channelCode");
|
required(request.getChannelCode(), "channelCode");
|
||||||
required(request.getSignatureIdentifier(), "signatureIdentifier");
|
|
||||||
required(request.getCustomerReferenceFintechId(), "customerReferenceFintechId");
|
required(request.getCustomerReferenceFintechId(), "customerReferenceFintechId");
|
||||||
required(request.getAppId(), "appId");
|
required(request.getAppId(), "appId");
|
||||||
}
|
}
|
||||||
@ -32,7 +31,7 @@ public class RequestValidatorHelper {
|
|||||||
public void validateFieldValues(
|
public void validateFieldValues(
|
||||||
ServiceOrderPaymentSearchRequest request
|
ServiceOrderPaymentSearchRequest request
|
||||||
) {
|
) {
|
||||||
validate(request.getId(), config.recipientIdNumber(), "partyReferenceId");
|
validate(request.getPartyId(), config.recipientIdNumber(), "partyReferenceId");
|
||||||
validate(request.getChannelCode(), config.channelCode(), "channelCode");
|
validate(request.getChannelCode(), config.channelCode(), "channelCode");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,11 +2,14 @@ package com.banesco.module.instruction.domain.model;
|
|||||||
|
|
||||||
import com.banesco.common.domain.exception.HttpStatusCodeException;
|
import com.banesco.common.domain.exception.HttpStatusCodeException;
|
||||||
import com.banesco.common.domain.model.Identifier;
|
import com.banesco.common.domain.model.Identifier;
|
||||||
|
import com.banesco.module.party.domain.model.Party;
|
||||||
|
import com.banesco.module.party.domain.model.PartyIdentification;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@ -17,14 +20,16 @@ import java.util.Objects;
|
|||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Instruction {
|
public class Instruction {
|
||||||
private InstructionIdentification instructionIdentifier; // Request JSON: "recipientId"
|
private InstructionInvolvement instructionInvolvement; // Request JSON: "recipientId"
|
||||||
private String instructionDescription; // Request JSON: "signature"
|
private List<InstructionDateTime> instructionDate; // Request JSON: "dateCreate"
|
||||||
|
private InstructionIdentification instructionIdentifier; // Request JSON: "id"
|
||||||
private InstructionPurposeType instructionPurposeType; // Request JSON: "channelOrigin" (BOLE)
|
private InstructionPurposeType instructionPurposeType; // Request JSON: "channelOrigin" (BOLE)
|
||||||
|
|
||||||
public static Instruction fromResource(
|
public static Instruction fromResource(
|
||||||
String partyReferenceId,
|
String partyReferenceId,
|
||||||
String channelCode,
|
String initiatedDate,
|
||||||
String signatureIdentifier
|
String instructionRequestId,
|
||||||
|
String channelCode
|
||||||
) {
|
) {
|
||||||
boolean isChannelCodeValid = (Arrays.stream(
|
boolean isChannelCodeValid = (Arrays.stream(
|
||||||
InstructionPurposeType.values()
|
InstructionPurposeType.values()
|
||||||
@ -35,18 +40,39 @@ public class Instruction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Instruction.builder()
|
return Instruction.builder()
|
||||||
|
.instructionInvolvement(
|
||||||
|
InstructionInvolvement.builder()
|
||||||
|
.partyReference(
|
||||||
|
Party.builder()
|
||||||
|
.partyIdentification(List.of(
|
||||||
|
PartyIdentification.builder()
|
||||||
|
.partyIdentification(
|
||||||
|
Identifier.builder()
|
||||||
|
.identifierValue(Objects.toString(partyReferenceId, ""))
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
))
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
.instructionIdentifier(
|
.instructionIdentifier(
|
||||||
InstructionIdentification.builder()
|
InstructionIdentification.builder()
|
||||||
.identification(
|
.identification(
|
||||||
Identifier.builder()
|
Identifier.builder()
|
||||||
.identifierValue(partyReferenceId)
|
.identifierValue(Objects.toString(instructionRequestId, ""))
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
.identificationType(InstructionIdentificationType.INSTRUCTION_NUMBER)
|
.identificationType(InstructionIdentificationType.INSTRUCTION_NUMBER)
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
|
.instructionDate(List.of(
|
||||||
|
InstructionDateTime.builder()
|
||||||
|
.date(Objects.toString(initiatedDate, ""))
|
||||||
|
.build()
|
||||||
|
))
|
||||||
.instructionPurposeType(InstructionPurposeType.valueOf(channelCode))
|
.instructionPurposeType(InstructionPurposeType.valueOf(channelCode))
|
||||||
.instructionDescription(signatureIdentifier)
|
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.banesco.module.instruction.domain.model;
|
||||||
|
|
||||||
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@ToString
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RegisterForReflection
|
||||||
|
public class InstructionDateTime {
|
||||||
|
private String date;
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.banesco.module.instruction.domain.model;
|
||||||
|
|
||||||
|
import com.banesco.module.party.domain.model.Party;
|
||||||
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@ToString
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RegisterForReflection
|
||||||
|
public class InstructionInvolvement {
|
||||||
|
private Party partyReference;
|
||||||
|
}
|
||||||
@ -37,7 +37,7 @@ public class ServiceOrderPaymentSearchService implements ServiceOrderPaymentSear
|
|||||||
public ApiResponse<ServiceOrderPaymentSearchResponse> execute(
|
public ApiResponse<ServiceOrderPaymentSearchResponse> execute(
|
||||||
ServiceOrderPaymentSearchRequest request
|
ServiceOrderPaymentSearchRequest request
|
||||||
) {
|
) {
|
||||||
log.info("Iniciando ejecucion para el transaccion: {}", request.getId());
|
log.info("Iniciando ejecucion para el transaccion: {}", request.getPartyId());
|
||||||
|
|
||||||
validate(request);
|
validate(request);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.banesco.module.service_order_payment_search.domain.dto.request;
|
package com.banesco.module.service_order_payment_search.domain.dto.request;
|
||||||
|
|
||||||
import com.banesco.module.instruction.domain.model.Instruction;
|
import com.banesco.module.instruction.domain.model.Instruction;
|
||||||
|
import com.banesco.module.instruction.domain.model.InstructionPurposeType;
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -23,22 +24,51 @@ public class ServiceOrderPaymentSearchRequest {
|
|||||||
@NonNull
|
@NonNull
|
||||||
private Instruction procedureRequest;
|
private Instruction procedureRequest;
|
||||||
|
|
||||||
public String getId() {
|
public String getPartyId() {
|
||||||
return getProcedureRequest().getInstructionIdentifier().getIdentification().getIdentifierValue();
|
return getProcedureRequest()
|
||||||
|
.getInstructionInvolvement()
|
||||||
|
.getPartyReference()
|
||||||
|
.getPartyIdentification()
|
||||||
|
.get(0)
|
||||||
|
.getPartyIdentification()
|
||||||
|
.getIdentifierValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInitiatedDate() {
|
||||||
|
return getProcedureRequest()
|
||||||
|
.getInstructionDate()
|
||||||
|
.get(0)
|
||||||
|
.getDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPaymentRequestId() {
|
||||||
|
return getProcedureRequest()
|
||||||
|
.getInstructionIdentifier()
|
||||||
|
.getIdentification()
|
||||||
|
.getIdentifierValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getChannelCode() {
|
public String getChannelCode() {
|
||||||
return getProcedureRequest().getInstructionPurposeType().name();
|
return getProcedureRequest().getInstructionPurposeType().name();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSignatureIdentifier() {
|
public boolean isBole() {
|
||||||
return getProcedureRequest().getInstructionDescription();
|
return getProcedureRequest().getInstructionPurposeType() == InstructionPurposeType.BOLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> toParams() {
|
||||||
|
return Map.ofEntries(
|
||||||
|
entry("partyReferenceId", Objects.toString(getPartyId(), "")),
|
||||||
|
entry("channelCode", Objects.toString(getChannelCode(), ""))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> toQueryString() {
|
public Map<String, String> toQueryString() {
|
||||||
return Map.ofEntries(
|
return Map.ofEntries(
|
||||||
entry("appId", Objects.toString(getAppId(), "")),
|
entry("appId", Objects.toString(getAppId(), "")),
|
||||||
entry("customerReferenceFintechId", Objects.toString(getCustomerReferenceFintechId(), ""))
|
entry("customerReferenceFintechId", Objects.toString(getCustomerReferenceFintechId(), "")),
|
||||||
|
entry("initiatedDate", Objects.toString(getInitiatedDate(), "")),
|
||||||
|
entry("paymentRequestId", Objects.toString(getPaymentRequestId(), ""))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,6 +2,7 @@ package com.banesco.module.service_order_payment_search.domain.model;
|
|||||||
|
|
||||||
import com.banesco.module.document.domain.model.Document;
|
import com.banesco.module.document.domain.model.Document;
|
||||||
import com.banesco.module.transaction.domain.model.Transaction;
|
import com.banesco.module.transaction.domain.model.Transaction;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -11,7 +12,10 @@ import lombok.*;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class ServicingOrderProcedure {
|
public class ServicingOrderProcedure {
|
||||||
private Document document; // fileName
|
private Document document; // BOLE: fileName
|
||||||
private Transaction transaction; // status, accepted, rejected, expired
|
// BOLE: nroRequest, status, accepted, rejected, expired, dispatchDate, quantity
|
||||||
|
// BOL: id, requestType, emitterReceptor, status, amount, currency, concept, dateCreate
|
||||||
|
private Transaction transaction;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,8 +13,6 @@ 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.util.Map;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApplicationScoped
|
@ApplicationScoped
|
||||||
public class BusServiceOrderPaymentSearchClient implements BusinessUseCase {
|
public class BusServiceOrderPaymentSearchClient implements BusinessUseCase {
|
||||||
@ -36,19 +34,13 @@ public class BusServiceOrderPaymentSearchClient implements BusinessUseCase {
|
|||||||
ServiceOrderPaymentSearchRequest params,
|
ServiceOrderPaymentSearchRequest params,
|
||||||
Class<T> responseType
|
Class<T> responseType
|
||||||
) {
|
) {
|
||||||
String partyReferenceId = params.getId();
|
String partyReferenceId = params.getPartyId();
|
||||||
String channelCode = params.getChannelCode();
|
|
||||||
String signatureIdentifier = params.getSignatureIdentifier();
|
|
||||||
HttpRequest request = HttpRequest.forApiResponse(
|
HttpRequest request = HttpRequest.forApiResponse(
|
||||||
businessConfig.getUrl(),
|
businessConfig.getUrl(),
|
||||||
HttpRequest.HttpMethod.GET,
|
HttpRequest.HttpMethod.GET,
|
||||||
responseType
|
responseType
|
||||||
)
|
)
|
||||||
.withPathParams(Map.of(
|
.withPathParams(params.toParams())
|
||||||
"partyReferenceId", partyReferenceId,
|
|
||||||
"channelCode", channelCode,
|
|
||||||
"signatureIdentifier", signatureIdentifier
|
|
||||||
))
|
|
||||||
.withQueryParams(params.toQueryString())
|
.withQueryParams(params.toQueryString())
|
||||||
.withTimeout(
|
.withTimeout(
|
||||||
businessConfig.getTimeout().getConnect(),
|
businessConfig.getTimeout().getConnect(),
|
||||||
|
|||||||
@ -43,7 +43,7 @@ public class ServiceOrderPaymentSearchResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/retrieve/{partyReferenceId}/{channelCode}/{signatureIdentifier}")
|
@Path("/retrieve/{partyReferenceId}/{channelCode}")
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "Recuperar informacion de la transaccion",
|
summary = "Recuperar informacion de la transaccion",
|
||||||
description = "Consulta de una trasanccion de pago por id de archivo"
|
description = "Consulta de una trasanccion de pago por id de archivo"
|
||||||
@ -67,73 +67,234 @@ public class ServiceOrderPaymentSearchResource {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
examples = @ExampleObject(
|
examples = {
|
||||||
name = "Ejemplo exitoso",
|
@ExampleObject(
|
||||||
value = """
|
name = "Ejemplo exitoso (BOLE)",
|
||||||
{
|
value = """
|
||||||
"data": {
|
{
|
||||||
"servicingOrderProcedure": [
|
"data": {
|
||||||
{
|
"servicingOrderProcedure": [
|
||||||
"document": {
|
{
|
||||||
"documentName": "TESTING.CSV"
|
"document": {
|
||||||
},
|
"documentName": "TESTING.CSV"
|
||||||
"transaction": {
|
|
||||||
"transactionIdentification": {
|
|
||||||
"identifierValue": "2"
|
|
||||||
},
|
},
|
||||||
"transactionStatus": {
|
"transaction": {
|
||||||
"statusType": "PENDING",
|
"transactionIdentification": {
|
||||||
"statusName": "PENDIENTE",
|
"identifierValue": "2"
|
||||||
"statusAccepted": 0,
|
},
|
||||||
"statusRejected": 0,
|
"transactionStatus": {
|
||||||
"statusExpired": 2
|
"statusType": "PENDING",
|
||||||
},
|
"statusName": "PENDIENTE",
|
||||||
"transactionDate": [
|
"statusAccepted": 0,
|
||||||
{
|
"statusRejected": 0,
|
||||||
"dateType": "EXECUTED_DATE",
|
"statusExpired": 2
|
||||||
"date": "2026-01-05 14:35:45.0372395"
|
},
|
||||||
|
"transactionDate": [
|
||||||
|
{
|
||||||
|
"dateType": "EXECUTED_DATE",
|
||||||
|
"date": "2026-01-05 14:35:45.0372395"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transactionDetails": {
|
||||||
|
"transactionQuantity": 1000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"document": {
|
||||||
|
"documentName": "TESTING.CSV"
|
||||||
|
},
|
||||||
|
"transaction": {
|
||||||
|
"transactionIdentification": {
|
||||||
|
"identifierValue": "3"
|
||||||
|
},
|
||||||
|
"transactionStatus": {
|
||||||
|
"statusType": "IN_PROGRESS",
|
||||||
|
"statusName": "EN CURSO",
|
||||||
|
"statusAccepted": 0,
|
||||||
|
"statusRejected": 0,
|
||||||
|
"statusExpired": 5
|
||||||
|
},
|
||||||
|
"transactionDate": [
|
||||||
|
{
|
||||||
|
"dateType": "EXECUTED_DATE",
|
||||||
|
"date": "2026-01-05 14:39:52.3840159"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transactionDetails": {
|
||||||
|
"transactionQuantity": 1000
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"transactionDetails": {
|
|
||||||
"transactionQuantity": 1000
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
"document": {
|
"statusResponse": {
|
||||||
"documentName": "TESTING.CSV"
|
"statusCode": "200",
|
||||||
|
"message": "Operacion exitosa"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
@ExampleObject(
|
||||||
|
name = "Ejemplo exitoso (BOL)",
|
||||||
|
value = """
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"servicingOrderProcedure": [
|
||||||
|
{
|
||||||
|
"transaction": {
|
||||||
|
"transactionIdentification": {
|
||||||
|
"identifierValue": "1"
|
||||||
|
},
|
||||||
|
"transactionStatus": {
|
||||||
|
"statusType": "APPROVED",
|
||||||
|
"statusName": "Aprobada"
|
||||||
|
},
|
||||||
|
"transactionDate": [
|
||||||
|
{
|
||||||
|
"dateType": "INITIATED_DATE",
|
||||||
|
"date": "2024-06-15T10:30:00Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transactionInvolvement": [
|
||||||
|
{
|
||||||
|
"partyReference": {
|
||||||
|
"partyIdentification": [
|
||||||
|
{
|
||||||
|
"partyIdentification": {
|
||||||
|
"identifierValue": "V20132859"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"financialTransaction": {
|
||||||
|
"amount": 150.75,
|
||||||
|
"currencyCode": "VES"
|
||||||
|
},
|
||||||
|
"name": "Enviada",
|
||||||
|
"description": "cobro a pepito"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"transaction": {
|
{
|
||||||
"transactionIdentification": {
|
"transaction": {
|
||||||
"identifierValue": "3"
|
"transactionIdentification": {
|
||||||
},
|
"identifierValue": "2"
|
||||||
"transactionStatus": {
|
},
|
||||||
"statusType": "IN_PROGRESS",
|
"transactionStatus": {
|
||||||
"statusName": "EN CURSO",
|
"statusType": "PENDING",
|
||||||
"statusAccepted": 0,
|
"statusName": "Pendiente"
|
||||||
"statusRejected": 0,
|
},
|
||||||
"statusExpired": 5
|
"transactionDate": [
|
||||||
},
|
{
|
||||||
"transactionDate": [
|
"dateType": "INITIATED_DATE",
|
||||||
{
|
"date": "2024-06-16T14:49:00Z"
|
||||||
"dateType": "EXECUTED_DATE",
|
}
|
||||||
"date": "2026-01-05 14:39:52.3840159"
|
],
|
||||||
}
|
"transactionInvolvement": [
|
||||||
],
|
{
|
||||||
"transactionDetails": {
|
"partyReference": {
|
||||||
"transactionQuantity": 1000
|
"partyIdentification": [
|
||||||
|
{
|
||||||
|
"partyIdentification": {
|
||||||
|
"identifierValue": "V20132859"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"financialTransaction": {
|
||||||
|
"amount": 350.0,
|
||||||
|
"currencyCode": "VES"
|
||||||
|
},
|
||||||
|
"name": "Recibida",
|
||||||
|
"description": "pago a proveedor"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"transaction": {
|
||||||
|
"transactionIdentification": {
|
||||||
|
"identifierValue": "3"
|
||||||
|
},
|
||||||
|
"transactionStatus": {
|
||||||
|
"statusType": "REJECTED",
|
||||||
|
"statusName": "Rechazado"
|
||||||
|
},
|
||||||
|
"transactionDate": [
|
||||||
|
{
|
||||||
|
"dateType": "INITIATED_DATE",
|
||||||
|
"date": "2024-06-17T09:15:00Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transactionInvolvement": [
|
||||||
|
{
|
||||||
|
"partyReference": {
|
||||||
|
"partyIdentification": [
|
||||||
|
{
|
||||||
|
"partyIdentification": {
|
||||||
|
"identifierValue": "V20132859"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"financialTransaction": {
|
||||||
|
"amount": 200.0,
|
||||||
|
"currencyCode": "VES"
|
||||||
|
},
|
||||||
|
"name": "Enviada",
|
||||||
|
"description": "cobro a cliente"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"transaction": {
|
||||||
|
"transactionIdentification": {
|
||||||
|
"identifierValue": "4"
|
||||||
|
},
|
||||||
|
"transactionStatus": {
|
||||||
|
"statusType": "APPROVED",
|
||||||
|
"statusName": "Aprobada"
|
||||||
|
},
|
||||||
|
"transactionDate": [
|
||||||
|
{
|
||||||
|
"dateType": "INITIATED_DATE",
|
||||||
|
"date": "2024-06-18T11:20:00Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transactionInvolvement": [
|
||||||
|
{
|
||||||
|
"partyReference": {
|
||||||
|
"partyIdentification": [
|
||||||
|
{
|
||||||
|
"partyIdentification": {
|
||||||
|
"identifierValue": "V20132859"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"financialTransaction": {
|
||||||
|
"amount": 750.0,
|
||||||
|
"currencyCode": "VES"
|
||||||
|
},
|
||||||
|
"name": "Recibida",
|
||||||
|
"description": "pago a proveedor"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
]
|
},
|
||||||
},
|
"statusResponse": {
|
||||||
"statusResponse": {
|
"statusCode": "200",
|
||||||
"statusCode": "200",
|
"message": "Operacion exitosa"
|
||||||
"message": "Operacion exitosa"
|
}
|
||||||
}
|
}
|
||||||
}
|
"""
|
||||||
"""
|
)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@APIResponse(
|
@APIResponse(
|
||||||
@ -280,9 +441,13 @@ public class ServiceOrderPaymentSearchResource {
|
|||||||
@Parameter(description = "Codigo del canal (BOL, BOLE)", required = true, example = "BOLE")
|
@Parameter(description = "Codigo del canal (BOL, BOLE)", required = true, example = "BOLE")
|
||||||
String channelCode,
|
String channelCode,
|
||||||
|
|
||||||
@PathParam("signatureIdentifier")
|
@QueryParam("initiatedDate")
|
||||||
@Parameter(description = "Firma del archivo", required = true, example = "f8c226f844339c55bf898162c5d7de5d8116cee6028e1b357414dcc686b3ea85")
|
@Parameter(description = "Fecha de creación", example = "2024-06-15T10:30:00Z")
|
||||||
String signatureIdentifier
|
String initiatedDate,
|
||||||
|
|
||||||
|
@QueryParam("instructionRequestId")
|
||||||
|
@Parameter(description = "ID de la peticion de pago", example = "1")
|
||||||
|
String instructionRequestId
|
||||||
) {
|
) {
|
||||||
log.info("Iniciando consulta para instruccion de archivo id: {}", partyReferenceId);
|
log.info("Iniciando consulta para instruccion de archivo id: {}", partyReferenceId);
|
||||||
|
|
||||||
@ -292,7 +457,10 @@ public class ServiceOrderPaymentSearchResource {
|
|||||||
.customerReferenceFintechId(Objects.toString(customerReferenceFintechId, ""))
|
.customerReferenceFintechId(Objects.toString(customerReferenceFintechId, ""))
|
||||||
.appId(Objects.toString(appId, ""))
|
.appId(Objects.toString(appId, ""))
|
||||||
.procedureRequest(Instruction.fromResource(
|
.procedureRequest(Instruction.fromResource(
|
||||||
partyReferenceId, channelCode, signatureIdentifier
|
partyReferenceId,
|
||||||
|
initiatedDate,
|
||||||
|
instructionRequestId,
|
||||||
|
channelCode
|
||||||
))
|
))
|
||||||
.build()
|
.build()
|
||||||
)).build();
|
)).build();
|
||||||
|
|||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.banesco.module.transaction.domain.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@ToString
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RegisterForReflection
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
public class FinancialTransaction {
|
||||||
|
private BigDecimal amount; // BOL: amount
|
||||||
|
private String currencyCode; // BOL: currency
|
||||||
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
package com.banesco.module.transaction.domain.model;
|
package com.banesco.module.transaction.domain.model;
|
||||||
|
|
||||||
import com.banesco.common.domain.model.Identifier;
|
import com.banesco.common.domain.model.Identifier;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -12,9 +13,14 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Transaction {
|
public class Transaction {
|
||||||
private Identifier transactionIdentification; // nroRequest
|
private Identifier transactionIdentification; // BOLE: nroRequest | BOL: id
|
||||||
private TransactionStatus transactionStatus; // status, accepted, rejected, expired
|
private TransactionStatus transactionStatus; // BOLE: status, accepted, rejected, expired | BOL: status
|
||||||
private List<TransactionDateTime> transactionDate; // dispatchDate
|
private List<TransactionDateTime> transactionDate; // BOLE: dispatchDate | BOL: dateCreate
|
||||||
private TransactionDetails transactionDetails; // quantity
|
private TransactionDetails transactionDetails; // BOLE: quantity
|
||||||
|
private List<TransactionInvolvement> transactionInvolvement; // BOL: emitterReceptor
|
||||||
|
private FinancialTransaction financialTransaction; // BOL: amount, currency
|
||||||
|
private String name; // BOL: requestType
|
||||||
|
private String description; // BOL: concept
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,5 +11,5 @@ import lombok.*;
|
|||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class TransactionDateTime {
|
public class TransactionDateTime {
|
||||||
private TransactionDateTimeType dateType;
|
private TransactionDateTimeType dateType;
|
||||||
private String date;
|
private String date; // BOLE: dispatchDate | BOL: dateCreate
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.banesco.module.transaction.domain.model;
|
package com.banesco.module.transaction.domain.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ import java.math.BigDecimal;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class TransactionDetails {
|
public class TransactionDetails {
|
||||||
private BigDecimal transactionQuantity; // quantity
|
private BigDecimal transactionQuantity; // BOLE: quantity
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.banesco.module.transaction.domain.model;
|
||||||
|
|
||||||
|
import com.banesco.module.party.domain.model.Party;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@ToString
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RegisterForReflection
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
public class TransactionInvolvement {
|
||||||
|
private Party partyReference; // BOL: emitterReceptor
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
package com.banesco.module.transaction.domain.model;
|
package com.banesco.module.transaction.domain.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -9,10 +10,11 @@ import lombok.*;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class TransactionStatus {
|
public class TransactionStatus {
|
||||||
private TransactionStatusType statusType; // status
|
private TransactionStatusType statusType; // BOLE: status | BOL: status
|
||||||
private String statusName; // status
|
private String statusName; // BOLE: status | BOL: status
|
||||||
private Long statusAccepted; // accepted
|
private Long statusAccepted; // BOLE: accepted
|
||||||
private Long statusRejected; // rejected
|
private Long statusRejected; // BOLE: rejected
|
||||||
private Long statusExpired; // expired
|
private Long statusExpired; // BOLE: expired
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ public enum TransactionStatusType {
|
|||||||
EXECUTED,
|
EXECUTED,
|
||||||
CANCELLED,
|
CANCELLED,
|
||||||
CONFIRMED,
|
CONFIRMED,
|
||||||
|
APPROVED,
|
||||||
SUSPENDED,
|
SUSPENDED,
|
||||||
PENDING,
|
PENDING,
|
||||||
COMPLETED,
|
COMPLETED,
|
||||||
@ -15,4 +16,5 @@ public enum TransactionStatusType {
|
|||||||
REJECTED,
|
REJECTED,
|
||||||
EXPIRED,
|
EXPIRED,
|
||||||
SENT,
|
SENT,
|
||||||
|
RECEIVED,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,4 +19,4 @@ api:
|
|||||||
key: 'rec-service-order-payment-search'
|
key: 'rec-service-order-payment-search'
|
||||||
content: '[{"backendCode":"200","httpCode":200,"statusCode":"200","description":"Operacion exitosa"},{"backendCode":"R404","httpCode":404,"statusCode":"404","description":"Datos de validacion no encontrado."},{"backendCode":"503","httpCode":503,"statusCode":"503","description":"Uso interno"},{"backendCode":"422","httpCode":422,"statusCode":"422","description":"Uso interno"},{"backendCode":"500","httpCode":500,"statusCode":"500","description":"Uso interno"},{"backendCode":"100","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"OSB-382505","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"OSB-380002","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"ERROR","httpCode":400,"statusCode":"400","description":"Uso interno"},{"backendCode":"400","httpCode":400,"statusCode":"400","description":"Uso interno"},{"backendCode":"401","httpCode":401,"statusCode":"401","description":"Uso interno"},{"backendCode":"403","httpCode":403,"statusCode":"403","description":"Uso interno"},{"backendCode":"404","httpCode":404,"statusCode":"404","description":"Uso interno"},{"backendCode":"default","httpCode":409,"statusCode":"409","description":"Conflicto"},{"backendCode":"424","httpCode":424,"statusCode":"424","description":"Error de dependencia"},{"backendCode":"VDE01","httpCode":400,"statusCode":"VDE01","description":"VDE01 - Error en dato de entrada obligatorio: %s"},{"backendCode":"VDE02","httpCode":400,"statusCode":"VDE02","description":"VDE02 - Error en valor permitido para campo: %s"},{"backendCode":"VRN04","httpCode":"503","statusCode":"VRN04","description":"Servicio en horario de mantenimiento","status":"error"},{"backendCode":"204","httpCode":"200","statusCode":"200","description":"Cliente sin productos","status":"ok"}]'
|
content: '[{"backendCode":"200","httpCode":200,"statusCode":"200","description":"Operacion exitosa"},{"backendCode":"R404","httpCode":404,"statusCode":"404","description":"Datos de validacion no encontrado."},{"backendCode":"503","httpCode":503,"statusCode":"503","description":"Uso interno"},{"backendCode":"422","httpCode":422,"statusCode":"422","description":"Uso interno"},{"backendCode":"500","httpCode":500,"statusCode":"500","description":"Uso interno"},{"backendCode":"100","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"OSB-382505","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"OSB-380002","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"ERROR","httpCode":400,"statusCode":"400","description":"Uso interno"},{"backendCode":"400","httpCode":400,"statusCode":"400","description":"Uso interno"},{"backendCode":"401","httpCode":401,"statusCode":"401","description":"Uso interno"},{"backendCode":"403","httpCode":403,"statusCode":"403","description":"Uso interno"},{"backendCode":"404","httpCode":404,"statusCode":"404","description":"Uso interno"},{"backendCode":"default","httpCode":409,"statusCode":"409","description":"Conflicto"},{"backendCode":"424","httpCode":424,"statusCode":"424","description":"Error de dependencia"},{"backendCode":"VDE01","httpCode":400,"statusCode":"VDE01","description":"VDE01 - Error en dato de entrada obligatorio: %s"},{"backendCode":"VDE02","httpCode":400,"statusCode":"VDE02","description":"VDE02 - Error en valor permitido para campo: %s"},{"backendCode":"VRN04","httpCode":"503","statusCode":"VRN04","description":"Servicio en horario de mantenimiento","status":"error"},{"backendCode":"204","httpCode":"200","statusCode":"200","description":"Cliente sin productos","status":"ok"}]'
|
||||||
rest-client:
|
rest-client:
|
||||||
bus-service-order-payment-search: '{"url":"http://localhost:8082/service-order-payment-search/retrieve/{partyReferenceId}/{channelCode}/{signatureIdentifier}","timeout":{"connect":15000,"response":15000},"config":{}}'
|
bus-service-order-payment-search: '{"url":"http://localhost:8082/service-order-payment-search/retrieve/{partyReferenceId}/{channelCode}","timeout":{"connect":15000,"response":15000},"config":{}}'
|
||||||
Loading…
x
Reference in New Issue
Block a user