public async Task <IActionResult> CreateAccount(
            [FromRoute] Guid organizationId,
            [FromBody] NewCustomerAccountInput model)
        {
            var account = await _accountService
                          .Create(_agencyOwner, model);

            return(Ok(account));
        }
        public async Task <IActionResult> JoinProviderOrganization(
            [FromRoute] Guid organizationId,
            [FromBody] JoinAsCustomerInput input)
        {
            var result = await _accountService.Create(_customer, input);

            if (!string.IsNullOrWhiteSpace(input.WorkOrderDescription))
            {
                await _workOrderService.CreateWorkOrder <BuyerWorkOrderOutput>(_customer, new WorkOrderInput()
                {
                    AccountManagerId             = result.AccountManagerId.Value,
                    AccountManagerOrganizationId = result.AccountManagerOrganizationId.Value,
                    Description = input.WorkOrderDescription,
                    IsDraft     = false
                });
            }

            return(Ok(result));
        }
        public async Task <IActionResult> SaveCustomerAccount([FromBody] CustomerAccountModel model)
        {
            ICustomerAccount customerAccount = await customerAccountService.Create(model);

            return(Created(Url.Action(nameof(GetCustomerAccount), ControllerContext.ActionDescriptor.ControllerName, new { id = customerAccount.Id }), customerAccount));
        }