mirror of
https://github.com/bitwarden/server.git
synced 2025-07-07 02:52:50 -05:00
[AC-1910] Allocate seats to a provider organization (#3936)
* Add endpoint to update a provider organization's seats for consolidated billing. * Fixed failing tests
This commit is contained in:
9
src/Core/Billing/Extensions/BillingExtensions.cs
Normal file
9
src/Core/Billing/Extensions/BillingExtensions.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Core.Billing.Extensions;
|
||||
|
||||
public static class BillingExtensions
|
||||
{
|
||||
public static bool SupportsConsolidatedBilling(this PlanType planType)
|
||||
=> planType is PlanType.TeamsMonthly or PlanType.EnterpriseMonthly;
|
||||
}
|
@ -9,15 +9,15 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static void AddBillingCommands(this IServiceCollection services)
|
||||
public static void AddBillingOperations(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<ICancelSubscriptionCommand, CancelSubscriptionCommand>();
|
||||
services.AddSingleton<IRemovePaymentMethodCommand, RemovePaymentMethodCommand>();
|
||||
}
|
||||
// Queries
|
||||
services.AddTransient<IProviderBillingQueries, ProviderBillingQueries>();
|
||||
services.AddTransient<ISubscriberQueries, SubscriberQueries>();
|
||||
|
||||
public static void AddBillingQueries(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<IProviderBillingQueries, ProviderBillingQueries>();
|
||||
services.AddSingleton<ISubscriberQueries, SubscriberQueries>();
|
||||
// Commands
|
||||
services.AddTransient<IAssignSeatsToClientOrganizationCommand, AssignSeatsToClientOrganizationCommand>();
|
||||
services.AddTransient<ICancelSubscriptionCommand, CancelSubscriptionCommand>();
|
||||
services.AddTransient<IRemovePaymentMethodCommand, RemovePaymentMethodCommand>();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user