Class Item


  • public class Item
    extends Object
    Item
    • Constructor Detail

      • Item

        public Item()
    • 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>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object