java.lang.Object | |
↳ | com.google.android.gms.wallet.CardRequirements.Builder |
Builder to create a CardRequirements
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a card network supported for this purchase.
| |||||||||||
Adds a set of card networks supported for this purchase.
| |||||||||||
Sets whether a prepaid card may be used for this transaction.
| |||||||||||
Sets billing address format.
| |||||||||||
Sets whether a billing address is required from the buyer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Adds a card network supported for this purchase. See WalletConstants.CardNetwork
for
available options.
Allowed card networks must be explicitly set using either this method or addAllowedCardNetworks(Collection)
.
Parameters | |
---|---|
allowedCardNetwork |
int |
Returns | |
---|---|
CardRequirements.Builder |
Adds a set of card networks supported for this purchase. See WalletConstants.CardNetwork
for available options.
Allowed card networks must be explicitly set using either this method or addAllowedCardNetwork(int)
.
Parameters | |
---|---|
allowedCardNetworks |
Collection |
Returns | |
---|---|
CardRequirements.Builder |
Returns | |
---|---|
CardRequirements |
the actual CardRequirements created using the data passed to the Builder
object.
|
Sets whether a prepaid card may be used for this transaction. If omitted, defaults to true
.
Parameters | |
---|---|
allowPrepaidCards |
boolean |
Returns | |
---|---|
CardRequirements.Builder |
Sets billing address format. See WalletConstants.BillingAddressFormat
for more info.
If omitted, defaults to BILLING_ADDRESS_FORMAT_MIN
.
Note that you should only set the format to BILLING_ADDRESS_FORMAT_FULL
when it's required to process the order since it
can increase friction during the checkout process and can lead to a lower conversion rate.
Parameters | |
---|---|
billingAddressFormat |
int |
Returns | |
---|---|
CardRequirements.Builder |
Sets whether a billing address is required from the buyer. The returned billing address can
be retrieved by getBillingAddress()
in getCardInfo()
. If
omitted, defaults to false.
Optionally, when a billing address is required, extra format requirements can be set
through setBillingAddressFormat(int)
.
Parameters | |
---|---|
billingAddressRequired |
boolean |
Returns | |
---|---|
CardRequirements.Builder |