/// <summary> /// Provides meeting times suggestions /// </summary> /// <param name="accessToken">Access Token for API</param> /// <param name="userFindMeetingTimesRequestBody">Request object for calling Find Meeting Times API</param> /// <returns>Task of <see cref="MeetingTimeSuggestionsResult"/></returns> public async Task <MeetingTimeSuggestionsResult> GetMeetingsTimeSuggestions(string accessToken, UserFindMeetingTimesRequestBody userFindMeetingTimesRequestBody) { try { var rooms = _roomService.GetRooms(); _roomService.AddRooms(userFindMeetingTimesRequestBody, rooms); var httpResponseMessage = await _httpService.AuthenticatedPost(FindsMeetingTimeEndpoint, accessToken, userFindMeetingTimesRequestBody, string.Empty); var meetingTimeSuggestionsResult = JsonConvert.DeserializeObject <MeetingTimeSuggestionsResult>(await httpResponseMessage.Content.ReadAsStringAsync()); return(meetingTimeSuggestionsResult); } catch (Exception ex) { _loggingService.Error(ex); throw; } }