Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stripe: Rename add_server_to_legacy_plan.

Aman Agrawaldf2370147561
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index e6b5ac99d6b..3420809e9dd 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -3500,7 +3500,7 @@ class RemoteServerBillingSession(BillingSession): # nocoverage
self.remote_server.org_type = org_type
self.remote_server.save(update_fields=["org_type"])
- def add_server_to_legacy_plan(
+ def migrate_customer_to_legacy_plan(
self,
renewal_date: datetime,
end_date: datetime,
diff --git a/zilencer/management/commands/add_server_to_legacy_plan.py b/zilencer/management/commands/add_server_to_legacy_plan.py
index 96015ffcd55..1765eaec8c3 100644
--- a/zilencer/management/commands/add_server_to_legacy_plan.py
+++ b/zilencer/management/commands/add_server_to_legacy_plan.py
@@ -49,13 +49,13 @@ class Command(BaseCommand):
end_date = datetime.strptime(end_date_str, TIMESTAMP_FORMAT).replace(tzinfo=timezone.utc)
server = RemoteZulipServer.objects.get(id=server_id)
- self.add_server_to_legacy_plan(server, renewal_date, end_date)
+ self.migrate_customer_to_legacy_plan(server, renewal_date, end_date)
- def add_server_to_legacy_plan(
+ def migrate_customer_to_legacy_plan(
self,
server: RemoteZulipServer,
renewal_date: datetime,
end_date: datetime,
) -> None:
billing_schedule = RemoteServerBillingSession(server)
- billing_schedule.add_server_to_legacy_plan(renewal_date, end_date)
+ billing_schedule.migrate_customer_to_legacy_plan(renewal_date, end_date)
diff --git a/zilencer/management/commands/populate_billing_realms.py b/zilencer/management/commands/populate_billing_realms.py
index 4a116980337..c23d9668732 100644
--- a/zilencer/management/commands/populate_billing_realms.py
+++ b/zilencer/management/commands/populate_billing_realms.py
@@ -424,7 +424,7 @@ def populate_remote_server(customer_profile: CustomerProfile) -> Dict[str, str]:
end_date = datetime.strptime(customer_profile.end_date, TIMESTAMP_FORMAT).replace(
tzinfo=timezone.utc
)
- billing_session.add_server_to_legacy_plan(renewal_date, end_date)
+ billing_session.migrate_customer_to_legacy_plan(renewal_date, end_date)
# Scheduled server to upgrade to business plan.
if customer_profile.status == CustomerPlan.SWITCH_PLAN_TIER_AT_PLAN_END:
# This attaches stripe_customer_id to customer.