java.lang.Object | |
↳ | com.urbanairship.analytics.RetailEventTemplate |
A class that represents a custom retail event template for the application.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ADDED_TO_CART_EVENT | The added_to_cart event name. | |||||||||
String | BROWSED_PRODUCT_EVENT | The browsed event name. | |||||||||
String | PURCHASED_EVENT | The purchased event name. | |||||||||
String | RETAIL_EVENT_TEMPLATE | The retail event template type. | |||||||||
String | SHARED_PRODUCT_EVENT | The shared_product event name. | |||||||||
String | STARRED_PRODUCT_EVENT | The starred_product event name. | |||||||||
String | WISHLIST_EVENT | The wishlist event name. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CustomEvent |
createEvent()
Creates the custom retail event.
| ||||||||||
static RetailEventTemplate |
newAddedToCartTemplate()
Creates an added to cart event template.
| ||||||||||
static RetailEventTemplate |
newBrowsedTemplate()
Creates a browsed event template.
| ||||||||||
static RetailEventTemplate |
newPurchasedTemplate()
Creates a purchased event template.
| ||||||||||
static RetailEventTemplate |
newSharedProductTemplate(String source, String medium)
Creates a shared product event template.
| ||||||||||
static RetailEventTemplate |
newSharedProductTemplate()
Creates a shared product event template.
| ||||||||||
static RetailEventTemplate |
newStarredProductTemplate()
Creates a starred product event template.
| ||||||||||
static RetailEventTemplate |
newWishlishTemplate(String name, String id)
This method is deprecated.
Use
newWishlistTemplate(String, String) . This method will be removed in a future release.
| ||||||||||
static RetailEventTemplate |
newWishlishTemplate()
This method is deprecated.
Use
newWishlistTemplate() . This method will be removed in a future release.
| ||||||||||
static RetailEventTemplate |
newWishlistTemplate()
Creates a wishlist event template.
| ||||||||||
static RetailEventTemplate |
newWishlistTemplate(String name, String id)
Creates a wishlist event template.
| ||||||||||
RetailEventTemplate |
setBrand(String brand)
Set the brand.
| ||||||||||
RetailEventTemplate |
setCategory(String category)
Set the category.
| ||||||||||
RetailEventTemplate |
setDescription(String description)
Set the description.
| ||||||||||
RetailEventTemplate |
setId(String id)
Set the ID.
| ||||||||||
RetailEventTemplate |
setNewItem(boolean newItem)
Set the newItem value.
| ||||||||||
RetailEventTemplate |
setTransactionId(String transactionId)
Set the transaction ID.
| ||||||||||
RetailEventTemplate |
setValue(double value)
Sets the event value.
| ||||||||||
RetailEventTemplate |
setValue(String value)
Sets the event value.
| ||||||||||
RetailEventTemplate |
setValue(int value)
Sets the event value.
| ||||||||||
RetailEventTemplate |
setValue(BigDecimal value)
Sets the event value.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The added_to_cart event name.
The retail event template type.
The shared_product event name.
The starred_product event name.
Creates an added to cart event template.
Creates a browsed event template.
Creates a purchased event template.
Creates a shared product event template.
source | The source as a string. |
---|---|
medium | The medium as a string. |
Creates a shared product event template.
Creates a starred product event template.
This method is deprecated.
Use newWishlistTemplate(String, String)
. This method will be removed in a future release.
Creates a wishlist event template.
name | The wishlist name. |
---|---|
id | The wishlist ID. |
This method is deprecated.
Use newWishlistTemplate()
. This method will be removed in a future release.
Creates a wishlist event template.
Creates a wishlist event template.
Creates a wishlist event template.
name | The wishlist name. |
---|---|
id | The wishlist ID. |
Set the brand.
brand | The brand as a string. |
---|
Set the category.
category | The category as a string. |
---|
Set the description.
description | The description as a string. |
---|
Set the ID.
id | The ID as a string. |
---|
Set the newItem value.
newItem | A boolean value indicating if the item is new or not. |
---|
Set the transaction ID.
If the transaction ID exceeds 255 characters it will cause the event to be invalid.
transactionId | The event's transaction ID as a string. |
---|
Sets the event value.
The event's value will be accurate 6 digits after the decimal. The number must fall in the range [-2^31, 2^31-1]. Any value outside that range will cause the event to be invalid.
value | The event's value as a double. Must be a number. |
---|
NumberFormatException | if the value is infinity or not a number. |
---|
Sets the event value.
The event's value will be accurate 6 digits after the decimal. The number must fall in the range [-2^31, 2^31-1]. Any value outside that range will cause the event to be invalid.
value | The event's value as a string. Must contain valid string representation of a big decimal. |
---|
NumberFormatException | if the event value does not contain a valid string representation of a big decimal. |
---|
Sets the event value.
The event's value will be accurate 6 digits after the decimal. The number must fall in the range [-2^31, 2^31-1]. Any value outside that range will cause the event to be invalid.
value | The event's value as an int. |
---|
Sets the event value.
The event's value will be accurate 6 digits after the decimal. The number must fall in the range [-2^31, 2^31-1]. Any value outside that range will cause the event to be invalid.
value | The event's value as a BigDecimal. |
---|