fiscalapi 4.0.151__tar.gz → 4.0.360__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.360/MANIFEST.in +3 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/PKG-INFO +78 -16
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/README.md +73 -14
- fiscalapi-4.0.360/fiscalapi/__init__.py +222 -0
- fiscalapi-4.0.360/fiscalapi/models/__init__.py +174 -0
- fiscalapi-4.0.360/fiscalapi/models/common_models.py +69 -0
- fiscalapi-4.0.360/fiscalapi/models/fiscalapi_models.py +1070 -0
- fiscalapi-4.0.360/fiscalapi/services/__init__.py +33 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi/services/base_service.py +13 -98
- fiscalapi-4.0.360/fiscalapi/services/download_catalog_service.py +31 -0
- fiscalapi-4.0.360/fiscalapi/services/download_request_service.py +197 -0
- fiscalapi-4.0.360/fiscalapi/services/download_rule_service.py +37 -0
- fiscalapi-4.0.360/fiscalapi/services/employee_service.py +23 -0
- fiscalapi-4.0.360/fiscalapi/services/employer_service.py +23 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi/services/fiscalapi_client.py +9 -1
- fiscalapi-4.0.360/fiscalapi/services/invoice_service.py +71 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi/services/people_service.py +24 -3
- fiscalapi-4.0.360/fiscalapi/services/stamp_service.py +65 -0
- fiscalapi-4.0.360/fiscalapi/services/tax_file_service.py +32 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi.egg-info/PKG-INFO +78 -16
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi.egg-info/SOURCES.txt +10 -1
- fiscalapi-4.0.360/pyproject.toml +20 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/setup.py +14 -8
- fiscalapi-4.0.151/fiscalapi/__init__.py +0 -97
- fiscalapi-4.0.151/fiscalapi/models/common_models.py +0 -69
- fiscalapi-4.0.151/fiscalapi/models/fiscalapi_models.py +0 -375
- fiscalapi-4.0.151/fiscalapi/services/__init__.py +0 -0
- fiscalapi-4.0.151/fiscalapi/services/invoice_service.py +0 -91
- fiscalapi-4.0.151/fiscalapi/services/tax_file_servive.py +0 -41
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/LICENSE.txt +0 -0
- /fiscalapi-4.0.151/fiscalapi/models/__init__.py → /fiscalapi-4.0.360/fiscalapi/py.typed +0 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi/services/api_key_service.py +0 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi/services/catalog_service.py +0 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi/services/product_service.py +0 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi.egg-info/dependency_links.txt +0 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi.egg-info/requires.txt +0 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/fiscalapi.egg-info/top_level.txt +0 -0
- {fiscalapi-4.0.151 → fiscalapi-4.0.360}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fiscalapi
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.360
|
|
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
|
|
@@ -10,9 +10,12 @@ Keywords: factura,cfdi,facturacion,mexico,sat,fiscalapi
|
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
17
|
Classifier: Topic :: Office/Business :: Financial
|
|
15
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.9
|
|
16
19
|
Description-Content-Type: text/markdown
|
|
17
20
|
License-File: LICENSE.txt
|
|
18
21
|
Requires-Dist: pydantic>=2.0.0
|
|
@@ -40,15 +43,64 @@ Dynamic: summary
|
|
|
40
43
|
|
|
41
44
|
**SDK oficial de FiscalAPI para Python**, la API de facturación CFDI y otros servicios fiscales en México. Simplifica la integración con los servicios de facturación electrónica, eliminando las complejidades del SAT y facilitando la generación de facturas, notas de crédito, complementos de pago, nómina, carta porte, y más. ¡Facturar sin dolor ahora es posible!
|
|
42
45
|
|
|
43
|
-
## 🚀 Características
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
47
|
+
## 📋 Facturación CFDI 4.0
|
|
48
|
+
- **Soporte completo para CFDI 4.0** con todas las especificaciones oficiales
|
|
49
|
+
- **Timbrado de facturas de ingreso** con validación automática
|
|
50
|
+
- **Timbrado de notas de crédito** (facturas de egreso)
|
|
51
|
+
- **Timbrado de complementos de pago** en MXN, USD y EUR
|
|
52
|
+
- **Timbrado de facturas de nómina** - Soporte para los 13 tipos de CFDI de nómina
|
|
53
|
+
- **Consulta del estatus de facturas** en el SAT en tiempo real
|
|
54
|
+
- **Cancelación de facturas**
|
|
55
|
+
- **Generación de archivos PDF** de las facturas con formato profesional
|
|
56
|
+
- **Personalización de logos y colores** en los PDF generados
|
|
57
|
+
- **Envío de facturas por correo electrónico** automatizado
|
|
58
|
+
- **Descarga de archivos XML** con estructura completa
|
|
59
|
+
- **Almacenamiento y recuperación** de facturas por 5 años
|
|
60
|
+
- Dos [modos de operación](https://docs.fiscalapi.com/modes-of-operation): **Por valores** o **Por referencias**
|
|
51
61
|
- [Ejemplos en Python](https://github.com/FiscalAPI/fiscalapi-samples-python)
|
|
62
|
+
|
|
63
|
+
## 📥 Descarga Masiva
|
|
64
|
+
- **Acceso a catálogos de descarga masiva** del SAT
|
|
65
|
+
- **Descarga de CFDI y Metadatos** en lotes grandes
|
|
66
|
+
- **Descarga masiva XML** con filtros personalizados
|
|
67
|
+
- **Reglas de descarga automática por RFC**
|
|
68
|
+
- **Solicitudes de descarga** via API y Dashboard.
|
|
69
|
+
- **Automatización de solicitudes de descarga**
|
|
70
|
+
|
|
71
|
+
## 👥 Gestión de Personas
|
|
72
|
+
- **Administración de personas** (emisores, receptores, clientes, usuarios, etc.)
|
|
73
|
+
- **Gestión de certificados CSD y FIEL** (subir archivos .cer y .key a FiscalAPI)
|
|
74
|
+
- **Configuración de datos fiscales** (RFC, domicilio fiscal, régimen fiscal)
|
|
75
|
+
- **Datos de empleado** (agrega/actualiza/elimina datos de empleado a una persona. CFDI Nómina)
|
|
76
|
+
- **Datos de empleador** (agrega/actualiza/elimina datos de empleador a una persona. CFDI Nómina)
|
|
77
|
+
|
|
78
|
+
## 🎖️ Gestión de Timbres
|
|
79
|
+
- **Gestión de folios fiscales** Compra timbres a fiscalapi y transfiere/retira a las personas de tu organizacion segun tus reglas de negocio.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## 🛍️ Gestión de Productos/Servicios
|
|
83
|
+
- **Gestión de productos y servicios** con catálogo personalizable
|
|
84
|
+
- **Administración de impuestos aplicables** (IVA, ISR, IEPS)
|
|
85
|
+
|
|
86
|
+
## 📚 Consulta de Catálogos SAT
|
|
87
|
+
- **Consulta en catálogos oficiales del SAT** actualizados
|
|
88
|
+
- **Consulta en catálogos oficiales de Descarga masiva del SAT** actualizados
|
|
89
|
+
- **Búsqueda de información** en catálogos del SAT con filtros avanzados
|
|
90
|
+
- **Acceso y búsqueda** en catálogos completos
|
|
91
|
+
|
|
92
|
+
## 🎫 Gestión de Timbres
|
|
93
|
+
- **Listar transacciones de timbres** con paginación
|
|
94
|
+
- **Consultar transacciones** por ID
|
|
95
|
+
- **Transferir timbres** entre personas
|
|
96
|
+
- **Retirar timbres** de una persona
|
|
97
|
+
|
|
98
|
+
## 📖 Recursos Adicionales
|
|
99
|
+
- **Cientos de ejemplos de código** disponibles en múltiples lenguajes de programación
|
|
100
|
+
- Documentación completa con guías paso a paso
|
|
101
|
+
- Ejemplos prácticos para casos de uso comunes
|
|
102
|
+
- Soporte técnico especializado
|
|
103
|
+
- Actualizaciones regulares conforme a cambios del SAT
|
|
52
104
|
|
|
53
105
|
## 📦 Instalación
|
|
54
106
|
|
|
@@ -305,12 +357,22 @@ else:
|
|
|
305
357
|
|
|
306
358
|
## 📋 Operaciones Principales
|
|
307
359
|
|
|
308
|
-
- **Facturas (CFDI)**
|
|
360
|
+
- **Facturas (CFDI)**
|
|
309
361
|
Crear facturas de ingreso, notas de crédito, complementos de pago, cancelaciones, generación de PDF/XML.
|
|
310
|
-
- **Personas (Clientes/Emisores)**
|
|
362
|
+
- **Personas (Clientes/Emisores)**
|
|
311
363
|
Alta y administración de personas, gestión de certificados (CSD).
|
|
312
|
-
- **Productos y Servicios**
|
|
364
|
+
- **Productos y Servicios**
|
|
313
365
|
Administración de catálogos de productos, búsqueda en catálogos SAT.
|
|
366
|
+
- **Timbres**
|
|
367
|
+
Listar transacciones, transferir y retirar timbres entre personas.
|
|
368
|
+
|
|
369
|
+
## 📂 Más Ejemplos
|
|
370
|
+
|
|
371
|
+
- [Gestión de Timbres](examples/ejemplos-timbres.py)
|
|
372
|
+
- [Complementos de Pago](examples/ejemplos-facturas-de-complemento-pago.py)
|
|
373
|
+
- [Facturas de Nómina](examples/ejemplos-facturas-de-nomina.py)
|
|
374
|
+
- [Impuestos Locales (Por Valores)](examples/ejemplos-factura-impuestos-locales-valores.py)
|
|
375
|
+
- [Impuestos Locales (Por Referencias)](examples/ejemplos-factura-impuestos-locales-referencias.py)
|
|
314
376
|
|
|
315
377
|
## 🤝 Contribuir
|
|
316
378
|
|
|
@@ -336,10 +398,10 @@ Este proyecto está licenciado bajo la Licencia **MPL**. Consulta el archivo [LI
|
|
|
336
398
|
- [Documentación Oficial](https://docs.fiscalapi.com)
|
|
337
399
|
- [Como obtener mis credenciales](https://docs.fiscalapi.com/credentials-info)
|
|
338
400
|
- [Portal de FiscalAPI](https://fiscalapi.com)
|
|
339
|
-
- [Ejemplos en Python](https://github.com/FiscalAPI/fiscalapi-samples-python)
|
|
340
401
|
- [Soporte técnico](https://fiscalapi.com/contact-us)
|
|
341
|
-
- [Certificados prueba](https://docs.fiscalapi.com/tax-files-info)
|
|
342
|
-
|
|
402
|
+
- [Certificados de prueba](https://docs.fiscalapi.com/tax-files-info)
|
|
403
|
+
- [Postman Collection](https://documenter.getpostman.com/view/4346593/2sB2j4eqXr)
|
|
404
|
+
- [SDKs en otros lenguajes](https://docs.fiscalapi.com/sdks)
|
|
343
405
|
---
|
|
344
406
|
|
|
345
407
|
Desarrollado con ❤️ por [Fiscalapi](https://www.fiscalapi.com)
|
|
@@ -5,15 +5,64 @@
|
|
|
5
5
|
|
|
6
6
|
**SDK oficial de FiscalAPI para Python**, la API de facturación CFDI y otros servicios fiscales en México. Simplifica la integración con los servicios de facturación electrónica, eliminando las complejidades del SAT y facilitando la generación de facturas, notas de crédito, complementos de pago, nómina, carta porte, y más. ¡Facturar sin dolor ahora es posible!
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Soporte completo para
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
8
|
+
|
|
9
|
+
## 📋 Facturación CFDI 4.0
|
|
10
|
+
- **Soporte completo para CFDI 4.0** con todas las especificaciones oficiales
|
|
11
|
+
- **Timbrado de facturas de ingreso** con validación automática
|
|
12
|
+
- **Timbrado de notas de crédito** (facturas de egreso)
|
|
13
|
+
- **Timbrado de complementos de pago** en MXN, USD y EUR
|
|
14
|
+
- **Timbrado de facturas de nómina** - Soporte para los 13 tipos de CFDI de nómina
|
|
15
|
+
- **Consulta del estatus de facturas** en el SAT en tiempo real
|
|
16
|
+
- **Cancelación de facturas**
|
|
17
|
+
- **Generación de archivos PDF** de las facturas con formato profesional
|
|
18
|
+
- **Personalización de logos y colores** en los PDF generados
|
|
19
|
+
- **Envío de facturas por correo electrónico** automatizado
|
|
20
|
+
- **Descarga de archivos XML** con estructura completa
|
|
21
|
+
- **Almacenamiento y recuperación** de facturas por 5 años
|
|
22
|
+
- Dos [modos de operación](https://docs.fiscalapi.com/modes-of-operation): **Por valores** o **Por referencias**
|
|
16
23
|
- [Ejemplos en Python](https://github.com/FiscalAPI/fiscalapi-samples-python)
|
|
24
|
+
|
|
25
|
+
## 📥 Descarga Masiva
|
|
26
|
+
- **Acceso a catálogos de descarga masiva** del SAT
|
|
27
|
+
- **Descarga de CFDI y Metadatos** en lotes grandes
|
|
28
|
+
- **Descarga masiva XML** con filtros personalizados
|
|
29
|
+
- **Reglas de descarga automática por RFC**
|
|
30
|
+
- **Solicitudes de descarga** via API y Dashboard.
|
|
31
|
+
- **Automatización de solicitudes de descarga**
|
|
32
|
+
|
|
33
|
+
## 👥 Gestión de Personas
|
|
34
|
+
- **Administración de personas** (emisores, receptores, clientes, usuarios, etc.)
|
|
35
|
+
- **Gestión de certificados CSD y FIEL** (subir archivos .cer y .key a FiscalAPI)
|
|
36
|
+
- **Configuración de datos fiscales** (RFC, domicilio fiscal, régimen fiscal)
|
|
37
|
+
- **Datos de empleado** (agrega/actualiza/elimina datos de empleado a una persona. CFDI Nómina)
|
|
38
|
+
- **Datos de empleador** (agrega/actualiza/elimina datos de empleador a una persona. CFDI Nómina)
|
|
39
|
+
|
|
40
|
+
## 🎖️ Gestión de Timbres
|
|
41
|
+
- **Gestión de folios fiscales** Compra timbres a fiscalapi y transfiere/retira a las personas de tu organizacion segun tus reglas de negocio.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## 🛍️ Gestión de Productos/Servicios
|
|
45
|
+
- **Gestión de productos y servicios** con catálogo personalizable
|
|
46
|
+
- **Administración de impuestos aplicables** (IVA, ISR, IEPS)
|
|
47
|
+
|
|
48
|
+
## 📚 Consulta de Catálogos SAT
|
|
49
|
+
- **Consulta en catálogos oficiales del SAT** actualizados
|
|
50
|
+
- **Consulta en catálogos oficiales de Descarga masiva del SAT** actualizados
|
|
51
|
+
- **Búsqueda de información** en catálogos del SAT con filtros avanzados
|
|
52
|
+
- **Acceso y búsqueda** en catálogos completos
|
|
53
|
+
|
|
54
|
+
## 🎫 Gestión de Timbres
|
|
55
|
+
- **Listar transacciones de timbres** con paginación
|
|
56
|
+
- **Consultar transacciones** por ID
|
|
57
|
+
- **Transferir timbres** entre personas
|
|
58
|
+
- **Retirar timbres** de una persona
|
|
59
|
+
|
|
60
|
+
## 📖 Recursos Adicionales
|
|
61
|
+
- **Cientos de ejemplos de código** disponibles en múltiples lenguajes de programación
|
|
62
|
+
- Documentación completa con guías paso a paso
|
|
63
|
+
- Ejemplos prácticos para casos de uso comunes
|
|
64
|
+
- Soporte técnico especializado
|
|
65
|
+
- Actualizaciones regulares conforme a cambios del SAT
|
|
17
66
|
|
|
18
67
|
## 📦 Instalación
|
|
19
68
|
|
|
@@ -270,12 +319,22 @@ else:
|
|
|
270
319
|
|
|
271
320
|
## 📋 Operaciones Principales
|
|
272
321
|
|
|
273
|
-
- **Facturas (CFDI)**
|
|
322
|
+
- **Facturas (CFDI)**
|
|
274
323
|
Crear facturas de ingreso, notas de crédito, complementos de pago, cancelaciones, generación de PDF/XML.
|
|
275
|
-
- **Personas (Clientes/Emisores)**
|
|
324
|
+
- **Personas (Clientes/Emisores)**
|
|
276
325
|
Alta y administración de personas, gestión de certificados (CSD).
|
|
277
|
-
- **Productos y Servicios**
|
|
326
|
+
- **Productos y Servicios**
|
|
278
327
|
Administración de catálogos de productos, búsqueda en catálogos SAT.
|
|
328
|
+
- **Timbres**
|
|
329
|
+
Listar transacciones, transferir y retirar timbres entre personas.
|
|
330
|
+
|
|
331
|
+
## 📂 Más Ejemplos
|
|
332
|
+
|
|
333
|
+
- [Gestión de Timbres](examples/ejemplos-timbres.py)
|
|
334
|
+
- [Complementos de Pago](examples/ejemplos-facturas-de-complemento-pago.py)
|
|
335
|
+
- [Facturas de Nómina](examples/ejemplos-facturas-de-nomina.py)
|
|
336
|
+
- [Impuestos Locales (Por Valores)](examples/ejemplos-factura-impuestos-locales-valores.py)
|
|
337
|
+
- [Impuestos Locales (Por Referencias)](examples/ejemplos-factura-impuestos-locales-referencias.py)
|
|
279
338
|
|
|
280
339
|
## 🤝 Contribuir
|
|
281
340
|
|
|
@@ -301,10 +360,10 @@ Este proyecto está licenciado bajo la Licencia **MPL**. Consulta el archivo [LI
|
|
|
301
360
|
- [Documentación Oficial](https://docs.fiscalapi.com)
|
|
302
361
|
- [Como obtener mis credenciales](https://docs.fiscalapi.com/credentials-info)
|
|
303
362
|
- [Portal de FiscalAPI](https://fiscalapi.com)
|
|
304
|
-
- [Ejemplos en Python](https://github.com/FiscalAPI/fiscalapi-samples-python)
|
|
305
363
|
- [Soporte técnico](https://fiscalapi.com/contact-us)
|
|
306
|
-
- [Certificados prueba](https://docs.fiscalapi.com/tax-files-info)
|
|
307
|
-
|
|
364
|
+
- [Certificados de prueba](https://docs.fiscalapi.com/tax-files-info)
|
|
365
|
+
- [Postman Collection](https://documenter.getpostman.com/view/4346593/2sB2j4eqXr)
|
|
366
|
+
- [SDKs en otros lenguajes](https://docs.fiscalapi.com/sdks)
|
|
308
367
|
---
|
|
309
368
|
|
|
310
369
|
Desarrollado con ❤️ por [Fiscalapi](https://www.fiscalapi.com)
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"""
|
|
2
|
+
FiscalAPI Python SDK
|
|
3
|
+
|
|
4
|
+
SDK oficial para integración con FiscalAPI, la plataforma de facturación
|
|
5
|
+
electrónica (CFDI 4.0) y servicios fiscales de México.
|
|
6
|
+
|
|
7
|
+
Ejemplo de uso:
|
|
8
|
+
>>> from fiscalapi import FiscalApiClient, FiscalApiSettings
|
|
9
|
+
>>> settings = FiscalApiSettings(api_url="...", api_key="...", tenant="...")
|
|
10
|
+
>>> client = FiscalApiClient(settings=settings)
|
|
11
|
+
>>> response = client.invoices.get_list(page_number=1, page_size=10)
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
# Modelos base
|
|
15
|
+
from .models.common_models import (
|
|
16
|
+
ApiResponse,
|
|
17
|
+
BaseDto,
|
|
18
|
+
CatalogDto,
|
|
19
|
+
FiscalApiSettings,
|
|
20
|
+
PagedList,
|
|
21
|
+
ValidationFailure,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
# Modelos de dominio
|
|
25
|
+
from .models.fiscalapi_models import (
|
|
26
|
+
# Product models
|
|
27
|
+
ProductTax,
|
|
28
|
+
Product,
|
|
29
|
+
# Person models
|
|
30
|
+
Person,
|
|
31
|
+
EmployeeData,
|
|
32
|
+
EmployerData,
|
|
33
|
+
TaxFile,
|
|
34
|
+
# Invoice issuer/recipient models
|
|
35
|
+
InvoiceIssuerEmployerData,
|
|
36
|
+
InvoiceRecipientEmployeeData,
|
|
37
|
+
TaxCredential,
|
|
38
|
+
InvoiceIssuer,
|
|
39
|
+
InvoiceRecipient,
|
|
40
|
+
# Invoice item models
|
|
41
|
+
ItemTax,
|
|
42
|
+
ItemOnBehalfOf,
|
|
43
|
+
ItemCustomsInfo,
|
|
44
|
+
ItemPropertyInfo,
|
|
45
|
+
ItemPart,
|
|
46
|
+
InvoiceItem,
|
|
47
|
+
# Invoice related models
|
|
48
|
+
GlobalInformation,
|
|
49
|
+
RelatedInvoice,
|
|
50
|
+
PaidInvoiceTax,
|
|
51
|
+
PaidInvoice,
|
|
52
|
+
InvoicePayment,
|
|
53
|
+
# Complement models
|
|
54
|
+
LocalTax,
|
|
55
|
+
LocalTaxesComplement,
|
|
56
|
+
PaymentComplement,
|
|
57
|
+
PayrollStockOptions,
|
|
58
|
+
PayrollOvertime,
|
|
59
|
+
PayrollEarning,
|
|
60
|
+
PayrollBalanceCompensation,
|
|
61
|
+
PayrollOtherPayment,
|
|
62
|
+
PayrollRetirement,
|
|
63
|
+
PayrollSeverance,
|
|
64
|
+
PayrollEarningsComplement,
|
|
65
|
+
PayrollDeduction,
|
|
66
|
+
PayrollDisability,
|
|
67
|
+
PayrollComplement,
|
|
68
|
+
LadingComplement,
|
|
69
|
+
InvoiceComplement,
|
|
70
|
+
# Invoice models
|
|
71
|
+
InvoiceResponse,
|
|
72
|
+
Invoice,
|
|
73
|
+
CancelInvoiceRequest,
|
|
74
|
+
CancelInvoiceResponse,
|
|
75
|
+
CreatePdfRequest,
|
|
76
|
+
FileResponse,
|
|
77
|
+
SendInvoiceRequest,
|
|
78
|
+
InvoiceStatusRequest,
|
|
79
|
+
InvoiceStatusResponse,
|
|
80
|
+
# API Key models
|
|
81
|
+
ApiKey,
|
|
82
|
+
# Download models
|
|
83
|
+
DownloadRule,
|
|
84
|
+
DownloadRequest,
|
|
85
|
+
MetadataItem,
|
|
86
|
+
# XML models
|
|
87
|
+
XmlGlobalInformation,
|
|
88
|
+
XmlIssuer,
|
|
89
|
+
XmlRecipient,
|
|
90
|
+
XmlRelated,
|
|
91
|
+
XmlTax,
|
|
92
|
+
XmlItemCustomsInformation,
|
|
93
|
+
XmlItemPropertyAccount,
|
|
94
|
+
XmlItemTax,
|
|
95
|
+
XmlItem,
|
|
96
|
+
XmlComplement,
|
|
97
|
+
Xml,
|
|
98
|
+
# Stamp models
|
|
99
|
+
UserLookupDto,
|
|
100
|
+
StampTransaction,
|
|
101
|
+
StampTransactionParams,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
# Servicios
|
|
105
|
+
from .services.base_service import BaseService
|
|
106
|
+
from .services.api_key_service import ApiKeyService
|
|
107
|
+
from .services.catalog_service import CatalogService
|
|
108
|
+
from .services.download_catalog_service import DownloadCatalogService
|
|
109
|
+
from .services.download_request_service import DownloadRequestService
|
|
110
|
+
from .services.download_rule_service import DownloadRuleService
|
|
111
|
+
from .services.employee_service import EmployeeService
|
|
112
|
+
from .services.employer_service import EmployerService
|
|
113
|
+
from .services.invoice_service import InvoiceService
|
|
114
|
+
from .services.people_service import PeopleService
|
|
115
|
+
from .services.product_service import ProductService
|
|
116
|
+
from .services.tax_file_service import TaxFileService
|
|
117
|
+
from .services.stamp_service import StampService
|
|
118
|
+
|
|
119
|
+
# Cliente principal
|
|
120
|
+
from .services.fiscalapi_client import FiscalApiClient
|
|
121
|
+
|
|
122
|
+
__all__ = [
|
|
123
|
+
# Modelos base
|
|
124
|
+
"ApiResponse",
|
|
125
|
+
"BaseDto",
|
|
126
|
+
"CatalogDto",
|
|
127
|
+
"FiscalApiSettings",
|
|
128
|
+
"PagedList",
|
|
129
|
+
"ValidationFailure",
|
|
130
|
+
# Product models
|
|
131
|
+
"ProductTax",
|
|
132
|
+
"Product",
|
|
133
|
+
# Person models
|
|
134
|
+
"Person",
|
|
135
|
+
"EmployeeData",
|
|
136
|
+
"EmployerData",
|
|
137
|
+
"TaxFile",
|
|
138
|
+
# Invoice issuer/recipient models
|
|
139
|
+
"InvoiceIssuerEmployerData",
|
|
140
|
+
"InvoiceRecipientEmployeeData",
|
|
141
|
+
"TaxCredential",
|
|
142
|
+
"InvoiceIssuer",
|
|
143
|
+
"InvoiceRecipient",
|
|
144
|
+
# Invoice item models
|
|
145
|
+
"ItemTax",
|
|
146
|
+
"ItemOnBehalfOf",
|
|
147
|
+
"ItemCustomsInfo",
|
|
148
|
+
"ItemPropertyInfo",
|
|
149
|
+
"ItemPart",
|
|
150
|
+
"InvoiceItem",
|
|
151
|
+
# Invoice related models
|
|
152
|
+
"GlobalInformation",
|
|
153
|
+
"RelatedInvoice",
|
|
154
|
+
"PaidInvoiceTax",
|
|
155
|
+
"PaidInvoice",
|
|
156
|
+
"InvoicePayment",
|
|
157
|
+
# Complement models
|
|
158
|
+
"LocalTax",
|
|
159
|
+
"LocalTaxesComplement",
|
|
160
|
+
"PaymentComplement",
|
|
161
|
+
"PayrollStockOptions",
|
|
162
|
+
"PayrollOvertime",
|
|
163
|
+
"PayrollEarning",
|
|
164
|
+
"PayrollBalanceCompensation",
|
|
165
|
+
"PayrollOtherPayment",
|
|
166
|
+
"PayrollRetirement",
|
|
167
|
+
"PayrollSeverance",
|
|
168
|
+
"PayrollEarningsComplement",
|
|
169
|
+
"PayrollDeduction",
|
|
170
|
+
"PayrollDisability",
|
|
171
|
+
"PayrollComplement",
|
|
172
|
+
"LadingComplement",
|
|
173
|
+
"InvoiceComplement",
|
|
174
|
+
# Invoice models
|
|
175
|
+
"InvoiceResponse",
|
|
176
|
+
"Invoice",
|
|
177
|
+
"CancelInvoiceRequest",
|
|
178
|
+
"CancelInvoiceResponse",
|
|
179
|
+
"CreatePdfRequest",
|
|
180
|
+
"FileResponse",
|
|
181
|
+
"SendInvoiceRequest",
|
|
182
|
+
"InvoiceStatusRequest",
|
|
183
|
+
"InvoiceStatusResponse",
|
|
184
|
+
# API Key models
|
|
185
|
+
"ApiKey",
|
|
186
|
+
# Download models
|
|
187
|
+
"DownloadRule",
|
|
188
|
+
"DownloadRequest",
|
|
189
|
+
"MetadataItem",
|
|
190
|
+
# XML models
|
|
191
|
+
"XmlGlobalInformation",
|
|
192
|
+
"XmlIssuer",
|
|
193
|
+
"XmlRecipient",
|
|
194
|
+
"XmlRelated",
|
|
195
|
+
"XmlTax",
|
|
196
|
+
"XmlItemCustomsInformation",
|
|
197
|
+
"XmlItemPropertyAccount",
|
|
198
|
+
"XmlItemTax",
|
|
199
|
+
"XmlItem",
|
|
200
|
+
"XmlComplement",
|
|
201
|
+
"Xml",
|
|
202
|
+
# Stamp models
|
|
203
|
+
"UserLookupDto",
|
|
204
|
+
"StampTransaction",
|
|
205
|
+
"StampTransactionParams",
|
|
206
|
+
# Servicios
|
|
207
|
+
"BaseService",
|
|
208
|
+
"ApiKeyService",
|
|
209
|
+
"CatalogService",
|
|
210
|
+
"DownloadCatalogService",
|
|
211
|
+
"DownloadRequestService",
|
|
212
|
+
"DownloadRuleService",
|
|
213
|
+
"EmployeeService",
|
|
214
|
+
"EmployerService",
|
|
215
|
+
"InvoiceService",
|
|
216
|
+
"PeopleService",
|
|
217
|
+
"ProductService",
|
|
218
|
+
"TaxFileService",
|
|
219
|
+
"StampService",
|
|
220
|
+
# Cliente principal
|
|
221
|
+
"FiscalApiClient",
|
|
222
|
+
]
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"""Modelos de FiscalAPI."""
|
|
2
|
+
|
|
3
|
+
from .common_models import (
|
|
4
|
+
ApiResponse,
|
|
5
|
+
BaseDto,
|
|
6
|
+
CatalogDto,
|
|
7
|
+
FiscalApiSettings,
|
|
8
|
+
PagedList,
|
|
9
|
+
ValidationFailure,
|
|
10
|
+
)
|
|
11
|
+
from .fiscalapi_models import (
|
|
12
|
+
# Product models
|
|
13
|
+
ProductTax,
|
|
14
|
+
Product,
|
|
15
|
+
# Person models
|
|
16
|
+
Person,
|
|
17
|
+
EmployeeData,
|
|
18
|
+
EmployerData,
|
|
19
|
+
TaxFile,
|
|
20
|
+
# Invoice issuer/recipient models
|
|
21
|
+
InvoiceIssuerEmployerData,
|
|
22
|
+
InvoiceRecipientEmployeeData,
|
|
23
|
+
TaxCredential,
|
|
24
|
+
InvoiceIssuer,
|
|
25
|
+
InvoiceRecipient,
|
|
26
|
+
# Invoice item models
|
|
27
|
+
ItemTax,
|
|
28
|
+
ItemOnBehalfOf,
|
|
29
|
+
ItemCustomsInfo,
|
|
30
|
+
ItemPropertyInfo,
|
|
31
|
+
ItemPart,
|
|
32
|
+
InvoiceItem,
|
|
33
|
+
# Invoice related models
|
|
34
|
+
GlobalInformation,
|
|
35
|
+
RelatedInvoice,
|
|
36
|
+
PaidInvoiceTax,
|
|
37
|
+
PaidInvoice,
|
|
38
|
+
InvoicePayment,
|
|
39
|
+
# Complement models
|
|
40
|
+
LocalTax,
|
|
41
|
+
LocalTaxesComplement,
|
|
42
|
+
PaymentComplement,
|
|
43
|
+
PayrollStockOptions,
|
|
44
|
+
PayrollOvertime,
|
|
45
|
+
PayrollEarning,
|
|
46
|
+
PayrollBalanceCompensation,
|
|
47
|
+
PayrollOtherPayment,
|
|
48
|
+
PayrollRetirement,
|
|
49
|
+
PayrollSeverance,
|
|
50
|
+
PayrollEarningsComplement,
|
|
51
|
+
PayrollDeduction,
|
|
52
|
+
PayrollDisability,
|
|
53
|
+
PayrollComplement,
|
|
54
|
+
LadingComplement,
|
|
55
|
+
InvoiceComplement,
|
|
56
|
+
# Invoice models
|
|
57
|
+
InvoiceResponse,
|
|
58
|
+
Invoice,
|
|
59
|
+
CancelInvoiceRequest,
|
|
60
|
+
CancelInvoiceResponse,
|
|
61
|
+
CreatePdfRequest,
|
|
62
|
+
FileResponse,
|
|
63
|
+
SendInvoiceRequest,
|
|
64
|
+
InvoiceStatusRequest,
|
|
65
|
+
InvoiceStatusResponse,
|
|
66
|
+
# API Key models
|
|
67
|
+
ApiKey,
|
|
68
|
+
# Download models
|
|
69
|
+
DownloadRule,
|
|
70
|
+
DownloadRequest,
|
|
71
|
+
MetadataItem,
|
|
72
|
+
# XML models
|
|
73
|
+
XmlGlobalInformation,
|
|
74
|
+
XmlIssuer,
|
|
75
|
+
XmlRecipient,
|
|
76
|
+
XmlRelated,
|
|
77
|
+
XmlTax,
|
|
78
|
+
XmlItemCustomsInformation,
|
|
79
|
+
XmlItemPropertyAccount,
|
|
80
|
+
XmlItemTax,
|
|
81
|
+
XmlItem,
|
|
82
|
+
XmlComplement,
|
|
83
|
+
Xml,
|
|
84
|
+
# Stamp models
|
|
85
|
+
UserLookupDto,
|
|
86
|
+
StampTransaction,
|
|
87
|
+
StampTransactionParams,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
__all__ = [
|
|
91
|
+
# common_models
|
|
92
|
+
"ApiResponse",
|
|
93
|
+
"BaseDto",
|
|
94
|
+
"CatalogDto",
|
|
95
|
+
"FiscalApiSettings",
|
|
96
|
+
"PagedList",
|
|
97
|
+
"ValidationFailure",
|
|
98
|
+
# Product models
|
|
99
|
+
"ProductTax",
|
|
100
|
+
"Product",
|
|
101
|
+
# Person models
|
|
102
|
+
"Person",
|
|
103
|
+
"EmployeeData",
|
|
104
|
+
"EmployerData",
|
|
105
|
+
"TaxFile",
|
|
106
|
+
# Invoice issuer/recipient models
|
|
107
|
+
"InvoiceIssuerEmployerData",
|
|
108
|
+
"InvoiceRecipientEmployeeData",
|
|
109
|
+
"TaxCredential",
|
|
110
|
+
"InvoiceIssuer",
|
|
111
|
+
"InvoiceRecipient",
|
|
112
|
+
# Invoice item models
|
|
113
|
+
"ItemTax",
|
|
114
|
+
"ItemOnBehalfOf",
|
|
115
|
+
"ItemCustomsInfo",
|
|
116
|
+
"ItemPropertyInfo",
|
|
117
|
+
"ItemPart",
|
|
118
|
+
"InvoiceItem",
|
|
119
|
+
# Invoice related models
|
|
120
|
+
"GlobalInformation",
|
|
121
|
+
"RelatedInvoice",
|
|
122
|
+
"PaidInvoiceTax",
|
|
123
|
+
"PaidInvoice",
|
|
124
|
+
"InvoicePayment",
|
|
125
|
+
# Complement models
|
|
126
|
+
"LocalTax",
|
|
127
|
+
"LocalTaxesComplement",
|
|
128
|
+
"PaymentComplement",
|
|
129
|
+
"PayrollStockOptions",
|
|
130
|
+
"PayrollOvertime",
|
|
131
|
+
"PayrollEarning",
|
|
132
|
+
"PayrollBalanceCompensation",
|
|
133
|
+
"PayrollOtherPayment",
|
|
134
|
+
"PayrollRetirement",
|
|
135
|
+
"PayrollSeverance",
|
|
136
|
+
"PayrollEarningsComplement",
|
|
137
|
+
"PayrollDeduction",
|
|
138
|
+
"PayrollDisability",
|
|
139
|
+
"PayrollComplement",
|
|
140
|
+
"LadingComplement",
|
|
141
|
+
"InvoiceComplement",
|
|
142
|
+
# Invoice models
|
|
143
|
+
"InvoiceResponse",
|
|
144
|
+
"Invoice",
|
|
145
|
+
"CancelInvoiceRequest",
|
|
146
|
+
"CancelInvoiceResponse",
|
|
147
|
+
"CreatePdfRequest",
|
|
148
|
+
"FileResponse",
|
|
149
|
+
"SendInvoiceRequest",
|
|
150
|
+
"InvoiceStatusRequest",
|
|
151
|
+
"InvoiceStatusResponse",
|
|
152
|
+
# API Key models
|
|
153
|
+
"ApiKey",
|
|
154
|
+
# Download models
|
|
155
|
+
"DownloadRule",
|
|
156
|
+
"DownloadRequest",
|
|
157
|
+
"MetadataItem",
|
|
158
|
+
# XML models
|
|
159
|
+
"XmlGlobalInformation",
|
|
160
|
+
"XmlIssuer",
|
|
161
|
+
"XmlRecipient",
|
|
162
|
+
"XmlRelated",
|
|
163
|
+
"XmlTax",
|
|
164
|
+
"XmlItemCustomsInformation",
|
|
165
|
+
"XmlItemPropertyAccount",
|
|
166
|
+
"XmlItemTax",
|
|
167
|
+
"XmlItem",
|
|
168
|
+
"XmlComplement",
|
|
169
|
+
"Xml",
|
|
170
|
+
# Stamp models
|
|
171
|
+
"UserLookupDto",
|
|
172
|
+
"StampTransaction",
|
|
173
|
+
"StampTransactionParams",
|
|
174
|
+
]
|