Skip to content

Commit

Permalink
Split PasswordManagerPlanStore into a second version
Browse files Browse the repository at this point in the history
  • Loading branch information
cturnbull-bitwarden committed Oct 6, 2023
1 parent f55a1d3 commit 90783b6
Show file tree
Hide file tree
Showing 3 changed files with 585 additions and 187 deletions.
194 changes: 8 additions & 186 deletions src/Core/Utilities/PasswordManagerPlanStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,7 @@ public static IEnumerable<Plan> CreatePlan()
HasAdditionalStorageOption = true,
TrialPeriodDays = 7,

Has2fa = true,
HasApi = true,
HasDirectory = true,
HasEvents = true,
HasGroups = true,
HasTotp = true,
UsersGetPremium = true,

UpgradeSortOrder = 2,
DisplaySortOrder = 2,
Expand Down Expand Up @@ -113,13 +107,7 @@ public static IEnumerable<Plan> CreatePlan()
HasAdditionalStorageOption = true,
TrialPeriodDays = 7,

Has2fa = true,
HasApi = true,
HasDirectory = true,
HasEvents = true,
HasGroups = true,
HasTotp = true,
UsersGetPremium = true,

UpgradeSortOrder = 2,
DisplaySortOrder = 2,
Expand Down Expand Up @@ -159,10 +147,6 @@ public static IEnumerable<Plan> CreatePlan()
HasTotp = true,
Has2fa = true,
HasApi = true,
HasSso = true,
HasKeyConnector = true,
HasScim = true,
HasResetPassword = true,
UsersGetPremium = true,
HasCustomPermissions = true,

Expand Down Expand Up @@ -203,10 +187,6 @@ public static IEnumerable<Plan> CreatePlan()
Has2fa = true,
HasApi = true,
HasSelfHost = true,
HasSso = true,
HasKeyConnector = true,
HasScim = true,
HasResetPassword = true,
UsersGetPremium = true,
HasCustomPermissions = true,

