Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
fixup! Add type annotations for models
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Claven committed Jan 20, 2022
1 parent 957b09a commit 2c74a93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion duffel_api/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __iter__(self):
while "meta" in response:
after = response["meta"]["after"]
for entry in response["data"]:
yield self._caller(entry)
yield self._caller.from_json(entry)

if after is None:
break
Expand Down
4 changes: 4 additions & 0 deletions tests/fixtures/get-orders.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
],
"id": "ord_00009hthhsUZ8W4LxQgkjo",
"live_mode": false,
"metadata": {
"customer_prefs": "window seat",
"payment_intent_id": "pit_00009htYpSCXrwaB9DnUm2"
},
"owner": {
"iata_code": "BA",
"id": "aln_00001876aqC8c5umZmrRds",
Expand Down

0 comments on commit 2c74a93

Please sign in to comment.