Class Prepayment

java.lang.Object
com.xero.models.accounting.Prepayment

public class Prepayment
extends Object
Prepayment
  • Constructor Details

    • Prepayment

      public Prepayment()
  • Method Details

    • type

      public Prepayment type​(Prepayment.TypeEnum type)
    • getType

      public Prepayment.TypeEnum getType()
      See Prepayment Types
      Returns:
      type
    • setType

      public void setType​(Prepayment.TypeEnum type)
    • contact

      public Prepayment contact​(Contact contact)
    • getContact

      public Contact getContact()
      Get contact
      Returns:
      contact
    • setContact

      public void setContact​(Contact contact)
    • date

      public Prepayment date​(String date)
    • getDate

      public String getDate()
      The date the prepayment is created YYYY-MM-DD
      Returns:
      date
    • getDateAsDate

      public org.threeten.bp.LocalDate getDateAsDate()
    • setDate

      public void setDate​(String date)
    • setDate

      public void setDate​(org.threeten.bp.LocalDate date)
    • status

      public Prepayment status​(Prepayment.StatusEnum status)
    • getStatus

      public Prepayment.StatusEnum getStatus()
      See Prepayment Status Codes
      Returns:
      status
    • setStatus

      public void setStatus​(Prepayment.StatusEnum status)
    • lineAmountTypes

      public Prepayment lineAmountTypes​(LineAmountTypes lineAmountTypes)
    • getLineAmountTypes

      public LineAmountTypes getLineAmountTypes()
      Get lineAmountTypes
      Returns:
      lineAmountTypes
    • setLineAmountTypes

      public void setLineAmountTypes​(LineAmountTypes lineAmountTypes)
    • lineItems

      public Prepayment lineItems​(List<LineItem> lineItems)
    • addLineItemsItem

      public Prepayment addLineItemsItem​(LineItem lineItemsItem)
    • getLineItems

      public List<LineItem> getLineItems()
      See Prepayment Line Items
      Returns:
      lineItems
    • setLineItems

      public void setLineItems​(List<LineItem> lineItems)
    • subTotal

      public Prepayment subTotal​(Double subTotal)
    • getSubTotal

      public Double getSubTotal()
      The subtotal of the prepayment excluding taxes
      Returns:
      subTotal
    • setSubTotal

      public void setSubTotal​(Double subTotal)
    • totalTax

      public Prepayment totalTax​(Double totalTax)
    • getTotalTax

      public Double getTotalTax()
      The total tax on the prepayment
      Returns:
      totalTax
    • setTotalTax

      public void setTotalTax​(Double totalTax)
    • total

      public Prepayment total​(Double total)
    • getTotal

      public Double getTotal()
      The total of the prepayment(subtotal + total tax)
      Returns:
      total
    • setTotal

      public void setTotal​(Double total)
    • getReference

      public String getReference()
      Returns Invoice number field. Reference field isn't available.
      Returns:
      reference
    • getUpdatedDateUTC

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

      public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate()
    • currencyCode

      public Prepayment currencyCode​(CurrencyCode currencyCode)
    • getCurrencyCode

      public CurrencyCode getCurrencyCode()
      Get currencyCode
      Returns:
      currencyCode
    • setCurrencyCode

      public void setCurrencyCode​(CurrencyCode currencyCode)
    • prepaymentID

      public Prepayment prepaymentID​(UUID prepaymentID)
    • getPrepaymentID

      public UUID getPrepaymentID()
      Xero generated unique identifier
      Returns:
      prepaymentID
    • setPrepaymentID

      public void setPrepaymentID​(UUID prepaymentID)
    • currencyRate

      public Prepayment currencyRate​(Double currencyRate)
    • getCurrencyRate

      public Double getCurrencyRate()
      The currency rate for a multicurrency prepayment. If no rate is specified, the XE.com day rate is used
      Returns:
      currencyRate
    • setCurrencyRate

      public void setCurrencyRate​(Double currencyRate)
    • remainingCredit

      public Prepayment remainingCredit​(Double remainingCredit)
    • getRemainingCredit

      public Double getRemainingCredit()
      The remaining credit balance on the prepayment
      Returns:
      remainingCredit
    • setRemainingCredit

      public void setRemainingCredit​(Double remainingCredit)
    • allocations

      public Prepayment allocations​(List<Allocation> allocations)
    • addAllocationsItem

      public Prepayment addAllocationsItem​(Allocation allocationsItem)
    • getAllocations

      public List<Allocation> getAllocations()
      See Allocations
      Returns:
      allocations
    • setAllocations

      public void setAllocations​(List<Allocation> allocations)
    • appliedAmount

      public Prepayment appliedAmount​(Double appliedAmount)
    • getAppliedAmount

      public Double getAppliedAmount()
      The amount of applied to an invoice
      Returns:
      appliedAmount
    • setAppliedAmount

      public void setAppliedAmount​(Double appliedAmount)
    • getHasAttachments

      public Boolean getHasAttachments()
      boolean to indicate if a prepayment has an attachment
      Returns:
      hasAttachments
    • attachments

      public Prepayment attachments​(List<Attachment> attachments)
    • addAttachmentsItem

      public Prepayment addAttachmentsItem​(Attachment attachmentsItem)
    • getAttachments

      public List<Attachment> getAttachments()
      See Attachments
      Returns:
      attachments
    • setAttachments

      public void setAttachments​(List<Attachment> attachments)
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object