static void tokenize(final BraintreeFragment fragment, final PaymentMethodBuilder paymentMethodBuilder,
            final PaymentMethodNonceCallback callback) {
        paymentMethodBuilder.setSessionId(fragment.getSessionId());

        fragment.waitForConfiguration(new ConfigurationListener() {
            @Override
            public void onConfigurationFetched(Configuration configuration) {
                if (paymentMethodBuilder instanceof CardBuilder &&
                        configuration.getGraphQL().isFeatureEnabled(Features.TOKENIZE_CREDIT_CARDS)) {
                    tokenizeGraphQL(fragment, (CardBuilder) paymentMethodBuilder, callback);
                } else {
                    tokenizeRest(fragment, paymentMethodBuilder, callback);
                }
            }
        });
    }
static void tokenize(final BraintreeFragment fragment, final PaymentMethodBuilder paymentMethodBuilder,
            final PaymentMethodNonceCallback callback) {
        paymentMethodBuilder.setSessionId(fragment.getSessionId());

        fragment.waitForConfiguration(new ConfigurationListener() {
            @Override
            public void onConfigurationFetched(Configuration configuration) {
                if (paymentMethodBuilder instanceof CardBuilder &&
                        configuration.getGraphQL().isFeatureEnabled(Features.TOKENIZE_CREDIT_CARDS)) {
                    tokenizeGraphQL(fragment, (CardBuilder) paymentMethodBuilder, callback);
                } else {
                    tokenizeRest(fragment, paymentMethodBuilder, callback);
                }
            }
        });
    }
static void tokenize ( final BraintreeFragment fragment , final PaymentMethodBuilder paymentMethodBuilder , final PaymentMethodNonceCallback callback ) { paymentMethodBuilder . setSessionId ( fragment . getSessionId ( ) ) ; fragment . waitForConfiguration ( new ConfigurationListener ( ) { @ Override public void onConfigurationFetched ( Configuration configuration ) { if ( paymentMethodBuilder instanceof CardBuilder && configuration . getGraphQL ( ) . isFeatureEnabled ( Features . TOKENIZE_CREDIT_CARDS ) ) { tokenizeGraphQL ( fragment , ( CardBuilder ) paymentMethodBuilder , callback ) ; } else { tokenizeRest ( fragment , paymentMethodBuilder , callback ) ; } } } ) ; }
Create a {@link PaymentMethodNonce} in the Braintree Gateway.
<p/>
On completion, returns the {@link PaymentMethodNonce} to {@link PaymentMethodNonceCallback}.
<p/>
If creation fails validation, {@link com.braintreepayments.api.interfaces.BraintreeErrorListener#onError(Exception)}
will be called with the resulting {@link ErrorWithResponse}.
<p/>
If an error not due to validation (server error, network issue, etc.) occurs, {@link
com.braintreepayments.api.interfaces.BraintreeErrorListener#onError(Exception)} (Throwable)}
will be called with the {@link Exception} that occurred.

@param paymentMethodBuilder {@link PaymentMethodBuilder} for the {@link PaymentMethodNonce}
to be created.
Create a { @link PaymentMethodNonce } in the Braintree Gateway . <p / > On completion returns the { @link PaymentMethodNonce } to { @link PaymentMethodNonceCallback } . <p / > If creation fails validation { @link com . braintreepayments . api . interfaces . BraintreeErrorListener#onError ( Exception ) } will be called with the resulting { @link ErrorWithResponse } . <p / > If an error not due to validation ( server error network issue etc . ) occurs { @link com . braintreepayments . api . interfaces . BraintreeErrorListener#onError ( Exception ) } ( Throwable ) } will be called with the { @link Exception } that occurred .