Add new Quay pricing plans

This commit is contained in:
Joseph Schorr 2017-12-15 14:28:57 -05:00
parent 0a176d0abe
commit 097cbbeaae
2 changed files with 133 additions and 35 deletions

View file

@ -6,7 +6,7 @@ from calendar import timegm
from util.morecollections import AttrDict from util.morecollections import AttrDict
PLANS = [ PLANS = [
# Deprecated Plans # Deprecated Plans (2013-2014)
{ {
'title': 'Micro', 'title': 'Micro',
'price': 700, 'price': 700,
@ -16,7 +16,7 @@ PLANS = [
'bus_features': False, 'bus_features': False,
'deprecated': True, 'deprecated': True,
'free_trial_days': 14, 'free_trial_days': 14,
'superseded_by': None, 'superseded_by': 'personal-30',
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
@ -28,7 +28,7 @@ PLANS = [
'bus_features': False, 'bus_features': False,
'deprecated': True, 'deprecated': True,
'free_trial_days': 14, 'free_trial_days': 14,
'superseded_by': None, 'superseded_by': 'bus-micro-30',
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
@ -104,7 +104,105 @@ PLANS = [
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
# Active plans # Deprecated plans (2014-2017)
{
'title': 'Personal',
'price': 1200,
'privateRepos': 5,
'stripeId': 'personal-30',
'audience': 'Individuals',
'bus_features': False,
'deprecated': True,
'free_trial_days': 30,
'superseded_by': 'personal-2018',
'plans_page_hidden': False,
},
{
'title': 'Skiff',
'price': 2500,
'privateRepos': 10,
'stripeId': 'bus-micro-30',
'audience': 'For startups',
'bus_features': True,
'deprecated': True,
'free_trial_days': 30,
'superseded_by': 'bus-micro-2018',
'plans_page_hidden': False,
},
{
'title': 'Yacht',
'price': 5000,
'privateRepos': 20,
'stripeId': 'bus-small-30',
'audience': 'For small businesses',
'bus_features': True,
'deprecated': True,
'free_trial_days': 30,
'superseded_by': 'bus-small-2018',
'plans_page_hidden': False,
},
{
'title': 'Freighter',
'price': 10000,
'privateRepos': 50,
'stripeId': 'bus-medium-30',
'audience': 'For normal businesses',
'bus_features': True,
'deprecated': True,
'free_trial_days': 30,
'superseded_by': 'bus-medium-2018',
'plans_page_hidden': False,
},
{
'title': 'Tanker',
'price': 20000,
'privateRepos': 125,
'stripeId': 'bus-large-30',
'audience': 'For large businesses',
'bus_features': True,
'deprecated': True,
'free_trial_days': 30,
'superseded_by': 'bus-large-2018',
'plans_page_hidden': False,
},
{
'title': 'Carrier',
'price': 35000,
'privateRepos': 250,
'stripeId': 'bus-xlarge-30',
'audience': 'For extra large businesses',
'bus_features': True,
'deprecated': True,
'free_trial_days': 30,
'superseded_by': 'bus-xlarge-2018',
'plans_page_hidden': False,
},
{
'title': 'Huge',
'price': 65000,
'privateRepos': 500,
'stripeId': 'bus-500-30',
'audience': 'For huge business',
'bus_features': True,
'deprecated': True,
'free_trial_days': 30,
'superseded_by': 'bus-500-2018',
'plans_page_hidden': False,
},
{
'title': 'Huuge',
'price': 120000,
'privateRepos': 1000,
'stripeId': 'bus-1000-30',
'audience': 'For the SaaS savvy enterprise',
'bus_features': True,
'deprecated': True,
'free_trial_days': 30,
'superseded_by': 'bus-1000-2018',
'plans_page_hidden': False,
},
# Active plans (as of Dec 2017)
{ {
'title': 'Open Source', 'title': 'Open Source',
'price': 0, 'price': 0,
@ -118,10 +216,10 @@ PLANS = [
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
'title': 'Personal', 'title': 'Developer',
'price': 1200, 'price': 1500,
'privateRepos': 5, 'privateRepos': 5,
'stripeId': 'personal-30', 'stripeId': 'personal-2018',
'audience': 'Individuals', 'audience': 'Individuals',
'bus_features': False, 'bus_features': False,
'deprecated': False, 'deprecated': False,
@ -130,10 +228,10 @@ PLANS = [
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
'title': 'Skiff', 'title': 'Micro',
'price': 2500, 'price': 3000,
'privateRepos': 10, 'privateRepos': 10,
'stripeId': 'bus-micro-30', 'stripeId': 'bus-micro-2018',
'audience': 'For startups', 'audience': 'For startups',
'bus_features': True, 'bus_features': True,
'deprecated': False, 'deprecated': False,
@ -142,10 +240,10 @@ PLANS = [
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
'title': 'Yacht', 'title': 'Small',
'price': 5000, 'price': 6000,
'privateRepos': 20, 'privateRepos': 20,
'stripeId': 'bus-small-30', 'stripeId': 'bus-small-2018',
'audience': 'For small businesses', 'audience': 'For small businesses',
'bus_features': True, 'bus_features': True,
'deprecated': False, 'deprecated': False,
@ -154,10 +252,10 @@ PLANS = [
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
'title': 'Freighter', 'title': 'Medium',
'price': 10000, 'price': 12500,
'privateRepos': 50, 'privateRepos': 50,
'stripeId': 'bus-medium-30', 'stripeId': 'bus-medium-2018',
'audience': 'For normal businesses', 'audience': 'For normal businesses',
'bus_features': True, 'bus_features': True,
'deprecated': False, 'deprecated': False,
@ -166,10 +264,10 @@ PLANS = [
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
'title': 'Tanker', 'title': 'Large',
'price': 20000, 'price': 25000,
'privateRepos': 125, 'privateRepos': 125,
'stripeId': 'bus-large-30', 'stripeId': 'bus-large-2018',
'audience': 'For large businesses', 'audience': 'For large businesses',
'bus_features': True, 'bus_features': True,
'deprecated': False, 'deprecated': False,
@ -178,10 +276,10 @@ PLANS = [
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
'title': 'Carrier', 'title': 'Extra Large',
'price': 35000, 'price': 45000,
'privateRepos': 250, 'privateRepos': 250,
'stripeId': 'bus-xlarge-30', 'stripeId': 'bus-xlarge-2018',
'audience': 'For extra large businesses', 'audience': 'For extra large businesses',
'bus_features': True, 'bus_features': True,
'deprecated': False, 'deprecated': False,
@ -190,10 +288,10 @@ PLANS = [
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
'title': 'Huge', 'title': 'XXL',
'price': 65000, 'price': 85000,
'privateRepos': 500, 'privateRepos': 500,
'stripeId': 'bus-500-30', 'stripeId': 'bus-500-2018',
'audience': 'For huge business', 'audience': 'For huge business',
'bus_features': True, 'bus_features': True,
'deprecated': False, 'deprecated': False,
@ -202,10 +300,10 @@ PLANS = [
'plans_page_hidden': False, 'plans_page_hidden': False,
}, },
{ {
'title': 'Huuge', 'title': 'XXXL',
'price': 120000, 'price': 160000,
'privateRepos': 1000, 'privateRepos': 1000,
'stripeId': 'bus-1000-30', 'stripeId': 'bus-1000-2018',
'audience': 'For the SaaS savvy enterprise', 'audience': 'For the SaaS savvy enterprise',
'bus_features': True, 'bus_features': True,
'deprecated': False, 'deprecated': False,

View file

@ -440,14 +440,14 @@ class TestGetUserPrivateAllowed(ApiTestCase):
self.login(ADMIN_ACCESS_USER) self.login(ADMIN_ACCESS_USER)
# Change the subscription of the namespace. # Change the subscription of the namespace.
self.putJsonResponse(UserPlan, data=dict(plan='personal-30')) self.putJsonResponse(UserPlan, data=dict(plan='personal-2018'))
json = self.getJsonResponse(PrivateRepositories) json = self.getJsonResponse(PrivateRepositories)
assert json['privateCount'] >= 6 assert json['privateCount'] >= 6
assert not json['privateAllowed'] assert not json['privateAllowed']
# Change the subscription of the namespace. # Change the subscription of the namespace.
self.putJsonResponse(UserPlan, data=dict(plan='bus-large-30')) self.putJsonResponse(UserPlan, data=dict(plan='bus-large-2018'))
json = self.getJsonResponse(PrivateRepositories) json = self.getJsonResponse(PrivateRepositories)
assert json['privateAllowed'] assert json['privateAllowed']
@ -2019,7 +2019,7 @@ class TestChangeRepoVisibility(ApiTestCase):
self.assertEquals(True, json['is_public']) self.assertEquals(True, json['is_public'])
# Change the subscription of the namespace. # Change the subscription of the namespace.
self.putJsonResponse(UserPlan, data=dict(plan='personal-30')) self.putJsonResponse(UserPlan, data=dict(plan='personal-2018'))
# Try to make private. # Try to make private.
self.postJsonResponse(RepositoryVisibility, params=dict(repository=self.SIMPLE_REPO), self.postJsonResponse(RepositoryVisibility, params=dict(repository=self.SIMPLE_REPO),
@ -3166,11 +3166,11 @@ class TestUserSubscription(ApiTestCase):
self.assertEquals('free', sub['plan']) self.assertEquals('free', sub['plan'])
# Change the plan. # Change the plan.
self.putJsonResponse(UserPlan, data=dict(plan='bus-large-30')) self.putJsonResponse(UserPlan, data=dict(plan='bus-large-2018'))
# Verify # Verify
sub = self.getSubscription() sub = self.getSubscription()
self.assertEquals('bus-large-30', sub['plan']) self.assertEquals('bus-large-2018', sub['plan'])
class TestOrgSubscription(ApiTestCase): class TestOrgSubscription(ApiTestCase):
@ -3190,11 +3190,11 @@ class TestOrgSubscription(ApiTestCase):
# Change the plan. # Change the plan.
self.putJsonResponse(OrganizationPlan, params=dict(orgname=ORGANIZATION), self.putJsonResponse(OrganizationPlan, params=dict(orgname=ORGANIZATION),
data=dict(plan='bus-large-30')) data=dict(plan='bus-large-2018'))
# Verify # Verify
sub = self.getSubscription() sub = self.getSubscription()
self.assertEquals('bus-large-30', sub['plan']) self.assertEquals('bus-large-2018', sub['plan'])
class TestUserRobots(ApiTestCase): class TestUserRobots(ApiTestCase):