Commit Graph

14 Commits

Author SHA1 Message Date
Rishi Gupta 1a7a449572 billing: Add backend support for downgrading. 2019-04-11 23:27:42 -07:00
Rishi Gupta 447ae77b24 billing: Add another live CustomerPlan.status.
Only CustomerPlan.ACTIVE is being used in the code / in production, so don't
need a db migration to move the other CustomerPlan.status constants around.
2019-04-11 23:20:29 -07:00
Anders Kaseorg f5197518a9 analytics/zilencer/zproject: Remove unused imports.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-02-02 17:31:45 -08:00
Rishi Gupta 8f7e38c559 billing: Remove deprecated billing tables and fields from corporate/models. 2019-01-31 15:12:43 -08:00
Rishi Gupta 9018ef5175 billing: Do not require a Stripe account to store Customer discounts. 2019-01-29 06:09:11 -08:00
Rishi Gupta 421cda0e34 billing: Adding invoicing fields to CustomerPlan. 2019-01-28 16:04:11 -08:00
Rishi Gupta 03c71dad17 billing: Fix misuses of CustomerPlan.discount. 2019-01-28 16:04:11 -08:00
Rishi Gupta ad7a7b246e billing: Move license management from CustomerPlan into its own table. 2019-01-19 16:00:44 +05:30
Rishi Gupta 7958ac96a8 billing: Use CASCADE instead of models.CASCADE in models.py.
models.CASCADE will make lines too long in models we're about to add.
2019-01-18 11:46:17 +05:30
Rishi Gupta e7220fd71f billing: Do subscription management in-house instead of with Stripe Billing.
This is a major rewrite of the billing system. It moves subscription
information off of stripe Subscriptions and into a local CustomerPlan
table.

To keep this manageable, it leaves several things unimplemented
(downgrading, etc), and a variety of other TODOs in the code. There are also
some known regressions, e.g. error-handling on /upgrade is broken.
2018-12-22 13:39:30 -08:00
Rishi Gupta 7ab1406962 billing: Prepare for moving Plan to CustomerPlan.billing_schedule. 2018-12-22 13:30:15 -08:00
Rishi Gupta 7b5d15d254 billing: Move discount to local Customer object.
A lot of the seemingly unrelated test fixture changes are because we're
removing a query to stripe in the upgrade path, in cases when the user's
realm has an existing Customer object.
2018-12-22 13:30:15 -08:00
Rishi Gupta 84a31ca800 billing: Remove BillingProcessor.
Leaving the model in place, so that we can do the database migration by
hand.
2018-12-22 13:30:15 -08:00
Vishnu Ks d8c19cb003 models: Move billing models from zilencer to corporate. 2018-10-11 14:54:29 -07:00