/// <summary> /// Gets the multi details by identifier. /// </summary> /// <param name="code">System code</param> /// <returns></returns> public async Task <APIResponse> GetMultiDetailsById(string code) { try { var client = httpClientFactory.CreateClient(VendorServiceOperation.serviceName); var response = await client.GetAsync(servicesConfig.Vendor + VendorServiceOperation.GetMultiDetailsById(code)); if (response.IsSuccessStatusCode) { var multicode = JsonConvert.DeserializeObject <List <MultiDetailResponse> >(await response.Content.ReadAsStringAsync()); return(new APIResponse(multicode, HttpStatusCode.OK)); } return(new APIResponse(response.StatusCode)); } catch (Exception ex) { logger.Error(ex, "Exception in method 'GetMultiDetailsById()'"); var exMessage = ex.InnerException != null ? ex.InnerException.Message : ex.Message; return(new APIResponse(exMessage, HttpStatusCode.InternalServerError)); } }