You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an undefined method account when trying to debit a bank account.
From looking through the library, BankAccount#debit forwards to account.debit, but the API doesn't seem to include an account resource in the response, only a customer resource, so the method is never dynamically created.
The card resource, on the other hand, does include both an account and a customer resource, so that works fine.
Chris, is the bank account associated to a customer? If not that will be the issue. This is a bug within the ruby client library. It should use its own debits_uri to create the debit, not the account. We'll get that fixed.
As a work around you should be able to use the following code:
I get an undefined method account when trying to debit a bank account.
From looking through the library, BankAccount#debit forwards to account.debit, but the API doesn't seem to include an account resource in the response, only a customer resource, so the method is never dynamically created.
The card resource, on the other hand, does include both an account and a customer resource, so that works fine.
The docs mirror this as well -
https://docs.balancedpayments.com/current/api.html?language=ruby#retrieve-a-bank-account
https://docs.balancedpayments.com/current/api.html?language=ruby#retrieve-a-card
The text was updated successfully, but these errors were encountered: