PaymentDataRequest

public final class PaymentDataRequest extends Object
implements Parcelable

Parcelable representing a payment data request, which provides necessary information to support a payment. See the available fields for more information.

Nested Class Summary

class PaymentDataRequest.Builder This class is deprecated. Use the JSON request format instead, see fromJson(String).  

Inherited Constant Summary

Field Summary

public static final Creator<PaymentDataRequest> CREATOR

Public Method Summary

static PaymentDataRequest
fromJson(String paymentDataRequestJson)
Constructs PaymentDataRequest from a JSON object serialized as a string.
ArrayList<Integer>
getAllowedPaymentMethods()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
CardRequirements
getCardRequirements()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
PaymentMethodTokenizationParameters
getPaymentMethodTokenizationParameters()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
ShippingAddressRequirements
getShippingAddressRequirements()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
TransactionInfo
getTransactionInfo()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
boolean
isEmailRequired()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
boolean
isPhoneNumberRequired()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
boolean
isShippingAddressRequired()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
boolean
isUiRequired()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
static PaymentDataRequest.Builder
newBuilder()
This method is deprecated. Use the JSON request format instead, see fromJson(String).
String
toJson()
Returns PaymentDataRequest in JSON format.
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Fields

public static final Creator<PaymentDataRequest> CREATOR

Public Methods

public static PaymentDataRequest fromJson (String paymentDataRequestJson)

Constructs PaymentDataRequest from a JSON object serialized as a string.

To convert back to a JSON object serialized as string use toJson().

Note that you shouldn't rely on the values returned by getters in PaymentDataRequest as they will not be populated with the data set in the given JSON.

For the expected format of this JSON, please see PaymentDataRequest object reference documentation.

public ArrayList<Integer> getAllowedPaymentMethods ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Returns

public CardRequirements getCardRequirements ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Returns
  • card requirements or null if no requirements were specified.

public PaymentMethodTokenizationParameters getPaymentMethodTokenizationParameters ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Returns
  • payment method tokenization parameters

public ShippingAddressRequirements getShippingAddressRequirements ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Returns
  • shipping address requirements or null if no requirements were specified.

public TransactionInfo getTransactionInfo ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Returns
  • detailed transaction info.

public boolean isEmailRequired ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Returns
  • whether the buyer's email is required to be returned.

public boolean isPhoneNumberRequired ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Returns
  • whether the buyer's phone number is required to be returned as part of the billing address and the shipping address.

public boolean isShippingAddressRequired ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Returns
  • whether the buyer's shipping address is required to be returned.

public boolean isUiRequired ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Returns
  • whether UI is required to be shown.

public static PaymentDataRequest.Builder newBuilder ()

This method is deprecated.
Use the JSON request format instead, see fromJson(String).

Builder to create a PaymentDataRequest.

public String toJson ()

Returns PaymentDataRequest in JSON format.

Note that this will be null if this object was not constructed using fromJson(String).

For the expected format of this JSON, please see PaymentDataRequest object reference documentation

public void writeToParcel (Parcel dest, int flags)