payrex-python 1.7.8__tar.gz → 1.7.9__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.
Files changed (54) hide show
  1. {payrex_python-1.7.8 → payrex_python-1.7.9}/PKG-INFO +1 -1
  2. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/__init__.py +1 -0
  3. payrex_python-1.7.9/payrex/entities/payment_method_entity.py +13 -0
  4. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/customer_service.py +18 -0
  5. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex_python.egg-info/PKG-INFO +1 -1
  6. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex_python.egg-info/SOURCES.txt +1 -0
  7. {payrex_python-1.7.8 → payrex_python-1.7.9}/setup.py +1 -1
  8. {payrex_python-1.7.8 → payrex_python-1.7.9}/LICENSE +0 -0
  9. {payrex_python-1.7.8 → payrex_python-1.7.9}/README.md +0 -0
  10. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/api_resource.py +0 -0
  11. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/client.py +0 -0
  12. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/config.py +0 -0
  13. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/__init__.py +0 -0
  14. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/billing_statement_entity.py +0 -0
  15. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/billing_statement_line_item_entity.py +0 -0
  16. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/checkout_session_entity.py +0 -0
  17. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/customer_entity.py +0 -0
  18. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/customer_session_entity.py +0 -0
  19. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/deleted_entity.py +0 -0
  20. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/event_entity.py +0 -0
  21. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/listing_entity.py +0 -0
  22. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/payment_entity.py +0 -0
  23. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/payment_intent_entity.py +0 -0
  24. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/payout_entity.py +0 -0
  25. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/payout_transaction_entity.py +0 -0
  26. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/refund_entity.py +0 -0
  27. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/setup_intent_entity.py +0 -0
  28. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/entities/webhook_entity.py +0 -0
  29. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/error.py +0 -0
  30. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/exceptions/__init__.py +0 -0
  31. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/exceptions/authentication_invalid_exception.py +0 -0
  32. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/exceptions/base_exception.py +0 -0
  33. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/exceptions/request_invalid_exception.py +0 -0
  34. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/exceptions/resource_not_found_exception.py +0 -0
  35. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/exceptions/signature_invalid_exception.py +0 -0
  36. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/exceptions/value_unexpected_exception.py +0 -0
  37. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/http_client.py +0 -0
  38. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/__init__.py +0 -0
  39. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/base_service.py +0 -0
  40. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/billing_statement_line_item_service.py +0 -0
  41. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/billing_statement_service.py +0 -0
  42. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/checkout_session_service.py +0 -0
  43. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/customer_session_service.py +0 -0
  44. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/payment_intent_service.py +0 -0
  45. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/payment_service.py +0 -0
  46. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/payout_service.py +0 -0
  47. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/refund_service.py +0 -0
  48. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/service_factory.py +0 -0
  49. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/setup_intent_service.py +0 -0
  50. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex/services/webhook_service.py +0 -0
  51. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex_python.egg-info/dependency_links.txt +0 -0
  52. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex_python.egg-info/requires.txt +0 -0
  53. {payrex_python-1.7.8 → payrex_python-1.7.9}/payrex_python.egg-info/top_level.txt +0 -0
  54. {payrex_python-1.7.8 → payrex_python-1.7.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: payrex-python
3
- Version: 1.7.8
3
+ Version: 1.7.9
4
4
  Summary: PayRex Python Library
5
5
  Home-page: https://github.com/payrexhq/payrex-python
6
6
  Author: PayRex
@@ -12,6 +12,7 @@ from payrex.http_client import HttpClient
12
12
 
13
13
  from payrex.entities.payment_entity import PaymentEntity
14
14
  from payrex.entities.payment_intent_entity import PaymentIntentEntity
15
+ from payrex.entities.payment_method_entity import PaymentMethodEntity
15
16
  from payrex.entities.setup_intent_entity import SetupIntentEntity
16
17
  from payrex.entities.payout_entity import PayoutEntity
17
18
  from payrex.entities.payout_transaction_entity import PayoutTransactionEntity
@@ -0,0 +1,13 @@
1
+ class PaymentMethodEntity:
2
+ def __init__(self, api_resource):
3
+ data = api_resource.data
4
+
5
+ self.id = data.get('id')
6
+ self.type = data.get('type')
7
+ self.details = data.get('details')
8
+ self.billing_details = data.get('billing_details')
9
+ self.livemode = data.get('livemode')
10
+ self.metadata = data.get('metadata')
11
+ self.allow_redisplay = data.get('allow_redisplay')
12
+ self.created_at = data.get('created_at')
13
+ self.updated_at = data.get('updated_at')
@@ -1,5 +1,6 @@
1
1
  from payrex import BaseService
2
2
  from payrex import CustomerEntity
3
+ from payrex import PaymentMethodEntity
3
4
  from payrex import DeletedEntity
4
5
 
5
6
  class CustomerService(BaseService):
@@ -33,6 +34,23 @@ class CustomerService(BaseService):
33
34
  is_list=True
34
35
  )
35
36
 
37
+ def list_payment_methods(self, id, payload = {}):
38
+ return self.request(
39
+ method='get',
40
+ object=PaymentMethodEntity,
41
+ path=f'{self.PATH}/{id}/payment_methods',
42
+ payload=payload,
43
+ is_list=True
44
+ )
45
+
46
+ def delete_payment_method(self, id, payload = {}):
47
+ return self.request(
48
+ method='delete',
49
+ object=DeletedEntity,
50
+ path=f'{self.PATH}/{id}/payment_methods/{payload["payment_method_id"]}',
51
+ payload={}
52
+ )
53
+
36
54
  def update(self, id, payload):
37
55
  return self.request(
38
56
  method='put',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: payrex-python
3
- Version: 1.7.8
3
+ Version: 1.7.9
4
4
  Summary: PayRex Python Library
5
5
  Home-page: https://github.com/payrexhq/payrex-python
6
6
  Author: PayRex
@@ -18,6 +18,7 @@ payrex/entities/event_entity.py
18
18
  payrex/entities/listing_entity.py
19
19
  payrex/entities/payment_entity.py
20
20
  payrex/entities/payment_intent_entity.py
21
+ payrex/entities/payment_method_entity.py
21
22
  payrex/entities/payout_entity.py
22
23
  payrex/entities/payout_transaction_entity.py
23
24
  payrex/entities/refund_entity.py
@@ -3,7 +3,7 @@ from pathlib import Path
3
3
 
4
4
  setup(
5
5
  name='payrex-python',
6
- version='1.7.8',
6
+ version='1.7.9',
7
7
  author='PayRex',
8
8
  author_email='support@payrex.com',
9
9
  description='PayRex Python Library',
File without changes
File without changes
File without changes