python-amcards 1.7.1__py3-none-any.whl → 1.7.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 -1
- {python_amcards-1.7.1.dist-info → python_amcards-1.7.2.dist-info}/METADATA +1 -1
- {python_amcards-1.7.1.dist-info → python_amcards-1.7.2.dist-info}/RECORD +6 -6
- {python_amcards-1.7.1.dist-info → python_amcards-1.7.2.dist-info}/WHEEL +0 -0
- {python_amcards-1.7.1.dist-info → python_amcards-1.7.2.dist-info}/licenses/LICENSE +0 -0
- {python_amcards-1.7.1.dist-info → python_amcards-1.7.2.dist-info}/top_level.txt +0 -0
amcards/models.py
CHANGED
|
@@ -361,6 +361,7 @@ class Card:
|
|
|
361
361
|
self,
|
|
362
362
|
id: int,
|
|
363
363
|
amount_charged: int,
|
|
364
|
+
total_amount_charged: int,
|
|
364
365
|
status: CardStatus,
|
|
365
366
|
initiator: str,
|
|
366
367
|
send_date: str,
|
|
@@ -378,6 +379,7 @@ class Card:
|
|
|
378
379
|
) -> None:
|
|
379
380
|
self._id = id
|
|
380
381
|
self._amount_charged = amount_charged
|
|
382
|
+
self._total_amount_charged = total_amount_charged
|
|
381
383
|
self._status = status
|
|
382
384
|
self._initiator = initiator
|
|
383
385
|
self._send_date = send_date
|
|
@@ -402,9 +404,14 @@ class Card:
|
|
|
402
404
|
|
|
403
405
|
@property
|
|
404
406
|
def amount_charged(self) -> int:
|
|
405
|
-
"""Total amount charged to client's user in `cents
|
|
407
|
+
"""Total amount charged to client's user in `cents` not including attached gift prices."""
|
|
406
408
|
return self._amount_charged
|
|
407
409
|
|
|
410
|
+
@property
|
|
411
|
+
def total_amount_charged(self) -> int:
|
|
412
|
+
"""Total amount charged on the card in `cents` including attached gift prices."""
|
|
413
|
+
return self._total_amount_charged
|
|
414
|
+
|
|
408
415
|
@property
|
|
409
416
|
def status(self) -> CardStatus:
|
|
410
417
|
"""Current status of card."""
|
|
@@ -522,6 +529,7 @@ class Card:
|
|
|
522
529
|
return cls(
|
|
523
530
|
id=json['id'],
|
|
524
531
|
amount_charged=int(json['amount_charged'] * 100),
|
|
532
|
+
total_amount_charged=json.get('total_amount_charged_cents', 0),
|
|
525
533
|
status=CardStatus(json['status']),
|
|
526
534
|
initiator=json['initiator'],
|
|
527
535
|
send_date=json['send_date'],
|
|
@@ -2,9 +2,9 @@ amcards/__helpers.py,sha256=X-3dsizpSbJw1K6Gsq87Rf-pELACyWxWXElaz9zkz1c,6407
|
|
|
2
2
|
amcards/__init__.py,sha256=nl-oq4BKdYSQZPNbtraEMHFf_8MU8gSOlJZIYxKudcM,34
|
|
3
3
|
amcards/amcards.py,sha256=t0Y6JYX4VFKu9KYYvDU15A9Ds7fVKaOxPAZ0wCBOmwM,69397
|
|
4
4
|
amcards/exceptions.py,sha256=UpAaepY_zl9NyR3LUBXl8mEi50vyIkih1sWOVRQzxsE,2119
|
|
5
|
-
amcards/models.py,sha256=
|
|
6
|
-
python_amcards-1.7.
|
|
7
|
-
python_amcards-1.7.
|
|
8
|
-
python_amcards-1.7.
|
|
9
|
-
python_amcards-1.7.
|
|
10
|
-
python_amcards-1.7.
|
|
5
|
+
amcards/models.py,sha256=Tfcj7_7UshNcAV6OyBxVyzwpX5G9ViiYLohQqCDmTz4,34212
|
|
6
|
+
python_amcards-1.7.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
7
|
+
python_amcards-1.7.2.dist-info/METADATA,sha256=LGxSfH9MnlDqKaiZi4PngfrGGR8LhelSJWKoL9o0vVY,3270
|
|
8
|
+
python_amcards-1.7.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
python_amcards-1.7.2.dist-info/top_level.txt,sha256=xst-AU0pzvWXz3DQR-QICIruzgcf4Bkt6FF_GldcIck,8
|
|
10
|
+
python_amcards-1.7.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|