Class Item

java.lang.Object
com.xero.models.accounting.Item

public class Item
extends Object
Item
  • Constructor Details

    • Item

      public Item()
  • Method Details

    • code

      public Item code​(String code)
    • getCode

      public String getCode()
      User defined item code (max length = 30)
      Returns:
      code
    • setCode

      public void setCode​(String code)
    • inventoryAssetAccountCode

      public Item inventoryAssetAccountCode​(String inventoryAssetAccountCode)
    • 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)
    • name

      public Item name​(String name)
    • getName

      public String getName()
      The name of the item (max length = 50)
      Returns:
      name
    • setName

      public void setName​(String name)
    • isSold

      public Item isSold​(Boolean isSold)
    • 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)
    • isPurchased

      public Item isPurchased​(Boolean isPurchased)
    • 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)
    • description

      public Item description​(String description)
    • getDescription

      public String getDescription()
      The sales description of the item (max length = 4000)
      Returns:
      description
    • setDescription

      public void setDescription​(String description)
    • purchaseDescription

      public Item purchaseDescription​(String purchaseDescription)
    • getPurchaseDescription

      public String getPurchaseDescription()
      The purchase description of the item (max length = 4000)
      Returns:
      purchaseDescription
    • setPurchaseDescription

      public void setPurchaseDescription​(String purchaseDescription)
    • purchaseDetails

      public Item purchaseDetails​(Purchase purchaseDetails)
    • getPurchaseDetails

      public Purchase getPurchaseDetails()
      Get purchaseDetails
      Returns:
      purchaseDetails
    • setPurchaseDetails

      public void setPurchaseDetails​(Purchase purchaseDetails)
    • salesDetails

      public Item salesDetails​(Purchase salesDetails)
    • getSalesDetails

      public Purchase getSalesDetails()
      Get salesDetails
      Returns:
      salesDetails
    • setSalesDetails

      public void setSalesDetails​(Purchase salesDetails)
    • isTrackedAsInventory

      public Item isTrackedAsInventory​(Boolean isTrackedAsInventory)
    • 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)
    • totalCostPool

      public Item totalCostPool​(Double totalCostPool)
    • getTotalCostPool

      public Double getTotalCostPool()
      The value of the item on hand. Calculated using average cost accounting.
      Returns:
      totalCostPool
    • setTotalCostPool

      public void setTotalCostPool​(Double totalCostPool)
    • quantityOnHand

      public Item quantityOnHand​(Double quantityOnHand)
    • getQuantityOnHand

      public Double getQuantityOnHand()
      The quantity of the item on hand
      Returns:
      quantityOnHand
    • setQuantityOnHand

      public void setQuantityOnHand​(Double quantityOnHand)
    • getUpdatedDateUTC

      public String getUpdatedDateUTC()
      Last modified date in UTC format
      Returns:
      updatedDateUTC
    • getUpdatedDateUTCAsDate

      public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate()
    • itemID

      public Item itemID​(UUID itemID)
    • getItemID

      public UUID getItemID()
      The Xero identifier for an Item
      Returns:
      itemID
    • setItemID

      public void setItemID​(UUID itemID)
    • statusAttributeString

      public Item statusAttributeString​(String statusAttributeString)
    • getStatusAttributeString

      public String getStatusAttributeString()
      Status of object
      Returns:
      statusAttributeString
    • setStatusAttributeString

      public void setStatusAttributeString​(String statusAttributeString)
    • validationErrors

      public Item validationErrors​(List<ValidationError> validationErrors)
    • addValidationErrorsItem

      public Item addValidationErrorsItem​(ValidationError validationErrorsItem)
    • getValidationErrors

      public List<ValidationError> getValidationErrors()
      Displays array of validation error messages from the API
      Returns:
      validationErrors
    • setValidationErrors

      public void setValidationErrors​(List<ValidationError> validationErrors)
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object