Closed taylorbrooks closed 10 years ago
Another thought would be allowing the Debit resource to pass source_uri
as an argument, instead of first having to fetch the instrument.
you can do that,
Debit.new(
:source => 'uri here',
:amount => 100
).save
I believe that should work.
Yep, that worked. Didn't see it documented here: https://docs.balancedpayments.com/1.1/api/debits/
Thanks for bringing it up @taylorbrooks, we've opened an issue to rectify this on the docs repo balanced/balanced-docs#396
@taylorbrooks we've reverted a change to the docs which accidentally caused the issue. Docs should be clearer now! thanks for letting us know.
I'm upgrading to
v1.1
API, one of the nice things about the prior version was being able to callBalanced::Account.debit
and Balanced would figure out the last valid fund instrument and take care of the rest. Now that is not possible.It would be nice to be able to fetch a funding instrument by passing
/cards/:uri
or/bank_accounts/:uri
and have the proper instrument returned vs. having to figure that out in app code.Looks like that may already be a thought because this exists? https://github.com/balanced/balanced-ruby/blob/master/lib/balanced/resources/funding_instrument.rb
Or at least bring something back like,
Balanced::Customer.debit
.