public static class Properties.Product extends ValueMap
Use this only when you have multiple products, usually for the "Completed Order" event. If
you have only one product, Properties
has methods on it directly to attach this
information.
Constructor and Description |
---|
Product(java.lang.String id,
java.lang.String sku,
double price)
Create an e-commerce product with the given id, sku and price (in dollars).
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
id() |
java.lang.String |
name() |
double |
price() |
Properties.Product |
putName(java.lang.String name)
Set an optional name for this product.
|
Properties.Product |
putValue(java.lang.String key,
java.lang.Object value)
Helper method to be able to chain put methods.
|
java.lang.String |
sku() |
clear, containsKey, containsValue, entrySet, equals, get, getBoolean, getChar, getDouble, getEnum, getFloat, getInt, getList, getLong, getString, getValueMap, getValueMap, hashCode, isEmpty, keySet, put, putAll, remove, size, toJsonObject, toString, toStringMap, values
public Product(java.lang.String id, java.lang.String sku, double price)
id
- The product ID in your databasesku
- The product SKUprice
- The price of the product (in dollars)public Properties.Product putName(java.lang.String name)
public java.lang.String name()
public java.lang.String id()
public java.lang.String sku()
public double price()
public Properties.Product putValue(java.lang.String key, java.lang.Object value)
ValueMap