Skip to content

Commit

Permalink
feat: Add current billing period dates
Browse files Browse the repository at this point in the history
  • Loading branch information
rsempe committed Sep 26, 2024
1 parent bab5dcd commit b7f137c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lago_python_client/models/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 3 additions & 1 deletion tests/fixtures/one_off_invoice.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
4 changes: 3 additions & 1 deletion tests/fixtures/pending_subscription.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
4 changes: 3 additions & 1 deletion tests/fixtures/subscription.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit b7f137c

Please sign in to comment.