Package com.xero.models.accounting
Class Item
java.lang.Object
com.xero.models.accounting.Item
public class Item extends Object
Item
-
Constructor Summary
Constructors Constructor Description Item() -
Method Summary
Modifier and Type Method Description ItemaddValidationErrorsItem(ValidationError validationErrorsItem)Itemcode(String code)Itemdescription(String description)booleanequals(Object o)StringgetCode()User defined item code (max length = 30)StringgetDescription()The sales description of the item (max length = 4000)StringgetInventoryAssetAccountCode()The inventory asset account for the item.BooleangetIsPurchased()Boolean value, defaults to true.BooleangetIsSold()Boolean value, defaults to true.BooleangetIsTrackedAsInventory()True for items that are tracked as inventory.UUIDgetItemID()The Xero identifier for an ItemStringgetName()The name of the item (max length = 50)StringgetPurchaseDescription()The purchase description of the item (max length = 4000)PurchasegetPurchaseDetails()Get purchaseDetailsDoublegetQuantityOnHand()The quantity of the item on handPurchasegetSalesDetails()Get salesDetailsStringgetStatusAttributeString()Status of objectDoublegetTotalCostPool()The value of the item on hand.StringgetUpdatedDateUTC()Last modified date in UTC formatorg.threeten.bp.OffsetDateTimegetUpdatedDateUTCAsDate()List<ValidationError>getValidationErrors()Displays array of validation error messages from the APIinthashCode()IteminventoryAssetAccountCode(String inventoryAssetAccountCode)ItemisPurchased(Boolean isPurchased)ItemisSold(Boolean isSold)ItemisTrackedAsInventory(Boolean isTrackedAsInventory)ItemitemID(UUID itemID)Itemname(String name)ItempurchaseDescription(String purchaseDescription)ItempurchaseDetails(Purchase purchaseDetails)ItemquantityOnHand(Double quantityOnHand)ItemsalesDetails(Purchase salesDetails)voidsetCode(String code)voidsetDescription(String description)voidsetInventoryAssetAccountCode(String inventoryAssetAccountCode)voidsetIsPurchased(Boolean isPurchased)voidsetIsSold(Boolean isSold)voidsetIsTrackedAsInventory(Boolean isTrackedAsInventory)voidsetItemID(UUID itemID)voidsetName(String name)voidsetPurchaseDescription(String purchaseDescription)voidsetPurchaseDetails(Purchase purchaseDetails)voidsetQuantityOnHand(Double quantityOnHand)voidsetSalesDetails(Purchase salesDetails)voidsetStatusAttributeString(String statusAttributeString)voidsetTotalCostPool(Double totalCostPool)voidsetValidationErrors(List<ValidationError> validationErrors)ItemstatusAttributeString(String statusAttributeString)StringtoString()ItemtotalCostPool(Double totalCostPool)ItemvalidationErrors(List<ValidationError> validationErrors)
-
Constructor Details
-
Item
public Item()
-
-
Method Details
-
code
-
getCode
User defined item code (max length = 30)- Returns:
- code
-
setCode
-
inventoryAssetAccountCode
-
getInventoryAssetAccountCode
The inventory asset account for the item. The account must be of type INVENTORY. The COGSAccountCode in PurchaseDetails is also required to create a tracked item- Returns:
- inventoryAssetAccountCode
-
setInventoryAssetAccountCode
-
name
-
getName
The name of the item (max length = 50)- Returns:
- name
-
setName
-
isSold
-
getIsSold
Boolean value, defaults to true. When IsSold is true the item will be available on sales transactions in the Xero UI. If IsSold is updated to false then Description and SalesDetails values will be nulled.- Returns:
- isSold
-
setIsSold
-
isPurchased
-
getIsPurchased
Boolean value, defaults to true. When IsPurchased is true the item is available for purchase transactions in the Xero UI. If IsPurchased is updated to false then PurchaseDescription and PurchaseDetails values will be nulled.- Returns:
- isPurchased
-
setIsPurchased
-
description
-
getDescription
The sales description of the item (max length = 4000)- Returns:
- description
-
setDescription
-
purchaseDescription
-
getPurchaseDescription
The purchase description of the item (max length = 4000)- Returns:
- purchaseDescription
-
setPurchaseDescription
-
purchaseDetails
-
getPurchaseDetails
Get purchaseDetails- Returns:
- purchaseDetails
-
setPurchaseDetails
-
salesDetails
-
getSalesDetails
Get salesDetails- Returns:
- salesDetails
-
setSalesDetails
-
isTrackedAsInventory
-
getIsTrackedAsInventory
True for items that are tracked as inventory. An item will be tracked as inventory if the InventoryAssetAccountCode and COGSAccountCode are set.- Returns:
- isTrackedAsInventory
-
setIsTrackedAsInventory
-
totalCostPool
-
getTotalCostPool
The value of the item on hand. Calculated using average cost accounting.- Returns:
- totalCostPool
-
setTotalCostPool
-
quantityOnHand
-
getQuantityOnHand
The quantity of the item on hand- Returns:
- quantityOnHand
-
setQuantityOnHand
-
getUpdatedDateUTC
Last modified date in UTC format- Returns:
- updatedDateUTC
-
getUpdatedDateUTCAsDate
public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate() -
itemID
-
getItemID
The Xero identifier for an Item- Returns:
- itemID
-
setItemID
-
statusAttributeString
-
getStatusAttributeString
Status of object- Returns:
- statusAttributeString
-
setStatusAttributeString
-
validationErrors
-
addValidationErrorsItem
-
getValidationErrors
Displays array of validation error messages from the API- Returns:
- validationErrors
-
setValidationErrors
-
equals
-
hashCode
public int hashCode() -
toString
-