mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00
Plan And Price Updates (#859)
* Expanded the Plan model to make plan & product data a bit more dynamic * Created a Product enum to track versioned instances of the same plan * Created and API call and Response model for getting plan & product data from the server
This commit is contained in:
@ -103,109 +103,327 @@ namespace Bit.Core.Utilities
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.Free,
|
||||
BaseSeats = 2,
|
||||
CanBuyAdditionalSeats = false,
|
||||
MaxCollections = 2,
|
||||
Product = ProductType.Free,
|
||||
Name = "Free",
|
||||
UpgradeSortOrder = -1 // Always the lowest plan, cannot be upgraded to
|
||||
NameLocalizationKey = "planNameFree",
|
||||
DescriptionLocalizationKey = "planDescFree",
|
||||
BaseSeats = 2,
|
||||
MaxCollections = 2,
|
||||
MaxUsers = 2,
|
||||
|
||||
UpgradeSortOrder = -1, // Always the lowest plan, cannot be upgraded to
|
||||
DisplaySortOrder = -1
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.FamiliesAnnually2019,
|
||||
Product = ProductType.Families,
|
||||
Name = "Families 2019",
|
||||
IsAnnual = true,
|
||||
NameLocalizationKey = "planNameFamilies",
|
||||
DescriptionLocalizationKey = "planDescFamilies",
|
||||
BaseSeats = 6,
|
||||
BaseStorageGb = 1,
|
||||
MaxUsers = 6,
|
||||
|
||||
HasAdditionalStorageOption = true,
|
||||
HasPremiumAccessOption = true,
|
||||
TrialPeriodDays = 7,
|
||||
|
||||
HasSelfHost = true,
|
||||
HasTotp = true,
|
||||
|
||||
UpgradeSortOrder = 1,
|
||||
DisplaySortOrder = 1,
|
||||
LegacyYear = 2020,
|
||||
|
||||
StripePlanId = "personal-org-annually",
|
||||
StripeStoragePlanId = "storage-gb-annually",
|
||||
StripePremiumAccessPlanId = "personal-org-premium-access-annually",
|
||||
BasePrice = 12,
|
||||
AdditionalStoragePricePerGb = 4,
|
||||
PremiumAccessOptionPrice = 40
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.TeamsAnnually2019,
|
||||
Product = ProductType.Teams,
|
||||
Name = "Teams (Annually) 2019",
|
||||
IsAnnual = true,
|
||||
NameLocalizationKey = "planNameTeams",
|
||||
DescriptionLocalizationKey = "planDescTeams",
|
||||
CanBeUsedByBusiness = true,
|
||||
BaseSeats = 6,
|
||||
BaseStorageGb = 1,
|
||||
|
||||
HasAdditionalSeatsOption = true,
|
||||
HasAdditionalStorageOption = true,
|
||||
TrialPeriodDays = 7,
|
||||
|
||||
HasTotp = true,
|
||||
|
||||
UpgradeSortOrder = 2,
|
||||
DisplaySortOrder = 2,
|
||||
LegacyYear = 2020,
|
||||
|
||||
StripePlanId = "teams-org-annually",
|
||||
StripeSeatPlanId = "teams-org-seat-annually",
|
||||
StripeStoragePlanId = "storage-gb-annually",
|
||||
BasePrice = 60,
|
||||
SeatPrice = 24,
|
||||
AdditionalStoragePricePerGb = 4
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.TeamsMonthly2019,
|
||||
Product = ProductType.Teams,
|
||||
Name = "Teams (Monthly) 2019",
|
||||
NameLocalizationKey = "planNameTeams",
|
||||
DescriptionLocalizationKey = "planDescTeams",
|
||||
CanBeUsedByBusiness = true,
|
||||
BaseSeats = 6,
|
||||
BaseStorageGb = 1,
|
||||
|
||||
HasAdditionalSeatsOption = true,
|
||||
HasAdditionalStorageOption = true,
|
||||
TrialPeriodDays = 7,
|
||||
|
||||
HasTotp = true,
|
||||
|
||||
UpgradeSortOrder = 2,
|
||||
DisplaySortOrder = 2,
|
||||
LegacyYear = 2020,
|
||||
|
||||
StripePlanId = "teams-org-monthly",
|
||||
StripeSeatPlanId = "teams-org-seat-monthly",
|
||||
StripeStoragePlanId = "storage-gb-monthly",
|
||||
BasePrice = 8,
|
||||
SeatPrice = 2.5M,
|
||||
AdditionalStoragePricePerGb = 0.5M
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.EnterpriseAnnually2019,
|
||||
Name = "Enterprise (Annually) 2019",
|
||||
IsAnnual = true,
|
||||
Product = ProductType.Enterprise,
|
||||
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,
|
||||
UsersGetPremium = true,
|
||||
|
||||
UpgradeSortOrder = 3,
|
||||
DisplaySortOrder = 3,
|
||||
LegacyYear = 2020,
|
||||
|
||||
StripePlanId = null,
|
||||
StripeSeatPlanId = "enterprise-org-seat-annually",
|
||||
StripeStoragePlanId = "storage-gb-annually",
|
||||
BasePrice = 0,
|
||||
SeatPrice = 36,
|
||||
AdditionalStoragePricePerGb = 4
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.EnterpriseMonthly2019,
|
||||
Product = ProductType.Enterprise,
|
||||
Name = "Enterprise (Monthly) 2019",
|
||||
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,
|
||||
UsersGetPremium = true,
|
||||
|
||||
UpgradeSortOrder = 3,
|
||||
DisplaySortOrder = 3,
|
||||
LegacyYear = 2020,
|
||||
|
||||
StripePlanId = null,
|
||||
StripeSeatPlanId = "enterprise-org-seat-monthly",
|
||||
StripeStoragePlanId = "storage-gb-monthly",
|
||||
BasePrice = 0,
|
||||
SeatPrice = 4M,
|
||||
AdditionalStoragePricePerGb = 0.5M
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.FamiliesAnnually,
|
||||
BaseSeats = 5,
|
||||
BasePrice = 12,
|
||||
CanBuyAdditionalSeats = false,
|
||||
CanBuyPremiumAccessAddon = true,
|
||||
Product = ProductType.Families,
|
||||
Name = "Families",
|
||||
IsAnnual = true,
|
||||
NameLocalizationKey = "planNameFamilies",
|
||||
DescriptionLocalizationKey = "planDescFamilies",
|
||||
BaseSeats = 6,
|
||||
BaseStorageGb = 1,
|
||||
MaxUsers = 6,
|
||||
|
||||
TrialPeriodDays = 7,
|
||||
|
||||
HasSelfHost = true,
|
||||
HasTotp = true,
|
||||
UsersGetPremium = true,
|
||||
|
||||
UpgradeSortOrder = 1,
|
||||
DisplaySortOrder = 1,
|
||||
|
||||
StripePlanId = "personal-org-annually",
|
||||
StripeStoragePlanId = "storage-gb-annually",
|
||||
StripePremiumAccessPlanId = "personal-org-premium-access-annually",
|
||||
UpgradeSortOrder = 1,
|
||||
TrialPeriodDays = 7,
|
||||
UseTotp = true,
|
||||
MaxStorageGb = 1,
|
||||
SelfHost = true
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.TeamsMonthly,
|
||||
BaseSeats = 5,
|
||||
BasePrice = 8,
|
||||
SeatPrice = 2.5M,
|
||||
CanBuyAdditionalSeats = true,
|
||||
Name = "Teams (Monthly)",
|
||||
StripePlanId = "teams-org-monthly",
|
||||
StripeSeatPlanId = "teams-org-seat-monthly",
|
||||
StripeStoragePlanId = "storage-gb-monthly",
|
||||
UpgradeSortOrder = 2,
|
||||
TrialPeriodDays = 7,
|
||||
UseTotp = true,
|
||||
MaxStorageGb = 1
|
||||
BasePrice = 40,
|
||||
AdditionalStoragePricePerGb = 4
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.TeamsAnnually,
|
||||
BaseSeats = 5,
|
||||
BasePrice = 60,
|
||||
SeatPrice = 24,
|
||||
CanBuyAdditionalSeats = true,
|
||||
Product = ProductType.Teams,
|
||||
Name = "Teams (Annually)",
|
||||
StripePlanId = "teams-org-annually",
|
||||
StripeSeatPlanId = "teams-org-seat-annually",
|
||||
StripeStoragePlanId = "storage-gb-annually",
|
||||
UpgradeSortOrder = 2,
|
||||
IsAnnual = true,
|
||||
NameLocalizationKey = "planNameTeams",
|
||||
DescriptionLocalizationKey = "planDescTeams",
|
||||
CanBeUsedByBusiness = true,
|
||||
BaseStorageGb = 1,
|
||||
BaseSeats = 0,
|
||||
|
||||
HasAdditionalSeatsOption = true,
|
||||
HasAdditionalStorageOption = true,
|
||||
TrialPeriodDays = 7,
|
||||
UseTotp = true,
|
||||
MaxStorageGb = 1
|
||||
|
||||
HasTotp = true,
|
||||
UsersGetPremium = true,
|
||||
|
||||
UpgradeSortOrder = 2,
|
||||
DisplaySortOrder = 2,
|
||||
|
||||
StripeSeatPlanId = "2020-teams-org-seat-annually",
|
||||
StripeStoragePlanId = "storage-gb-annually",
|
||||
SeatPrice = 36,
|
||||
AdditionalStoragePricePerGb = 4
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.EnterpriseMonthly,
|
||||
Type = PlanType.TeamsMonthly,
|
||||
Product = ProductType.Teams,
|
||||
Name = "Teams (Monthly)",
|
||||
NameLocalizationKey = "planNameTeams",
|
||||
DescriptionLocalizationKey = "planDescTeams",
|
||||
CanBeUsedByBusiness = true,
|
||||
BaseStorageGb = 1,
|
||||
BaseSeats = 0,
|
||||
BasePrice = 0,
|
||||
SeatPrice = 4M,
|
||||
CanBuyAdditionalSeats = true,
|
||||
Name = "Enterprise (Monthly)",
|
||||
StripePlanId = null,
|
||||
StripeSeatPlanId = "enterprise-org-seat-monthly",
|
||||
StripeStoragePlanId = "storage-gb-monthly",
|
||||
UpgradeSortOrder = 3,
|
||||
|
||||
HasAdditionalSeatsOption = true,
|
||||
HasAdditionalStorageOption = true,
|
||||
TrialPeriodDays = 7,
|
||||
UsePolicies = true,
|
||||
UseGroups = true,
|
||||
UseDirectory = true,
|
||||
UseEvents = true,
|
||||
UseTotp = true,
|
||||
Use2fa = true,
|
||||
UseApi = true,
|
||||
MaxStorageGb = 1,
|
||||
SelfHost = true,
|
||||
UsersGetPremium = true
|
||||
|
||||
HasTotp = true,
|
||||
UsersGetPremium = true,
|
||||
|
||||
UpgradeSortOrder = 2,
|
||||
DisplaySortOrder = 2,
|
||||
|
||||
StripeSeatPlanId = "2020-teams-org-seat-monthly",
|
||||
StripeStoragePlanId = "storage-gb-monthly",
|
||||
SeatPrice = 4,
|
||||
AdditionalStoragePricePerGb = 0.5M
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.EnterpriseAnnually,
|
||||
BaseSeats = 0,
|
||||
BasePrice = 0,
|
||||
SeatPrice = 36,
|
||||
CanBuyAdditionalSeats = true,
|
||||
Name = "Enterprise (Annually)",
|
||||
StripePlanId = null,
|
||||
StripeSeatPlanId = "enterprise-org-seat-annually",
|
||||
StripeStoragePlanId = "storage-gb-annually",
|
||||
UpgradeSortOrder = 3,
|
||||
Product = ProductType.Enterprise,
|
||||
IsAnnual = true,
|
||||
NameLocalizationKey = "planNameEnterprise",
|
||||
DescriptionLocalizationKey = "planDescEnterprise",
|
||||
CanBeUsedByBusiness = true,
|
||||
BaseSeats = 0,
|
||||
BaseStorageGb = 1,
|
||||
|
||||
HasAdditionalSeatsOption = true,
|
||||
HasAdditionalStorageOption = true,
|
||||
TrialPeriodDays = 7,
|
||||
UsePolicies = true,
|
||||
UseGroups = true,
|
||||
UseDirectory = true,
|
||||
UseEvents = true,
|
||||
UseTotp = true,
|
||||
Use2fa = true,
|
||||
UseApi = true,
|
||||
MaxStorageGb = 1,
|
||||
SelfHost = true,
|
||||
UsersGetPremium = true
|
||||
}
|
||||
|
||||
HasPolicies = true,
|
||||
HasSelfHost = true,
|
||||
HasGroups = true,
|
||||
HasDirectory = true,
|
||||
HasEvents = true,
|
||||
HasTotp = true,
|
||||
Has2fa = true,
|
||||
HasApi = true,
|
||||
HasSso = true,
|
||||
UsersGetPremium = true,
|
||||
|
||||
UpgradeSortOrder = 3,
|
||||
DisplaySortOrder = 3,
|
||||
|
||||
StripeSeatPlanId = "2020-enterprise-org-seat-annually",
|
||||
StripeStoragePlanId = "storage-gb-annually",
|
||||
BasePrice = 0,
|
||||
SeatPrice = 60,
|
||||
AdditionalStoragePricePerGb = 4
|
||||
},
|
||||
new Plan
|
||||
{
|
||||
Type = PlanType.EnterpriseMonthly,
|
||||
Product = ProductType.Enterprise,
|
||||
Name = "Enterprise (Monthly)",
|
||||
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,
|
||||
UsersGetPremium = true,
|
||||
|
||||
UpgradeSortOrder = 3,
|
||||
DisplaySortOrder = 3,
|
||||
|
||||
StripeSeatPlanId = "2020-enterprise-org-seat-monthly",
|
||||
StripeStoragePlanId = "storage-gb-monthly",
|
||||
BasePrice = 0,
|
||||
SeatPrice = 6,
|
||||
AdditionalStoragePricePerGb = 0.5M
|
||||
},
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
Reference in New Issue
Block a user