Package com.xero.models.accounting
Class Payment
- java.lang.Object
-
- com.xero.models.accounting.Payment
-
public class Payment extends Object
Payment
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPayment.PaymentTypeEnumSee Payment Types.static classPayment.StatusEnumThe status of the payment.
-
Constructor Summary
Constructors Constructor Description Payment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Paymentaccount(Account account)accountPaymentaddValidationErrorsItem(ValidationError validationErrorsItem)Displays array of validation error messages from the APIPaymentamount(Double amount)The amount of the payment.PaymentbankAccountNumber(String bankAccountNumber)The suppliers bank account number the payment is being made toPaymentbankAmount(Double bankAmount)The amount of the payment in the currency of the bank account.PaymentbatchPaymentID(UUID batchPaymentID)Present if the payment was created as part of a batch.Paymentcode(String code)Code of account you are using to make the payment e.g.PaymentcreditNote(CreditNote creditNote)creditNotePaymentcreditNoteNumber(String creditNoteNumber)Number of invoice or credit note you are applying payment to e.g.PaymentcurrencyRate(Double currencyRate)Exchange rate when payment is received.Paymentdate(String date)Date the payment is being made (YYYY-MM-DD) e.g.Paymentdetails(String details)The information to appear on the supplier's bank accountbooleanequals(Object o)AccountgetAccount()Get accountDoublegetAmount()The amount of the payment.StringgetBankAccountNumber()The suppliers bank account number the payment is being made toDoublegetBankAmount()The amount of the payment in the currency of the bank account.UUIDgetBatchPaymentID()Present if the payment was created as part of a batch.StringgetCode()Code of account you are using to make the payment e.g.CreditNotegetCreditNote()Get creditNoteStringgetCreditNoteNumber()Number of invoice or credit note you are applying payment to e.g.DoublegetCurrencyRate()Exchange rate when payment is received.StringgetDate()Date the payment is being made (YYYY-MM-DD) e.g.org.threeten.bp.LocalDategetDateAsDate()Date the payment is being made (YYYY-MM-DD) e.g.StringgetDetails()The information to appear on the supplier's bank accountBooleangetHasAccount()A boolean to indicate if a contact has an validation errorsBooleangetHasValidationErrors()A boolean to indicate if a contact has an validation errorsInvoicegetInvoice()Get invoiceStringgetInvoiceNumber()Number of invoice or credit note you are applying payment to e.g.INV-4003BooleangetIsReconciled()An optional parameter for the payment.OverpaymentgetOverpayment()Get overpaymentStringgetParticulars()The suppliers bank account number the payment is being made toUUIDgetPaymentID()The Xero identifier for an Payment e.g.Payment.PaymentTypeEnumgetPaymentType()See Payment Types.PrepaymentgetPrepayment()Get prepaymentStringgetReference()An optional description for the payment e.g.Payment.StatusEnumgetStatus()The status of the payment.StringgetStatusAttributeString()A string to indicate if a invoice statusStringgetUpdatedDateUTC()UTC timestamp of last update to the paymentorg.threeten.bp.OffsetDateTimegetUpdatedDateUTCAsDate()UTC timestamp of last update to the paymentList<ValidationError>getValidationErrors()Displays array of validation error messages from the APIPaymenthasAccount(Boolean hasAccount)A boolean to indicate if a contact has an validation errorsinthashCode()PaymenthasValidationErrors(Boolean hasValidationErrors)A boolean to indicate if a contact has an validation errorsPaymentinvoice(Invoice invoice)invoicePaymentinvoiceNumber(String invoiceNumber)Number of invoice or credit note you are applying payment to e.g.INV-4003PaymentisReconciled(Boolean isReconciled)An optional parameter for the payment.Paymentoverpayment(Overpayment overpayment)overpaymentPaymentparticulars(String particulars)The suppliers bank account number the payment is being made toPaymentpaymentID(UUID paymentID)The Xero identifier for an Payment e.g.Paymentprepayment(Prepayment prepayment)prepaymentPaymentreference(String reference)An optional description for the payment e.g.voidsetAccount(Account account)accountvoidsetAmount(Double amount)The amount of the payment.voidsetBankAccountNumber(String bankAccountNumber)The suppliers bank account number the payment is being made tovoidsetBankAmount(Double bankAmount)The amount of the payment in the currency of the bank account.voidsetBatchPaymentID(UUID batchPaymentID)Present if the payment was created as part of a batch.voidsetCode(String code)Code of account you are using to make the payment e.g.voidsetCreditNote(CreditNote creditNote)creditNotevoidsetCreditNoteNumber(String creditNoteNumber)Number of invoice or credit note you are applying payment to e.g.voidsetCurrencyRate(Double currencyRate)Exchange rate when payment is received.voidsetDate(String date)Date the payment is being made (YYYY-MM-DD) e.g.voidsetDate(org.threeten.bp.LocalDate date)Date the payment is being made (YYYY-MM-DD) e.g.voidsetDetails(String details)The information to appear on the supplier's bank accountvoidsetHasAccount(Boolean hasAccount)A boolean to indicate if a contact has an validation errorsvoidsetHasValidationErrors(Boolean hasValidationErrors)A boolean to indicate if a contact has an validation errorsvoidsetInvoice(Invoice invoice)invoicevoidsetInvoiceNumber(String invoiceNumber)Number of invoice or credit note you are applying payment to e.g.INV-4003voidsetIsReconciled(Boolean isReconciled)An optional parameter for the payment.voidsetOverpayment(Overpayment overpayment)overpaymentvoidsetParticulars(String particulars)The suppliers bank account number the payment is being made tovoidsetPaymentID(UUID paymentID)The Xero identifier for an Payment e.g.voidsetPrepayment(Prepayment prepayment)prepaymentvoidsetReference(String reference)An optional description for the payment e.g.voidsetStatus(Payment.StatusEnum status)The status of the payment.voidsetStatusAttributeString(String statusAttributeString)A string to indicate if a invoice statusvoidsetValidationErrors(List<ValidationError> validationErrors)Displays array of validation error messages from the APIPaymentstatus(Payment.StatusEnum status)The status of the payment.PaymentstatusAttributeString(String statusAttributeString)A string to indicate if a invoice statusStringtoString()PaymentvalidationErrors(List<ValidationError> validationErrors)Displays array of validation error messages from the API
-
-
-
Method Detail
-
invoice
public Payment invoice(Invoice invoice)
invoice- Parameters:
invoice- Invoice- Returns:
- Payment
-
getInvoice
public Invoice getInvoice()
Get invoice- Returns:
- invoice
-
setInvoice
public void setInvoice(Invoice invoice)
invoice- Parameters:
invoice- Invoice
-
creditNote
public Payment creditNote(CreditNote creditNote)
creditNote- Parameters:
creditNote- CreditNote- Returns:
- Payment
-
getCreditNote
public CreditNote getCreditNote()
Get creditNote- Returns:
- creditNote
-
setCreditNote
public void setCreditNote(CreditNote creditNote)
creditNote- Parameters:
creditNote- CreditNote
-
prepayment
public Payment prepayment(Prepayment prepayment)
prepayment- Parameters:
prepayment- Prepayment- Returns:
- Payment
-
getPrepayment
public Prepayment getPrepayment()
Get prepayment- Returns:
- prepayment
-
setPrepayment
public void setPrepayment(Prepayment prepayment)
prepayment- Parameters:
prepayment- Prepayment
-
overpayment
public Payment overpayment(Overpayment overpayment)
overpayment- Parameters:
overpayment- Overpayment- Returns:
- Payment
-
getOverpayment
public Overpayment getOverpayment()
Get overpayment- Returns:
- overpayment
-
setOverpayment
public void setOverpayment(Overpayment overpayment)
overpayment- Parameters:
overpayment- Overpayment
-
invoiceNumber
public Payment invoiceNumber(String invoiceNumber)
Number of invoice or credit note you are applying payment to e.g.INV-4003- Parameters:
invoiceNumber- String- Returns:
- Payment
-
getInvoiceNumber
public String getInvoiceNumber()
Number of invoice or credit note you are applying payment to e.g.INV-4003- Returns:
- invoiceNumber
-
setInvoiceNumber
public void setInvoiceNumber(String invoiceNumber)
Number of invoice or credit note you are applying payment to e.g.INV-4003- Parameters:
invoiceNumber- String
-
creditNoteNumber
public Payment creditNoteNumber(String creditNoteNumber)
Number of invoice or credit note you are applying payment to e.g. INV-4003- Parameters:
creditNoteNumber- String- Returns:
- Payment
-
getCreditNoteNumber
public String getCreditNoteNumber()
Number of invoice or credit note you are applying payment to e.g. INV-4003- Returns:
- creditNoteNumber
-
setCreditNoteNumber
public void setCreditNoteNumber(String creditNoteNumber)
Number of invoice or credit note you are applying payment to e.g. INV-4003- Parameters:
creditNoteNumber- String
-
account
public Payment account(Account account)
account- Parameters:
account- Account- Returns:
- Payment
-
getAccount
public Account getAccount()
Get account- Returns:
- account
-
setAccount
public void setAccount(Account account)
account- Parameters:
account- Account
-
code
public Payment code(String code)
Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value)- Parameters:
code- String- Returns:
- Payment
-
getCode
public String getCode()
Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value)- Returns:
- code
-
setCode
public void setCode(String code)
Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value)- Parameters:
code- String
-
date
public Payment date(String date)
Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06- Parameters:
date- String- Returns:
- Payment
-
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
-
currencyRate
public Payment currencyRate(Double currencyRate)
Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500- Parameters:
currencyRate- Double- Returns:
- Payment
-
getCurrencyRate
public Double getCurrencyRate()
Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500- Returns:
- currencyRate
-
setCurrencyRate
public void setCurrencyRate(Double currencyRate)
Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500- Parameters:
currencyRate- Double
-
amount
public Payment 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:
- Payment
-
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
-
bankAmount
public Payment bankAmount(Double bankAmount)
The amount of the payment in the currency of the bank account.- Parameters:
bankAmount- Double- Returns:
- Payment
-
getBankAmount
public Double getBankAmount()
The amount of the payment in the currency of the bank account.- Returns:
- bankAmount
-
setBankAmount
public void setBankAmount(Double bankAmount)
The amount of the payment in the currency of the bank account.- Parameters:
bankAmount- Double
-
reference
public Payment reference(String reference)
An optional description for the payment e.g. Direct Debit- Parameters:
reference- String- Returns:
- Payment
-
getReference
public String getReference()
An optional description for the payment e.g. Direct Debit- Returns:
- reference
-
setReference
public void setReference(String reference)
An optional description for the payment e.g. Direct Debit- Parameters:
reference- String
-
isReconciled
public Payment isReconciled(Boolean isReconciled)
An optional parameter for the payment. A boolean indicating whether you would like the payment to be created as reconciled when using PUT, or whether a payment has been reconciled when using GET- Parameters:
isReconciled- Boolean- Returns:
- Payment
-
getIsReconciled
public Boolean getIsReconciled()
An optional parameter for the payment. A boolean indicating whether you would like the payment to be created as reconciled when using PUT, or whether a payment has been reconciled when using GET- Returns:
- isReconciled
-
setIsReconciled
public void setIsReconciled(Boolean isReconciled)
An optional parameter for the payment. A boolean indicating whether you would like the payment to be created as reconciled when using PUT, or whether a payment has been reconciled when using GET- Parameters:
isReconciled- Boolean
-
status
public Payment status(Payment.StatusEnum status)
The status of the payment.- Parameters:
status- StatusEnum- Returns:
- Payment
-
getStatus
public Payment.StatusEnum getStatus()
The status of the payment.- Returns:
- status
-
setStatus
public void setStatus(Payment.StatusEnum status)
The status of the payment.- Parameters:
status- StatusEnum
-
getPaymentType
public Payment.PaymentTypeEnum getPaymentType()
See Payment Types.- Returns:
- paymentType
-
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
-
paymentID
public Payment paymentID(UUID paymentID)
The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9- Parameters:
paymentID- UUID- Returns:
- Payment
-
getPaymentID
public UUID getPaymentID()
The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9- Returns:
- paymentID
-
setPaymentID
public void setPaymentID(UUID paymentID)
The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9- Parameters:
paymentID- UUID
-
batchPaymentID
public Payment batchPaymentID(UUID batchPaymentID)
Present if the payment was created as part of a batch.- Parameters:
batchPaymentID- UUID- Returns:
- Payment
-
getBatchPaymentID
public UUID getBatchPaymentID()
Present if the payment was created as part of a batch.- Returns:
- batchPaymentID
-
setBatchPaymentID
public void setBatchPaymentID(UUID batchPaymentID)
Present if the payment was created as part of a batch.- Parameters:
batchPaymentID- UUID
-
bankAccountNumber
public Payment bankAccountNumber(String bankAccountNumber)
The suppliers bank account number the payment is being made to- Parameters:
bankAccountNumber- String- Returns:
- Payment
-
getBankAccountNumber
public String getBankAccountNumber()
The suppliers bank account number the payment is being made to- Returns:
- bankAccountNumber
-
setBankAccountNumber
public void setBankAccountNumber(String bankAccountNumber)
The suppliers bank account number the payment is being made to- Parameters:
bankAccountNumber- String
-
particulars
public Payment particulars(String particulars)
The suppliers bank account number the payment is being made to- Parameters:
particulars- String- Returns:
- Payment
-
getParticulars
public String getParticulars()
The suppliers bank account number the payment is being made to- Returns:
- particulars
-
setParticulars
public void setParticulars(String particulars)
The suppliers bank account number the payment is being made to- Parameters:
particulars- String
-
details
public Payment details(String details)
The information to appear on the supplier's bank account- Parameters:
details- String- Returns:
- Payment
-
getDetails
public String getDetails()
The information to appear on the supplier's bank account- Returns:
- details
-
setDetails
public void setDetails(String details)
The information to appear on the supplier's bank account- Parameters:
details- String
-
hasAccount
public Payment hasAccount(Boolean hasAccount)
A boolean to indicate if a contact has an validation errors- Parameters:
hasAccount- Boolean- Returns:
- Payment
-
getHasAccount
public Boolean getHasAccount()
A boolean to indicate if a contact has an validation errors- Returns:
- hasAccount
-
setHasAccount
public void setHasAccount(Boolean hasAccount)
A boolean to indicate if a contact has an validation errors- Parameters:
hasAccount- Boolean
-
hasValidationErrors
public Payment hasValidationErrors(Boolean hasValidationErrors)
A boolean to indicate if a contact has an validation errors- Parameters:
hasValidationErrors- Boolean- Returns:
- Payment
-
getHasValidationErrors
public Boolean getHasValidationErrors()
A boolean to indicate if a contact has an validation errors- Returns:
- hasValidationErrors
-
setHasValidationErrors
public void setHasValidationErrors(Boolean hasValidationErrors)
A boolean to indicate if a contact has an validation errors- Parameters:
hasValidationErrors- Boolean
-
statusAttributeString
public Payment statusAttributeString(String statusAttributeString)
A string to indicate if a invoice status- Parameters:
statusAttributeString- String- Returns:
- Payment
-
getStatusAttributeString
public String getStatusAttributeString()
A string to indicate if a invoice status- Returns:
- statusAttributeString
-
setStatusAttributeString
public void setStatusAttributeString(String statusAttributeString)
A string to indicate if a invoice status- Parameters:
statusAttributeString- String
-
validationErrors
public Payment validationErrors(List<ValidationError> validationErrors)
Displays array of validation error messages from the API- Parameters:
validationErrors- List<ValidationError>- Returns:
- Payment
-
addValidationErrorsItem
public Payment addValidationErrorsItem(ValidationError validationErrorsItem)
Displays array of validation error messages from the API- Parameters:
validationErrorsItem- ValidationError- Returns:
- Payment
-
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>
-
-