From 95fad2fea7adeba1efaec5e3b9bcdaf35c03add7 Mon Sep 17 00:00:00 2001 From: NghiNg Date: Wed, 3 Jan 2024 12:00:27 +0100 Subject: [PATCH] Update new field paymentScheduledDate type to LocalDate --- readme.md | 22 +++++++++---------- .../types/invoice/InvoicePayment.java | 7 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/readme.md b/readme.md index 54bb36b..7f08026 100644 --- a/readme.md +++ b/readme.md @@ -419,17 +419,17 @@ Payment information for an invoice ### Fields -| Name |Type| Required | Description | -|-----------------------|----|----------|-----------------------------------------------------------------------------| -| paymentId |String| yes | Unique id to reference the payment with third party | -| paymentStatus |String| yes | A status a given payment is in. ISO20022 payment statuses can be used | -| paymentTime |ZonedDateTime| yes | When the payment is done | -| debtorAccount |String| yes | The debtor account for the payment. Exactly 11 digits | -| debtorAccountName |String| no | Optional name of the account | -| paymentChannel |String| yes | Name the third party performing the payment | -| paymentBank |[Bank](#invoicepaymentbank)| yes | The bank payment is registered with | -| paymentScheduledDate |ZonedDateTime| no | When the payment is scheduled to be paid | -| remittanceInformation |String| no | Optional reference number user inputted when invoice was missing KID number | +| Name | Type | Required | Description | +|-----------------------|-----------------------------|----------|-----------------------------------------------------------------------------| +| paymentId | String | yes | Unique id to reference the payment with third party | +| paymentStatus | String | yes | A status a given payment is in. ISO20022 payment statuses can be used | +| paymentTime | ZonedDateTime | yes | When the payment is done | +| debtorAccount | String | yes | The debtor account for the payment. Exactly 11 digits | +| debtorAccountName | String | no | Optional name of the account | +| paymentChannel | String | yes | Name the third party performing the payment | +| paymentBank | [Bank](#invoicepaymentbank) | yes | The bank payment is registered with | +| paymentScheduledDate | LocalDate | no | When the payment is scheduled to be paid | +| remittanceInformation | String | no | Optional reference number user inputted when invoice was missing KID number | ### InvoicePayment.Bank diff --git a/src/main/java/no/digipost/api/datatypes/types/invoice/InvoicePayment.java b/src/main/java/no/digipost/api/datatypes/types/invoice/InvoicePayment.java index 71f0bd1..dce8849 100644 --- a/src/main/java/no/digipost/api/datatypes/types/invoice/InvoicePayment.java +++ b/src/main/java/no/digipost/api/datatypes/types/invoice/InvoicePayment.java @@ -13,6 +13,7 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; +import java.time.LocalDate; import java.time.ZoneId; import java.time.ZonedDateTime; @@ -55,9 +56,9 @@ public class InvoicePayment implements DataType { @NotNull Bank paymentBank; - @XmlElement(required = true, name = "payment-scheduled-date") + @XmlElement(name = "payment-scheduled-date") @Description("The date the payment is scheduled for") - ZonedDateTime paymentScheduledDate; + LocalDate paymentScheduledDate; @XmlElement(name = "remittance-information") @Description("The reference-number user has entered when paying the invoice for missing KID") @@ -71,7 +72,7 @@ public class InvoicePayment implements DataType { , null , "My pay app" , Bank.EXAMPLE - , ZonedDateTime.of(2020, 10, 1, 0, 0, 0, 0, ZoneId.of("+01:00")) + , LocalDate.of(2020, 10, 1) , "123123123" ); }