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
Modifier and Type Method Description CreditNoteaddAllocationsItem(Allocation allocationsItem)CreditNoteaddLineItemsItem(LineItem lineItemsItem)CreditNoteaddPaymentsItem(Payment paymentsItem)CreditNoteaddValidationErrorsItem(ValidationError validationErrorsItem)CreditNoteallocations(List<Allocation> allocations)CreditNoteappliedAmount(Double appliedAmount)CreditNotebrandingThemeID(UUID brandingThemeID)CreditNotecontact(Contact contact)CreditNotecreditNoteID(UUID creditNoteID)CreditNotecreditNoteNumber(String creditNoteNumber)CreditNotecurrencyCode(CurrencyCode currencyCode)CreditNotecurrencyRate(Double currencyRate)CreditNotedate(String date)booleanequals(Object o)CreditNotefullyPaidOnDate(String fullyPaidOnDate)List<Allocation>getAllocations()See AllocationsDoublegetAppliedAmount()The amount of applied to an invoiceUUIDgetBrandingThemeID()See BrandingThemesContactgetContact()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()StringgetFullyPaidOnDate()Date when credit note was fully paid(UTC format)org.threeten.bp.LocalDategetFullyPaidOnDateAsDate()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()List<ValidationError>getValidationErrors()Displays array of validation error messages from the APICreditNotehasAttachments(Boolean hasAttachments)CreditNotehasErrors(Boolean hasErrors)inthashCode()CreditNotelineAmountTypes(LineAmountTypes lineAmountTypes)CreditNotelineItems(List<LineItem> lineItems)CreditNotepayments(List<Payment> payments)CreditNotereference(String reference)CreditNoteremainingCredit(Double remainingCredit)voidsetAllocations(List<Allocation> allocations)voidsetAppliedAmount(Double appliedAmount)voidsetBrandingThemeID(UUID brandingThemeID)voidsetContact(Contact contact)voidsetCreditNoteID(UUID creditNoteID)voidsetCreditNoteNumber(String creditNoteNumber)voidsetCurrencyCode(CurrencyCode currencyCode)voidsetCurrencyRate(Double currencyRate)voidsetDate(String date)voidsetDate(org.threeten.bp.LocalDate date)voidsetFullyPaidOnDate(String fullyPaidOnDate)voidsetFullyPaidOnDate(org.threeten.bp.LocalDate fullyPaidOnDate)voidsetHasAttachments(Boolean hasAttachments)voidsetHasErrors(Boolean hasErrors)voidsetLineAmountTypes(LineAmountTypes lineAmountTypes)voidsetLineItems(List<LineItem> lineItems)voidsetPayments(List<Payment> payments)voidsetReference(String reference)voidsetRemainingCredit(Double remainingCredit)voidsetStatus(CreditNote.StatusEnum status)voidsetStatusAttributeString(String statusAttributeString)voidsetSubTotal(Double subTotal)voidsetTotal(Double total)voidsetTotalTax(Double totalTax)voidsetType(CreditNote.TypeEnum type)voidsetValidationErrors(List<ValidationError> validationErrors)CreditNotestatus(CreditNote.StatusEnum status)CreditNotestatusAttributeString(String statusAttributeString)CreditNotesubTotal(Double subTotal)StringtoString()CreditNotetotal(Double total)CreditNotetotalTax(Double totalTax)CreditNotetype(CreditNote.TypeEnum type)CreditNotevalidationErrors(List<ValidationError> validationErrors)
-
Constructor Details
-
CreditNote
public CreditNote()
-
-
Method Details
-
type
-
getType
See Credit Note Types- Returns:
- type
-
setType
-
contact
-
getContact
Get contact- Returns:
- contact
-
setContact
-
date
-
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() -
setDate
-
setDate
public void setDate(org.threeten.bp.LocalDate date) -
status
-
getStatus
See Credit Note Status Codes- Returns:
- status
-
setStatus
-
lineAmountTypes
-
getLineAmountTypes
Get lineAmountTypes- Returns:
- lineAmountTypes
-
setLineAmountTypes
-
lineItems
-
addLineItemsItem
-
getLineItems
See Invoice Line Items- Returns:
- lineItems
-
setLineItems
-
subTotal
-
getSubTotal
The subtotal of the credit note excluding taxes- Returns:
- subTotal
-
setSubTotal
-
totalTax
-
getTotalTax
The total tax on the credit note- Returns:
- totalTax
-
setTotalTax
-
total
-
getTotal
The total of the Credit Note(subtotal + total tax)- Returns:
- total
-
setTotal
-
getUpdatedDateUTC
UTC timestamp of last update to the credit note- Returns:
- updatedDateUTC
-
getUpdatedDateUTCAsDate
public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate() -
currencyCode
-
getCurrencyCode
Get currencyCode- Returns:
- currencyCode
-
setCurrencyCode
-
fullyPaidOnDate
-
getFullyPaidOnDate
Date when credit note was fully paid(UTC format)- Returns:
- fullyPaidOnDate
-
getFullyPaidOnDateAsDate
public org.threeten.bp.LocalDate getFullyPaidOnDateAsDate() -
setFullyPaidOnDate
-
setFullyPaidOnDate
public void setFullyPaidOnDate(org.threeten.bp.LocalDate fullyPaidOnDate) -
creditNoteID
-
getCreditNoteID
Xero generated unique identifier- Returns:
- creditNoteID
-
setCreditNoteID
-
creditNoteNumber
-
getCreditNoteNumber
ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)- Returns:
- creditNoteNumber
-
setCreditNoteNumber
-
reference
-
getReference
ACCRECCREDIT only – additional reference number- Returns:
- reference
-
setReference
-
getSentToContact
boolean to indicate if a credit note has been sent to a contact via the Xero app (currently read only)- Returns:
- sentToContact
-
currencyRate
-
getCurrencyRate
The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used- Returns:
- currencyRate
-
setCurrencyRate
-
remainingCredit
-
getRemainingCredit
The remaining credit balance on the Credit Note- Returns:
- remainingCredit
-
setRemainingCredit
-
allocations
-
addAllocationsItem
-
getAllocations
See Allocations- Returns:
- allocations
-
setAllocations
-
appliedAmount
-
getAppliedAmount
The amount of applied to an invoice- Returns:
- appliedAmount
-
setAppliedAmount
-
payments
-
addPaymentsItem
-
getPayments
See Payments- Returns:
- payments
-
setPayments
-
brandingThemeID
-
getBrandingThemeID
See BrandingThemes- Returns:
- brandingThemeID
-
setBrandingThemeID
-
statusAttributeString
-
getStatusAttributeString
A string to indicate if a invoice status- Returns:
- statusAttributeString
-
setStatusAttributeString
-
hasAttachments
-
getHasAttachments
boolean to indicate if a credit note has an attachment- Returns:
- hasAttachments
-
setHasAttachments
-
hasErrors
-
getHasErrors
A boolean to indicate if a credit note has an validation errors- Returns:
- hasErrors
-
setHasErrors
-
validationErrors
-
addValidationErrorsItem
-
getValidationErrors
Displays array of validation error messages from the API- Returns:
- validationErrors
-
setValidationErrors
-
equals
-
hashCode
public int hashCode() -
toString
-