From b7f137cb054e3524d5812e29499b93f648baedaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Semp=C3=A9?= Date: Thu, 26 Sep 2024 15:53:43 +0200 Subject: [PATCH] feat: Add current billing period dates --- lago_python_client/models/subscription.py | 2 ++ tests/fixtures/one_off_invoice.json | 4 +++- tests/fixtures/pending_subscription.json | 4 +++- tests/fixtures/subscription.json | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lago_python_client/models/subscription.py b/lago_python_client/models/subscription.py index 46644c47..e6fb1f9f 100644 --- a/lago_python_client/models/subscription.py +++ b/lago_python_client/models/subscription.py @@ -36,6 +36,8 @@ class SubscriptionResponse(BaseResponseModel): previous_plan_code: Optional[str] next_plan_code: Optional[str] downgrade_plan_date: Optional[str] + current_billing_period_started_at: Optional[str] + current_billing_period_ending_at: Optional[str] class SubscriptionsResponse(BaseResponseModel): diff --git a/tests/fixtures/one_off_invoice.json b/tests/fixtures/one_off_invoice.json index 49ea5f54..995cc3ec 100644 --- a/tests/fixtures/one_off_invoice.json +++ b/tests/fixtures/one_off_invoice.json @@ -84,7 +84,9 @@ "subscription_at": "2022-04-29T08:59:51Z", "previous_plan_code": null, "next_plan_code": null, - "downgrade_plan_date": null + "downgrade_plan_date": null, + "current_billing_period_started_at": "2022-04-29T08:59:51Z", + "current_billing_period_ending_at": "2022-05-29T23:59:59Z" } ], "fees": [ diff --git a/tests/fixtures/pending_subscription.json b/tests/fixtures/pending_subscription.json index 86affad5..ffbbfb44 100644 --- a/tests/fixtures/pending_subscription.json +++ b/tests/fixtures/pending_subscription.json @@ -13,6 +13,8 @@ "subscription_at": "2022-04-29T08:59:51Z", "previous_plan_code": null, "next_plan_code": null, - "downgrade_plan_date": null + "downgrade_plan_date": null, + "current_billing_period_started_at": "2022-04-29T08:59:51Z", + "current_billing_period_ending_at": "2022-05-29T23:59:59Z" } } diff --git a/tests/fixtures/subscription.json b/tests/fixtures/subscription.json index 893ccbe3..40ebcbaa 100644 --- a/tests/fixtures/subscription.json +++ b/tests/fixtures/subscription.json @@ -14,6 +14,8 @@ "subscription_at": "2022-04-29T08:59:51Z", "previous_plan_code": null, "next_plan_code": null, - "downgrade_plan_date": null + "downgrade_plan_date": null, + "current_billing_period_started_at": "2022-04-29T08:59:51Z", + "current_billing_period_ending_at": "2022-05-29T23:59:59Z" } }