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

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

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

Builder for Transaction.


Constructor Summary
Transaction.Builder(java.lang.String transactionId, long totalCostInMicros)
           
 
Method Summary
 Transaction build()
          Builds and returns a Transaction with the values set from this Builder.
 Transaction.Builder setAffiliation(java.lang.String affiliation)
          Sets the affiliation parameter for the Transaction this Builder will build.
 Transaction.Builder setShippingCostInMicros(long shippingCostInMicros)
          Sets the shippingCost for the Transaction this Builder will build.
 Transaction.Builder setTotalTaxInMicros(long totalTaxInMicros)
          Sets the totalTax for the Transaction this Builder will build.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transaction.Builder

public Transaction.Builder(java.lang.String transactionId,
                           long totalCostInMicros)
Parameters:
transactionId - the transactionId for the Transaction created by this Builder. transactionId must not be null or the empty string.
totalCostInMicros - the totalCost for the Transaction (in micros: 1,000,000 micros/currency unit)created by this Builder
Throws:
java.lang.IllegalArgumentException - if orderId is null or empty
Method Detail

setAffiliation

public Transaction.Builder setAffiliation(java.lang.String affiliation)
Sets the affiliation parameter for the Transaction this Builder will build.

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

setTotalTaxInMicros

public Transaction.Builder setTotalTaxInMicros(long totalTaxInMicros)
Sets the totalTax for the Transaction this Builder will build.

Parameters:
totalTaxInMicros - the new value for totalTaxInMicros (in micros: 1,000,000 micros/currency unit)
Returns:
this

setShippingCostInMicros

public Transaction.Builder setShippingCostInMicros(long shippingCostInMicros)
Sets the shippingCost for the Transaction this Builder will build.

Parameters:
shippingCostInMicros - the new value for shippingCost (in micros: 1,000,000 micros /currency unit)
Returns:
this

build

public Transaction build()
Builds and returns a Transaction with the values set from this Builder.

Returns:
a Transaction object.