danieleades / monzo-lib

monzo API client library, in pure rust
16 stars 4 forks source link

accounts: add business account type #6

Closed obbardc closed 3 years ago

obbardc commented 4 years ago

When calling Client.accounts() with a business account, a decode error is raised: unknown variant "uk_business", expected "uk_retail" or "uk_retail_joint".

So decode the uk_business account type, add extra optional fields associated with business accounts and expand the tests.

Signed-off-by: Christopher Obbard chris@64studio.com

danieleades commented 3 years ago

hi @obbardc! After a hiatus, i'm putting a bit more time into this project. I'd love to merge in your work here. do you mind rebasing on master? That will re-run the latest CI

danieleades commented 3 years ago

i'm going to merge this for now.

Given that the uk account has a field that is always present, and which is never present in the other account types, might create a new pull request to split these into separate types to avoid the Option<business_id> type.