Skip to content

Commit 9d40f7e

Browse files
committed
fix: hack around missing 'created' fireld for merchants in transactions
see pawelad/pymonzo#28
1 parent fb17e23 commit 9d40f7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

export.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def _get_account_data(self, account_id: str) -> Json:
4141
},
4242
).json()['transactions']
4343
full_transactions = (
44-
self.api.transaction(t['id'], expand_merchant=True)._raw_data
44+
self.api._get_response(method='get', endpoint=f"/transactions/{t['id']}", params={'expand[]': 'merchant'}).json()['transaction']
45+
# NOTE: sadly this doens't work at the momen, see https://github.com/pawelad/pymonzo/issues/28
46+
# self.api.transaction(t['id'], expand_merchant=True)._raw_data
4547
for t in transactions
4648
)
4749
return {

0 commit comments

Comments
 (0)