python-amcards 1.7.5__tar.gz → 1.7.6__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.5
3
+ Version: 1.7.6
4
4
  Summary: A wrapper for the AMcards API.
5
5
  Home-page: https://github.com/simonesestili/python-amcards
6
6
  Author: Simone Sestili
@@ -28,6 +28,7 @@ class User:
28
28
  international_postage_cost: int,
29
29
  domestic_postage_countries: set,
30
30
  greeting_card_cost: int,
31
+ monthly_report_emails: List[str],
31
32
  ) -> None:
32
33
  self._id = id
33
34
  self._first_name = first_name
@@ -46,6 +47,7 @@ class User:
46
47
  self._international_postage_cost = international_postage_cost
47
48
  self._domestic_postage_countries = domestic_postage_countries
48
49
  self._greeting_card_cost = greeting_card_cost
50
+ self._monthly_report_emails = monthly_report_emails
49
51
 
50
52
  __repr__ = helpers.repr
51
53
 
@@ -135,6 +137,11 @@ class User:
135
137
  """User's base cost of a greeting card excluding postage."""
136
138
  return self._greeting_card_cost
137
139
 
140
+ @property
141
+ def monthly_report_emails(self) -> List[str]:
142
+ """Email addresses that receive monthly reports."""
143
+ return self._monthly_report_emails
144
+
138
145
  @classmethod
139
146
  def _from_json(cls, json: dict):
140
147
  user_id = json['resource_uri']
@@ -157,7 +164,8 @@ class User:
157
164
  domestic_postage_cost=json['postage']['domestic_cost'],
158
165
  international_postage_cost=json['postage']['international_cost'],
159
166
  domestic_postage_countries=set(json['postage']['domestic_countries']),
160
- greeting_card_cost=json['product_pricing_info']['5x7greetingcard']
167
+ greeting_card_cost=json['product_pricing_info']['5x7greetingcard'],
168
+ monthly_report_emails=(json.get('monthly_report_emails') or []),
161
169
  )
162
170
 
163
171
  class Gift:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amcards
3
- Version: 1.7.5
3
+ Version: 1.7.6
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.5',
10
+ version='1.7.6',
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