diff --git a/lago_python_client/models/__init__.py b/lago_python_client/models/__init__.py index 13730de..ba2f4cb 100644 --- a/lago_python_client/models/__init__.py +++ b/lago_python_client/models/__init__.py @@ -7,6 +7,10 @@ BillableMetricEvaluateExpression as BillableMetricEvaluateExpression, BillableMetricEvaluateExpressionResponse as BillableMetricEvaluateExpressionResponse, ) +from .billing_period import ( + BillingPeriodResponse as BillingPeriodResponse, + BillingPeriodsResponse as BillingPeriodsResponse, +) from .charge import ( Charge as Charge, Charges as Charges, diff --git a/lago_python_client/models/billing_period.py b/lago_python_client/models/billing_period.py new file mode 100644 index 0000000..e5d1330 --- /dev/null +++ b/lago_python_client/models/billing_period.py @@ -0,0 +1,17 @@ +from typing import List + +from lago_python_client.base_model import BaseResponseModel + + +class BillingPeriodResponse(BaseResponseModel): + lago_subscription_id: str + external_subscription_id: str + subscription_from_datetime: str + subscription_to_datetime: str + charges_from_datetime: str + charges_to_datetime: str + invoicing_reason: str + + +class BillingPeriodsResponse(BaseResponseModel): + __root__: List[BillingPeriodResponse] diff --git a/lago_python_client/models/invoice.py b/lago_python_client/models/invoice.py index 282079f..97d1796 100644 --- a/lago_python_client/models/invoice.py +++ b/lago_python_client/models/invoice.py @@ -2,6 +2,7 @@ from lago_python_client.base_model import BaseModel +from .billing_period import BillingPeriodsResponse from .credit import CreditsResponse from .customer import CustomerResponse from .fee import FeesResponse @@ -118,6 +119,7 @@ class InvoiceResponse(BaseResponseModel): file_url: Optional[str] customer: Optional[CustomerResponse] + billing_periods: Optional[BillingPeriodsResponse] subscriptions: Optional[SubscriptionsResponse] fees: Optional[FeesResponse] credits: Optional[CreditsResponse]