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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemaddValidationErrorsItem(ValidationError validationErrorsItem)Displays array of validation error messages from the APIItemcode(String code)User defined item code (max length = 30)Itemdescription(String description)The sales description of the item (max length = 4000)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()Last modified date in UTC formatList<ValidationError>getValidationErrors()Displays array of validation error messages from the APIinthashCode()IteminventoryAssetAccountCode(String inventoryAssetAccountCode)The inventory asset account for the item.ItemisPurchased(Boolean isPurchased)Boolean value, defaults to true.ItemisSold(Boolean isSold)Boolean value, defaults to true.ItemisTrackedAsInventory(Boolean isTrackedAsInventory)True for items that are tracked as inventory.ItemitemID(UUID itemID)The Xero identifier for an ItemItemname(String name)The name of the item (max length = 50)ItempurchaseDescription(String purchaseDescription)The purchase description of the item (max length = 4000)ItempurchaseDetails(Purchase purchaseDetails)purchaseDetailsItemquantityOnHand(Double quantityOnHand)The quantity of the item on handItemsalesDetails(Purchase salesDetails)salesDetailsvoidsetCode(String code)User defined item code (max length = 30)voidsetDescription(String description)The sales description of the item (max length = 4000)voidsetInventoryAssetAccountCode(String inventoryAssetAccountCode)The inventory asset account for the item.voidsetIsPurchased(Boolean isPurchased)Boolean value, defaults to true.voidsetIsSold(Boolean isSold)Boolean value, defaults to true.voidsetIsTrackedAsInventory(Boolean isTrackedAsInventory)True for items that are tracked as inventory.voidsetItemID(UUID itemID)The Xero identifier for an ItemvoidsetName(String name)The name of the item (max length = 50)voidsetPurchaseDescription(String purchaseDescription)The purchase description of the item (max length = 4000)voidsetPurchaseDetails(Purchase purchaseDetails)purchaseDetailsvoidsetQuantityOnHand(Double quantityOnHand)The quantity of the item on handvoidsetSalesDetails(Purchase salesDetails)salesDetailsvoidsetStatusAttributeString(String statusAttributeString)Status of objectvoidsetTotalCostPool(Double totalCostPool)The value of the item on hand.voidsetValidationErrors(List<ValidationError> validationErrors)Displays array of validation error messages from the APIItemstatusAttributeString(String statusAttributeString)Status of objectStringtoString()ItemtotalCostPool(Double totalCostPool)The value of the item on hand.ItemvalidationErrors(List<ValidationError> validationErrors)Displays array of validation error messages from the API
-
-
-
Method Detail
-
code
public Item code(String code)
User defined item code (max length = 30)- Parameters:
code- String- Returns:
- Item
-
getCode
public String getCode()
User defined item code (max length = 30)- Returns:
- code
-
setCode
public void setCode(String code)
User defined item code (max length = 30)- Parameters:
code- String
-
inventoryAssetAccountCode
public Item inventoryAssetAccountCode(String inventoryAssetAccountCode)
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- Parameters:
inventoryAssetAccountCode- String- Returns:
- Item
-
getInventoryAssetAccountCode
public String 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
public void setInventoryAssetAccountCode(String inventoryAssetAccountCode)
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- Parameters:
inventoryAssetAccountCode- String
-
name
public Item name(String name)
The name of the item (max length = 50)- Parameters:
name- String- Returns:
- Item
-
getName
public String getName()
The name of the item (max length = 50)- Returns:
- name
-
setName
public void setName(String name)
The name of the item (max length = 50)- Parameters:
name- String
-
isSold
public Item isSold(Boolean isSold)
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.- Parameters:
isSold- Boolean- Returns:
- Item
-
getIsSold
public Boolean 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
public void setIsSold(Boolean isSold)
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.- Parameters:
isSold- Boolean
-
isPurchased
public Item isPurchased(Boolean isPurchased)
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.- Parameters:
isPurchased- Boolean- Returns:
- Item
-
getIsPurchased
public Boolean 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
public void setIsPurchased(Boolean isPurchased)
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.- Parameters:
isPurchased- Boolean
-
description
public Item description(String description)
The sales description of the item (max length = 4000)- Parameters:
description- String- Returns:
- Item
-
getDescription
public String getDescription()
The sales description of the item (max length = 4000)- Returns:
- description
-
setDescription
public void setDescription(String description)
The sales description of the item (max length = 4000)- Parameters:
description- String
-
purchaseDescription
public Item purchaseDescription(String purchaseDescription)
The purchase description of the item (max length = 4000)- Parameters:
purchaseDescription- String- Returns:
- Item
-
getPurchaseDescription
public String getPurchaseDescription()
The purchase description of the item (max length = 4000)- Returns:
- purchaseDescription
-
setPurchaseDescription
public void setPurchaseDescription(String purchaseDescription)
The purchase description of the item (max length = 4000)- Parameters:
purchaseDescription- String
-
purchaseDetails
public Item purchaseDetails(Purchase purchaseDetails)
purchaseDetails- Parameters:
purchaseDetails- Purchase- Returns:
- Item
-
getPurchaseDetails
public Purchase getPurchaseDetails()
Get purchaseDetails- Returns:
- purchaseDetails
-
setPurchaseDetails
public void setPurchaseDetails(Purchase purchaseDetails)
purchaseDetails- Parameters:
purchaseDetails- Purchase
-
salesDetails
public Item salesDetails(Purchase salesDetails)
salesDetails- Parameters:
salesDetails- Purchase- Returns:
- Item
-
getSalesDetails
public Purchase getSalesDetails()
Get salesDetails- Returns:
- salesDetails
-
setSalesDetails
public void setSalesDetails(Purchase salesDetails)
salesDetails- Parameters:
salesDetails- Purchase
-
isTrackedAsInventory
public Item isTrackedAsInventory(Boolean isTrackedAsInventory)
True for items that are tracked as inventory. An item will be tracked as inventory if the InventoryAssetAccountCode and COGSAccountCode are set.- Parameters:
isTrackedAsInventory- Boolean- Returns:
- Item
-
getIsTrackedAsInventory
public Boolean 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
public void setIsTrackedAsInventory(Boolean isTrackedAsInventory)
True for items that are tracked as inventory. An item will be tracked as inventory if the InventoryAssetAccountCode and COGSAccountCode are set.- Parameters:
isTrackedAsInventory- Boolean
-
totalCostPool
public Item totalCostPool(Double totalCostPool)
The value of the item on hand. Calculated using average cost accounting.- Parameters:
totalCostPool- Double- Returns:
- Item
-
getTotalCostPool
public Double getTotalCostPool()
The value of the item on hand. Calculated using average cost accounting.- Returns:
- totalCostPool
-
setTotalCostPool
public void setTotalCostPool(Double totalCostPool)
The value of the item on hand. Calculated using average cost accounting.- Parameters:
totalCostPool- Double
-
quantityOnHand
public Item quantityOnHand(Double quantityOnHand)
The quantity of the item on hand- Parameters:
quantityOnHand- Double- Returns:
- Item
-
getQuantityOnHand
public Double getQuantityOnHand()
The quantity of the item on hand- Returns:
- quantityOnHand
-
setQuantityOnHand
public void setQuantityOnHand(Double quantityOnHand)
The quantity of the item on hand- Parameters:
quantityOnHand- Double
-
getUpdatedDateUTC
public String getUpdatedDateUTC()
Last modified date in UTC format- Returns:
- updatedDateUTC
-
getUpdatedDateUTCAsDate
public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate()
Last modified date in UTC format- Returns:
- OffsetDateTime
-
itemID
public Item itemID(UUID itemID)
The Xero identifier for an Item- Parameters:
itemID- UUID- Returns:
- Item
-
getItemID
public UUID getItemID()
The Xero identifier for an Item- Returns:
- itemID
-
setItemID
public void setItemID(UUID itemID)
The Xero identifier for an Item- Parameters:
itemID- UUID
-
statusAttributeString
public Item statusAttributeString(String statusAttributeString)
Status of object- Parameters:
statusAttributeString- String- Returns:
- Item
-
getStatusAttributeString
public String getStatusAttributeString()
Status of object- Returns:
- statusAttributeString
-
setStatusAttributeString
public void setStatusAttributeString(String statusAttributeString)
Status of object- Parameters:
statusAttributeString- String
-
validationErrors
public Item validationErrors(List<ValidationError> validationErrors)
Displays array of validation error messages from the API- Parameters:
validationErrors- List<ValidationError>- Returns:
- Item
-
addValidationErrorsItem
public Item addValidationErrorsItem(ValidationError validationErrorsItem)
Displays array of validation error messages from the API- Parameters:
validationErrorsItem- ValidationError- Returns:
- Item
-
getValidationErrors
public List<ValidationError> getValidationErrors()
Displays array of validation error messages from the API- Returns:
- validationErrors
-
setValidationErrors
public void setValidationErrors(List<ValidationError> validationErrors)
Displays array of validation error messages from the API- Parameters:
validationErrors- List<ValidationError>
-
-