-
- All Implemented Interfaces:
public class IsReadyToPayRequestJsonBuilderThis class provides methods to build com.google.android.gms.wallet.IsReadyToPayRequest in JSON format.
-
-
Field Summary
Fields Modifier and Type Field Description private JSONArrayallowedPaymentMethodsprivate BooleanexistingPaymentMethodRequired
-
Method Summary
Modifier and Type Method Description IsReadyToPayRequestJsonBuildersetAllowedPaymentMethods(@NonNull() JSONArray allowedPaymentMethods)Required. IsReadyToPayRequestJsonBuildersetExistingPaymentMethodRequired(boolean existingPaymentMethodRequired)Optional. JSONObjecttoJson()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.
-
-
-
-