From e3be9b2fbf31d76ec65be38c484e6557a854742b Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 12 Nov 2025 15:11:36 -0500 Subject: Change free plan from monthly to lifetime limit Free tier now has 10 articles total (lifetime) instead of 10 per month. Period boundaries for free users now span from account creation to far future. --- Biz/PodcastItLater/Billing.py | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'Biz') diff --git a/Biz/PodcastItLater/Billing.py b/Biz/PodcastItLater/Billing.py index 025f1aa..4cf1c0e 100644 --- a/Biz/PodcastItLater/Billing.py +++ b/Biz/PodcastItLater/Billing.py @@ -61,7 +61,7 @@ def get_period_boundaries( """Get billing period boundaries for user. For paid users: use Stripe subscription period. - For free users: use current calendar month (UTC). + For free users: lifetime (from account creation to far future). Returns: tuple: (period_start, period_end) as datetime objects @@ -71,20 +71,11 @@ def get_period_boundaries( period_start = datetime.fromisoformat(user["current_period_start"]) period_end = datetime.fromisoformat(user["current_period_end"]) else: - # Free user - use calendar month + # Free user - lifetime limit from account creation + period_start = datetime.fromisoformat(user["created_at"]) + # Set far future end date (100 years from now) now = datetime.now(timezone.utc) - period_start = now.replace( - day=1, - hour=0, - minute=0, - second=0, - microsecond=0, - ) - # Get first day of next month - if now.month == 12: # noqa: PLR2004 - period_end = period_start.replace(year=now.year + 1, month=1) - else: - period_end = period_start.replace(month=now.month + 1) + period_end = now.replace(year=now.year + 100) return period_start, period_end @@ -407,7 +398,7 @@ def get_tier_info(tier: str) -> dict[str, typing.Any]: "name": "Free", "articles_limit": 10, "price": "$0", - "description": "10 articles per month", + "description": "10 articles total", }, "personal": { "name": "Personal", -- cgit v1.2.3