/// <summary> /// Method Name : PutCustomerProfileData /// Author : Hiren Patel /// Creation Date : 18 Dec 2017 /// Purpose : Puts the customer verification data. /// Revision : /// </summary> /// <returns>The customer verification data.</returns> /// <param name="putCreatePasswordModel">Customer model.</param> public async Task <APIResponse <CustomerModel> > PutCustomerVerificationData(PutCreatePasswordModel putCreatePasswordModel) { string apiURL = string.Format(Resource.CustomerVerificationUrl, baseAPIURL, putCreatePasswordModel.CustomerId); APIResponse <CustomerModel> apiResponse = new APIResponse <CustomerModel>() { STATUS = false }; HttpResponseMessage httpResponseMessage = await apiHelper.InvokePutAPI <PutCreatePasswordModel>(apiURL, putCreatePasswordModel); if (httpResponseMessage.StatusCode == HttpStatusCode.OK) { apiResponse.STATUS = true; apiResponse.Message = Resource.msgPutCustomerService; } else { if (httpResponseMessage.StatusCode == HttpStatusCode.NoContent) { apiResponse.Message = Resource.msgInvalidCustomer; } else { apiResponse.Message = apiHelper.GetAPIResponseStatusCodeMessage(httpResponseMessage); } } return(apiResponse); }
/// <summary> /// Method Name : PutCustomerVerificationDataAsync /// Author : Vivek Bhavsar /// Creation Date : 23 Jan 2018 /// Purpose : Sub method created(code refactoring) to update verification data /// Revision : /// </summary> /// <param name="createPasswordModel"></param> /// <returns></returns> private async Task <APIResponse <CustomerModel> > PutCustomerVerificationDataAsync(CreatePasswordModel createPasswordModel) { APIResponse <CustomerModel> response; PutCreatePasswordModel putCreatePasswordModel = new PutCreatePasswordModel(); putCreatePasswordModel.PasswordHash = createPasswordModel.CreatePassword; putCreatePasswordModel.PasswordSalt = createPasswordModel.CreatePassword; putCreatePasswordModel.CustomerId = UtilityPCL.LoginCustomerData.CustomerId; response = await loginAPIServies.PutCustomerVerificationData(putCreatePasswordModel); return(response); }