Skip to content

Commit b203d16

Browse files
authored
Merge pull request #2 from rikvermeer/rikvermeer-patch-2
Update bunq_model.py
2 parents f1c7f35 + 6bf9d67 commit b203d16

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bunq/sdk/model/core/bunq_model.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ def _unwrap_response_single(cls,
5858
obj: Dict,
5959
wrapper: str = None) -> Dict:
6060
if wrapper is not None:
61-
return obj[cls._FIELD_RESPONSE][cls._INDEX_FIRST][wrapper]
61+
from bunq.sdk.model.generated.endpoint import NotificationFilterUrlUser, NotificationFilterUrlMonetaryAccount
62+
if cls == NotificationFilterUrlUser or cls == NotificationFilterUrlMonetaryAccount:
63+
return obj[cls._FIELD_RESPONSE][cls._INDEX_FIRST]['NotificationFilterUrl']
64+
else:
65+
return obj[cls._FIELD_RESPONSE][cls._INDEX_FIRST][wrapper]
6266

6367
return obj[cls._FIELD_RESPONSE][cls._INDEX_FIRST]
6468

0 commit comments

Comments
 (0)