-
- All Implemented Interfaces:
public class IsReadyToPayRequestJsonBuilder
This class provides methods to build com.google.android.gms.wallet.IsReadyToPayRequest in JSON format.
-
-
Field Summary
Fields Modifier and Type Field Description private JSONArray
allowedPaymentMethods
private Boolean
existingPaymentMethodRequired
-
Method Summary
Modifier and Type Method Description IsReadyToPayRequestJsonBuilder
setAllowedPaymentMethods(@NonNull() JSONArray allowedPaymentMethods)
Required. IsReadyToPayRequestJsonBuilder
setExistingPaymentMethodRequired(boolean existingPaymentMethodRequired)
Optional. JSONObject
toJson()
Returns the com.google.android.gms.wallet.IsReadyToPayRequest as JSONObject. -
-
Method Detail
-
setAllowedPaymentMethods
IsReadyToPayRequestJsonBuilder setAllowedPaymentMethods(@NonNull() JSONArray allowedPaymentMethods)
Required. Sets one or more payment methods supported by the Google Pay API. See CardPaymentMethodJsonBuilder.
- Parameters:
allowedPaymentMethods
- The allowed payment methods.
-
setExistingPaymentMethodRequired
IsReadyToPayRequestJsonBuilder setExistingPaymentMethodRequired(boolean existingPaymentMethodRequired)
Optional. Sets existing payment method required.
- Parameters:
existingPaymentMethodRequired
- If set totrue
, then theisReadyToPay()
class method will return true if the current viewer is ready to pay with one or more payment methods specified in allowedPaymentMethods.
-
toJson
@NonNull() JSONObject toJson()
Returns the com.google.android.gms.wallet.IsReadyToPayRequest as JSONObject.
-
-
-
-