populate_billing_realms: Add Zulip Cloud Free realms.

This commit is contained in:
Aman Agrawal 2023-11-03 16:21:42 +00:00 committed by Tim Abbott
parent ac8ad111de
commit c9a55941b0
1 changed files with 10 additions and 1 deletions

View File

@ -40,6 +40,10 @@ class Command(BaseCommand):
customer_profiles = [
# NOTE: The unique_id has to be less than 40 characters.
CustomerProfile(unique_id="sponsorship-pending", sponsorship_pending=True),
CustomerProfile(
unique_id="annual-free",
billing_schedule=CustomerPlan.ANNUAL,
),
CustomerProfile(
unique_id="annual-standard",
billing_schedule=CustomerPlan.ANNUAL,
@ -50,6 +54,10 @@ class Command(BaseCommand):
billing_schedule=CustomerPlan.ANNUAL,
tier=CustomerPlan.PLUS,
),
CustomerProfile(
unique_id="monthly-free",
billing_schedule=CustomerPlan.MONTHLY,
),
CustomerProfile(
unique_id="monthly-standard",
billing_schedule=CustomerPlan.MONTHLY,
@ -145,7 +153,8 @@ class Command(BaseCommand):
)
continue
assert customer_profile.tier is not None
if customer_profile.tier is None:
continue
customer = update_or_create_stripe_customer(user)
assert customer.stripe_customer_id is not None