Braintree/src/main/java/com/braintreepayments/api/AmericanExpress.java
public static void getRewardsBalance(final BraintreeFragment fragment, final String nonce,
            final String currencyIsoCode) {
        fragment.waitForConfiguration(new ConfigurationListener() {
            @Override
            public void onConfigurationFetched(Configuration configuration) {
                String getRewardsBalanceUrl = Uri.parse(AMEX_REWARDS_BALANCE_PATH)
                        .buildUpon()
                        .appendQueryParameter("paymentMethodNonce", nonce)
                        .appendQueryParameter("currencyIsoCode", currencyIsoCode)
                        .build()
                        .toString();

                fragment.sendAnalyticsEvent("amex.rewards-balance.start");
                fragment.getHttpClient().get(getRewardsBalanceUrl, new HttpResponseCallback() {
                    @Override
                    public void success(String responseBody) {
                        fragment.sendAnalyticsEvent("amex.rewards-balance.success");
                        try {
                            fragment.postAmericanExpressCallback(AmericanExpressRewardsBalance.fromJson(responseBody));
                        } catch (JSONException e) {
                            fragment.sendAnalyticsEvent("amex.rewards-balance.parse.failed");
                            fragment.postCallback(e);
                        }
                    }

                    @Override
                    public void failure(Exception exception) {
                        fragment.postCallback(exception);
                        fragment.sendAnalyticsEvent("amex.rewards-balance.error");
                    }
                });
            }
        });
    }
public static void getRewardsBalance(final BraintreeFragment fragment, final String nonce,
            final String currencyIsoCode) {
        fragment.waitForConfiguration(new ConfigurationListener() {
            @Override
            public void onConfigurationFetched(Configuration configuration) {
                String getRewardsBalanceUrl = Uri.parse(AMEX_REWARDS_BALANCE_PATH)
                        .buildUpon()
                        .appendQueryParameter("paymentMethodNonce", nonce)
                        .appendQueryParameter("currencyIsoCode", currencyIsoCode)
                        .build()
                        .toString();

                fragment.sendAnalyticsEvent("amex.rewards-balance.start");
                fragment.getHttpClient().get(getRewardsBalanceUrl, new HttpResponseCallback() {
                    @Override
                    public void success(String responseBody) {
                        fragment.sendAnalyticsEvent("amex.rewards-balance.success");
                        try {
                            fragment.postAmericanExpressCallback(AmericanExpressRewardsBalance.fromJson(responseBody));
                        } catch (JSONException e) {
                            fragment.sendAnalyticsEvent("amex.rewards-balance.parse.failed");
                            fragment.postCallback(e);
                        }
                    }

                    @Override
                    public void failure(Exception exception) {
                        fragment.postCallback(exception);
                        fragment.sendAnalyticsEvent("amex.rewards-balance.error");
                    }
                });
            }
        });
    }
public static void getRewardsBalance ( final BraintreeFragment fragment , final String nonce , final String currencyIsoCode ) { fragment . waitForConfiguration ( new ConfigurationListener ( ) { @ Override public void onConfigurationFetched ( Configuration configuration ) { String getRewardsBalanceUrl = Uri . parse ( AMEX_REWARDS_BALANCE_PATH ) . buildUpon ( ) . appendQueryParameter ( "paymentMethodNonce" , nonce ) . appendQueryParameter ( "currencyIsoCode" , currencyIsoCode ) . build ( ) . toString ( ) ; fragment . sendAnalyticsEvent ( "amex.rewards-balance.start" ) ; fragment . getHttpClient ( ) . get ( getRewardsBalanceUrl , new HttpResponseCallback ( ) { @ Override public void success ( String responseBody ) { fragment . sendAnalyticsEvent ( "amex.rewards-balance.success" ) ; try { fragment . postAmericanExpressCallback ( AmericanExpressRewardsBalance . fromJson ( responseBody ) ) ; } catch ( JSONException e ) { fragment . sendAnalyticsEvent ( "amex.rewards-balance.parse.failed" ) ; fragment . postCallback ( e ) ; } } @ Override public void failure ( Exception exception ) { fragment . postCallback ( exception ) ; fragment . sendAnalyticsEvent ( "amex.rewards-balance.error" ) ; } } ) ; } } ) ; }
Gets the rewards balance associated with a Braintree nonce. Only for American Express cards.

@param fragment the {@link BraintreeFragment} This fragment will also be responsible
for handling callbacks to it's listeners
@param nonce A nonce representing a card that will be used to look up the rewards balance
@param currencyIsoCode The currencyIsoCode to use. Example: 'USD'
Gets the rewards balance associated with a Braintree nonce . Only for American Express cards .