public class CommerceItem
extends java.lang.Object
IterableApi.trackPurchase(double, List, JSONObject)| Modifier and Type | Field and Description |
|---|---|
java.lang.String[] |
categories
categories of this product, in breadcrumb list form
|
java.lang.String |
description
description of this product
|
java.lang.String |
id
id of this product
|
java.lang.String |
imageUrl
URL of this product's image
|
java.lang.String |
name
name of this product
|
double |
price
price of this product
|
int |
quantity
quantity of this product
|
java.lang.String |
sku
SKU of this product
|
java.lang.String |
url
URL of this product
|
| Constructor and Description |
|---|
CommerceItem(java.lang.String id,
java.lang.String name,
double price,
int quantity)
Creates a
CommerceItem with the specified properties |
CommerceItem(java.lang.String id,
java.lang.String name,
double price,
int quantity,
java.lang.String sku,
java.lang.String description,
java.lang.String url,
java.lang.String imageUrl,
java.lang.String[] categories)
Creates a
CommerceItem with the specified properties |
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONObject |
toJSONObject()
A JSONObject representation of this item
|
public final java.lang.String id
public final java.lang.String name
public final double price
public final int quantity
@Nullable public final java.lang.String sku
@Nullable public final java.lang.String description
@Nullable public final java.lang.String url
@Nullable public final java.lang.String imageUrl
@Nullable public final java.lang.String[] categories
public CommerceItem(@NonNull
java.lang.String id,
@NonNull
java.lang.String name,
double price,
int quantity)
CommerceItem with the specified propertiesid - id of the productname - name of the productprice - price of the productquantity - quantity of the productpublic CommerceItem(@NonNull
java.lang.String id,
@NonNull
java.lang.String name,
double price,
int quantity,
@Nullable
java.lang.String sku,
@Nullable
java.lang.String description,
@Nullable
java.lang.String url,
@Nullable
java.lang.String imageUrl,
@Nullable
java.lang.String[] categories)
CommerceItem with the specified propertiesid - id of the productname - name of the productprice - price of the productquantity - quantity of the productsku - SKU of the productdescription - description of the producturl - URL of the productimageUrl - URL of the product's imagecategories - categories this product belongs to