com.google.analytics.tracking.android
Class Transaction

java.lang.Object
  extended by com.google.analytics.tracking.android.Transaction

public class Transaction
extends java.lang.Object

A simple class to hold the transaction data for transaction hits. Users can create an object of this class using the Builder subclass. To track a transaction, call SessionTracker.trackTransaction.


Nested Class Summary
static class Transaction.Builder
          Builder for Transaction.
 
Method Summary
 void addItem(Item item)
          Add the item in question.
 java.lang.String getAffiliation()
           
 java.util.List<Item> getItems()
          Get the items of this transaction as a list.
 long getShippingCostInMicros()
           
 long getTotalCostInMicros()
           
 long getTotalTaxInMicros()
           
 java.lang.String getTransactionId()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTransactionId

public java.lang.String getTransactionId()

getAffiliation

public java.lang.String getAffiliation()

getTotalCostInMicros

public long getTotalCostInMicros()

getTotalTaxInMicros

public long getTotalTaxInMicros()

getShippingCostInMicros

public long getShippingCostInMicros()

addItem

public void addItem(Item item)
Add the item in question. If an item with the same itemSKU is already present, replace it with this new item.

Parameters:
item - the Item to add

getItems

public java.util.List<Item> getItems()
Get the items of this transaction as a list. If there are no items in this transaction, an empty list will be returned.

Returns:
the list of items in this transaction