Package com.xero.models.accounting
Class CreditNote
- java.lang.Object
-
- com.xero.models.accounting.CreditNote
-
public class CreditNote extends Object
CreditNote
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreditNote.StatusEnumSee Credit Note Status Codesstatic classCreditNote.TypeEnumSee Credit Note Types
-
Constructor Summary
Constructors Constructor Description CreditNote()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreditNoteaddAllocationsItem(Allocation allocationsItem)See AllocationsCreditNoteaddLineItemsItem(LineItem lineItemsItem)See Invoice Line ItemsCreditNoteaddPaymentsItem(Payment paymentsItem)See PaymentsCreditNoteaddValidationErrorsItem(ValidationError validationErrorsItem)Displays array of validation error messages from the APICreditNoteaddWarningsItem(ValidationError warningsItem)Displays array of warning messages from the APICreditNoteallocations(List<Allocation> allocations)See AllocationsCreditNoteappliedAmount(Double appliedAmount)The amount of applied to an invoiceCreditNotebrandingThemeID(UUID brandingThemeID)See BrandingThemesCreditNotecontact(Contact contact)contactCreditNotecreditNoteID(UUID creditNoteID)Xero generated unique identifierCreditNotecreditNoteNumber(String creditNoteNumber)ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)CreditNotecurrencyCode(CurrencyCode currencyCode)currencyCodeCreditNotecurrencyRate(Double currencyRate)The currency rate for a multicurrency invoice.CreditNotedate(String date)The date the credit note is issued YYYY-MM-DD.CreditNotedueDate(String dueDate)Date invoice is due – YYYY-MM-DDbooleanequals(Object o)CreditNotefullyPaidOnDate(String fullyPaidOnDate)Date when credit note was fully paid(UTC format)List<Allocation>getAllocations()See AllocationsDoublegetAppliedAmount()The amount of applied to an invoiceUUIDgetBrandingThemeID()See BrandingThemesDoublegetCiSDeduction()CIS deduction for UK contractorsDoublegetCiSRate()CIS Deduction rate for the organisationContactgetContact()Get contactUUIDgetCreditNoteID()Xero generated unique identifierStringgetCreditNoteNumber()ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)CurrencyCodegetCurrencyCode()Get currencyCodeDoublegetCurrencyRate()The currency rate for a multicurrency invoice.StringgetDate()The date the credit note is issued YYYY-MM-DD.org.threeten.bp.LocalDategetDateAsDate()The date the credit note is issued YYYY-MM-DD.StringgetDueDate()Date invoice is due – YYYY-MM-DDorg.threeten.bp.LocalDategetDueDateAsDate()Date invoice is due – YYYY-MM-DDStringgetFullyPaidOnDate()Date when credit note was fully paid(UTC format)org.threeten.bp.LocalDategetFullyPaidOnDateAsDate()Date when credit note was fully paid(UTC format)BooleangetHasAttachments()boolean to indicate if a credit note has an attachmentBooleangetHasErrors()A boolean to indicate if a credit note has an validation errorsLineAmountTypesgetLineAmountTypes()Get lineAmountTypesList<LineItem>getLineItems()See Invoice Line ItemsList<Payment>getPayments()See PaymentsStringgetReference()ACCRECCREDIT only – additional reference numberDoublegetRemainingCredit()The remaining credit balance on the Credit NoteBooleangetSentToContact()boolean to indicate if a credit note has been sent to a contact via the Xero app (currently read only)CreditNote.StatusEnumgetStatus()See Credit Note Status CodesStringgetStatusAttributeString()A string to indicate if a invoice statusDoublegetSubTotal()The subtotal of the credit note excluding taxesDoublegetTotal()The total of the Credit Note(subtotal + total tax)DoublegetTotalTax()The total tax on the credit noteCreditNote.TypeEnumgetType()See Credit Note TypesStringgetUpdatedDateUTC()UTC timestamp of last update to the credit noteorg.threeten.bp.OffsetDateTimegetUpdatedDateUTCAsDate()UTC timestamp of last update to the credit noteList<ValidationError>getValidationErrors()Displays array of validation error messages from the APIList<ValidationError>getWarnings()Displays array of warning messages from the APICreditNotehasAttachments(Boolean hasAttachments)boolean to indicate if a credit note has an attachmentCreditNotehasErrors(Boolean hasErrors)A boolean to indicate if a credit note has an validation errorsinthashCode()CreditNotelineAmountTypes(LineAmountTypes lineAmountTypes)lineAmountTypesCreditNotelineItems(List<LineItem> lineItems)See Invoice Line ItemsCreditNotepayments(List<Payment> payments)See PaymentsCreditNotereference(String reference)ACCRECCREDIT only – additional reference numberCreditNoteremainingCredit(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.voidsetDate(String date)The 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 errorsvoidsetLineAmountTypes(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 taxesvoidsetTotal(Double total)The 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 APICreditNotestatus(CreditNote.StatusEnum status)See Credit Note Status CodesCreditNotestatusAttributeString(String statusAttributeString)A string to indicate if a invoice statusCreditNotesubTotal(Double subTotal)The subtotal of the credit note excluding taxesStringtoString()CreditNotetotal(Double total)The total of the Credit Note(subtotal + total tax)CreditNotetotalTax(Double totalTax)The total tax on the credit noteCreditNotetype(CreditNote.TypeEnum type)See Credit Note TypesCreditNotevalidationErrors(List<ValidationError> validationErrors)Displays array of validation error messages from the APICreditNotewarnings(List<ValidationError> warnings)Displays array of warning messages from the API
-
-
-
Method Detail
-
type
public CreditNote type(CreditNote.TypeEnum type)
See Credit Note Types- Parameters:
type- TypeEnum- Returns:
- CreditNote
-
getType
public CreditNote.TypeEnum getType()
See Credit Note Types- Returns:
- type
-
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
-
status
public CreditNote status(CreditNote.StatusEnum status)
See Credit Note Status Codes- Parameters:
status- StatusEnum- Returns:
- CreditNote
-
getStatus
public CreditNote.StatusEnum getStatus()
See Credit Note Status Codes- Returns:
- status
-
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
-
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
-
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>
-
-