Package com.xero.models.accounting
Class LineItem
java.lang.Object
com.xero.models.accounting.LineItem
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccountCode(String accountCode) See AccountsThe associated account ID related to this line itemaddTaxBreakdownItem(TaxBreakdownComponent taxBreakdownItem) An array of tax components defined for this line itemaddTrackingItem(LineItemTracking trackingItem) Optional Tracking Category – see Tracking.description(String description) Description needs to be at least 1 char long.discountAmount(Double discountAmount) Discount amount being applied to a line item.discountRate(Double discountRate) Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discountsbooleanSee AccountsThe associated account ID related to this line itemDescription needs to be at least 1 char long.Discount amount being applied to a line item.Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discountsgetItem()Get itemSee ItemsIf you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you.LineItem unique IDLineItem QuantityThe Xero identifier for a Repeating InvoiceThe ID of the sales tax codeThe type of taxabilityThe tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate.An array of tax components defined for this line itemThe tax type from TaxRatesOptional Tracking Category – see Tracking.LineItem Unit AmountinthashCode()item(LineItemItem item) itemSee ItemslineAmount(Double lineAmount) If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you.lineItemID(UUID lineItemID) LineItem unique IDLineItem QuantityrepeatingInvoiceID(UUID repeatingInvoiceID) The Xero identifier for a Repeating InvoicesalesTaxCodeId(BigDecimal salesTaxCodeId) The ID of the sales tax codevoidsetAccountCode(String accountCode) See AccountsvoidsetAccountID(UUID accountID) The associated account ID related to this line itemvoidsetDescription(String description) Description needs to be at least 1 char long.voidsetDiscountAmount(Double discountAmount) Discount amount being applied to a line item.voidsetDiscountRate(Double discountRate) Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discountsvoidsetItem(LineItemItem item) itemvoidsetItemCode(String itemCode) See ItemsvoidsetLineAmount(Double lineAmount) If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you.voidsetLineItemID(UUID lineItemID) LineItem unique IDvoidsetQuantity(Double quantity) LineItem QuantityvoidsetRepeatingInvoiceID(UUID repeatingInvoiceID) The Xero identifier for a Repeating InvoicevoidsetSalesTaxCodeId(BigDecimal salesTaxCodeId) The ID of the sales tax codevoidsetTaxability(LineItem.TaxabilityEnum taxability) The type of taxabilityvoidsetTaxAmount(Double taxAmount) The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate.voidsetTaxBreakdown(List<TaxBreakdownComponent> taxBreakdown) An array of tax components defined for this line itemvoidsetTaxType(String taxType) The tax type from TaxRatesvoidsetTracking(List<LineItemTracking> tracking) Optional Tracking Category – see Tracking.voidsetUnitAmount(Double unitAmount) LineItem Unit Amounttaxability(LineItem.TaxabilityEnum taxability) The type of taxabilityThe tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate.taxBreakdown(List<TaxBreakdownComponent> taxBreakdown) An array of tax components defined for this line itemThe tax type from TaxRatestoString()tracking(List<LineItemTracking> tracking) Optional Tracking Category – see Tracking.unitAmount(Double unitAmount) LineItem Unit Amount
-
Constructor Details
-
LineItem
public LineItem()
-
-
Method Details
-
lineItemID
-
getLineItemID
-
setLineItemID
-
description
Description needs to be at least 1 char long. A line item with just a description (i.e no unit amount or quantity) can be created by specifying just a <Description> element that contains at least 1 character- Parameters:
description- String- Returns:
- LineItem
-
getDescription
Description needs to be at least 1 char long. A line item with just a description (i.e no unit amount or quantity) can be created by specifying just a <Description> element that contains at least 1 character- Returns:
- description
-
setDescription
Description needs to be at least 1 char long. A line item with just a description (i.e no unit amount or quantity) can be created by specifying just a <Description> element that contains at least 1 character- Parameters:
description- String
-
quantity
-
getQuantity
-
setQuantity
-
unitAmount
-
getUnitAmount
-
setUnitAmount
-
itemCode
-
getItemCode
-
setItemCode
-
accountCode
-
getAccountCode
-
setAccountCode
-
accountID
-
getAccountID
-
setAccountID
The associated account ID related to this line item- Parameters:
accountID- UUID
-
taxType
-
getTaxType
-
setTaxType
-
taxAmount
-
getTaxAmount
The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if the calculated <TaxAmount> is not correct.- Returns:
- taxAmount
-
setTaxAmount
The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if the calculated <TaxAmount> is not correct.- Parameters:
taxAmount- Double
-
item
-
getItem
-
setItem
-
lineAmount
If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount- Parameters:
lineAmount- Double- Returns:
- LineItem
-
getLineAmount
If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount- Returns:
- lineAmount
-
setLineAmount
If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount- Parameters:
lineAmount- Double
-
tracking
Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 <TrackingCategory> elements.- Parameters:
tracking- List<LineItemTracking>- Returns:
- LineItem
-
addTrackingItem
Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 <TrackingCategory> elements.- Parameters:
trackingItem- LineItemTracking- Returns:
- LineItem
-
getTracking
Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 <TrackingCategory> elements.- Returns:
- tracking
-
setTracking
Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 <TrackingCategory> elements.- Parameters:
tracking- List<LineItemTracking>
-
discountRate
-
getDiscountRate
Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discounts- Returns:
- discountRate
-
setDiscountRate
Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discounts- Parameters:
discountRate- Double
-
discountAmount
-
getDiscountAmount
Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts.- Returns:
- discountAmount
-
setDiscountAmount
Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts.- Parameters:
discountAmount- Double
-
repeatingInvoiceID
-
getRepeatingInvoiceID
The Xero identifier for a Repeating Invoice- Returns:
- repeatingInvoiceID
-
setRepeatingInvoiceID
The Xero identifier for a Repeating Invoice- Parameters:
repeatingInvoiceID- UUID
-
taxability
The type of taxability- Parameters:
taxability- TaxabilityEnum- Returns:
- LineItem
-
getTaxability
-
setTaxability
The type of taxability- Parameters:
taxability- TaxabilityEnum
-
salesTaxCodeId
The ID of the sales tax code- Parameters:
salesTaxCodeId- BigDecimal- Returns:
- LineItem
-
getSalesTaxCodeId
-
setSalesTaxCodeId
The ID of the sales tax code- Parameters:
salesTaxCodeId- BigDecimal
-
taxBreakdown
An array of tax components defined for this line item- Parameters:
taxBreakdown- List<TaxBreakdownComponent>- Returns:
- LineItem
-
addTaxBreakdownItem
An array of tax components defined for this line item- Parameters:
taxBreakdownItem- TaxBreakdownComponent- Returns:
- LineItem
-
getTaxBreakdown
An array of tax components defined for this line item- Returns:
- taxBreakdown
-
setTaxBreakdown
An array of tax components defined for this line item- Parameters:
taxBreakdown- List<TaxBreakdownComponent>
-
equals
-
hashCode
-
toString
-