Package com.xero.models.accounting
Class Invoice
java.lang.Object
com.xero.models.accounting.Invoice
public class Invoice extends Object
Invoice
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInvoice.StatusEnumSee Invoice Status Codesstatic classInvoice.TypeEnumSee Invoice Types -
Constructor Summary
Constructors Constructor Description Invoice() -
Method Summary
Modifier and Type Method Description InvoiceaddAttachmentsItem(Attachment attachmentsItem)InvoiceaddLineItemsItem(LineItem lineItemsItem)InvoiceaddValidationErrorsItem(ValidationError validationErrorsItem)InvoiceaddWarningsItem(ValidationError warningsItem)Invoiceattachments(List<Attachment> attachments)InvoicebrandingThemeID(UUID brandingThemeID)Invoicecontact(Contact contact)InvoicecurrencyCode(CurrencyCode currencyCode)InvoicecurrencyRate(Double currencyRate)Invoicedate(String date)InvoicedueDate(String dueDate)booleanequals(Object o)InvoiceexpectedPaymentDate(String expectedPaymentDate)DoublegetAmountCredited()Sum of all credit notes, over-payments and pre-payments applied to invoiceDoublegetAmountDue()Amount remaining to be paid on invoiceDoublegetAmountPaid()Sum of payments received for invoiceList<Attachment>getAttachments()Displays array of attachments from the APIUUIDgetBrandingThemeID()See BrandingThemesDoublegetCiSDeduction()CIS deduction for UK contractorsContactgetContact()Get contactList<CreditNote>getCreditNotes()Details of credit notes that have been applied to an invoiceCurrencyCodegetCurrencyCode()Get currencyCodeDoublegetCurrencyRate()The currency rate for a multicurrency invoice.StringgetDate()Date invoice was issued – YYYY-MM-DD.org.threeten.bp.LocalDategetDateAsDate()StringgetDueDate()Date invoice is due – YYYY-MM-DDorg.threeten.bp.LocalDategetDueDateAsDate()StringgetExpectedPaymentDate()Shown on sales invoices (Accounts Receivable) when this has been setorg.threeten.bp.LocalDategetExpectedPaymentDateAsDate()StringgetFullyPaidOnDate()The date the invoice was fully paid.org.threeten.bp.LocalDategetFullyPaidOnDateAsDate()BooleangetHasAttachments()boolean to indicate if an invoice has an attachmentBooleangetHasErrors()A boolean to indicate if a invoice has an validation errorsUUIDgetInvoiceID()Xero generated unique identifier for invoiceStringgetInvoiceNumber()ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)BooleangetIsDiscounted()boolean to indicate if an invoice has a discountLineAmountTypesgetLineAmountTypes()Get lineAmountTypesList<LineItem>getLineItems()See LineItemsList<Overpayment>getOverpayments()See OverpaymentsList<Payment>getPayments()See PaymentsStringgetPlannedPaymentDate()Shown on bills (Accounts Payable) when this has been setorg.threeten.bp.LocalDategetPlannedPaymentDateAsDate()List<Prepayment>getPrepayments()See PrepaymentsStringgetReference()ACCREC only – additional reference number (max length = 255)UUIDgetRepeatingInvoiceID()Xero generated unique identifier for repeating invoicesBooleangetSentToContact()Boolean to set whether the invoice in the Xero app should be marked as “sent”.Invoice.StatusEnumgetStatus()See Invoice Status CodesStringgetStatusAttributeString()A string to indicate if a invoice statusDoublegetSubTotal()Total of invoice excluding taxesDoublegetTotal()Total of Invoice tax inclusive (i.e.DoublegetTotalDiscount()Total of discounts applied on the invoice line itemsDoublegetTotalTax()Total tax on invoiceInvoice.TypeEnumgetType()See Invoice TypesStringgetUpdatedDateUTC()Last modified date UTC formatorg.threeten.bp.OffsetDateTimegetUpdatedDateUTCAsDate()StringgetUrl()URL link to a source document – shown as “Go to [appName]” in the Xero appList<ValidationError>getValidationErrors()Displays array of validation error messages from the APIList<ValidationError>getWarnings()Displays array of warning messages from the APIInvoicehasErrors(Boolean hasErrors)inthashCode()InvoiceinvoiceID(UUID invoiceID)InvoiceinvoiceNumber(String invoiceNumber)InvoicelineAmountTypes(LineAmountTypes lineAmountTypes)InvoicelineItems(List<LineItem> lineItems)InvoiceplannedPaymentDate(String plannedPaymentDate)Invoicereference(String reference)InvoicerepeatingInvoiceID(UUID repeatingInvoiceID)InvoicesentToContact(Boolean sentToContact)voidsetAttachments(List<Attachment> attachments)voidsetBrandingThemeID(UUID brandingThemeID)voidsetContact(Contact contact)voidsetCurrencyCode(CurrencyCode currencyCode)voidsetCurrencyRate(Double currencyRate)voidsetDate(String date)voidsetDate(org.threeten.bp.LocalDate date)voidsetDueDate(String dueDate)voidsetDueDate(org.threeten.bp.LocalDate dueDate)voidsetExpectedPaymentDate(String expectedPaymentDate)voidsetExpectedPaymentDate(org.threeten.bp.LocalDate expectedPaymentDate)voidsetHasErrors(Boolean hasErrors)voidsetInvoiceID(UUID invoiceID)voidsetInvoiceNumber(String invoiceNumber)voidsetLineAmountTypes(LineAmountTypes lineAmountTypes)voidsetLineItems(List<LineItem> lineItems)voidsetPlannedPaymentDate(String plannedPaymentDate)voidsetPlannedPaymentDate(org.threeten.bp.LocalDate plannedPaymentDate)voidsetReference(String reference)voidsetRepeatingInvoiceID(UUID repeatingInvoiceID)voidsetSentToContact(Boolean sentToContact)voidsetStatus(Invoice.StatusEnum status)voidsetStatusAttributeString(String statusAttributeString)voidsetType(Invoice.TypeEnum type)voidsetUrl(String url)voidsetValidationErrors(List<ValidationError> validationErrors)voidsetWarnings(List<ValidationError> warnings)Invoicestatus(Invoice.StatusEnum status)InvoicestatusAttributeString(String statusAttributeString)StringtoString()Invoicetype(Invoice.TypeEnum type)Invoiceurl(String url)InvoicevalidationErrors(List<ValidationError> validationErrors)Invoicewarnings(List<ValidationError> warnings)
-
Constructor Details
-
Invoice
public Invoice()
-
-
Method Details
-
type
-
getType
See Invoice Types- Returns:
- type
-
setType
-
contact
-
getContact
Get contact- Returns:
- contact
-
setContact
-
lineItems
-
addLineItemsItem
-
getLineItems
See LineItems- Returns:
- lineItems
-
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() -
setDate
-
setDate
public void setDate(org.threeten.bp.LocalDate date) -
dueDate
-
getDueDate
Date invoice is due – YYYY-MM-DD- Returns:
- dueDate
-
getDueDateAsDate
public org.threeten.bp.LocalDate getDueDateAsDate() -
setDueDate
-
setDueDate
public void setDueDate(org.threeten.bp.LocalDate dueDate) -
lineAmountTypes
-
getLineAmountTypes
Get lineAmountTypes- Returns:
- lineAmountTypes
-
setLineAmountTypes
-
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
-
reference
-
getReference
ACCREC only – additional reference number (max length = 255)- Returns:
- reference
-
setReference
-
brandingThemeID
-
getBrandingThemeID
See BrandingThemes- Returns:
- brandingThemeID
-
setBrandingThemeID
-
url
-
getUrl
URL link to a source document – shown as “Go to [appName]” in the Xero app- Returns:
- url
-
setUrl
-
currencyCode
-
getCurrencyCode
Get currencyCode- Returns:
- currencyCode
-
setCurrencyCode
-
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
-
status
-
getStatus
See Invoice Status Codes- Returns:
- status
-
setStatus
-
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
-
expectedPaymentDate
-
getExpectedPaymentDate
Shown on sales invoices (Accounts Receivable) when this has been set- Returns:
- expectedPaymentDate
-
getExpectedPaymentDateAsDate
public org.threeten.bp.LocalDate getExpectedPaymentDateAsDate() -
setExpectedPaymentDate
-
setExpectedPaymentDate
public void setExpectedPaymentDate(org.threeten.bp.LocalDate expectedPaymentDate) -
plannedPaymentDate
-
getPlannedPaymentDate
Shown on bills (Accounts Payable) when this has been set- Returns:
- plannedPaymentDate
-
getPlannedPaymentDateAsDate
public org.threeten.bp.LocalDate getPlannedPaymentDateAsDate() -
setPlannedPaymentDate
-
setPlannedPaymentDate
public void setPlannedPaymentDate(org.threeten.bp.LocalDate plannedPaymentDate) -
getCiSDeduction
CIS deduction for UK contractors- Returns:
- ciSDeduction
-
getSubTotal
Total of invoice excluding taxes- Returns:
- subTotal
-
getTotalTax
Total tax on invoice- Returns:
- totalTax
-
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
Xero generated unique identifier for invoice- Returns:
- invoiceID
-
setInvoiceID
-
repeatingInvoiceID
-
getRepeatingInvoiceID
Xero generated unique identifier for repeating invoices- Returns:
- repeatingInvoiceID
-
setRepeatingInvoiceID
-
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
See Payments- Returns:
- payments
-
getPrepayments
See Prepayments- Returns:
- prepayments
-
getOverpayments
See Overpayments- Returns:
- overpayments
-
getAmountDue
Amount remaining to be paid on invoice- Returns:
- amountDue
-
getAmountPaid
Sum of payments received for invoice- Returns:
- amountPaid
-
getFullyPaidOnDate
The date the invoice was fully paid. Only returned on fully paid invoices- Returns:
- fullyPaidOnDate
-
getFullyPaidOnDateAsDate
public org.threeten.bp.LocalDate getFullyPaidOnDateAsDate() -
getAmountCredited
Sum of all credit notes, over-payments and pre-payments applied to invoice- Returns:
- amountCredited
-
getUpdatedDateUTC
Last modified date UTC format- Returns:
- updatedDateUTC
-
getUpdatedDateUTCAsDate
public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate() -
getCreditNotes
Details of credit notes that have been applied to an invoice- Returns:
- creditNotes
-
attachments
-
addAttachmentsItem
-
getAttachments
Displays array of attachments from the API- Returns:
- attachments
-
setAttachments
-
hasErrors
-
getHasErrors
A boolean to indicate if a invoice has an validation errors- Returns:
- hasErrors
-
setHasErrors
-
statusAttributeString
-
getStatusAttributeString
A string to indicate if a invoice status- Returns:
- statusAttributeString
-
setStatusAttributeString
-
validationErrors
-
addValidationErrorsItem
-
getValidationErrors
Displays array of validation error messages from the API- Returns:
- validationErrors
-
setValidationErrors
-
warnings
-
addWarningsItem
-
getWarnings
Displays array of warning messages from the API- Returns:
- warnings
-
setWarnings
-
equals
-
hashCode
public int hashCode() -
toString
-