Passed
Push — master ( 6c8080...f4145f )
by Artem
03:33
created

Client::serviceBookPriceProduct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 7
ccs 0
cts 0
cp 0
rs 10
cc 1
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * amadeus-ws-client
4
 *
5
 * Copyright 2015 Amadeus Benelux NV
6
 *
7
 * Licensed under the Apache License, Version 2.0 (the "License");
8
 * you may not use this file except in compliance with the License.
9
 * You may obtain a copy of the License at
10
 *
11
 * http://www.apache.org/licenses/LICENSE-2.0
12
 *
13
 * Unless required by applicable law or agreed to in writing, software
14
 * distributed under the License is distributed on an "AS IS" BASIS,
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * See the License for the specific language governing permissions and
17
 * limitations under the License.
18
 *
19
 * @package Amadeus
20
 * @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
21
 */
22
23
namespace Amadeus;
24
25
use Amadeus\Client\Base;
26
use Amadeus\Client\Exception;
27
use Amadeus\Client\InvalidMessageException;
28
use Amadeus\Client\Params;
29
use Amadeus\Client\RequestCreator\MessageVersionUnsupportedException;
30
use Amadeus\Client\RequestOptions;
31
use Amadeus\Client\RequestOptions\ServiceBookPriceProductOptions;
32
use Amadeus\Client\Result;
33
use Amadeus\Client\Session\Handler\UnsupportedOperationException;
34
35
/**
36
 * Amadeus Web Service Client.
37
 *
38
 * TODO:
39
 * - support older versions of SoapHeader (1)
40
 *
41
 * @package Amadeus
42
 * @author Dieter Devlieghere <[email protected]>
43
 */
