This class is deprecated.
Use the JSON request format instead, see
IsReadyToPayRequest.fromJson(String)
.
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 |
build()
Returns the actual
IsReadyToPayRequest
created using the data passed to the Builder object.
|
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
WalletConstants.CARD_NETWORK_AMEX
,
WalletConstants.CARD_NETWORK_DISCOVER
,
WalletConstants.CARD_NETWORK_MASTERCARD
, and
WalletConstants.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
WalletConstants.CARD_NETWORK_AMEX
,
WalletConstants.CARD_NETWORK_DISCOVER
,
WalletConstants.CARD_NETWORK_MASTERCARD
, and
WalletConstants.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
WalletConstants.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
WalletConstants.PAYMENT_METHOD_TOKENIZED_CARD
.
public IsReadyToPayRequest build ()
Returns the actual IsReadyToPayRequest
created using the data passed to the Builder object.
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, call
PaymentsClient.isReadyToPay(IsReadyToPayRequest)
as early in your flow as
possible, since the extra check for a payment method may take longer to resolve the
call.