triangle-api 0.1.1__tar.gz → 0.1.2__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.
- {triangle_api-0.1.1 → triangle_api-0.1.2}/PKG-INFO +1 -1
- {triangle_api-0.1.1 → triangle_api-0.1.2}/setup.py +1 -1
- triangle_api-0.1.2/triangle_api/__init__.py +4 -0
- {triangle_api-0.1.1 → triangle_api-0.1.2}/triangle_api/client.py +3 -1
- {triangle_api-0.1.1 → triangle_api-0.1.2}/triangle_api.egg-info/PKG-INFO +1 -1
- triangle_api-0.1.1/triangle_api/__init__.py +0 -4
- {triangle_api-0.1.1 → triangle_api-0.1.2}/README.md +0 -0
- {triangle_api-0.1.1 → triangle_api-0.1.2}/setup.cfg +0 -0
- {triangle_api-0.1.1 → triangle_api-0.1.2}/triangle_api/exceptions.py +0 -0
- {triangle_api-0.1.1 → triangle_api-0.1.2}/triangle_api.egg-info/SOURCES.txt +0 -0
- {triangle_api-0.1.1 → triangle_api-0.1.2}/triangle_api.egg-info/dependency_links.txt +0 -0
- {triangle_api-0.1.1 → triangle_api-0.1.2}/triangle_api.egg-info/requires.txt +0 -0
- {triangle_api-0.1.1 → triangle_api-0.1.2}/triangle_api.egg-info/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="triangle-api", # Nome que aparecerá no PyPI
|
|
8
|
-
version="0.1.
|
|
8
|
+
version="0.1.2",
|
|
9
9
|
author="Diogo Bastos",
|
|
10
10
|
author_email="seu-email@exemplo.com", # Opcional
|
|
11
11
|
description="Unofficial Python wrapper for Canadian Tire Triangle Mastercard API",
|
|
@@ -139,6 +139,7 @@ class TriangleClient:
|
|
|
139
139
|
# MD5 para o Lunch Money
|
|
140
140
|
ext_id = hashlib.md5(identifier.encode("utf-8")).hexdigest()
|
|
141
141
|
|
|
142
|
+
# Certifique-se de que o dicionário normalized tenha a chave 'notes'
|
|
142
143
|
normalized.append({
|
|
143
144
|
"date": t_date,
|
|
144
145
|
"payee": payee,
|
|
@@ -146,7 +147,8 @@ class TriangleClient:
|
|
|
146
147
|
"currency": "cad",
|
|
147
148
|
"external_id": ext_id,
|
|
148
149
|
"type": tx.get("type", "PURCHASE"),
|
|
149
|
-
"status": "cleared" if tx.get("category") in ["POSTED", "STATEMENTED"] else "uncleared"
|
|
150
|
+
"status": "cleared" if tx.get("category") in ["POSTED", "STATEMENTED"] else "uncleared",
|
|
151
|
+
"notes": f"Type: {tx.get('type')} | Imported via Triangle API"
|
|
150
152
|
})
|
|
151
153
|
|
|
152
154
|
# Ordenar garantindo que não existam Nones na chave de ordenação
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|