44
class Client extends Base
45
{
46
    /**
47
     * Amadeus SOAP header version 1
48
     */
49
    const HEADER_V1 = "1";
50
    /**
51
     * Amadeus SOAP header version 2
52
     */
53
    const HEADER_V2 = "2";
54
    /**
55
     * Amadeus SOAP header version 4
56
     */
57
    const HEADER_V4 = "4";
58
59
    /**
60
     * Version string
61
     *
62
     * @var string
63
     */
64
    const VERSION = "2.1.0";
65
66
    /**
67
     * An identifier string for the library (to be used in Received From entries)
68
     *
69
     * @var string
70
     */
71
    const RECEIVED_FROM_IDENTIFIER = "amabnl-amadeus-ws-client";
72
73
    /**
74
     * @var string
75
     */
76
    protected $lastMessage;
77
78
    /**
79
     * Set the session as stateful (true) or stateless (false)
80 5
     *
81
     * @param bool $newStateful
82 5
     */
83 5
    public function setStateful($newStateful)
84
    {
85
        $this->sessionHandler->setStateful($newStateful);
86
    }
87
88 15
    /**
89
     * @return bool
90 15
     */
91
    public function isStateful()
92
    {
93
        return $this->sessionHandler->isStateful();
94
    }
95
96
    /**
97
     * Get TransactionFlowLink Consumer Id
98 5
     *
99
     * @return string|null
100 5
     */
101
    public function getConsumerId()
102
    {
103
        return $this->sessionHandler->getConsumerId();
104
    }
105
106
    /**
107
     * Set TransactionFlowLink Consumer Id
108
     *
109
     * @throws UnsupportedOperationException when used on unsupported WSAP versions
110 5
     * @param string $id
111
     * @return void
112 5
     */
113 5
    public function setConsumerId($id)
114 5
    {
115
        $this->sessionHandler->setTransactionFlowLink(true);
116
        $this->sessionHandler->setConsumerId($id);
117
    }
118
119
    /**
120
     * Get the last raw XML message that was sent out
121 5
     *
122
     * @return string|null
123 5
     */
124
    public function getLastRequest()
125
    {
126
        return $this->sessionHandler->getLastRequest($this->lastMessage);
127
    }
128
129
    /**
130
     * Get the last raw XML message that was received
131 5
     *
132
     * @return string|null
133 5
     */
134
    public function getLastResponse()
135
    {
136
        return $this->sessionHandler->getLastResponse($this->lastMessage);
137
    }
138
139
    /**
140
     * Get the request headers for the last SOAP message that was sent out
141 5
     *
142
     * @return string|null
143 5
     */
144
    public function getLastRequestHeaders()
145
    {
146
        return $this->sessionHandler->getLastRequestHeaders($this->lastMessage);
147
    }
148
149
    /**
150
     * Get the response headers for the last SOAP message that was received
151 5
     *
152
     * @return string|null
153 5
     */
154
    public function getLastResponseHeaders()
155
    {
156
        return $this->sessionHandler->getLastResponseHeaders($this->lastMessage);
157
    }
158
159
    /**
160
     * Get session information for authenticated session
161
     *
162
     * - sessionId
163
     * - sequenceNr
164
     * - securityToken
165 5
     *
166
     * @return array|null
167 5
     */
168
    public function getSessionData()
169
    {
170
        return $this->sessionHandler->getSessionData();
171
    }
172
173
    /**
174
     * Restore a previously used session
175
     *
176
     * To be used when implementing your own session pooling system on legacy Soap Header 2 applications.
177
     *
178 5
     * @param array $sessionData
179
     * @return bool
180 5
     */
181
    public function setSessionData(array $sessionData)
182
    {
183
        return $this->sessionHandler->setSessionData($sessionData);
184
    }
185
186
    /**
187
     * Construct Amadeus Web Services client
188 500
     *
189
     * @param Params $params
190 500
     */
191 500
    public function __construct(Params $params)
192 500
    {
193 300
        $this->loadClientParams(
194 200
            $params,
195 495
            self::RECEIVED_FROM_IDENTIFIER,
196
            self::VERSION
197
        );
198
    }
199
200
    /**
201
     * Authenticate.
202
     *
203
     * Authentication Parameters were provided at construction time (authParams)
204
     *
205 10
     * @return Result
206
     * @throws Exception
207 10
     */
208
    public function securityAuthenticate()
209 10
    {
210 10
        $msgName = 'Security_Authenticate';
211 10
212 10
        return $this->callMessage(
213 4
            $msgName,
214 10
            new RequestOptions\SecurityAuthenticateOptions(
215 6
                $this->authParams
216 4
            ),
217
            [],
218
            false
219
        );
220
    }
221
222
    /**
223
     * Terminate a session - only applicable to non-stateless mode.
224
     *
225 5
     * @return Result
226
     * @throws Exception
227 5
     */
228
    public function securitySignOut()
229 5
    {
230 5
        $msgName = 'Security_SignOut';
231 5
232 5
        return $this->callMessage(
233 3
            $msgName,
234 2
            new RequestOptions\SecuritySignOutOptions(),
235
            [],
236
            true
237
        );
238
    }
239
240
    /**
241
     * PNR_Retrieve - Retrieve an Amadeus PNR by record locator
242
     *
243
     * @param RequestOptions\PnrRetrieveOptions $options
244
     * @param array $messageOptions (OPTIONAL)
245
     * @return Result
246
     * @throws Client\InvalidMessageException
247 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
248
     * @throws Exception
249 5
     */
250
    public function pnrRetrieve(RequestOptions\PnrRetrieveOptions $options, $messageOptions = [])
251 5
    {
252
        $msgName = 'PNR_Retrieve';
253
254
        return $this->callMessage($msgName, $options, $messageOptions);
255
    }
256
257
    /**
258
     * PNR_Split
259
     *
260
     * @param RequestOptions\PnrSplitOptions $options
261
     * @param array $messageOptions (OPTIONAL)
262
     * @return Result
263
     * @throws Client\InvalidMessageException
264 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
265
     * @throws Exception
266
     */
267
    public function pnrSplit(
268 5
        RequestOptions\PnrSplitOptions $options,
269
        $messageOptions = []
270 5
    ) {
271
        $msgName = 'PNR_Split';
272
273
        return $this->callMessage($msgName, $options, $messageOptions);
274
    }
275
276
    /**
277
     * Create a PNR using PNR_AddMultiElements
278
     *
279
     * @param RequestOptions\PnrCreatePnrOptions $options
280
     * @param array $messageOptions (OPTIONAL)
281
     * @return Result
282
     * @throws Client\InvalidMessageException
283 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
284
     * @throws Exception
285 5
     */
286
    public function pnrCreatePnr(RequestOptions\PnrCreatePnrOptions $options, $messageOptions = [])
287 5
    {
288
        $msgName = 'PNR_AddMultiElements';
289
290
        return $this->callMessage($msgName, $options, $messageOptions);
291
    }
292
293
    /**
294
     * PNR_AddMultiElements - Create a new PNR or update an existing PNR.
295
     *
296
     * https://webservices.amadeus.com/extranet/viewService.do?id=25&flavourId=1&menuId=functional
297
     *
298
     * @param RequestOptions\PnrAddMultiElementsOptions $options
299
     * @param array $messageOptions (OPTIONAL)
300
     * @return Result
301
     * @throws Client\InvalidMessageException
302 10
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
303
     * @throws Exception
304 10
     */
305
    public function pnrAddMultiElements(RequestOptions\PnrAddMultiElementsOptions $options, $messageOptions = [])
306 10
    {
307
        $msgName = 'PNR_AddMultiElements';
308
309
        return $this->callMessage($msgName, $options, $messageOptions);
310
    }
311
312
    /**
313
     * PNR_RetrieveAndDisplay - Retrieve an Amadeus PNR by record locator including extra info
314
     *
315
     * This extra info is info you cannot see in the regular PNR, like Offers.
316
     *
317
     * https://webservices.amadeus.com/extranet/viewService.do?id=1922&flavourId=1&menuId=functional
318
     *
319
     * @param RequestOptions\PnrRetrieveAndDisplayOptions $options Amadeus Record Locator for PNR
320
     * @param array $messageOptions (OPTIONAL)
321
     * @return Result
322
     * @throws Client\InvalidMessageException
323 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
324
     * @throws Exception
325 5
     **/
326
    public function pnrRetrieveAndDisplay(RequestOptions\PnrRetrieveAndDisplayOptions $options, $messageOptions = [])
327 5
    {
328
        $msgName = 'PNR_RetrieveAndDisplay';
329
330
        return $this->callMessage($msgName, $options, $messageOptions);
331
    }
332
333
    /**
334
     * PNR_Cancel
335
     *
336
     * @param RequestOptions\PnrCancelOptions $options
337
     * @param array $messageOptions (OPTIONAL)
338
     * @return Result
339
     * @throws Client\InvalidMessageException
340 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
341
     * @throws Exception
342 5
     */
343
    public function pnrCancel(RequestOptions\PnrCancelOptions $options, $messageOptions = [])
344 5
    {
345
        $msgName = 'PNR_Cancel';
346
347
        return $this->callMessage($msgName, $options, $messageOptions);
348
    }
349
350
    /**
351
     * PNR_ChangeElement
352
     *
353
     * @param RequestOptions\PnrChangeElementOptions $options
354
     * @param array $messageOptions (OPTIONAL)
355
     * @return Result
356
     * @throws Client\InvalidMessageException
357 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
358
     * @throws Exception
359 5
     */
360
    public function pnrChangeElement(RequestOptions\PnrChangeElementOptions $options, $messageOptions = [])
361 5
    {
362
        $msgName = 'PNR_ChangeElement';
363
364
        return $this->callMessage($msgName, $options, $messageOptions);
365
    }
366
367
    /**
368
     * PNR_DisplayHistory
369
     *
370
     * @param RequestOptions\PnrDisplayHistoryOptions $options
371
     * @param array $messageOptions (OPTIONAL)
372
     * @return Result
373
     * @throws Client\InvalidMessageException
374 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
375
     * @throws Exception
376 5
     */
377
    public function pnrDisplayHistory(RequestOptions\PnrDisplayHistoryOptions $options, $messageOptions = [])
378 5
    {
379
        $msgName = 'PNR_DisplayHistory';
380
381
        return $this->callMessage($msgName, $options, $messageOptions);
382
    }
383
384
    /**
385
     * PNR_TransferOwnership
386
     *
387
     * @param RequestOptions\PnrTransferOwnershipOptions $options
388
     * @param array $messageOptions (OPTIONAL)
389
     * @return Result
390
     * @throws Client\InvalidMessageException
391 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
392
     * @throws Exception
393 5
     */
394
    public function pnrTransferOwnership(RequestOptions\PnrTransferOwnershipOptions $options, $messageOptions = [])
395 5
    {
396
        $msgName = 'PNR_TransferOwnership';
397
398
        return $this->callMessage($msgName, $options, $messageOptions);
399
    }
400
401
    /**
402
     * PNR_NameChange
403
     *
404
     * @param RequestOptions\PnrNameChangeOptions $options
405
     * @param array $messageOptions (OPTIONAL)
406
     * @return Result
407
     * @throws Client\InvalidMessageException
408
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
409
     * @throws Exception
410 5
     */
411
    public function pnrNameChange(RequestOptions\PnrNameChangeOptions $options, $messageOptions = [])
412 5
    {
413
        $msgName = 'PNR_NameChange';
414 5
415
        return $this->callMessage($msgName, $options, $messageOptions);
416
    }
417
418
    /**
419
     * Queue_List - get a list of all PNR's on a given queue
420
     *
421
     * https://webservices.amadeus.com/extranet/viewService.do?id=52&flavourId=1&menuId=functional
422
     *
423
     * @param RequestOptions\QueueListOptions $options
424
     * @param array $messageOptions (OPTIONAL)
425
     * @return Result
426
     * @throws Client\InvalidMessageException
427 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
428
     * @throws Exception
429 5
     */
430
    public function queueList(RequestOptions\QueueListOptions $options, $messageOptions = [])
431 5
    {
432
        $msgName = 'Queue_List';
433
434
        return $this->callMessage($msgName, $options, $messageOptions);
435
    }
436
437
    /**
438
     * Queue_PlacePNR - Place a PNR on a given queue
439
     *
440
     * @param RequestOptions\QueuePlacePnrOptions $options
441
     * @param array $messageOptions (OPTIONAL)
442
     * @return Result
443
     * @throws Client\InvalidMessageException
444 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
445
     * @throws Exception
446 5
     */
447
    public function queuePlacePnr(RequestOptions\QueuePlacePnrOptions $options, $messageOptions = [])
448 5
    {
449
        $msgName = 'Queue_PlacePNR';
450
451
        return $this->callMessage($msgName, $options, $messageOptions);
452
    }
453
454
    /**
455
     * PNR_Ignore - Ignore an Amadeus PNR by record locator
456
     *
457
     * @param RequestOptions\PnrIgnoreOptions $options
458
     * @param array $messageOptions (OPTIONAL)
459
     * @return Result
460
     * @throws Client\InvalidMessageException
461
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
462 5
     * @throws Exception
463
     */
464 5
    public function pnrIgnore(RequestOptions\PnrIgnoreOptions $options, $messageOptions = [])
465
    {
466 5
        $msgName = 'PNR_Ignore';
467
468
        return $this->callMessage($msgName, $options, $messageOptions);
469
    }
470
471
472
    /**
473
     * Queue_RemoveItem - remove an item (a PNR) from a given queue
474
     *
475
     * @param RequestOptions\QueueRemoveItemOptions $options
476
     * @param array $messageOptions (OPTIONAL)
477
     * @return Result
478
     * @throws Client\InvalidMessageException
479 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
480
     * @throws Exception
481 5
     */
482
    public function queueRemoveItem(RequestOptions\QueueRemoveItemOptions $options, $messageOptions = [])
483 5
    {
484
        $msgName = 'Queue_RemoveItem';
485
486
        return $this->callMessage($msgName, $options, $messageOptions);
487
    }
488
489
    /**
490
     * Queue_MoveItem - move an item (a PNR) from one queue to another.
491
     *
492
     * @param RequestOptions\QueueMoveItemOptions $options
493
     * @param array $messageOptions (OPTIONAL)
494
     * @return Result
495
     * @throws Client\InvalidMessageException
496 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
497
     * @throws Exception
498 5
     */
499
    public function queueMoveItem(RequestOptions\QueueMoveItemOptions $options, $messageOptions = [])
500 5
    {
501
        $msgName = 'Queue_MoveItem';
502
503
        return $this->callMessage($msgName, $options, $messageOptions);
504
    }
505
506
    /**
507
     * Offer_CreateOffer
508
     *
509
     * @param RequestOptions\OfferCreateOptions $options
510
     * @param array $messageOptions (OPTIONAL)
511
     * @return Result
512
     * @throws Client\InvalidMessageException
513
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
514
     * @throws Exception
515 5
     */
516
    public function offerCreate(RequestOptions\OfferCreateOptions $options, $messageOptions = [])
517 5
    {
518
        $msgName = 'Offer_CreateOffer';
519 5
520
        return $this->callMessage($msgName, $options, $messageOptions);
521
    }
522
523
    /**
524
     * Offer_VerifyOffer
525
     *
526
     * To be called in the context of an open PNR
527
     *
528
     * @param RequestOptions\OfferVerifyOptions $options
529
     * @param array $messageOptions (OPTIONAL)
530
     * @return Result
531
     * @throws Client\InvalidMessageException
532 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
533
     * @throws Exception
534 5
     */
535
    public function offerVerify(RequestOptions\OfferVerifyOptions $options, $messageOptions = [])
536 5
    {
537
        $msgName = 'Offer_VerifyOffer';
538
539
        return $this->callMessage($msgName, $options, $messageOptions);
540
    }
541
542
    /**
543
     * Offer_ConfirmAirOffer
544
     *
545
     * @param RequestOptions\OfferConfirmAirOptions $options
546
     * @param array $messageOptions (OPTIONAL)
547
     * @return Result
548
     * @throws Client\InvalidMessageException
549 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
550
     * @throws Exception
551 5
     */
552
    public function offerConfirmAir(RequestOptions\OfferConfirmAirOptions $options, $messageOptions = [])
553 5
    {
554
        $msgName = 'Offer_ConfirmAirOffer';
555
556
        return $this->callMessage($msgName, $options, $messageOptions);
557
    }
558
559
    /**
560
     * Offer_ConfirmHotelOffer
561
     *
562
     * @param RequestOptions\OfferConfirmHotelOptions $options
563
     * @param array $messageOptions (OPTIONAL)
564
     * @return Result
565
     * @throws Client\InvalidMessageException
566 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
567
     * @throws Exception
568 5
     */
569
    public function offerConfirmHotel(RequestOptions\OfferConfirmHotelOptions $options, $messageOptions = [])
570 5
    {
571
        $msgName = 'Offer_ConfirmHotelOffer';
572
573
        return $this->callMessage($msgName, $options, $messageOptions);
574
    }
575
576
    /**
577
     * Offer_ConfirmCarOffer
578
     *
579
     * @param RequestOptions\OfferConfirmCarOptions $options
580
     * @param array $messageOptions (OPTIONAL)
581
     * @return Result
582
     * @throws Client\InvalidMessageException
583 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
584
     * @throws Exception
585
     */
586
    public function offerConfirmCar(RequestOptions\OfferConfirmCarOptions $options, $messageOptions = [])
587 5
    {
588
        $msgName = 'Offer_ConfirmCarOffer';
589 5
590
        return $this->callMessage($msgName, $options, $messageOptions);
591
    }
592
593
    /**
594
     * Fare_MasterPricerExpertSearch
595
     *
596
     * @param RequestOptions\FareMasterPricerExSearchOptions $options
597
     * @param array $messageOptions (OPTIONAL)
598
     * @return Result
599
     * @throws Client\InvalidMessageException
600
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
601
     * @throws Exception
602
     */
603 5
    public function fareMasterPricerExpertSearch(
604
        RequestOptions\FareMasterPricerExSearchOptions $options,
605
        $messageOptions = []
606
    ) {
607 5
        $msgName = 'Fare_MasterPricerExpertSearch';
608
609 5
        return $this->callMessage($msgName, $options, $messageOptions);
610
    }
611
612
613
    /**
614
     * Fare_MasterPricerTravelBoardSearch
615
     *
616
     * @param RequestOptions\FareMasterPricerTbSearch $options
617
     * @param array $messageOptions (OPTIONAL)
618
     * @return Result
619
     * @throws Client\InvalidMessageException
620
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
621
     * @throws Exception
622 5
     */
623
    public function fareMasterPricerTravelBoardSearch(
624
        RequestOptions\FareMasterPricerTbSearch $options,
625
        $messageOptions = []
626 5
    ) {
627
        $msgName = 'Fare_MasterPricerTravelBoardSearch';
628 5
629
        return $this->callMessage($msgName, $options, $messageOptions);
630
    }
631
632
    /**
633
     * Fare_MasterPricerCalendar
634
     *
635
     * @param RequestOptions\FareMasterPricerCalendarOptions $options
636
     * @param array $messageOptions (OPTIONAL)
637
     * @return Result
638
     * @throws Client\InvalidMessageException
639
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
640
     * @throws Exception
641 10
     */
642
    public function fareMasterPricerCalendar(
643
        RequestOptions\FareMasterPricerCalendarOptions $options,
644
        $messageOptions = []
645 10
    ) {
646
        $msgName = 'Fare_MasterPricerCalendar';
647 10
648
        return $this->callMessage($msgName, $options, $messageOptions);
649
    }
650
651
    /**
652
     * Fare_PricePnrWithBookingClass
653
     *
654
     * @param RequestOptions\FarePricePnrWithBookingClassOptions $options
655
     * @param array $messageOptions (OPTIONAL)
656
     * @return Result
657
     * @throws Client\InvalidMessageException
658
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
659
     * @throws Exception
660 10
     */
661
    public function farePricePnrWithBookingClass(
662
        RequestOptions\FarePricePnrWithBookingClassOptions $options,
663
        $messageOptions = []
664 10
    ) {
665
        $msgName = 'Fare_PricePNRWithBookingClass';
666 10
667
        return $this->callMessage($msgName, $options, $messageOptions);
668
    }
669
670
    /**
671
     * Fare_PricePnrWithLowerFares
672
     *
673
     * @param RequestOptions\FarePricePnrWithLowerFaresOptions $options
674
     * @param array $messageOptions (OPTIONAL)
675
     * @return Result
676
     * @throws Client\InvalidMessageException
677
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
678
     * @throws Exception
679 10
     */
680
    public function farePricePnrWithLowerFares(
681
        RequestOptions\FarePricePnrWithLowerFaresOptions $options,
682
        $messageOptions = []
683 10
    ) {
684
        $msgName = 'Fare_PricePNRWithLowerFares';
685 10
686
        return $this->callMessage($msgName, $options, $messageOptions);
687
    }
688
689
    /**
690
     * Fare_PricePnrWithLowestFare
691
     *
692
     * @param RequestOptions\FarePricePnrWithLowestFareOptions $options
693
     * @param array $messageOptions (OPTIONAL)
694
     * @return Result
695
     * @throws Client\InvalidMessageException
696
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
697
     * @throws Exception
698 5
     */
699
    public function farePricePnrWithLowestFare(
700
        RequestOptions\FarePricePnrWithLowestFareOptions $options,
701
        $messageOptions = []
702 5
    ) {
703
        $msgName = 'Fare_PricePNRWithLowestFare';
704 5
705
        return $this->callMessage($msgName, $options, $messageOptions);
706
    }
707
708
    /**
709
     * Fare_InformativePricingWithoutPNR
710
     *
711
     * @param RequestOptions\FareInformativePricingWithoutPnrOptions $options
712
     * @param array $messageOptions (OPTIONAL)
713
     * @return Result
714
     * @throws Client\InvalidMessageException
715
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
716
     * @throws Exception
717 5
     */
718
    public function fareInformativePricingWithoutPnr(
719
        RequestOptions\FareInformativePricingWithoutPnrOptions $options,
720
        $messageOptions = []
721 5
    ) {
722
        $msgName = 'Fare_InformativePricingWithoutPNR';
723 5
724
        return $this->callMessage($msgName, $options, $messageOptions);
725
    }
726
727
    /**
728
     * Fare_PriceUpsellWithoutPNR
729
     *
730
     * @param RequestOptions\FarePriceUpsellWithoutPnrOptions $options
731
     * @param array $messageOptions (OPTIONAL)
732
     * @return Result
733
     * @throws Client\InvalidMessageException
734
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
735
     * @throws Exception
736 5
     */
737
    public function farePriceUpsellWithoutPnr(
738 5
        RequestOptions\FarePriceUpsellWithoutPnrOptions $options,
739
        $messageOptions = []
740 5
    ) {
741
        $msgName = 'Fare_PriceUpsellWithoutPNR';
742
743
        return $this->callMessage($msgName, $options, $messageOptions);
744
    }
745
746
    /**
747
     * Fare_GetFareFamilyDescription
748
     *
749
     * @param RequestOptions\FareGetFareFamilyDescriptionOptions $options
750
     * @param array $messageOptions (OPTIONAL)
751
     * @return Result
752
     * @throws Client\InvalidMessageException
753 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
754
     * @throws Exception
755 5
     */
756
    public function fareGetFareFamilyDescription(
757 5
        RequestOptions\FareGetFareFamilyDescriptionOptions $options,
758
        $messageOptions = []
759
    ) {
760
        $msgName = 'Fare_GetFareFamilyDescription';
761
762
        return $this->callMessage($msgName, $options, $messageOptions);
763
    }
764
765
    /**
766
     * Fare_InformativeBestPricingWithoutPNR
767
     *
768
     * @param RequestOptions\FareInformativeBestPricingWithoutPnrOptions $options
769
     * @param array $messageOptions (OPTIONAL)
770 5
     * @return Result
771
     * @throws Client\InvalidMessageException
772 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
773
     * @throws Exception
774 5
     */
775
    public function fareInformativeBestPricingWithoutPnr(
776
        RequestOptions\FareInformativeBestPricingWithoutPnrOptions $options,
777
        $messageOptions = []
778
    ) {
779
        $msgName = 'Fare_InformativeBestPricingWithoutPNR';
780
781
        return $this->callMessage($msgName, $options, $messageOptions);
782
    }
783
784
    /**
785
     * Fare_CheckRules
786
     *
787 5
     * @param RequestOptions\FareCheckRulesOptions $options
788
     * @param array $messageOptions (OPTIONAL)
789
     * @return Result
790
     * @throws Client\InvalidMessageException
791 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
792
     * @throws Exception
793 5
     */
794
    public function fareCheckRules(RequestOptions\FareCheckRulesOptions $options, $messageOptions = [])
795
    {
796
        $msgName = 'Fare_CheckRules';
797
798
        return $this->callMessage($msgName, $options, $messageOptions);
799
    }
800
801
    /**
802
     * Fare_GetFareRules
803
     *
804
     * @param RequestOptions\FareGetFareRulesOptions $options
805
     * @param array $messageOptions (OPTIONAL)
806 5
     * @return Result
807
     * @throws Client\InvalidMessageException
808
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
809
     * @throws Exception
810 5
     */
811
    public function fareGetFareRules(RequestOptions\FareGetFareRulesOptions $options, $messageOptions = [])
812 5
    {
813
        $msgName = 'Fare_GetFareRules';
814
815
        return $this->callMessage($msgName, $options, $messageOptions);
816
    }
817
818
    /**
819
     * Fare_ConvertCurrency
820
     *
821
     * @param RequestOptions\FareConvertCurrencyOptions $options
822
     * @param array $messageOptions (OPTIONAL)
823
     * @return Result
824
     * @throws Client\InvalidMessageException
825 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
826
     * @throws Exception
827 5
     */
828
    public function fareConvertCurrency(RequestOptions\FareConvertCurrencyOptions $options, $messageOptions = [])
829 5
    {
830
        $msgName = 'Fare_ConvertCurrency';
831
832
        return $this->callMessage($msgName, $options, $messageOptions);
833
    }
834
835
    /**
836
     * Air_MultiAvailability
837
     *
838
     * @param RequestOptions\AirMultiAvailabilityOptions $options
839
     * @param array $messageOptions (OPTIONAL)
840
     * @return Result
841
     * @throws Client\InvalidMessageException
842 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
843
     * @throws Exception
844 5
     */
845
    public function airMultiAvailability(
846 5
        RequestOptions\AirMultiAvailabilityOptions $options,
847
        $messageOptions = []
848
    ) {
849
        $msgName = 'Air_MultiAvailability';
850
851
        return $this->callMessage($msgName, $options, $messageOptions);
852
    }
853
854
    /**
855
     * Air_SellFromRecommendation
856
     *
857
     * @param RequestOptions\AirSellFromRecommendationOptions $options
858
     * @param array $messageOptions (OPTIONAL)
859 5
     * @return Result
860
     * @throws Client\InvalidMessageException
861 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
862
     * @throws Exception
863 5
     */
864
    public function airSellFromRecommendation(
865
        RequestOptions\AirSellFromRecommendationOptions $options,
866
        $messageOptions = []
867
    ) {
868
        $msgName = 'Air_SellFromRecommendation';
869
870
        return $this->callMessage($msgName, $options, $messageOptions);
871
    }
872
873
    /**
874
     * Air_FlightInfo
875
     *
876 5
     * @param RequestOptions\AirFlightInfoOptions $options
877
     * @param array $messageOptions (OPTIONAL)
878 5
     * @return Result
879
     * @throws Client\InvalidMessageException
880 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
881
     * @throws Exception
882
     */
883
    public function airFlightInfo(RequestOptions\AirFlightInfoOptions $options, $messageOptions = [])
884
    {
885
        $msgName = 'Air_FlightInfo';
886
887
        return $this->callMessage($msgName, $options, $messageOptions);
888
    }
889
890
    /**
891
     * Air_RetrieveSeatMap
892
     *
893 5
     * @param RequestOptions\AirRetrieveSeatMapOptions $options
894
     * @param array $messageOptions (OPTIONAL)
895
     * @return Result
896
     * @throws Client\InvalidMessageException
897 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
898
     * @throws Exception
899 5
     */
900
    public function airRetrieveSeatMap(RequestOptions\AirRetrieveSeatMapOptions $options, $messageOptions = [])
901
    {
902
        $msgName = 'Air_RetrieveSeatMap';
903
904
        return $this->callMessage($msgName, $options, $messageOptions);
905
    }
906
907
    /**
908
     * Air_RebookAirSegment
909
     *
910
     * @param RequestOptions\AirRebookAirSegmentOptions $options
911
     * @param array $messageOptions (OPTIONAL)
912 5
     * @return Result
913
     * @throws Client\InvalidMessageException
914
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
915
     * @throws Exception
916 5
     */
917
    public function airRebookAirSegment(RequestOptions\AirRebookAirSegmentOptions $options, $messageOptions = [])
918 5
    {
919
        $msgName = 'Air_RebookAirSegment';
920
921
        return $this->callMessage($msgName, $options, $messageOptions);
922
    }
923
924
    /**
925
     * Command_Cryptic
926
     *
927
     * @param RequestOptions\CommandCrypticOptions $options
928
     * @param array $messageOptions (OPTIONAL)
929
     * @return Result
930
     * @throws Client\InvalidMessageException
931 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
932
     * @throws Exception
933
     */
934
    public function commandCryptic(RequestOptions\CommandCrypticOptions $options, $messageOptions = [])
935 5
    {
936
        $msgName = 'Command_Cryptic';
937 5
938
        return $this->callMessage($msgName, $options, $messageOptions);
939
    }
940
941
    /**
942
     * MiniRule_GetFromRec
943
     *
944
     * @param RequestOptions\MiniRuleGetFromRecOptions $options
945
     * @param array $messageOptions (OPTIONAL)
946
     * @return Result
947
     * @throws Client\InvalidMessageException
948
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
949
     * @throws Exception
950 5
     */
951
    public function miniRuleGetFromRec(RequestOptions\MiniRuleGetFromRecOptions $options, $messageOptions = [])
952 5
    {
953
        $msgName = 'MiniRule_GetFromRec';
954 5
955
        return $this->callMessage($msgName, $options, $messageOptions);
956
    }
957
958
    /**
959
     * MiniRule_GetFromPricingRec
960
     *
961
     * @param RequestOptions\MiniRuleGetFromPricingRecOptions $options
962
     * @param array $messageOptions (OPTIONAL)
963
     * @return Result
964
     * @throws Client\InvalidMessageException
965
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
966
     * @throws Exception
967 5
     */
968
    public function miniRuleGetFromPricingRec(
969 5
        RequestOptions\MiniRuleGetFromPricingRecOptions $options,
970
        $messageOptions = []
971 5
    ) {
972
        $msgName = 'MiniRule_GetFromPricingRec';
973
974
        return $this->callMessage($msgName, $options, $messageOptions);
975
    }
976
977
    /**
978
     * MiniRule_GetFromPricing
979
     *
980
     * @param RequestOptions\MiniRuleGetFromPricingOptions $options
981
     * @param array $messageOptions (OPTIONAL)
982
     * @return Result
983
     * @throws Client\InvalidMessageException
984
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
985 5
     * @throws Exception
986
     */
987
    public function miniRuleGetFromPricing(
988
        RequestOptions\MiniRuleGetFromPricingOptions $options,
989 5
        $messageOptions = []
990
    ) {
991 5
        $msgName = 'MiniRule_GetFromPricing';
992
993
        return $this->callMessage($msgName, $options, $messageOptions);
994
    }
995
996
    /**
997
     * MiniRule_GetFromETicket
998
     *
999
     * @param RequestOptions\MiniRuleGetFromETicketOptions $options
1000
     * @param array $messageOptions (OPTIONAL)
1001
     * @return Result
1002
     * @throws Client\InvalidMessageException
1003
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1004 5
     * @throws Exception
1005
     */
1006
    public function miniRuleGetFromETicket(
1007
        RequestOptions\MiniRuleGetFromETicketOptions $options,
1008 5
        $messageOptions = []
1009
    ) {
1010 5
        $msgName = 'MiniRule_GetFromETicket';
1011
1012
        return $this->callMessage($msgName, $options, $messageOptions);
1013
    }
1014
1015
    /**
1016
     * Info_EncodeDecodeCity
1017
     *
1018
     * @param RequestOptions\InfoEncodeDecodeCityOptions $options
1019
     * @param array $messageOptions (OPTIONAL)
1020
     * @return Result
1021
     * @throws Client\InvalidMessageException
1022
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1023 5
     * @throws Exception
1024
     */
1025
    public function infoEncodeDecodeCity(RequestOptions\InfoEncodeDecodeCityOptions $options, $messageOptions = [])
1026
    {
1027 5
        $msgName = 'Info_EncodeDecodeCity';
1028
1029 5
        return $this->callMessage($msgName, $options, $messageOptions);
1030
    }
1031
1032
    /**
1033
     * PointOfRef_Search
1034
     *
1035
     * @param RequestOptions\PointOfRefSearchOptions $options
1036
     * @param array $messageOptions (OPTIONAL)
1037
     * @return Result
1038
     * @throws Client\InvalidMessageException
1039
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1040
     * @throws Exception
1041
     */
1042 5
    public function pointOfRefSearch(RequestOptions\PointOfRefSearchOptions $options, $messageOptions = [])
1043
    {
1044
        $msgName = 'PointOfRef_Search';
1045
1046 5
        return $this->callMessage($msgName, $options, $messageOptions);
1047
    }
1048 5
1049
1050
    /**
1051
     * Ticket_CreateTSTFromPricing
1052
     *
1053
     * @param RequestOptions\TicketCreateTstFromPricingOptions $options
1054
     * @param array $messageOptions (OPTIONAL)
1055
     * @return Result
1056
     * @throws Client\InvalidMessageException
1057
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1058
     * @throws Exception
1059
     */
1060
    public function ticketCreateTSTFromPricing(
1061 5
        RequestOptions\TicketCreateTstFromPricingOptions $options,
1062
        $messageOptions = []
1063 5
    ) {
1064
        $msgName = 'Ticket_CreateTSTFromPricing';
1065 5
1066
        return $this->callMessage($msgName, $options, $messageOptions);
1067
    }
1068
1069
    /**
1070
     * Ticket_CreateTSMFromPricing
1071
     *
1072
     * @param RequestOptions\TicketCreateTsmFromPricingOptions $options
1073
     * @param array $messageOptions (OPTIONAL)
1074
     * @return Result
1075
     * @throws Client\InvalidMessageException
1076
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1077
     * @throws Exception
1078 5
     */
1079
    public function ticketCreateTSMFromPricing(
1080 5
        RequestOptions\TicketCreateTsmFromPricingOptions $options,
1081
        $messageOptions = []
1082 5
    ) {
1083
        $msgName = 'Ticket_CreateTSMFromPricing';
1084
1085
        return $this->callMessage($msgName, $options, $messageOptions);
1086
    }
1087
1088
    /**
1089
     * Ticket_CreateTSMFareElement
1090
     *
1091
     * @param RequestOptions\TicketCreateTsmFareElOptions $options
1092
     * @param array $messageOptions (OPTIONAL)
1093
     * @return Result
1094
     * @throws Client\InvalidMessageException
1095 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1096
     * @throws Exception
1097 5
     */
1098
    public function ticketCreateTSMFareElement(
1099 5
        RequestOptions\TicketCreateTsmFareElOptions $options,
1100
        $messageOptions = []
1101
    ) {
1102
        $msgName = 'Ticket_CreateTSMFareElement';
1103
1104
        return $this->callMessage($msgName, $options, $messageOptions);
1105
    }
1106
1107
    /**
1108
     * Ticket_CreateTASF
1109
     *
1110
     * @param RequestOptions\TicketCreateTasfOptions $options
1111
     * @param array $messageOptions (OPTIONAL)
1112 5
     * @return Result
1113
     * @throws Client\InvalidMessageException
1114 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1115
     * @throws Exception
1116 5
     */
1117
    public function ticketCreateTASF(
1118
        RequestOptions\TicketCreateTasfOptions $options,
1119
        $messageOptions = []
1120
    ) {
1121
        $msgName = 'Ticket_CreateTASF';
1122
1123
        return $this->callMessage($msgName, $options, $messageOptions);
1124
    }
1125
1126
    /**
1127
     * Ticket_DeleteTST
1128
     *
1129 5
     * @param RequestOptions\TicketDeleteTstOptions $options
1130
     * @param array $messageOptions (OPTIONAL)
1131
     * @return Result
1132
     * @throws Client\InvalidMessageException
1133 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1134
     * @throws Exception
1135 5
     */
1136
    public function ticketDeleteTST(RequestOptions\TicketDeleteTstOptions $options, $messageOptions = [])
1137
    {
1138
        $msgName = 'Ticket_DeleteTST';
1139
1140
        return $this->callMessage($msgName, $options, $messageOptions);
1141
    }
1142
1143
    /**
1144
     * Ticket_DeleteTSMP
1145
     *
1146
     * @param RequestOptions\TicketDeleteTsmpOptions $options
1147
     * @param array $messageOptions (OPTIONAL)
1148 5
     * @return Result
1149
     * @throws Client\InvalidMessageException
1150
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1151
     * @throws Exception
1152 5
     */
1153
    public function ticketDeleteTSMP(RequestOptions\TicketDeleteTsmpOptions $options, $messageOptions = [])
1154 5
    {
1155
        $msgName = 'Ticket_DeleteTSMP';
1156
1157
        return $this->callMessage($msgName, $options, $messageOptions);
1158
    }
1159
1160
    /**
1161
     * Ticket_DisplayTST
1162
     *
1163
     * @param RequestOptions\TicketDisplayTstOptions $options
1164
     * @param array $messageOptions (OPTIONAL)
1165
     * @return Result
1166
     * @throws Client\InvalidMessageException
1167 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1168
     * @throws Exception
1169
     */
1170
    public function ticketDisplayTST(RequestOptions\TicketDisplayTstOptions $options, $messageOptions = [])
1171 5
    {
1172
        $msgName = 'Ticket_DisplayTST';
1173 5
1174
        return $this->callMessage($msgName, $options, $messageOptions);
1175
    }
1176
1177
    /**
1178
     * Ticket_DisplayTSMP
1179
     *
1180
     * @param RequestOptions\TicketDisplayTsmpOptions $options
1181
     * @param array $messageOptions (OPTIONAL)
1182
     * @return Result
1183
     * @throws Client\InvalidMessageException
1184
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1185
     * @throws Exception
1186 5
     */
1187
    public function ticketDisplayTSMP(RequestOptions\TicketDisplayTsmpOptions $options, $messageOptions = [])
1188
    {
1189
        $msgName = 'Ticket_DisplayTSMP';
1190 5
1191
        return $this->callMessage($msgName, $options, $messageOptions);
1192 5
    }
1193
1194
    /**
1195
     * Ticket_RetrieveListOfTSM
1196
     *
1197
     * @param RequestOptions\TicketRetrieveListOfTSMOptions $options
1198
     * @param array $messageOptions (OPTIONAL)
1199
     * @return Result
1200
     * @throws Client\InvalidMessageException
1201
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1202
     * @throws Exception
1203
     */
1204
    public function ticketRetrieveListOfTSM(
1205 5
        RequestOptions\TicketRetrieveListOfTSMOptions $options,
1206
        $messageOptions = []
1207
    ) {
1208
        $msgName = 'Ticket_RetrieveListOfTSM';
1209 5
1210
        return $this->callMessage($msgName, $options, $messageOptions);
1211 5
    }
1212
1213
    /**
1214
     * Ticket_DisplayTSMFareElement
1215
     *
1216
     * @param RequestOptions\TicketDisplayTsmFareElOptions $options
1217
     * @param array $messageOptions (OPTIONAL)
1218
     * @return Result
1219
     * @throws Client\InvalidMessageException
1220
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1221
     * @throws Exception
1222
     */
1223
    public function ticketDisplayTSMFareElement(
1224 5
        RequestOptions\TicketDisplayTsmFareElOptions $options,
1225
        $messageOptions = []
1226
    ) {
1227
        $msgName = 'Ticket_DisplayTSMFareElement';
1228 5
1229
        return $this->callMessage($msgName, $options, $messageOptions);
1230 5
    }
1231
1232
    /**
1233
     * Ticket_CheckEligibility
1234
     *
1235
     * @param RequestOptions\TicketCheckEligibilityOptions $options
1236
     * @param array $messageOptions (OPTIONAL)
1237
     * @return Result
1238
     * @throws Client\InvalidMessageException
1239
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1240
     * @throws Exception
1241
     */
1242
    public function ticketCheckEligibility(
1243 5
        RequestOptions\TicketCheckEligibilityOptions $options,
1244
        $messageOptions = []
1245
    ) {
1246
        $msgName = 'Ticket_CheckEligibility';
1247 5
1248
        return $this->callMessage($msgName, $options, $messageOptions);
1249 5
    }
1250
1251
    /**
1252
     * Ticket_ATCShopperMasterPricerTravelBoardSearch
1253
     *
1254
     * @param RequestOptions\TicketAtcShopperMpTbSearchOptions $options
1255
     * @param array $messageOptions (OPTIONAL)
1256
     * @return Result
1257
     * @throws Client\InvalidMessageException
1258
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1259
     * @throws Exception
1260
     */
1261
    public function ticketAtcShopperMasterPricerTravelBoardSearch(
1262 5
        RequestOptions\TicketAtcShopperMpTbSearchOptions $options,
1263
        $messageOptions = []
1264 5
    ) {
1265
        $msgName = 'Ticket_ATCShopperMasterPricerTravelBoardSearch';
1266 5
1267
        return $this->callMessage($msgName, $options, $messageOptions);
1268
    }
1269
1270
    /**
1271
     * Ticket_ATCShopperMasterPricerCalendar
1272
     *
1273
     * @param RequestOptions\TicketAtcShopperMpCalendarOptions $options
1274
     * @param array $messageOptions (OPTIONAL)
1275
     * @return Result
1276
     * @throws Client\InvalidMessageException
1277
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1278
     * @throws Exception
1279 5
     */
1280
    public function ticketAtcShopperMasterPricerCalendar(
1281 5
        RequestOptions\TicketAtcShopperMpCalendarOptions $options,
1282
        $messageOptions = []
1283 5
    ) {
1284
        $msgName = 'Ticket_ATCShopperMasterPricerCalendar';
1285
1286
        return $this->callMessage($msgName, $options, $messageOptions);
1287
    }
1288
1289
    /**
1290
     * Ticket_RepricePNRWithBookingClass
1291
     *
1292
     * @param RequestOptions\TicketRepricePnrWithBookingClassOptions $options
1293
     * @param array $messageOptions (OPTIONAL)
1294
     * @return Result
1295
     * @throws Client\InvalidMessageException
1296 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1297
     * @throws Exception
1298
     */
1299
    public function ticketRepricePnrWithBookingClass(
1300 5
        RequestOptions\TicketRepricePnrWithBookingClassOptions $options,
1301
        $messageOptions = []
1302 5
    ) {
1303
        $msgName = 'Ticket_RepricePNRWithBookingClass';
1304
1305
        return $this->callMessage($msgName, $options, $messageOptions);
1306
    }
1307
1308
    /**
1309
     * Ticket_CancelDocument
1310
     *
1311
     * @param RequestOptions\TicketCancelDocumentOptions $options
1312
     * @param array $messageOptions (OPTIONAL)
1313
     * @return Result
1314
     * @throws Client\InvalidMessageException
1315 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1316
     * @throws Exception
1317
     */
1318
    public function ticketCancelDocument(
1319 5
        RequestOptions\TicketCancelDocumentOptions $options,
1320
        $messageOptions = []
1321 5
    ) {
1322
        $msgName = 'Ticket_CancelDocument';
1323
1324
        return $this->callMessage($msgName, $options, $messageOptions);
1325
    }
1326
1327
    /**
1328
     * Ticket_ReissueConfirmedPricing
1329
     *
1330
     * @param RequestOptions\TicketReissueConfirmedPricingOptions $options
1331
     * @param array $messageOptions (OPTIONAL)
1332
     * @return Result
1333
     * @throws Client\InvalidMessageException
1334 10
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1335
     * @throws Exception
1336
     */
1337
    public function ticketReissueConfirmedPricing(
1338 10
        RequestOptions\TicketReissueConfirmedPricingOptions $options,
1339
        $messageOptions = []
1340 10
    ) {
1341
        $msgName = 'Ticket_ReissueConfirmedPricing';
1342
1343
        return $this->callMessage($msgName, $options, $messageOptions);
1344
    }
1345
1346
    /**
1347
     * Ticket_ProcessEDoc
1348
     *
1349
     * @param RequestOptions\TicketProcessEDocOptions $options
1350
     * @param array $messageOptions (OPTIONAL)
1351
     * @return Result
1352
     * @throws Client\InvalidMessageException
1353 5
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1354
     * @throws Exception
1355
     */
1356
    public function ticketProcessEDoc(RequestOptions\TicketProcessEDocOptions $options, $messageOptions = [])
1357 5
    {
1358
        $msgName = 'Ticket_ProcessEDoc';
1359 5
1360
        return $this->callMessage($msgName, $options, $messageOptions);
1361
    }
1362
1363
    /**
1364
     * Ticket_ProcessETicket
1365
     *
1366
     * @param RequestOptions\TicketProcessETicketOptions $options
1367
     * @param array $messageOptions (OPTIONAL)
1368
     * @return Result
1369
     * @throws Client\InvalidMessageException
1370
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1371
     * @throws Exception
1372 5
     */
1373
    public function ticketProcessETicket(RequestOptions\TicketProcessETicketOptions $options, $messageOptions = [])
1374
    {
1375
        $msgName = 'Ticket_ProcessETicket';
1376 5
1377
        return $this->callMessage($msgName, $options, $messageOptions);
1378 5
    }
1379
1380
    /**
1381
     * DocIssuance_IssueTicket
1382
     *
1383
     * @param RequestOptions\DocIssuanceIssueTicketOptions $options
1384
     * @param array $messageOptions (OPTIONAL)
1385
     * @return Result
1386
     * @throws Client\InvalidMessageException
1387
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1388
     * @throws Exception
1389
     */
1390
    public function docIssuanceIssueTicket(
1391 5
        RequestOptions\DocIssuanceIssueTicketOptions $options,
1392
        $messageOptions = []
1393
    ) {
1394
        $msgName = 'DocIssuance_IssueTicket';
1395 5
1396
        return $this->callMessage($msgName, $options, $messageOptions);
1397 5
    }
1398
1399
    /**
1400
     * DocIssuance_IssueMiscellaneousDocuments
1401
     *
1402
     * @param RequestOptions\DocIssuanceIssueMiscDocOptions $options
1403
     * @param array $messageOptions (OPTIONAL)
1404
     * @return Result
1405
     * @throws Client\InvalidMessageException
1406
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1407
     * @throws Exception
1408
     */
1409
    public function docIssuanceIssueMiscellaneousDocuments(
1410 5
        RequestOptions\DocIssuanceIssueMiscDocOptions $options,
1411
        $messageOptions = []
1412
    ) {
1413
        $msgName = 'DocIssuance_IssueMiscellaneousDocuments';
1414 5
1415
        return $this->callMessage($msgName, $options, $messageOptions);
1416 5
    }
1417
1418
    /**
1419
     * DocIssuance_IssueCombined
1420
     *
1421
     * @param RequestOptions\DocIssuanceIssueCombinedOptions $options
1422
     * @param array $messageOptions (OPTIONAL)
1423
     * @return Result
1424
     * @throws Client\InvalidMessageException
1425
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1426
     * @throws Exception
1427
     */
1428
    public function docIssuanceIssueCombined(
1429 5
        RequestOptions\DocIssuanceIssueCombinedOptions $options,
1430
        $messageOptions = []
1431
    ) {
1432
        $msgName = 'DocIssuance_IssueCombined';
1433 5
1434
        return $this->callMessage($msgName, $options, $messageOptions);
1435 5
    }
1436
1437
    /**
1438
     * DocRefund_InitRefund
1439
     *
1440
     * @param RequestOptions\DocRefundInitRefundOptions $options
1441
     * @param array $messageOptions (OPTIONAL)
1442
     * @return Result
1443
     * @throws Client\InvalidMessageException
1444
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1445
     * @throws Exception
1446
     */
1447
    public function docRefundInitRefund(
1448 5
        RequestOptions\DocRefundInitRefundOptions $options,
1449
        $messageOptions = []
1450
    ) {
1451
        $msgName = 'DocRefund_InitRefund';
1452 5
1453
        return $this->callMessage($msgName, $options, $messageOptions);
1454 5
    }
1455
1456
    /**
1457
     * DocRefund_IgnoreRefund
1458
     *
1459
     * @param RequestOptions\DocRefundIgnoreRefundOptions $options
1460
     * @param array $messageOptions (OPTIONAL)
1461
     * @return Result
1462
     * @throws Client\InvalidMessageException
1463
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1464
     * @throws Exception
1465
     */
1466
    public function docRefundIgnoreRefund(
1467 5
        RequestOptions\DocRefundIgnoreRefundOptions $options,
1468
        $messageOptions = []
1469
    ) {
1470
        $msgName = 'DocRefund_IgnoreRefund';
1471 5
1472
        return $this->callMessage($msgName, $options, $messageOptions);
1473 5
    }
1474
1475
    /**
1476
     * DocRefund_UpdateRefund
1477
     *
1478
     * @param RequestOptions\DocRefundUpdateRefundOptions $options
1479
     * @param array $messageOptions (OPTIONAL)
1480
     * @return Result
1481
     * @throws Client\InvalidMessageException
1482
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1483
     * @throws Exception
1484
     */
1485
    public function docRefundUpdateRefund(
1486 5
        RequestOptions\DocRefundUpdateRefundOptions $options,
1487
        $messageOptions = []
1488 5
    ) {
1489
        $msgName = 'DocRefund_UpdateRefund';
1490 5
1491
        return $this->callMessage($msgName, $options, $messageOptions);
1492
    }
1493
1494
    /**
1495
     * DocRefund_ProcessRefund
1496
     *
1497
     * @param RequestOptions\DocRefundProcessRefundOptions $options
1498
     * @param array $messageOptions (OPTIONAL)
1499
     * @return Result
1500
     * @throws Client\InvalidMessageException
1501
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1502
     * @throws Exception
1503
     */
1504 5
    public function docRefundProcessRefund(
1505
        RequestOptions\DocRefundProcessRefundOptions $options,
1506 5
        $messageOptions = []
1507
    ) {
1508 5
        $msgName = 'DocRefund_ProcessRefund';
1509
1510
        return $this->callMessage($msgName, $options, $messageOptions);
1511
    }
1512
1513
    /**
1514
     * Ticket_InitRefund
1515
     *
1516
     * @param RequestOptions\TicketInitRefundOptions $options
1517
     * @param array $messageOptions (OPTIONAL)
1518
     * @return Result
1519
     * @throws Client\InvalidMessageException
1520
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1521 5
     * @throws Exception
1522
     */
1523
    public function ticketInitRefund(
1524
        RequestOptions\TicketInitRefundOptions $options,
1525 5
        $messageOptions = []
1526
    ) {
1527 5
        $msgName = 'Ticket_InitRefund';
1528
1529
        return $this->callMessage($msgName, $options, $messageOptions);
1530
    }
1531
1532
    /**
1533
     * Ticket_IgnoreRefund
1534
     *
1535
     * @param RequestOptions\TicketIgnoreRefundOptions $options
1536
     * @param array $messageOptions (OPTIONAL)
1537
     * @return Result
1538
     * @throws Client\InvalidMessageException
1539
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1540 5
     * @throws Exception
1541
     */
1542
    public function ticketIgnoreRefund(
1543
        RequestOptions\TicketIgnoreRefundOptions $options,
1544 5
        $messageOptions = []
1545
    ) {
1546 5
        $msgName = 'Ticket_IgnoreRefund';
1547
1548
        return $this->callMessage($msgName, $options, $messageOptions);
1549
    }
1550
1551
    /**
1552
     * Ticket_ProcessRefund
1553
     *
1554
     * @param RequestOptions\TicketProcessRefundOptions $options
1555
     * @param array $messageOptions (OPTIONAL)
1556
     * @return Result
1557
     * @throws Client\InvalidMessageException
1558
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1559 5
     * @throws Exception
1560
     */
1561
    public function ticketProcessRefund(
1562
        RequestOptions\TicketProcessRefundOptions $options,
1563 5
        $messageOptions = []
1564
    ) {
1565 5
        $msgName = 'Ticket_ProcessRefund';
1566
1567
        return $this->callMessage($msgName, $options, $messageOptions);
1568
    }
1569
1570
    /**
1571
     * Ticket_UpdateRefund
1572
     *
1573
     * @param RequestOptions\TicketUpdateRefundOptions $options
1574
     * @param array $messageOptions (OPTIONAL)
1575
     * @return Result
1576
     * @throws Client\InvalidMessageException
1577
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1578 5
     * @throws Exception
1579
     */
1580
    public function ticketUpdateRefund(
1581
        RequestOptions\TicketUpdateRefundOptions $options,
1582 5
        $messageOptions = []
1583
    ) {
1584 5
        $msgName = 'Ticket_UpdateRefund';
1585
1586
        return $this->callMessage($msgName, $options, $messageOptions);
1587
    }
1588
1589
    /**
1590
     * FOP_CreateFormOfPayment
1591
     *
1592
     * @param RequestOptions\FopCreateFopOptions $options
1593
     * @param array $messageOptions (OPTIONAL)
1594
     * @return Result
1595
     * @throws Client\InvalidMessageException
1596
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1597 5
     * @throws Exception
1598
     */
1599
    public function fopCreateFormOfPayment(RequestOptions\FopCreateFopOptions $options, $messageOptions = [])
1600
    {
1601 5
        $msgName = 'FOP_CreateFormOfPayment';
1602
1603 5
        return $this->callMessage($msgName, $options, $messageOptions);
1604
    }
1605
1606
1607
    /**
1608
     * FOP_CreateFormOfPayment
1609
     *
1610
     * @param RequestOptions\FopValidateFopOptions $options
1611
     * @param array $messageOptions (OPTIONAL)
1612
     * @return Result
1613
     * @throws Client\InvalidMessageException
1614
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1615
     * @throws Exception
1616 5
     */
1617
    public function fopValidateFOP(RequestOptions\FopValidateFopOptions $options, $messageOptions = [])
1618
    {
1619
        $msgName = 'FOP_ValidateFOP';
1620 5
1621
        return $this->callMessage($msgName, $options, $messageOptions);
1622 5
    }
1623
1624
    /**
1625
     * PriceXplorer_ExtremeSearch
1626
     *
1627
     * @param RequestOptions\PriceXplorerExtremeSearchOptions $options
1628
     * @param array $messageOptions (OPTIONAL)
1629
     * @return Result
1630
     * @throws Client\InvalidMessageException
1631
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1632
     * @throws Exception
1633
     */
1634
    public function priceXplorerExtremeSearch(
1635
        RequestOptions\PriceXplorerExtremeSearchOptions $options,
1636
        $messageOptions = []
1637
    ) {
1638
        $msgName = 'PriceXplorer_ExtremeSearch';
1639
1640 420
        return $this->callMessage($msgName, $options, $messageOptions);
1641
    }
1642 420
1643
    /**
1644 420
     * SalesReports_DisplayQueryReport
1645
     *
1646 420
     * @param RequestOptions\SalesReportsDisplayQueryReportOptions $options
1647 420
     * @param array $messageOptions (OPTIONAL)
1648 420
     * @return Result
1649 420
     * @throws Client\InvalidMessageException
1650 168
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1651 168
     * @throws Exception
1652 168
     */
1653 168
    public function salesReportsDisplayQueryReport(
1654
        RequestOptions\SalesReportsDisplayQueryReportOptions $options,
1655 420
        $messageOptions = []
1656 420
    ) {
1657 168
        $msgName = 'SalesReports_DisplayQueryReport';
1658 168
1659
        return $this->callMessage($msgName, $options, $messageOptions);
1660 420
    }
1661 5
1662 2
    /**
1663
     * Service_IntegratedPricing
1664 420
     *
1665
     * @param RequestOptions\ServiceIntegratedPricingOptions $options
1666
     * @param array $messageOptions (OPTIONAL)
1667
     * @return Result
1668
     * @throws Client\InvalidMessageException
1669
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1670
     * @throws Exception
1671
     */
1672
    public function serviceIntegratedPricing(
1673
        RequestOptions\ServiceIntegratedPricingOptions $options,
1674
        $messageOptions = []
1675
    ) {
1676
        $msgName = 'Service_IntegratedPricing';
1677
1678
        return $this->callMessage($msgName, $options, $messageOptions);
1679 450
    }
1680
1681
    /**
1682 450
     * Service_IntegratedCatalogue
1683 450
     *
1684 180
     * @param RequestOptions\ServiceIntegratedCatalogueOptions $options
1685
     * @param array $messageOptions (OPTIONAL)
1686 450
     * @return Result
1687 5
     * @throws Client\InvalidMessageException
1688 2
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1689
     * @throws Exception
1690 450
     */
1691 15
    public function serviceIntegratedCatalogue(
1692 6
        RequestOptions\ServiceIntegratedCatalogueOptions $options,
1693
        $messageOptions = []
1694 450
    ) {
1695
        $msgName = 'Service_IntegratedCatalogue';
1696
1697
        return $this->callMessage($msgName, $options, $messageOptions);
1698
    }
1699
1700
    /**
1701
     * Service_BookPriceProduct
1702
     *
1703
     * @param ServiceBookPriceProductOptions $options
1704
     * @param array                          $messageOptions  (OPTIONAL)
1705
     *
1706
     * @return Result
1707
     * @throws Exception
1708
     * @throws InvalidMessageException
1709
     * @throws MessageVersionUnsupportedException
1710
     */
1711
    public function serviceBookPriceProduct(
1712
        RequestOptions\ServiceBookPriceProductOptions $options,
1713
        $messageOptions = []
1714
    ) {
1715
        $msgName = 'Service_BookPriceProduct';
1716
1717
        return $this->callMessage($msgName, $options, $messageOptions);
1718
    }
1719
1720
    /**
1721
     * Service_BookPriceService
1722
     *
1723
     * @param RequestOptions\ServiceBookPriceServiceOptions $options
1724
     * @param array $messageOptions (OPTIONAL)
1725
     * @return Result
1726
     * @throws Client\InvalidMessageException
1727
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1728
     * @throws Exception
1729
     */
1730
    public function serviceBookPriceService(
1731
        RequestOptions\ServiceBookPriceServiceOptions $options,
1732
        $messageOptions = []
1733
    ) {
1734
        $msgName = 'Service_BookPriceService';
1735
1736
        return $this->callMessage($msgName, $options, $messageOptions);
1737
    }
1738
1739
    /**
1740
     * SalesReports_DisplayorSummarizedReport
1741
     *
1742
     * @param RequestOptions\SalesReportsDisplayDailyOrSummarizedReportOptions $options
1743
     * @param array $messageOptions (OPTIONAL)
1744
     * @return Result
1745
     * @throws Client\InvalidMessageException
1746
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1747
     * @throws Exception
1748
     */
1749
    public function salesReportsDisplayDailyOrSummarizedReport(
1750
        RequestOptions\SalesReportsDisplayDailyOrSummarizedReportOptions $options,
1751
        $messageOptions = []
1752
    ) {
1753
        $msgName = 'SalesReports_DisplayDailyOrSummarizedReport';
1754
1755
        return $this->callMessage($msgName, $options, $messageOptions);
1756
    }
1757
1758
    /**
1759
     * SalesReports_DisplayNetRemitReport
1760
     *
1761
     * @param RequestOptions\SalesReportsDisplayNetRemitReportOptions $options
1762
     * @param array $messageOptions (OPTIONAL)
1763
     * @return Result
1764
     * @throws Client\InvalidMessageException
1765
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1766
     * @throws Exception
1767
     */
1768
    public function salesReportsDisplayNetRemitReport(
1769
        RequestOptions\SalesReportsDisplayNetRemitReportOptions $options,
1770
        $messageOptions = []
1771
    ) {
1772
        $msgName = 'SalesReports_DisplayNetRemitReport';
1773
1774
        return $this->callMessage($msgName, $options, $messageOptions);
1775
    }
1776
1777
    /**
1778
     * Service_StandaloneCatalogue
1779
     *
1780
     * @param RequestOptions\ServiceStandaloneCatalogueOptions $options
1781
     * @param array $messageOptions
1782
     *            (OPTIONAL)
1783
     * @return Result
1784
     * @throws Client\InvalidMessageException
1785
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1786
     * @throws Exception
1787
     */
1788
    public function serviceStandaloneCatalogue(
1789
        RequestOptions\ServiceStandaloneCatalogueOptions $options,
1790
        $messageOptions = [],
1791
    ) {
1792
        $msgName = 'Service_StandaloneCatalogue';
1793
1794
        return $this->callMessage($msgName, $options, $messageOptions);
1795
    }
1796
1797
    /**
1798
     * Travel_OfferPrice
1799
     *
1800
     * @param RequestOptions\TravelOfferPriceOptions $options
1801
     * @param array $messageOptions
1802
     *            (OPTIONAL)
1803
     * @return Result
1804
     * @throws Client\InvalidMessageException
1805
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1806
     * @throws Exception
1807
     */
1808
    public function travelOfferPrice(RequestOptions\TravelOfferPriceOptions $options, $messageOptions = [])
1809
    {
1810
        $msgName = 'Travel_OfferPrice';
1811
1812
        return $this->callMessage($msgName, $options, $messageOptions);
1813
    }
1814
1815
    /**
1816
     * Travel_OrderCreate
1817
     *
1818
     * @param RequestOptions\TravelOrderCreateOptions $options
1819
     * @param array $messageOptions
1820
     *            (OPTIONAL)
1821
     * @return Result
1822
     * @throws Client\InvalidMessageException
1823
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1824
     * @throws Exception
1825
     */
1826
    public function travelOrderCreate(RequestOptions\TravelOrderCreateOptions $options, $messageOptions = [])
1827
    {
1828
        $msgName = 'Travel_OrderCreate';
1829
1830
        return $this->callMessage($msgName, $options, $messageOptions);
1831
    }
1832
1833
    /**
1834
     * Travel_OrderRetrieve
1835
     *
1836
     * @param RequestOptions\TravelOrderRetrieveOptions $options
1837
     * @param array $messageOptions
1838
     *            (OPTIONAL)
1839
     * @return Result
1840
     * @throws Client\InvalidMessageException
1841
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1842
     * @throws Exception
1843
     */
1844
    public function travelOrderRetrieve(RequestOptions\TravelOrderRetrieveOptions $options, $messageOptions = [])
1845
    {
1846
        $msgName = 'Travel_OrderRetrieve';
1847
1848
        return $this->callMessage($msgName, $options, $messageOptions);
1849
    }
1850
1851
    /**
1852
     * Travel_OrderPay
1853
     *
1854
     * @param RequestOptions\TravelOrderPayOptions $options
1855
     * @param array $messageOptions
1856
     *            (OPTIONAL)
1857
     * @return Result
1858
     * @throws Client\InvalidMessageException
1859
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1860
     * @throws Exception
1861
     */
1862
    public function travelOrderPay(RequestOptions\TravelOrderPayOptions $options, $messageOptions = [])
1863
    {
1864
        $msgName = 'Travel_OrderPay';
1865
1866
        return $this->callMessage($msgName, $options, $messageOptions);
1867
    }
1868
1869
    /**
1870
     * Travel_OrderPay
1871
     *
1872
     * @param RequestOptions\TravelOrderCancelOptions $options
1873
     * @param array $messageOptions
1874
     *            (OPTIONAL)
1875
     * @return Result
1876
     * @throws Client\InvalidMessageException
1877
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1878
     * @throws Exception
1879
     */
1880
    public function travelOrderCancel(RequestOptions\TravelOrderCancelOptions $options, $messageOptions = [])
1881
    {
1882
        $msgName = 'Travel_OrderCancel';
1883
1884
        return $this->callMessage($msgName, $options, $messageOptions);
1885
    }
1886
1887
    /**
1888
     * Travel_ServiceList
1889
     *
1890
     * @param RequestOptions\TravelServiceListOptions $options
1891
     * @param array $messageOptions
1892
     *            (OPTIONAL)
1893
     * @return Result
1894
     * @throws Client\InvalidMessageException
1895
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1896
     * @throws Exception
1897
     */
1898
    public function travelServiceList(RequestOptions\TravelServiceListOptions $options, $messageOptions = [])
1899
    {
1900
        $msgName = 'Travel_ServiceList';
1901
1902
        return $this->callMessage($msgName, $options, $messageOptions);
1903
    }
1904
1905
    /**
1906
     * Travel_SeatAvailability
1907
     *
1908
     * @param RequestOptions\TravelSeatAvailabilityOptions $options
1909
     * @param array $messageOptions
1910
     *            (OPTIONAL)
1911
     * @return Result
1912
     * @throws Client\InvalidMessageException
1913
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1914
     * @throws Exception
1915
     */
1916
    public function travelSeatAvailability(RequestOptions\TravelSeatAvailabilityOptions $options, $messageOptions = [])
1917
    {
1918
        $msgName = 'Travel_SeatAvailability';
1919
1920
        return $this->callMessage($msgName, $options, $messageOptions);
1921
    }
1922
1923
    /**
1924
     * Travel_OrderChange
1925
     *
1926
     * @param RequestOptions\TravelOrderChangeOptions $options
1927
     * @param array $messageOptions
1928
     *            (OPTIONAL)
1929
     * @return Result
1930
     * @throws Client\InvalidMessageException
1931
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1932
     * @throws Exception
1933
     */
1934
    public function travelOrderChange(RequestOptions\TravelOrderChangeOptions $options, $messageOptions = [])
1935
    {
1936
        $msgName = 'Travel_OrderChange';
1937
1938
        return $this->callMessage($msgName, $options, $messageOptions);
1939
    }
1940
1941
    /**
1942
     * Call a message with the given parameters
1943
     *
1944
     * @param string $messageName
1945
     * @param RequestOptions\RequestOptionsInterface $options
1946
     * @param array $messageOptions
1947
     * @param bool $endSession
1948
     * @return Result
1949
     * @throws Client\Exception
1950
     * @throws Client\Struct\InvalidArgumentException
1951
     * @throws Client\InvalidMessageException
1952
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1953
     * @throws \RuntimeException
1954
     * @throws \InvalidArgumentException
1955
     */
1956
    protected function callMessage($messageName, $options, $messageOptions, $endSession = false)
1957
    {
1958
        $messageOptions = $this->makeMessageOptions($messageOptions, $endSession);
1959
1960
        $this->lastMessage = $messageName;
1961
1962
        $sendResult = $this->sessionHandler->sendMessage(
1963
            $messageName,
1964
            $this->requestCreator->createRequest(
1965
                $messageName,
1966
                $options
1967
            ),
1968
            $messageOptions
1969
        );
1970
1971
        $response = $this->responseHandler->analyzeResponse(
1972
            $sendResult,
1973
            $messageName
1974
        );
1975
1976
        if ($messageOptions['returnXml'] === false) {
1977
            $response->responseXml = null;
1978
        }
1979
1980
        return $response;
1981
    }
1982
1983
    /**
1984
     * Make message options
1985
     *
1986
     * Message options are meta options when sending a message to the amadeus web services
1987
     * - 'endSession' (if stateful) : should we end the current session after sending this call?
1988
     * - 'returnXml' : Should we return the XML string in the Result::responseXml property?
1989
     *   (this overrides the default setting returnXml in the Amadeus\Client\Params for a single message)
1990
     *
1991
     * @param array $incoming The Message options chosen by the caller - if any.
1992
     * @param bool $endSession Switch if you want to terminate the current session after making the call.
1993
     * @return array
1994
     */
1995
    protected function makeMessageOptions(array $incoming, $endSession = false)
1996
    {
1997
        $options = [
1998
            'endSession' => $endSession,
1999
            'returnXml' => $this->returnResultXml
2000
        ];
2001
2002
        if (array_key_exists('endSession', $incoming)) {
2003
            $options['endSession'] = $incoming['endSession'];
2004
        }
2005
2006
        if (array_key_exists('returnXml', $incoming)) {
2007
            $options['returnXml'] = $incoming['returnXml'];
2008
        }
2009
2010
        return $options;
2011
    }
2012
}
2013