Closed jordancrawfordnz closed 1 year ago
Hmm - I noticed that this also says balancedAdjustment
in the online API docs - https://api.ynab.com/v1#/
Potentially this is an API issue instead?
Thanks for the report. I'll fix in the server spec and I also have https://github.com/ynab/ynab-sdk-ruby/pull/71 to remove the automatic field validation from the client; the previous versions of this client did not have this validation.
Background
I've got an app which syncs my bank transactions (via browser automation) to my YNAB budget. This morning I upgraded to SDK version 2.0.
I tested the upgrade locally and it worked fine syncing to my test YNAB budget. However on my server, while syncing to my real YNAB budget, I got the following error:
The contents of
fetch_budget
is a simple script to output the result ofbudgets.get_budget_by_id
.Issue
Digging a bit further, I see that the transaction it's trying to present is:
It appears that there's a typo- the API returns
balanceAdjustment
but the validations expectbalancedAdjustment
.Fix
I replaced all references to
balancedAdjustment
in the gem withbalanceAdjustment
and it worked fine. This appears to have been a typo.I don't know how the API client generation stuff works so I haven't created a PR.