Package com.xero.models.accounting
Class Item
java.lang.Object
com.xero.models.accounting.Item
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValidationErrorsItem(ValidationError validationErrorsItem) Displays array of validation error messages from the APIUser defined item code (max length = 30)description(String description) The sales description of the item (max length = 4000)booleangetCode()User defined item code (max length = 30)The sales description of the item (max length = 4000)The inventory asset account for the item.Boolean value, defaults to true.Boolean value, defaults to true.True for items that are tracked as inventory.The Xero identifier for an ItemgetName()The name of the item (max length = 50)The purchase description of the item (max length = 4000)Get purchaseDetailsThe quantity of the item on handGet salesDetailsStatus of objectThe value of the item on hand.Last modified date in UTC formatorg.threeten.bp.OffsetDateTimeLast modified date in UTC formatDisplays array of validation error messages from the APIinthashCode()inventoryAssetAccountCode(String inventoryAssetAccountCode) The inventory asset account for the item.isPurchased(Boolean isPurchased) Boolean value, defaults to true.Boolean value, defaults to true.isTrackedAsInventory(Boolean isTrackedAsInventory) True for items that are tracked as inventory.The Xero identifier for an ItemThe name of the item (max length = 50)purchaseDescription(String purchaseDescription) The purchase description of the item (max length = 4000)purchaseDetails(Purchase purchaseDetails) purchaseDetailsquantityOnHand(Double quantityOnHand) The quantity of the item on handsalesDetails(Purchase salesDetails) salesDetailsvoidUser 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.voidBoolean value, defaults to true.voidsetIsTrackedAsInventory(Boolean isTrackedAsInventory) True for items that are tracked as inventory.voidThe Xero identifier for an ItemvoidThe 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 APIstatusAttributeString(String statusAttributeString) Status of objecttoString()totalCostPool(Double totalCostPool) The value of the item on hand.validationErrors(List<ValidationError> validationErrors) Displays array of validation error messages from the API
-
Constructor Details
-
Item
public Item()
-
-
Method Details
-
code
-
getCode
-
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
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
-
getName
-
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
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
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
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
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
-
getDescription
The sales description of the item (max length = 4000)- Returns:
- description
-
setDescription
The sales description of the item (max length = 4000)- Parameters:
description- String
-
purchaseDescription
-
getPurchaseDescription
The purchase description of the item (max length = 4000)- Returns:
- purchaseDescription
-
setPurchaseDescription
The purchase description of the item (max length = 4000)- Parameters:
purchaseDescription- String
-
purchaseDetails
-
getPurchaseDetails
-
setPurchaseDetails
purchaseDetails- Parameters:
purchaseDetails- Purchase
-
salesDetails
-
getSalesDetails
-
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
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
-
getTotalCostPool
The value of the item on hand. Calculated using average cost accounting.- Returns:
- totalCostPool
-
setTotalCostPool
The value of the item on hand. Calculated using average cost accounting.- Parameters:
totalCostPool- Double
-
quantityOnHand
-
getQuantityOnHand
-
setQuantityOnHand
The quantity of the item on hand- Parameters:
quantityOnHand- Double
-
getUpdatedDateUTC
-
getUpdatedDateUTCAsDate
public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate()Last modified date in UTC format- Returns:
- OffsetDateTime
-
itemID
-
getItemID
-
setItemID
-
statusAttributeString
-
getStatusAttributeString
-
setStatusAttributeString
Status of object- Parameters:
statusAttributeString- String
-
validationErrors
Displays array of validation error messages from the API- Parameters:
validationErrors- List<ValidationError>- Returns:
- Item
-
addValidationErrorsItem
Displays array of validation error messages from the API- Parameters:
validationErrorsItem- ValidationError- Returns:
- Item
-
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>
-
equals
-
hashCode
-
toString
-