mirror of https://github.com/zulip/zulip.git
billing: Rename change_plan_at_end_of_cycle to change_plan_status.
This commit is contained in:
parent
28d58c848d
commit
aca80206df
|
@ -22,7 +22,7 @@ v1_api_and_json_patterns = [
|
|||
url(r'^billing/upgrade$', rest_dispatch,
|
||||
{'POST': 'corporate.views.upgrade'}),
|
||||
url(r'^billing/plan/change$', rest_dispatch,
|
||||
{'POST': 'corporate.views.change_plan_at_end_of_cycle'}),
|
||||
{'POST': 'corporate.views.change_plan_status'}),
|
||||
url(r'^billing/sources/change', rest_dispatch,
|
||||
{'POST': 'corporate.views.replace_payment_source'}),
|
||||
]
|
||||
|
|
|
@ -203,9 +203,8 @@ def billing_home(request: HttpRequest) -> HttpResponse:
|
|||
|
||||
@require_billing_access
|
||||
@has_request_variables
|
||||
def change_plan_at_end_of_cycle(request: HttpRequest, user: UserProfile,
|
||||
status: int=REQ("status", validator=check_int)) -> HttpResponse:
|
||||
assert(status in [CustomerPlan.ACTIVE, CustomerPlan.DOWNGRADE_AT_END_OF_CYCLE])
|
||||
def change_plan_status(request: HttpRequest, user: UserProfile,
|
||||
status: int=REQ("status", validator=check_int)) -> HttpResponse:
|
||||
plan = get_current_plan_by_realm(user.realm)
|
||||
assert(plan is not None) # for mypy
|
||||
do_change_plan_status(plan, status)
|
||||
|
|
Loading…
Reference in New Issue