stackin-python-sdk 0.6.0__py3-none-any.whl → 0.7.0__py3-none-any.whl
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.
- stackin/__init__.py +1 -1
- stackin/core/client.py +12 -2
- {stackin_python_sdk-0.6.0.dist-info → stackin_python_sdk-0.7.0.dist-info}/METADATA +1 -1
- {stackin_python_sdk-0.6.0.dist-info → stackin_python_sdk-0.7.0.dist-info}/RECORD +6 -6
- {stackin_python_sdk-0.6.0.dist-info → stackin_python_sdk-0.7.0.dist-info}/WHEEL +0 -0
- {stackin_python_sdk-0.6.0.dist-info → stackin_python_sdk-0.7.0.dist-info}/licenses/LICENSE +0 -0
stackin/__init__.py
CHANGED
stackin/core/client.py
CHANGED
|
@@ -141,15 +141,25 @@ class Invoice:
|
|
|
141
141
|
*,
|
|
142
142
|
document_type: DocumentType,
|
|
143
143
|
reason: str,
|
|
144
|
+
idempotency_key: str | None = None,
|
|
144
145
|
) -> dict:
|
|
145
|
-
"""Cancels a fiscal document by its access key.
|
|
146
|
+
"""Cancels a fiscal document by its access key.
|
|
147
|
+
|
|
148
|
+
Repeating the same idempotency_key with the same body replays
|
|
149
|
+
the first answer instead of cancelling twice. Cancelling is
|
|
150
|
+
irreversible and has a legal window, so a blind retry on a
|
|
151
|
+
dropped connection is the case this exists for.
|
|
152
|
+
"""
|
|
146
153
|
payload = {
|
|
147
154
|
"document_type": document_type.value,
|
|
148
155
|
"reason": reason,
|
|
149
156
|
}
|
|
150
157
|
|
|
151
158
|
return self._request(
|
|
152
|
-
"POST",
|
|
159
|
+
"POST",
|
|
160
|
+
f"/invoices/{access_key}/cancel",
|
|
161
|
+
json=payload,
|
|
162
|
+
idempotency_key=idempotency_key,
|
|
153
163
|
)
|
|
154
164
|
|
|
155
165
|
def invalidate(
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
stackin/__init__.py,sha256=
|
|
1
|
+
stackin/__init__.py,sha256=H6UgMrf3WYlqUXk_0VEz-7bPZzP0pP_Wysac0hjCC-4,531
|
|
2
2
|
stackin/br/__init__.py,sha256=ktBhaGVPE81n8r5jdIloERq4x9B2AE1k9-1IlzqVhVM,1184
|
|
3
3
|
stackin/br/product.py,sha256=877FGYgVZ8iBIJFecsDRbbnEiKmbMY5WBuVtHoEoia4,4044
|
|
4
4
|
stackin/br/tax.py,sha256=UxcYX-kJw1HxUixB0hRABSgoHqT6CLoEjup4xIRFaYg,54747
|
|
5
5
|
stackin/core/__init__.py,sha256=dxtOP1DopMSNFYGh3Hf12RVcs58R9xwLn-gqfKFo-HE,19
|
|
6
6
|
stackin/core/address.py,sha256=-w5R3nzfU5T3VoxIeygu5Dq4DRb_lJHAGc0lmSMwEMU,616
|
|
7
|
-
stackin/core/client.py,sha256=
|
|
7
|
+
stackin/core/client.py,sha256=G80o4ORwNtazasIlmJBEhyrwG5VgTAsit9MTxK7FcEI,12086
|
|
8
8
|
stackin/core/exceptions.py,sha256=ELn-uL8rwjAFsD1PgM8Zr-1if3Z5yOWU81chUs4k6tU,505
|
|
9
9
|
stackin/core/types.py,sha256=NpfYVN58Ug9fEY7VYeQ2TC1eekoFGHZq_habvrqEeTY,604
|
|
10
|
-
stackin_python_sdk-0.
|
|
11
|
-
stackin_python_sdk-0.
|
|
12
|
-
stackin_python_sdk-0.
|
|
13
|
-
stackin_python_sdk-0.
|
|
10
|
+
stackin_python_sdk-0.7.0.dist-info/METADATA,sha256=I_HPqlrKU-23LUri0s4PjlNg3W2AW-IZBIJBaAxK-qM,11041
|
|
11
|
+
stackin_python_sdk-0.7.0.dist-info/WHEEL,sha256=eY7nduwzv-ldUxpzbRlxwvC693Hg6PX8bWDjEHjZ_dk,88
|
|
12
|
+
stackin_python_sdk-0.7.0.dist-info/licenses/LICENSE,sha256=D-XHDcKFFhzEo9C5Dp4QPvt00pb_u__hi4Bc08zpxyU,1072
|
|
13
|
+
stackin_python_sdk-0.7.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|