Design Movie Subscription Pricing
Model versioned subscription plans, renewal prices, plan-change quotes, prorated adjustments, and retry-safe activation.
For this exercise, assume a streaming catalog offers monthly plans in one currency, with immutable price configurations that define price, maximum concurrent streams, and a bounded feature set.
A subscriber can create a subscription, inspect the next renewal quote, request a plan change effective immediately or at the next renewal, and cancel at the end of the paid period.
An immediate change calculates a deterministic whole-day prorated credit for the unused current plan and a prorated charge for the new plan, rounding half up once per adjustment.
An accepted quote is immutable and may be activated only once against the subscription state and price configuration it quoted; exact retries return the prior result. Existing paid periods retain their original price terms. Design the objects, responsibilities, interfaces, and interactions.
Discounts, taxes, payment-provider integration, refunds, annual plans, and content licensing are outside scope.