com.google.analytics.tracking.android
Class Item.Builder

java.lang.Object
  extended by com.google.analytics.tracking.android.Item.Builder
Enclosing class:
Item

public static class Item.Builder
extends java.lang.Object

Builder for Item.


Constructor Summary
Item.Builder(java.lang.String productSKU, java.lang.String productName, long itemPriceInMicros, long itemQuantity)
           
 
Method Summary
 Item build()
          Builds an Item with the parameters in this builder.
 Item.Builder setProductCategory(java.lang.String productCategory)
          Sets the productCategory parameter for this builder, which in turn will set the productCategory parameter for the Item created by this builder.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Item.Builder

public Item.Builder(java.lang.String productSKU,
                    java.lang.String productName,
                    long itemPriceInMicros,
                    long itemQuantity)
Parameters:
productSKU - the productSKU which uniquely identifies the Item. The productSKU cannot be null or the empty string.
productName - the productName for an item. The productName cannot be null or the empty string.
itemPriceInMicros - the price of the Item (in micros: 1,000,000 micros/currency unit)
itemQuantity - the quantity purchased
Throws:
java.lang.IllegalArgumentException - if productSKU or productName are null or empty
Method Detail

setProductCategory

public Item.Builder setProductCategory(java.lang.String productCategory)
Sets the productCategory parameter for this builder, which in turn will set the productCategory parameter for the Item created by this builder.

Parameters:
productCategory - the new value for productCategory
Returns:
this

build

public Item build()
Builds an Item with the parameters in this builder.

Returns:
an Item