Package com.xero.models.accounting
Class CreditNote
java.lang.Object
com.xero.models.accounting.CreditNote
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSee Credit Note Status Codesstatic enumSee Credit Note Types -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllocationsItem(Allocation allocationsItem) See AllocationsaddInvoiceAddressesItem(InvoiceAddress invoiceAddressesItem) An array of addresses used to auto calculate sales taxaddLineItemsItem(LineItem lineItemsItem) See Invoice Line ItemsaddPaymentsItem(Payment paymentsItem) See PaymentsaddValidationErrorsItem(ValidationError validationErrorsItem) Displays array of validation error messages from the APIaddWarningsItem(ValidationError warningsItem) Displays array of warning messages from the APIallocations(List<Allocation> allocations) See AllocationsappliedAmount(Double appliedAmount) The amount of applied to an invoicebrandingThemeID(UUID brandingThemeID) See BrandingThemescontactcreditNoteID(UUID creditNoteID) Xero generated unique identifiercreditNoteNumber(String creditNoteNumber) ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)currencyCode(CurrencyCode currencyCode) currencyCodecurrencyRate(Double currencyRate) The currency rate for a multicurrency invoice.The date the credit note is issued YYYY-MM-DD.Date invoice is due – YYYY-MM-DDbooleanfullyPaidOnDate(String fullyPaidOnDate) Date when credit note was fully paid(UTC format)See AllocationsThe amount of applied to an invoiceSee BrandingThemesCIS deduction for UK contractorsCIS Deduction rate for the organisationGet contactXero generated unique identifierACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)Get currencyCodeThe currency rate for a multicurrency invoice.getDate()The date the credit note is issued YYYY-MM-DD.org.threeten.bp.LocalDateThe date the credit note is issued YYYY-MM-DD.Date invoice is due – YYYY-MM-DDorg.threeten.bp.LocalDateDate invoice is due – YYYY-MM-DDDate when credit note was fully paid(UTC format)org.threeten.bp.LocalDateDate when credit note was fully paid(UTC format)boolean to indicate if a credit note has an attachmentA boolean to indicate if a credit note has an validation errorsAn array of addresses used to auto calculate sales taxGet lineAmountTypesSee Invoice Line ItemsSee PaymentsACCRECCREDIT only – additional reference numberThe remaining credit balance on the Credit NoteBoolean to set whether the credit note in the Xero app should be marked as “sent”.See Credit Note Status CodesA string to indicate if a invoice statusThe subtotal of the credit note excluding taxesgetTotal()The total of the Credit Note(subtotal + total tax)The total tax on the credit notegetType()See Credit Note TypesUTC timestamp of last update to the credit noteorg.threeten.bp.OffsetDateTimeUTC timestamp of last update to the credit noteDisplays array of validation error messages from the APIDisplays array of warning messages from the APIhasAttachments(Boolean hasAttachments) boolean to indicate if a credit note has an attachmentA boolean to indicate if a credit note has an validation errorsinthashCode()invoiceAddresses(List<InvoiceAddress> invoiceAddresses) An array of addresses used to auto calculate sales taxlineAmountTypes(LineAmountTypes lineAmountTypes) lineAmountTypesSee Invoice Line ItemsSee PaymentsACCRECCREDIT only – additional reference numberremainingCredit(Double remainingCredit) The remaining credit balance on the Credit NotevoidsetAllocations(List<Allocation> allocations) See AllocationsvoidsetAppliedAmount(Double appliedAmount) The amount of applied to an invoicevoidsetBrandingThemeID(UUID brandingThemeID) See BrandingThemesvoidsetContact(Contact contact) contactvoidsetCreditNoteID(UUID creditNoteID) Xero generated unique identifiervoidsetCreditNoteNumber(String creditNoteNumber) ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)voidsetCurrencyCode(CurrencyCode currencyCode) currencyCodevoidsetCurrencyRate(Double currencyRate) The currency rate for a multicurrency invoice.voidThe date the credit note is issued YYYY-MM-DD.voidsetDate(org.threeten.bp.LocalDate date) The date the credit note is issued YYYY-MM-DD.voidsetDueDate(String dueDate) Date invoice is due – YYYY-MM-DDvoidsetDueDate(org.threeten.bp.LocalDate dueDate) Date invoice is due – YYYY-MM-DDvoidsetFullyPaidOnDate(String fullyPaidOnDate) Date when credit note was fully paid(UTC format)voidsetFullyPaidOnDate(org.threeten.bp.LocalDate fullyPaidOnDate) Date when credit note was fully paid(UTC format)voidsetHasAttachments(Boolean hasAttachments) boolean to indicate if a credit note has an attachmentvoidsetHasErrors(Boolean hasErrors) A boolean to indicate if a credit note has an validation errorsvoidsetInvoiceAddresses(List<InvoiceAddress> invoiceAddresses) An array of addresses used to auto calculate sales taxvoidsetLineAmountTypes(LineAmountTypes lineAmountTypes) lineAmountTypesvoidsetLineItems(List<LineItem> lineItems) See Invoice Line ItemsvoidsetPayments(List<Payment> payments) See PaymentsvoidsetReference(String reference) ACCRECCREDIT only – additional reference numbervoidsetRemainingCredit(Double remainingCredit) The remaining credit balance on the Credit NotevoidsetStatus(CreditNote.StatusEnum status) See Credit Note Status CodesvoidsetStatusAttributeString(String statusAttributeString) A string to indicate if a invoice statusvoidsetSubTotal(Double subTotal) The subtotal of the credit note excluding taxesvoidThe total of the Credit Note(subtotal + total tax)voidsetTotalTax(Double totalTax) The total tax on the credit notevoidsetType(CreditNote.TypeEnum type) See Credit Note TypesvoidsetValidationErrors(List<ValidationError> validationErrors) Displays array of validation error messages from the APIvoidsetWarnings(List<ValidationError> warnings) Displays array of warning messages from the APIstatus(CreditNote.StatusEnum status) See Credit Note Status CodesstatusAttributeString(String statusAttributeString) A string to indicate if a invoice statusThe subtotal of the credit note excluding taxestoString()The total of the Credit Note(subtotal + total tax)The total tax on the credit notetype(CreditNote.TypeEnum type) See Credit Note TypesvalidationErrors(List<ValidationError> validationErrors) Displays array of validation error messages from the APIwarnings(List<ValidationError> warnings) Displays array of warning messages from the API
-
Constructor Details
-
CreditNote
public CreditNote()
-
-
Method Details
-
type
See Credit Note Types- Parameters:
type- TypeEnum- Returns:
- CreditNote
-
getType
-
setType
-
contact
contact- Parameters:
contact- Contact- Returns:
- CreditNote
-
getContact
-
setContact
-
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
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
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
Date invoice is due – YYYY-MM-DD- Parameters:
dueDate- String- Returns:
- CreditNote
-
getDueDate
-
getDueDateAsDate
public org.threeten.bp.LocalDate getDueDateAsDate()Date invoice is due – YYYY-MM-DD- Returns:
- LocalDate
-
setDueDate
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
-
status
See Credit Note Status Codes- Parameters:
status- StatusEnum- Returns:
- CreditNote
-
getStatus
-
setStatus
See Credit Note Status Codes- Parameters:
status- StatusEnum
-
lineAmountTypes
lineAmountTypes- Parameters:
lineAmountTypes- LineAmountTypes- Returns:
- CreditNote
-
getLineAmountTypes
-
setLineAmountTypes
lineAmountTypes- Parameters:
lineAmountTypes- LineAmountTypes
-
lineItems
See Invoice Line Items- Parameters:
lineItems- List<LineItem>- Returns:
- CreditNote
-
addLineItemsItem
See Invoice Line Items- Parameters:
lineItemsItem- LineItem- Returns:
- CreditNote
-
getLineItems
-
setLineItems
-
subTotal
The subtotal of the credit note excluding taxes- Parameters:
subTotal- Double- Returns:
- CreditNote
-
getSubTotal
-
setSubTotal
The subtotal of the credit note excluding taxes- Parameters:
subTotal- Double
-
totalTax
The total tax on the credit note- Parameters:
totalTax- Double- Returns:
- CreditNote
-
getTotalTax
-
setTotalTax
The total tax on the credit note- Parameters:
totalTax- Double
-
total
The total of the Credit Note(subtotal + total tax)- Parameters:
total- Double- Returns:
- CreditNote
-
getTotal
-
setTotal
The total of the Credit Note(subtotal + total tax)- Parameters:
total- Double
-
getCiSDeduction
-
getCiSRate
-
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
currencyCode- Parameters:
currencyCode- CurrencyCode- Returns:
- CreditNote
-
getCurrencyCode
-
setCurrencyCode
currencyCode- Parameters:
currencyCode- CurrencyCode
-
fullyPaidOnDate
Date when credit note was fully paid(UTC format)- Parameters:
fullyPaidOnDate- String- Returns:
- CreditNote
-
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
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
Xero generated unique identifier- Parameters:
creditNoteID- UUID- Returns:
- CreditNote
-
getCreditNoteID
-
setCreditNoteID
Xero generated unique identifier- Parameters:
creditNoteID- UUID
-
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
ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)- Returns:
- creditNoteNumber
-
setCreditNoteNumber
ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)- Parameters:
creditNoteNumber- String
-
reference
ACCRECCREDIT only – additional reference number- Parameters:
reference- String- Returns:
- CreditNote
-
getReference
-
setReference
ACCRECCREDIT only – additional reference number- Parameters:
reference- String
-
getSentToContact
Boolean to set whether the credit note in the Xero app should be marked as “sent”. This can be set only on credit notes that have been approved- Returns:
- sentToContact
-
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
The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used- Returns:
- currencyRate
-
setCurrencyRate
The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used- Parameters:
currencyRate- Double
-
remainingCredit
The remaining credit balance on the Credit Note- Parameters:
remainingCredit- Double- Returns:
- CreditNote
-
getRemainingCredit
The remaining credit balance on the Credit Note- Returns:
- remainingCredit
-
setRemainingCredit
The remaining credit balance on the Credit Note- Parameters:
remainingCredit- Double
-
allocations
See Allocations- Parameters:
allocations- List<Allocation>- Returns:
- CreditNote
-
addAllocationsItem
See Allocations- Parameters:
allocationsItem- Allocation- Returns:
- CreditNote
-
getAllocations
-
setAllocations
See Allocations- Parameters:
allocations- List<Allocation>
-
appliedAmount
The amount of applied to an invoice- Parameters:
appliedAmount- Double- Returns:
- CreditNote
-
getAppliedAmount
-
setAppliedAmount
The amount of applied to an invoice- Parameters:
appliedAmount- Double
-
payments
See Payments- Parameters:
payments- List<Payment>- Returns:
- CreditNote
-
addPaymentsItem
See Payments- Parameters:
paymentsItem- Payment- Returns:
- CreditNote
-
getPayments
-
setPayments
-
brandingThemeID
See BrandingThemes- Parameters:
brandingThemeID- UUID- Returns:
- CreditNote
-
getBrandingThemeID
-
setBrandingThemeID
See BrandingThemes- Parameters:
brandingThemeID- UUID
-
statusAttributeString
A string to indicate if a invoice status- Parameters:
statusAttributeString- String- Returns:
- CreditNote
-
getStatusAttributeString
A string to indicate if a invoice status- Returns:
- statusAttributeString
-
setStatusAttributeString
A string to indicate if a invoice status- Parameters:
statusAttributeString- String
-
hasAttachments
boolean to indicate if a credit note has an attachment- Parameters:
hasAttachments- Boolean- Returns:
- CreditNote
-
getHasAttachments
boolean to indicate if a credit note has an attachment- Returns:
- hasAttachments
-
setHasAttachments
boolean to indicate if a credit note has an attachment- Parameters:
hasAttachments- Boolean
-
hasErrors
A boolean to indicate if a credit note has an validation errors- Parameters:
hasErrors- Boolean- Returns:
- CreditNote
-
getHasErrors
A boolean to indicate if a credit note has an validation errors- Returns:
- hasErrors
-
setHasErrors
A boolean to indicate if a credit note has an validation errors- Parameters:
hasErrors- Boolean
-
validationErrors
Displays array of validation error messages from the API- Parameters:
validationErrors- List<ValidationError>- Returns:
- CreditNote
-
addValidationErrorsItem
Displays array of validation error messages from the API- Parameters:
validationErrorsItem- ValidationError- Returns:
- CreditNote
-
getValidationErrors
Displays array of validation error messages from the API- Returns:
- validationErrors
-
setValidationErrors
Displays array of validation error messages from the API- Parameters:
validationErrors- List<ValidationError>
-
warnings
Displays array of warning messages from the API- Parameters:
warnings- List<ValidationError>- Returns:
- CreditNote
-
addWarningsItem
Displays array of warning messages from the API- Parameters:
warningsItem- ValidationError- Returns:
- CreditNote
-
getWarnings
Displays array of warning messages from the API- Returns:
- warnings
-
setWarnings
Displays array of warning messages from the API- Parameters:
warnings- List<ValidationError>
-
invoiceAddresses
An array of addresses used to auto calculate sales tax- Parameters:
invoiceAddresses- List<InvoiceAddress>- Returns:
- CreditNote
-
addInvoiceAddressesItem
An array of addresses used to auto calculate sales tax- Parameters:
invoiceAddressesItem- InvoiceAddress- Returns:
- CreditNote
-
getInvoiceAddresses
An array of addresses used to auto calculate sales tax- Returns:
- invoiceAddresses
-
setInvoiceAddresses
An array of addresses used to auto calculate sales tax- Parameters:
invoiceAddresses- List<InvoiceAddress>
-
equals
-
hashCode
-
toString
-