% if mode == 'definition': Balanced::Order.debit_from % elif mode == 'request': require 'balanced' Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX') order = Balanced::Order.fetch('/orders/OR6c6n11zKSFfjE6kGNKtsE8') bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA6m4zboF7ocvKbkhjszP5NS') order.debit_from( :source => bank_account, :amount => 5000 ) % elif mode == 'response': #5000, "appears_on_statement_as"=>"BAL*example.com", "created_at"=>"2014-12-17T21:24:36.080525Z", "currency"=>"USD", "description"=>"Order #12341234", "failure_reason"=>nil, "failure_reason_code"=>nil, "href"=>"/debits/WD6InqCi6JBE8YNoH0co1Wla", "id"=>"WD6InqCi6JBE8YNoH0co1Wla", "links"=> {"card_hold"=>nil, "customer"=>nil, "dispute"=>nil, "order"=>"OR6c6n11zKSFfjE6kGNKtsE8", "source"=>"BA6m4zboF7ocvKbkhjszP5NS"}, "meta"=>{}, "status"=>"pending", "transaction_number"=>"WC7M-IMJ-2SSI", "updated_at"=>"2014-12-17T21:24:36.328328Z"}, @hyperlinks= {"card_hold"=> #, "customer"=> #, "dispute"=> #, "events"=> #, "order"=> #, "refunds"=> #, "source"=> #}> % endif