Skip to content

Commit

Permalink
add support for new document numbering fields (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovrocolic authored Dec 11, 2023
1 parent 56d032f commit c411b71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lago_python_client/models/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]]
Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures/organization.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions tests/test_organization_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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


Expand Down

0 comments on commit c411b71

Please sign in to comment.