lib/mangopay/client.rb in mangopay-3.2.0 vs lib/mangopay/client.rb in mangopay-3.3.0

- old
+ new

@@ -45,11 +45,14 @@ # - 'fees': fees wallets # - 'credit': credit wallets # +currency_iso_code+ is currncy ISO code # see https://docs.mangopay.com/api-references/client-wallets/ def fetch_wallet(funds_type, currency_iso_code) - MangoPay.request(:get, url() + "/wallets/#{funds_type}/#{currency_iso_code}") + method = :get + path = url() + "/wallets/#{funds_type}/#{currency_iso_code}" + yield method, path if block_given? + MangoPay.request(method, path) end # Fetch transactions for all your client wallets. # Optional +filters+ hash: see MangoPay::Transaction.fetch # See https://docs.mangopay.com/api-references/client-wallets/ @@ -77,10 +80,13 @@ def create_bank_account(params) MangoPay.request(:post, url() + "/bankaccounts/iban", params) end def create_payout(params) - MangoPay.request(:post, url() + "/payouts", params) + method = :post + path = url() + "/payouts" + yield method, path, params if block_given? + MangoPay.request(method, path, params) end end end end