Implement tier downgrades and subscription cancellation
- Add downgrade_subscription() method to SubscriptionManager - Sets pending_tier_id for scheduled downgrade at period end - No immediate charge or refund - User keeps current tier until period end - Returns scheduled downgrade date - Add cancel_subscription() method to SubscriptionManager - Sets cancel_at_period_end flag - User retains access until period end - No refund issued - Returns cancellation date - Add comprehensive tests for both operations - Test downgrade scheduling and no-charge behavior - Test cancellation scheduling and no-refund behavior - Test error cases (no subscription, invalid tier) All 12 subscription tests passing.
Showing
Please
register
or
sign in
to comment