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