Hide

MaskedWalletRequest.Builder

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

Builder to create a MaskedWalletRequest.

Public Method Summary

MaskedWalletRequest.Builder
addAllowedCardNetwork(int allowedCardNetwork)
MaskedWalletRequest.Builder
addAllowedCardNetworks(Collection<Integer> allowedCardNetworks)
MaskedWalletRequest.Builder
MaskedWalletRequest.Builder
MaskedWalletRequest
build()
MaskedWalletRequest.Builder
setAllowDebitCard(boolean allowDebitCard)
MaskedWalletRequest.Builder
setAllowPrepaidCard(boolean allowPrepaidCard)
MaskedWalletRequest.Builder
setCart(Cart cart)
MaskedWalletRequest.Builder
setCurrencyCode(String currencyCode)
MaskedWalletRequest.Builder
setEstimatedTotalPrice(String estimatedTotalPrice)
MaskedWalletRequest.Builder
setIsBillingAgreement(boolean isBillingAgreement)
MaskedWalletRequest.Builder
setMerchantName(String merchantName)
MaskedWalletRequest.Builder
setMerchantTransactionId(String merchantTransactionId)
MaskedWalletRequest.Builder
MaskedWalletRequest.Builder
setPhoneNumberRequired(boolean phoneNumberRequired)
MaskedWalletRequest.Builder
setShippingAddressRequired(boolean shippingAddressRequired)
MaskedWalletRequest.Builder
setShouldRetrieveWalletObjects(boolean shouldRetrieveWalletObjects)
MaskedWalletRequest.Builder
setUseMinimalBillingAddress(boolean useMinimalBillingAddress)

Public Methods

public MaskedWalletRequest.Builder addAllowedCardNetwork (int allowedCardNetwork)

Adds card network for cards allowed for the purchase. See WalletConstants.CardNetwork for available options. If not explicitly set user will be able to select any valid instrument available for this purchase in her wallet.

public MaskedWalletRequest.Builder addAllowedCardNetworks (Collection<Integer> allowedCardNetworks)

Adds card network for cards allowed for the purchase. See WalletConstants.CardNetwork for available options. If not explicitly set user will be able to select any valid instrument available for this purchase in her wallet.

public MaskedWalletRequest.Builder addAllowedCountrySpecificationForShipping (CountrySpecification countrySpecification)

Sets an optional set of country specifications that should be allowed for shipping. If omitted or a null / empty array is provided the API will default to using a country specification that only allows shipping in the US.

public MaskedWalletRequest.Builder addAllowedCountrySpecificationsForShipping (Collection<CountrySpecification> countrySpecifications)

public MaskedWalletRequest build ()

public MaskedWalletRequest.Builder setAllowDebitCard (boolean allowDebitCard)

Indicates whether a debit card may be used for this transaction. If omitted, defaults to true.

public MaskedWalletRequest.Builder setAllowPrepaidCard (boolean allowPrepaidCard)

Indicates whether a prepaid card may be used for this transaction. If omitted, defaults to true.

public MaskedWalletRequest.Builder setCart (Cart cart)

Sets an optional shopping cart to use for this purchase. Supplying as much information about your transaction in the cart can help InstantBuy improve the user experience during the payment flow. If you add a shipping or tax line item to this cart, make sure to use a description that informs the user that the line items are estimates (such as "Estimated Shipping").

public MaskedWalletRequest.Builder setCurrencyCode (String currencyCode)

Required field. Sets the ISO 4217 currency code of the transaction.

public MaskedWalletRequest.Builder setEstimatedTotalPrice (String estimatedTotalPrice)

Required field. Sets the total price of the shopping cart. The format of this string follows the regex: [0-9]+(\.[0-9][0-9])?. This information will be used by Google risk and fraud systems to try to lower fraud losses for merchants while maintaining a good user experience. The total price inclusive of tax and shipping currently can not be greater than $1800. Any amounts larger could be declined when authorized. Use your best estimate for tax and shipping when calculating total order price.

public MaskedWalletRequest.Builder setIsBillingAgreement (boolean isBillingAgreement)

Indicates whether this request is for a billing agreement rather than for a one time purchase. If true, estimated total price and cart are inapplicable and should not be set. If omitted, defaults to false.

public MaskedWalletRequest.Builder setMerchantName (String merchantName)

Sets an optional merchant name to be displayed on any UI in the checkout flow. If omitted, the merchant display name configured in the merchant's account settings will be used.

public MaskedWalletRequest.Builder setMerchantTransactionId (String merchantTransactionId)

Sets an optional merchant identifier for the transaction. The value will be echoed back in MaskedWallet and FullWallet, but is not otherwise used by the Wallet API.

public MaskedWalletRequest.Builder setPaymentMethodTokenizationParameters (PaymentMethodTokenizationParameters paymentMethodTokenizationParameters)

Sets payment method tokenization parameters which will be used to tokenize the credit card selected by the user for a transaction and returned with getPaymentMethodToken(). Note: if this parameter is set then corresponding FullWallet will not contain ProxyCard, it will contain PaymentMethodToken for the credit card instead.

public MaskedWalletRequest.Builder setPhoneNumberRequired (boolean phoneNumberRequired)

Indicates whether a phone number is required from the user. Only request the phone number when it's required to process the order since it can increase friction during the purchase flow. If omitted, defaults to false.

public MaskedWalletRequest.Builder setShippingAddressRequired (boolean shippingAddressRequired)

Indicates whether shipping information is required from the user. If omitted, defaults to false.

public MaskedWalletRequest.Builder setShouldRetrieveWalletObjects (boolean shouldRetrieveWalletObjects)

Indicates that relevant Wallet Object information should be returned with the MaskedWallet. Only set this to true if you have also integrated with the Google Wallet Objects API. If omitted, defaults to false.

public MaskedWalletRequest.Builder setUseMinimalBillingAddress (boolean useMinimalBillingAddress)

Indicates that only minimal billing information (name and zip code) is required. This field is mutually exclusive with shipping address required. Use only one or the other. If omitted, defaults to false.