Class CreditNote


  • public class CreditNote
    extends Object
    CreditNote
    • Constructor Detail

      • CreditNote

        public CreditNote()
    • Method Detail

      • setType

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

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

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

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

        public CreditNote date​(String date)
        The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation
        Parameters:
        date - String
        Returns:
        CreditNote
      • getDate

        public String getDate()
        The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation
        Returns:
        date
      • getDateAsDate

        public org.threeten.bp.LocalDate getDateAsDate()
        The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation
        Returns:
        LocalDate
      • setDate

        public void setDate​(String date)
        The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation
        Parameters:
        date - String
      • setDate

        public void setDate​(org.threeten.bp.LocalDate date)
        The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation
        Parameters:
        date - LocalDateTime
      • dueDate

        public CreditNote dueDate​(String dueDate)
        Date invoice is due – YYYY-MM-DD
        Parameters:
        dueDate - String
        Returns:
        CreditNote
      • getDueDate

        public String getDueDate()
        Date invoice is due – YYYY-MM-DD
        Returns:
        dueDate
      • getDueDateAsDate

        public org.threeten.bp.LocalDate getDueDateAsDate()
        Date invoice is due – YYYY-MM-DD
        Returns:
        LocalDate
      • setDueDate

        public void setDueDate​(String dueDate)
        Date invoice is due – YYYY-MM-DD
        Parameters:
        dueDate - String
      • setDueDate

        public void setDueDate​(org.threeten.bp.LocalDate dueDate)
        Date invoice is due – YYYY-MM-DD
        Parameters:
        dueDate - LocalDateTime
      • setStatus

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

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

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

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

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

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

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

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

        public CreditNote subTotal​(Double subTotal)
        The subtotal of the credit note excluding taxes
        Parameters:
        subTotal - Double
        Returns:
        CreditNote
      • getSubTotal

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

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

        public CreditNote totalTax​(Double totalTax)
        The total tax on the credit note
        Parameters:
        totalTax - Double
        Returns:
        CreditNote
      • getTotalTax

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

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

        public CreditNote total​(Double total)
        The total of the Credit Note(subtotal + total tax)
        Parameters:
        total - Double
        Returns:
        CreditNote
      • getTotal

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

        public void setTotal​(Double total)
        The total of the Credit Note(subtotal + total tax)
        Parameters:
        total - Double
      • getCiSDeduction

        public Double getCiSDeduction()
        CIS deduction for UK contractors
        Returns:
        ciSDeduction
      • getCiSRate

        public Double getCiSRate()
        CIS Deduction rate for the organisation
        Returns:
        ciSRate
      • getUpdatedDateUTC

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

        public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate()
        UTC timestamp of last update to the credit note
        Returns:
        OffsetDateTime
      • currencyCode

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

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

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

        public CreditNote fullyPaidOnDate​(String fullyPaidOnDate)
        Date when credit note was fully paid(UTC format)
        Parameters:
        fullyPaidOnDate - String
        Returns:
        CreditNote
      • getFullyPaidOnDate

        public String getFullyPaidOnDate()
        Date when credit note was fully paid(UTC format)
        Returns:
        fullyPaidOnDate
      • getFullyPaidOnDateAsDate

        public org.threeten.bp.LocalDate getFullyPaidOnDateAsDate()
        Date when credit note was fully paid(UTC format)
        Returns:
        LocalDate
      • setFullyPaidOnDate

        public void setFullyPaidOnDate​(String fullyPaidOnDate)
        Date when credit note was fully paid(UTC format)
        Parameters:
        fullyPaidOnDate - String
      • setFullyPaidOnDate

        public void setFullyPaidOnDate​(org.threeten.bp.LocalDate fullyPaidOnDate)
        Date when credit note was fully paid(UTC format)
        Parameters:
        fullyPaidOnDate - LocalDateTime
      • creditNoteID

        public CreditNote creditNoteID​(UUID creditNoteID)
        Xero generated unique identifier
        Parameters:
        creditNoteID - UUID
        Returns:
        CreditNote
      • getCreditNoteID

        public UUID getCreditNoteID()
        Xero generated unique identifier
        Returns:
        creditNoteID
      • setCreditNoteID

        public void setCreditNoteID​(UUID creditNoteID)
        Xero generated unique identifier
        Parameters:
        creditNoteID - UUID
      • creditNoteNumber

        public CreditNote creditNoteNumber​(String creditNoteNumber)
        ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)
        Parameters:
        creditNoteNumber - String
        Returns:
        CreditNote
      • getCreditNoteNumber

        public String getCreditNoteNumber()
        ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)
        Returns:
        creditNoteNumber
      • setCreditNoteNumber

        public void setCreditNoteNumber​(String creditNoteNumber)
        ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)
        Parameters:
        creditNoteNumber - String
      • reference

        public CreditNote reference​(String reference)
        ACCRECCREDIT only – additional reference number
        Parameters:
        reference - String
        Returns:
        CreditNote
      • getReference

        public String getReference()
        ACCRECCREDIT only – additional reference number
        Returns:
        reference
      • setReference

        public void setReference​(String reference)
        ACCRECCREDIT only – additional reference number
        Parameters:
        reference - String
      • getSentToContact

        public Boolean getSentToContact()
        boolean to indicate if a credit note has been sent to a contact via the Xero app (currently read only)
        Returns:
        sentToContact
      • currencyRate

        public CreditNote currencyRate​(Double currencyRate)
        The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used
        Parameters:
        currencyRate - Double
        Returns:
        CreditNote
      • getCurrencyRate

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

        public CreditNote remainingCredit​(Double remainingCredit)
        The remaining credit balance on the Credit Note
        Parameters:
        remainingCredit - Double
        Returns:
        CreditNote
      • getRemainingCredit

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

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

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

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

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

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

        public CreditNote appliedAmount​(Double appliedAmount)
        The amount of applied to an invoice
        Parameters:
        appliedAmount - Double
        Returns:
        CreditNote
      • 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
      • payments

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

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

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

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

        public CreditNote brandingThemeID​(UUID brandingThemeID)
        See BrandingThemes
        Parameters:
        brandingThemeID - UUID
        Returns:
        CreditNote
      • getBrandingThemeID

        public UUID getBrandingThemeID()
        See BrandingThemes
        Returns:
        brandingThemeID
      • setBrandingThemeID

        public void setBrandingThemeID​(UUID brandingThemeID)
        See BrandingThemes
        Parameters:
        brandingThemeID - UUID
      • statusAttributeString

        public CreditNote statusAttributeString​(String statusAttributeString)
        A string to indicate if a invoice status
        Parameters:
        statusAttributeString - String
        Returns:
        CreditNote
      • 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
      • hasAttachments

        public CreditNote hasAttachments​(Boolean hasAttachments)
        boolean to indicate if a credit note has an attachment
        Parameters:
        hasAttachments - Boolean
        Returns:
        CreditNote
      • getHasAttachments

        public Boolean getHasAttachments()
        boolean to indicate if a credit note has an attachment
        Returns:
        hasAttachments
      • setHasAttachments

        public void setHasAttachments​(Boolean hasAttachments)
        boolean to indicate if a credit note has an attachment
        Parameters:
        hasAttachments - Boolean
      • hasErrors

        public CreditNote hasErrors​(Boolean hasErrors)
        A boolean to indicate if a credit note has an validation errors
        Parameters:
        hasErrors - Boolean
        Returns:
        CreditNote
      • getHasErrors

        public Boolean getHasErrors()
        A boolean to indicate if a credit note has an validation errors
        Returns:
        hasErrors
      • setHasErrors

        public void setHasErrors​(Boolean hasErrors)
        A boolean to indicate if a credit note has an validation errors
        Parameters:
        hasErrors - Boolean
      • validationErrors

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

        public CreditNote addValidationErrorsItem​(ValidationError validationErrorsItem)
        Displays array of validation error messages from the API
        Parameters:
        validationErrorsItem - ValidationError
        Returns:
        CreditNote
      • 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>
      • warnings

        public CreditNote warnings​(List<ValidationError> warnings)
        Displays array of warning messages from the API
        Parameters:
        warnings - List<ValidationError>
        Returns:
        CreditNote
      • addWarningsItem

        public CreditNote addWarningsItem​(ValidationError warningsItem)
        Displays array of warning messages from the API
        Parameters:
        warningsItem - ValidationError
        Returns:
        CreditNote
      • getWarnings

        public List<ValidationError> getWarnings()
        Displays array of warning messages from the API
        Returns:
        warnings
      • setWarnings

        public void setWarnings​(List<ValidationError> warnings)
        Displays array of warning messages from the API
        Parameters:
        warnings - List<ValidationError>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object