IsReadyToPayRequest.Builder

public final class IsReadyToPayRequest.Builder extends Object

Builder for creating an IsReadyToPayRequest.

Public Method Summary

IsReadyToPayRequest.Builder
addAllowedCardNetwork(int allowedCardNetwork)
Adds a card network for cards allowed in the purchase.
IsReadyToPayRequest.Builder
addAllowedCardNetworks(Collection<Integer> allowedCardNetworks)
Adds a collection of card networks for cards allowed in the purchase.
IsReadyToPayRequest.Builder
addAllowedPaymentMethod(int allowedPaymentMethod)
Adds an allowed payment method.
IsReadyToPayRequest.Builder
addAllowedPaymentMethods(Collection<Integer> allowedPaymentMethods)
Adds a collection of allowed payment methods.
IsReadyToPayRequest
IsReadyToPayRequest.Builder
setExistingPaymentMethodRequired(boolean existingPaymentMethodRequired)
If set to true, then IsReadyToPay will only return true if the user has an existing payment method that matches the other criteria specified in the IsReadyToPayRequest.

Inherited Method Summary

Public Methods

public IsReadyToPayRequest.Builder addAllowedCardNetwork (int allowedCardNetwork)

Adds a card network for cards allowed in the purchase. See WalletConstants.CardNetwork for available options. If not explicitly set via this or addAllowedCardNetworks(Collection), the default supported networks will be CARD_NETWORK_AMEX, CARD_NETWORK_DISCOVER, CARD_NETWORK_MASTERCARD, and CARD_NETWORK_VISA.

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

Adds a collection of card networks for cards allowed in the purchase. See WalletConstants.CardNetwork for available options. If not explicitly set via this or addAllowedCardNetwork(int), the default supported networks will be CARD_NETWORK_AMEX, CARD_NETWORK_DISCOVER, CARD_NETWORK_MASTERCARD, and CARD_NETWORK_VISA.

public IsReadyToPayRequest.Builder addAllowedPaymentMethod (int allowedPaymentMethod)

Adds an allowed payment method. See WalletConstants.PaymentMethod for available options. If not explicitly set via this or addAllowedPaymentMethods(Collection), then the default allowed payment method will be PAYMENT_METHOD_TOKENIZED_CARD.

public IsReadyToPayRequest.Builder addAllowedPaymentMethods (Collection<Integer> allowedPaymentMethods)

Adds a collection of allowed payment methods. See WalletConstants.PaymentMethod for available options. If not explicitly set via this or addAllowedPaymentMethod(int), then the default allowed payment method will be PAYMENT_METHOD_TOKENIZED_CARD.

public IsReadyToPayRequest build ()

Returns

public IsReadyToPayRequest.Builder setExistingPaymentMethodRequired (boolean existingPaymentMethodRequired)

If set to true, then IsReadyToPay will only return true if the user has an existing payment method that matches the other criteria specified in the IsReadyToPayRequest.

If you set this to true, make sure to call isReadyToPay(GoogleApiClient) as early as possible in your flow as the call may take longer to resolve due to the extra check for an existing payment method.