use of com.forgerock.openbanking.common.model.openbanking.domain.payment.common.FRReadRefundAccount in project openbanking-aspsp by OpenBankingToolkit.
the class DomesticScheduledPaymentsApiController method responseEntity.
private OBWriteDomesticScheduledResponse4 responseEntity(FRDomesticScheduledPaymentSubmission frPaymentSubmission, FRDomesticScheduledConsent frDomesticScheduledConsent) {
FRReadRefundAccount readRefundAccount = frDomesticScheduledConsent.getDomesticScheduledConsent().getData().getReadRefundAccount();
FRWriteDomesticScheduledDataInitiation initiation = frPaymentSubmission.getDomesticScheduledPayment().getData().getInitiation();
Optional<FRDomesticResponseDataRefund> refund = frDomesticResponseDataRefund(readRefundAccount, initiation);
return new OBWriteDomesticScheduledResponse4().data(new OBWriteDomesticScheduledResponse4Data().domesticScheduledPaymentId(frPaymentSubmission.getId()).initiation(toOBWriteDomesticScheduled2DataInitiation(frDomesticScheduledConsent.getInitiation())).creationDateTime(frDomesticScheduledConsent.getCreated()).statusUpdateDateTime(frDomesticScheduledConsent.getStatusUpdate()).status(toOBWriteDomesticScheduledResponse4DataStatus(frDomesticScheduledConsent.getStatus())).consentId(frDomesticScheduledConsent.getId()).refund(refund.map(FRResponseDataRefundConverter::toOBWriteDomesticResponse4DataRefund).orElse(null))).links(resourceLinkService.toSelfLink(frPaymentSubmission, discovery -> getVersion(discovery).getGetDomesticScheduledPayment())).meta(new Meta());
}
use of com.forgerock.openbanking.common.model.openbanking.domain.payment.common.FRReadRefundAccount in project openbanking-aspsp by OpenBankingToolkit.
the class InternationalPaymentsApiController method responseEntity.
private OBWriteInternationalResponse5 responseEntity(FRInternationalPaymentSubmission frPaymentSubmission, FRInternationalConsent frInternationalConsent) {
FRReadRefundAccount readRefundAccount = frInternationalConsent.getInternationalConsent().getData().getReadRefundAccount();
FRWriteInternationalDataInitiation initiation = frPaymentSubmission.getInternationalPayment().getData().getInitiation();
Optional<FRInternationalResponseDataRefund> refund = frInternationalResponseDataRefund(readRefundAccount, initiation);
return new OBWriteInternationalResponse5().data(new OBWriteInternationalResponse5Data().internationalPaymentId(frPaymentSubmission.getId()).initiation(toOBWriteInternational3DataInitiation(frPaymentSubmission.getInternationalPayment().getData().getInitiation())).creationDateTime(frInternationalConsent.getCreated()).statusUpdateDateTime(frInternationalConsent.getStatusUpdate()).status(toOBWriteInternationalResponse5DataStatus(frInternationalConsent.getStatus())).consentId(frInternationalConsent.getId()).debtor(toOBCashAccountDebtor4(frInternationalConsent.getInitiation().getDebtorAccount())).exchangeRateInformation(toOBWriteInternationalConsentResponse6DataExchangeRateInformation(frInternationalConsent.getCalculatedExchangeRate())).refund(refund.map(FRResponseDataRefundConverter::toOBWriteInternationalResponse5DataRefund).orElse(null))).links(resourceLinkService.toSelfLink(frPaymentSubmission, discovery -> getVersion(discovery).getGetInternationalPayment())).meta(new Meta());
}
use of com.forgerock.openbanking.common.model.openbanking.domain.payment.common.FRReadRefundAccount in project openbanking-aspsp by OpenBankingToolkit.
the class InternationalScheduledPaymentsApiController method responseEntity.
private OBWriteInternationalScheduledResponse6 responseEntity(FRInternationalScheduledPaymentSubmission frPaymentSubmission, FRInternationalScheduledConsent frInternationalScheduledConsent) {
FRReadRefundAccount readRefundAccount = frInternationalScheduledConsent.getInternationalScheduledConsent().getData().getReadRefundAccount();
FRWriteInternationalScheduledDataInitiation initiation = frPaymentSubmission.getInternationalScheduledPayment().getData().getInitiation();
Optional<FRInternationalResponseDataRefund> refund = frInternationalResponseDataRefund(readRefundAccount, initiation);
return new OBWriteInternationalScheduledResponse6().data(new OBWriteInternationalScheduledResponse6Data().internationalScheduledPaymentId(frPaymentSubmission.getId()).initiation(toOBWriteInternationalScheduled3DataInitiation(frPaymentSubmission.getInternationalScheduledPayment().getData().getInitiation())).creationDateTime(frInternationalScheduledConsent.getCreated()).statusUpdateDateTime(frInternationalScheduledConsent.getStatusUpdate()).consentId(frInternationalScheduledConsent.getId()).status(toOBWriteInternationalScheduledResponse6DataStatus(frInternationalScheduledConsent.getStatus())).exchangeRateInformation(toOBWriteInternationalConsentResponse6DataExchangeRateInformation(frInternationalScheduledConsent.getCalculatedExchangeRate())).debtor(toOBCashAccountDebtor4(frInternationalScheduledConsent.getInitiation().getDebtorAccount())).expectedExecutionDateTime(frInternationalScheduledConsent.getInitiation().getRequestedExecutionDateTime()).refund(refund.map(FRResponseDataRefundConverter::toOBWriteInternationalResponse5DataRefund).orElse(null))).links(resourceLinkService.toSelfLink(frPaymentSubmission, discovery -> getVersion(discovery).getGetInternationalScheduledPayment())).meta(new Meta());
}
use of com.forgerock.openbanking.common.model.openbanking.domain.payment.common.FRReadRefundAccount in project openbanking-aspsp by OpenBankingToolkit.
the class InternationalStandingOrdersApiController method responseEntity.
private OBWriteInternationalStandingOrderResponse7 responseEntity(FRInternationalStandingOrderPaymentSubmission frPaymentSubmission, FRInternationalStandingOrderConsent frInternationalStandingOrderConsent) {
FRReadRefundAccount readRefundAccount = frInternationalStandingOrderConsent.getInternationalStandingOrderConsent().getData().getReadRefundAccount();
FRWriteInternationalStandingOrderDataInitiation initiation = frPaymentSubmission.getInternationalStandingOrder().getData().getInitiation();
Optional<FRInternationalResponseDataRefund> refund = frInternationalResponseDataRefund(readRefundAccount, initiation);
return new OBWriteInternationalStandingOrderResponse7().data(new OBWriteInternationalStandingOrderResponse7Data().internationalStandingOrderId(frPaymentSubmission.getId()).initiation(toOBWriteInternationalStandingOrderConsentResponse7DataInitiation(frPaymentSubmission.getInternationalStandingOrder().getData().getInitiation())).creationDateTime(frInternationalStandingOrderConsent.getCreated()).statusUpdateDateTime(frInternationalStandingOrderConsent.getStatusUpdate()).status(toOBWriteInternationalStandingOrderResponse7DataStatus(frInternationalStandingOrderConsent.getStatus())).debtor(toOBCashAccountDebtor4(frInternationalStandingOrderConsent.getInitiation().getDebtorAccount())).consentId(frInternationalStandingOrderConsent.getId()).refund(refund.map(FRResponseDataRefundConverter::toOBWriteInternationalStandingOrderResponse7DataRefund).orElse(null))).links(resourceLinkService.toSelfLink(frPaymentSubmission, discovery -> getVersion(discovery).getGetInternationalStandingOrder())).meta(new Meta());
}
use of com.forgerock.openbanking.common.model.openbanking.domain.payment.common.FRReadRefundAccount in project openbanking-aspsp by OpenBankingToolkit.
the class DomesticPaymentsApiController method responseEntity.
private OBWriteDomesticResponse4 responseEntity(FRDomesticPaymentSubmission frPaymentSubmission, FRDomesticConsent frDomesticConsent) {
FRReadRefundAccount readRefundAccount = frDomesticConsent.getDomesticConsent().getData().getReadRefundAccount();
FRWriteDomesticDataInitiation initiation = frPaymentSubmission.getDomesticPayment().getData().getInitiation();
Optional<FRDomesticResponseDataRefund> refund = frDomesticResponseDataRefund(readRefundAccount, initiation);
return new OBWriteDomesticResponse4().data(new OBWriteDomesticResponse4Data().domesticPaymentId(frPaymentSubmission.getId()).initiation(toOBWriteDomestic2DataInitiation(frDomesticConsent.getDomesticConsent().getData().getInitiation())).creationDateTime(frDomesticConsent.getCreated()).statusUpdateDateTime(frDomesticConsent.getStatusUpdate()).status(toOBWriteDomesticResponse4DataStatus(frDomesticConsent.getStatus())).consentId(frDomesticConsent.getId()).refund(refund.map(FRResponseDataRefundConverter::toOBWriteDomesticResponse4DataRefund).orElse(null))).links(resourceLinkService.toSelfLink(frPaymentSubmission, discovery -> getVersion(discovery).getGetDomesticPayment())).meta(new Meta());
}
Aggregations