asaas-python-sdk 1.2.0__tar.gz → 1.2.1__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.
Files changed (26) hide show
  1. {asaas_python_sdk-1.2.0/src/asaas_python_sdk.egg-info → asaas_python_sdk-1.2.1}/PKG-INFO +1 -1
  2. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/pyproject.toml +1 -1
  3. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/apis/payments.py +26 -0
  4. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1/src/asaas_python_sdk.egg-info}/PKG-INFO +1 -1
  5. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/LICENSE +0 -0
  6. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/README.md +0 -0
  7. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/setup.cfg +0 -0
  8. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/__init__.py +0 -0
  9. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/__init__.py +0 -0
  10. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/api.py +0 -0
  11. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/apis/__init__.py +0 -0
  12. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/apis/accounts.py +0 -0
  13. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/apis/credit_cards.py +0 -0
  14. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/apis/customers.py +0 -0
  15. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/apis/subscriptions.py +0 -0
  16. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/apis/webhooks.py +0 -0
  17. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/dtos/__init__.py +0 -0
  18. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/dtos/account.py +0 -0
  19. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/dtos/credit_card.py +0 -0
  20. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/dtos/customer.py +0 -0
  21. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/dtos/payment.py +0 -0
  22. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/dtos/subscription.py +0 -0
  23. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas/dtos/webhook.py +0 -0
  24. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas_python_sdk.egg-info/SOURCES.txt +0 -0
  25. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas_python_sdk.egg-info/dependency_links.txt +0 -0
  26. {asaas_python_sdk-1.2.0 → asaas_python_sdk-1.2.1}/src/asaas_python_sdk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: asaas-python-sdk
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: Client de comunicaçao c/ API do ASAAS
5
5
  Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "asaas-python-sdk"
7
- version = "1.2.0"
7
+ version = "1.2.1"
8
8
  description = "Client de comunicaçao c/ API do ASAAS"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,9 +1,26 @@
1
1
  import logging, jsonpickle
2
+ from enum import Enum
2
3
  from http import HTTPMethod
3
4
  from fmconsult.utils.url import UrlUtil
4
5
  from asaas.api import AsaasApi
5
6
  from asaas.dtos.payment import Filter
6
7
 
8
+ class Status(Enum):
9
+ PENDING = 'PENDING'
10
+ RECEIVED = 'RECEIVED'
11
+ CONFIRMED = 'CONFIRMED'
12
+ OVERDUE = 'OVERDUE'
13
+ REFUNDED = 'REFUNDED'
14
+ RECEIVED_IN_CASH = 'RECEIVED_IN_CASH'
15
+ REFUND_REQUESTED = 'REFUND_REQUESTED'
16
+ REFUND_IN_PROGRESS = 'REFUND_IN_PROGRESS'
17
+ CHARGEBACK_REQUESTED = 'CHARGEBACK_REQUESTED'
18
+ CHARGEBACK_DISPUTE = 'CHARGEBACK_DISPUTE'
19
+ AWAITING_CHARGEBACK_REVERSAL = 'AWAITING_CHARGEBACK_REVERSAL'
20
+ DUNNING_REQUESTED = 'DUNNING_REQUESTED'
21
+ DUNNING_RECEIVED = 'DUNNING_RECEIVED'
22
+ AWAITING_RISK_ANALYSIS = 'AWAITING_RISK_ANALYSIS'
23
+
7
24
  class Payments(AsaasApi):
8
25
 
9
26
  def __init__(self):
@@ -30,6 +47,15 @@ class Payments(AsaasApi):
30
47
  return jsonpickle.decode(res)
31
48
  except:
32
49
  raise
50
+
51
+ def get_status_by_id(self, payment_id):
52
+ try:
53
+ logging.info(f'get payment by id...')
54
+ req_url = f'{self.endpoint_url}/{payment_id}/status'
55
+ res = self.call_request(HTTPMethod.GET, req_url)
56
+ return jsonpickle.decode(res)
57
+ except:
58
+ raise
33
59
 
34
60
  def get_qrcode_pix(self, payment_id):
35
61
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: asaas-python-sdk
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: Client de comunicaçao c/ API do ASAAS
5
5
  Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
6
  License: MIT License