Skip to content

Commit b07d370

Browse files
committed
version 4.0.150
1 parent db0097d commit b07d370

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

examples.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ def main ():
230230

231231
#api_response = client.invoices.get_by_id("05341ec6-538d-4d92-938e-acc9b33da47e",True)
232232

233+
# Obtener xml de factura por id
234+
#api_response = client.invoices.get_xml("c7c88cf3-12af-421b-8a9b-b360af8018e9")
235+
#print(api_response)
233236

234237

235238
# Crear factura de ingreso por valores (cURL).

fiscalapi/services/invoice_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ def get_pdf(self, create_pdf_request:CreatePdfRequest) -> ApiResponse[FileRespon
5151

5252
endpoint = "invoices/pdf"
5353
return self.send_request("POST", endpoint, FileResponse, payload=create_pdf_request)
54+
55+
# get invoice's xml by id /api/v4/invoices/<id>/xml
56+
def get_xml(self, invoice_id: int) -> ApiResponse[FileResponse]:
57+
if invoice_id is None:
58+
raise ValueError("invoice_id cannot be null")
59+
60+
endpoint = f"invoices/{invoice_id}/xml"
61+
return self.send_request("GET", endpoint, FileResponse)
5462

5563

5664
# send invoice by email

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
from setuptools import setup, find_packages
44

5-
VERSION = "4.0.149"
5+
VERSION = "4.0.150"
66
# Descripción breve basada en el .csproj
77
DESCRIPTION = "Genera facturas CFDI válidas ante el SAT consumiendo el API de https://www.fiscalapi.com"
88

0 commit comments

Comments
 (0)