public class Properties extends ValueMap
Just like traits, we also accept some properties with semantic meaning, and you should only ever use these property names for that purpose.
Modifier and Type | Class and Description |
---|---|
static class |
Properties.Product
A representation of an e-commerce product.
|
Constructor and Description |
---|
Properties() |
Properties(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
category() |
java.lang.String |
coupon() |
java.lang.String |
currency() |
double |
discount() |
boolean |
isRepeatCustomer() |
java.lang.String |
name() |
java.lang.String |
orderId() |
java.lang.String |
path() |
double |
price() |
java.lang.String |
productId() |
java.util.List<Properties.Product> |
products() |
java.util.List<Properties.Product> |
products(Properties.Product... products)
Deprecated.
Use
products() instead. |
Properties |
putCategory(java.lang.String category)
Set a category for this action.
|
Properties |
putCoupon(java.lang.String coupon)
Set a coupon name for an order associated with an event.
|
Properties |
putCurrency(java.lang.String currency)
The currency for the value set in
putRevenue(double) . |
Properties |
putDiscount(double discount)
Set the discount amount (in dollars) for an order associated with an event.
|
Properties |
putName(java.lang.String name)
Set the name of the product associated with an event.
|
Properties |
putOrderId(java.lang.String orderId)
Set the order ID associated with an event.
|
Properties |
putPath(java.lang.String path)
Set a path (usually the path of the URL) for the screen.
|
Properties |
putPrice(double price)
Set a price (in dollars) for the product associated with an event.
|
Properties |
putProductId(java.lang.String id)
Set an ID for the product associated with an event.
|
Properties |
putProducts(Properties.Product... products)
Set the individual products for an order associated with an event.
|
Properties |
putReferrer(java.lang.String referrer)
Set the referrer that led the user to the screen.
|
Properties |
putRepeatCustomer(boolean repeat)
Set whether an order associated with an event is from a repeating customer.
|
Properties |
putRevenue(double revenue)
Set the amount of revenue an event resulted in.
|
Properties |
putShipping(double shipping)
Set the shipping amount (in dollars) for an order associated with an event.
|
Properties |
putSku(java.lang.String sku)
Set a sku for the product associated with an event.
|
double |
putSubtotal()
Deprecated.
use
subtotal() |
Properties |
putSubtotal(double subtotal)
Set the subtotal (in dollars) for an order associated with an event (excluding tax and
shipping).
|
Properties |
putTax(double tax)
Set the tax amount (in dollars) for an order associated with an event.
|
Properties |
putTitle(java.lang.String title)
Set the title of the screen.
|
Properties |
putTotal(double total)
Set the total amount (in dollars) for an order associated with an event.
|
Properties |
putUrl(java.lang.String url)
Set a url for the screen.
|
Properties |
putValue(double value)
Set an abstract value to associate with an event.
|
Properties |
putValue(java.lang.String key,
java.lang.Object value)
Helper method to be able to chain put methods.
|
java.lang.String |
referrer() |
double |
revenue() |
double |
shipping() |
java.lang.String |
sku() |
double |
subtotal() |
double |
tax() |
java.lang.String |
title() |
double |
total() |
java.lang.String |
url() |
double |
value() |
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 Properties putValue(java.lang.String key, java.lang.Object value)
ValueMap
public Properties putRevenue(double revenue)
public double revenue()
public Properties putValue(double value)
public double value()
public Properties putCurrency(java.lang.String currency)
putRevenue(double)
.public java.lang.String currency()
public Properties putPath(java.lang.String path)
public java.lang.String path()
public Properties putReferrer(java.lang.String referrer)
public java.lang.String referrer()
public Properties putTitle(java.lang.String title)
public java.lang.String title()
public Properties putUrl(java.lang.String url)
public java.lang.String url()
public Properties putName(java.lang.String name)
public java.lang.String name()
public Properties putCategory(java.lang.String category)
public java.lang.String category()
public Properties putSku(java.lang.String sku)
public java.lang.String sku()
public Properties putPrice(double price)
public double price()
public Properties putProductId(java.lang.String id)
public java.lang.String productId()
public Properties putOrderId(java.lang.String orderId)
public java.lang.String orderId()
public Properties putTotal(double total)
public double total()
public Properties putSubtotal(double subtotal)
@Deprecated public double putSubtotal()
subtotal()
public double subtotal()
public Properties putShipping(double shipping)
public double shipping()
public Properties putTax(double tax)
public double tax()
public Properties putDiscount(double discount)
public double discount()
public Properties putCoupon(java.lang.String coupon)
public java.lang.String coupon()
public Properties putProducts(Properties.Product... products)
public java.util.List<Properties.Product> products(Properties.Product... products)
products()
instead.public java.util.List<Properties.Product> products()
public Properties putRepeatCustomer(boolean repeat)
public boolean isRepeatCustomer()