/// <summary> /// Gets the guestlist by identifier. /// </summary> /// <param name="guestlistId">The guestlist identifier.</param> /// <returns></returns> public async Task <APIResponse> GetGuestlistById(int guestlistId) { try { var client = httpClientFactory.CreateClient(ECommerceServiceOperation.serviceName); var response = await client.GetAsync(servicesConfig.EventAssistant + EventAssistantServiceOperation.GetGuestlistById(guestlistId)); if (response.IsSuccessStatusCode) { var multicode = JsonConvert.DeserializeObject <GuestlistResponse>(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)); } }