public static class CommerceExtendedData.Item
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Item() |
Item(java.lang.Object id,
java.lang.String name,
java.lang.String category,
double price,
double quantity,
java.lang.String currency)
Create a record of an item that was purchased.
|
Item(java.lang.String json) |
| Modifier and Type | Method and Description |
|---|---|
CommerceExtendedData.Item |
setCategory(java.lang.String category) |
CommerceExtendedData.Item |
setCurrency(java.lang.String currency) |
CommerceExtendedData.Item |
setId(java.lang.Object id) |
CommerceExtendedData.Item |
setName(java.lang.String name) |
CommerceExtendedData.Item |
setPrice(double price) |
CommerceExtendedData.Item |
setQuantity(double quantity) |
org.json.JSONObject |
toJsonObject() |
public Item()
public Item(java.lang.String json)
throws org.json.JSONException
org.json.JSONExceptionpublic Item(java.lang.Object id,
java.lang.String name,
java.lang.String category,
double price,
double quantity,
java.lang.String currency)
throws org.json.JSONException
id - The ID of this item. May be a String or Number. Ignored if null.name - The name of this item. May be a String or Number. Ignored if null.category - The item category. Ignored if null.price - The individual item price. Ignored if null.quantity - The number of units purchased. Ignored if null.currency - The currency code for the currency used in this transaction. Ignored if null.org.json.JSONException - if values cannot be set.public CommerceExtendedData.Item setId(java.lang.Object id) throws org.json.JSONException
org.json.JSONExceptionpublic CommerceExtendedData.Item setName(java.lang.String name) throws org.json.JSONException
org.json.JSONExceptionpublic CommerceExtendedData.Item setCategory(java.lang.String category) throws org.json.JSONException
org.json.JSONExceptionpublic CommerceExtendedData.Item setPrice(double price) throws org.json.JSONException
org.json.JSONExceptionpublic CommerceExtendedData.Item setQuantity(double quantity) throws org.json.JSONException
org.json.JSONExceptionpublic CommerceExtendedData.Item setCurrency(java.lang.String currency) throws org.json.JSONException
org.json.JSONExceptionpublic org.json.JSONObject toJsonObject()
throws org.json.JSONException
org.json.JSONException