mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
This moves the logic for `attach_realm_discount`, which is used in the support view, to be in the BillingSession class. Updates the function name to be `attach_discount_to_customer` so that the context is generalized vs realm specific. Updates RealmBillingSession implementation to account for actions that are initiated by a support admin user. Also moves the helper function `get_discount_for_realm` that is only used in support views to `corporate/lib/support.py`.