public ResultMessageEntity VerifyCreateUser(CreateUserMessageEntity createUserMessageEntity) { return(new ResultMessageEntity() { ResultStatus = ResultStatus.Success }); }
public ResultMessageEntity CreateUser(CreateUserMessageEntity createUserMessageEntity) { CreateUserIPost createUserIPost = new CreateUserIPost(); RestResponse restResponse = katavuccolClient.Post(createUserIPost); return(new ResultMessageEntity()); }
public ResultMessageEntity ValidCreateUser(CreateUserMessageEntity createUserMessageEntity) { IParallelExecution <CreateUserMessageEntity> parallelExecution = new ParallelExecution <CreateUserMessageEntity>(); parallelExecution.Add(new ParallelAction <CreateUserMessageEntity> { Activity = IsCreateUserMessageEntityValid, RequestObject = createUserMessageEntity }); return(parallelExecution.Execute()); }
public void CreateCustomer(CreateCustomerRequestModel createCustomerRequestModel) { try { CreateUserMessageEntity createUserMessageEntity = customerServiceApiMapper.MapCreateUserMessageEntity(createCustomerRequestModel); ResultMessageEntity resultMessageEntity = customerService.CreateUser(createUserMessageEntity); } catch (Exception ex) { } }
public ResultMessageEntity CreateUser(CreateUserMessageEntity createUserMessageEntity) { ResultMessageEntity resultMessageEntity; //Set up //Validator resultMessageEntity = customerServiceValidator.ValidCreateUser(createUserMessageEntity); if (resultMessageEntity.ResultStatus != ResultStatus.Success) { return(resultMessageEntity); } //Verifier resultMessageEntity = customerServiceVerifier.VerifyCreateUser(createUserMessageEntity); if (resultMessageEntity.ResultStatus != ResultStatus.Success) { return(resultMessageEntity); } //Processor resultMessageEntity = customerServiceProcessor.ProcessorCreateUser(createUserMessageEntity); if (resultMessageEntity.ResultStatus != ResultStatus.Success) { return(resultMessageEntity); } //PostProcessor ResultMessageEntity postResultMessageEntity = customerServicePostProcessor.PostProcessorCreateUser(createUserMessageEntity); if (postResultMessageEntity.ResultStatus != ResultStatus.Success) { return(resultMessageEntity); } return(resultMessageEntity); }
public ResultMessageEntity IsCreateUserMessageEntityValid(CreateUserMessageEntity createUserMessageEntity) { throw new NotImplementedException(); }
public ResultMessageEntity PostProcessorCreateUser(CreateUserMessageEntity createUserMessageEntity) { throw new NotImplementedException(); }
public CreateUserMessageEntity MapCreateUserMessageEntity(CreateCustomerRequestModel createCustomerRequestModel) { CreateUserMessageEntity createUserMessageEntity = new CreateUserMessageEntity { Addresses = new ConcurrentBag <AddressMessageEntity>(), Credential = new CredentialMessageEntity { Password = createCustomerRequestModel.CustomerDetail.Credential?.UserName, UserName = createCustomerRequestModel.CustomerDetail.Credential?.Password, SecurityQuestions = new ConcurrentBag <SecurityQuestionMessageEntity>() }, EmailAddresses = new ConcurrentBag <EmailAddressMessageEntity>(), Name = new NameMessageEntity { FirstName = createCustomerRequestModel.CustomerDetail.Name?.FirstName, LastName = createCustomerRequestModel.CustomerDetail.Name?.LastName, MiddleName = createCustomerRequestModel.CustomerDetail.Name?.MiddleName }, Occupation = new ConcurrentBag <OccupationMessageEntity>(), Phones = new ConcurrentBag <PhoneMessageEntity>() }; if (createCustomerRequestModel.CustomerDetail.Credential.SecurityQuestions.AnyWithNullCheck()) { foreach (SecurityQuestionModel securityQuestionModel in createCustomerRequestModel.CustomerDetail.Credential.SecurityQuestions) { createUserMessageEntity.Credential.SecurityQuestions.Add(new SecurityQuestionMessageEntity { SecurityQuestionAnswer = securityQuestionModel.SecurityQuestionAnswer, SecurityQuestionId = securityQuestionModel.SecurityQuestionId }); } } if (createCustomerRequestModel.CustomerDetail.Addresses.AnyWithNullCheck()) { foreach (AddressModel addressModel in createCustomerRequestModel.CustomerDetail.Addresses) { createUserMessageEntity.Addresses.Add(new AddressMessageEntity { AddressLine1 = addressModel.AddressLine1, AddressLine2 = addressModel.AddressLine2, CityCode = addressModel.CityCode, CountryCode = addressModel.CountryCode, IsPrimary = addressModel.IsPrimary, StateCode = addressModel.StateCode }); } } if (createCustomerRequestModel.CustomerDetail.EmailAddresses.AnyWithNullCheck()) { foreach (EmailAddressModel emailAddressModel in createCustomerRequestModel.CustomerDetail.EmailAddresses) { createUserMessageEntity.EmailAddresses.Add(new EmailAddressMessageEntity { EmailAddress = emailAddressModel.EmailAddress, IsPrimary = emailAddressModel.IsPrimary }); } } if (createCustomerRequestModel.CustomerDetail.Phones.AnyWithNullCheck()) { foreach (PhoneModel phoneModel in createCustomerRequestModel.CustomerDetail.Phones) { createUserMessageEntity.Phones.Add(new PhoneMessageEntity { IsPrimary = phoneModel.IsPrimary, CountryCode = phoneModel.CountryCode, PhoneNumber = phoneModel.PhoneNumber }); } } return(createUserMessageEntity); }