Hide

LineItem.Builder

public final class LineItem.Builder extends Object
java.lang.Object
   ↳ com.google.android.gms.wallet.LineItem.Builder

Builder to create a LineItem.

Public Methods

public LineItem build ()

public LineItem.Builder setCurrencyCode (String currencyCode)

Sets the ISO 4217 currency code of the transaction.

public LineItem.Builder setDescription (String description)

Sets the description of the line item.

public LineItem.Builder setQuantity (String quantity)

Sets the number of items purchased. The format of this string follows the regex: [0-9]+(\.[0-9])?

public LineItem.Builder setRole (int role)

Supply the role only to distinguish tax and shipping from regular items. Valid values are defined in LineItem.Role. Defaults to REGULAR, indicating a regular item. Only one TAX entry is permitted.

See Also

public LineItem.Builder setTotalPrice (String totalPrice)

Sets the total price for this line item. The format of this string follows the regex: ^-?[0-9]+(\.[0-9][0-9])?

public LineItem.Builder setUnitPrice (String unitPrice)

Sets the unit price per item. The format of this string follows the regex: ^-?[0-9]+(\.[0-9][0-9])?