python-amcards 1.7.1__tar.gz → 1.7.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amcards
3
- Version: 1.7.1
3
+ Version: 1.7.3
4
4
  Summary: A wrapper for the AMcards API.
5
5
  Home-page: https://github.com/simonesestili/python-amcards
6
6
  Author: Simone Sestili
@@ -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'],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amcards
3
- Version: 1.7.1
3
+ Version: 1.7.3
4
4
  Summary: A wrapper for the AMcards API.
5
5
  Home-page: https://github.com/simonesestili/python-amcards
6
6
  Author: Simone Sestili
@@ -7,7 +7,7 @@ def README():
7
7
 
8
8
  setup(
9
9
  name='python-amcards',
10
- version='1.7.1',
10
+ version='1.7.3',
11
11
  description='A wrapper for the AMcards API.',
12
12
  long_description=README(),
13
13
  long_description_content_type='text/x-rst',
File without changes
File without changes