wesselt / bunq2ynab

Upload bunq transactions to ynab
Other
72 stars 18 forks source link

Shared accounts not supported? #12

Closed beninhos closed 5 years ago

beninhos commented 5 years ago

Hi Wesselt,

After a while, I wanted to try it again. With success but also with a weird issue arising..

We have one shared account. But that account cannot be found somehow. in comparison to a MonetaryAccountBank, it's is called MonetaryAccountJoint

Is this fixable? Did not notice this before when i tried it a few months ago.

getting BUNQ identifiers... Traceback (most recent call last): File "bunq2ynab.py", line 30, in <module> bunq_account_id = bunq_api.get_account_id(bunq_user_id, args.bunq_account_name) File "/pool/data/app/bunq2ynab/bunq_api.py", line 19, in get_account_id raise Exception("BUNQ account '{0}' not found".format(account_name)) Exception: BUNQ account '-----' not found

wesselt commented 5 years ago

It looks like the reply structure changes for a joint account. I've tried to add support in a branch named "jointaccount". It's hard to test, I don't have a joint account myself. Could you test if it works for you?

https://github.com/wesselt/bunq2ynab/tree/jointaccount

beninhos commented 5 years ago

Thanks. Have to try again this weekend!

ghost commented 5 years ago

Funny, I just created a fork to fix this myself. It works with my joint and savings account, will form a PR.

wesselt commented 5 years ago

@polijo Thanks for the PR, I've merged it. Neat trick with next(iter(mydict)) to find the first key!

It turns out you can do most things with the generic account endpoint "monetary-account". Only a PUT requires the account type, for example to change the callbacks.

wesselt commented 5 years ago

Shared and savings accounts should now work, let me know if you encounter any problem.