python-amcards 1.6.0__tar.gz → 1.6.1__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.6.0
3
+ Version: 1.6.1
4
4
  Summary: A wrapper for the AMcards API.
5
5
  Home-page: https://github.com/simonesestili/python-amcards
6
6
  Author: Simone Sestili
@@ -279,6 +279,7 @@ class Campaign:
279
279
  send_if_duplicate: bool,
280
280
  has_anniversary_drip: bool = False,
281
281
  has_birthday_drip: bool = False,
282
+ total_cost: int = 0,
282
283
  ) -> None:
283
284
  self._id = id
284
285
  self._name = name
@@ -286,6 +287,7 @@ class Campaign:
286
287
  self._send_if_duplicate = send_if_duplicate
287
288
  self._has_anniversary_drip = has_anniversary_drip
288
289
  self._has_birthday_drip = has_birthday_drip
290
+ self._total_cost = total_cost
289
291
 
290
292
  __repr__ = helpers.repr
291
293
 
@@ -319,6 +321,11 @@ class Campaign:
319
321
  """True if one of more drips in this campaign are birthday drips. False otherwise."""
320
322
  return self._has_birthday_drip
321
323
 
324
+ @property
325
+ def total_cost(self) -> int:
326
+ """Drip campaign's total cost in `cents`."""
327
+ return self._total_cost
328
+
322
329
  @classmethod
323
330
  def _from_json(cls, json: dict):
324
331
  return cls(
@@ -328,6 +335,7 @@ class Campaign:
328
335
  send_if_duplicate=json['send_even_if_duplicate'],
329
336
  has_anniversary_drip=json['has_anniversary_drip'],
330
337
  has_birthday_drip=json['has_birthday_drip'],
338
+ total_cost=json['campaign_cost'],
331
339
  )
332
340
 
333
341
  class CardStatus(Enum):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amcards
3
- Version: 1.6.0
3
+ Version: 1.6.1
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.6.0',
10
+ version='1.6.1',
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