Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lago_python_client/models/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Subscription(BaseModel):
plan_overrides: Optional[PlanOverrides]
payment_method: Optional[PaymentMethod]
invoice_custom_section: Optional[InvoiceCustomSectionInput]
consolidate_invoice: Optional[bool]


class Subscriptions(BaseModel):
Expand Down Expand Up @@ -55,6 +56,7 @@ class SubscriptionResponse(BaseResponseModel):
on_termination_invoice: Optional[str]
payment_method: Optional[PaymentMethod]
applied_invoice_custom_sections: Optional[AppliedInvoiceCustomSections]
consolidate_invoice: Optional[bool]


class SubscriptionsResponse(BaseResponseModel):
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/subscription.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"terminated_at": null,
"on_termination_credit_note": "skip",
"on_termination_invoice": "skip",
"consolidate_invoice": false,
"subscription_at": "2022-04-29T08:59:51Z",
"previous_plan_code": null,
"next_plan_code": null,
Expand Down
2 changes: 2 additions & 0 deletions tests/test_subscription_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def create_subscription():
billing_time="anniversary",
subscription_at="2022-04-29T08:59:51Z",
ending_at="2022-08-29T08:59:51Z",
consolidate_invoice=False,
)


Expand Down Expand Up @@ -85,6 +86,7 @@ def test_valid_create_subscriptions_request(httpx_mock: HTTPXMock):
assert response.billing_time == "anniversary"
assert response.subscription_at == "2022-04-29T08:59:51Z"
assert response.ending_at == "2022-08-29T08:59:51Z"
assert response.consolidate_invoice is False


def test_valid_create_subscriptions_request_with_payment_method(httpx_mock: HTTPXMock):
Expand Down
Loading