Skip to content

Commit

Permalink
Add options parameters to CalendarAPI::updateCalendarItem
Browse files Browse the repository at this point in the history
  • Loading branch information
Garethp committed Jan 26, 2018
1 parent 66896f0 commit 2af8a7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.9.6 - 2018-01-26
* Added an `options` parameter to `CalendarAPI::updateCalendarItem()`

## 0.9.5 - 2017-10-31
* Allow strings to be passed in to `MessageType::setBccRecipients` and `MessageType::setCcRecipients` as well as their
functions to add recipients, just like we do for To Recipients
Expand Down
6 changes: 4 additions & 2 deletions src/CalendarAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,10 @@ public function getCalendarItem($id, $changeKey)
*
* @param $itemId Type\ItemIdType
* @param array $changes
* @param array $options
* @return Type\CalendarItemType[]
*/
public function updateCalendarItem(Type\ItemIdType $itemId, $changes)
public function updateCalendarItem(Type\ItemIdType $itemId, $changes, $options = array())
{
//Create the request
$request = [
Expand All @@ -151,10 +152,11 @@ public function updateCalendarItem(Type\ItemIdType $itemId, $changes)
]
];

$options = [
$defaultOptions = [
'SendMeetingInvitationsOrCancellations' => 'SendToNone'
];

$options = array_replace_recursive($defaultOptions, $options);
$items = $this->updateItems($request, $options)->getCalendarItem();
return Utilities\ensureIsArray($items);
}
Expand Down

0 comments on commit 2af8a7a

Please sign in to comment.