fiscalapi 4.0.12__tar.gz → 4.0.142__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.12 → fiscalapi-4.0.142}/PKG-INFO +7 -4
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/README.md +5 -3
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/__init__.py +6 -1
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/models/fiscalapi_models.py +27 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/services/invoice_service.py +18 -1
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi.egg-info/PKG-INFO +7 -4
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/setup.py +1 -1
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/LICENSE.txt +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/models/__init__.py +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/models/common_models.py +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/services/__init__.py +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/services/base_service.py +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/services/catalog_service.py +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/services/fiscalapi_client.py +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/services/people_service.py +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/services/product_service.py +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi/services/tax_file_servive.py +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi.egg-info/SOURCES.txt +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi.egg-info/dependency_links.txt +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi.egg-info/requires.txt +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/fiscalapi.egg-info/top_level.txt +0 -0
- {fiscalapi-4.0.12 → fiscalapi-4.0.142}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: fiscalapi
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.142
|
|
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
|
|
@@ -28,13 +28,14 @@ Dynamic: description-content-type
|
|
|
28
28
|
Dynamic: home-page
|
|
29
29
|
Dynamic: keywords
|
|
30
30
|
Dynamic: license
|
|
31
|
+
Dynamic: license-file
|
|
31
32
|
Dynamic: requires-dist
|
|
32
33
|
Dynamic: requires-python
|
|
33
34
|
Dynamic: summary
|
|
34
35
|
|
|
35
36
|
# FiscalAPI SDK para Python
|
|
36
37
|
|
|
37
|
-
[](https://badge.fury.io/py/fiscalapi)
|
|
38
|
+
[](https://badge.fury.io/py/fiscalapi)
|
|
38
39
|
[](https://github.com/FiscalAPI/fiscalapi-python/blob/main/LICENSE.txt)
|
|
39
40
|
|
|
40
41
|
**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,7 +43,7 @@ Dynamic: summary
|
|
|
42
43
|
## 🚀 Características
|
|
43
44
|
|
|
44
45
|
- Soporte completo para **CFDI 4.0**
|
|
45
|
-
- Compatible con Python 3.
|
|
46
|
+
- Compatible con Python 3.8+
|
|
46
47
|
- Dos modos de operación: **Por valores** o **Por referencias**
|
|
47
48
|
- Manejo simplificado de errores
|
|
48
49
|
- Búsqueda en catálogos del SAT
|
|
@@ -110,6 +111,8 @@ api_response = client.people.create(person)
|
|
|
110
111
|
|
|
111
112
|
### 2. Subir Certificados CSD
|
|
112
113
|
|
|
114
|
+
[Descarga certificados de prueba](https://docs.fiscalapi.com/tax-files-info)
|
|
115
|
+
|
|
113
116
|
```python
|
|
114
117
|
from fiscalapi.models.fiscalapi_models import TaxFile
|
|
115
118
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FiscalAPI SDK para Python
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/py/fiscalapi)
|
|
3
|
+
[](https://badge.fury.io/py/fiscalapi)
|
|
4
4
|
[](https://github.com/FiscalAPI/fiscalapi-python/blob/main/LICENSE.txt)
|
|
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!
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
## 🚀 Características
|
|
9
9
|
|
|
10
10
|
- Soporte completo para **CFDI 4.0**
|
|
11
|
-
- Compatible con Python 3.
|
|
11
|
+
- Compatible con Python 3.8+
|
|
12
12
|
- Dos modos de operación: **Por valores** o **Por referencias**
|
|
13
13
|
- Manejo simplificado de errores
|
|
14
14
|
- Búsqueda en catálogos del SAT
|
|
@@ -76,6 +76,8 @@ api_response = client.people.create(person)
|
|
|
76
76
|
|
|
77
77
|
### 2. Subir Certificados CSD
|
|
78
78
|
|
|
79
|
+
[Descarga certificados de prueba](https://docs.fiscalapi.com/tax-files-info)
|
|
80
|
+
|
|
79
81
|
```python
|
|
80
82
|
from fiscalapi.models.fiscalapi_models import TaxFile
|
|
81
83
|
|
|
@@ -300,4 +302,4 @@ Este proyecto está licenciado bajo la Licencia **MPL**. Consulta el archivo [LI
|
|
|
300
302
|
|
|
301
303
|
---
|
|
302
304
|
|
|
303
|
-
Desarrollado con ❤️ por [Fiscalapi](https://www.fiscalapi.com)
|
|
305
|
+
Desarrollado con ❤️ por [Fiscalapi](https://www.fiscalapi.com)
|
|
@@ -33,6 +33,8 @@ from .models.fiscalapi_models import (
|
|
|
33
33
|
CreatePdfRequest,
|
|
34
34
|
FileResponse,
|
|
35
35
|
SendInvoiceRequest,
|
|
36
|
+
InvoiceStatusRequest,
|
|
37
|
+
InvoiceStatusResponse,
|
|
36
38
|
)
|
|
37
39
|
|
|
38
40
|
# Re-exportar servicios
|
|
@@ -75,7 +77,10 @@ __all__ = [
|
|
|
75
77
|
"CreatePdfRequest",
|
|
76
78
|
"FileResponse",
|
|
77
79
|
"SendInvoiceRequest",
|
|
78
|
-
|
|
80
|
+
"InvoiceStatusRequest",
|
|
81
|
+
"InvoiceStatusResponse",
|
|
82
|
+
|
|
83
|
+
|
|
79
84
|
# Servicios
|
|
80
85
|
"CatalogService",
|
|
81
86
|
"InvoiceService",
|
|
@@ -321,3 +321,30 @@ class SendInvoiceRequest(BaseDto):
|
|
|
321
321
|
|
|
322
322
|
class Config:
|
|
323
323
|
populate_by_name = True
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
class InvoiceStatusRequest(BaseDto):
|
|
327
|
+
"""Modelo para consultar estado de facturas."""
|
|
328
|
+
id: Optional[str] = Field(default=None, description="Id de la factura a consultar")
|
|
329
|
+
issuer_tin: Optional[str] = Field(default=None, alias="issuerTin", description="RFC Emisor la factura")
|
|
330
|
+
recipient_tin: Optional[str] = Field(default=None, alias="recipientTin", description="RFC Receptor de la factura")
|
|
331
|
+
invoice_total: Optional[Decimal] = Field(default=None, alias="invoiceTotal", description="Total de la factura")
|
|
332
|
+
invoice_uuid: Optional[str] = Field(default=None, alias="invoiceUuid", description="Folio fiscal factura a consultar")
|
|
333
|
+
last8_digits_issuer_signature: Optional[str] = Field(default=None, alias="last8DigitsIssuerSignature", description="Últimos ocho caracteres del sello digital del emisor")
|
|
334
|
+
|
|
335
|
+
model_config = {
|
|
336
|
+
"populate_by_name": True,
|
|
337
|
+
"json_encoders": {Decimal: str}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
class InvoiceStatusResponse(BaseDto):
|
|
341
|
+
"""Modelo de respuesta de consulta de estado de facturas."""
|
|
342
|
+
status_code: str = Field(..., alias="statusCode", description="Código de estatus retornado por el SAT")
|
|
343
|
+
status: str = Field(..., description="Estado actual de la factura. Posibles valores: 'Vigente' | 'Cancelado' | 'No Encontrado'")
|
|
344
|
+
cancelable_status: str = Field(..., alias="cancelableStatus", description="Indica si la factura es cancelable. Posibles valores: 'Cancelable con aceptación' | 'No cancelable' | 'Cancelable sin aceptación'")
|
|
345
|
+
cancellation_status: str = Field(..., alias="cancellationStatus", description="Detalle del estatus de cancelación")
|
|
346
|
+
efos_validation: str = Field(..., alias="efosValidation", description="Codigo que indica si el RFC Emisor se encuentra dentro de la lista negra de EFOS")
|
|
347
|
+
|
|
348
|
+
model_config = {
|
|
349
|
+
"populate_by_name": True
|
|
350
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from fiscalapi.models.common_models import ApiResponse, PagedList
|
|
2
|
-
from fiscalapi.models.fiscalapi_models import CancelInvoiceRequest, CancelInvoiceResponse, CreatePdfRequest, FileResponse, Invoice, SendInvoiceRequest
|
|
2
|
+
from fiscalapi.models.fiscalapi_models import CancelInvoiceRequest, CancelInvoiceResponse, CreatePdfRequest, FileResponse, Invoice, InvoiceStatusRequest, InvoiceStatusResponse, SendInvoiceRequest
|
|
3
3
|
from fiscalapi.services.base_service import BaseService
|
|
4
4
|
|
|
5
5
|
|
|
@@ -63,4 +63,21 @@ class InvoiceService(BaseService):
|
|
|
63
63
|
|
|
64
64
|
return self.send_request("POST", endpoint, bool, payload=send_invoice_request)
|
|
65
65
|
|
|
66
|
+
# consultar estado de facturas
|
|
67
|
+
def get_status(self, request: InvoiceStatusRequest) -> ApiResponse[InvoiceStatusResponse]:
|
|
68
|
+
"""
|
|
69
|
+
Obtiene el estado de una factura.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
request (InvoiceStatusRequest): Solicitud para consultar estado
|
|
73
|
+
|
|
74
|
+
Returns:
|
|
75
|
+
ApiResponse[InvoiceStatusResponse]: Respuesta con el estado de la factura
|
|
76
|
+
"""
|
|
77
|
+
if request is None:
|
|
78
|
+
raise ValueError("request cannot be null")
|
|
79
|
+
|
|
80
|
+
endpoint = "invoices/status"
|
|
81
|
+
return self.send_request("POST", endpoint, InvoiceStatusResponse, payload=request)
|
|
82
|
+
|
|
66
83
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: fiscalapi
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.142
|
|
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
|
|
@@ -28,13 +28,14 @@ Dynamic: description-content-type
|
|
|
28
28
|
Dynamic: home-page
|
|
29
29
|
Dynamic: keywords
|
|
30
30
|
Dynamic: license
|
|
31
|
+
Dynamic: license-file
|
|
31
32
|
Dynamic: requires-dist
|
|
32
33
|
Dynamic: requires-python
|
|
33
34
|
Dynamic: summary
|
|
34
35
|
|
|
35
36
|
# FiscalAPI SDK para Python
|
|
36
37
|
|
|
37
|
-
[](https://badge.fury.io/py/fiscalapi)
|
|
38
|
+
[](https://badge.fury.io/py/fiscalapi)
|
|
38
39
|
[](https://github.com/FiscalAPI/fiscalapi-python/blob/main/LICENSE.txt)
|
|
39
40
|
|
|
40
41
|
**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,7 +43,7 @@ Dynamic: summary
|
|
|
42
43
|
## 🚀 Características
|
|
43
44
|
|
|
44
45
|
- Soporte completo para **CFDI 4.0**
|
|
45
|
-
- Compatible con Python 3.
|
|
46
|
+
- Compatible con Python 3.8+
|
|
46
47
|
- Dos modos de operación: **Por valores** o **Por referencias**
|
|
47
48
|
- Manejo simplificado de errores
|
|
48
49
|
- Búsqueda en catálogos del SAT
|
|
@@ -110,6 +111,8 @@ api_response = client.people.create(person)
|
|
|
110
111
|
|
|
111
112
|
### 2. Subir Certificados CSD
|
|
112
113
|
|
|
114
|
+
[Descarga certificados de prueba](https://docs.fiscalapi.com/tax-files-info)
|
|
115
|
+
|
|
113
116
|
```python
|
|
114
117
|
from fiscalapi.models.fiscalapi_models import TaxFile
|
|
115
118
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|