Package com.marigold.sdk.model
Class Purchase
-
- All Implemented Interfaces:
public final class PurchaseA purchase to log to the platform.
-
-
Field Summary
Fields Modifier and Type Field Description private final ArrayList<PurchaseItem>purchaseItemsprivate final ArrayList<PurchaseAdjustment>purchaseAdjustmentsprivate JSONObjectvarsprivate StringmessageId
-
Method Summary
Modifier and Type Method Description final ArrayList<PurchaseItem>getPurchaseItems()final ArrayList<PurchaseAdjustment>getPurchaseAdjustments()final JSONObjectgetVars()final UnitsetVars(JSONObject value)final StringgetMessageId()final UnitsetMessageId(String value)final UnitaddVar(String key, Object value)Add a custom key value pair to the purchase item. Booleanequals(Object other)IntegerhashCode()StringtoString()final JSONObjecttoJSON()Converts Purchase to JSON. -
-
Constructor Detail
-
Purchase
Purchase(ArrayList<?> purchaseItems)
-
-
Method Detail
-
getPurchaseItems
final ArrayList<PurchaseItem> getPurchaseItems()
-
getPurchaseAdjustments
final ArrayList<PurchaseAdjustment> getPurchaseAdjustments()
-
getVars
final JSONObject getVars()
-
setVars
final Unit setVars(JSONObject value)
-
getMessageId
final String getMessageId()
-
setMessageId
final Unit setMessageId(String value)
-
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
-
toJSON
final JSONObject toJSON()
Converts Purchase to JSON.
- Returns:
JSON representation of a Purchase
-
-
-
-