asaas-python-sdk 1.3.4__tar.gz → 1.4.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.
- {asaas_python_sdk-1.3.4/src/asaas_python_sdk.egg-info → asaas_python_sdk-1.4.0}/PKG-INFO +1 -1
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/pyproject.toml +1 -1
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/apis/payments.py +14 -1
- asaas_python_sdk-1.4.0/src/asaas/dtos/billing_type.py +7 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/dtos/payment.py +15 -2
- asaas_python_sdk-1.4.0/src/asaas/dtos/split.py +9 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/dtos/subscription.py +2 -12
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0/src/asaas_python_sdk.egg-info}/PKG-INFO +1 -1
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas_python_sdk.egg-info/SOURCES.txt +2 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/LICENSE +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/README.md +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/setup.cfg +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/__init__.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/__init__.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/api.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/apis/__init__.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/apis/accounts.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/apis/credit_cards.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/apis/customers.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/apis/subscriptions.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/apis/webhooks.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/dtos/__init__.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/dtos/account.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/dtos/credit_card.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/dtos/customer.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas/dtos/webhook.py +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas_python_sdk.egg-info/dependency_links.txt +0 -0
- {asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas_python_sdk.egg-info/top_level.txt +0 -0
|
@@ -3,7 +3,7 @@ from enum import Enum
|
|
|
3
3
|
from http import HTTPMethod
|
|
4
4
|
from fmconsult.utils.url import UrlUtil
|
|
5
5
|
from asaas.api import AsaasApi
|
|
6
|
-
from asaas.dtos.payment import Filter
|
|
6
|
+
from asaas.dtos.payment import Payment, Filter
|
|
7
7
|
|
|
8
8
|
class Status(Enum):
|
|
9
9
|
PENDING = 'PENDING'
|
|
@@ -26,6 +26,19 @@ class Payments(AsaasApi):
|
|
|
26
26
|
def __init__(self):
|
|
27
27
|
super().__init__()
|
|
28
28
|
self.endpoint_url = UrlUtil().make_url(self.base_url, ['v3', 'payments'])
|
|
29
|
+
|
|
30
|
+
def create(self, data:Payment):
|
|
31
|
+
try:
|
|
32
|
+
logging.info(f'generating payment...')
|
|
33
|
+
res = self.call_request(
|
|
34
|
+
HTTPMethod.POST,
|
|
35
|
+
self.endpoint_url,
|
|
36
|
+
None,
|
|
37
|
+
payload=data.to_dict()
|
|
38
|
+
)
|
|
39
|
+
return jsonpickle.decode(res)
|
|
40
|
+
except:
|
|
41
|
+
raise
|
|
29
42
|
|
|
30
43
|
def confirmReceiveInCash(self, payment_id, payment_date, value, notify_customer=True):
|
|
31
44
|
try:
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from dataclasses import dataclass, asdict
|
|
2
|
-
from typing import Optional
|
|
2
|
+
from typing import List, Optional
|
|
3
|
+
from .split import Split
|
|
4
|
+
from .billing_type import BillingType
|
|
3
5
|
from fmconsult.utils.object import CustomObject
|
|
4
6
|
|
|
5
7
|
@dataclass
|
|
@@ -40,4 +42,15 @@ class Filter(CustomObject):
|
|
|
40
42
|
data['dueDate[ge]'] = self.dueDate__ge
|
|
41
43
|
data['dueDate[le]'] = self.dueDate__le
|
|
42
44
|
|
|
43
|
-
return data
|
|
45
|
+
return data
|
|
46
|
+
|
|
47
|
+
@dataclass
|
|
48
|
+
class Payment(CustomObject):
|
|
49
|
+
customer:str
|
|
50
|
+
billingType:BillingType
|
|
51
|
+
value:float
|
|
52
|
+
dueDate:str
|
|
53
|
+
description:str
|
|
54
|
+
externalReference:str
|
|
55
|
+
installmentValue:float
|
|
56
|
+
split: Optional[List[Split]] = None
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
2
|
from typing import List, Optional
|
|
3
3
|
from .credit_card import CreditCardInfo, CreditCardHolderInfo
|
|
4
|
+
from .split import Split
|
|
5
|
+
from .billing_type import BillingType
|
|
4
6
|
from fmconsult.utils.object import CustomObject
|
|
5
7
|
from fmconsult.utils.enum import CustomEnum
|
|
6
8
|
|
|
@@ -13,12 +15,6 @@ class CycleTypes(CustomEnum):
|
|
|
13
15
|
SEMIANNUALLY = "SEMIANNUALLY"
|
|
14
16
|
YEARLY = "YEARLY"
|
|
15
17
|
|
|
16
|
-
class BillingType(CustomEnum):
|
|
17
|
-
UNDEFINED = "UNDEFINED"
|
|
18
|
-
BOLETO = "BOLETO"
|
|
19
|
-
CREDIT_CARD = "CREDIT_CARD"
|
|
20
|
-
PIX = "PIX"
|
|
21
|
-
|
|
22
18
|
@dataclass
|
|
23
19
|
class Filter(CustomObject):
|
|
24
20
|
customer:str
|
|
@@ -33,12 +29,6 @@ class Filter(CustomObject):
|
|
|
33
29
|
offset:int
|
|
34
30
|
limit:int
|
|
35
31
|
|
|
36
|
-
@dataclass
|
|
37
|
-
class Split(CustomObject):
|
|
38
|
-
walletId:str
|
|
39
|
-
fixedValue: Optional[float] = None
|
|
40
|
-
percentualValue: Optional[float] = None
|
|
41
|
-
|
|
42
32
|
@dataclass
|
|
43
33
|
class Subscription(CustomObject):
|
|
44
34
|
customer:str
|
|
@@ -13,9 +13,11 @@ src/asaas/apis/subscriptions.py
|
|
|
13
13
|
src/asaas/apis/webhooks.py
|
|
14
14
|
src/asaas/dtos/__init__.py
|
|
15
15
|
src/asaas/dtos/account.py
|
|
16
|
+
src/asaas/dtos/billing_type.py
|
|
16
17
|
src/asaas/dtos/credit_card.py
|
|
17
18
|
src/asaas/dtos/customer.py
|
|
18
19
|
src/asaas/dtos/payment.py
|
|
20
|
+
src/asaas/dtos/split.py
|
|
19
21
|
src/asaas/dtos/subscription.py
|
|
20
22
|
src/asaas/dtos/webhook.py
|
|
21
23
|
src/asaas_python_sdk.egg-info/PKG-INFO
|
|
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.3.4 → asaas_python_sdk-1.4.0}/src/asaas_python_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{asaas_python_sdk-1.3.4 → asaas_python_sdk-1.4.0}/src/asaas_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|