Class Prepayment


  • public class Prepayment
    extends Object
    Prepayment
    • Constructor Detail

      • Prepayment

        public Prepayment()
    • Method Detail

      • setType

        public void setType​(Prepayment.TypeEnum type)
        See Prepayment Types
        Parameters:
        type - TypeEnum
      • contact

        public Prepayment contact​(Contact contact)
        contact
        Parameters:
        contact - Contact
        Returns:
        Prepayment
      • getContact

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

        public void setContact​(Contact contact)
        contact
        Parameters:
        contact - Contact
      • date

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

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

        public org.threeten.bp.LocalDate getDateAsDate()
        The date the prepayment is created YYYY-MM-DD
        Returns:
        LocalDate
      • setDate

        public void setDate​(String date)
        The date the prepayment is created YYYY-MM-DD
        Parameters:
        date - String
      • setDate

        public void setDate​(org.threeten.bp.LocalDate date)
        The date the prepayment is created YYYY-MM-DD
        Parameters:
        date - LocalDateTime
      • setStatus

        public void setStatus​(Prepayment.StatusEnum status)
        See Prepayment Status Codes
        Parameters:
        status - StatusEnum
      • lineAmountTypes

        public Prepayment lineAmountTypes​(LineAmountTypes lineAmountTypes)
        lineAmountTypes
        Parameters:
        lineAmountTypes - LineAmountTypes
        Returns:
        Prepayment
      • getLineAmountTypes

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

        public void setLineAmountTypes​(LineAmountTypes lineAmountTypes)
        lineAmountTypes
        Parameters:
        lineAmountTypes - LineAmountTypes
      • lineItems

        public Prepayment lineItems​(List<LineItem> lineItems)
        See Prepayment Line Items
        Parameters:
        lineItems - List<LineItem>
        Returns:
        Prepayment
      • addLineItemsItem

        public Prepayment addLineItemsItem​(LineItem lineItemsItem)
        See Prepayment Line Items
        Parameters:
        lineItemsItem - LineItem
        Returns:
        Prepayment
      • getLineItems

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

        public void setLineItems​(List<LineItem> lineItems)
        See Prepayment Line Items
        Parameters:
        lineItems - List<LineItem>
      • subTotal

        public Prepayment subTotal​(Double subTotal)
        The subtotal of the prepayment excluding taxes
        Parameters:
        subTotal - Double
        Returns:
        Prepayment
      • getSubTotal

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

        public void setSubTotal​(Double subTotal)
        The subtotal of the prepayment excluding taxes
        Parameters:
        subTotal - Double
      • totalTax

        public Prepayment totalTax​(Double totalTax)
        The total tax on the prepayment
        Parameters:
        totalTax - Double
        Returns:
        Prepayment
      • getTotalTax

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

        public void setTotalTax​(Double totalTax)
        The total tax on the prepayment
        Parameters:
        totalTax - Double
      • total

        public Prepayment total​(Double total)
        The total of the prepayment(subtotal + total tax)
        Parameters:
        total - Double
        Returns:
        Prepayment
      • getTotal

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

        public void setTotal​(Double total)
        The total of the prepayment(subtotal + total tax)
        Parameters:
        total - Double
      • 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()
        UTC timestamp of last update to the prepayment
        Returns:
        OffsetDateTime
      • currencyCode

        public Prepayment currencyCode​(CurrencyCode currencyCode)
        currencyCode
        Parameters:
        currencyCode - CurrencyCode
        Returns:
        Prepayment
      • getCurrencyCode

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

        public void setCurrencyCode​(CurrencyCode currencyCode)
        currencyCode
        Parameters:
        currencyCode - CurrencyCode
      • prepaymentID

        public Prepayment prepaymentID​(UUID prepaymentID)
        Xero generated unique identifier
        Parameters:
        prepaymentID - UUID
        Returns:
        Prepayment
      • getPrepaymentID

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

        public void setPrepaymentID​(UUID prepaymentID)
        Xero generated unique identifier
        Parameters:
        prepaymentID - UUID
      • currencyRate

        public Prepayment currencyRate​(Double currencyRate)
        The currency rate for a multicurrency prepayment. If no rate is specified, the XE.com day rate is used
        Parameters:
        currencyRate - Double
        Returns:
        Prepayment
      • 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)
        The currency rate for a multicurrency prepayment. If no rate is specified, the XE.com day rate is used
        Parameters:
        currencyRate - Double
      • remainingCredit

        public Prepayment remainingCredit​(Double remainingCredit)
        The remaining credit balance on the prepayment
        Parameters:
        remainingCredit - Double
        Returns:
        Prepayment
      • getRemainingCredit

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

        public void setRemainingCredit​(Double remainingCredit)
        The remaining credit balance on the prepayment
        Parameters:
        remainingCredit - Double
      • allocations

        public Prepayment allocations​(List<Allocation> allocations)
        See Allocations
        Parameters:
        allocations - List<Allocation>
        Returns:
        Prepayment
      • addAllocationsItem

        public Prepayment addAllocationsItem​(Allocation allocationsItem)
        See Allocations
        Parameters:
        allocationsItem - Allocation
        Returns:
        Prepayment
      • getAllocations

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

        public void setAllocations​(List<Allocation> allocations)
        See Allocations
        Parameters:
        allocations - List<Allocation>
      • payments

        public Prepayment payments​(List<Payment> payments)
        See Payments
        Parameters:
        payments - List<Payment>
        Returns:
        Prepayment
      • addPaymentsItem

        public Prepayment addPaymentsItem​(Payment paymentsItem)
        See Payments
        Parameters:
        paymentsItem - Payment
        Returns:
        Prepayment
      • getPayments

        public List<Payment> getPayments()
        See Payments
        Returns:
        payments
      • setPayments

        public void setPayments​(List<Payment> payments)
        See Payments
        Parameters:
        payments - List<Payment>
      • appliedAmount

        public Prepayment appliedAmount​(Double appliedAmount)
        The amount of applied to an invoice
        Parameters:
        appliedAmount - Double
        Returns:
        Prepayment
      • getAppliedAmount

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

        public void setAppliedAmount​(Double appliedAmount)
        The amount of applied to an invoice
        Parameters:
        appliedAmount - Double
      • getHasAttachments

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

        public Prepayment attachments​(List<Attachment> attachments)
        See Attachments
        Parameters:
        attachments - List<Attachment>
        Returns:
        Prepayment
      • addAttachmentsItem

        public Prepayment addAttachmentsItem​(Attachment attachmentsItem)
        See Attachments
        Parameters:
        attachmentsItem - Attachment
        Returns:
        Prepayment
      • getAttachments

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

        public void setAttachments​(List<Attachment> attachments)
        See Attachments
        Parameters:
        attachments - List<Attachment>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object