billing: Remove mix option from backend.

This commit is contained in:
Rishi Gupta
2019-01-28 21:41:12 -08:00
parent 7331cdc0f5
commit 21b51ba8d1
2 changed files with 2 additions and 3 deletions

View File

@@ -685,7 +685,6 @@ class StripeTest(StripeTestCase):
check_success(False, self.seat_count) check_success(False, self.seat_count)
# Autopay # Autopay
check_success(False, self.seat_count, {'license_management': 'manual'}) check_success(False, self.seat_count, {'license_management': 'manual'})
check_success(False, self.seat_count + 10, {'license_management': 'mix'})
# Invoice # Invoice
check_success(True, self.seat_count + MIN_INVOICED_LICENSES) check_success(True, self.seat_count + MIN_INVOICED_LICENSES)

View File

@@ -42,7 +42,7 @@ def check_upgrade_parameters(
raise BillingError('unknown billing_modality') raise BillingError('unknown billing_modality')
if schedule not in ['annual', 'monthly']: if schedule not in ['annual', 'monthly']:
raise BillingError('unknown schedule') raise BillingError('unknown schedule')
if license_management not in ['automatic', 'manual', 'mix']: if license_management not in ['automatic', 'manual']:
raise BillingError('unknown license_management') raise BillingError('unknown license_management')
if billing_modality == 'charge_automatically': if billing_modality == 'charge_automatically':
@@ -91,7 +91,7 @@ def upgrade(request: HttpRequest, user: UserProfile,
check_upgrade_parameters( check_upgrade_parameters(
billing_modality, schedule, license_management, licenses, billing_modality, schedule, license_management, licenses,
stripe_token is not None, seat_count) stripe_token is not None, seat_count)
automanage_licenses = license_management in ['automatic', 'mix'] automanage_licenses = license_management == 'automatic'
billing_schedule = {'annual': CustomerPlan.ANNUAL, billing_schedule = {'annual': CustomerPlan.ANNUAL,
'monthly': CustomerPlan.MONTHLY}[schedule] 'monthly': CustomerPlan.MONTHLY}[schedule]