public abstract class PaymentMethodBuilder<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
OPERATION_NAME_KEY |
protected static java.lang.String |
OPTIONS_KEY |
| Modifier | Constructor and Description |
|---|---|
|
PaymentMethodBuilder() |
protected |
PaymentMethodBuilder(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
build() |
protected abstract void |
build(org.json.JSONObject base,
org.json.JSONObject paymentMethodNonceJson) |
java.lang.String |
buildGraphQL(android.content.Context context,
Authorization authorization) |
protected abstract void |
buildGraphQL(android.content.Context context,
org.json.JSONObject base,
org.json.JSONObject input) |
abstract java.lang.String |
getApiPath() |
protected java.lang.String |
getDefaultIntegration() |
protected java.lang.String |
getDefaultSource() |
abstract java.lang.String |
getResponsePaymentMethodType() |
T |
integration(java.lang.String integration)
Sets the integration method associated with the
TokenizationClient.tokenize(BraintreeFragment, PaymentMethodBuilder, PaymentMethodNonceCallback)
call for analytics use. |
T |
setSessionId(java.lang.String sessionId) |
T |
source(java.lang.String source)
Sets the source associated with the
TokenizationClient.tokenize(BraintreeFragment, PaymentMethodBuilder, PaymentMethodNonceCallback)
call for analytics use. |
T |
validate(boolean validate) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
protected static final java.lang.String OPTIONS_KEY
protected static final java.lang.String OPERATION_NAME_KEY
public PaymentMethodBuilder()
protected PaymentMethodBuilder(android.os.Parcel in)
public T integration(java.lang.String integration)
TokenizationClient.tokenize(BraintreeFragment, PaymentMethodBuilder, PaymentMethodNonceCallback)
call for analytics use. Defaults to custom and does not need to ever be set.integration - the current integration style.public T source(java.lang.String source)
TokenizationClient.tokenize(BraintreeFragment, PaymentMethodBuilder, PaymentMethodNonceCallback)
call for analytics use. Set automatically.source - the source of the payment method.public T validate(boolean validate)
validate - Flag to denote when the associated PaymentMethodNonce
will be validated. When set to true, the PaymentMethodNonce
will be validated immediately. When false, the PaymentMethodNonce
will be validated when used by a server side library for a Braintree gateway action.public T setSessionId(java.lang.String sessionId)
sessionId - sets the session id associated with this request. The session is a uuid tied to the lifetime of
a BraintreeFragment. This field is automatically set at the point of tokenization, and any previous
values ignored.public java.lang.String build()
PaymentMethodNonce for API use.public java.lang.String buildGraphQL(android.content.Context context,
Authorization authorization)
throws BraintreeException
context - authorization - The current authorization being used.PaymentMethodNonce.BraintreeException - Thrown if resources cannot be accessed.public void writeToParcel(android.os.Parcel dest,
int flags)
protected java.lang.String getDefaultSource()
protected java.lang.String getDefaultIntegration()
protected abstract void build(org.json.JSONObject base,
org.json.JSONObject paymentMethodNonceJson)
throws org.json.JSONException
org.json.JSONExceptionprotected abstract void buildGraphQL(android.content.Context context,
org.json.JSONObject base,
org.json.JSONObject input)
throws BraintreeException,
org.json.JSONException
BraintreeExceptionorg.json.JSONExceptionpublic abstract java.lang.String getApiPath()
public abstract java.lang.String getResponsePaymentMethodType()