Package com.xero.models.accounting
Class Invoice
java.lang.Object
com.xero.models.accounting.Invoice
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSee Invoice Status Codesstatic enumSee Invoice Types -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttachmentsItem(Attachment attachmentsItem) Displays array of attachments from the APIaddInvoiceAddressesItem(InvoiceAddress invoiceAddressesItem) An array of addresses used to auto calculate sales taxaddLineItemsItem(LineItem lineItemsItem) See LineItemsaddValidationErrorsItem(ValidationError validationErrorsItem) Displays array of validation error messages from the APIaddWarningsItem(ValidationError warningsItem) Displays array of warning messages from the APIattachments(List<Attachment> attachments) Displays array of attachments from the APIbrandingThemeID(UUID brandingThemeID) See BrandingThemescontactcurrencyCode(CurrencyCode currencyCode) currencyCodecurrencyRate(Double currencyRate) The currency rate for a multicurrency invoice.Date invoice was issued – YYYY-MM-DD.Date invoice is due – YYYY-MM-DDbooleanexpectedPaymentDate(String expectedPaymentDate) Shown on sales invoices (Accounts Receivable) when this has been setSum of all credit notes, over-payments and pre-payments applied to invoiceAmount remaining to be paid on invoiceSum of payments received for invoiceDisplays array of attachments from the APISee BrandingThemesCIS deduction for UK contractorsCIS Deduction rate for the organisationGet contactDetails of credit notes that have been applied to an invoiceGet currencyCodeThe currency rate for a multicurrency invoice.getDate()Date invoice was issued – YYYY-MM-DD.org.threeten.bp.LocalDateDate invoice was issued – YYYY-MM-DD.Date invoice is due – YYYY-MM-DDorg.threeten.bp.LocalDateDate invoice is due – YYYY-MM-DDShown on sales invoices (Accounts Receivable) when this has been setorg.threeten.bp.LocalDateShown on sales invoices (Accounts Receivable) when this has been setThe date the invoice was fully paid.org.threeten.bp.LocalDateThe date the invoice was fully paid.boolean to indicate if an invoice has an attachmentA boolean to indicate if a invoice has an validation errorsAn array of addresses used to auto calculate sales taxXero generated unique identifier for invoiceACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)boolean to indicate if an invoice has a discountGet lineAmountTypesSee LineItemsSee OverpaymentsSee PaymentsShown on bills (Accounts Payable) when this has been setorg.threeten.bp.LocalDateShown on bills (Accounts Payable) when this has been setSee PrepaymentsACCREC only – additional reference numberXero generated unique identifier for repeating invoicesBoolean to set whether the invoice in the Xero app should be marked as “sent”.See Invoice Status CodesA string to indicate if a invoice statusTotal of invoice excluding taxesgetTotal()Total of Invoice tax inclusive (i.e.Total of discounts applied on the invoice line itemsTotal tax on invoicegetType()See Invoice TypesLast modified date UTC formatorg.threeten.bp.OffsetDateTimeLast modified date UTC formatgetUrl()URL link to a source document – shown as “Go to [appName]” in the Xero appDisplays array of validation error messages from the APIDisplays array of warning messages from the APIA boolean to indicate if a invoice has an validation errorsinthashCode()invoiceAddresses(List<InvoiceAddress> invoiceAddresses) An array of addresses used to auto calculate sales taxXero generated unique identifier for invoiceinvoiceNumber(String invoiceNumber) ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)lineAmountTypes(LineAmountTypes lineAmountTypes) lineAmountTypesSee LineItemsplannedPaymentDate(String plannedPaymentDate) Shown on bills (Accounts Payable) when this has been setACCREC only – additional reference numberrepeatingInvoiceID(UUID repeatingInvoiceID) Xero generated unique identifier for repeating invoicessentToContact(Boolean sentToContact) Boolean to set whether the invoice in the Xero app should be marked as “sent”.voidsetAttachments(List<Attachment> attachments) Displays array of attachments from the APIvoidsetBrandingThemeID(UUID brandingThemeID) See BrandingThemesvoidsetContact(Contact contact) contactvoidsetCurrencyCode(CurrencyCode currencyCode) currencyCodevoidsetCurrencyRate(Double currencyRate) The currency rate for a multicurrency invoice.voidDate invoice was issued – YYYY-MM-DD.voidsetDate(org.threeten.bp.LocalDate date) Date invoice was 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-DDvoidsetExpectedPaymentDate(String expectedPaymentDate) Shown on sales invoices (Accounts Receivable) when this has been setvoidsetExpectedPaymentDate(org.threeten.bp.LocalDate expectedPaymentDate) Shown on sales invoices (Accounts Receivable) when this has been setvoidsetHasErrors(Boolean hasErrors) A boolean to indicate if a invoice has an validation errorsvoidsetInvoiceAddresses(List<InvoiceAddress> invoiceAddresses) An array of addresses used to auto calculate sales taxvoidsetInvoiceID(UUID invoiceID) Xero generated unique identifier for invoicevoidsetInvoiceNumber(String invoiceNumber) ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)voidsetLineAmountTypes(LineAmountTypes lineAmountTypes) lineAmountTypesvoidsetLineItems(List<LineItem> lineItems) See LineItemsvoidsetPlannedPaymentDate(String plannedPaymentDate) Shown on bills (Accounts Payable) when this has been setvoidsetPlannedPaymentDate(org.threeten.bp.LocalDate plannedPaymentDate) Shown on bills (Accounts Payable) when this has been setvoidsetReference(String reference) ACCREC only – additional reference numbervoidsetRepeatingInvoiceID(UUID repeatingInvoiceID) Xero generated unique identifier for repeating invoicesvoidsetSentToContact(Boolean sentToContact) Boolean to set whether the invoice in the Xero app should be marked as “sent”.voidsetStatus(Invoice.StatusEnum status) See Invoice Status CodesvoidsetStatusAttributeString(String statusAttributeString) A string to indicate if a invoice statusvoidsetType(Invoice.TypeEnum type) See Invoice TypesvoidURL link to a source document – shown as “Go to [appName]” in the Xero appvoidsetValidationErrors(List<ValidationError> validationErrors) Displays array of validation error messages from the APIvoidsetWarnings(List<ValidationError> warnings) Displays array of warning messages from the APIstatus(Invoice.StatusEnum status) See Invoice Status CodesstatusAttributeString(String statusAttributeString) A string to indicate if a invoice statustoString()type(Invoice.TypeEnum type) See Invoice TypesURL link to a source document – shown as “Go to [appName]” in the Xero appvalidationErrors(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
-
Invoice
public Invoice()
-
-
Method Details
-
type
See Invoice Types- Parameters:
type- TypeEnum- Returns:
- Invoice
-
getType
-
setType
-
contact
-
getContact
-
setContact
-
lineItems
-
addLineItemsItem
-
getLineItems
-
setLineItems
-
date
-
getDate
Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation- Returns:
- date
-
getDateAsDate
public org.threeten.bp.LocalDate getDateAsDate()Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation- Returns:
- LocalDate
-
setDate
Date invoice was issued – YYYY-MM-DD. If the Date element is not specified 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) Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation- Parameters:
date- LocalDateTime
-
dueDate
-
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
-
lineAmountTypes
lineAmountTypes- Parameters:
lineAmountTypes- LineAmountTypes- Returns:
- Invoice
-
getLineAmountTypes
-
setLineAmountTypes
lineAmountTypes- Parameters:
lineAmountTypes- LineAmountTypes
-
invoiceNumber
-
getInvoiceNumber
ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)- Returns:
- invoiceNumber
-
setInvoiceNumber
ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)- Parameters:
invoiceNumber- String
-
reference
-
getReference
-
setReference
ACCREC only – additional reference number- Parameters:
reference- String
-
brandingThemeID
-
getBrandingThemeID
-
setBrandingThemeID
See BrandingThemes- Parameters:
brandingThemeID- UUID
-
url
-
getUrl
URL link to a source document – shown as “Go to [appName]” in the Xero app- Returns:
- url
-
setUrl
URL link to a source document – shown as “Go to [appName]” in the Xero app- Parameters:
url- String
-
currencyCode
currencyCode- Parameters:
currencyCode- CurrencyCode- Returns:
- Invoice
-
getCurrencyCode
-
setCurrencyCode
currencyCode- Parameters:
currencyCode- CurrencyCode
-
currencyRate
-
getCurrencyRate
The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used. (max length = [18].[6])- Returns:
- currencyRate
-
setCurrencyRate
The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used. (max length = [18].[6])- Parameters:
currencyRate- Double
-
status
See Invoice Status Codes- Parameters:
status- StatusEnum- Returns:
- Invoice
-
getStatus
-
setStatus
See Invoice Status Codes- Parameters:
status- StatusEnum
-
sentToContact
-
getSentToContact
Boolean to set whether the invoice in the Xero app should be marked as “sent”. This can be set only on invoices that have been approved- Returns:
- sentToContact
-
setSentToContact
Boolean to set whether the invoice in the Xero app should be marked as “sent”. This can be set only on invoices that have been approved- Parameters:
sentToContact- Boolean
-
expectedPaymentDate
-
getExpectedPaymentDate
Shown on sales invoices (Accounts Receivable) when this has been set- Returns:
- expectedPaymentDate
-
getExpectedPaymentDateAsDate
public org.threeten.bp.LocalDate getExpectedPaymentDateAsDate()Shown on sales invoices (Accounts Receivable) when this has been set- Returns:
- LocalDate
-
setExpectedPaymentDate
Shown on sales invoices (Accounts Receivable) when this has been set- Parameters:
expectedPaymentDate- String
-
setExpectedPaymentDate
public void setExpectedPaymentDate(org.threeten.bp.LocalDate expectedPaymentDate) Shown on sales invoices (Accounts Receivable) when this has been set- Parameters:
expectedPaymentDate- LocalDateTime
-
plannedPaymentDate
-
getPlannedPaymentDate
Shown on bills (Accounts Payable) when this has been set- Returns:
- plannedPaymentDate
-
getPlannedPaymentDateAsDate
public org.threeten.bp.LocalDate getPlannedPaymentDateAsDate()Shown on bills (Accounts Payable) when this has been set- Returns:
- LocalDate
-
setPlannedPaymentDate
Shown on bills (Accounts Payable) when this has been set- Parameters:
plannedPaymentDate- String
-
setPlannedPaymentDate
public void setPlannedPaymentDate(org.threeten.bp.LocalDate plannedPaymentDate) Shown on bills (Accounts Payable) when this has been set- Parameters:
plannedPaymentDate- LocalDateTime
-
getCiSDeduction
-
getCiSRate
-
getSubTotal
-
getTotalTax
-
getTotal
Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts- Returns:
- total
-
getTotalDiscount
Total of discounts applied on the invoice line items- Returns:
- totalDiscount
-
invoiceID
-
getInvoiceID
-
setInvoiceID
Xero generated unique identifier for invoice- Parameters:
invoiceID- UUID
-
repeatingInvoiceID
-
getRepeatingInvoiceID
Xero generated unique identifier for repeating invoices- Returns:
- repeatingInvoiceID
-
setRepeatingInvoiceID
Xero generated unique identifier for repeating invoices- Parameters:
repeatingInvoiceID- UUID
-
getHasAttachments
boolean to indicate if an invoice has an attachment- Returns:
- hasAttachments
-
getIsDiscounted
boolean to indicate if an invoice has a discount- Returns:
- isDiscounted
-
getPayments
-
getPrepayments
-
getOverpayments
-
getAmountDue
-
getAmountPaid
-
getFullyPaidOnDate
The date the invoice was fully paid. Only returned on fully paid invoices- Returns:
- fullyPaidOnDate
-
getFullyPaidOnDateAsDate
public org.threeten.bp.LocalDate getFullyPaidOnDateAsDate()The date the invoice was fully paid. Only returned on fully paid invoices- Returns:
- LocalDate
-
getAmountCredited
Sum of all credit notes, over-payments and pre-payments applied to invoice- Returns:
- amountCredited
-
getUpdatedDateUTC
-
getUpdatedDateUTCAsDate
public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate()Last modified date UTC format- Returns:
- OffsetDateTime
-
getCreditNotes
Details of credit notes that have been applied to an invoice- Returns:
- creditNotes
-
attachments
Displays array of attachments from the API- Parameters:
attachments- List<Attachment>- Returns:
- Invoice
-
addAttachmentsItem
Displays array of attachments from the API- Parameters:
attachmentsItem- Attachment- Returns:
- Invoice
-
getAttachments
Displays array of attachments from the API- Returns:
- attachments
-
setAttachments
Displays array of attachments from the API- Parameters:
attachments- List<Attachment>
-
hasErrors
-
getHasErrors
A boolean to indicate if a invoice has an validation errors- Returns:
- hasErrors
-
setHasErrors
A boolean to indicate if a invoice has an validation errors- Parameters:
hasErrors- Boolean
-
statusAttributeString
-
getStatusAttributeString
A string to indicate if a invoice status- Returns:
- statusAttributeString
-
setStatusAttributeString
A string to indicate if a invoice status- Parameters:
statusAttributeString- String
-
validationErrors
Displays array of validation error messages from the API- Parameters:
validationErrors- List<ValidationError>- Returns:
- Invoice
-
addValidationErrorsItem
Displays array of validation error messages from the API- Parameters:
validationErrorsItem- ValidationError- Returns:
- Invoice
-
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:
- Invoice
-
addWarningsItem
Displays array of warning messages from the API- Parameters:
warningsItem- ValidationError- Returns:
- Invoice
-
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:
- Invoice
-
addInvoiceAddressesItem
An array of addresses used to auto calculate sales tax- Parameters:
invoiceAddressesItem- InvoiceAddress- Returns:
- Invoice
-
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
-