Method: ActiveMerchant::Billing::PaypalCommonAPI#balance

Defined in:
lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb

#balance(return_all_currencies = false) ⇒ Object

Parameters:

  • :return_all_currencies – Either ‘1’ or ‘0’

    0 – Return only the balance for the primary currency holding.
    1 – Return the balance for each currency holding.
    

245
246
247
248
249
250
251
252
# File 'lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb', line 245

def balance(return_all_currencies = false)
  clean_currency_argument = case return_all_currencies
                            when 1, '1' , true; '1'
                            else
                              '0'
                            end
  commit 'GetBalance', build_get_balance(clean_currency_argument)
end