Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-a-credit-for-an-order passes incorrect href #454

Open
rserna2010 opened this issue Sep 17, 2014 · 2 comments
Open

create-a-credit-for-an-order passes incorrect href #454

rserna2010 opened this issue Sep 17, 2014 · 2 comments

Comments

@rserna2010
Copy link
Contributor

should be /bank_accounts/BA3bgtBxC3q4N9QvlN2jqFnL not /bank_accounts/BA3bgtBxC3q4N9QvlN2jqFnL/credits

https://docs.balancedpayments.com/1.1/api/credits/#create-a-credit-for-an-order

@mjallday
Copy link
Contributor

When you create a credit don't you POST to the credits href for the funding instrument? That seems correct to me.

@remear
Copy link
Contributor

remear commented Sep 17, 2014

The cURL example is correct, but the wrong href is used in the other client examples. The fetch is using the credits href when it should be the href of the bank account.

Something like this should take care of the issue:

https://github.com/balanced/balanced-docs/blob/master/clients/rev1/curl/credit_order/metadata.py#L9 should be renamed to bank_account_credits_href and used in https://github.com/balanced/balanced-docs/blob/master/clients/rev1/curl/credit_order/metadata.py#L18. and bank_account_href should be grabbed from bank_accounts['bank_accounts'][0]['href'].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants