public class GooglePaymentRequest
extends java.lang.Object
implements android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<GooglePaymentRequest> |
CREATOR |
| Modifier | Constructor and Description |
|---|---|
|
GooglePaymentRequest() |
protected |
GooglePaymentRequest(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
GooglePaymentRequest |
allowPrepaidCards(boolean allowPrepaidCards)
Optional.
|
GooglePaymentRequest |
billingAddressFormat(int billingAddressFormat)
Optional.
|
java.lang.String |
billingAddressFormatToString() |
GooglePaymentRequest |
billingAddressRequired(boolean billingAddressRequired)
Optional.
|
int |
describeContents() |
GooglePaymentRequest |
emailRequired(boolean emailRequired)
Optional.
|
GooglePaymentRequest |
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() |
GooglePaymentRequest |
googleMerchantId(java.lang.String merchantId) |
GooglePaymentRequest |
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() |
GooglePaymentRequest |
paypalEnabled(boolean enablePayPal)
Defines if PayPal should be an available payment method in Google Pay.
|
GooglePaymentRequest |
phoneNumberRequired(boolean phoneNumberRequired)
Optional.
|
GooglePaymentRequest |
setAllowedAuthMethods(java.lang.String paymentMethodType,
org.json.JSONArray authMethods)
Simple wrapper to configure the GooglePaymentRequest's allowedAuthMethods
|
GooglePaymentRequest |
setAllowedCardNetworks(java.lang.String paymentMethodType,
org.json.JSONArray cardNetworks)
Simple wrapper to configure the GooglePaymentRequest's cardNetworks
|
GooglePaymentRequest |
setAllowedPaymentMethod(java.lang.String paymentMethodType,
org.json.JSONObject parameters)
Simple wrapper to assign given parameters to specified paymentMethod
|
GooglePaymentRequest |
setTokenizationSpecificationForType(java.lang.String paymentMethodType,
org.json.JSONObject parameters)
Simple wrapper to configure the GooglePaymentRequest's tokenizationSpecification
|
GooglePaymentRequest |
shippingAddressRequired(boolean shippingAddressRequired)
Optional.
|
GooglePaymentRequest |
shippingAddressRequirements(ShippingAddressRequirements shippingAddressRequirements)
Optional.
|
java.lang.String |
toJson()
Assemble all declared parts of a GooglePaymentRequest to a JSON string
for use in making requests against Google
|
GooglePaymentRequest |
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<GooglePaymentRequest> CREATOR
public GooglePaymentRequest()
protected GooglePaymentRequest(android.os.Parcel in)
public GooglePaymentRequest transactionInfo(TransactionInfo transactionInfo)
transactionInfo - See TransactionInfo.GooglePaymentRequestpublic GooglePaymentRequest emailRequired(boolean emailRequired)
emailRequired - true if the buyer's email address is required to be returned, false otherwise.GooglePaymentRequestpublic GooglePaymentRequest 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.GooglePaymentRequestpublic GooglePaymentRequest billingAddressRequired(boolean billingAddressRequired)
billingAddressRequired - true if the buyer's billing address is required to be returned,
false otherwise.GooglePaymentRequestpublic GooglePaymentRequest billingAddressFormat(int billingAddressFormat)
billingAddressFormat - the billing address format to return. BillingAddressFormatGooglePaymentRequestpublic GooglePaymentRequest shippingAddressRequired(boolean shippingAddressRequired)
shippingAddressRequired - true if the buyer's shipping address is required to be returned,
false otherwise.GooglePaymentRequestpublic GooglePaymentRequest shippingAddressRequirements(ShippingAddressRequirements shippingAddressRequirements)
shippingAddressRequirements - the shipping address requirements. ShippingAddressRequirementsGooglePaymentRequestpublic GooglePaymentRequest allowPrepaidCards(boolean allowPrepaidCards)
allowPrepaidCards - true prepaid cards are allowed, false otherwise.GooglePaymentRequestpublic GooglePaymentRequest paypalEnabled(boolean enablePayPal)
true.enablePayPal - true by default. Allows PayPal to be a payment method in Google Pay.GooglePaymentRequestpublic GooglePaymentRequest setAllowedPaymentMethod(java.lang.String paymentMethodType, org.json.JSONObject parameters)
paymentMethodType - The paymentMethod to add toparameters - Parameters to assign to the paymentMethodGooglePaymentRequestpublic GooglePaymentRequest setTokenizationSpecificationForType(java.lang.String paymentMethodType, org.json.JSONObject parameters)
paymentMethodType - The paymentMethod to attached tokenizationSpecification parameters toparameters - The tokenizationSpecification parameters to attachGooglePaymentRequestpublic GooglePaymentRequest setAllowedAuthMethods(java.lang.String paymentMethodType, org.json.JSONArray authMethods)
paymentMethodType - the paymentMethod to attach allowedAuthMethods toauthMethods - the authMethods to allow the paymentMethodType to transact withGooglePaymentRequestpublic GooglePaymentRequest setAllowedCardNetworks(java.lang.String paymentMethodType, org.json.JSONArray cardNetworks)
paymentMethodType - the paymentMethod to attach cardNetworks tocardNetworks - the cardNetworks to allow the paymentMethodType to transact withGooglePaymentRequestpublic GooglePaymentRequest googleMerchantId(java.lang.String merchantId)
merchantId - The merchant ID that Google Payment has provided.GooglePaymentRequestpublic GooglePaymentRequest googleMerchantName(java.lang.String merchantName)
merchantName - The merchant name that will be presented in Google Payment.GooglePaymentRequestpublic GooglePaymentRequest 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