bunq / sdk_python

Python SDK for bunq API
MIT License
106 stars 25 forks source link

Update bunq_model.py (bunq/sdk_python#145) #157

Open rikvermeer opened 3 years ago

rikvermeer commented 3 years ago

@classmethod BunqModel._from_json_list assumes that the endpoint name is the same as the model name. This does not work for the abstract type NotificationFilterUrl which can be loaded from multiple endpoints (NotificationFilterUrlUser, NotificationFilterUrlMonetaryAccount)

item_unwrapped in "BunqModel._from_json_list" needs to be deserialized to NotificationFilterUrl (wrapper) when cls is NotificationFilterUrlUser or NotificationFilterUrlMonetaryAccount

//: # (Thanks for opening this pull request! Before you proceed please make sure that you have an issue that explains what this pull request will do. Make sure that all your commits link to this issue e.g. "My commit. (bunq/sdk_python#)". If this pull request is changing files that are located in "bunq/sdk/model/generated" then this pull request will be closed as these files must/can only be changed on bunq's side.)

This PR closes/fixes the following issues: