mirror of
https://github.com/bitwarden/server.git
synced 2025-05-29 23:34:53 -05:00
plan trial periods
This commit is contained in:
parent
d1e78e6fe7
commit
2340369d56
@ -50,6 +50,9 @@ namespace Bit.Billing
|
|||||||
// Repositories
|
// Repositories
|
||||||
services.AddSqlServerRepositories();
|
services.AddSqlServerRepositories();
|
||||||
|
|
||||||
|
// Context
|
||||||
|
services.AddScoped<CurrentContext>();
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
services.AddBaseServices();
|
services.AddBaseServices();
|
||||||
services.AddDefaultServices();
|
services.AddDefaultServices();
|
||||||
|
@ -16,5 +16,6 @@ namespace Bit.Core.Models.StaticStore
|
|||||||
public short? MaxSubvaults { get; set; }
|
public short? MaxSubvaults { get; set; }
|
||||||
public int UpgradeSortOrder { get; set; }
|
public int UpgradeSortOrder { get; set; }
|
||||||
public bool Disabled { get; set; }
|
public bool Disabled { get; set; }
|
||||||
|
public int? TrialPeriodDays { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,6 +287,7 @@ namespace Bit.Core.Services
|
|||||||
// They must have been on a free plan. Create new sub.
|
// They must have been on a free plan. Create new sub.
|
||||||
var subCreateOptions = new StripeSubscriptionCreateOptions
|
var subCreateOptions = new StripeSubscriptionCreateOptions
|
||||||
{
|
{
|
||||||
|
TrialPeriodDays = newPlan.TrialPeriodDays,
|
||||||
Items = new List<StripeSubscriptionItemOption>
|
Items = new List<StripeSubscriptionItemOption>
|
||||||
{
|
{
|
||||||
new StripeSubscriptionItemOption
|
new StripeSubscriptionItemOption
|
||||||
@ -504,6 +505,7 @@ namespace Bit.Core.Services
|
|||||||
|
|
||||||
var subCreateOptions = new StripeSubscriptionCreateOptions
|
var subCreateOptions = new StripeSubscriptionCreateOptions
|
||||||
{
|
{
|
||||||
|
TrialPeriodDays = plan.TrialPeriodDays,
|
||||||
Items = new List<StripeSubscriptionItemOption>
|
Items = new List<StripeSubscriptionItemOption>
|
||||||
{
|
{
|
||||||
new StripeSubscriptionItemOption
|
new StripeSubscriptionItemOption
|
||||||
|
@ -111,7 +111,8 @@ namespace Bit.Core.Utilities
|
|||||||
Name = "Personal",
|
Name = "Personal",
|
||||||
StripePlanId = "personal-org-annually",
|
StripePlanId = "personal-org-annually",
|
||||||
StripeSeatPlanId = "personal-org-seat-annually",
|
StripeSeatPlanId = "personal-org-seat-annually",
|
||||||
UpgradeSortOrder = 1
|
UpgradeSortOrder = 1,
|
||||||
|
TrialPeriodDays = 7
|
||||||
},
|
},
|
||||||
new Plan
|
new Plan
|
||||||
{
|
{
|
||||||
@ -123,7 +124,8 @@ namespace Bit.Core.Utilities
|
|||||||
Name = "Teams (Monthly)",
|
Name = "Teams (Monthly)",
|
||||||
StripePlanId = "teams-org-monthly",
|
StripePlanId = "teams-org-monthly",
|
||||||
StripeSeatPlanId = "teams-org-seat-monthly",
|
StripeSeatPlanId = "teams-org-seat-monthly",
|
||||||
UpgradeSortOrder = 2
|
UpgradeSortOrder = 2,
|
||||||
|
TrialPeriodDays = 7
|
||||||
},
|
},
|
||||||
new Plan
|
new Plan
|
||||||
{
|
{
|
||||||
@ -135,7 +137,8 @@ namespace Bit.Core.Utilities
|
|||||||
Name = "Teams (Annually)",
|
Name = "Teams (Annually)",
|
||||||
StripePlanId = "teams-org-annually",
|
StripePlanId = "teams-org-annually",
|
||||||
StripeSeatPlanId = "teams-org-seat-annually",
|
StripeSeatPlanId = "teams-org-seat-annually",
|
||||||
UpgradeSortOrder = 2
|
UpgradeSortOrder = 2,
|
||||||
|
TrialPeriodDays = 7
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user