payrex-python 1.7.7__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.
- {payrex_python-1.7.7 → payrex_python-1.7.9}/PKG-INFO +1 -1
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/__init__.py +3 -0
- payrex_python-1.7.9/payrex/entities/payment_method_entity.py +13 -0
- payrex_python-1.7.9/payrex/entities/setup_intent_entity.py +16 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/customer_service.py +18 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/service_factory.py +1 -0
- payrex_python-1.7.9/payrex/services/setup_intent_service.py +31 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex_python.egg-info/PKG-INFO +1 -1
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex_python.egg-info/SOURCES.txt +3 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/setup.py +1 -1
- {payrex_python-1.7.7 → payrex_python-1.7.9}/LICENSE +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/README.md +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/api_resource.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/client.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/config.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/__init__.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/billing_statement_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/billing_statement_line_item_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/checkout_session_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/customer_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/customer_session_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/deleted_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/event_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/listing_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/payment_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/payment_intent_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/payout_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/payout_transaction_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/refund_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/entities/webhook_entity.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/error.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/exceptions/__init__.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/exceptions/authentication_invalid_exception.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/exceptions/base_exception.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/exceptions/request_invalid_exception.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/exceptions/resource_not_found_exception.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/exceptions/signature_invalid_exception.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/exceptions/value_unexpected_exception.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/http_client.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/__init__.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/base_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/billing_statement_line_item_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/billing_statement_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/checkout_session_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/customer_session_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/payment_intent_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/payment_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/payout_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/refund_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/services/webhook_service.py +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex_python.egg-info/dependency_links.txt +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex_python.egg-info/requires.txt +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/payrex_python.egg-info/top_level.txt +0 -0
- {payrex_python-1.7.7 → payrex_python-1.7.9}/setup.cfg +0 -0
|
@@ -12,6 +12,8 @@ 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
|
|
16
|
+
from payrex.entities.setup_intent_entity import SetupIntentEntity
|
|
15
17
|
from payrex.entities.payout_entity import PayoutEntity
|
|
16
18
|
from payrex.entities.payout_transaction_entity import PayoutTransactionEntity
|
|
17
19
|
from payrex.entities.checkout_session_entity import CheckoutSessionEntity
|
|
@@ -34,6 +36,7 @@ from payrex.services.billing_statement_line_item_service import BillingStatement
|
|
|
34
36
|
from payrex.services.payment_service import PaymentService
|
|
35
37
|
from payrex.services.payout_service import PayoutService
|
|
36
38
|
from payrex.services.payment_intent_service import PaymentIntentService
|
|
39
|
+
from payrex.services.setup_intent_service import SetupIntentService
|
|
37
40
|
from payrex.services.refund_service import RefundService
|
|
38
41
|
from payrex.services.webhook_service import WebhookService
|
|
39
42
|
from payrex.services.service_factory import ServiceFactory
|
|
@@ -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')
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class SetupIntentEntity:
|
|
2
|
+
def __init__(self, api_resource):
|
|
3
|
+
data = api_resource.data
|
|
4
|
+
|
|
5
|
+
self.id = data.get('id')
|
|
6
|
+
self.livemode = data.get('livemode')
|
|
7
|
+
self.client_secret = data.get('client_secret')
|
|
8
|
+
self.next_action = data.get('next_action')
|
|
9
|
+
self.payment_methods = data.get('payment_methods')
|
|
10
|
+
self.return_url = data.get('return_url')
|
|
11
|
+
self.status = data.get('status')
|
|
12
|
+
self.usage = data.get('usage')
|
|
13
|
+
self.customer = data.get('customer')
|
|
14
|
+
self.description = data.get('description')
|
|
15
|
+
self.created_at = data.get('created_at')
|
|
16
|
+
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',
|
|
@@ -7,6 +7,7 @@ from payrex import CustomerService
|
|
|
7
7
|
from payrex import BillingStatementService
|
|
8
8
|
from payrex import BillingStatementLineItemService
|
|
9
9
|
from payrex import PaymentIntentService
|
|
10
|
+
from payrex import SetupIntentService
|
|
10
11
|
from payrex import PaymentService
|
|
11
12
|
from payrex import PayoutService
|
|
12
13
|
from payrex import RefundService
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from payrex import BaseService
|
|
2
|
+
from payrex import SetupIntentEntity
|
|
3
|
+
|
|
4
|
+
class SetupIntentService(BaseService):
|
|
5
|
+
PATH = 'setup_intents'
|
|
6
|
+
|
|
7
|
+
def __init__(self, client):
|
|
8
|
+
BaseService.__init__(self, client)
|
|
9
|
+
|
|
10
|
+
def cancel(self, id):
|
|
11
|
+
return self.request(
|
|
12
|
+
method='post',
|
|
13
|
+
object=SetupIntentEntity,
|
|
14
|
+
path=f'{self.PATH}/{id}/cancel'
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
def create(self, payload):
|
|
18
|
+
return self.request(
|
|
19
|
+
method='post',
|
|
20
|
+
object=SetupIntentEntity,
|
|
21
|
+
path=self.PATH,
|
|
22
|
+
payload=payload
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
def retrieve(self, id):
|
|
26
|
+
return self.request(
|
|
27
|
+
method='get',
|
|
28
|
+
object=SetupIntentEntity,
|
|
29
|
+
path=f'{self.PATH}/{id}',
|
|
30
|
+
payload={}
|
|
31
|
+
)
|
|
@@ -18,9 +18,11 @@ 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
|
|
25
|
+
payrex/entities/setup_intent_entity.py
|
|
24
26
|
payrex/entities/webhook_entity.py
|
|
25
27
|
payrex/exceptions/__init__.py
|
|
26
28
|
payrex/exceptions/authentication_invalid_exception.py
|
|
@@ -41,6 +43,7 @@ payrex/services/payment_service.py
|
|
|
41
43
|
payrex/services/payout_service.py
|
|
42
44
|
payrex/services/refund_service.py
|
|
43
45
|
payrex/services/service_factory.py
|
|
46
|
+
payrex/services/setup_intent_service.py
|
|
44
47
|
payrex/services/webhook_service.py
|
|
45
48
|
payrex_python.egg-info/PKG-INFO
|
|
46
49
|
payrex_python.egg-info/SOURCES.txt
|
|
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.7 → payrex_python-1.7.9}/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
|
{payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/exceptions/authentication_invalid_exception.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{payrex_python-1.7.7 → payrex_python-1.7.9}/payrex/exceptions/resource_not_found_exception.py
RENAMED
|
File without changes
|
{payrex_python-1.7.7 → payrex_python-1.7.9}/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.7 → payrex_python-1.7.9}/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
|