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

Invalid Account Types #8

Closed
scottrobertson opened this issue Mar 4, 2018 · 1 comment
Closed

Invalid Account Types #8

scottrobertson opened this issue Mar 4, 2018 · 1 comment

Comments

@scottrobertson
Copy link
Member

scottrobertson commented Mar 4, 2018

Hey

I have an old account with the type of "cash" in my YNAB. When calling the get_accounts method, i get the following error:

ArgumentError: invalid value for 'type', must be one of ["checking", "savings", "creditCard"].

I believe this is coming from this area of the code base.

type_validator = EnumAttributeValidator.new('String', ["checking", "savings", "creditCard"])

Here is the JSON node from the account, if you want to take a look

{
    "id": "a35e190a-d4fb-4079-ae54-343afdc80669",
    "name": "Cash",
    "type": "cash",
    "on_budget": true,
    "closed": true,
    "note": null,
    "balance": 0,
    "cleared_balance": 0,
    "uncleared_balance": 0
},

This is the same for "investmentAccount" and "otherAsset". I assume there will be others too, i just don't have any of those accounts.

@scottrobertson scottrobertson changed the title Cash Account Invalid Account Types Mar 4, 2018
@bradymholt
Copy link
Member

Thanks @scottrobertson . This should be fixed by #9. The update has been released to RubyGems as 0.3.0.

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

2 participants