Skip to content

Commit

Permalink
Feat(invoice_custom_sections): updated python client with invoice_cus…
Browse files Browse the repository at this point in the history
…tom_sections (#293)

* updated python client with ics

* fix ruff

* rename a parameter
  • Loading branch information
annvelents authored Jan 14, 2025
1 parent e566031 commit 3c2232d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lago_python_client/models/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ class MetadataResponseList(BaseModel):
__root__: List[MetadataResponse]


class InvoiceCustomSection(BaseModel):
lago_id: Optional[str]
code: Optional[str]
name: Optional[str]
description: Optional[str]
details: Optional[str]
display_name: Optional[str]
applied_to_organization: Optional[bool]
created_at: Optional[str]


class InvoiceCustomSectionsResponseList(BaseModel):
__root__: List[InvoiceCustomSection]


class Customer(BaseModel):
external_id: str
address_line1: Optional[str]
Expand Down Expand Up @@ -103,6 +118,8 @@ class Customer(BaseModel):
shipping_address: Optional[Address]
integration_customers: Optional[IntegrationCustomersList]
tax_codes: Optional[List[str]]
skip_invoice_custom_sections: Optional[bool]
invoice_custom_section_codes: Optional[List[str]]


class CustomerResponse(BaseResponseModel):
Expand Down Expand Up @@ -137,3 +154,5 @@ class CustomerResponse(BaseResponseModel):
shipping_address: Optional[Address]
integration_customers: Optional[IntegrationCustomersResponseList]
taxes: Optional[TaxesResponse]
skip_invoice_custom_sections: Optional[bool]
applicable_invoice_custom_sections: Optional[InvoiceCustomSectionsResponseList]
14 changes: 14 additions & 0 deletions lago_python_client/models/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ class InvoiceAppliedTaxes(BaseResponseModel):
__root__: List[InvoiceAppliedTax]


class InvoiceAppliedInvoiceCustomSection(BaseResponseModel):
lago_id: Optional[str]
lago_invoice_id: Optional[str]
code: Optional[str]
details: Optional[str]
display_name: Optional[str]
created_at: Optional[str]


class InvoiceAppliedInvoiceCustomSections(BaseResponseModel):
__root__: List[InvoiceAppliedInvoiceCustomSection]


class InvoiceAppliedUsageThreshold(BaseResponseModel):
lifetime_usage_amount_cents: Optional[int]
created_at: Optional[str]
Expand Down Expand Up @@ -110,5 +123,6 @@ class InvoiceResponse(BaseResponseModel):
credits: Optional[CreditsResponse]
metadata: Optional[InvoiceMetadataList]
applied_taxes: Optional[InvoiceAppliedTaxes]
applied_invoice_custom_sections: Optional[InvoiceAppliedInvoiceCustomSections]
applied_usage_thresholds: Optional[InvoiceAppliedUsageThresholds]
error_details: Optional[ErrorDetailsResponse]

0 comments on commit 3c2232d

Please sign in to comment.