flashpi 0.2.0__tar.gz → 0.2.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.
Files changed (100) hide show
  1. {flashpi-0.2.0 → flashpi-0.2.2}/CHANGELOG.md +16 -0
  2. {flashpi-0.2.0 → flashpi-0.2.2}/PKG-INFO +14 -13
  3. {flashpi-0.2.0 → flashpi-0.2.2}/README.en.md +13 -12
  4. {flashpi-0.2.0 → flashpi-0.2.2}/README.md +13 -12
  5. {flashpi-0.2.0 → flashpi-0.2.2}/openapi/openapi.json +227 -68
  6. {flashpi-0.2.0 → flashpi-0.2.2}/pyproject.toml +1 -1
  7. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_errors.py +2 -1
  8. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_version.py +1 -1
  9. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/resources/issuer_onboardings.py +5 -0
  10. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/resources/issuers.py +4 -2
  11. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/resources/status.py +9 -5
  12. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/resources/webhook_endpoints.py +14 -6
  13. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/types/__init__.py +6 -0
  14. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/types/_generated.py +119 -20
  15. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_02.py +2 -1
  16. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_02.py +2 -1
  17. {flashpi-0.2.0 → flashpi-0.2.2}/tests/live/test_live.py +11 -3
  18. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_resources.py +115 -4
  19. flashpi-0.2.2/tests/test_types.py +238 -0
  20. flashpi-0.2.0/tests/test_types.py +0 -128
  21. {flashpi-0.2.0 → flashpi-0.2.2}/.gitignore +0 -0
  22. {flashpi-0.2.0 → flashpi-0.2.2}/LICENSE +0 -0
  23. {flashpi-0.2.0 → flashpi-0.2.2}/scripts/__init__.py +0 -0
  24. {flashpi-0.2.0 → flashpi-0.2.2}/scripts/installed_check.py +0 -0
  25. {flashpi-0.2.0 → flashpi-0.2.2}/scripts/openapi.py +0 -0
  26. {flashpi-0.2.0 → flashpi-0.2.2}/scripts/package_check.py +0 -0
  27. {flashpi-0.2.0 → flashpi-0.2.2}/scripts/readme.py +0 -0
  28. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/__init__.py +0 -0
  29. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_client.py +0 -0
  30. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_http.py +0 -0
  31. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_network.py +0 -0
  32. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_pagination.py +0 -0
  33. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_resource.py +0 -0
  34. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_response.py +0 -0
  35. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_validate.py +0 -0
  36. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/_webhooks.py +0 -0
  37. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/py.typed +0 -0
  38. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/resources/__init__.py +0 -0
  39. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/resources/documents.py +0 -0
  40. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/resources/events.py +0 -0
  41. {flashpi-0.2.0 → flashpi-0.2.2}/src/flashpi/resources/uploads.py +0 -0
  42. {flashpi-0.2.0 → flashpi-0.2.2}/tests/__init__.py +0 -0
  43. {flashpi-0.2.0 → flashpi-0.2.2}/tests/conftest.py +0 -0
  44. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/_context.py +0 -0
  45. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_01.py +0 -0
  46. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_03.py +0 -0
  47. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_04.py +0 -0
  48. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_05.py +0 -0
  49. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_06.py +0 -0
  50. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_07.py +0 -0
  51. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_08.py +0 -0
  52. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_09.py +0 -0
  53. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_10.py +0 -0
  54. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_11.py +0 -0
  55. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_12.py +0 -0
  56. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_13.py +0 -0
  57. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_14.py +0 -0
  58. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/en_15.py +0 -0
  59. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_01.py +0 -0
  60. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_03.py +0 -0
  61. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_04.py +0 -0
  62. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_05.py +0 -0
  63. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_06.py +0 -0
  64. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_07.py +0 -0
  65. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_08.py +0 -0
  66. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_09.py +0 -0
  67. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_10.py +0 -0
  68. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_11.py +0 -0
  69. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_12.py +0 -0
  70. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_13.py +0 -0
  71. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_14.py +0 -0
  72. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/readme/es_15.py +0 -0
  73. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/typings/django/__init__.pyi +0 -0
  74. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/typings/django/http/__init__.pyi +0 -0
  75. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/typings/django/views/__init__.pyi +0 -0
  76. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/typings/django/views/decorators/__init__.pyi +0 -0
  77. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/typings/django/views/decorators/csrf.pyi +0 -0
  78. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/typings/django/views/decorators/http.pyi +0 -0
  79. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/typings/fastapi/__init__.pyi +0 -0
  80. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/typings/fastapi/responses.pyi +0 -0
  81. {flashpi-0.2.0 → flashpi-0.2.2}/tests/examples/typings/flask/__init__.pyi +0 -0
  82. {flashpi-0.2.0 → flashpi-0.2.2}/tests/live/__init__.py +0 -0
  83. {flashpi-0.2.0 → flashpi-0.2.2}/tests/support.py +0 -0
  84. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_cancellation.py +0 -0
  85. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_client.py +0 -0
  86. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_deadline.py +0 -0
  87. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_errors.py +0 -0
  88. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_headers.py +0 -0
  89. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_http.py +0 -0
  90. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_network.py +0 -0
  91. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_openapi.py +0 -0
  92. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_operations.py +0 -0
  93. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_package_check.py +0 -0
  94. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_pagination.py +0 -0
  95. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_readme.py +0 -0
  96. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_resource_types.py +0 -0
  97. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_retries.py +0 -0
  98. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_review_fixes.py +0 -0
  99. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_version.py +0 -0
  100. {flashpi-0.2.0 → flashpi-0.2.2}/tests/test_webhooks.py +0 -0
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.2](https://github.com/flashpi1/flashpi-python/compare/v0.2.1...v0.2.2) (2026-12-01)
4
+
5
+
6
+ ### Bug fixes
7
+
8
+ * **types:** export SriStatus and SriEnvironmentStatus from flashpi.types ([18824ce](https://github.com/flashpi1/flashpi-python/commit/18824cea08c1683d4270bbb7d45c61790a9daf34))
9
+ * **types:** sync the API contract of 2026-12-01 ([44e373f](https://github.com/flashpi1/flashpi-python/commit/44e373f9107f41cf66e4527281db56aecf963c1d))
10
+
11
+ ## [0.2.1](https://github.com/flashpi1/flashpi-python/compare/v0.2.0...v0.2.1) (2026-11-25)
12
+
13
+
14
+ ### Bug fixes
15
+
16
+ * **types:** export CertificateWarning from flashpi.types ([63663cb](https://github.com/flashpi1/flashpi-python/commit/63663cbb2058c47a1a053234098d6949399c4128))
17
+ * **types:** sync the API contract of 2026-11-24 ([6dc5ee7](https://github.com/flashpi1/flashpi-python/commit/6dc5ee7d1e63a39741782b192bdb86ed933a23b2))
18
+
3
19
  ## [0.2.0](https://github.com/flashpi1/flashpi-python/compare/v0.1.0...v0.2.0) (2026-11-18)
4
20
 
5
21
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: flashpi
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: The official Python SDK for Flashpi, the electronic invoicing API for Ecuador's SRI.
5
5
  Project-URL: Homepage, https://flashpi.com.ec
6
6
  Project-URL: Documentation, https://flashpi.com.ec/docs/sdks/
@@ -127,7 +127,8 @@ from flashpi import AsyncFlashpi
127
127
  async def main() -> None:
128
128
  async with AsyncFlashpi() as flashpi:
129
129
  status = await flashpi.status.get()
130
- print(status["status"])
130
+ # "operational", y el SRI de producción: operational, degraded, outage o unknown
131
+ print(status["status"], status["sri"]["production"]["status"])
131
132
 
132
133
  async for document in flashpi.documents.list({"status": "authorized"}):
133
134
  print(document["accessKey"])
@@ -209,17 +210,17 @@ except APIError as error:
209
210
  raise
210
211
  ```
211
212
 
212
- | Clase | Estado | Ejemplos de `code` |
213
- | -------------------------- | ------ | ----------------------------------------------------------- |
214
- | `BadRequestError` | 400 | `malformed_json`, `invalid_idempotency_key` |
215
- | `AuthenticationError` | 401 | `authentication_required`, `invalid_api_key` |
216
- | `PermissionDeniedError` | 403 | `key_read_only`, `key_scope_mismatch`, `ip_not_allowed` |
217
- | `NotFoundError` | 404 | `not_found` |
218
- | `ConflictError` | 409 | `sequential_already_used`, `ride_not_available` |
219
- | `UnprocessableEntityError` | 422 | `validation_failed`, `total_mismatch` |
220
- | `RateLimitError` | 429 | `demo_issuer_quota_exceeded`, `account_email_limit_reached` |
221
- | `InternalServerError` | 5xx | `internal_error` |
222
- | `APIConnectionError` | — | sin respuesta (red); `APITimeoutError` si se agotó el plazo |
213
+ | Clase | Estado | Ejemplos de `code` |
214
+ | -------------------------- | ------ | --------------------------------------------------------------------------------- |
215
+ | `BadRequestError` | 400 | `malformed_json`, `invalid_idempotency_key` |
216
+ | `AuthenticationError` | 401 | `authentication_required`, `invalid_api_key` |
217
+ | `PermissionDeniedError` | 403 | `key_read_only`, `key_scope_mismatch`, `ip_not_allowed`, `live_key_required` |
218
+ | `NotFoundError` | 404 | `not_found` |
219
+ | `ConflictError` | 409 | `sequential_already_used`, `ride_not_available`, `webhook_endpoint_limit_reached` |
220
+ | `UnprocessableEntityError` | 422 | `validation_failed`, `total_mismatch` |
221
+ | `RateLimitError` | 429 | `demo_issuer_quota_exceeded`, `account_email_limit_reached` |
222
+ | `InternalServerError` | 5xx | `internal_error` |
223
+ | `APIConnectionError` | — | sin respuesta (red); `APITimeoutError` si se agotó el plazo |
223
224
 
224
225
  Todas derivan de `FlashpiError`. Algunos errores traen datos extra en `error.problem`, por
225
226
  ejemplo `documentId`, `limit`, `resetsAt` o `rideStatus`. Para recibir los mensajes en español:
@@ -94,7 +94,8 @@ from flashpi import AsyncFlashpi
94
94
  async def main() -> None:
95
95
  async with AsyncFlashpi() as flashpi:
96
96
  status = await flashpi.status.get()
97
- print(status["status"])
97
+ # "operational", and the production SRI: operational, degraded, outage or unknown
98
+ print(status["status"], status["sri"]["production"]["status"])
98
99
 
99
100
  async for document in flashpi.documents.list({"status": "authorized"}):
100
101
  print(document["accessKey"])
@@ -175,17 +176,17 @@ except APIError as error:
175
176
  raise
176
177
  ```
177
178
 
178
- | Class | Status | Example `code`s |
179
- | -------------------------- | ------ | ----------------------------------------------------------- |
180
- | `BadRequestError` | 400 | `malformed_json`, `invalid_idempotency_key` |
181
- | `AuthenticationError` | 401 | `authentication_required`, `invalid_api_key` |
182
- | `PermissionDeniedError` | 403 | `key_read_only`, `key_scope_mismatch`, `ip_not_allowed` |
183
- | `NotFoundError` | 404 | `not_found` |
184
- | `ConflictError` | 409 | `sequential_already_used`, `ride_not_available` |
185
- | `UnprocessableEntityError` | 422 | `validation_failed`, `total_mismatch` |
186
- | `RateLimitError` | 429 | `demo_issuer_quota_exceeded`, `account_email_limit_reached` |
187
- | `InternalServerError` | 5xx | `internal_error` |
188
- | `APIConnectionError` | — | no answer (network); `APITimeoutError` when it timed out |
179
+ | Class | Status | Example `code`s |
180
+ | -------------------------- | ------ | --------------------------------------------------------------------------------- |
181
+ | `BadRequestError` | 400 | `malformed_json`, `invalid_idempotency_key` |
182
+ | `AuthenticationError` | 401 | `authentication_required`, `invalid_api_key` |
183
+ | `PermissionDeniedError` | 403 | `key_read_only`, `key_scope_mismatch`, `ip_not_allowed`, `live_key_required` |
184
+ | `NotFoundError` | 404 | `not_found` |
185
+ | `ConflictError` | 409 | `sequential_already_used`, `ride_not_available`, `webhook_endpoint_limit_reached` |
186
+ | `UnprocessableEntityError` | 422 | `validation_failed`, `total_mismatch` |
187
+ | `RateLimitError` | 429 | `demo_issuer_quota_exceeded`, `account_email_limit_reached` |
188
+ | `InternalServerError` | 5xx | `internal_error` |
189
+ | `APIConnectionError` | — | no answer (network); `APITimeoutError` when it timed out |
189
190
 
190
191
  All of them derive from `FlashpiError`. Some errors carry extra members in `error.problem`, such
191
192
  as `documentId`, `limit`, `resetsAt` or `rideStatus`. For Spanish messages:
@@ -96,7 +96,8 @@ from flashpi import AsyncFlashpi
96
96
  async def main() -> None:
97
97
  async with AsyncFlashpi() as flashpi:
98
98
  status = await flashpi.status.get()
99
- print(status["status"])
99
+ # "operational", y el SRI de producción: operational, degraded, outage o unknown
100
+ print(status["status"], status["sri"]["production"]["status"])
100
101
 
101
102
  async for document in flashpi.documents.list({"status": "authorized"}):
102
103
  print(document["accessKey"])
@@ -178,17 +179,17 @@ except APIError as error:
178
179
  raise
179
180
  ```
180
181
 
181
- | Clase | Estado | Ejemplos de `code` |
182
- | -------------------------- | ------ | ----------------------------------------------------------- |
183
- | `BadRequestError` | 400 | `malformed_json`, `invalid_idempotency_key` |
184
- | `AuthenticationError` | 401 | `authentication_required`, `invalid_api_key` |
185
- | `PermissionDeniedError` | 403 | `key_read_only`, `key_scope_mismatch`, `ip_not_allowed` |
186
- | `NotFoundError` | 404 | `not_found` |
187
- | `ConflictError` | 409 | `sequential_already_used`, `ride_not_available` |
188
- | `UnprocessableEntityError` | 422 | `validation_failed`, `total_mismatch` |
189
- | `RateLimitError` | 429 | `demo_issuer_quota_exceeded`, `account_email_limit_reached` |
190
- | `InternalServerError` | 5xx | `internal_error` |
191
- | `APIConnectionError` | — | sin respuesta (red); `APITimeoutError` si se agotó el plazo |
182
+ | Clase | Estado | Ejemplos de `code` |
183
+ | -------------------------- | ------ | --------------------------------------------------------------------------------- |
184
+ | `BadRequestError` | 400 | `malformed_json`, `invalid_idempotency_key` |
185
+ | `AuthenticationError` | 401 | `authentication_required`, `invalid_api_key` |
186
+ | `PermissionDeniedError` | 403 | `key_read_only`, `key_scope_mismatch`, `ip_not_allowed`, `live_key_required` |
187
+ | `NotFoundError` | 404 | `not_found` |
188
+ | `ConflictError` | 409 | `sequential_already_used`, `ride_not_available`, `webhook_endpoint_limit_reached` |
189
+ | `UnprocessableEntityError` | 422 | `validation_failed`, `total_mismatch` |
190
+ | `RateLimitError` | 429 | `demo_issuer_quota_exceeded`, `account_email_limit_reached` |
191
+ | `InternalServerError` | 5xx | `internal_error` |
192
+ | `APIConnectionError` | — | sin respuesta (red); `APITimeoutError` si se agotó el plazo |
192
193
 
193
194
  Todas derivan de `FlashpiError`. Algunos errores traen datos extra en `error.problem`, por
194
195
  ejemplo `documentId`, `limit`, `resetsAt` o `rideStatus`. Para recibir los mensajes en español: