diff --git a/readme.md b/readme.md index 7f08026..41688e8 100644 --- a/readme.md +++ b/readme.md @@ -424,10 +424,10 @@ Payment information for an invoice | 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 | +| debtorAccount | String | no | 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 | +| paymentBank | [Bank](#invoicepaymentbank) | no | 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 | 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 dce8849..66fc7a7 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 @@ -1,6 +1,5 @@ package no.digipost.api.datatypes.types.invoice; -import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlRootElement; @@ -38,7 +37,7 @@ public class InvoicePayment implements DataType { @Description("When the payment is done") ZonedDateTime paymentTime; - @XmlElement(required = true, name = "debtor-account") + @XmlElement(name = "debtor-account") @Description("The debtor account for the payment. Exactly 11 digits") @Size(min = 11, max = 11) String debtorAccount; @@ -51,9 +50,8 @@ public class InvoicePayment implements DataType { @Description("Name the third party performing the payment") String paymentChannel; - @XmlElement(required = true, name = "payment-bank") + @XmlElement(name = "payment-bank") @Description("The bank payment is registered with") - @NotNull Bank paymentBank; @XmlElement(name = "payment-scheduled-date")