-
-
Save mahmoudimus/5406880 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
balanced_bank_uri = "..." # stored when bank account created. this has also been verified. | |
account = Balanced::Marketplace.my_marketplace.create_account | |
account.add_bank_account(balanced_bank_uri) | |
debit = account.debit( appears_on_statement_as: "Test Balanced Debit", amount: 1, description: "This is a test debit in the console!" ) | |
# What do I store in my database, you might be asking? Well! | |
# 1. the account uri => map that to a user on your system | |
# 2. for any transaction coming INTO your system (via debiting bank account / charging a card etc) => store the debit uri with that txn in your system | |
# 3. for any transaction LEAVING your system (via ach credit / depositing to a bank account ) => store the credit uri with that txn in your system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NoMethodError: undefined method `debit' for nil:NilClass | |
from /Users/gbelote/.rvm/gems/ruby-1.9.3-p194@wefunder/bundler/gems/balanced-ruby-3a9c66ae89b2/lib/balanced/resources/bank_account.rb:43:in `debit' | |
from (irb):3 | |
... (snip: more stack trace from "rails c") ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment