python-amcards 1.3.0__py3-none-any.whl → 1.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- amcards/models.py +9 -0
- {python_amcards-1.3.0.dist-info → python_amcards-1.3.2.dist-info}/METADATA +1 -1
- python_amcards-1.3.2.dist-info/RECORD +10 -0
- python_amcards-1.3.0.dist-info/RECORD +0 -10
- {python_amcards-1.3.0.dist-info → python_amcards-1.3.2.dist-info}/LICENSE +0 -0
- {python_amcards-1.3.0.dist-info → python_amcards-1.3.2.dist-info}/WHEEL +0 -0
- {python_amcards-1.3.0.dist-info → python_amcards-1.3.2.dist-info}/top_level.txt +0 -0
amcards/models.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import ast
|
|
1
2
|
from enum import Enum
|
|
2
3
|
from datetime import datetime
|
|
3
4
|
from typing import List, Optional
|
|
@@ -353,6 +354,7 @@ class Card:
|
|
|
353
354
|
shipping_address: dict,
|
|
354
355
|
return_address: dict,
|
|
355
356
|
gifts: List[Gift],
|
|
357
|
+
extra_data: dict,
|
|
356
358
|
) -> None:
|
|
357
359
|
self._id = id
|
|
358
360
|
self._amount_charged = amount_charged
|
|
@@ -369,6 +371,7 @@ class Card:
|
|
|
369
371
|
self._shipping_address = shipping_address
|
|
370
372
|
self._return_address = return_address
|
|
371
373
|
self._gifts = gifts
|
|
374
|
+
self._extra_data = extra_data
|
|
372
375
|
|
|
373
376
|
__repr__ = helpers.repr
|
|
374
377
|
|
|
@@ -489,6 +492,11 @@ class Card:
|
|
|
489
492
|
"""Gifts attached to this card."""
|
|
490
493
|
return self._gifts
|
|
491
494
|
|
|
495
|
+
@property
|
|
496
|
+
def extra_data(self) -> dict:
|
|
497
|
+
"""Extra data attached to this card."""
|
|
498
|
+
return self._extra_data
|
|
499
|
+
|
|
492
500
|
@classmethod
|
|
493
501
|
def _from_json(cls, json: dict):
|
|
494
502
|
return cls(
|
|
@@ -512,6 +520,7 @@ class Card:
|
|
|
512
520
|
base_cost=gift['price'],
|
|
513
521
|
shipping_and_handling_cost=gift['shipping_and_handling'],
|
|
514
522
|
) for gift in json['gifts']],
|
|
523
|
+
extra_data=ast.literal_eval(json.get('extra_data') or '{}'),
|
|
515
524
|
)
|
|
516
525
|
|
|
517
526
|
class MailingStatus(Enum):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
amcards/__helpers.py,sha256=iQ3L-79XyDBoE8ZsenCac7xii-1LN86Go3w_yu95VaE,5466
|
|
2
|
+
amcards/__init__.py,sha256=nl-oq4BKdYSQZPNbtraEMHFf_8MU8gSOlJZIYxKudcM,34
|
|
3
|
+
amcards/amcards.py,sha256=e_8xSulvtRVT40iOl9mQNWnq0QZnH9WyCYpNaOFpSqs,61560
|
|
4
|
+
amcards/exceptions.py,sha256=wPu5lipT4oTJ2h-NY82jO_AjG68flmbFpcA-0xy0t_w,1978
|
|
5
|
+
amcards/models.py,sha256=ZuO5268HrIdYjhnzrDk1B0tDeMuQ2GekKkonOqttwEI,30973
|
|
6
|
+
python_amcards-1.3.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
7
|
+
python_amcards-1.3.2.dist-info/METADATA,sha256=DYFIFN351smg3g6hyOnUGWDDYn34I16b-OXD3oh6OTo,3077
|
|
8
|
+
python_amcards-1.3.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
9
|
+
python_amcards-1.3.2.dist-info/top_level.txt,sha256=xst-AU0pzvWXz3DQR-QICIruzgcf4Bkt6FF_GldcIck,8
|
|
10
|
+
python_amcards-1.3.2.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
amcards/__helpers.py,sha256=iQ3L-79XyDBoE8ZsenCac7xii-1LN86Go3w_yu95VaE,5466
|
|
2
|
-
amcards/__init__.py,sha256=nl-oq4BKdYSQZPNbtraEMHFf_8MU8gSOlJZIYxKudcM,34
|
|
3
|
-
amcards/amcards.py,sha256=e_8xSulvtRVT40iOl9mQNWnq0QZnH9WyCYpNaOFpSqs,61560
|
|
4
|
-
amcards/exceptions.py,sha256=wPu5lipT4oTJ2h-NY82jO_AjG68flmbFpcA-0xy0t_w,1978
|
|
5
|
-
amcards/models.py,sha256=bwOogJjUH9prg0hUuLkuMtjSpvpClW0L8lUiPEGXjB0,30696
|
|
6
|
-
python_amcards-1.3.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
7
|
-
python_amcards-1.3.0.dist-info/METADATA,sha256=uQ8FPtgUkjRAWsEpyD3OXt25OuM6nGccOmdzrBzFZS4,3077
|
|
8
|
-
python_amcards-1.3.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
9
|
-
python_amcards-1.3.0.dist-info/top_level.txt,sha256=xst-AU0pzvWXz3DQR-QICIruzgcf4Bkt6FF_GldcIck,8
|
|
10
|
-
python_amcards-1.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|