% if mode == 'definition': Balanced::BankAccount.debit % elif mode == 'request': require 'balanced' Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp') bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA1W9SQLf5YRaGbUGiNIO2fb') bank_account.debit( :amount => 5000, :appears_on_statement_as => 'Statement text', :description => 'Some descriptive text for the debit in the dashboard' ) % elif mode == 'response': #5000, "appears_on_statement_as"=>"BAL*Statement text", "created_at"=>"2014-05-15T00:39:29.277773Z", "currency"=>"USD", "description"=>"Some descriptive text for the debit in the dashboard", "failure_reason"=>nil, "failure_reason_code"=>nil, "href"=>"/debits/WD2UGQIxoTJkklZqAj2lpR9X", "id"=>"WD2UGQIxoTJkklZqAj2lpR9X", "links"=> {"customer"=>nil, "dispute"=>nil, "order"=>nil, "source"=>"BA1W9SQLf5YRaGbUGiNIO2fb"}, "meta"=>{}, "status"=>"succeeded", "transaction_number"=>"W708-603-3376", "updated_at"=>"2014-05-15T00:39:31.007857Z"}, @hyperlinks= {"customer"=> #, "dispute"=> #, "events"=> #, "order"=> #, "refunds"=> #, "source"=> #}> % endif