mirror of
https://github.com/bitwarden/server
synced 2025-12-23 19:53:40 +00:00
[AC-1923] Add endpoint to create client organization (#3977)
* Add new endpoint for creating client organizations in consolidated billing * Create empty org and then assign seats for code re-use * Fixes made from debugging client side * few more small fixes * Vincent's feedback
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Api.Utilities;
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Api.Billing.Models.Requests;
|
||||
|
||||
public class CreateClientOrganizationRequestBody
|
||||
{
|
||||
[Required(ErrorMessage = "'name' must be provided")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "'ownerEmail' must be provided")]
|
||||
public string OwnerEmail { get; set; }
|
||||
|
||||
[EnumMatches<PlanType>(PlanType.TeamsMonthly, PlanType.EnterpriseMonthly, ErrorMessage = "'planType' must be Teams (Monthly) or Enterprise (Monthly)")]
|
||||
public PlanType PlanType { get; set; }
|
||||
|
||||
[Range(1, int.MaxValue, ErrorMessage = "'seats' must be greater than 0")]
|
||||
public int Seats { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "'key' must be provided")]
|
||||
public string Key { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "'keyPair' must be provided")]
|
||||
public KeyPairRequestBody KeyPair { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "'collectionName' must be provided")]
|
||||
public string CollectionName { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user