asaas-python-sdk 1.1.3__tar.gz → 1.1.5__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.1.3/src/asaas_python_sdk.egg-info → asaas_python_sdk-1.1.5}/PKG-INFO +1 -1
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/pyproject.toml +1 -1
- asaas_python_sdk-1.1.5/src/asaas/dtos/webhook.py +36 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5/src/asaas_python_sdk.egg-info}/PKG-INFO +1 -1
- asaas_python_sdk-1.1.3/src/asaas/dtos/webhook.py +0 -19
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/LICENSE +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/README.md +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/setup.cfg +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/__init__.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/__init__.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/api.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/apis/__init__.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/apis/accounts.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/apis/credit_cards.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/apis/customers.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/apis/payments.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/apis/subscriptions.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/apis/webhooks.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/dtos/__init__.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/dtos/account.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/dtos/credit_card.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/dtos/customer.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/dtos/payment.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas/dtos/subscription.py +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas_python_sdk.egg-info/SOURCES.txt +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas_python_sdk.egg-info/dependency_links.txt +0 -0
- {asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas_python_sdk.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from dataclasses import dataclass, asdict, is_dataclass
|
|
2
|
+
from enum import Enum
|
|
3
|
+
from typing import List
|
|
4
|
+
from fmconsult.utils.enum import CustomEnum
|
|
5
|
+
from fmconsult.utils.object import CustomObject
|
|
6
|
+
|
|
7
|
+
class SendType(CustomEnum):
|
|
8
|
+
SEQUENTIALLY = 'SEQUENTIALLY'
|
|
9
|
+
NON_SEQUENTIALLY = 'NON_SEQUENTIALLY'
|
|
10
|
+
|
|
11
|
+
@dataclass
|
|
12
|
+
class Webhook(CustomObject):
|
|
13
|
+
name: str
|
|
14
|
+
url: str
|
|
15
|
+
email: str
|
|
16
|
+
events: List[str]
|
|
17
|
+
enabled: bool = True
|
|
18
|
+
authToken: str = None
|
|
19
|
+
apiVersion: str = "3"
|
|
20
|
+
interrupted: bool = False
|
|
21
|
+
sendType: SendType = SendType.SEQUENTIALLY
|
|
22
|
+
|
|
23
|
+
def to_dict(self):
|
|
24
|
+
def convert_value(value):
|
|
25
|
+
if isinstance(value, Enum):
|
|
26
|
+
return value.value
|
|
27
|
+
elif is_dataclass(value):
|
|
28
|
+
return {k: convert_value(v) for k, v in asdict(value).items()}
|
|
29
|
+
elif isinstance(value, list):
|
|
30
|
+
return [convert_value(v) for v in value]
|
|
31
|
+
elif isinstance(value, dict):
|
|
32
|
+
return {k: convert_value(v) for k, v in value.items()}
|
|
33
|
+
else:
|
|
34
|
+
return value
|
|
35
|
+
|
|
36
|
+
return {k: convert_value(v) for k, v in asdict(self).items()}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
from dataclasses import dataclass
|
|
2
|
-
from fmconsult.utils.enum import CustomEnum
|
|
3
|
-
from fmconsult.utils.object import CustomObject
|
|
4
|
-
|
|
5
|
-
class SendType(CustomEnum):
|
|
6
|
-
SEQUENTIALLY = 'SEQUENTIALLY'
|
|
7
|
-
NON_SEQUENTIALLY = 'NON_SEQUENTIALLY'
|
|
8
|
-
|
|
9
|
-
@dataclass
|
|
10
|
-
class Webhook(CustomObject):
|
|
11
|
-
name: str
|
|
12
|
-
url: str
|
|
13
|
-
email: str
|
|
14
|
-
events: list[str]
|
|
15
|
-
enabled: bool = True
|
|
16
|
-
authToken: str = None
|
|
17
|
-
apiVersion: str = "3"
|
|
18
|
-
interrupted: bool = False
|
|
19
|
-
sendType: SendType = SendType.SEQUENTIALLY
|
|
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.1.3 → asaas_python_sdk-1.1.5}/src/asaas_python_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{asaas_python_sdk-1.1.3 → asaas_python_sdk-1.1.5}/src/asaas_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|