fiscalapi 4.0.474__tar.gz → 4.0.479__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.
- {fiscalapi-4.0.474/fiscalapi.egg-info → fiscalapi-4.0.479}/PKG-INFO +22 -1
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/README.md +21 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/__init__.py +29 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/models/__init__.py +26 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/models/common_models.py +17 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/models/fiscalapi_models.py +52 -8
- fiscalapi-4.0.479/fiscalapi/models/me_models.py +72 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/models/ticket_models.py +1 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/__init__.py +2 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/base_service.py +23 -2
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/fiscalapi_client.py +2 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/invoice_service.py +25 -3
- fiscalapi-4.0.479/fiscalapi/services/me_service.py +20 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/people_service.py +30 -5
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/product_service.py +27 -5
- {fiscalapi-4.0.474 → fiscalapi-4.0.479/fiscalapi.egg-info}/PKG-INFO +22 -1
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi.egg-info/SOURCES.txt +7 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/setup.py +1 -1
- fiscalapi-4.0.479/tests/test_list_filters.py +159 -0
- fiscalapi-4.0.479/tests/test_me_service.py +83 -0
- fiscalapi-4.0.479/tests/test_people_tax_files.py +68 -0
- fiscalapi-4.0.479/tests/test_person_portal_access.py +75 -0
- fiscalapi-4.0.479/tests/test_published_fixtures.py +32 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/LICENSE.txt +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/MANIFEST.in +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/models/carta_porte_models.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/models/comercio_exterior_models.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/models/manifest_models.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/models/sat_validation_models.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/models/webhook_models.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/py.typed +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/api_key_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/catalog_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/download_catalog_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/download_request_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/download_rule_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/employee_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/employer_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/manifest_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/sat_validation_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/stamp_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/tax_file_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/services/ticket_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi/webhooks.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi.egg-info/dependency_links.txt +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi.egg-info/requires.txt +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/fiscalapi.egg-info/top_level.txt +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/pyproject.toml +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/setup.cfg +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/tests/test_cancel_invoice_rejection.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/tests/test_cycle_contract.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/tests/test_error_trace_identifier.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/tests/test_idempotency_key.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/tests/test_invoice_item_ticket_id.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/tests/test_response_tolerance.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/tests/test_ticket_service.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/tests/test_webhook_back_interop.py +0 -0
- {fiscalapi-4.0.474 → fiscalapi-4.0.479}/tests/test_webhook_verify.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fiscalapi
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.479
|
|
4
4
|
Summary: Genera facturas CFDI válidas ante el SAT consumiendo el API de https://www.fiscalapi.com
|
|
5
5
|
Home-page: https://www.fiscalapi.com
|
|
6
6
|
Author: Fiscalapi
|
|
@@ -144,6 +144,10 @@ settings = FiscalApiSettings(
|
|
|
144
144
|
from fiscalapi import FiscalApiClient
|
|
145
145
|
|
|
146
146
|
client = FiscalApiClient(settings=settings)
|
|
147
|
+
|
|
148
|
+
# Opcional: valida la credencial. Responde la persona de la API key, su tenant, el ambiente, sus features y saldos
|
|
149
|
+
# (401 si la API key o el tenant no son válidos)
|
|
150
|
+
me = client.me.get()
|
|
147
151
|
```
|
|
148
152
|
|
|
149
153
|
## 🔄 Modos de Operación
|
|
@@ -291,6 +295,23 @@ Para reintentar la creación sin duplicar la factura, pasa una `idempotency_key`
|
|
|
291
295
|
api_response = client.invoices.create(invoice, idempotency_key="550e8400-e29b-41d4-a716-446655440000")
|
|
292
296
|
```
|
|
293
297
|
|
|
298
|
+
Para listar facturas con filtros pasa un `InvoiceListFilters` en `filters`; los filtros en `None` no se envían. `people.get_list` y `products.get_list` buscan con `search` (`PersonListFilters` y `ProductListFilters`).
|
|
299
|
+
|
|
300
|
+
```python
|
|
301
|
+
from datetime import date
|
|
302
|
+
from fiscalapi import InvoiceListFilters, InvoiceListOrder
|
|
303
|
+
|
|
304
|
+
# Facturas vigentes de un receptor en septiembre, las más recientes primero
|
|
305
|
+
invoices = client.invoices.get_list(filters=InvoiceListFilters(
|
|
306
|
+
recipient_tin="<rfc_receptor>",
|
|
307
|
+
status_id="V",
|
|
308
|
+
from_=date(2026, 9, 1),
|
|
309
|
+
to=date(2026, 9, 30),
|
|
310
|
+
order=InvoiceListOrder.DESC,
|
|
311
|
+
page_size=50
|
|
312
|
+
))
|
|
313
|
+
```
|
|
314
|
+
|
|
294
315
|
### 6. Crear la Misma Factura de Ingreso (Por Valores)
|
|
295
316
|
|
|
296
317
|
```python
|
|
@@ -108,6 +108,10 @@ settings = FiscalApiSettings(
|
|
|
108
108
|
from fiscalapi import FiscalApiClient
|
|
109
109
|
|
|
110
110
|
client = FiscalApiClient(settings=settings)
|
|
111
|
+
|
|
112
|
+
# Opcional: valida la credencial. Responde la persona de la API key, su tenant, el ambiente, sus features y saldos
|
|
113
|
+
# (401 si la API key o el tenant no son válidos)
|
|
114
|
+
me = client.me.get()
|
|
111
115
|
```
|
|
112
116
|
|
|
113
117
|
## 🔄 Modos de Operación
|
|
@@ -255,6 +259,23 @@ Para reintentar la creación sin duplicar la factura, pasa una `idempotency_key`
|
|
|
255
259
|
api_response = client.invoices.create(invoice, idempotency_key="550e8400-e29b-41d4-a716-446655440000")
|
|
256
260
|
```
|
|
257
261
|
|
|
262
|
+
Para listar facturas con filtros pasa un `InvoiceListFilters` en `filters`; los filtros en `None` no se envían. `people.get_list` y `products.get_list` buscan con `search` (`PersonListFilters` y `ProductListFilters`).
|
|
263
|
+
|
|
264
|
+
```python
|
|
265
|
+
from datetime import date
|
|
266
|
+
from fiscalapi import InvoiceListFilters, InvoiceListOrder
|
|
267
|
+
|
|
268
|
+
# Facturas vigentes de un receptor en septiembre, las más recientes primero
|
|
269
|
+
invoices = client.invoices.get_list(filters=InvoiceListFilters(
|
|
270
|
+
recipient_tin="<rfc_receptor>",
|
|
271
|
+
status_id="V",
|
|
272
|
+
from_=date(2026, 9, 1),
|
|
273
|
+
to=date(2026, 9, 30),
|
|
274
|
+
order=InvoiceListOrder.DESC,
|
|
275
|
+
page_size=50
|
|
276
|
+
))
|
|
277
|
+
```
|
|
278
|
+
|
|
258
279
|
### 6. Crear la Misma Factura de Ingreso (Por Valores)
|
|
259
280
|
|
|
260
281
|
```python
|
|
@@ -18,6 +18,7 @@ from .models.common_models import (
|
|
|
18
18
|
CatalogDto,
|
|
19
19
|
FiscalApiSettings,
|
|
20
20
|
PagedList,
|
|
21
|
+
PagedListFilters,
|
|
21
22
|
ValidationFailure,
|
|
22
23
|
)
|
|
23
24
|
|
|
@@ -75,6 +76,16 @@ from .models.sat_validation_models import (
|
|
|
75
76
|
SatValidationStatus,
|
|
76
77
|
SatValidationResult,
|
|
77
78
|
)
|
|
79
|
+
# Modelos de la persona de la credencial (GET /me)
|
|
80
|
+
from .models.me_models import (
|
|
81
|
+
MeInfo,
|
|
82
|
+
PersonFeatures,
|
|
83
|
+
DeniedPermission,
|
|
84
|
+
PersonFeature,
|
|
85
|
+
PersonSubscription,
|
|
86
|
+
PersonSeatAssignment,
|
|
87
|
+
)
|
|
88
|
+
|
|
78
89
|
# Modelos de tickets (Auto CFDI)
|
|
79
90
|
from .models.ticket_models import (
|
|
80
91
|
TicketStatus,
|
|
@@ -103,9 +114,11 @@ from .models.fiscalapi_models import (
|
|
|
103
114
|
# Product models
|
|
104
115
|
ProductTax,
|
|
105
116
|
Product,
|
|
117
|
+
ProductListFilters,
|
|
106
118
|
# Person models
|
|
107
119
|
CreditBalance,
|
|
108
120
|
Person,
|
|
121
|
+
PersonListFilters,
|
|
109
122
|
EmployeeData,
|
|
110
123
|
EmployerData,
|
|
111
124
|
TaxFile,
|
|
@@ -147,6 +160,8 @@ from .models.fiscalapi_models import (
|
|
|
147
160
|
# Invoice models
|
|
148
161
|
InvoiceResponse,
|
|
149
162
|
Invoice,
|
|
163
|
+
InvoiceListOrder,
|
|
164
|
+
InvoiceListFilters,
|
|
150
165
|
CancelInvoiceRequest,
|
|
151
166
|
CancelInvoiceResponse,
|
|
152
167
|
CreatePdfRequest,
|
|
@@ -197,6 +212,7 @@ from .services.tax_file_service import TaxFileService
|
|
|
197
212
|
from .services.sat_validation_service import SatValidationService
|
|
198
213
|
from .services.stamp_service import StampService
|
|
199
214
|
from .services.manifest_service import ManifestService
|
|
215
|
+
from .services.me_service import MeService
|
|
200
216
|
from .services.ticket_service import TicketService
|
|
201
217
|
|
|
202
218
|
# Cliente principal
|
|
@@ -213,13 +229,16 @@ __all__ = [
|
|
|
213
229
|
"CatalogDto",
|
|
214
230
|
"FiscalApiSettings",
|
|
215
231
|
"PagedList",
|
|
232
|
+
"PagedListFilters",
|
|
216
233
|
"ValidationFailure",
|
|
217
234
|
# Product models
|
|
218
235
|
"ProductTax",
|
|
219
236
|
"Product",
|
|
237
|
+
"ProductListFilters",
|
|
220
238
|
# Person models
|
|
221
239
|
"CreditBalance",
|
|
222
240
|
"Person",
|
|
241
|
+
"PersonListFilters",
|
|
223
242
|
"EmployeeData",
|
|
224
243
|
"EmployerData",
|
|
225
244
|
"TaxFile",
|
|
@@ -295,6 +314,8 @@ __all__ = [
|
|
|
295
314
|
# Invoice models
|
|
296
315
|
"InvoiceResponse",
|
|
297
316
|
"Invoice",
|
|
317
|
+
"InvoiceListOrder",
|
|
318
|
+
"InvoiceListFilters",
|
|
298
319
|
"CancelInvoiceRequest",
|
|
299
320
|
"CancelInvoiceResponse",
|
|
300
321
|
"CreatePdfRequest",
|
|
@@ -338,6 +359,13 @@ __all__ = [
|
|
|
338
359
|
"SatValidationTypeStatus",
|
|
339
360
|
"SatValidationStatus",
|
|
340
361
|
"SatValidationResult",
|
|
362
|
+
# Me models (GET /me)
|
|
363
|
+
"MeInfo",
|
|
364
|
+
"PersonFeatures",
|
|
365
|
+
"DeniedPermission",
|
|
366
|
+
"PersonFeature",
|
|
367
|
+
"PersonSubscription",
|
|
368
|
+
"PersonSeatAssignment",
|
|
341
369
|
# Ticket models (Auto CFDI)
|
|
342
370
|
"TicketStatus",
|
|
343
371
|
"TicketEventType",
|
|
@@ -371,6 +399,7 @@ __all__ = [
|
|
|
371
399
|
"SatValidationService",
|
|
372
400
|
"StampService",
|
|
373
401
|
"ManifestService",
|
|
402
|
+
"MeService",
|
|
374
403
|
"TicketService",
|
|
375
404
|
# Cliente principal
|
|
376
405
|
"FiscalApiClient",
|
|
@@ -6,6 +6,7 @@ from .common_models import (
|
|
|
6
6
|
CatalogDto,
|
|
7
7
|
FiscalApiSettings,
|
|
8
8
|
PagedList,
|
|
9
|
+
PagedListFilters,
|
|
9
10
|
ValidationFailure,
|
|
10
11
|
)
|
|
11
12
|
from .carta_porte_models import (
|
|
@@ -61,6 +62,15 @@ from .sat_validation_models import (
|
|
|
61
62
|
SatValidationStatus,
|
|
62
63
|
SatValidationResult,
|
|
63
64
|
)
|
|
65
|
+
from .me_models import (
|
|
66
|
+
# Me models (GET /me)
|
|
67
|
+
MeInfo,
|
|
68
|
+
PersonFeatures,
|
|
69
|
+
DeniedPermission,
|
|
70
|
+
PersonFeature,
|
|
71
|
+
PersonSubscription,
|
|
72
|
+
PersonSeatAssignment,
|
|
73
|
+
)
|
|
64
74
|
from .ticket_models import (
|
|
65
75
|
# Ticket models (Auto CFDI)
|
|
66
76
|
TicketStatus,
|
|
@@ -86,9 +96,11 @@ from .fiscalapi_models import (
|
|
|
86
96
|
# Product models
|
|
87
97
|
ProductTax,
|
|
88
98
|
Product,
|
|
99
|
+
ProductListFilters,
|
|
89
100
|
# Person models
|
|
90
101
|
CreditBalance,
|
|
91
102
|
Person,
|
|
103
|
+
PersonListFilters,
|
|
92
104
|
EmployeeData,
|
|
93
105
|
EmployerData,
|
|
94
106
|
TaxFile,
|
|
@@ -130,6 +142,8 @@ from .fiscalapi_models import (
|
|
|
130
142
|
# Invoice models
|
|
131
143
|
InvoiceResponse,
|
|
132
144
|
Invoice,
|
|
145
|
+
InvoiceListOrder,
|
|
146
|
+
InvoiceListFilters,
|
|
133
147
|
CancelInvoiceRequest,
|
|
134
148
|
CancelInvoiceResponse,
|
|
135
149
|
CreatePdfRequest,
|
|
@@ -171,6 +185,7 @@ __all__ = [
|
|
|
171
185
|
"CatalogDto",
|
|
172
186
|
"FiscalApiSettings",
|
|
173
187
|
"PagedList",
|
|
188
|
+
"PagedListFilters",
|
|
174
189
|
"ValidationFailure",
|
|
175
190
|
# Carta Porte models
|
|
176
191
|
"UbicacionDomicilio",
|
|
@@ -209,9 +224,11 @@ __all__ = [
|
|
|
209
224
|
# Product models
|
|
210
225
|
"ProductTax",
|
|
211
226
|
"Product",
|
|
227
|
+
"ProductListFilters",
|
|
212
228
|
# Person models
|
|
213
229
|
"CreditBalance",
|
|
214
230
|
"Person",
|
|
231
|
+
"PersonListFilters",
|
|
215
232
|
"EmployeeData",
|
|
216
233
|
"EmployerData",
|
|
217
234
|
"TaxFile",
|
|
@@ -253,6 +270,8 @@ __all__ = [
|
|
|
253
270
|
# Invoice models
|
|
254
271
|
"InvoiceResponse",
|
|
255
272
|
"Invoice",
|
|
273
|
+
"InvoiceListOrder",
|
|
274
|
+
"InvoiceListFilters",
|
|
256
275
|
"CancelInvoiceRequest",
|
|
257
276
|
"CancelInvoiceResponse",
|
|
258
277
|
"CreatePdfRequest",
|
|
@@ -296,6 +315,13 @@ __all__ = [
|
|
|
296
315
|
"SatValidationTypeStatus",
|
|
297
316
|
"SatValidationStatus",
|
|
298
317
|
"SatValidationResult",
|
|
318
|
+
# Me models (GET /me)
|
|
319
|
+
"MeInfo",
|
|
320
|
+
"PersonFeatures",
|
|
321
|
+
"DeniedPermission",
|
|
322
|
+
"PersonFeature",
|
|
323
|
+
"PersonSubscription",
|
|
324
|
+
"PersonSeatAssignment",
|
|
299
325
|
# Ticket models (Auto CFDI)
|
|
300
326
|
"TicketStatus",
|
|
301
327
|
"TicketEventType",
|
|
@@ -28,6 +28,23 @@ class PagedList(BaseModel, Generic[T]):
|
|
|
28
28
|
model_config = ConfigDict(populate_by_name=True)
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
class PagedListFilters(BaseModel):
|
|
32
|
+
"""Página de una lista (``get_list`` de facturas, personas y productos) y base de sus filtros. Cada filtro aplica solo
|
|
33
|
+
si se asigna; los que quedan en None no se envían."""
|
|
34
|
+
|
|
35
|
+
page_number: Optional[int] = Field(default=None, alias="pageNumber", description="Página, desde 1. Sin ella, el API devuelve la primera.")
|
|
36
|
+
page_size: Optional[int] = Field(default=None, alias="pageSize", description="Tamaño de página (1 a 50). Sin él, el API usa su tamaño por omisión.")
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
39
|
+
|
|
40
|
+
def to_query_params(self) -> list[tuple[str, str]]:
|
|
41
|
+
"""Los filtros asignados como pares de la query string, con los nombres camelCase del API y la página al final,
|
|
42
|
+
en el orden del contrato."""
|
|
43
|
+
filters = self.model_dump(mode="json", by_alias=True, exclude={"page_number", "page_size"})
|
|
44
|
+
page = {"pageNumber": self.page_number, "pageSize": self.page_size}
|
|
45
|
+
return [(key, str(value)) for key, value in [*filters.items(), *page.items()] if value is not None]
|
|
46
|
+
|
|
47
|
+
|
|
31
48
|
class ValidationFailure(BaseModel):
|
|
32
49
|
"""Modelo para errores de validación."""
|
|
33
50
|
property_name: str = Field(alias="propertyName")
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
from decimal import Decimal
|
|
2
|
-
from enum import IntEnum
|
|
2
|
+
from enum import Enum, IntEnum
|
|
3
3
|
from pydantic import BaseModel, ConfigDict, Field
|
|
4
|
-
from fiscalapi.models.common_models import BaseDto, CatalogDto
|
|
4
|
+
from fiscalapi.models.common_models import BaseDto, CatalogDto, PagedListFilters
|
|
5
5
|
from fiscalapi.models.carta_porte_models import CartaPorteComplement
|
|
6
6
|
from fiscalapi.models.comercio_exterior_models import ComercioExteriorComplement
|
|
7
|
-
from typing import Optional, Union
|
|
8
|
-
from datetime import datetime
|
|
7
|
+
from typing import Literal, Optional, Union
|
|
8
|
+
from datetime import date, datetime
|
|
9
9
|
|
|
10
10
|
# products models
|
|
11
11
|
|
|
@@ -46,6 +46,14 @@ class Product(BaseDto):
|
|
|
46
46
|
|
|
47
47
|
model_config = ConfigDict(populate_by_name=True)
|
|
48
48
|
|
|
49
|
+
|
|
50
|
+
class ProductListFilters(PagedListFilters):
|
|
51
|
+
"""Filtros de ``products.get_list`` (GET /api/v4/products). Sin ninguno, la lista es la de siempre (primera página;
|
|
52
|
+
sin ``page_size``, el API usa 10)."""
|
|
53
|
+
|
|
54
|
+
search: Optional[str] = Field(default=None, alias="search", description="Texto a buscar, de 2 a 100 caracteres y sin distinguir mayúsculas: los productos cuya descripción o clave de producto o servicio del SAT lo contiene.")
|
|
55
|
+
|
|
56
|
+
|
|
49
57
|
# people models
|
|
50
58
|
|
|
51
59
|
class CreditBalance(BaseModel):
|
|
@@ -65,7 +73,8 @@ class Person(BaseDto):
|
|
|
65
73
|
|
|
66
74
|
legal_name: Optional[str] = Field(default=None, alias="legalName", description="Razón social de la persona sin régimen de capital.")
|
|
67
75
|
email: Optional[str] = Field(default=None, alias="email", description="Correo electrónico de la persona. El API valida el formato.")
|
|
68
|
-
password: Optional[str]
|
|
76
|
+
password: Optional[str] = Field(default=None, alias="password", description="Contraseña para acceder al dashboard. Opcional al crear (sin ella la persona no inicia sesión con contraseña) y obligatoria solo si login_enabled es True; al actualizar, None o vacía conserva la actual. En None no se envía. El API nunca la devuelve.")
|
|
77
|
+
login_enabled: Optional[bool] = Field(default=None, alias="loginEnabled", description="Acceso al portal (inicio de sesión en el dashboard); no afecta a la API key. Al crear, None o False: la persona nace sin acceso. Al actualizar, None no se envía y no cambia el acceso actual; True lo da (la persona debe tener contraseña o recibirla en password) y False lo quita. Solo lo cambia el owner del tenant, y el owner siempre lo tiene. En las respuestas llega el acceso efectivo.")
|
|
69
78
|
phone_number: Optional[str] = Field(default=None, alias="phoneNumber", description="Teléfono de la persona.")
|
|
70
79
|
sat_tax_regime_id: Optional[str] = Field(default=None, alias="satTaxRegimeId", description="Código del régimen fiscal: clave del catálogo c_RegimenFiscal del SAT. La valida el API.")
|
|
71
80
|
sat_tax_regime: Optional[CatalogDto] = Field(default=None, alias="satTaxRegime", description="Código del régimen fiscal expandido.")
|
|
@@ -95,6 +104,14 @@ class Person(BaseDto):
|
|
|
95
104
|
model_config = ConfigDict(populate_by_name=True)
|
|
96
105
|
|
|
97
106
|
|
|
107
|
+
class PersonListFilters(PagedListFilters):
|
|
108
|
+
"""Filtros de ``people.get_list`` (GET /api/v4/people). Sin ninguno, la lista es la de siempre (primera página;
|
|
109
|
+
sin ``page_size``, el API usa 50)."""
|
|
110
|
+
|
|
111
|
+
search: Optional[str] = Field(default=None, alias="search", description="Texto a buscar, de 2 a 100 caracteres y sin distinguir mayúsculas: las personas cuya razón social, RFC o correo lo contiene.")
|
|
112
|
+
user_type_id: Optional[str] = Field(default=None, alias="userTypeId", description="Tipo de persona (Person.user_type_id): T (tenant), U (usuario) o C (cliente), en mayúsculas.")
|
|
113
|
+
|
|
114
|
+
|
|
98
115
|
class EmployeeData(BaseDto):
|
|
99
116
|
"""Modelo empleado para CFDI de nomina."""
|
|
100
117
|
|
|
@@ -246,6 +263,7 @@ class ItemTax(BaseDto):
|
|
|
246
263
|
tax_code: Optional[str] = Field(default=None, alias="taxCode", description="Código del impuesto.")
|
|
247
264
|
tax_type_code: Optional[str] = Field(default=None, alias="taxTypeCode", description="Tipo de factor.")
|
|
248
265
|
tax_rate: Optional[Decimal] = Field(default=None, alias="taxRate", description="Tasa del impuesto.")
|
|
266
|
+
base: Optional[Decimal] = Field(default=None, alias="base", description="Base en las unidades de la cuota, hasta 6 decimales. Obligatoria con Cuota; con Tasa o Exento FiscalAPI la calcula.")
|
|
249
267
|
tax_flag_code: Optional[str] = Field(default=None, alias="taxFlagCode", description="Código que indica la naturaleza del impuesto. (T)raslado o (R)etención.")
|
|
250
268
|
|
|
251
269
|
model_config = ConfigDict(populate_by_name=True)
|
|
@@ -337,15 +355,15 @@ class PaidInvoiceTax(BaseDto):
|
|
|
337
355
|
class PaidInvoice(BaseDto):
|
|
338
356
|
"""Modelo para las facturas pagadas con el pago recibido."""
|
|
339
357
|
uuid: str = Field(default=..., alias="uuid", description="UUID de la factura pagada.")
|
|
340
|
-
series: str = Field(default
|
|
358
|
+
series: Optional[str] = Field(default=None, alias="series", description="Serie de la factura pagada.")
|
|
341
359
|
|
|
342
360
|
partiality_number: int = Field(default=..., alias="partialityNumber", description="Número de parcialidad.")
|
|
343
|
-
sub_total: Decimal = Field(default
|
|
361
|
+
sub_total: Optional[Decimal] = Field(default=None, alias="subTotal", description="Subtotal de la factura pagada.")
|
|
344
362
|
previous_balance: Decimal = Field(default=..., alias="previousBalance", description="Saldo anterior de la factura pagada.")
|
|
345
363
|
payment_amount: Decimal = Field(default=..., alias="paymentAmount", description="Monto pagado de la factura.")
|
|
346
364
|
remaining_balance: Decimal = Field(default=..., alias="remainingBalance", description="Saldo restante de la factura pagada.")
|
|
347
365
|
|
|
348
|
-
number: str = Field(default
|
|
366
|
+
number: Optional[str] = Field(default=None, alias="number", description="Folio de la factura pagada.")
|
|
349
367
|
currency_code: str = Field(default="MXN", alias="currencyCode", description="Código de la moneda utilizada en la factura pagada.")
|
|
350
368
|
tax_object_code: str = Field(default=..., alias="taxObjectCode", description="Código de obligaciones de impuesto.")
|
|
351
369
|
equivalence: Optional[Decimal] = Field(default=Decimal("1"), description="Equivalencia de la moneda. Este campo es obligatorio cuando la moneda del documento relacionado (PaidInvoice.CurrencyCode) difiere de la moneda en que se realiza el pago ( InvoicePayment.CurrencyCode).")
|
|
@@ -600,6 +618,30 @@ class Invoice(BaseDto):
|
|
|
600
618
|
model_config = ConfigDict(populate_by_name=True)
|
|
601
619
|
|
|
602
620
|
|
|
621
|
+
class InvoiceListOrder(str, Enum):
|
|
622
|
+
"""Valores de ``InvoiceListFilters.order``: el orden de la lista por fecha de creación."""
|
|
623
|
+
|
|
624
|
+
ASC = "asc"
|
|
625
|
+
DESC = "desc"
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
class InvoiceListFilters(PagedListFilters):
|
|
629
|
+
"""Filtros de ``invoices.get_list`` (GET /api/v4/invoices). Sin ninguno, la lista es la de siempre (primera página,
|
|
630
|
+
de la más antigua a la más reciente; sin ``page_size``, el API usa 10). ``from_`` lleva el guion bajo porque ``from``
|
|
631
|
+
es palabra reservada de Python."""
|
|
632
|
+
|
|
633
|
+
from_: Optional[date] = Field(default=None, alias="from", description="Primer día de la fecha de la factura (incluido), en fecha civil de México. Va junto con to.")
|
|
634
|
+
to: Optional[date] = Field(default=None, alias="to", description="Último día de la fecha de la factura (incluido), en fecha civil de México. Va junto con from_.")
|
|
635
|
+
issuer_tin: Optional[str] = Field(default=None, alias="issuerTin", description="RFC del emisor, exacto.")
|
|
636
|
+
recipient_tin: Optional[str] = Field(default=None, alias="recipientTin", description="RFC del receptor, exacto.")
|
|
637
|
+
type_code: Optional[str] = Field(default=None, alias="typeCode", description="Tipo de comprobante (c_TipoDeComprobante): I, E, T, P o N.")
|
|
638
|
+
status_id: Optional[str] = Field(default=None, alias="statusId", description="Estatus de la factura: B (borrador), V (vigente), C (cancelando) o X (cancelada).")
|
|
639
|
+
series: Optional[str] = Field(default=None, alias="series", description="Serie, exacta.")
|
|
640
|
+
number: Optional[str] = Field(default=None, alias="number", description="Folio, exacto.")
|
|
641
|
+
uuid: Optional[str] = Field(default=None, alias="uuid", description="Folio fiscal (UUID).")
|
|
642
|
+
order: Optional[Literal["asc", "desc"]] = Field(default=None, alias="order", description="Orden por fecha de creación: asc o desc (las más recientes primero); acepta InvoiceListOrder. Sin él, el API usa asc.")
|
|
643
|
+
|
|
644
|
+
|
|
603
645
|
|
|
604
646
|
class CancelInvoiceRequest(BaseDto):
|
|
605
647
|
"""Modelo de cancelación de factura."""
|
|
@@ -751,6 +793,8 @@ class DownloadRequest(BaseDto):
|
|
|
751
793
|
|
|
752
794
|
sat_request_status_id: Optional[str] = Field(default=None, alias="satRequestStatusId", description="Estado actual de la solicitud. DESCONOCIDO, ACEPTADA, EN PROCESO, TERMINADA, ERROR, RECHAZADA, VENCIDA.")
|
|
753
795
|
sat_request_status: Optional[CatalogDto] = Field(default=None, alias="satRequestStatus", description="Estado de la solicitud SAT.")
|
|
796
|
+
sat_status_code: Optional[str] = Field(default=None, alias="satStatusCode", description="Código (CodEstatus) de la última respuesta del SAT, a la solicitud o a su verificación.")
|
|
797
|
+
sat_message: Optional[str] = Field(default=None, alias="satMessage", description="Mensaje de la última respuesta del SAT, a la solicitud o a su verificación.")
|
|
754
798
|
|
|
755
799
|
download_request_status_id: Optional[str] = Field(default=None, alias="downloadRequestStatusId", description="ID del estado de la solicitud de Fiscalapi.")
|
|
756
800
|
download_request_status: Optional[CatalogDto] = Field(default=None, alias="downloadRequestStatus", description="Estado de la solicitud de descarga Fiscalapi.")
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""Modelos de la persona de la credencial (``me.get``, GET /api/v4/me)."""
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
5
|
+
|
|
6
|
+
from fiscalapi.models.fiscalapi_models import CreditBalance
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DeniedPermission(BaseModel):
|
|
10
|
+
"""Un permiso negado (``PersonFeatures.denied``): los features que le faltan al tenant."""
|
|
11
|
+
|
|
12
|
+
missing_features: Optional[list[str]] = Field(default=None, alias="missingFeatures", description="Códigos de los features que le faltan al tenant.")
|
|
13
|
+
|
|
14
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class PersonFeature(BaseModel):
|
|
18
|
+
"""Un feature habilitado del tenant (``PersonFeatures.features``)."""
|
|
19
|
+
|
|
20
|
+
values: Optional[dict[str, int]] = Field(default=None, alias="values", description="Valores del feature por código (por ejemplo, seats); vacío si no tiene.")
|
|
21
|
+
|
|
22
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class PersonSubscription(BaseModel):
|
|
26
|
+
"""La suscripción que otorga los features del tenant (``PersonFeatures.subscription``)."""
|
|
27
|
+
|
|
28
|
+
status: Optional[str] = Field(default=None, alias="status", description="Estado de la suscripción (active, trialing o past_due), o None si ninguna otorga features.")
|
|
29
|
+
is_available: Optional[bool] = Field(default=None, alias="isAvailable", description="False si no se pudieron leer los features del tenant (o la persona no tiene roles).")
|
|
30
|
+
|
|
31
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class PersonSeatAssignment(BaseModel):
|
|
35
|
+
"""Un asiento de la persona en un feature por persona (``PersonFeatures.seat_assignments``)."""
|
|
36
|
+
|
|
37
|
+
feature_code: Optional[str] = Field(default=None, alias="featureCode", description="Código del feature (por ejemplo, descarga_cfdi).")
|
|
38
|
+
units: Optional[int] = Field(default=None, alias="units", description="Unidades que ocupa de la cantidad contratada.")
|
|
39
|
+
status: Optional[str] = Field(default=None, alias="status", description="Active si cabe en la cantidad contratada (la persona usa el feature) o Suspended si no cabe.")
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class PersonFeatures(BaseModel):
|
|
45
|
+
"""Lo que la persona puede hacer (``MeInfo.features``). Es informativo: cada endpoint vuelve a evaluar su permiso."""
|
|
46
|
+
|
|
47
|
+
is_owner: Optional[bool] = Field(default=None, alias="isOwner", description="True si la persona es el owner del tenant.")
|
|
48
|
+
roles: Optional[list[str]] = Field(default=None, alias="roles", description="Roles de la persona: Owner o Member (más Host para la persona del host).")
|
|
49
|
+
permissions: Optional[list[str]] = Field(default=None, alias="permissions", description="Permisos concedidos, con la forma Área.Acción (por ejemplo, Invoices.Issue).")
|
|
50
|
+
denied: Optional[dict[str, DeniedPermission]] = Field(default=None, alias="denied", description="Permisos que el rol de la persona tiene pero se le niegan porque al tenant le faltan features, por permiso.")
|
|
51
|
+
features: Optional[dict[str, PersonFeature]] = Field(default=None, alias="features", description="Features habilitados del tenant, por código (por ejemplo, emision_cfdi), con sus valores.")
|
|
52
|
+
subscription: Optional[PersonSubscription] = Field(default=None, alias="subscription", description="La suscripción que otorga los features del tenant.")
|
|
53
|
+
seat_assignments: Optional[list[PersonSeatAssignment]] = Field(default=None, alias="seatAssignments", description="Los asientos de la persona en los features por persona; vacío si no tiene ninguno.")
|
|
54
|
+
|
|
55
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class MeInfo(BaseModel):
|
|
59
|
+
"""La persona de la credencial: quién es, de qué tenant y ambiente, si es el owner, lo que puede hacer y sus saldos.
|
|
60
|
+
Siempre la persona de la API key; no trae secretos."""
|
|
61
|
+
|
|
62
|
+
id: Optional[str] = Field(default=None, alias="id", description="Id de la persona.")
|
|
63
|
+
legal_name: Optional[str] = Field(default=None, alias="legalName", description="Nombre o razón social.")
|
|
64
|
+
tin: Optional[str] = Field(default=None, alias="tin", description="RFC.")
|
|
65
|
+
email: Optional[str] = Field(default=None, alias="email", description="Correo.")
|
|
66
|
+
tenant_id: Optional[str] = Field(default=None, alias="tenantId", description="Tenant de la persona (el del header X-TENANT-KEY).")
|
|
67
|
+
environment: Optional[str] = Field(default=None, alias="environment", description="Ambiente que responde: Development, Test o Production.")
|
|
68
|
+
is_owner: Optional[bool] = Field(default=None, alias="isOwner", description="True si la persona es el owner del tenant (el mismo valor que features.is_owner).")
|
|
69
|
+
features: Optional[PersonFeatures] = Field(default=None, alias="features", description="Lo que la persona puede hacer: roles, permisos concedidos y negados, features del tenant y suscripción.")
|
|
70
|
+
balances: Optional[list[CreditBalance]] = Field(default=None, alias="balances", description="Saldos por tipo de crédito, como Person.balances; un tipo ausente tiene saldo 0.")
|
|
71
|
+
|
|
72
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
@@ -63,6 +63,7 @@ class TicketItemTax(BaseModel):
|
|
|
63
63
|
tax_code: Optional[str] = Field(default=None, alias="taxCode", description="Impuesto: 001 (ISR), 002 (IVA) o 003 (IEPS).")
|
|
64
64
|
tax_type_code: Optional[str] = Field(default=None, alias="taxTypeCode", description="Tipo de factor: Tasa, Cuota o Exento.")
|
|
65
65
|
tax_rate: Optional[Decimal] = Field(default=None, alias="taxRate", description="Tasa o cuota; se envía tal cual, sin redondear.")
|
|
66
|
+
base: Optional[Decimal] = Field(default=None, alias="base", description="Base en las unidades de la cuota, hasta 6 decimales. Obligatoria con Cuota; con Tasa o Exento FiscalAPI la calcula.")
|
|
66
67
|
tax_flag_code: Optional[str] = Field(default=None, alias="taxFlagCode", description="T (traslado) o R (retención).")
|
|
67
68
|
|
|
68
69
|
model_config = ConfigDict(populate_by_name=True)
|
|
@@ -11,6 +11,7 @@ from .employer_service import EmployerService
|
|
|
11
11
|
from .fiscalapi_client import FiscalApiClient
|
|
12
12
|
from .invoice_service import InvoiceService
|
|
13
13
|
from .manifest_service import ManifestService
|
|
14
|
+
from .me_service import MeService
|
|
14
15
|
from .people_service import PeopleService
|
|
15
16
|
from .product_service import ProductService
|
|
16
17
|
from .sat_validation_service import SatValidationService
|
|
@@ -30,6 +31,7 @@ __all__ = [
|
|
|
30
31
|
"FiscalApiClient",
|
|
31
32
|
"InvoiceService",
|
|
32
33
|
"ManifestService",
|
|
34
|
+
"MeService",
|
|
33
35
|
"PeopleService",
|
|
34
36
|
"ProductService",
|
|
35
37
|
"SatValidationService",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import urllib3
|
|
2
2
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
3
|
-
from typing import Any, Type, TypeVar, get_args, get_origin
|
|
3
|
+
from typing import Any, Optional, Type, TypeVar, get_args, get_origin
|
|
4
|
+
from urllib.parse import urlencode
|
|
4
5
|
import certifi
|
|
5
6
|
from pydantic import BaseModel
|
|
6
7
|
import requests
|
|
7
|
-
from fiscalapi.models.common_models import ApiResponse, FiscalApiSettings, ValidationFailure
|
|
8
|
+
from fiscalapi.models.common_models import ApiResponse, FiscalApiSettings, PagedListFilters, ValidationFailure
|
|
8
9
|
|
|
9
10
|
T = TypeVar('T')
|
|
10
11
|
|
|
@@ -133,6 +134,26 @@ class BaseService:
|
|
|
133
134
|
data=None
|
|
134
135
|
)
|
|
135
136
|
|
|
137
|
+
@staticmethod
|
|
138
|
+
def _list_endpoint(
|
|
139
|
+
resource: str,
|
|
140
|
+
page_number: Optional[int],
|
|
141
|
+
page_size: Optional[int],
|
|
142
|
+
filters: Optional[PagedListFilters],
|
|
143
|
+
) -> str:
|
|
144
|
+
"""Endpoint de ``get_list``: la página o los filtros asignados en la query string; sin ninguno, solo el recurso.
|
|
145
|
+
|
|
146
|
+
Raises:
|
|
147
|
+
ValueError: Si se pasan ``filters`` junto con ``page_number`` o ``page_size``.
|
|
148
|
+
"""
|
|
149
|
+
if filters is None:
|
|
150
|
+
filters = PagedListFilters(page_number=page_number, page_size=page_size)
|
|
151
|
+
elif page_number is not None or page_size is not None:
|
|
152
|
+
raise ValueError("Con filters, la página va en filters.page_number y filters.page_size.")
|
|
153
|
+
|
|
154
|
+
params = filters.to_query_params()
|
|
155
|
+
return f"{resource}?{urlencode(params)}" if params else resource
|
|
156
|
+
|
|
136
157
|
def send_request(self, method: str, endpoint: str, response_model: Type[T], details: bool = False, **kwargs: Any) -> ApiResponse[T]:
|
|
137
158
|
if details:
|
|
138
159
|
endpoint += "?details=true"
|
|
@@ -12,6 +12,7 @@ from fiscalapi.services.sat_validation_service import SatValidationService
|
|
|
12
12
|
from fiscalapi.services.stamp_service import StampService
|
|
13
13
|
from fiscalapi.services.manifest_service import ManifestService
|
|
14
14
|
from fiscalapi.services.ticket_service import TicketService
|
|
15
|
+
from fiscalapi.services.me_service import MeService
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
@@ -31,4 +32,5 @@ class FiscalApiClient:
|
|
|
31
32
|
self.sat_validations = SatValidationService(settings)
|
|
32
33
|
self.manifests = ManifestService(settings)
|
|
33
34
|
self.tickets = TicketService(settings)
|
|
35
|
+
self.me = MeService(settings)
|
|
34
36
|
self.settings = settings
|
|
@@ -7,6 +7,7 @@ from fiscalapi.models.fiscalapi_models import (
|
|
|
7
7
|
CreatePdfRequest,
|
|
8
8
|
FileResponse,
|
|
9
9
|
Invoice,
|
|
10
|
+
InvoiceListFilters,
|
|
10
11
|
InvoiceStatusRequest,
|
|
11
12
|
InvoiceStatusResponse,
|
|
12
13
|
SendInvoiceRequest,
|
|
@@ -17,9 +18,30 @@ from fiscalapi.services.base_service import IDEMPOTENCY_KEY_HEADER, BaseService
|
|
|
17
18
|
class InvoiceService(BaseService):
|
|
18
19
|
"""Servicio para gestionar facturas CFDI."""
|
|
19
20
|
|
|
20
|
-
def get_list(
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
def get_list(
|
|
22
|
+
self,
|
|
23
|
+
page_number: Optional[int] = None,
|
|
24
|
+
page_size: Optional[int] = None,
|
|
25
|
+
*,
|
|
26
|
+
filters: Optional[InvoiceListFilters] = None,
|
|
27
|
+
) -> ApiResponse[PagedList[Invoice]]:
|
|
28
|
+
"""Obtiene una lista paginada de facturas, con la página o con filtros. GET /api/v4/invoices
|
|
29
|
+
|
|
30
|
+
Los filtros en None no se envían; sin página ni filtros, la lista es la de siempre (primera página, de la más
|
|
31
|
+
antigua a la más reciente).
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
page_number: Página, desde 1.
|
|
35
|
+
page_size: Tamaño de página (1 a 50).
|
|
36
|
+
filters: Fechas, RFC, tipo, estatus, serie, folio, UUID, orden y página; en lugar de page_number y page_size.
|
|
37
|
+
|
|
38
|
+
Returns:
|
|
39
|
+
ApiResponse con la página de facturas.
|
|
40
|
+
|
|
41
|
+
Raises:
|
|
42
|
+
ValueError: Si se pasan filters junto con page_number o page_size.
|
|
43
|
+
"""
|
|
44
|
+
endpoint = self._list_endpoint("invoices", page_number, page_size, filters)
|
|
23
45
|
return self.send_request("GET", endpoint, PagedList[Invoice])
|
|
24
46
|
|
|
25
47
|
def get_by_id(self, invoice_id: str, details: bool = False) -> ApiResponse[Invoice]:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Servicio de la persona de la credencial con que se llama al API (GET /api/v4/me)."""
|
|
2
|
+
|
|
3
|
+
from fiscalapi.models.common_models import ApiResponse
|
|
4
|
+
from fiscalapi.models.me_models import MeInfo
|
|
5
|
+
from fiscalapi.services.base_service import BaseService
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class MeService(BaseService):
|
|
9
|
+
"""Service for the person of the API key (endpoint /api/v4/me)."""
|
|
10
|
+
|
|
11
|
+
def get(self) -> ApiResponse[MeInfo]:
|
|
12
|
+
"""Get the person of the API key: id, name, RFC and email, tenant, the environment that answers, whether it is
|
|
13
|
+
the owner, what it can do and its balances. GET /api/v4/me
|
|
14
|
+
|
|
15
|
+
Useful to validate a credential: with an API key or a tenant that are not valid the API answers 401.
|
|
16
|
+
|
|
17
|
+
Returns:
|
|
18
|
+
ApiResponse containing the MeInfo.
|
|
19
|
+
"""
|
|
20
|
+
return self.send_request("GET", "me", MeInfo)
|