python-amcards 1.2.30__py3-none-any.whl → 1.2.31__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/amcards.py CHANGED
@@ -579,7 +579,8 @@ class AMcardsClient:
579
579
  'postal_code': '48075',
580
580
  'country': 'US',
581
581
  'organization': 'Google', # OPTIONAL
582
- 'third_party_contact_id': 'crmid1453131' # OPTIONAL
582
+ 'third_party_contact_id': 'crmid1453131',# OPTIONAL
583
+ 'address_line_2': 'Apt 2' # OPTIONAL
583
584
  }
584
585
 
585
586
  :param Optional[dict] return_address: Dict of return details that will override the client's AMcards user default return details. Here's an example how the dict might look, all of the keys are optional:
@@ -863,7 +864,8 @@ class AMcardsClient:
863
864
  'phone_number': '15556667777', # OPTIONAL
864
865
  'birth_date': '2003-12-25', # OPTIONAL
865
866
  'anniversary_date': '2022-10-31', # OPTIONAL
866
- 'third_party_contact_id': 'crmid1453131' # OPTIONAL
867
+ 'third_party_contact_id': 'crmid1453131',# OPTIONAL
868
+ 'address_line_2': 'Apt 2' # OPTIONAL
867
869
  }
868
870
 
869
871
  :param Optional[dict] return_address: Dict of return details that will override the client's AMcards user default return details. Here's an example how the dict might look, all of the keys are optional:
amcards/models.py CHANGED
@@ -344,6 +344,7 @@ class Card:
344
344
  campaign_id: Optional[int],
345
345
  shipping_address: dict,
346
346
  return_address: dict,
347
+ gifts: List[Gift],
347
348
  ) -> None:
348
349
  self._id = id
349
350
  self._amount_charged = amount_charged
@@ -359,6 +360,7 @@ class Card:
359
360
  self._campaign_id = campaign_id
360
361
  self._shipping_address = shipping_address
361
362
  self._return_address = return_address
363
+ self._gifts = gifts
362
364
 
363
365
  __repr__ = helpers.repr
364
366
 
@@ -474,6 +476,11 @@ class Card:
474
476
  """
475
477
  return self._return_address
476
478
 
479
+ @property
480
+ def gifts(self) -> List[Gift]:
481
+ """Gifts attached to this card."""
482
+ return self._gifts
483
+
477
484
  @classmethod
478
485
  def _from_json(cls, json: dict):
479
486
  return cls(
@@ -491,6 +498,12 @@ class Card:
491
498
  campaign_id=json['campaign_pk'],
492
499
  shipping_address=helpers.parse_shipping_address(json),
493
500
  return_address=helpers.parse_return_address(json),
501
+ gifts=[Gift(
502
+ name=gift['name'],
503
+ thumbnail='',
504
+ base_cost=gift['price'],
505
+ shipping_and_handling_cost=gift['shipping_and_handling'],
506
+ ) for gift in json['gifts']],
494
507
  )
495
508
 
496
509
  class MailingStatus(Enum):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-amcards
3
- Version: 1.2.30
3
+ Version: 1.2.31
4
4
  Summary: A wrapper for the AMcards API.
5
5
  Home-page: https://github.com/simonesestili/python-amcards
6
6
  Author: Simone Sestili
@@ -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=tQNyySFCzenAX2C6nxC2PYjySieGQNFNt8SyCoswmsg,58224
4
+ amcards/exceptions.py,sha256=wPu5lipT4oTJ2h-NY82jO_AjG68flmbFpcA-0xy0t_w,1978
5
+ amcards/models.py,sha256=AZdr_L1uKfFgoDtcSFZE7od9CQdveAuZxXpFHKNQwIg,27723
6
+ python_amcards-1.2.31.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
7
+ python_amcards-1.2.31.dist-info/METADATA,sha256=MFcBZMz-md7OH5juPH-3nCrDbQf9Y3bPpkeHXUUX5oI,3078
8
+ python_amcards-1.2.31.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
9
+ python_amcards-1.2.31.dist-info/top_level.txt,sha256=xst-AU0pzvWXz3DQR-QICIruzgcf4Bkt6FF_GldcIck,8
10
+ python_amcards-1.2.31.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=yuAHFbOc0nGzjneJQz1ztiVrrqQVGPB5Xnyf_19Z-dI,58080
4
- amcards/exceptions.py,sha256=wPu5lipT4oTJ2h-NY82jO_AjG68flmbFpcA-0xy0t_w,1978
5
- amcards/models.py,sha256=wSbqsMCJFtIASxEfev0ScO1Z8QdRTXgyjhWJQyn45bQ,27301
6
- python_amcards-1.2.30.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
7
- python_amcards-1.2.30.dist-info/METADATA,sha256=no6RWjlKFjJUyezLHDfINXsUGVQoXo-FlBiuBF4oLY8,3078
8
- python_amcards-1.2.30.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
9
- python_amcards-1.2.30.dist-info/top_level.txt,sha256=xst-AU0pzvWXz3DQR-QICIruzgcf4Bkt6FF_GldcIck,8
10
- python_amcards-1.2.30.dist-info/RECORD,,