payrex-python 1.7.8__tar.gz → 1.8.0__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.
- {payrex_python-1.7.8 → payrex_python-1.8.0}/PKG-INFO +1 -1
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/__init__.py +1 -0
- payrex_python-1.8.0/payrex/entities/payment_method_entity.py +13 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/customer_service.py +18 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/payment_intent_service.py +8 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex_python.egg-info/PKG-INFO +1 -1
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex_python.egg-info/SOURCES.txt +1 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/setup.py +1 -1
- {payrex_python-1.7.8 → payrex_python-1.8.0}/LICENSE +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/README.md +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/api_resource.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/client.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/config.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/__init__.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/billing_statement_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/billing_statement_line_item_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/checkout_session_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/customer_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/customer_session_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/deleted_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/event_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/listing_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/payment_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/payment_intent_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/payout_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/payout_transaction_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/refund_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/setup_intent_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/webhook_entity.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/error.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/__init__.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/authentication_invalid_exception.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/base_exception.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/request_invalid_exception.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/resource_not_found_exception.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/signature_invalid_exception.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/value_unexpected_exception.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/http_client.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/__init__.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/base_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/billing_statement_line_item_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/billing_statement_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/checkout_session_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/customer_session_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/payment_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/payout_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/refund_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/service_factory.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/setup_intent_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/webhook_service.py +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex_python.egg-info/dependency_links.txt +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex_python.egg-info/requires.txt +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/payrex_python.egg-info/top_level.txt +0 -0
- {payrex_python-1.7.8 → payrex_python-1.8.0}/setup.cfg +0 -0
|
@@ -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',
|
|
@@ -22,6 +22,14 @@ class PaymentIntentService(BaseService):
|
|
|
22
22
|
payload=payload
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
+
def attach(self, id, payload):
|
|
26
|
+
return self.request(
|
|
27
|
+
method='post',
|
|
28
|
+
object=PaymentIntentEntity,
|
|
29
|
+
path=f'{self.PATH}/{id}/attach',
|
|
30
|
+
payload=payload
|
|
31
|
+
)
|
|
32
|
+
|
|
25
33
|
def update(self, id, payload):
|
|
26
34
|
return self.request(
|
|
27
35
|
method='put',
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/entities/billing_statement_line_item_entity.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/authentication_invalid_exception.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/resource_not_found_exception.py
RENAMED
|
File without changes
|
{payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/exceptions/signature_invalid_exception.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{payrex_python-1.7.8 → payrex_python-1.8.0}/payrex/services/billing_statement_line_item_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|