Completed
Push — master ( a47526...1416c9 )
by James
03:10
created

Client::UpdateInboxRules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Contains \jamesiarmes\PhpEws\Client.
4
 */
5
6
namespace jamesiarmes\PhpEws;
7
8
/**
9
 * Base class of the Exchange Web Services application.
10
 *
11
 * @package php-ews\Client
12
 */
13
class Client
14
{
15
    /**
16
     * Microsoft Exchange 2007
17
     *
18
     * @var string
19
     */
20
    const VERSION_2007 = 'Exchange2007';
21
22
    /**
23
     * Microsoft Exchange 2007 SP1
24
     *
25
     * @var string
26
     */
27
    const VERSION_2007_SP1 = 'Exchange2007_SP1';
28
29
    /**
30
     * Microsoft Exchange 2007 SP2
31
     *
32
     * @var string
33
     */
34
    const VERSION_2007_SP2 = 'Exchange2007_SP2';
35
36
    /**
37
     * Microsoft Exchange 2007 SP3
38
     *
39
     * @var string
40
     */
41
    const VERSION_2007_SP3 = 'Exchange2007_SP3';
42
43
    /**
44
     * Microsoft Exchange 2010
45
     *
46
     * @var string
47
     */
48
    const VERSION_2010 = 'Exchange2010';
49
50
    /**
51
     * Microsoft Exchange 2010 SP1
52
     *
53
     * @var string
54
     */
55
    const VERSION_2010_SP1 = 'Exchange2010_SP1';
56
57
    /**
58
     * Microsoft Exchange 2010 SP2
59
     *
60
     * @var string
61
     */
62
    const VERSION_2010_SP2 = 'Exchange2010_SP2';
63
64
    /**
65
     * Microsoft Exchange 2013.
66
     *
67
     * @var string
68
     */
69
    const VERSION_2013 = 'Exchange2013';
70
71
    /**
72
     * Microsoft Exchange 2013 SP1.
73
     *
74
     * @var string
75
     */
76
    const VERSION_2013_SP1 = 'Exchange2013_SP1';
77
78
    /**
79
     * Microsoft Exchange 2016.
80
     *
81
     * @var string
82
     */
83
    const VERSION_2016 = 'Exchange2016';
84
85
    /**
86
     * Password to use when connecting to the Exchange server.
87
     *
88
     * @var string
89
     */
90
    protected $password;
91
92
    /**
93
     * Location of the Exchange server.
94
     *
95
     * @var string
96
     */
97
    protected $server;
98
99
    /**
100
     * SOAP client used to make the request
101
     *
102
     * @var \jamesiarmes\PhpEws\SoapClient
103
     */
104
    protected $soap;
105
106
    /**
107
     * Username to use when connecting to the Exchange server.
108
     *
109
     * @var string
110
     */
111
    protected $username;
112
113
    /**
114
     * Exchange impersonation
115
     *
116
     * @var \jamesiarmes\PhpEws\Type\ExchangeImpersonationType
117
     */
118
    protected $impersonation;
119
120
    /**
121
     * Microsoft Exchange version that we are going to connect to
122
     *
123
     * @var string
124
     *
125
     * @see Client::VERSION_2007
126
     * @see Client::VERSION_2007_SP1
127
     * @see Client::VERSION_2007_SP2
128
     * @see Client::VERSION_2007_SP3
129
     * @see Client::VERSION_2010
130
     * @see Client::VERSION_2010_SP1
131
     * @see Client::VERSION_2010_SP2
132
     */
133
    protected $version;
134
135
    /**
136
     * Constructor for the ExchangeWebServices class
137
     *
138
     * @param string $server
139
     * @param string $username
140
     * @param string $password
141
     * @param string $version One of the Client::VERSION_* constants.
142
     */
143
    public function __construct(
144
        $server = null,
145
        $username = null,
146
        $password = null,
147
        $version = self::VERSION_2007
148
    ) {
149
        // Set the object properties.
150
        $this->setServer($server);
151
        $this->setUsername($username);
152
        $this->setPassword($password);
153
        $this->setVersion($version);
154
    }
155
156
    /**
157
     * Returns the SOAP Client that may be used to make calls against the server
158
     *
159
     * @return \jamesiarmes\PhpEws\SoapClient
160
     */
161
    public function getClient()
162
    {
163
        return $this->initializeSoapClient();
164
    }
165
166
    /**
167
     * Sets the impersonation property
168
     *
169
     * @param \jamesiarmes\PhpEws\Type\ExchangeImpersonationType $impersonation
170
     */
171
    public function setImpersonation($impersonation)
172
    {
173
        $this->impersonation = $impersonation;
174
175
        return true;
176
    }
177
178
    /**
179
     * Sets the password property
180
     *
181
     * @param string $password
182
     */
183
    public function setPassword($password)
184
    {
185
        $this->password = $password;
186
187
        return true;
188
    }
189
190
    /**
191
     * Sets the server property
192
     *
193
     * @param string $server
194
     */
195
    public function setServer($server)
196
    {
197
        $this->server = $server;
198
199
        return true;
200
    }
201
202
    /**
203
     * Sets the user name property
204
     *
205
     * @param string $username
206
     */
207
    public function setUsername($username)
208
    {
209
        $this->username = $username;
210
211
        return true;
212
    }
213
214
    /**
215
     * Sets the version property
216
     *
217
     * @param string $version
218
     */
219
    public function setVersion($version)
220
    {
221
        $this->version = $version;
222
223
        return true;
224
    }
225
226
    /**
227
     * Adds one or more delegates to a principal's mailbox and sets specific
228
     * access permissions.
229
     *
230
     * @since Exchange 2007 SP1
231
     *
232
     * @param \jamesiarmes\PhpEws\Request\AddDelegateType $request
233
     * @return \jamesiarmes\PhpEws\Response\AddDelegateResponseMessageType
234
     */
235
    public function AddDelegate($request)
236
    {
237
        return $this->makeRequest(__FUNCTION__, $request);
238
    }
239
240
    /**
241
     * Adds a distribution group to the instant messaging (IM) list in the
242
     * Unified Contact Store.
243
     *
244
     * @since Exchange 2013
245
     *
246
     * @param \jamesiarmes\PhpEws\Request\AddDistributionGroupToImListType $request
247
     * @return \jamesiarmes\PhpEws\Response\AddDistributionGroupToImListResponseMessageType
248
     */
249
    public function AddDistributionGroupToImList($request)
250
    {
251
        return $this->makeRequest(__FUNCTION__, $request);
252
    }
253
254
    /**
255
     * Adds an existing instant messaging (IM) contact to a group.
256
     *
257
     * @since Exchange 2013
258
     *
259
     * @param \jamesiarmes\PhpEws\Request\AddImContactToGroup $request
260
     * @return \jamesiarmes\PhpEws\Response\AddImContactToGroupResponseMessageType
261
     */
262
    public function AddImContactToGroup($request)
263
    {
264
        return $this->makeRequest(__FUNCTION__, $request);
265
    }
266
267
    /**
268
     * Adds a new instant messaging (IM) group to a mailbox.
269
     *
270
     * @since Exchange 2013
271
     *
272
     * @param \jamesiarmes\PhpEws\Request\AddImGroupType $request
273
     * @return \jamesiarmes\PhpEws\Response\AddImGroupResponseMessageType
274
     */
275
    public function AddImGroup($request)
276
    {
277
        return $this->makeRequest(__FUNCTION__, $request);
278
    }
279
280
    /**
281
     * Adds a new contact to an instant messaging (IM) group.
282
     *
283
     * @since Exchange 2013
284
     *
285
     * @param \jamesiarmes\PhpEws\Request\AddNewImContactToGroup $request
286
     * @return \jamesiarmes\PhpEws\Response\AddNewImContactToGroupResponseMessageType
287
     */
288
    public function AddNewImContactToGroup($request)
289
    {
290
        return $this->makeRequest(__FUNCTION__, $request);
291
    }
292
293
    /**
294
     * Adds a new contact to a group based on a contact's phone number.
295
     *
296
     * @since Exchange 2013
297
     *
298
     * @param \jamesiarmes\PhpEws\Request\AddNewTelUriContactToGroupType $request
299
     * @return \jamesiarmes\PhpEws\Response\AddNewTelUriContactToGroupResponse
300
     */
301
    public function AddNewTelUriContactToGroup($request)
302
    {
303
        return $this->makeRequest(__FUNCTION__, $request);
304
    }
305
306
    /**
307
     * Sets a one-time or follow up action on all the items in a conversation.
308
     *
309
     * This operation allows you to categorize, move, copy, delete, and set the
310
     * read state on all items in a conversation. Actions can also be set for
311
     * new messages in a conversation.
312
     *
313
     * @since Exchange 2010 SP1
314
     *
315
     * @param \jamesiarmes\PhpEws\Request\ApplyConversationActionType $request
316
     * @return \jamesiarmes\PhpEws\Response\ApplyConversationActionResponseType
317
     */
318
    public function ApplyConversationAction($request)
319
    {
320
        return $this->makeRequest(__FUNCTION__, $request);
321
    }
322
323
    /**
324
     * Moves an item into the mailbox user's archive mailbox.
325
     *
326
     * @since Exchange 2013
327
     *
328
     * @param \jamesiarmes\PhpEws\Request\ArchiveItemType $request
329
     * @return \jamesiarmes\PhpEws\Response\ArchiveItemResponse
330
     */
331
    public function ArchiveItem($request)
332
    {
333
        return $this->makeRequest(__FUNCTION__, $request);
334
    }
335
336
    /**
337
     * Converts item and folder identifiers between formats that are accepted by
338
     * Exchange Online, Exchange Online as part of Office 365, and on-premises
339
     * versions of Exchange.
340
     *
341
     * @since Exchange 2007 SP1
342
     *
343
     * @param \jamesiarmes\PhpEws\Request\ConvertIdType $request
344
     * @return \jamesiarmes\PhpEws\Response\ConvertIdResponseType
345
     */
346
    public function ConvertId($request)
347
    {
348
        return $this->makeRequest(__FUNCTION__, $request);
349
    }
350
351
    /**
352
     * Copies folders in a mailbox.
353
     *
354
     * @since Exchange 2007
355
     *
356
     * @param \jamesiarmes\PhpEws\Request\CopyFolderType $request
357
     * @return \jamesiarmes\PhpEws\Response\CopyFolderResponseType
358
     */
359
    public function CopyFolder($request)
360
    {
361
        return $this->makeRequest(__FUNCTION__, $request);
362
    }
363
364
    /**
365
     * Copies items and puts the items in a different folder.
366
     *
367
     * @since Exchange 2007
368
     *
369
     * @param \jamesiarmes\PhpEws\Request\CopyItemType $request
370
     * @return \jamesiarmes\PhpEws\Response\CopyItemResponseType
371
     */
372
    public function CopyItem($request)
373
    {
374
        return $this->makeRequest(__FUNCTION__, $request);
375
    }
376
377
    /**
378
     * Creates either an item or file attachment and attaches it to the
379
     * specified item.
380
     *
381
     * @since Exchange 2007
382
     *
383
     * @param \jamesiarmes\PhpEws\Request\CreateAttachmentType $request
384
     * @return \jamesiarmes\PhpEws\Response\CreateAttachmentResponseType
385
     */
386
    public function CreateAttachment($request)
387
    {
388
        return $this->makeRequest(__FUNCTION__, $request);
389
    }
390
391
    /**
392
     * Creates folders, calendar folders, contacts folders, tasks folders, and
393
     * search folders.
394
     *
395
     * @since Exchange 2007
396
     *
397
     * @param \jamesiarmes\PhpEws\Request\CreateFolderType $request
398
     * @return \jamesiarmes\PhpEws\Response\CreateFolderResponseType
399
     */
400
    public function CreateFolder($request)
401
    {
402
        return $this->makeRequest(__FUNCTION__, $request);
403
    }
404
405
    /**
406
     * Creates a folder hierarchy.
407
     *
408
     * @since Exchange 2013
409
     *
410
     * @param \jamesiarmes\PhpEws\Request\CreateFolderPathType $request
411
     * @return \jamesiarmes\PhpEws\Response\CreateFolderPathResponseType
412
     */
413
    public function CreateFolderPath($request)
414
    {
415
        return $this->makeRequest(__FUNCTION__, $request);
416
    }
417
418
    /**
419
     * Creates items in the Exchange store.
420
     *
421
     * @since Exchange 2007
422
     *
423
     * @param \jamesiarmes\PhpEws\Request\CreateItemType $request
424
     * @return \jamesiarmes\PhpEws\Response\CreateItemResponseType
425
     */
426
    public function CreateItem($request)
427
    {
428
        return $this->makeRequest(__FUNCTION__, $request);
429
    }
430
431
    /**
432
     * Creates a managed folder in the Exchange store.
433
     *
434
     * @since Exchange 2007
435
     *
436
     * @param \jamesiarmes\PhpEws\Request\CreateManagedFolderRequestType $request
437
     * @return \jamesiarmes\PhpEws\Response\CreateManagedFolderResponseType
438
     */
439
    public function CreateManagedFolder($request)
440
    {
441
        return $this->makeRequest(__FUNCTION__, $request);
442
    }
443
444
    /**
445
     * Creates a user configuration object on a folder.
446
     *
447
     * @since Exchange 2010
448
     *
449
     * @param \jamesiarmes\PhpEws\Request\CreateUserConfigurationType $request
450
     * @return \jamesiarmes\PhpEws\Response\CreateUserConfigurationResponseType
451
     */
452
    public function CreateUserConfiguration($request)
453
    {
454
        return $this->makeRequest(__FUNCTION__, $request);
455
    }
456
457
    /**
458
     * Deletes file and item attachments from an existing item in the Exchange
459
     * store.
460
     *
461
     * @since Exchange 2007
462
     *
463
     * @param \jamesiarmes\PhpEws\Request\DeleteAttachmentType $request
464
     * @return \jamesiarmes\PhpEws\Response\DeleteAttachmentResponseType
465
     */
466
    public function DeleteAttachment($request)
467
    {
468
        return $this->makeRequest(__FUNCTION__, $request);
469
    }
470
471
    /**
472
     * Deletes folders from a mailbox.
473
     *
474
     * @since Exchange 2007
475
     *
476
     * @param \jamesiarmes\PhpEws\Request\DeleteFolderType $request
477
     * @return \jamesiarmes\PhpEws\Response\DeleteFolderResponseType
478
     */
479
    public function DeleteFolder($request)
480
    {
481
        return $this->makeRequest(__FUNCTION__, $request);
482
    }
483
484
    /**
485
     * Deletes items in the Exchange store.
486
     *
487
     * @since Exchange 2007
488
     *
489
     * @param \jamesiarmes\PhpEws\Request\DeleteItemType $request
490
     * @return \jamesiarmes\PhpEws\Response\DeleteItemResponseType
491
     */
492
    public function DeleteItem($request)
493
    {
494
        return $this->makeRequest(__FUNCTION__, $request);
495
    }
496
497
    /**
498
     * Deletes a user configuration object on a folder.
499
     *
500
     * @since Exchange 2010
501
     *
502
     * @param \jamesiarmes\PhpEws\Request\DeleteUserConfigurationType $request
503
     * @return \jamesiarmes\PhpEws\Response\DeleteUserConfigurationResponseType
504
     */
505
    public function DeleteUserConfiguration($request)
506
    {
507
        return $this->makeRequest(__FUNCTION__, $request);
508
    }
509
510
    /**
511
     * Disables a mail app for Outlook.
512
     *
513
     * @since Exchange 2013
514
     *
515
     * @param \jamesiarmes\PhpEws\Request\DisableAppType $request
516
     * @return \jamesiarmes\PhpEws\Response\DisableAppResponseType
517
     */
518
    public function DisableApp($request)
519
    {
520
        return $this->makeRequest(__FUNCTION__, $request);
521
    }
522
523
    /**
524
     * Terminates a telephone call.
525
     *
526
     * @since Exchange 2010
527
     *
528
     * @param \jamesiarmes\PhpEws\Request\DisconnectPhoneCallType $request
529
     * @return \jamesiarmes\PhpEws\Response\DisconnectPhoneCallResponseMessageType
530
     */
531
    public function DisconnectPhoneCall($request)
532
    {
533
        return $this->makeRequest(__FUNCTION__, $request);
534
    }
535
536
    /**
537
     * Empties folders in a mailbox.
538
     *
539
     * Optionally, this operation enables you to delete the subfolders of the
540
     * specified folder. When a subfolder is deleted, the subfolder and the
541
     * messages within the subfolder are deleted.
542
     *
543
     * @since Exchange 2010
544
     *
545
     * @param \jamesiarmes\PhpEws\Request\EmptyFolderType $request
546
     * @return \jamesiarmes\PhpEws\Response\EmptyFolderResponseType
547
     */
548
    public function EmptyFolder($request)
549
    {
550
        return $this->makeRequest(__FUNCTION__, $request);
551
    }
552
553
    /**
554
     * Exposes the full membership of distribution lists.
555
     *
556
     * @since Exchange 2007
557
     *
558
     * @param \jamesiarmes\PhpEws\Request\ExpandDLType $request
559
     * @return \jamesiarmes\PhpEws\Response\ExpandDLResponseType
560
     */
561
    public function ExpandDL($request)
562
    {
563
        return $this->makeRequest(__FUNCTION__, $request);
564
    }
565
566
    /**
567
     * Exports items out of a mailbox.
568
     *
569
     * @since Exchange 2010 SP1
570
     *
571
     * @param \jamesiarmes\PhpEws\Request\ExportItemsType $request
572
     * @return \jamesiarmes\PhpEws\Response\ExportItemsResponseType
573
     */
574
    public function ExportItems($request)
575
    {
576
        return $this->makeRequest(__FUNCTION__, $request);
577
    }
578
579
    /**
580
     * Enumerates a list of conversations in a folder.
581
     *
582
     * @param \jamesiarmes\PhpEws\Request\FindConversationType $request
583
     * @return \jamesiarmes\PhpEws\Response\FindConversationResponseMessageType
584
     */
585
    public function FindConversation($request)
586
    {
587
        return $this->makeRequest(__FUNCTION__, $request);
588
    }
589
590
    /**
591
     * Finds subfolders of an identified folder and returns a set of properties
592
     * that describe the set of subfolders.
593
     *
594
     * @since Exchange 2007
595
     *
596
     * @param \jamesiarmes\PhpEws\Request\FindFolderType $request
597
     * @return \jamesiarmes\PhpEws\Response\FindFolderResponseType
598
     */
599
    public function FindFolder($request)
600
    {
601
        return $this->makeRequest(__FUNCTION__, $request);
602
    }
603
604
    /**
605
     * Searches for items that are located in a user’s mailbox.
606
     *
607
     * This operation provides many ways to filter and format how search results
608
     * are returned to the caller.
609
     *
610
     * @since Exchange 2007
611
     *
612
     * @param \jamesiarmes\PhpEws\Request\FindItemType $request
613
     * @return \jamesiarmes\PhpEws\Response\FindItemResponseType
614
     */
615
    public function FindItem($request)
616
    {
617
        return $this->makeRequest(__FUNCTION__, $request);
618
    }
619
620
    /**
621
     * Finds messages that meet the specified criteria.
622
     *
623
     * @since Exchange 2010
624
     *
625
     * @param \jamesiarmes\PhpEws\Request\FindMessageTrackingReportRequestType $request
626
     * @return \jamesiarmes\PhpEws\Response\FindMessageTrackingReportResponseMessageType
627
     */
628
    public function FindMessageTrackingReport($request)
629
    {
630
        return $this->makeRequest(__FUNCTION__, $request);
631
    }
632
633
    /**
634
     * Returns all persona objects from a specified Contacts folder or retrieves
635
     * contacts that match a specified query string.
636
     *
637
     * @since Exchange 2013
638
     *
639
     * @param \jamesiarmes\PhpEws\Request\FindPeopleType $request
640
     * @return \jamesiarmes\PhpEws\Response\FindPeopleResponseMessageType
641
     */
642
    public function FindPeople($request)
643
    {
644
        return $this->makeRequest(__FUNCTION__, $request);
645
    }
646
647
    /**
648
     * Retrieves app manifests.
649
     *
650
     * @since Exchange 2013 SP1
651
     *
652
     * @param \jamesiarmes\PhpEws\Request\GetAppManifestsType $request
653
     * @return \jamesiarmes\PhpEws\Response\GetAppManifestsResponseType
654
     */
655
    public function GetAppManifests($request)
656
    {
657
        return $this->makeRequest(__FUNCTION__, $request);
658
    }
659
660
    /**
661
     * Retrieves the URL for the app marketplace that a client can visit to
662
     * acquire apps to install in a mailbox.
663
     *
664
     * @since Exchange 2013 SP1
665
     *
666
     * @param \jamesiarmes\PhpEws\Request\GetAppMarketplaceUrl $request
667
     * @return \jamesiarmes\PhpEws\Response\GetAppMarketplaceUrlResponseMessageType
668
     */
669
    public function GetAppMarketplaceUrl($request)
670
    {
671
        return $this->makeRequest(__FUNCTION__, $request);
672
    }
673
674
    /**
675
     * Retrieves existing attachments on items in the Exchange store.
676
     *
677
     * @since Exchange 2007
678
     *
679
     * @param \jamesiarmes\PhpEws\Request\GetAttachmentType $request
680
     * @return \jamesiarmes\PhpEws\Response\GetAttachmentResponseType
681
     */
682
    public function GetAttachment($request)
683
    {
684
        return $this->makeRequest(__FUNCTION__, $request);
685
    }
686
687
    /**
688
     * Gets a client access token for a mail app for Outlook.
689
     *
690
     * @since Exchange 2013
691
     *
692
     * @param \jamesiarmes\PhpEws\Request\GetClientAccessTokenType $request
693
     * @return \jamesiarmes\PhpEws\Response\GetClientAccessTokenResponseType
694
     */
695
    public function GetClientAccessToken($request)
696
    {
697
        return $this->makeRequest(__FUNCTION__, $request);
698
    }
699
700
    /**
701
     * Retrieves one or more sets of items that are organized in to nodes in a
702
     * conversation.
703
     *
704
     * @since Exchange 2013
705
     *
706
     * @param \jamesiarmes\PhpEws\Request\GetConversationItemsType $request
707
     * @return \jamesiarmes\PhpEws\Response\GetConversationItemsResponseType
708
     */
709
    public function GetConversationItems($request)
710
    {
711
        return $this->makeRequest(__FUNCTION__, $request);
712
    }
713
714
    /**
715
     * Retrieves the delegate settings for a specified mailbox.
716
     *
717
     * @since Exchange 2007 SP1
718
     *
719
     * @param \jamesiarmes\PhpEws\Request\GetDelegateType $request
720
     * @return \jamesiarmes\PhpEws\Response\GetDelegateResponseMessageType
721
     */
722
    public function GetDelegate($request)
723
    {
724
        return $this->makeRequest(__FUNCTION__, $request);
725
    }
726
727
    /**
728
     * Returns configuration information for in-place holds, saved discovery
729
     * searches, and the mailboxes that are enabled for discovery search.
730
     *
731
     * @since Exchange 2013
732
     *
733
     * @param \jamesiarmes\PhpEws\Request\GetDiscoverySearchConfigurationType $request
734
     * @return \jamesiarmes\PhpEws\Response\GetDiscoverySearchConfigurationResponseMessageType
735
     */
736
    public function GetDiscoverySearchConfiguration($request)
737
    {
738
        return $this->makeRequest(__FUNCTION__, $request);
739
    }
740
741
    /**
742
     * Used by pull subscription clients to request notifications from the
743
     * Client Access server.
744
     *
745
     * The response returns an array of items and events that have occurred in a
746
     * mailbox since the last the notification.
747
     *
748
     * @since Exchange 2007
749
     *
750
     * @param \jamesiarmes\PhpEws\Request\GetEventsType $request
751
     * @return \jamesiarmes\PhpEws\Response\GetEventsResponseType
752
     */
753
    public function GetEvents($request)
754
    {
755
        return $this->makeRequest(__FUNCTION__, $request);
756
    }
757
758
    /**
759
     * Gets folders from the Exchange store.
760
     *
761
     * @since Exchange 2007
762
     *
763
     * @param \jamesiarmes\PhpEws\Request\GetFolderType $request
764
     * @return \jamesiarmes\PhpEws\Response\GetFolderResponseType
765
     */
766
    public function GetFolder($request)
767
    {
768
        return $this->makeRequest(__FUNCTION__, $request);
769
    }
770
771
    /**
772
     * Retrieves the mailboxes that are under a specific hold and the associated
773
     * hold query.
774
     *
775
     * @since Exchange 2013
776
     *
777
     * @param \jamesiarmes\PhpEws\Request\GetHoldOnMailboxesType $request
778
     * @return \jamesiarmes\PhpEws\Response\GetHoldOnMailboxesResponseMessageType
779
     */
780
    public function GetHoldOnMailboxes($request)
781
    {
782
        return $this->makeRequest(__FUNCTION__, $request);
783
    }
784
785
    /**
786
     * Retrieves the list of instant messaging (IM) groups and IM contact
787
     * personas in a mailbox.
788
     *
789
     * @since Exchange 2013
790
     *
791
     * @param \jamesiarmes\PhpEws\Request\GetImItemListType $request
792
     * @return \jamesiarmes\PhpEws\Response\GetImItemListResponseMessageType
793
     */
794
    public function GetImItemList($request)
795
    {
796
        return $this->makeRequest(__FUNCTION__, $request);
797
    }
798
799
    /**
800
     * Retrieves information about instant messaging (IM) groups and IM contact
801
     * personas.
802
     *
803
     * @since Exchange 2013
804
     *
805
     * @param \jamesiarmes\PhpEws\Request\GetImItemsType $request
806
     * @return \jamesiarmes\PhpEws\Response\GetImItemsResponse
807
     */
808
    public function GetImItems($request)
809
    {
810
        return $this->makeRequest(__FUNCTION__, $request);
811
    }
812
813
    /**
814
     * Retrieves Inbox rules in the identified user's mailbox.
815
     *
816
     * @since Exchange 2010
817
     *
818
     * @param \jamesiarmes\PhpEws\Request\GetInboxRulesRequestType $request
819
     * @return \jamesiarmes\PhpEws\Response\GetInboxRulesResponseType
820
     */
821
    public function GetInboxRules($request)
822
    {
823
        return $this->makeRequest(__FUNCTION__, $request);
824
    }
825
826
    /**
827
     * Gets folders from the Exchange store.
828
     *
829
     * @since Exchange 2007
830
     *
831
     * @param \jamesiarmes\PhpEws\Request\GetItemType $request
832
     * @return \jamesiarmes\PhpEws\Response\GetItemResponseType
833
     */
834
    public function GetItem($request)
835
    {
836
        return $this->makeRequest(__FUNCTION__, $request);
837
    }
838
839
    /**
840
     * Retrieves the mail tips information for the specified mailbox.
841
     *
842
     * @since Exchange 2010
843
     *
844
     * @param \jamesiarmes\PhpEws\Request\GetMailTipsType $request
845
     * @return \jamesiarmes\PhpEws\Response\GetMailTipsResponseMessageType
846
     */
847
    public function GetMailTips($request)
848
    {
849
        return $this->makeRequest(__FUNCTION__, $request);
850
    }
851
852
    /**
853
     * Retrieves tracking information about the specified messages.
854
     *
855
     * @since Exchange 2010
856
     *
857
     * @param \jamesiarmes\PhpEws\Request\GetMessageTrackingReportRequestType $request
858
     * @return \jamesiarmes\PhpEws\Response\GetMessageTrackingReportResponseMessageType
859
     */
860
    public function GetMessageTrackingReport($request)
861
    {
862
        return $this->makeRequest(__FUNCTION__, $request);
863
    }
864
865
    /**
866
     * Retrieves details about items that cannot be indexed.
867
     *
868
     * This includes, but is not limited to, the item identifier, an error code,
869
     * an error description, when an attempt was made to index the item, and
870
     * additional information about the file.
871
     *
872
     * @since Exchange 2013
873
     *
874
     * @param \jamesiarmes\PhpEws\Request\GetNonIndexableItemDetailsType $request
875
     * @return \jamesiarmes\PhpEws\Response\GetNonIndexableItemDetailsResponseMessageType
876
     */
877
    public function GetNonIndexableItemDetails($request)
878
    {
879
        return $this->makeRequest(__FUNCTION__, $request);
880
    }
881
882
    /**
883
     * Retrieves the count of items that cannot be indexed in a mailbox.
884
     *
885
     * @since Exchange 2013
886
     *
887
     * @param \jamesiarmes\PhpEws\Request\GetNonIndexableItemStatisticsType $request
888
     * @return \jamesiarmes\PhpEws\Response\GetNonIndexableItemStatisticsResponseMessageType
889
     */
890
    public function GetNonIndexableItemStatistics($request)
891
    {
892
        return $this->makeRequest(__FUNCTION__, $request);
893
    }
894
895
    /**
896
     * Provides the email account password expiration date for the current user.
897
     *
898
     * @since Exchange 2010 SP2
899
     *
900
     * @param \jamesiarmes\PhpEws\Request\GetPasswordExpirationDateType $request
901
     * @return \jamesiarmes\PhpEws\Response\GetPasswordExpirationDateResponseMessageType
902
     */
903
    public function GetPasswordExpirationDate($request)
904
    {
905
        return $this->makeRequest(__FUNCTION__, $request);
906
    }
907
908
    /**
909
     * Retrieves a set of properties that are associated with a persona.
910
     *
911
     * @since Exchange 2013
912
     *
913
     * @param \jamesiarmes\PhpEws\Request\GetPersonaType $request
914
     * @return \jamesiarmes\PhpEws\Response\GetPersonaResponseMessageType
915
     */
916
    public function GetPersona($request)
917
    {
918
        return $this->makeRequest(__FUNCTION__, $request);
919
    }
920
921
    /**
922
     * Retrieves information about the specified telephone call.
923
     *
924
     * @since Exchange 2010
925
     *
926
     * @param \jamesiarmes\PhpEws\Request\GetPhoneCallInformationType $request
927
     * @return \jamesiarmes\PhpEws\Response\GetPhoneCallInformationResponseMessageType
928
     */
929
    public function GetPhoneCallInformation($request)
930
    {
931
        return $this->makeRequest(__FUNCTION__, $request);
932
    }
933
934
    /**
935
     * Retrieves reminders for calendar and task items.
936
     *
937
     * @since Exchange 2013
938
     *
939
     * @param \jamesiarmes\PhpEws\Request\GetRemindersType $request
940
     * @return \jamesiarmes\PhpEws\Response\GetRemindersResponseMessageType
941
     */
942
    public function GetReminders($request)
943
    {
944
        return $this->makeRequest(__FUNCTION__, $request);
945
    }
946
947
    /**
948
     * Retrieves the room lists that are available within the Exchange
949
     * organization.
950
     *
951
     * @since Exchange 2010
952
     *
953
     * @param \jamesiarmes\PhpEws\Request\GetRoomListsType $request
954
     * @return \jamesiarmes\PhpEws\Response\GetRoomListsResponseMessageType
955
     */
956
    public function GetRoomLists($request)
957
    {
958
        return $this->makeRequest(__FUNCTION__, $request);
959
    }
960
961
    /**
962
     * Retrieves the rooms within the specified room list.
963
     *
964
     * @since Exchange 2010 SP1
965
     *
966
     * @param \jamesiarmes\PhpEws\Request\GetRoomsType $request
967
     * @return \jamesiarmes\PhpEws\Response\GetRoomsResponseMessageType
968
     */
969
    public function GetRooms($request)
970
    {
971
        return $this->makeRequest(__FUNCTION__, $request);
972
    }
973
974
    /**
975
     * Retrieves a scoped set of searchable mailboxes for discovery searches.
976
     *
977
     * The scope of searchable mailboxes returned in the response is determined
978
     * by the search filter and whether distribution group membership is
979
     * expanded.
980
     *
981
     * @since Exchange 2013
982
     *
983
     * @param \jamesiarmes\PhpEws\Request\GetSearchableMailboxesType $request
984
     * @return \jamesiarmes\PhpEws\Response\GetSearchableMailboxesResponseMessageType
985
     */
986
    public function GetSearchableMailboxes($request)
987
    {
988
        return $this->makeRequest(__FUNCTION__, $request);
989
    }
990
991
    /**
992
     * Retrieve the timezones supported by the server.
993
     *
994
     * @since Exchange 2010
995
     *
996
     * @param \jamesiarmes\PhpEws\Request\GetServerTimeZonesType $request
997
     * @return \jamesiarmes\PhpEws\Response\GetServerTimeZonesResponseType
998
     */
999
    public function GetServerTimeZones($request)
1000
    {
1001
        return $this->makeRequest(__FUNCTION__, $request);
1002
    }
1003
1004
    /**
1005
     * Retrieves configuration information for the specified type of service.
1006
     *
1007
     * This operation can return configuration settings for the Unified
1008
     * Messaging, Protection Rules, and Mail Tips services.
1009
     *
1010
     * @since Exchange 2010
1011
     *
1012
     * @param \jamesiarmes\PhpEws\Request\GetServiceConfigurationType $request
1013
     * @return \jamesiarmes\PhpEws\Response\GetServiceConfigurationResponseMessageType
1014
     */
1015
    public function GetServiceConfiguration($request)
1016
    {
1017
        return $this->makeRequest(__FUNCTION__, $request);
1018
    }
1019
1020
    /**
1021
     * Retrieves the local folder identifier of a specified shared folder.
1022
     *
1023
     * @since Exchange 2010
1024
     *
1025
     * @param \jamesiarmes\PhpEws\Request\GetSharingFolderType $request
1026
     * @return \jamesiarmes\PhpEws\Response\GetSharingFolderResponseMessageType
1027
     */
1028
    public function GetSharingFolder($request)
1029
    {
1030
        return $this->makeRequest(__FUNCTION__, $request);
1031
    }
1032
1033
    /**
1034
     * Gets an opaque authentication token that identifies a sharing invitation.
1035
     *
1036
     * @since Exchange 2010
1037
     *
1038
     * @param \jamesiarmes\PhpEws\Request\GetSharingMetadataType $request
1039
     * @return \jamesiarmes\PhpEws\Response\GetSharingMetadataResponseMessageType
1040
     */
1041
    public function GetSharingMetadata($request)
1042
    {
1043
        return $this->makeRequest(__FUNCTION__, $request);
1044
    }
1045
1046
    /**
1047
     * Requests notifications from the Client Access server.
1048
     *
1049
     * The GetStreamingEvents response returns an array of items and events that
1050
     * have occurred in a mailbox since the last the notification.
1051
     *
1052
     * @since Exchange 2010 SP1
1053
     *
1054
     * @param \jamesiarmes\PhpEws\Request\GetStreamingEventsType $request
1055
     * @return \jamesiarmes\PhpEws\Response\GetStreamingEventsResponseType
1056
     */
1057
    public function GetStreamingEvents($request)
1058
    {
1059
        return $this->makeRequest(__FUNCTION__, $request);
1060
    }
1061
1062
    /**
1063
     * Provides detailed information about the availability of a set of users,
1064
     * rooms, and resources within a specified time period.
1065
     *
1066
     * @since Exchange 2007
1067
     *
1068
     * @param \jamesiarmes\PhpEws\Request\GetUserAvailabilityRequestType $request
1069
     * @return \jamesiarmes\PhpEws\Response\GetUserAvailabilityResponseType
1070
     */
1071
    public function GetUserAvailability($request)
1072
    {
1073
        return $this->makeRequest(__FUNCTION__, $request);
1074
    }
1075
1076
    /**
1077
     * Retrieves a user configuration object from a folder.
1078
     *
1079
     * @since Exchange 2010
1080
     *
1081
     * @param \jamesiarmes\PhpEws\Request\GetUserConfigurationType $request
1082
     * @return \jamesiarmes\PhpEws\Response\GetUserConfigurationResponseType
1083
     */
1084
    public function GetUserConfiguration($request)
1085
    {
1086
        return $this->makeRequest(__FUNCTION__, $request);
1087
    }
1088
1089
    /**
1090
     * Gets a mailbox user's Out of Office (OOF) settings and messages.
1091
     *
1092
     * @since Exchange 2007
1093
     *
1094
     * @param \jamesiarmes\PhpEws\Request\GetUserOofSettingsRequest $request
1095
     * @return \jamesiarmes\PhpEws\Response\GetUserOofSettingsResponse
1096
     */
1097
    public function GetUserOofSettings($request)
1098
    {
1099
        return $this->makeRequest(__FUNCTION__, $request);
1100
    }
1101
1102
    /**
1103
     * Retrieves a user photo from Active Directory Domain Services (AD DS).
1104
     *
1105
     * @since Exchange 2013
1106
     *
1107
     * @param \jamesiarmes\PhpEws\Request\GetUserPhotoType $request
1108
     * @return \jamesiarmes\PhpEws\Response\GetUserPhotoResponseMessageType
1109
     */
1110
    public function GetUserPhoto($request)
1111
    {
1112
        return $this->makeRequest(__FUNCTION__, $request);
1113
    }
1114
1115
    /**
1116
     * Retrieves a list of all default, system folder, and personal tags that
1117
     * are associated with a user by means of a system policy or that were
1118
     * applied by the user.
1119
     *
1120
     * @since Exchange 2013
1121
     *
1122
     * @param \jamesiarmes\PhpEws\Request\GetUserRetentionPolicyTagsType $request
1123
     * @return \jamesiarmes\PhpEws\Response\GetUserRetentionPolicyTagsResponseMessageType
1124
     */
1125
    public function GetUserRetentionPolicyTags($request)
1126
    {
1127
        return $this->makeRequest(__FUNCTION__, $request);
1128
    }
1129
1130
    /**
1131
     * Installs a mail app for Outlook in a mailbox.
1132
     *
1133
     * @since Exchange 2013
1134
     *
1135
     * @param \jamesiarmes\PhpEws\Request\InstallAppType $request
1136
     * @return \jamesiarmes\PhpEws\Response\InstallAppResponseType
1137
     */
1138
    public function InstallApp($request)
1139
    {
1140
        return $this->makeRequest(__FUNCTION__, $request);
1141
    }
1142
1143
    /**
1144
     * Sets the IsRead property on all items, in one or more folders, to
1145
     * indicate that all items are either read or unread.
1146
     *
1147
     * @since Exchange 2013
1148
     *
1149
     * @param \jamesiarmes\PhpEws\Request\MarkAllItemsAsRead $request
1150
     * @return \jamesiarmes\PhpEws\Response\MarkAllItemsAsReadResponseType
1151
     */
1152
    public function MarkAllItemsAsRead($request)
1153
    {
1154
        return $this->makeRequest(__FUNCTION__, $request);
1155
    }
1156
1157
    /**
1158
     * Adds and removes users from the blocked email list and moves email
1159
     * messages to the Junk Email folder.
1160
     *
1161
     * @since Exchange 2013
1162
     *
1163
     * @param \jamesiarmes\PhpEws\Request\MarkAsJunkType $request
1164
     * @return \jamesiarmes\PhpEws\Response\MarkAsJunkResponseType
1165
     */
1166
    public function MarkAsJunk($request)
1167
    {
1168
        return $this->makeRequest(__FUNCTION__, $request);
1169
    }
1170
1171
    /**
1172
     * Moves folders from a specified folder and puts them in another folder.
1173
     *
1174
     * @since Exchange 2007
1175
     *
1176
     * @param \jamesiarmes\PhpEws\Request\MoveFolderType $request
1177
     * @return \jamesiarmes\PhpEws\Response\MoveFolderResponseType
1178
     */
1179
    public function MoveFolder($request)
1180
    {
1181
        return $this->makeRequest(__FUNCTION__, $request);
1182
    }
1183
1184
    /**
1185
     * Moves one or more items to a single destination folder.
1186
     *
1187
     * @since Exchange 2007
1188
     *
1189
     * @param \jamesiarmes\PhpEws\Request\MoveItemType $request
1190
     * @return \jamesiarmes\PhpEws\Response\MoveItemResponseType
1191
     */
1192
    public function MoveItem($request)
1193
    {
1194
        return $this->makeRequest(__FUNCTION__, $request);
1195
    }
1196
1197
    /**
1198
     * Initiates a dismiss or snooze action on a reminder.
1199
     *
1200
     * @since Exchange 2013
1201
     *
1202
     * @param \jamesiarmes\PhpEws\Request\PerformReminderActionType $request
1203
     * @return \jamesiarmes\PhpEws\Response\PerformReminderActionResponseMessageType
1204
     */
1205
    public function PerformReminderAction($request)
1206
    {
1207
        return $this->makeRequest(__FUNCTION__, $request);
1208
    }
1209
1210
    /**
1211
     * Initiates an outbound call and plays a message over the telephone.
1212
     *
1213
     * @since Exchange 2010
1214
     *
1215
     * @param \jamesiarmes\PhpEws\Request\PlayOnPhoneType $request
1216
     * @return \jamesiarmes\PhpEws\Response\PlayOnPhoneResponseMessageType
1217
     */
1218
    public function PlayOnPhone($request)
1219
    {
1220
        return $this->makeRequest(__FUNCTION__, $request);
1221
    }
1222
1223
    /**
1224
     * Refreshes the specified local folder with the latest data from the folder
1225
     * that is being shared.
1226
     *
1227
     * @since Exchange 2010
1228
     *
1229
     * @param \jamesiarmes\PhpEws\Request\RefreshSharingFolderType $request
1230
     * @return \jamesiarmes\PhpEws\Response\RefreshSharingFolderResponseMessageType
1231
     */
1232
    public function RefreshSharingFolder($request)
1233
    {
1234
        return $this->makeRequest(__FUNCTION__, $request);
1235
    }
1236
1237
    /**
1238
     * Removes contacts from the Lync instant messaging (IM) list when Lync uses
1239
     * Exchange for the contact store.
1240
     *
1241
     * @since Exchange 2013
1242
     *
1243
     * @param \jamesiarmes\PhpEws\Request\RemoveContactFromImListType $request
1244
     * @return \jamesiarmes\PhpEws\Response\RemoveContactFromImListResponseMessageType
1245
     */
1246
    public function RemoveContactFromImList($request)
1247
    {
1248
        return $this->makeRequest(__FUNCTION__, $request);
1249
    }
1250
1251
    /**
1252
     * Removes one or more delegates from a user's mailbox.
1253
     *
1254
     * @since Exchange 2007 SP1
1255
     *
1256
     * @param \jamesiarmes\PhpEws\Request\RemoveDelegateType $request
1257
     * @return \jamesiarmes\PhpEws\Response\RemoveDelegateResponseMessageType
1258
     */
1259
    public function RemoveDelegate($request)
1260
    {
1261
        return $this->makeRequest(__FUNCTION__, $request);
1262
    }
1263
1264
    /**
1265
     * Removes a distribution group from the Lync instant messaging (IM) list
1266
     * when Lync uses Exchange for the contact store.
1267
     *
1268
     * @since Exchange 2013
1269
     *
1270
     * @param \jamesiarmes\PhpEws\Request\RemoveDistributionGroupFromImListType $request
1271
     * @return \jamesiarmes\PhpEws\Response\RemoveDistributionGroupFromImListResponseMessageType
1272
     */
1273
    public function RemoveDistributionGroupFromImList($request)
1274
    {
1275
        return $this->makeRequest(__FUNCTION__, $request);
1276
    }
1277
1278
    /**
1279
     * Removes a single IM contact from an IM group.
1280
     *
1281
     * @since Exchange 2013
1282
     *
1283
     * @param \jamesiarmes\PhpEws\Request\RemoveImContactFromGroupType $request
1284
     * @return \jamesiarmes\PhpEws\Response\RemoveImContactFromGroupResponseMessageType
1285
     */
1286
    public function RemoveImContactFromGroup($request)
1287
    {
1288
        return $this->makeRequest(__FUNCTION__, $request);
1289
    }
1290
1291
    /**
1292
     * Removes a single instant messaging (IM) group from a mailbox.
1293
     *
1294
     * @since Exchange 2013
1295
     *
1296
     * @param \jamesiarmes\PhpEws\Request\RemoveImGroupType $request
1297
     * @return \jamesiarmes\PhpEws\Response\RemoveImGroupResponseMessageType
1298
     */
1299
    public function RemoveImGroup($request)
1300
    {
1301
        return $this->makeRequest(__FUNCTION__, $request);
1302
    }
1303
1304
    /**
1305
     * Resolves ambiguous email addresses and display names.
1306
     *
1307
     * @since Exchange 2007
1308
     *
1309
     * @param \jamesiarmes\PhpEws\Request\ResolveNamesType $request
1310
     * @return \jamesiarmes\PhpEws\Response\ResolveNamesResponseType
1311
     */
1312
    public function ResolveNames($request)
1313
    {
1314
        return $this->makeRequest(__FUNCTION__, $request);
1315
    }
1316
1317
    /**
1318
     * Searches mailboxes for occurrences of terms in mailbox items.
1319
     *
1320
     * @since Exchange 2013
1321
     *
1322
     * @param \jamesiarmes\PhpEws\Request\SearchMailboxesType $request
1323
     * @return \jamesiarmes\PhpEws\Response\SearchMailboxesResponseType
1324
     */
1325
    public function SearchMailboxes($request)
1326
    {
1327
        return $this->makeRequest(__FUNCTION__, $request);
1328
    }
1329
1330
    /**
1331
     * Sends e-mail messages that are located in the Exchange store.
1332
     *
1333
     * @since Exchange 2007
1334
     *
1335
     * @param \jamesiarmes\PhpEws\Request\SendItemType $request
1336
     * @return \jamesiarmes\PhpEws\Response\SendItemResponseType
1337
     */
1338
    public function SendItem($request)
1339
    {
1340
        return $this->makeRequest(__FUNCTION__, $request);
1341
    }
1342
1343
    /**
1344
     * Sets a mailbox hold policy on mailboxes.
1345
     *
1346
     * @since Exchange 2013
1347
     *
1348
     * @param \jamesiarmes\PhpEws\Request\SetHoldOnMailboxesType $request
1349
     * @return \jamesiarmes\PhpEws\Response\SetHoldOnMailboxesResponseMessageType
1350
     */
1351
    public function SetHoldOnMailboxes($request)
1352
    {
1353
        return $this->makeRequest(__FUNCTION__, $request);
1354
    }
1355
1356
    /**
1357
     * Changes the display name of an instant messaging (IM) group.
1358
     *
1359
     * @since Exchange 2013
1360
     *
1361
     * @param \jamesiarmes\PhpEws\Request\SetImGroupType $request
1362
     * @return \jamesiarmes\PhpEws\Response\SetImGroupResponseMessageType
1363
     */
1364
    public function SetImGroup($request)
1365
    {
1366
        return $this->makeRequest(__FUNCTION__, $request);
1367
    }
1368
1369
    /**
1370
     * Sets a mailbox user's Out of Office (OOF) settings and message.
1371
     *
1372
     * @since Exchange 2007
1373
     *
1374
     * @param \jamesiarmes\PhpEws\Request\SetUserOofSettingsRequest $request
1375
     * @return \jamesiarmes\PhpEws\Response\SetUserOofSettingsResponse
1376
     */
1377
    public function SetUserOofSettings($request)
1378
    {
1379
        return $this->makeRequest(__FUNCTION__, $request);
1380
    }
1381
1382
    /**
1383
     * Subscribes client applications to either push or pull notifications.
1384
     *
1385
     * It is important to be aware that the structure of the request messages
1386
     * and responses is different depending on the type of event notification.
1387
     *
1388
     * @since Exchange 2007
1389
     *
1390
     * @param \jamesiarmes\PhpEws\Request\SubscribeType $request
1391
     * @return \jamesiarmes\PhpEws\Response\SubscribeResponseType
1392
     */
1393
    public function Subscribe($request)
1394
    {
1395
        return $this->makeRequest(__FUNCTION__, $request);
1396
    }
1397
1398
    /**
1399
     * Synchronizes folders between the computer that is running Microsoft
1400
     * Exchange Server and the client.
1401
     *
1402
     * @since Exchange 2007
1403
     *
1404
     * @param \jamesiarmes\PhpEws\Request\SyncFolderHierarchyType $request
1405
     * @return \jamesiarmes\PhpEws\Response\SyncFolderHierarchyResponseType
1406
     */
1407
    public function SyncFolderHierarchy($request)
1408
    {
1409
        return $this->makeRequest(__FUNCTION__, $request);
1410
    }
1411
1412
    /**
1413
     * Synchronizes items between the Exchange server and the client.
1414
     *
1415
     * @since Exchange 2007
1416
     *
1417
     * @param \jamesiarmes\PhpEws\Request\SyncFolderItemsType $request
1418
     * @return \jamesiarmes\PhpEws\Response\SyncFolderItemsResponseType
1419
     */
1420
    public function SyncFolderItems($request)
1421
    {
1422
        return $this->makeRequest(__FUNCTION__, $request);
1423
    }
1424
1425
    /**
1426
     * Uninstalls a mail app for Outlook.
1427
     *
1428
     * @since Exchange 2013
1429
     *
1430
     * @param \jamesiarmes\PhpEws\Request\UninstallAppType $request
1431
     * @return \jamesiarmes\PhpEws\Response\UninstallAppResponseType
1432
     */
1433
    public function UninstallApp($request)
1434
    {
1435
        return $this->makeRequest(__FUNCTION__, $request);
1436
    }
1437
1438
    /**
1439
     * Ends a pull notification subscription.
1440
     *
1441
     * Use this operation rather than letting a subscription timeout. This
1442
     * operation is only valid for pull notifications.
1443
     *
1444
     * @since Exchange 2007
1445
     *
1446
     * @param \jamesiarmes\PhpEws\Request\UnsubscribeType $request
1447
     * @return \jamesiarmes\PhpEws\Response\UnsubscribeResponseType
1448
     */
1449
    public function Unsubscribe($request)
1450
    {
1451
        return $this->makeRequest(__FUNCTION__, $request);
1452
    }
1453
1454
    /**
1455
     * Updates delegate permissions on a principal's mailbox.
1456
     *
1457
     * @since Exchange 2007 SP1
1458
     *
1459
     * @param \jamesiarmes\PhpEws\Request\UpdateDelegateType $request
1460
     * @return \jamesiarmes\PhpEws\Response\UpdateDelegateResponseMessageType
1461
     */
1462
    public function UpdateDelegate($request)
1463
    {
1464
        return $this->makeRequest(__FUNCTION__, $request);
1465
    }
1466
1467
    /**
1468
     * Modifies properties of an existing item in the Exchange store.
1469
     *
1470
     * Each UpdateFolder operation consists of the following:
1471
     * - A FolderId element that specifies a folder to update.
1472
     * - An internal path of an element in the folder, as specified by the
1473
     *   folder shape, which specifies the data to update.
1474
     * - A folder that contains the new value of the updated field, if the
1475
     *   update is not a deletion.
1476
     *
1477
     * @since Exchange 2007
1478
     *
1479
     * @param \jamesiarmes\PhpEws\Request\UpdateFolderType $request
1480
     * @return \jamesiarmes\PhpEws\Response\UpdateFolderResponseType
1481
     */
1482
    public function UpdateFolder($request)
1483
    {
1484
        return $this->makeRequest(__FUNCTION__, $request);
1485
    }
1486
1487
    /**
1488
     * Updates the authenticated user's Inbox rules by applying the specified
1489
     * operations.
1490
     *
1491
     * This operation is used to create an Inbox rule, to set an Inbox rule, or
1492
     * to delete an Inbox rule.
1493
     *
1494
     * @since Exchange 2010 SP1
1495
     *
1496
     * @param \jamesiarmes\PhpEws\Request\UpdateInboxRulesRequestType $request
1497
     * @return \jamesiarmes\PhpEws\Response\UpdateInboxRulesResponseType
1498
     */
1499
    public function UpdateInboxRules($request)
1500
    {
1501
        return $this->makeRequest(__FUNCTION__, $request);
1502
    }
1503
1504
    /**
1505
     * Used to modify the properties of an existing item in the Exchange store.
1506
     *
1507
     * @since Exchange 2007
1508
     *
1509
     * @param \jamesiarmes\PhpEws\Request\UpdateItemType $request
1510
     * @return \jamesiarmes\PhpEws\Response\UpdateItemResponseType
1511
     */
1512
    public function UpdateItem($request)
1513
    {
1514
        return $this->makeRequest(__FUNCTION__, $request);
1515
    }
1516
1517
    /**
1518
     * Updates a user configuration object on a folder.
1519
     *
1520
     * @since Exchange 2010
1521
     *
1522
     * @param \jamesiarmes\PhpEws\Request\UpdateUserConfigurationType $request
1523
     * @return \jamesiarmes\PhpEws\Response\UpdateUserConfigurationResponseType
1524
     */
1525
    public function UpdateUserConfiguration($request)
1526
    {
1527
        return $this->makeRequest(__FUNCTION__, $request);
1528
    }
1529
1530
    /**
1531
     * Uploads a stream of items into an Exchange mailbox.
1532
     *
1533
     * @since Exchange 2010 SP1
1534
     *
1535
     * @param \jamesiarmes\PhpEws\Request\UploadItemsType $request
1536
     * @return \jamesiarmes\PhpEws\Response\UploadItemsResponseType
1537
     */
1538
    public function UploadItems($request)
1539
    {
1540
        return $this->makeRequest(__FUNCTION__, $request);
1541
    }
1542
1543
    /**
1544
     * Initializes the SoapClient object to make a request
1545
     *
1546
     * @return \jamesiarmes\PhpEws\SoapClient
1547
     *
1548
     * TODO: Build a class map that we can pass to the client.
1549
     */
1550
    protected function initializeSoapClient()
1551
    {
1552
        $this->soap = new SoapClient(
1553
            dirname(__FILE__) . '/assets/services.wsdl',
1554
            array(
1555
                'user' => $this->username,
1556
                'password' => $this->password,
1557
                'version' => $this->version,
1558
                'location' => 'https://' . $this->server . '/EWS/Exchange.asmx',
1559
                'impersonation' => $this->impersonation,
1560
            )
1561
        );
1562
1563
        return $this->soap;
1564
    }
1565
1566
    /**
1567
     * Makes the SOAP call for a request.
1568
     *
1569
     * @param string $operation
1570
     *   The operation to be called.
1571
     * @param \jamesiarmes\PhpEws\Request $request
1572
     *   The request object for the operation.
1573
     * @return \jamesiarmes\PhpEws\Response
1574
     *   The response object for the operation.
1575
     */
1576
    protected function makeRequest($operation, $request)
1577
    {
1578
        $this->initializeSoapClient();
1579
        $response = $this->soap->{$operation}($request);
1580
1581
        return $this->processResponse($response);
1582
    }
1583
1584
    /**
1585
     * Process a response to verify that it succeeded and take the appropriate
1586
     * action
1587
     *
1588
     * @throws \Exception
1589
     *
1590
     * @param \stdClass $response
1591
     * @return \stdClass
1592
     */
1593
    protected function processResponse($response)
1594
    {
1595
        // If the soap call failed then we need to throw an exception.
1596
        $code = $this->soap->getResponseCode();
1597
        if ($code != 200) {
1598
            throw new \Exception(
1599
                "SOAP client returned status of $code.",
1600
                $code
1601
            );
1602
        }
1603
1604
        return $response;
1605
    }
1606
}
1607