Package net.amcintosh.freshbooks.models
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
Items are stored from invoice lines to make invoicing easier in the future.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.FlagsNested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet unique identifier of business item exists on.Return the objects values as a Map suitable to sending to FreshBooks in a POST or PUT request.Descriptive text for item.longgetId()Get the unique identifier of this item within this business.Decimal-string count of inventory.longDuplicate of id.getName()Descriptive name of item.Decimal quantity to multiply unit cost by.getSku()Id for a specific item or product, used in inventory management.longgetTax1()Id of the first tax to apply to this item.longgetTax2()Id of the second tax to apply to this item.Unit cost of the item.Get the time of last modification.Get the visibility state: active, deleted, or archivedvoidsetDescription(String description) Descriptive text for item.voidsetInventory(String inventory) Decimal-string count of inventory.voidDescriptive name of item.voidsetQuantity(int quantity) Quantity to multiply unit cost by.voidsetQuantity(String quantity) Quantity to multiply unit cost by.voidsetQuantity(BigDecimal quantity) Decimal quantity to multiply unit cost by.voidId for a specific item or product, used in inventory management.voidsetTax1(long tax1) Id of the first tax to apply to this item.voidsetTax2(long tax2) Id of the second tax to apply to this item.voidsetUnitCost(Money unitCost) Unit cost of the item.voidsetVisState(VisState visState) Set the visibility state of the item.Methods inherited from class com.google.api.client.json.GenericJson
clone, getFactory, set, setFactory, toPrettyString, toStringMethods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysMethods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Item
public Item()
-
-
Method Details
-
getId
public long getId()Get the unique identifier of this item within this business.- Returns:
-
getAccountingSystemId
Get unique identifier of business item exists on.- Returns:
- Accounting System Id
-
getItemId
public long getItemId()Duplicate of id.- Returns:
-
getDescription
Descriptive text for item.- Returns:
- Eg. "65L BackPack"
-
setDescription
Descriptive text for item.- Parameters:
description- Eg. "65L BackPack"
-
getInventory
Decimal-string count of inventory.- Returns:
- Eg. 10
-
setInventory
Decimal-string count of inventory.- Parameters:
inventory- Eg. 10
-
getName
Descriptive name of item.- Returns:
- e.g. "BackPack"
-
setName
Descriptive name of item.- Parameters:
name- e.g. "GST"
-
getQuantity
Decimal quantity to multiply unit cost by.- Returns:
-
setQuantity
Decimal quantity to multiply unit cost by.- Parameters:
quantity-
-
setQuantity
public void setQuantity(int quantity) Quantity to multiply unit cost by.- Parameters:
quantity-
-
setQuantity
Quantity to multiply unit cost by.- Parameters:
quantity-
-
getSku
Id for a specific item or product, used in inventory management.- Returns:
-
setSku
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
Unit cost of the item.- Returns:
-
setUnitCost
Unit cost of the item.- Parameters:
unitCost-
-
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
Get the visibility state: active, deleted, or archived- Returns:
- Enum of the visibility state.
- See Also:
-
setVisState
Set the visibility state of the item.- Parameters:
visState- VisState value- See Also:
-
getContent
Description copied from interface:ConvertibleContentReturn the objects values as a Map suitable to sending to FreshBooks in a POST or PUT request.- Specified by:
getContentin interfaceConvertibleContent- Returns:
-