public class GooglePayRequest
extends java.lang.Object
implements android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<GooglePayRequest> |
CREATOR |
| Modifier | Constructor and Description |
|---|---|
|
GooglePayRequest() |
protected |
GooglePayRequest(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
GooglePayRequest |
allowPrepaidCards(boolean allowPrepaidCards)
Optional.
|
GooglePayRequest |
billingAddressFormat(int billingAddressFormat)
Optional.
|
java.lang.String |
billingAddressFormatToString() |
GooglePayRequest |
billingAddressRequired(boolean billingAddressRequired)
Optional.
|
int |
describeContents() |
GooglePayRequest |
emailRequired(boolean emailRequired)
Optional.
|
GooglePayRequest |
environment(java.lang.String environment) |
org.json.JSONArray |
getAllowedAuthMethodsForType(java.lang.String type) |
org.json.JSONArray |
getAllowedCardNetworksForType(java.lang.String type) |
org.json.JSONObject |
getAllowedPaymentMethod(java.lang.String type) |
java.lang.Boolean |
getAllowPrepaidCards() |
java.lang.Integer |
getBillingAddressFormat() |
java.lang.String |
getEnvironment() |
java.lang.String |
getGoogleMerchantId() |
java.lang.String |
getGoogleMerchantName() |
ShippingAddressRequirements |
getShippingAddressRequirements() |
org.json.JSONObject |
getTokenizationSpecificationForType(java.lang.String type) |
TransactionInfo |
getTransactionInfo() |
GooglePayRequest |
googleMerchantId(java.lang.String merchantId) |
GooglePayRequest |
googleMerchantName(java.lang.String merchantName) |
java.lang.Boolean |
isBillingAddressRequired() |
java.lang.Boolean |
isEmailRequired() |
java.lang.Boolean |
isPayPalEnabled() |
java.lang.Boolean |
isPhoneNumberRequired() |
java.lang.Boolean |
isShippingAddressRequired() |
GooglePayRequest |
paypalEnabled(boolean enablePayPal)
Defines if PayPal should be an available payment method in Google Pay.
|
GooglePayRequest |
phoneNumberRequired(boolean phoneNumberRequired)
Optional.
|
GooglePayRequest |
setAllowedAuthMethods(java.lang.String paymentMethodType,
org.json.JSONArray authMethods)
Simple wrapper to configure the GooglePayRequest's allowedAuthMethods
|
GooglePayRequest |
setAllowedCardNetworks(java.lang.String paymentMethodType,
org.json.JSONArray cardNetworks)
Simple wrapper to configure the GooglePayRequest's cardNetworks
|
GooglePayRequest |
setAllowedPaymentMethod(java.lang.String paymentMethodType,
org.json.JSONObject parameters)
Simple wrapper to assign given parameters to specified paymentMethod
|
GooglePayRequest |
setTokenizationSpecificationForType(java.lang.String paymentMethodType,
org.json.JSONObject parameters)
Simple wrapper to configure the GooglePayRequest's tokenizationSpecification
|
GooglePayRequest |
shippingAddressRequired(boolean shippingAddressRequired)
Optional.
|
GooglePayRequest |
shippingAddressRequirements(ShippingAddressRequirements shippingAddressRequirements)
Optional.
|
java.lang.String |
toJson()
Assemble all declared parts of a GooglePayRequest to a JSON string
for use in making requests against Google
|
GooglePayRequest |
transactionInfo(TransactionInfo transactionInfo)
Details and the price of the transaction.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<GooglePayRequest> CREATOR
public GooglePayRequest()
protected GooglePayRequest(android.os.Parcel in)
public GooglePayRequest transactionInfo(TransactionInfo transactionInfo)
transactionInfo - See TransactionInfo.GooglePayRequestpublic GooglePayRequest emailRequired(boolean emailRequired)
emailRequired - true if the buyer's email address is required to be returned, false otherwise.GooglePayRequestpublic GooglePayRequest phoneNumberRequired(boolean phoneNumberRequired)
phoneNumberRequired - true if the buyer's phone number is required to be returned as part of the
billing address and shipping address, false otherwise.GooglePayRequestpublic GooglePayRequest billingAddressRequired(boolean billingAddressRequired)
billingAddressRequired - true if the buyer's billing address is required to be returned,
false otherwise.GooglePayRequestpublic GooglePayRequest billingAddressFormat(int billingAddressFormat)
billingAddressFormat - the billing address format to return. BillingAddressFormatGooglePayRequestpublic GooglePayRequest shippingAddressRequired(boolean shippingAddressRequired)
shippingAddressRequired - true if the buyer's shipping address is required to be returned,
false otherwise.GooglePayRequestpublic GooglePayRequest shippingAddressRequirements(ShippingAddressRequirements shippingAddressRequirements)
shippingAddressRequirements - the shipping address requirements. ShippingAddressRequirementsGooglePayRequestpublic GooglePayRequest allowPrepaidCards(boolean allowPrepaidCards)
allowPrepaidCards - true prepaid cards are allowed, false otherwise.GooglePayRequestpublic GooglePayRequest paypalEnabled(boolean enablePayPal)
true.enablePayPal - true by default. Allows PayPal to be a payment method in Google Pay.GooglePayRequestpublic GooglePayRequest setAllowedPaymentMethod(java.lang.String paymentMethodType, org.json.JSONObject parameters)
paymentMethodType - The paymentMethod to add toparameters - Parameters to assign to the paymentMethodGooglePayRequestpublic GooglePayRequest setTokenizationSpecificationForType(java.lang.String paymentMethodType, org.json.JSONObject parameters)
paymentMethodType - The paymentMethod to attached tokenizationSpecification parameters toparameters - The tokenizationSpecification parameters to attachGooglePayRequestpublic GooglePayRequest setAllowedAuthMethods(java.lang.String paymentMethodType, org.json.JSONArray authMethods)
paymentMethodType - the paymentMethod to attach allowedAuthMethods toauthMethods - the authMethods to allow the paymentMethodType to transact withGooglePayRequestpublic GooglePayRequest setAllowedCardNetworks(java.lang.String paymentMethodType, org.json.JSONArray cardNetworks)
paymentMethodType - the paymentMethod to attach cardNetworks tocardNetworks - the cardNetworks to allow the paymentMethodType to transact withGooglePayRequestpublic GooglePayRequest googleMerchantId(java.lang.String merchantId)
merchantId - The merchant ID that Google Pay has provided.GooglePayRequestpublic GooglePayRequest googleMerchantName(java.lang.String merchantName)
merchantName - The merchant name that will be presented in Google PayGooglePayRequestpublic GooglePayRequest environment(java.lang.String environment)
public java.lang.String toJson()
public java.lang.String billingAddressFormatToString()
public TransactionInfo getTransactionInfo()
public java.lang.Boolean isEmailRequired()
public java.lang.Boolean isPhoneNumberRequired()
public java.lang.Boolean isBillingAddressRequired()
public java.lang.Integer getBillingAddressFormat()
public java.lang.Boolean isShippingAddressRequired()
public ShippingAddressRequirements getShippingAddressRequirements()
public java.lang.Boolean getAllowPrepaidCards()
public java.lang.Boolean isPayPalEnabled()
public org.json.JSONObject getAllowedPaymentMethod(java.lang.String type)
public org.json.JSONObject getTokenizationSpecificationForType(java.lang.String type)
public org.json.JSONArray getAllowedAuthMethodsForType(java.lang.String type)
public org.json.JSONArray getAllowedCardNetworksForType(java.lang.String type)
public java.lang.String getEnvironment()
public java.lang.String getGoogleMerchantId()
public java.lang.String getGoogleMerchantName()
public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable