1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

[AC-2744] Add provider portal pricing for consolidated billing (#4210)

* Expanded Teams and Enterprise plan with provider seat data

* Updated provider setup process with new plan information

* Updated provider subscription retrieval and update with new plan information

* Updated client invoice report with new plan information

* Fixed tests

* Fix broken test
This commit is contained in:
Alex Morask
2024-06-24 11:16:57 -04:00
committed by GitHub
parent fa62b36d44
commit 95f54b616e
11 changed files with 28 additions and 14 deletions

View File

@ -26,7 +26,7 @@ public record ConsolidatedBillingSubscriptionResponse(
.Select(providerPlan =>
{
var plan = StaticStore.GetPlan(providerPlan.PlanType);
var cost = (providerPlan.SeatMinimum + providerPlan.PurchasedSeats) * plan.PasswordManager.SeatPrice;
var cost = (providerPlan.SeatMinimum + providerPlan.PurchasedSeats) * plan.PasswordManager.ProviderPortalSeatPrice;
var cadence = plan.IsAnnual ? _annualCadence : _monthlyCadence;
return new ProviderPlanResponse(
plan.Name,
@ -36,7 +36,9 @@ public record ConsolidatedBillingSubscriptionResponse(
cost,
cadence);
});
var gracePeriod = subscription.CollectionMethod == "charge_automatically" ? 14 : 30;
return new ConsolidatedBillingSubscriptionResponse(
subscription.Status,
subscription.CurrentPeriodEnd,