Package com.marigold.sdk.model
Class PurchaseItem
-
- All Implemented Interfaces:
public final class PurchaseItemAn item being purchased.
-
-
Method Summary
Modifier and Type Method Description final IntegergetQuantity()final IntegergetPrice()final StringgetID()final StringgetTitle()final URIgetUrl()final ArrayList<String>getTags()final UnitsetTags(ArrayList<String> value)final JSONObjectgetVars()final UnitsetVars(JSONObject value)final JSONObjectgetImages()final UnitsetImages(JSONObject value)final UnitaddTag(String tag)Add a tag to the purchase item. final UnitaddVar(String key, Object value)Add a custom key value pair to the purchase item. final UnitsetFullImageUrl(URI url)Sets the URL string to use for the full item image. final UnitsetThumbImageUrl(URI url)Sets the URL string to use for the thumb item image. Booleanequals(Object other)IntegerhashCode()StringtoString()final JSONObjecttoJSON()Converts PurchaseItem to JSON. -
-
Method Detail
-
getQuantity
final Integer getQuantity()
-
getVars
final JSONObject getVars()
-
setVars
final Unit setVars(JSONObject value)
-
getImages
final JSONObject getImages()
-
setImages
final Unit setImages(JSONObject value)
-
addTag
final Unit addTag(String tag)
Add a tag to the purchase item.
- Parameters:
tag- the tag to add.
-
addVar
final Unit addVar(String key, Object value)
Add a custom key value pair to the purchase item.
- Parameters:
key- the custom value keyvalue- the custom value
-
setFullImageUrl
final Unit setFullImageUrl(URI url)
Sets the URL string to use for the full item image.
- Parameters:
url- the URL containing the full image.
-
setThumbImageUrl
final Unit setThumbImageUrl(URI url)
Sets the URL string to use for the thumb item image.
- Parameters:
url- the URL containing the thumb image.
-
toJSON
final JSONObject toJSON()
Converts PurchaseItem to JSON.
- Returns:
JSON representation of a Purchase Item
-
-
-
-