1
0
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:
Alex Morask
2024-03-29 11:18:10 -04:00
committed by GitHub
parent c53e5eeab3
commit e2cb406a95
28 changed files with 1108 additions and 68 deletions

View 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;
}

View File

@ -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>();
}
}