public static final class Transaction.Builder
extends java.lang.Object
Constructor and Description |
---|
Transaction.Builder(java.lang.String transactionId,
long totalCostInMicros) |
Modifier and Type | Method and Description |
---|---|
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 |
setCurrencyCode(java.lang.String currencyCode)
Sets the currency code 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.
|
public Transaction.Builder(java.lang.String transactionId, long totalCostInMicros)
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 Builderjava.lang.IllegalArgumentException
- if orderId is null or emptypublic Transaction.Builder setAffiliation(java.lang.String affiliation)
affiliation
- the new value for affiliationpublic Transaction.Builder setTotalTaxInMicros(long totalTaxInMicros)
totalTaxInMicros
- the new value for totalTaxInMicros (in micros: 1,000,000
micros/currency unit)public Transaction.Builder setShippingCostInMicros(long shippingCostInMicros)
shippingCostInMicros
- the new value for shippingCost (in micros: 1,000,000 micros
/currency unit)public Transaction.Builder setCurrencyCode(java.lang.String currencyCode)
currencyCode
- the currencyCode (e.g. EUR)public Transaction build()