/// <summary> /// Creates the subcription location. /// </summary> /// <param name="request">The request.</param> /// <returns></returns> public async Task <APIResponse> CreateSubcriptionLocation(CreateSubscriptionLocationRequest request) { try { var client = httpClientFactory.CreateClient(VendorServiceOperation.serviceName); var param = JsonConvert.SerializeObject(request); HttpContent contentPost = new StringContent(param, Encoding.UTF8, "application/json"); var response = await client.PostAsync(servicesConfig.Vendor + VendorServiceOperation.CreateSubcriptionLocation(), contentPost); return(JsonConvert.DeserializeObject <APIResponse>(await response.Content.ReadAsStringAsync())); } catch (Exception ex) { logger.Error(ex, "Exception in method 'CreateSubcriptionLocation()'"); var exMessage = ex.InnerException != null ? ex.InnerException.Message : ex.Message; return(new APIResponse(exMessage, HttpStatusCode.InternalServerError)); } }