Class Item

java.lang.Object
java.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.json.GenericJson
net.amcintosh.freshbooks.models.Item
All Implemented Interfaces:
Cloneable, Map<String,Object>, ConvertibleContent

public class Item extends com.google.api.client.json.GenericJson implements ConvertibleContent
Items are stored from invoice lines to make invoicing easier in the future.
See Also:
  • Constructor Details

    • Item

      public Item()
  • Method Details

    • getId

      public long getId()
      Get the unique identifier of this item within this business.
      Returns:
    • getAccountingSystemId

      public String getAccountingSystemId()
      Get unique identifier of business item exists on.
      Returns:
      Accounting System Id
    • getItemId

      public long getItemId()
      Duplicate of id.
      Returns:
    • getDescription

      public String getDescription()
      Descriptive text for item.
      Returns:
      Eg. "65L BackPack"
    • setDescription

      public void setDescription(String description)
      Descriptive text for item.
      Parameters:
      description - Eg. "65L BackPack"
    • getInventory

      public String getInventory()
      Decimal-string count of inventory.
      Returns:
      Eg. 10
    • setInventory

      public void setInventory(String inventory)
      Decimal-string count of inventory.
      Parameters:
      inventory - Eg. 10
    • getName

      public String getName()
      Descriptive name of item.
      Returns:
      e.g. "BackPack"
    • setName

      public void setName(String name)
      Descriptive name of item.
      Parameters:
      name - e.g. "GST"
    • getQuantity

      public BigDecimal getQuantity()
      Decimal quantity to multiply unit cost by.
      Returns:
    • setQuantity

      public void setQuantity(BigDecimal quantity)
      Decimal quantity to multiply unit cost by.
      Parameters:
      quantity -
    • setQuantity

      public void setQuantity(int quantity)
      Quantity to multiply unit cost by.
      Parameters:
      quantity -
    • setQuantity

      public void setQuantity(String quantity)
      Quantity to multiply unit cost by.
      Parameters:
      quantity -
    • getSku

      public String getSku()
      Id for a specific item or product, used in inventory management.
      Returns:
    • setSku

      public void setSku(String sku)
      Id for a specific item or product, used in inventory management.
      Parameters:
      sku -
    • getTax1

      public long getTax1()
      Id of the first tax to apply to this item.
      Returns:
    • setTax1

      public void setTax1(long tax1)
      Id of the first tax to apply to this item.
      Parameters:
      tax1 -
    • getTax2

      public long getTax2()
      Id of the second tax to apply to this item.
      Returns:
    • setTax2

      public void setTax2(long tax2)
      Id of the second tax to apply to this item.
      Parameters:
      tax2 -
    • getUnitCost

      public Money getUnitCost()
      Unit cost of the item.
      Returns:
    • setUnitCost

      public void setUnitCost(Money unitCost)
      Unit cost of the item.
      Parameters:
      unitCost -
    • getUpdated

      public ZonedDateTime getUpdated()
      Get the time of last modification.

      Note: The API returns this data in "US/Eastern", but it is converted to UTC.
      Returns:
      Updated time in UTC
    • getVisState

      public VisState getVisState()
      Get the visibility state: active, deleted, or archived

      Returns:
      Enum of the visibility state.
      See Also:
    • setVisState

      public void setVisState(VisState visState)
      Set the visibility state of the item.

      Parameters:
      visState - VisState value
      See Also:
    • getContent

      public Map<String,Object> getContent()
      Description copied from interface: ConvertibleContent
      Return the objects values as a Map suitable to sending to FreshBooks in a POST or PUT request.
      Specified by:
      getContent in interface ConvertibleContent
      Returns: