object return instead of array when call getMeetingTimeSuggestions under MeetingTimeSuggestionResult
I called the FindMeetingTime API ( /me/findMeetingTimes ) and got the list of suggestion result returned,
Here is the code:
$findMeetingEventsUrl = '/me/findMeetingTimes';
$results = $graph->createRequest('POST', $findMeetingEventsUrl)
->addHeaders(['Prefer'=> 'outlook.timezone="Pacific Standard Time"'])
->attachBody($newEvent)
->setReturnType(Model\MeetingTimeSuggestionsResult::class)
->execute();
When I call the getMeetingTimeSuggestions, I only get get an 'object' ("MeetingTimeSuggtesions") instead of array of "MeetingTimeSuggtesions". I expect to get the collections from this call. Do I miss something? Thank you.
Error
Cannot use object of type Microsoft\Graph\Model\MeetingTimeSuggestion as array
Source: https://github.com/microsoftgraph/msgraph-sdk-php/blob/dev/src/Model/MeetingTimeSuggestionsResult.php
Hello @jp-Telus, thanks for reporting the issue and sorry for the inconveniencies caused. There is a fix which ready for this on MSGraph-SDK-Code-Generator. Once this is merged, I will update this issue.
Related to #76 #97