Passed
Push — master ( 227ab8...9a02f8 )
by Dieter
03:08
created

Client::airRebookAirSegment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
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\Params;
28
use Amadeus\Client\RequestOptions;
29
use Amadeus\Client\Result;
30
31
/**
32
 * Amadeus Web Service Client.
33
 *
34
 * TODO:
35
 * - support older versions of SoapHeader (1)
36
 *
37
 * @package Amadeus
38
 * @author Dieter Devlieghere <[email protected]>
39
 */
40
class Client extends Base
41
{
42
    /**
43
     * Amadeus SOAP header version 1
44
     */
45
    const HEADER_V1 = "1";
46
    /**
47
     * Amadeus SOAP header version 2
48
     */
49
    const HEADER_V2 = "2";
50
    /**
51
     * Amadeus SOAP header version 4
52
     */
53
    const HEADER_V4 = "4";
54
55
    /**
56
     * Version string
57
     *
58
     * @var string
59
     */
60
    const VERSION = "1.7.0-dev";
61
62
    /**
63
     * An identifier string for the library (to be used in Received From entries)
64
     *
65
     * @var string
66
     */
67
    const RECEIVED_FROM_IDENTIFIER = "amabnl-amadeus-ws-client";
68
69
    /**
70
     * @var string
71
     */
72
    protected $lastMessage;
73
74
    /**
75
     * Set the session as stateful (true) or stateless (false)
76
     *
77
     * @param bool $newStateful
78
     */
79 4
    public function setStateful($newStateful)
80
    {
81 4
        $this->sessionHandler->setStateful($newStateful);
82 4
    }
83
84
    /**
85
     * @return bool
86
     */
87 12
    public function isStateful()
88
    {
89 12
        return $this->sessionHandler->isStateful();
90
    }
91
92
    /**
93
     * Get the last raw XML message that was sent out
94
     *
95
     * @return string|null
96
     */
97 4
    public function getLastRequest()
98
    {
99 4
        return $this->sessionHandler->getLastRequest($this->lastMessage);
100
    }
101
102
    /**
103
     * Get the last raw XML message that was received
104
     *
105
     * @return string|null
106
     */
107 4
    public function getLastResponse()
108
    {
109 4
        return $this->sessionHandler->getLastResponse($this->lastMessage);
110
    }
111
112
    /**
113
     * Get the request headers for the last SOAP message that was sent out
114
     *
115
     * @return string|null
116
     */
117 4
    public function getLastRequestHeaders()
118
    {
119 4
        return $this->sessionHandler->getLastRequestHeaders($this->lastMessage);
120
    }
121
122
    /**
123
     * Get the response headers for the last SOAP message that was received
124
     *
125
     * @return string|null
126
     */
127 4
    public function getLastResponseHeaders()
128
    {
129 4
        return $this->sessionHandler->getLastResponseHeaders($this->lastMessage);
130
    }
131
132
    /**
133
     * Get session information for authenticated session
134
     *
135
     * - sessionId
136
     * - sequenceNr
137
     * - securityToken
138
     *
139
     * @return array|null
140
     */
141 4
    public function getSessionData()
142
    {
143 4
        return $this->sessionHandler->getSessionData();
144
    }
145
146
    /**
147
     * Restore a previously used session
148
     *
149
     * To be used when implementing your own session pooling system on legacy Soap Header 2 applications.
150
     *
151
     * @param array $sessionData
152
     * @return bool
153
     */
154 4
    public function setSessionData(array $sessionData)
155
    {
156 4
        return $this->sessionHandler->setSessionData($sessionData);
157
    }
158
159
    /**
160
     * Construct Amadeus Web Services client
161
     *
162
     * @param Params $params
163
     */
164 348
    public function __construct(Params $params)
165
    {
166 348
        $this->loadClientParams(
167 348
            $params,
168 348
            self::RECEIVED_FROM_IDENTIFIER,
169 174
            self::VERSION
170 174
        );
171 344
    }
172
173
    /**
174
     * Authenticate.
175
     *
176
     * Authentication Parameters were provided at construction time (authParams)
177
     *
178
     * @return Result
179
     * @throws Exception
180
     */
181 8
    public function securityAuthenticate()
182
    {
183 8
        $msgName = 'Security_Authenticate';
184
185 8
        return $this->callMessage(
186 8
            $msgName,
187 8
            new RequestOptions\SecurityAuthenticateOptions(
188 8
                $this->authParams
189 4
            ),
190 8
            [],
191 4
            false
192 4
        );
193
    }
194
195
    /**
196
     * Terminate a session - only applicable to non-stateless mode.
197
     *
198
     * @return Result
199
     * @throws Exception
200
     */
201 4
    public function securitySignOut()
202
    {
203 4
        $msgName = 'Security_SignOut';
204
205 4
        return $this->callMessage(
206 4
            $msgName,
207 4
            new RequestOptions\SecuritySignOutOptions(),
208 4
            [],
209 2
            true
210 2
        );
211
    }
212
213
    /**
214
     * PNR_Retrieve - Retrieve an Amadeus PNR by record locator
215
     *
216
     * @param RequestOptions\PnrRetrieveOptions $options
217
     * @param array $messageOptions (OPTIONAL)
218
     * @return Result
219
     * @throws Client\InvalidMessageException
220
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
221
     * @throws Exception
222
     */
223 4
    public function pnrRetrieve(RequestOptions\PnrRetrieveOptions $options, $messageOptions = [])
224
    {
225 4
        $msgName = 'PNR_Retrieve';
226
227 4
        return $this->callMessage($msgName, $options, $messageOptions);
228
    }
229
230
    /**
231
     * Create a PNR using PNR_AddMultiElements
232
     *
233
     * @param RequestOptions\PnrCreatePnrOptions $options
234
     * @param array $messageOptions (OPTIONAL)
235
     * @return Result
236
     * @throws Client\InvalidMessageException
237
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
238
     * @throws Exception
239
     */
240 4
    public function pnrCreatePnr(RequestOptions\PnrCreatePnrOptions $options, $messageOptions = [])
241
    {
242 4
        $msgName = 'PNR_AddMultiElements';
243
244 4
        return $this->callMessage($msgName, $options, $messageOptions);
245
    }
246
247
    /**
248
     * PNR_AddMultiElements - Create a new PNR or update an existing PNR.
249
     *
250
     * https://webservices.amadeus.com/extranet/viewService.do?id=25&flavourId=1&menuId=functional
251
     *
252
     * @param RequestOptions\PnrAddMultiElementsOptions $options
253
     * @param array $messageOptions (OPTIONAL)
254
     * @return Result
255
     * @throws Client\InvalidMessageException
256
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
257
     * @throws Exception
258
     */
259 8
    public function pnrAddMultiElements(RequestOptions\PnrAddMultiElementsOptions $options, $messageOptions = [])
260
    {
261 8
        $msgName = 'PNR_AddMultiElements';
262
263 8
        return $this->callMessage($msgName, $options, $messageOptions);
264
    }
265
266
    /**
267
     * PNR_RetrieveAndDisplay - Retrieve an Amadeus PNR by record locator including extra info
268
     *
269
     * This extra info is info you cannot see in the regular PNR, like Offers.
270
     *
271
     * https://webservices.amadeus.com/extranet/viewService.do?id=1922&flavourId=1&menuId=functional
272
     *
273
     * @param RequestOptions\PnrRetrieveAndDisplayOptions $options Amadeus Record Locator for PNR
274
     * @param array $messageOptions (OPTIONAL)
275
     * @return Result
276
     * @throws Client\InvalidMessageException
277
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
278
     * @throws Exception
279
     **/
280 4
    public function pnrRetrieveAndDisplay(RequestOptions\PnrRetrieveAndDisplayOptions $options, $messageOptions = [])
281
    {
282 4
        $msgName = 'PNR_RetrieveAndDisplay';
283
284 4
        return $this->callMessage($msgName, $options, $messageOptions);
285
    }
286
287
    /**
288
     * PNR_Cancel
289
     *
290
     * @param RequestOptions\PnrCancelOptions $options
291
     * @param array $messageOptions (OPTIONAL)
292
     * @return Result
293
     * @throws Client\InvalidMessageException
294
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
295
     * @throws Exception
296
     */
297 4
    public function pnrCancel(RequestOptions\PnrCancelOptions $options, $messageOptions = [])
298
    {
299 4
        $msgName = 'PNR_Cancel';
300
301 4
        return $this->callMessage($msgName, $options, $messageOptions);
302
    }
303
304
    /**
305
     * PNR_DisplayHistory
306
     *
307
     * @param RequestOptions\PnrDisplayHistoryOptions $options
308
     * @param array $messageOptions (OPTIONAL)
309
     * @return Result
310
     * @throws Client\InvalidMessageException
311
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
312
     * @throws Exception
313
     */
314 4
    public function pnrDisplayHistory(RequestOptions\PnrDisplayHistoryOptions $options, $messageOptions = [])
315
    {
316 4
        $msgName = 'PNR_DisplayHistory';
317
318 4
        return $this->callMessage($msgName, $options, $messageOptions);
319
    }
320
321
    /**
322
     * PNR_TransferOwnership
323
     *
324
     * @param RequestOptions\PnrTransferOwnershipOptions $options
325
     * @param array $messageOptions (OPTIONAL)
326
     * @return Result
327
     * @throws Client\InvalidMessageException
328
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
329
     * @throws Exception
330
     */
331 4
    public function pnrTransferOwnership(RequestOptions\PnrTransferOwnershipOptions $options, $messageOptions = [])
332
    {
333 4
        $msgName = 'PNR_TransferOwnership';
334
335 4
        return $this->callMessage($msgName, $options, $messageOptions);
336
    }
337
338
    /**
339
     * PNR_NameChange
340
     *
341
     * @param RequestOptions\PnrNameChangeOptions $options
342
     * @param array $messageOptions (OPTIONAL)
343
     * @return Result
344
     * @throws Client\InvalidMessageException
345
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
346
     * @throws Exception
347
     */
348 4
    public function pnrNameChange(RequestOptions\PnrNameChangeOptions $options, $messageOptions = [])
349
    {
350 4
        $msgName = 'PNR_NameChange';
351
352 4
        return $this->callMessage($msgName, $options, $messageOptions);
353
    }
354
355
    /**
356
     * Queue_List - get a list of all PNR's on a given queue
357
     *
358
     * https://webservices.amadeus.com/extranet/viewService.do?id=52&flavourId=1&menuId=functional
359
     *
360
     * @param RequestOptions\QueueListOptions $options
361
     * @param array $messageOptions (OPTIONAL)
362
     * @return Result
363
     * @throws Client\InvalidMessageException
364
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
365
     * @throws Exception
366
     */
367 4
    public function queueList(RequestOptions\QueueListOptions $options, $messageOptions = [])
368
    {
369 4
        $msgName = 'Queue_List';
370
371 4
        return $this->callMessage($msgName, $options, $messageOptions);
372
    }
373
374
    /**
375
     * Queue_PlacePNR - Place a PNR on a given queue
376
     *
377
     * @param RequestOptions\QueuePlacePnrOptions $options
378
     * @param array $messageOptions (OPTIONAL)
379
     * @return Result
380
     * @throws Client\InvalidMessageException
381
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
382
     * @throws Exception
383
     */
384 4
    public function queuePlacePnr(RequestOptions\QueuePlacePnrOptions $options, $messageOptions = [])
385
    {
386 4
        $msgName = 'Queue_PlacePNR';
387
388 4
        return $this->callMessage($msgName, $options, $messageOptions);
389
    }
390
391
    /**
392
     * Queue_RemoveItem - remove an item (a PNR) from a given queue
393
     *
394
     * @param RequestOptions\QueueRemoveItemOptions $options
395
     * @param array $messageOptions (OPTIONAL)
396
     * @return Result
397
     * @throws Client\InvalidMessageException
398
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
399
     * @throws Exception
400
     */
401 4
    public function queueRemoveItem(RequestOptions\QueueRemoveItemOptions $options, $messageOptions = [])
402
    {
403 4
        $msgName = 'Queue_RemoveItem';
404
405 4
        return $this->callMessage($msgName, $options, $messageOptions);
406
    }
407
408
    /**
409
     * Queue_MoveItem - move an item (a PNR) from one queue to another.
410
     *
411
     * @param RequestOptions\QueueMoveItemOptions $options
412
     * @param array $messageOptions (OPTIONAL)
413
     * @return Result
414
     * @throws Client\InvalidMessageException
415
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
416
     * @throws Exception
417
     */
418 4
    public function queueMoveItem(RequestOptions\QueueMoveItemOptions $options, $messageOptions = [])
419
    {
420 4
        $msgName = 'Queue_MoveItem';
421
422 4
        return $this->callMessage($msgName, $options, $messageOptions);
423
    }
424
425
    /**
426
     * Offer_CreateOffer
427
     *
428
     * @param RequestOptions\OfferCreateOptions $options
429
     * @param array $messageOptions (OPTIONAL)
430
     * @return Result
431
     * @throws Client\InvalidMessageException
432
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
433
     * @throws Exception
434
     */
435 4
    public function offerCreate(RequestOptions\OfferCreateOptions $options, $messageOptions = [])
436
    {
437 4
        $msgName = 'Offer_CreateOffer';
438
439 4
        return $this->callMessage($msgName, $options, $messageOptions);
440
    }
441
442
    /**
443
     * Offer_VerifyOffer
444
     *
445
     * To be called in the context of an open PNR
446
     *
447
     * @param RequestOptions\OfferVerifyOptions $options
448
     * @param array $messageOptions (OPTIONAL)
449
     * @return Result
450
     * @throws Client\InvalidMessageException
451
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
452
     * @throws Exception
453
     */
454 4
    public function offerVerify(RequestOptions\OfferVerifyOptions $options, $messageOptions = [])
455
    {
456 4
        $msgName = 'Offer_VerifyOffer';
457
458 4
        return $this->callMessage($msgName, $options, $messageOptions);
459
    }
460
461
    /**
462
     * Offer_ConfirmAirOffer
463
     *
464
     * @param RequestOptions\OfferConfirmAirOptions $options
465
     * @param array $messageOptions (OPTIONAL)
466
     * @return Result
467
     * @throws Client\InvalidMessageException
468
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
469
     * @throws Exception
470
     */
471 4
    public function offerConfirmAir(RequestOptions\OfferConfirmAirOptions $options, $messageOptions = [])
472
    {
473 4
        $msgName = 'Offer_ConfirmAirOffer';
474
475 4
        return $this->callMessage($msgName, $options, $messageOptions);
476
    }
477
478
    /**
479
     * Offer_ConfirmHotelOffer
480
     *
481
     * @param RequestOptions\OfferConfirmHotelOptions $options
482
     * @param array $messageOptions (OPTIONAL)
483
     * @return Result
484
     * @throws Client\InvalidMessageException
485
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
486
     * @throws Exception
487
     */
488 4
    public function offerConfirmHotel(RequestOptions\OfferConfirmHotelOptions $options, $messageOptions = [])
489
    {
490 4
        $msgName = 'Offer_ConfirmHotelOffer';
491
492 4
        return $this->callMessage($msgName, $options, $messageOptions);
493
    }
494
495
    /**
496
     * Offer_ConfirmCarOffer
497
     *
498
     * @param RequestOptions\OfferConfirmCarOptions $options
499
     * @param array $messageOptions (OPTIONAL)
500
     * @return Result
501
     * @throws Client\InvalidMessageException
502
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
503
     * @throws Exception
504
     */
505 4
    public function offerConfirmCar(RequestOptions\OfferConfirmCarOptions $options, $messageOptions = [])
506
    {
507 4
        $msgName = 'Offer_ConfirmCarOffer';
508
509 4
        return $this->callMessage($msgName, $options, $messageOptions);
510
    }
511
512
    /**
513
     * Fare_MasterPricerTravelBoardSearch
514
     *
515
     * @param RequestOptions\FareMasterPricerTbSearch $options
516
     * @param array $messageOptions (OPTIONAL)
517
     * @return Result
518
     * @throws Client\InvalidMessageException
519
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
520
     * @throws Exception
521
     */
522 4
    public function fareMasterPricerTravelBoardSearch(
523
        RequestOptions\FareMasterPricerTbSearch $options,
524
        $messageOptions = []
525
    ) {
526 4
        $msgName = 'Fare_MasterPricerTravelBoardSearch';
527
528 4
        return $this->callMessage($msgName, $options, $messageOptions);
529
    }
530
531
    /**
532
     * Fare_MasterPricerCalendar
533
     *
534
     * @param RequestOptions\FareMasterPricerCalendarOptions $options
535
     * @param array $messageOptions (OPTIONAL)
536
     * @return Result
537
     * @throws Client\InvalidMessageException
538
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
539
     * @throws Exception
540
     */
541 4
    public function fareMasterPricerCalendar(
542
        RequestOptions\FareMasterPricerCalendarOptions $options,
543
        $messageOptions = []
544
    ) {
545 4
        $msgName = 'Fare_MasterPricerCalendar';
546
547 4
        return $this->callMessage($msgName, $options, $messageOptions);
548
    }
549
550
    /**
551
     * Fare_PricePnrWithBookingClass
552
     *
553
     * @param RequestOptions\FarePricePnrWithBookingClassOptions $options
554
     * @param array $messageOptions (OPTIONAL)
555
     * @return Result
556
     * @throws Client\InvalidMessageException
557
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
558
     * @throws Exception
559
     */
560 8
    public function farePricePnrWithBookingClass(
561
        RequestOptions\FarePricePnrWithBookingClassOptions $options,
562
        $messageOptions = []
563
    ) {
564 8
        $msgName = 'Fare_PricePNRWithBookingClass';
565
566 8
        return $this->callMessage($msgName, $options, $messageOptions);
567
    }
568
569
    /**
570
     * Fare_PricePnrWithLowerFares
571
     *
572
     * @param RequestOptions\FarePricePnrWithLowerFaresOptions $options
573
     * @param array $messageOptions (OPTIONAL)
574
     * @return Result
575
     * @throws Client\InvalidMessageException
576
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
577
     * @throws Exception
578
     */
579 8
    public function farePricePnrWithLowerFares(
580
        RequestOptions\FarePricePnrWithLowerFaresOptions $options,
581
        $messageOptions = []
582
    ) {
583 8
        $msgName = 'Fare_PricePNRWithLowerFares';
584
585 8
        return $this->callMessage($msgName, $options, $messageOptions);
586
    }
587
588
    /**
589
     * Fare_PricePnrWithLowestFare
590
     *
591
     * @param RequestOptions\FarePricePnrWithLowestFareOptions $options
592
     * @param array $messageOptions (OPTIONAL)
593
     * @return Result
594
     * @throws Client\InvalidMessageException
595
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
596
     * @throws Exception
597
     */
598 8
    public function farePricePnrWithLowestFare(
599
        RequestOptions\FarePricePnrWithLowestFareOptions $options,
600
        $messageOptions = []
601
    ) {
602 8
        $msgName = 'Fare_PricePNRWithLowestFare';
603
604 8
        return $this->callMessage($msgName, $options, $messageOptions);
605
    }
606
607
    /**
608
     * Fare_InformativePricingWithoutPNR
609
     *
610
     * @param RequestOptions\FareInformativePricingWithoutPnrOptions $options
611
     * @param array $messageOptions (OPTIONAL)
612
     * @return Result
613
     * @throws Client\InvalidMessageException
614
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
615
     * @throws Exception
616
     */
617 4
    public function fareInformativePricingWithoutPnr(
618
        RequestOptions\FareInformativePricingWithoutPnrOptions $options,
619
        $messageOptions = []
620
    ) {
621 4
        $msgName = 'Fare_InformativePricingWithoutPNR';
622
623 4
        return $this->callMessage($msgName, $options, $messageOptions);
624
    }
625
626
    /**
627
     * Fare_InformativeBestPricingWithoutPNR
628
     *
629
     * @param RequestOptions\FareInformativeBestPricingWithoutPnrOptions $options
630
     * @param array $messageOptions (OPTIONAL)
631
     * @return Result
632
     * @throws Client\InvalidMessageException
633
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
634
     * @throws Exception
635
     */
636 4
    public function fareInformativeBestPricingWithoutPnr(
637
        RequestOptions\FareInformativeBestPricingWithoutPnrOptions $options,
638
        $messageOptions = []
639
    ) {
640 4
        $msgName = 'Fare_InformativeBestPricingWithoutPNR';
641
642 4
        return $this->callMessage($msgName, $options, $messageOptions);
643
    }
644
645
    /**
646
     * Fare_CheckRules
647
     *
648
     * @param RequestOptions\FareCheckRulesOptions $options
649
     * @param array $messageOptions (OPTIONAL)
650
     * @return Result
651
     * @throws Client\InvalidMessageException
652
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
653
     * @throws Exception
654
     */
655 4
    public function fareCheckRules(RequestOptions\FareCheckRulesOptions $options, $messageOptions = [])
656
    {
657 4
        $msgName = 'Fare_CheckRules';
658
659 4
        return $this->callMessage($msgName, $options, $messageOptions);
660
    }
661
662
    /**
663
     * Fare_GetFareRules
664
     *
665
     * @param RequestOptions\FareGetFareRulesOptions $options
666
     * @param array $messageOptions (OPTIONAL)
667
     * @return Result
668
     * @throws Client\InvalidMessageException
669
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
670
     * @throws Exception
671
     */
672 4
    public function fareGetFareRules(RequestOptions\FareGetFareRulesOptions $options, $messageOptions = [])
673
    {
674 4
        $msgName = 'Fare_GetFareRules';
675
676 4
        return $this->callMessage($msgName, $options, $messageOptions);
677
    }
678
679
    /**
680
     * Fare_ConvertCurrency
681
     *
682
     * @param RequestOptions\FareConvertCurrencyOptions $options
683
     * @param array $messageOptions (OPTIONAL)
684
     * @return Result
685
     * @throws Client\InvalidMessageException
686
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
687
     * @throws Exception
688
     */
689 4
    public function fareConvertCurrency(RequestOptions\FareConvertCurrencyOptions $options, $messageOptions = [])
690
    {
691 4
        $msgName = 'Fare_ConvertCurrency';
692
693 4
        return $this->callMessage($msgName, $options, $messageOptions);
694
    }
695
696
    /**
697
     * Air_MultiAvailability
698
     *
699
     * @param RequestOptions\AirMultiAvailabilityOptions $options
700
     * @param array $messageOptions (OPTIONAL)
701
     * @return Result
702
     * @throws Client\InvalidMessageException
703
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
704
     * @throws Exception
705
     */
706 4
    public function airMultiAvailability(
707
        RequestOptions\AirMultiAvailabilityOptions $options,
708
        $messageOptions = []
709
    ) {
710 4
        $msgName = 'Air_MultiAvailability';
711
712 4
        return $this->callMessage($msgName, $options, $messageOptions);
713
    }
714
715
    /**
716
     * Air_SellFromRecommendation
717
     *
718
     * @param RequestOptions\AirSellFromRecommendationOptions $options
719
     * @param array $messageOptions (OPTIONAL)
720
     * @return Result
721
     * @throws Client\InvalidMessageException
722
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
723
     * @throws Exception
724
     */
725 4
    public function airSellFromRecommendation(
726
        RequestOptions\AirSellFromRecommendationOptions $options,
727
        $messageOptions = []
728
    ) {
729 4
        $msgName = 'Air_SellFromRecommendation';
730
731 4
        return $this->callMessage($msgName, $options, $messageOptions);
732
    }
733
734
    /**
735
     * Air_FlightInfo
736
     *
737
     * @param RequestOptions\AirFlightInfoOptions $options
738
     * @param array $messageOptions (OPTIONAL)
739
     * @return Result
740
     * @throws Client\InvalidMessageException
741
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
742
     * @throws Exception
743
     */
744 4
    public function airFlightInfo(RequestOptions\AirFlightInfoOptions $options, $messageOptions = [])
745
    {
746 4
        $msgName = 'Air_FlightInfo';
747
748 4
        return $this->callMessage($msgName, $options, $messageOptions);
749
    }
750
751
    /**
752
     * Air_RetrieveSeatMap
753
     *
754
     * @param RequestOptions\AirRetrieveSeatMapOptions $options
755
     * @param array $messageOptions (OPTIONAL)
756
     * @return Result
757
     * @throws Client\InvalidMessageException
758
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
759
     * @throws Exception
760
     */
761 4
    public function airRetrieveSeatMap(RequestOptions\AirRetrieveSeatMapOptions $options, $messageOptions = [])
762
    {
763 4
        $msgName = 'Air_RetrieveSeatMap';
764
765 4
        return $this->callMessage($msgName, $options, $messageOptions);
766
    }
767
768
    /**
769
     * Air_RebookAirSegment
770
     *
771
     * @param RequestOptions\AirRebookAirSegmentOptions $options
772
     * @param array $messageOptions (OPTIONAL)
773
     * @return Result
774
     * @throws Client\InvalidMessageException
775
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
776
     * @throws Exception
777
     */
778 4
    public function airRebookAirSegment(RequestOptions\AirRebookAirSegmentOptions $options, $messageOptions = [])
779
    {
780 4
        $msgName = 'Air_RebookAirSegment';
781
782 4
        return $this->callMessage($msgName, $options, $messageOptions);
783
    }
784
785
    /**
786
     * Command_Cryptic
787
     *
788
     * @param RequestOptions\CommandCrypticOptions $options
789
     * @param array $messageOptions (OPTIONAL)
790
     * @return Result
791
     * @throws Client\InvalidMessageException
792
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
793
     * @throws Exception
794
     */
795 4
    public function commandCryptic(RequestOptions\CommandCrypticOptions $options, $messageOptions = [])
796
    {
797 4
        $msgName = 'Command_Cryptic';
798
799 4
        return $this->callMessage($msgName, $options, $messageOptions);
800
    }
801
802
    /**
803
     * MiniRule_GetFromPricingRec
804
     *
805
     * @param RequestOptions\MiniRuleGetFromPricingRecOptions $options
806
     * @param array $messageOptions (OPTIONAL)
807
     * @return Result
808
     * @throws Client\InvalidMessageException
809
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
810
     * @throws Exception
811
     */
812 4
    public function miniRuleGetFromPricingRec(
813
        RequestOptions\MiniRuleGetFromPricingRecOptions $options,
814
        $messageOptions = []
815
    ) {
816 4
        $msgName = 'MiniRule_GetFromPricingRec';
817
818 4
        return $this->callMessage($msgName, $options, $messageOptions);
819
    }
820
821
    /**
822
     * MiniRule_GetFromPricing
823
     *
824
     * @param RequestOptions\MiniRuleGetFromPricingOptions $options
825
     * @param array $messageOptions (OPTIONAL)
826
     * @return Result
827
     * @throws Client\InvalidMessageException
828
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
829
     * @throws Exception
830
     */
831 4
    public function miniRuleGetFromPricing(
832
        RequestOptions\MiniRuleGetFromPricingOptions $options,
833
        $messageOptions = []
834
    ) {
835 4
        $msgName = 'MiniRule_GetFromPricing';
836
837 4
        return $this->callMessage($msgName, $options, $messageOptions);
838
    }
839
840
    /**
841
     * MiniRule_GetFromETicket
842
     *
843
     * @param RequestOptions\MiniRuleGetFromETicketOptions $options
844
     * @param array $messageOptions (OPTIONAL)
845
     * @return Result
846
     * @throws Client\InvalidMessageException
847
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
848
     * @throws Exception
849
     */
850 4
    public function miniRuleGetFromETicket(
851
        RequestOptions\MiniRuleGetFromETicketOptions $options,
852
        $messageOptions = []
853
    ) {
854 4
        $msgName = 'MiniRule_GetFromETicket';
855
856 4
        return $this->callMessage($msgName, $options, $messageOptions);
857
    }
858
859
    /**
860
     * Info_EncodeDecodeCity
861
     *
862
     * @param RequestOptions\InfoEncodeDecodeCityOptions $options
863
     * @param array $messageOptions (OPTIONAL)
864
     * @return Result
865
     * @throws Client\InvalidMessageException
866
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
867
     * @throws Exception
868
     */
869 4
    public function infoEncodeDecodeCity(RequestOptions\InfoEncodeDecodeCityOptions $options, $messageOptions = [])
870
    {
871 4
        $msgName = 'Info_EncodeDecodeCity';
872
873 4
        return $this->callMessage($msgName, $options, $messageOptions);
874
    }
875
876
    /**
877
     * PointOfRef_Search
878
     *
879
     * @param RequestOptions\PointOfRefSearchOptions $options
880
     * @param array $messageOptions (OPTIONAL)
881
     * @return Result
882
     * @throws Client\InvalidMessageException
883
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
884
     * @throws Exception
885
     */
886 4
    public function pointOfRefSearch(RequestOptions\PointOfRefSearchOptions $options, $messageOptions = [])
887
    {
888 4
        $msgName = 'PointOfRef_Search';
889
890 4
        return $this->callMessage($msgName, $options, $messageOptions);
891
    }
892
893
894
    /**
895
     * Ticket_CreateTSTFromPricing
896
     *
897
     * @param RequestOptions\TicketCreateTstFromPricingOptions $options
898
     * @param array $messageOptions (OPTIONAL)
899
     * @return Result
900
     * @throws Client\InvalidMessageException
901
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
902
     * @throws Exception
903
     */
904 4
    public function ticketCreateTSTFromPricing(
905
        RequestOptions\TicketCreateTstFromPricingOptions $options,
906
        $messageOptions = []
907
    ) {
908 4
        $msgName = 'Ticket_CreateTSTFromPricing';
909
910 4
        return $this->callMessage($msgName, $options, $messageOptions);
911
    }
912
913
    /**
914
     * Ticket_CreateTSMFromPricing
915
     *
916
     * @param RequestOptions\TicketCreateTsmFromPricingOptions $options
917
     * @param array $messageOptions (OPTIONAL)
918
     * @return Result
919
     * @throws Client\InvalidMessageException
920
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
921
     * @throws Exception
922
     */
923 4
    public function ticketCreateTSMFromPricing(
924
        RequestOptions\TicketCreateTsmFromPricingOptions $options,
925
        $messageOptions = []
926
    ) {
927 4
        $msgName = 'Ticket_CreateTSMFromPricing';
928
929 4
        return $this->callMessage($msgName, $options, $messageOptions);
930
    }
931
932
    /**
933
     * Ticket_CreateTSMFareElement
934
     *
935
     * @param RequestOptions\TicketCreateTsmFareElOptions $options
936
     * @param array $messageOptions (OPTIONAL)
937
     * @return Result
938
     * @throws Client\InvalidMessageException
939
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
940
     * @throws Exception
941
     */
942 4
    public function ticketCreateTSMFareElement(
943
        RequestOptions\TicketCreateTsmFareElOptions $options,
944
        $messageOptions = []
945
    ) {
946 4
        $msgName = 'Ticket_CreateTSMFareElement';
947
948 4
        return $this->callMessage($msgName, $options, $messageOptions);
949
    }
950
951
    /**
952
     * Ticket_DeleteTST
953
     *
954
     * @param RequestOptions\TicketDeleteTstOptions $options
955
     * @param array $messageOptions (OPTIONAL)
956
     * @return Result
957
     * @throws Client\InvalidMessageException
958
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
959
     * @throws Exception
960
     */
961 4
    public function ticketDeleteTST(RequestOptions\TicketDeleteTstOptions $options, $messageOptions = [])
962
    {
963 4
        $msgName = 'Ticket_DeleteTST';
964
965 4
        return $this->callMessage($msgName, $options, $messageOptions);
966
    }
967
968
    /**
969
     * Ticket_DeleteTSMP
970
     *
971
     * @param RequestOptions\TicketDeleteTsmpOptions $options
972
     * @param array $messageOptions (OPTIONAL)
973
     * @return Result
974
     * @throws Client\InvalidMessageException
975
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
976
     * @throws Exception
977
     */
978 4
    public function ticketDeleteTSMP(RequestOptions\TicketDeleteTsmpOptions $options, $messageOptions = [])
979
    {
980 4
        $msgName = 'Ticket_DeleteTSMP';
981
982 4
        return $this->callMessage($msgName, $options, $messageOptions);
983
    }
984
985
    /**
986
     * Ticket_DisplayTST
987
     *
988
     * @param RequestOptions\TicketDisplayTstOptions $options
989
     * @param array $messageOptions (OPTIONAL)
990
     * @return Result
991
     * @throws Client\InvalidMessageException
992
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
993
     * @throws Exception
994
     */
995 4
    public function ticketDisplayTST(RequestOptions\TicketDisplayTstOptions $options, $messageOptions = [])
996
    {
997 4
        $msgName = 'Ticket_DisplayTST';
998
999 4
        return $this->callMessage($msgName, $options, $messageOptions);
1000
    }
1001
1002
    /**
1003
     * Ticket_DisplayTSMP
1004
     *
1005
     * @param RequestOptions\TicketDisplayTsmpOptions $options
1006
     * @param array $messageOptions (OPTIONAL)
1007
     * @return Result
1008
     * @throws Client\InvalidMessageException
1009
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1010
     * @throws Exception
1011
     */
1012 4
    public function ticketDisplayTSMP(RequestOptions\TicketDisplayTsmpOptions $options, $messageOptions = [])
1013
    {
1014 4
        $msgName = 'Ticket_DisplayTSMP';
1015
1016 4
        return $this->callMessage($msgName, $options, $messageOptions);
1017
    }
1018
1019
    /**
1020
     * Ticket_DisplayTSMFareElement
1021
     *
1022
     * @param RequestOptions\TicketDisplayTsmFareElOptions $options
1023
     * @param array $messageOptions (OPTIONAL)
1024
     * @return Result
1025
     * @throws Client\InvalidMessageException
1026
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1027
     * @throws Exception
1028
     */
1029 4
    public function ticketDisplayTSMFareElement(
1030
        RequestOptions\TicketDisplayTsmFareElOptions $options,
1031
        $messageOptions = []
1032
    ) {
1033 4
        $msgName = 'Ticket_DisplayTSMFareElement';
1034
1035 4
        return $this->callMessage($msgName, $options, $messageOptions);
1036
    }
1037
1038
    /**
1039
     * Ticket_CheckEligibility
1040
     *
1041
     * @param RequestOptions\TicketCheckEligibilityOptions $options
1042
     * @param array $messageOptions (OPTIONAL)
1043
     * @return Result
1044
     * @throws Client\InvalidMessageException
1045
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1046
     * @throws Exception
1047
     */
1048 4
    public function ticketCheckEligibility(
1049
        RequestOptions\TicketCheckEligibilityOptions $options,
1050
        $messageOptions = []
1051
    ) {
1052 4
        $msgName = 'Ticket_CheckEligibility';
1053
1054 4
        return $this->callMessage($msgName, $options, $messageOptions);
1055
    }
1056
1057
    /**
1058
     * Ticket_ATCShopperMasterPricerTravelBoardSearch
1059
     *
1060
     * @param RequestOptions\TicketAtcShopperMpTbSearchOptions $options
1061
     * @param array $messageOptions (OPTIONAL)
1062
     * @return Result
1063
     * @throws Client\InvalidMessageException
1064
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1065
     * @throws Exception
1066
     */
1067 4
    public function ticketAtcShopperMasterPricerTravelBoardSearch(
1068
        RequestOptions\TicketAtcShopperMpTbSearchOptions $options,
1069
        $messageOptions = []
1070
    ) {
1071 4
        $msgName = 'Ticket_ATCShopperMasterPricerTravelBoardSearch';
1072
1073 4
        return $this->callMessage($msgName, $options, $messageOptions);
1074
    }
1075
1076
    /**
1077
     * Ticket_RepricePNRWithBookingClass
1078
     *
1079
     * @param RequestOptions\TicketRepricePnrWithBookingClassOptions $options
1080
     * @param array $messageOptions (OPTIONAL)
1081
     * @return Result
1082
     * @throws Client\InvalidMessageException
1083
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1084
     * @throws Exception
1085
     */
1086 4
    public function ticketRepricePnrWithBookingClass(
1087
        RequestOptions\TicketRepricePnrWithBookingClassOptions $options,
1088
        $messageOptions = []
1089
    ) {
1090 4
        $msgName = 'Ticket_RepricePNRWithBookingClass';
1091
1092 4
        return $this->callMessage($msgName, $options, $messageOptions);
1093
    }
1094
1095
    /**
1096
     * Ticket_CancelDocument
1097
     *
1098
     * @param RequestOptions\TicketCancelDocumentOptions $options
1099
     * @param array $messageOptions (OPTIONAL)
1100
     * @return Result
1101
     * @throws Client\InvalidMessageException
1102
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1103
     * @throws Exception
1104
     */
1105 4
    public function ticketCancelDocument(
1106
        RequestOptions\TicketCancelDocumentOptions $options,
1107
        $messageOptions = []
1108
    ) {
1109 4
        $msgName = 'Ticket_CancelDocument';
1110
1111 4
        return $this->callMessage($msgName, $options, $messageOptions);
1112
    }
1113
1114
    /**
1115
     * Ticket_ReissueConfirmedPricing
1116
     *
1117
     * @param RequestOptions\TicketReissueConfirmedPricingOptions $options
1118
     * @param array $messageOptions (OPTIONAL)
1119
     * @return Result
1120
     * @throws Client\InvalidMessageException
1121
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1122
     * @throws Exception
1123
     */
1124 4
    public function ticketReissueConfirmedPricing(
1125
        RequestOptions\TicketReissueConfirmedPricingOptions $options,
1126
        $messageOptions = []
1127
    ) {
1128 4
        $msgName = 'Ticket_ReissueConfirmedPricing';
1129
1130 4
        return $this->callMessage($msgName, $options, $messageOptions);
1131
    }
1132
1133
    /**
1134
     * Ticket_ProcessEDoc
1135
     *
1136
     * @param RequestOptions\TicketProcessEDocOptions $options
1137
     * @param array $messageOptions (OPTIONAL)
1138
     * @return Result
1139
     * @throws Client\InvalidMessageException
1140
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1141
     * @throws Exception
1142
     */
1143 4
    public function ticketProcessEDoc(RequestOptions\TicketProcessEDocOptions $options, $messageOptions = [])
1144
    {
1145 4
        $msgName = 'Ticket_ProcessEDoc';
1146 4
        return $this->callMessage($msgName, $options, $messageOptions);
1147
    }
1148
1149
    /**
1150
     * DocIssuance_IssueTicket
1151
     *
1152
     * @param RequestOptions\DocIssuanceIssueTicketOptions $options
1153
     * @param array $messageOptions (OPTIONAL)
1154
     * @return Result
1155
     * @throws Client\InvalidMessageException
1156
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1157
     * @throws Exception
1158
     */
1159 4
    public function docIssuanceIssueTicket(
1160
        RequestOptions\DocIssuanceIssueTicketOptions $options,
1161
        $messageOptions = []
1162
    ) {
1163 4
        $msgName = 'DocIssuance_IssueTicket';
1164
1165 4
        return $this->callMessage($msgName, $options, $messageOptions);
1166
    }
1167
1168
    /**
1169
     * DocIssuance_IssueMiscellaneousDocuments
1170
     *
1171
     * @param RequestOptions\DocIssuanceIssueMiscDocOptions $options
1172
     * @param array $messageOptions (OPTIONAL)
1173
     * @return Result
1174
     * @throws Client\InvalidMessageException
1175
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1176
     * @throws Exception
1177
     */
1178 4
    public function docIssuanceIssueMiscellaneousDocuments(
1179
        RequestOptions\DocIssuanceIssueMiscDocOptions $options,
1180
        $messageOptions = []
1181
    ) {
1182 4
        $msgName = 'DocIssuance_IssueMiscellaneousDocuments';
1183
1184 4
        return $this->callMessage($msgName, $options, $messageOptions);
1185
    }
1186
1187
    /**
1188
     * DocIssuance_IssueCombined
1189
     *
1190
     * @param RequestOptions\DocIssuanceIssueCombinedOptions $options
1191
     * @param array $messageOptions (OPTIONAL)
1192
     * @return Result
1193
     * @throws Client\InvalidMessageException
1194
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1195
     * @throws Exception
1196
     */
1197 8
    public function docIssuanceIssueCombined(
1198
        RequestOptions\DocIssuanceIssueCombinedOptions $options,
1199
        $messageOptions = []
1200
    ) {
1201 8
        $msgName = 'DocIssuance_IssueCombined';
1202
1203 8
        return $this->callMessage($msgName, $options, $messageOptions);
1204
    }
1205
1206
    /**
1207
     * DocRefund_InitRefund
1208
     *
1209
     * @param RequestOptions\DocRefundInitRefundOptions $options
1210
     * @param array $messageOptions (OPTIONAL)
1211
     * @return Result
1212
     * @throws Client\InvalidMessageException
1213
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1214
     * @throws Exception
1215
     */
1216 4
    public function docRefundInitRefund(
1217
        RequestOptions\DocRefundInitRefundOptions $options,
1218
        $messageOptions = []
1219
    ) {
1220 4
        $msgName = 'DocRefund_InitRefund';
1221
1222 4
        return $this->callMessage($msgName, $options, $messageOptions);
1223
    }
1224
1225
    /**
1226
     * DocRefund_UpdateRefund
1227
     *
1228
     * @param RequestOptions\DocRefundUpdateRefundOptions $options
1229
     * @param array $messageOptions (OPTIONAL)
1230
     * @return Result
1231
     * @throws Client\InvalidMessageException
1232
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1233
     * @throws Exception
1234
     */
1235 4
    public function docRefundUpdateRefund(
1236
        RequestOptions\DocRefundUpdateRefundOptions $options,
1237
        $messageOptions = []
1238
    ) {
1239 4
        $msgName = 'DocRefund_UpdateRefund';
1240
1241 4
        return $this->callMessage($msgName, $options, $messageOptions);
1242
    }
1243
1244
    /**
1245
     * DocRefund_ProcessRefund
1246
     *
1247
     * @param RequestOptions\DocRefundProcessRefundOptions $options
1248
     * @param array $messageOptions (OPTIONAL)
1249
     * @return Result
1250
     * @throws Client\InvalidMessageException
1251
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1252
     * @throws Exception
1253
     */
1254 4
    public function docRefundProcessRefund(
1255
        RequestOptions\DocRefundProcessRefundOptions $options,
1256
        $messageOptions = []
1257
    ) {
1258 4
        $msgName = 'DocRefund_ProcessRefund';
1259
1260 4
        return $this->callMessage($msgName, $options, $messageOptions);
1261
    }
1262
1263
1264
    /**
1265
     * FOP_CreateFormOfPayment
1266
     *
1267
     * @param RequestOptions\FopCreateFopOptions $options
1268
     * @param array $messageOptions (OPTIONAL)
1269
     * @return Result
1270
     * @throws Client\InvalidMessageException
1271
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1272
     * @throws Exception
1273
     */
1274 4
    public function fopCreateFormOfPayment(RequestOptions\FopCreateFopOptions $options, $messageOptions = [])
1275
    {
1276 4
        $msgName = 'FOP_CreateFormOfPayment';
1277
1278 4
        return $this->callMessage($msgName, $options, $messageOptions);
1279
    }
1280
1281
1282
    /**
1283
     * FOP_CreateFormOfPayment
1284
     *
1285
     * @param RequestOptions\FopValidateFopOptions $options
1286
     * @param array $messageOptions (OPTIONAL)
1287
     * @return Result
1288
     * @throws Client\InvalidMessageException
1289
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1290
     * @throws Exception
1291
     */
1292 4
    public function fopValidateFOP(RequestOptions\FopValidateFopOptions $options, $messageOptions = [])
1293
    {
1294 4
        $msgName = 'FOP_ValidateFOP';
1295
1296 4
        return $this->callMessage($msgName, $options, $messageOptions);
1297
    }
1298
1299
    /**
1300
     * PriceXplorer_ExtremeSearch
1301
     *
1302
     * @param RequestOptions\PriceXplorerExtremeSearchOptions $options
1303
     * @param array $messageOptions (OPTIONAL)
1304
     * @return Result
1305
     * @throws Client\InvalidMessageException
1306
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1307
     * @throws Exception
1308
     */
1309 4
    public function priceXplorerExtremeSearch(
1310
        RequestOptions\PriceXplorerExtremeSearchOptions $options,
1311
        $messageOptions = []
1312
    ) {
1313 4
        $msgName = 'PriceXplorer_ExtremeSearch';
1314
1315 4
        return $this->callMessage($msgName, $options, $messageOptions);
1316
    }
1317
1318
    /**
1319
     * SalesReports_DisplayQueryReport
1320
     *
1321
     * @param RequestOptions\SalesReportsDisplayQueryReportOptions $options
1322
     * @param array $messageOptions (OPTIONAL)
1323
     * @return Result
1324
     * @throws Client\InvalidMessageException
1325
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1326
     * @throws Exception
1327
     */
1328 4
    public function salesReportsDisplayQueryReport(
1329
        RequestOptions\SalesReportsDisplayQueryReportOptions $options,
1330
        $messageOptions = []
1331
    ) {
1332 4
        $msgName = 'SalesReports_DisplayQueryReport';
1333
1334 4
        return $this->callMessage($msgName, $options, $messageOptions);
1335
    }
1336
1337
    /**
1338
     * Service_IntegratedPricing
1339
     *
1340
     * @param RequestOptions\ServiceIntegratedPricingOptions $options
1341
     * @param array $messageOptions (OPTIONAL)
1342
     * @return Result
1343
     * @throws Client\InvalidMessageException
1344
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1345
     * @throws Exception
1346
     */
1347 4
    public function serviceIntegratedPricing(
1348
        RequestOptions\ServiceIntegratedPricingOptions $options,
1349
        $messageOptions = []
1350
    ) {
1351 4
        $msgName = 'Service_IntegratedPricing';
1352
1353 4
        return $this->callMessage($msgName, $options, $messageOptions);
1354
    }
1355
1356
    /**
1357
     * Service_IntegratedCatalogue
1358
     *
1359
     * @param RequestOptions\ServiceIntegratedCatalogueOptions $options
1360
     * @param array $messageOptions (OPTIONAL)
1361
     * @return Result
1362
     * @throws Client\InvalidMessageException
1363
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1364
     * @throws Exception
1365
     */
1366 4
    public function serviceIntegratedCatalogue(
1367
        RequestOptions\ServiceIntegratedCatalogueOptions $options,
1368
        $messageOptions = []
1369
    ) {
1370 4
        $msgName = 'Service_IntegratedCatalogue';
1371
1372 4
        return $this->callMessage($msgName, $options, $messageOptions);
1373
    }
1374
1375
    /**
1376
     * Call a message with the given parameters
1377
     *
1378
     * @param string $messageName
1379
     * @param RequestOptions\RequestOptionsInterface $options
1380
     * @param array $messageOptions
1381
     * @param bool $endSession
1382
     * @return Result
1383
     * @throws Client\Exception
1384
     * @throws Client\Struct\InvalidArgumentException
1385
     * @throws Client\InvalidMessageException
1386
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1387
     * @throws \RuntimeException
1388
     * @throws \InvalidArgumentException
1389
     */
1390 288
    protected function callMessage($messageName, $options, $messageOptions, $endSession = false)
1391
    {
1392 288
        $messageOptions = $this->makeMessageOptions($messageOptions, $endSession);
1393
1394 288
        $this->lastMessage = $messageName;
1395
1396 288
        $sendResult = $this->sessionHandler->sendMessage(
1397 288
            $messageName,
1398 288
            $this->requestCreator->createRequest(
1399 288
                $messageName,
1400 144
                $options
1401 144
            ),
1402 144
            $messageOptions
1403 144
        );
1404
1405 288
        $response = $this->responseHandler->analyzeResponse(
1406 288
            $sendResult,
1407 144
            $messageName
1408 144
        );
1409
1410 288
        if ($messageOptions['returnXml'] === false) {
1411 4
            $response->responseXml = null;
1412 2
        }
1413
1414 288
        return $response;
1415
    }
1416
1417
    /**
1418
     * Make message options
1419
     *
1420
     * Message options are meta options when sending a message to the amadeus web services
1421
     * - 'endSession' (if stateful) : should we end the current session after sending this call?
1422
     * - 'returnXml' : Should we return the XML string in the Result::responseXml property?
1423
     *   (this overrides the default setting returnXml in the Amadeus\Client\Params for a single message)
1424
     *
1425
     * @param array $incoming The Message options chosen by the caller - if any.
1426
     * @param bool $endSession Switch if you want to terminate the current session after making the call.
1427
     * @return array
1428
     */
1429 312
    protected function makeMessageOptions(array $incoming, $endSession = false)
1430
    {
1431
        $options = [
1432 312
            'endSession' => $endSession,
1433 312
            'returnXml' => $this->returnResultXml
1434 156
        ];
1435
1436 312
        if (array_key_exists('endSession', $incoming)) {
1437 4
            $options['endSession'] = $incoming['endSession'];
1438 2
        }
1439
1440 312
        if (array_key_exists('returnXml', $incoming)) {
1441 12
            $options['returnXml'] = $incoming['returnXml'];
1442 6
        }
1443
1444 312
        return $options;
1445
    }
1446
}
1447