/// <summary> /// Gets the userinvitations. /// </summary> /// <param name="userinvitationParameters">The userinvitation parameters.</param> /// <returns></returns> public async Task <APIResponse> GetUserinvitations(UserinvitationParameters userinvitationParameters) { try { var client = httpClientFactory.CreateClient(EventAssistantServiceOperation.serviceName); UriBuilder url = new UriBuilder(servicesConfig.EventAssistant + EventAssistantServiceOperation.GetUserInvitations()); url.Query = QueryStringHelper.ConvertToQueryString(userinvitationParameters); var response = await client.GetAsync(url.ToString()); if (response.IsSuccessStatusCode) { var multicode = JsonConvert.DeserializeObject <List <UserinvitationResponse> >(await response.Content.ReadAsStringAsync()); return(new APIResponse(multicode, HttpStatusCode.OK)); } return(new APIResponse(response.StatusCode)); } catch (Exception ex) { logger.Error(ex, "Exception in method 'GetMultiDetails()'"); var exMessage = ex.InnerException != null ? ex.InnerException.Message : ex.Message; return(new APIResponse(exMessage, HttpStatusCode.InternalServerError)); } }