public async Task <IActionResult> Create(PlanServiceModel model) { model.UserId = GetCurrentUser().Id; PlanResponseModel result = await _planService.CreatePlanAsync(model); return(Json(result)); }
public OrganizationResponseModel(Organization organization, string obj = "organization") : base(obj) { if (organization == null) { throw new ArgumentNullException(nameof(organization)); } Id = organization.Id.ToString(); Identifier = organization.Identifier; Name = organization.Name; BusinessName = organization.BusinessName; BusinessAddress1 = organization.BusinessAddress1; BusinessAddress2 = organization.BusinessAddress2; BusinessAddress3 = organization.BusinessAddress3; BusinessCountry = organization.BusinessCountry; BusinessTaxNumber = organization.BusinessTaxNumber; BillingEmail = organization.BillingEmail; Plan = new PlanResponseModel(StaticStore.Plans.FirstOrDefault(plan => plan.Type == organization.PlanType)); PlanType = organization.PlanType; Seats = organization.Seats; MaxAutoscaleSeats = organization.MaxAutoscaleSeats; MaxCollections = organization.MaxCollections; MaxStorageGb = organization.MaxStorageGb; UsePolicies = organization.UsePolicies; UseSso = organization.UseSso; UseKeyConnector = organization.UseKeyConnector; UseScim = organization.UseScim; UseGroups = organization.UseGroups; UseDirectory = organization.UseDirectory; UseEvents = organization.UseEvents; UseTotp = organization.UseTotp; Use2fa = organization.Use2fa; UseApi = organization.UseApi; UseResetPassword = organization.UseResetPassword; UsersGetPremium = organization.UsersGetPremium; SelfHost = organization.SelfHost; HasPublicAndPrivateKeys = organization.PublicKey != null && organization.PrivateKey != null; }