From d7ba6f261084de59a3de9437e79a66b9f9f9ef0d Mon Sep 17 00:00:00 2001 From: Lovro Colic Date: Mon, 4 Dec 2023 17:32:50 +0100 Subject: [PATCH] add support for new document numbering fields --- lago_python_client/models/organization.py | 4 ++++ tests/fixtures/organization.json | 2 ++ tests/test_organization_client.py | 2 ++ 3 files changed, 8 insertions(+) diff --git a/lago_python_client/models/organization.py b/lago_python_client/models/organization.py index a3b5ba73..0f7ea56f 100644 --- a/lago_python_client/models/organization.py +++ b/lago_python_client/models/organization.py @@ -25,6 +25,8 @@ class Organization(BaseModel): city: Optional[str] legal_name: Optional[str] legal_number: Optional[str] + document_numbering: Optional[str] + document_number_prefix: Optional[str] net_payment_term: Optional[int] tax_identification_number: Optional[str] timezone: Optional[str] @@ -47,6 +49,8 @@ class OrganizationResponse(BaseResponseModel): legal_name: Optional[str] legal_number: Optional[str] net_payment_term: Optional[int] + document_numbering: Optional[str] + document_number_prefix: Optional[str] tax_identification_number: Optional[str] timezone: Optional[str] email_settings: Optional[List[str]] diff --git a/tests/fixtures/organization.json b/tests/fixtures/organization.json index 557bff68..10d45f29 100644 --- a/tests/fixtures/organization.json +++ b/tests/fixtures/organization.json @@ -14,6 +14,8 @@ "city": "city125", "legal_name": null, "legal_number": null, + "document_numbering": "per_customer", + "document_number_prefix": "ORG-1234", "net_payment_term": 0, "tax_identification_number": "EU123456789", "timezone": "America/New_York", diff --git a/tests/test_organization_client.py b/tests/test_organization_client.py index b016f20f..1a28395c 100644 --- a/tests/test_organization_client.py +++ b/tests/test_organization_client.py @@ -15,6 +15,7 @@ def organization_object(): tax_identification_number='EU123456789', net_payment_term=0, default_currency='EUR', + document_number_prefix='ORG-1234', billing_configuration=OrganizationBillingConfiguration( invoice_footer='footer', invoice_grace_period=3, @@ -40,6 +41,7 @@ def test_valid_update_organization_request(httpx_mock: HTTPXMock): assert response.name == 'Hooli' assert response.tax_identification_number == 'EU123456789' + assert response.document_number_prefix == 'ORG-1234' assert response.net_payment_term == 0