Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stripe: Move non class specific function outside.
Aman Agrawal0286f10816e2
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.pyindex c4ae317540b..2652830f6cb 100644--- a/corporate/lib/stripe.py+++ b/corporate/lib/stripe.py@@ -467,6 +467,10 @@ def stripe_get_customer(stripe_customer_id: str) -> stripe.Customer:)+def sponsorship_org_type_key_helper(d: Any) -> int:+ return d[1]["display_order"]++class PriceArgs(TypedDict, total=False):amount: intunit_amount: int@@ -703,9 +707,6 @@ class BillingSession(ABC):def on_paid_plan(self) -> bool:pass- def sponsorship_org_type_key_helper(self, d: Any) -> int:- return d[1]["display_order"]-@abstractmethoddef add_sponsorship_info_to_context(self, context: Dict[str, Any]) -> None:pass@@ -2255,7 +2256,7 @@ class RealmBillingSession(BillingSession):for (org_type_name, org_type) in Realm.ORG_TYPES.items()if not org_type.get("hidden")),- key=self.sponsorship_org_type_key_helper,+ key=sponsorship_org_type_key_helper,),)@@ -2507,7 +2508,7 @@ class RemoteRealmBillingSession(BillingSession): # nocoveragefor (org_type_name, org_type) in Realm.ORG_TYPES.items()if not org_type.get("hidden")),- key=self.sponsorship_org_type_key_helper,+ key=sponsorship_org_type_key_helper,),)@@ -2752,7 +2753,7 @@ class RemoteServerBillingSession(BillingSession): # nocoveragefor (org_type_name, org_type) in Realm.ORG_TYPES.items()if not org_type.get("hidden")),- key=self.sponsorship_org_type_key_helper,+ key=sponsorship_org_type_key_helper,),)