asaas-python-sdk 1.4.2__tar.gz → 1.4.3__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.
- {asaas_python_sdk-1.4.2/src/asaas_python_sdk.egg-info → asaas_python_sdk-1.4.3}/PKG-INFO +1 -1
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/pyproject.toml +1 -1
- asaas_python_sdk-1.4.3/src/asaas/apis/webhooks.py +43 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3/src/asaas_python_sdk.egg-info}/PKG-INFO +1 -1
- asaas_python_sdk-1.4.2/src/asaas/apis/webhooks.py +0 -19
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/LICENSE +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/README.md +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/setup.cfg +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/__init__.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/__init__.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/api.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/apis/__init__.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/apis/accounts.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/apis/credit_cards.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/apis/customers.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/apis/payments.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/apis/subscriptions.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/dtos/__init__.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/dtos/account.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/dtos/billing_type.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/dtos/credit_card.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/dtos/customer.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/dtos/payment.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/dtos/split.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/dtos/subscription.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas/dtos/webhook.py +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas_python_sdk.egg-info/SOURCES.txt +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas_python_sdk.egg-info/dependency_links.txt +0 -0
- {asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas_python_sdk.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import logging, jsonpickle
|
|
2
|
+
from http import HTTPMethod
|
|
3
|
+
from fmconsult.utils.url import UrlUtil
|
|
4
|
+
from asaas.api import AsaasApi
|
|
5
|
+
from asaas.dtos.webhook import Webhook
|
|
6
|
+
|
|
7
|
+
class Webhooks(AsaasApi):
|
|
8
|
+
|
|
9
|
+
def __init__(self):
|
|
10
|
+
super().__init__()
|
|
11
|
+
self.endpoint_url = UrlUtil().make_url(self.base_url, ['v3', 'webhooks'])
|
|
12
|
+
|
|
13
|
+
def create(self, data:Webhook):
|
|
14
|
+
try:
|
|
15
|
+
logging.info(f'generating webhook...')
|
|
16
|
+
res = self.call_request(HTTPMethod.POST, self.endpoint_url, None, payload=data.to_dict())
|
|
17
|
+
return jsonpickle.decode(res)
|
|
18
|
+
except:
|
|
19
|
+
raise
|
|
20
|
+
|
|
21
|
+
def get_by_id(self, webhook_id):
|
|
22
|
+
try:
|
|
23
|
+
url = UrlUtil().make_url(self.endpoint_url, [webhook_id])
|
|
24
|
+
res = self.call_request(HTTPMethod.GET, url, None)
|
|
25
|
+
return jsonpickle.decode(res)
|
|
26
|
+
except:
|
|
27
|
+
raise
|
|
28
|
+
|
|
29
|
+
def get_all(self):
|
|
30
|
+
try:
|
|
31
|
+
res = self.call_request(HTTPMethod.GET, self.endpoint_url, None)
|
|
32
|
+
return jsonpickle.decode(res)
|
|
33
|
+
except:
|
|
34
|
+
raise
|
|
35
|
+
|
|
36
|
+
def update(self, webhook_id, data:Webhook):
|
|
37
|
+
try:
|
|
38
|
+
logging.info(f'updating webhook {webhook_id}...')
|
|
39
|
+
url = UrlUtil().make_url(self.endpoint_url, [webhook_id])
|
|
40
|
+
res = self.call_request(HTTPMethod.PUT, url, None, payload=data.to_dict())
|
|
41
|
+
return jsonpickle.decode(res)
|
|
42
|
+
except:
|
|
43
|
+
raise
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import logging, jsonpickle
|
|
2
|
-
from http import HTTPMethod
|
|
3
|
-
from fmconsult.utils.url import UrlUtil
|
|
4
|
-
from asaas.api import AsaasApi
|
|
5
|
-
from asaas.dtos.webhook import Webhook
|
|
6
|
-
|
|
7
|
-
class Webhooks(AsaasApi):
|
|
8
|
-
|
|
9
|
-
def __init__(self):
|
|
10
|
-
super().__init__()
|
|
11
|
-
self.endpoint_url = UrlUtil().make_url(self.base_url, ['v3', 'webhooks'])
|
|
12
|
-
|
|
13
|
-
def create(self, data:Webhook):
|
|
14
|
-
try:
|
|
15
|
-
logging.info(f'generating webhook...')
|
|
16
|
-
res = self.call_request(HTTPMethod.POST, self.endpoint_url, None, payload=data.to_dict())
|
|
17
|
-
return jsonpickle.decode(res)
|
|
18
|
-
except:
|
|
19
|
-
raise
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas_python_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{asaas_python_sdk-1.4.2 → asaas_python_sdk-1.4.3}/src/asaas_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|