Expand Down Expand Up @@ -254,164 +234,6 @@ public static IEnumerable<Plan> CreatePlan()
AllowSeatAutoscale = false,
},
new Plan
{
Type = PlanType.TeamsAnnually2020,
Product = ProductType.Teams,
BitwardenProduct = BitwardenProductType.PasswordManager,
Name = "Teams (Annually) 2020",
IsAnnual = true,
NameLocalizationKey = "planNameTeams",
DescriptionLocalizationKey = "planDescTeams",
CanBeUsedByBusiness = true,
BaseStorageGb = 1,
BaseSeats = 0,

HasAdditionalSeatsOption = true,
HasAdditionalStorageOption = true,
TrialPeriodDays = 7,

Has2fa = true,
HasApi = true,
HasDirectory = true,
HasEvents = true,
HasGroups = true,
HasTotp = true,
UsersGetPremium = true,

UpgradeSortOrder = 2,
DisplaySortOrder = 2,

StripeSeatPlanId = "2020-teams-org-seat-annually",
StripeStoragePlanId = "storage-gb-annually",
SeatPrice = 36,
AdditionalStoragePricePerGb = 4,

AllowSeatAutoscale = true,
LegacyYear = 2023
},
new Plan
{
Type = PlanType.TeamsMonthly2020,
Product = ProductType.Teams,
BitwardenProduct = BitwardenProductType.PasswordManager,
Name = "Teams (Monthly) 2020",
NameLocalizationKey = "planNameTeams",
DescriptionLocalizationKey = "planDescTeams",
CanBeUsedByBusiness = true,
BaseStorageGb = 1,
BaseSeats = 0,

HasAdditionalSeatsOption = true,
HasAdditionalStorageOption = true,
TrialPeriodDays = 7,

Has2fa = true,
HasApi = true,
HasDirectory = true,
HasEvents = true,
HasGroups = true,
HasTotp = true,
UsersGetPremium = true,

UpgradeSortOrder = 2,
DisplaySortOrder = 2,

StripeSeatPlanId = "2020-teams-org-seat-monthly",
StripeStoragePlanId = "storage-gb-monthly",
SeatPrice = 4,
AdditionalStoragePricePerGb = 0.5M,

AllowSeatAutoscale = true,
LegacyYear = 2023
},
new Plan
{
Type = PlanType.EnterpriseAnnually2020,
Name = "Enterprise (Annually) 2020",
Product = ProductType.Enterprise,
BitwardenProduct = BitwardenProductType.PasswordManager,
IsAnnual = true,
NameLocalizationKey = "planNameEnterprise",
DescriptionLocalizationKey = "planDescEnterprise",
CanBeUsedByBusiness = true,
BaseSeats = 0,
BaseStorageGb = 1,

HasAdditionalSeatsOption = true,
HasAdditionalStorageOption = true,
TrialPeriodDays = 7,

HasPolicies = true,
HasSelfHost = true,
HasGroups = true,
HasDirectory = true,
HasEvents = true,
HasTotp = true,
Has2fa = true,
HasApi = true,
HasSso = true,
HasKeyConnector = true,
HasScim = true,
HasResetPassword = true,
UsersGetPremium = true,
HasCustomPermissions = true,

UpgradeSortOrder = 3,
DisplaySortOrder = 3,

StripeSeatPlanId = "2020-enterprise-org-seat-annually",
StripeStoragePlanId = "storage-gb-annually",
BasePrice = 0,
SeatPrice = 60,
AdditionalStoragePricePerGb = 4,

AllowSeatAutoscale = true,
LegacyYear = 2023
},
new Plan
{
Type = PlanType.EnterpriseMonthly2020,
Product = ProductType.Enterprise,
BitwardenProduct = BitwardenProductType.PasswordManager,
Name = "Enterprise (Monthly) 2020",
NameLocalizationKey = "planNameEnterprise",
DescriptionLocalizationKey = "planDescEnterprise",
CanBeUsedByBusiness = true,
BaseSeats = 0,
BaseStorageGb = 1,

HasAdditionalSeatsOption = true,
HasAdditionalStorageOption = true,
TrialPeriodDays = 7,

HasPolicies = true,
HasGroups = true,
HasDirectory = true,
HasEvents = true,
HasTotp = true,
Has2fa = true,
HasApi = true,
HasSelfHost = true,
HasSso = true,
HasKeyConnector = true,
HasScim = true,
HasResetPassword = true,
UsersGetPremium = true,
HasCustomPermissions = true,

UpgradeSortOrder = 3,
DisplaySortOrder = 3,

StripeSeatPlanId = "2020-enterprise-seat-monthly",
StripeStoragePlanId = "storage-gb-monthly",
BasePrice = 0,
SeatPrice = 6,
AdditionalStoragePricePerGb = 0.5M,

AllowSeatAutoscale = true,
LegacyYear = 2023
},
new Plan
{
Type = PlanType.TeamsAnnually,
Product = ProductType.Teams,
Expand Down Expand Up @@ -439,9 +261,9 @@ public static IEnumerable<Plan> CreatePlan()
UpgradeSortOrder = 2,
DisplaySortOrder = 2,

StripeSeatPlanId = "2023-teams-org-seat-annually",
StripeSeatPlanId = "2020-teams-org-seat-annually",
StripeStoragePlanId = "storage-gb-annually",
SeatPrice = 48,
SeatPrice = 36,
AdditionalStoragePricePerGb = 4,

AllowSeatAutoscale = true,
Expand Down Expand Up @@ -473,9 +295,9 @@ public static IEnumerable<Plan> CreatePlan()
UpgradeSortOrder = 2,
DisplaySortOrder = 2,

StripeSeatPlanId = "2023-teams-org-seat-monthly",
StripeSeatPlanId = "2020-teams-org-seat-monthly",
StripeStoragePlanId = "storage-gb-monthly",
SeatPrice = 5,
SeatPrice = 4,
AdditionalStoragePricePerGb = 0.5M,

AllowSeatAutoscale = true,
Expand Down Expand Up @@ -515,10 +337,10 @@ public static IEnumerable<Plan> CreatePlan()
UpgradeSortOrder = 3,
DisplaySortOrder = 3,

StripeSeatPlanId = "2023-enterprise-org-seat-annually",
StripeSeatPlanId = "2020-enterprise-org-seat-annually",
StripeStoragePlanId = "storage-gb-annually",
BasePrice = 0,
SeatPrice = 72,
SeatPrice = 60,
AdditionalStoragePricePerGb = 4,

AllowSeatAutoscale = true,
Expand Down Expand Up @@ -557,10 +379,10 @@ public static IEnumerable<Plan> CreatePlan()
UpgradeSortOrder = 3,
DisplaySortOrder = 3,

StripeSeatPlanId = "2023-enterprise-seat-monthly",
StripeSeatPlanId = "2020-enterprise-seat-monthly",
StripeStoragePlanId = "storage-gb-monthly",
BasePrice = 0,
SeatPrice = 7,
SeatPrice = 6,
AdditionalStoragePricePerGb = 0.5M,

AllowSeatAutoscale = true,
Expand Down
Loading

0 comments on commit 90783b6

Please sign in to comment.