diff --git a/lago_python_client/models/credit_note.py b/lago_python_client/models/credit_note.py index 6d630c1..3a62049 100644 --- a/lago_python_client/models/credit_note.py +++ b/lago_python_client/models/credit_note.py @@ -43,6 +43,7 @@ class CreditNoteResponse(BaseResponseModel): number: Optional[str] lago_invoice_id: Optional[str] invoice_number: Optional[str] + purchase_order_number: Optional[str] credit_status: Optional[str] refund_status: Optional[str] reason: Optional[str] diff --git a/lago_python_client/models/invoice.py b/lago_python_client/models/invoice.py index 78cc040..b5af3b0 100644 --- a/lago_python_client/models/invoice.py +++ b/lago_python_client/models/invoice.py @@ -58,6 +58,7 @@ class OneOffInvoice(BaseModel): payment_method: Optional[PaymentMethod] invoice_custom_section: Optional[InvoiceCustomSectionInput] billing_entity_code: Optional[str] + purchase_order_number: Optional[str] class InvoicePreview(BaseModel): @@ -115,6 +116,7 @@ class InvoiceResponse(BaseResponseModel): lago_id: str sequential_id: Optional[int] number: str + purchase_order_number: Optional[str] issuing_date: Optional[str] payment_dispute_lost_at: Optional[str] payment_due_date: Optional[str] diff --git a/tests/fixtures/invoice.json b/tests/fixtures/invoice.json index a9720db..72f0ced 100644 --- a/tests/fixtures/invoice.json +++ b/tests/fixtures/invoice.json @@ -4,6 +4,7 @@ "billing_entity_code": "test-company", "sequential_id": 15, "number": "LAG-1234-001-002", + "purchase_order_number": "PO-123", "issuing_date": "2022-06-02", "payment_due_date": "2022-06-02", "payment_overdue": false, diff --git a/tests/test_invoice_client.py b/tests/test_invoice_client.py index a3399c7..2cba8cf 100644 --- a/tests/test_invoice_client.py +++ b/tests/test_invoice_client.py @@ -170,6 +170,7 @@ def test_valid_find_invoice_request(httpx_mock: HTTPXMock): response = client.invoices.find(identifier) assert response.lago_id == identifier + assert response.purchase_order_number == "PO-123" def test_invalid_find_invoice_request(httpx_mock: HTTPXMock):