Class BatchPayment


  • public class BatchPayment
    extends Object
    BatchPayment
    • Constructor Detail

      • BatchPayment

        public BatchPayment()
    • Method Detail

      • account

        public BatchPayment account​(Account account)
        account
        Parameters:
        account - Account
        Returns:
        BatchPayment
      • getAccount

        public Account getAccount()
        Get account
        Returns:
        account
      • setAccount

        public void setAccount​(Account account)
        account
        Parameters:
        account - Account
      • reference

        public BatchPayment reference​(String reference)
        (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
        Parameters:
        reference - String
        Returns:
        BatchPayment
      • getReference

        public String getReference()
        (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
        Returns:
        reference
      • setReference

        public void setReference​(String reference)
        (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
        Parameters:
        reference - String
      • particulars

        public BatchPayment particulars​(String particulars)
        (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
        Parameters:
        particulars - String
        Returns:
        BatchPayment
      • getParticulars

        public String getParticulars()
        (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
        Returns:
        particulars
      • setParticulars

        public void setParticulars​(String particulars)
        (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
        Parameters:
        particulars - String
      • code

        public BatchPayment code​(String code)
        (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
        Parameters:
        code - String
        Returns:
        BatchPayment
      • getCode

        public String getCode()
        (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
        Returns:
        code
      • setCode

        public void setCode​(String code)
        (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
        Parameters:
        code - String
      • details

        public BatchPayment details​(String details)
        (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
        Parameters:
        details - String
        Returns:
        BatchPayment
      • getDetails

        public String getDetails()
        (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
        Returns:
        details
      • setDetails

        public void setDetails​(String details)
        (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
        Parameters:
        details - String
      • narrative

        public BatchPayment narrative​(String narrative)
        (UK Only) Only shows on the statement line in Xero. Max length =18
        Parameters:
        narrative - String
        Returns:
        BatchPayment
      • getNarrative

        public String getNarrative()
        (UK Only) Only shows on the statement line in Xero. Max length =18
        Returns:
        narrative
      • setNarrative

        public void setNarrative​(String narrative)
        (UK Only) Only shows on the statement line in Xero. Max length =18
        Parameters:
        narrative - String
      • getBatchPaymentID

        public UUID getBatchPaymentID()
        The Xero generated unique identifier for the bank transaction (read-only)
        Returns:
        batchPaymentID
      • dateString

        public BatchPayment dateString​(String dateString)
        Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
        Parameters:
        dateString - String
        Returns:
        BatchPayment
      • getDateString

        public String getDateString()
        Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
        Returns:
        dateString
      • setDateString

        public void setDateString​(String dateString)
        Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
        Parameters:
        dateString - String
      • date

        public BatchPayment date​(String date)
        Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
        Parameters:
        date - String
        Returns:
        BatchPayment
      • getDate

        public String getDate()
        Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
        Returns:
        date
      • getDateAsDate

        public org.threeten.bp.LocalDate getDateAsDate()
        Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
        Returns:
        LocalDate
      • setDate

        public void setDate​(String date)
        Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
        Parameters:
        date - String
      • setDate

        public void setDate​(org.threeten.bp.LocalDate date)
        Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
        Parameters:
        date - LocalDateTime
      • amount

        public BatchPayment amount​(Double amount)
        The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00
        Parameters:
        amount - Double
        Returns:
        BatchPayment
      • getAmount

        public Double getAmount()
        The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00
        Returns:
        amount
      • setAmount

        public void setAmount​(Double amount)
        The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00
        Parameters:
        amount - Double
      • payments

        public BatchPayment payments​(List<Payment> payments)
        An array of payments
        Parameters:
        payments - List<Payment>
        Returns:
        BatchPayment
      • addPaymentsItem

        public BatchPayment addPaymentsItem​(Payment paymentsItem)
        An array of payments
        Parameters:
        paymentsItem - Payment
        Returns:
        BatchPayment
      • getPayments

        public List<Payment> getPayments()
        An array of payments
        Returns:
        payments
      • setPayments

        public void setPayments​(List<Payment> payments)
        An array of payments
        Parameters:
        payments - List<Payment>
      • getType

        public BatchPayment.TypeEnum getType()
        PAYBATCH for bill payments or RECBATCH for sales invoice payments (read-only)
        Returns:
        type
      • getStatus

        public BatchPayment.StatusEnum getStatus()
        AUTHORISED or DELETED (read-only). New batch payments will have a status of AUTHORISED. It is not possible to delete batch payments via the API.
        Returns:
        status
      • getTotalAmount

        public String getTotalAmount()
        The total of the payments that make up the batch (read-only)
        Returns:
        totalAmount
      • getUpdatedDateUTC

        public String getUpdatedDateUTC()
        UTC timestamp of last update to the payment
        Returns:
        updatedDateUTC
      • getUpdatedDateUTCAsDate

        public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate()
        UTC timestamp of last update to the payment
        Returns:
        OffsetDateTime
      • getIsReconciled

        public String getIsReconciled()
        Booelan that tells you if the batch payment has been reconciled (read-only)
        Returns:
        isReconciled
      • validationErrors

        public BatchPayment validationErrors​(List<ValidationError> validationErrors)
        Displays array of validation error messages from the API
        Parameters:
        validationErrors - List<ValidationError>
        Returns:
        BatchPayment
      • addValidationErrorsItem

        public BatchPayment addValidationErrorsItem​(ValidationError validationErrorsItem)
        Displays array of validation error messages from the API
        Parameters:
        validationErrorsItem - ValidationError
        Returns:
        BatchPayment
      • getValidationErrors

        public List<ValidationError> getValidationErrors()
        Displays array of validation error messages from the API
        Returns:
        validationErrors
      • setValidationErrors

        public void setValidationErrors​(List<ValidationError> validationErrors)
        Displays array of validation error messages from the API
        Parameters:
        validationErrors - List<ValidationError>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object