public final class

LineItem.Builder

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

Class Overview

Builder to create a LineItem.

Summary

Public Methods
LineItem build()
LineItem.Builder setCurrencyCode(String currencyCode)
Sets the ISO 4217 currency code of the transaction.
LineItem.Builder setDescription(String description)
Sets the description of the line item.
LineItem.Builder setQuantity(String quantity)
Sets the number of items purchased.
LineItem.Builder setRole(int role)
Supply the role only to distinguish tax and shipping from regular items.
LineItem.Builder setTotalPrice(String totalPrice)
Sets the total price for this line item.
LineItem.Builder setUnitPrice(String unitPrice)
Sets the unit price per item.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public LineItem build ()

Returns
LineItem

public LineItem.Builder setCurrencyCode (String currencyCode)

Sets the ISO 4217 currency code of the transaction.

Parameters
currencyCode String
Returns
LineItem.Builder

public LineItem.Builder setDescription (String description)

Sets the description of the line item.

Parameters
description String
Returns
LineItem.Builder

public LineItem.Builder setQuantity (String quantity)

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

Parameters
quantity String
Returns
LineItem.Builder

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.

Parameters
role int
Returns
LineItem.Builder

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])?

Parameters
totalPrice String
Returns
LineItem.Builder

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])?

Parameters
unitPrice String
Returns
LineItem.Builder