Completed
Push — master ( 1d411d...695480 )
by Dieter
15:11
created

Client::ticketInitRefund()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
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 368
    public function __construct(Params $params)
165
    {
166 368
        $this->loadClientParams(
167 368
            $params,
168 368
            self::RECEIVED_FROM_IDENTIFIER,
169 184
            self::VERSION
170 184
        );
171 364
    }
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
     * Ticket_ProcessETicket
1151
     *
1152
     * @param RequestOptions\TicketProcessETicketOptions $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 ticketProcessETicket(RequestOptions\TicketProcessETicketOptions $options, $messageOptions = [])
1160
    {
1161 4
        $msgName = 'Ticket_ProcessETicket';
1162 4
        return $this->callMessage($msgName, $options, $messageOptions);
1163
    }
1164
1165
    /**
1166
     * DocIssuance_IssueTicket
1167
     *
1168
     * @param RequestOptions\DocIssuanceIssueTicketOptions $options
1169
     * @param array $messageOptions (OPTIONAL)
1170
     * @return Result
1171
     * @throws Client\InvalidMessageException
1172
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1173
     * @throws Exception
1174
     */
1175 4
    public function docIssuanceIssueTicket(
1176
        RequestOptions\DocIssuanceIssueTicketOptions $options,
1177
        $messageOptions = []
1178
    ) {
1179 4
        $msgName = 'DocIssuance_IssueTicket';
1180
1181 4
        return $this->callMessage($msgName, $options, $messageOptions);
1182
    }
1183
1184
    /**
1185
     * DocIssuance_IssueMiscellaneousDocuments
1186
     *
1187
     * @param RequestOptions\DocIssuanceIssueMiscDocOptions $options
1188
     * @param array $messageOptions (OPTIONAL)
1189
     * @return Result
1190
     * @throws Client\InvalidMessageException
1191
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1192
     * @throws Exception
1193
     */
1194 4
    public function docIssuanceIssueMiscellaneousDocuments(
1195
        RequestOptions\DocIssuanceIssueMiscDocOptions $options,
1196
        $messageOptions = []
1197
    ) {
1198 4
        $msgName = 'DocIssuance_IssueMiscellaneousDocuments';
1199
1200 4
        return $this->callMessage($msgName, $options, $messageOptions);
1201
    }
1202
1203
    /**
1204
     * DocIssuance_IssueCombined
1205
     *
1206
     * @param RequestOptions\DocIssuanceIssueCombinedOptions $options
1207
     * @param array $messageOptions (OPTIONAL)
1208
     * @return Result
1209
     * @throws Client\InvalidMessageException
1210
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1211
     * @throws Exception
1212
     */
1213 8
    public function docIssuanceIssueCombined(
1214
        RequestOptions\DocIssuanceIssueCombinedOptions $options,
1215
        $messageOptions = []
1216
    ) {
1217 8
        $msgName = 'DocIssuance_IssueCombined';
1218
1219 8
        return $this->callMessage($msgName, $options, $messageOptions);
1220
    }
1221
1222
    /**
1223
     * DocRefund_InitRefund
1224
     *
1225
     * @param RequestOptions\DocRefundInitRefundOptions $options
1226
     * @param array $messageOptions (OPTIONAL)
1227
     * @return Result
1228
     * @throws Client\InvalidMessageException
1229
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1230
     * @throws Exception
1231
     */
1232 4
    public function docRefundInitRefund(
1233
        RequestOptions\DocRefundInitRefundOptions $options,
1234
        $messageOptions = []
1235
    ) {
1236 4
        $msgName = 'DocRefund_InitRefund';
1237
1238 4
        return $this->callMessage($msgName, $options, $messageOptions);
1239
    }
1240
1241
    /**
1242
     * DocRefund_IgnoreRefund
1243
     *
1244
     * @param RequestOptions\DocRefundIgnoreRefundOptions $options
1245
     * @param array $messageOptions (OPTIONAL)
1246
     * @return Result
1247
     * @throws Client\InvalidMessageException
1248
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1249
     * @throws Exception
1250
     */
1251 4
    public function docRefundIgnoreRefund(
1252
        RequestOptions\DocRefundIgnoreRefundOptions $options,
1253
        $messageOptions = []
1254
    ) {
1255 4
        $msgName = 'DocRefund_IgnoreRefund';
1256
1257 4
        return $this->callMessage($msgName, $options, $messageOptions);
1258
    }
1259
1260
    /**
1261
     * DocRefund_UpdateRefund
1262
     *
1263
     * @param RequestOptions\DocRefundUpdateRefundOptions $options
1264
     * @param array $messageOptions (OPTIONAL)
1265
     * @return Result
1266
     * @throws Client\InvalidMessageException
1267
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1268
     * @throws Exception
1269
     */
1270 4
    public function docRefundUpdateRefund(
1271
        RequestOptions\DocRefundUpdateRefundOptions $options,
1272
        $messageOptions = []
1273
    ) {
1274 4
        $msgName = 'DocRefund_UpdateRefund';
1275
1276 4
        return $this->callMessage($msgName, $options, $messageOptions);
1277
    }
1278
1279
    /**
1280
     * DocRefund_ProcessRefund
1281
     *
1282
     * @param RequestOptions\DocRefundProcessRefundOptions $options
1283
     * @param array $messageOptions (OPTIONAL)
1284
     * @return Result
1285
     * @throws Client\InvalidMessageException
1286
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1287
     * @throws Exception
1288
     */
1289 4
    public function docRefundProcessRefund(
1290
        RequestOptions\DocRefundProcessRefundOptions $options,
1291
        $messageOptions = []
1292
    ) {
1293 4
        $msgName = 'DocRefund_ProcessRefund';
1294
1295 4
        return $this->callMessage($msgName, $options, $messageOptions);
1296
    }
1297
    /**
1298
     * Ticket_InitRefund
1299
     *
1300
     * @param RequestOptions\TicketInitRefundOptions $options
1301
     * @param array $messageOptions (OPTIONAL)
1302
     * @return Result
1303
     * @throws Client\InvalidMessageException
1304
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1305
     * @throws Exception
1306
     */
1307 4
    public function ticketInitRefund(
1308
        RequestOptions\TicketInitRefundOptions $options,
1309
        $messageOptions = []
1310
    ) {
1311 4
        $msgName = 'Ticket_InitRefund';
1312
1313 4
        return $this->callMessage($msgName, $options, $messageOptions);
1314
    }
1315
    /**
1316
     * Ticket_IgnoreRefund
1317
     *
1318
     * @param RequestOptions\TicketIgnoreRefundOptions $options
1319
     * @param array $messageOptions (OPTIONAL)
1320
     * @return Result
1321
     * @throws Client\InvalidMessageException
1322
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1323
     * @throws Exception
1324
     */
1325 4
    public function ticketIgnoreRefund(
1326
        RequestOptions\TicketIgnoreRefundOptions $options,
1327
        $messageOptions = []
1328
    ) {
1329 4
        $msgName = 'Ticket_IgnoreRefund';
1330
1331 4
        return $this->callMessage($msgName, $options, $messageOptions);
1332
    }
1333
    /**
1334
     * Ticket_ProcessRefund
1335
     *
1336
     * @param RequestOptions\TicketProcessRefundOptions $options
1337
     * @param array $messageOptions (OPTIONAL)
1338
     * @return Result
1339
     * @throws Client\InvalidMessageException
1340
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1341
     * @throws Exception
1342
     */
1343 4
    public function ticketProcessRefund(
1344
        RequestOptions\TicketProcessRefundOptions $options,
1345
        $messageOptions = []
1346
    ) {
1347 4
        $msgName = 'Ticket_ProcessRefund';
1348
1349 4
        return $this->callMessage($msgName, $options, $messageOptions);
1350
    }
1351
1352
    
1353
    /**
1354
     * FOP_CreateFormOfPayment
1355
     *
1356
     * @param RequestOptions\FopCreateFopOptions $options
1357
     * @param array $messageOptions (OPTIONAL)
1358
     * @return Result
1359
     * @throws Client\InvalidMessageException
1360
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1361
     * @throws Exception
1362
     */
1363 4
    public function fopCreateFormOfPayment(RequestOptions\FopCreateFopOptions $options, $messageOptions = [])
1364
    {
1365 4
        $msgName = 'FOP_CreateFormOfPayment';
1366
1367 4
        return $this->callMessage($msgName, $options, $messageOptions);
1368
    }
1369
1370
1371
    /**
1372
     * FOP_CreateFormOfPayment
1373
     *
1374
     * @param RequestOptions\FopValidateFopOptions $options
1375
     * @param array $messageOptions (OPTIONAL)
1376
     * @return Result
1377
     * @throws Client\InvalidMessageException
1378
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1379
     * @throws Exception
1380
     */
1381 4
    public function fopValidateFOP(RequestOptions\FopValidateFopOptions $options, $messageOptions = [])
1382
    {
1383 4
        $msgName = 'FOP_ValidateFOP';
1384
1385 4
        return $this->callMessage($msgName, $options, $messageOptions);
1386
    }
1387
1388
    /**
1389
     * PriceXplorer_ExtremeSearch
1390
     *
1391
     * @param RequestOptions\PriceXplorerExtremeSearchOptions $options
1392
     * @param array $messageOptions (OPTIONAL)
1393
     * @return Result
1394
     * @throws Client\InvalidMessageException
1395
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1396
     * @throws Exception
1397
     */
1398 4
    public function priceXplorerExtremeSearch(
1399
        RequestOptions\PriceXplorerExtremeSearchOptions $options,
1400
        $messageOptions = []
1401
    ) {
1402 4
        $msgName = 'PriceXplorer_ExtremeSearch';
1403
1404 4
        return $this->callMessage($msgName, $options, $messageOptions);
1405
    }
1406
1407
    /**
1408
     * SalesReports_DisplayQueryReport
1409
     *
1410
     * @param RequestOptions\SalesReportsDisplayQueryReportOptions $options
1411
     * @param array $messageOptions (OPTIONAL)
1412
     * @return Result
1413
     * @throws Client\InvalidMessageException
1414
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1415
     * @throws Exception
1416
     */
1417 4
    public function salesReportsDisplayQueryReport(
1418
        RequestOptions\SalesReportsDisplayQueryReportOptions $options,
1419
        $messageOptions = []
1420
    ) {
1421 4
        $msgName = 'SalesReports_DisplayQueryReport';
1422
1423 4
        return $this->callMessage($msgName, $options, $messageOptions);
1424
    }
1425
1426
    /**
1427
     * Service_IntegratedPricing
1428
     *
1429
     * @param RequestOptions\ServiceIntegratedPricingOptions $options
1430
     * @param array $messageOptions (OPTIONAL)
1431
     * @return Result
1432
     * @throws Client\InvalidMessageException
1433
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1434
     * @throws Exception
1435
     */
1436 4
    public function serviceIntegratedPricing(
1437
        RequestOptions\ServiceIntegratedPricingOptions $options,
1438
        $messageOptions = []
1439
    ) {
1440 4
        $msgName = 'Service_IntegratedPricing';
1441
1442 4
        return $this->callMessage($msgName, $options, $messageOptions);
1443
    }
1444
1445
    /**
1446
     * Service_IntegratedCatalogue
1447
     *
1448
     * @param RequestOptions\ServiceIntegratedCatalogueOptions $options
1449
     * @param array $messageOptions (OPTIONAL)
1450
     * @return Result
1451
     * @throws Client\InvalidMessageException
1452
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1453
     * @throws Exception
1454
     */
1455 4
    public function serviceIntegratedCatalogue(
1456
        RequestOptions\ServiceIntegratedCatalogueOptions $options,
1457
        $messageOptions = []
1458
    ) {
1459 4
        $msgName = 'Service_IntegratedCatalogue';
1460
1461 4
        return $this->callMessage($msgName, $options, $messageOptions);
1462
    }
1463
1464
    /**
1465
     * Call a message with the given parameters
1466
     *
1467
     * @param string $messageName
1468
     * @param RequestOptions\RequestOptionsInterface $options
1469
     * @param array $messageOptions
1470
     * @param bool $endSession
1471
     * @return Result
1472
     * @throws Client\Exception
1473
     * @throws Client\Struct\InvalidArgumentException
1474
     * @throws Client\InvalidMessageException
1475
     * @throws Client\RequestCreator\MessageVersionUnsupportedException
1476
     * @throws \RuntimeException
1477
     * @throws \InvalidArgumentException
1478
     */
1479 308
    protected function callMessage($messageName, $options, $messageOptions, $endSession = false)
1480
    {
1481 308
        $messageOptions = $this->makeMessageOptions($messageOptions, $endSession);
1482
1483 308
        $this->lastMessage = $messageName;
1484
1485 308
        $sendResult = $this->sessionHandler->sendMessage(
1486 308
            $messageName,
1487 308
            $this->requestCreator->createRequest(
1488 308
                $messageName,
1489 154
                $options
1490 154
            ),
1491 154
            $messageOptions
1492 154
        );
1493
1494 308
        $response = $this->responseHandler->analyzeResponse(
1495 308
            $sendResult,
1496 154
            $messageName
1497 154
        );
1498
1499 308
        if ($messageOptions['returnXml'] === false) {
1500 4
            $response->responseXml = null;
1501 2
        }
1502
1503 308
        return $response;
1504
    }
1505
1506
    /**
1507
     * Make message options
1508
     *
1509
     * Message options are meta options when sending a message to the amadeus web services
1510
     * - 'endSession' (if stateful) : should we end the current session after sending this call?
1511
     * - 'returnXml' : Should we return the XML string in the Result::responseXml property?
1512
     *   (this overrides the default setting returnXml in the Amadeus\Client\Params for a single message)
1513
     *
1514
     * @param array $incoming The Message options chosen by the caller - if any.
1515
     * @param bool $endSession Switch if you want to terminate the current session after making the call.
1516
     * @return array
1517
     */
1518 332
    protected function makeMessageOptions(array $incoming, $endSession = false)
1519
    {
1520
        $options = [
1521 332
            'endSession' => $endSession,
1522 332
            'returnXml' => $this->returnResultXml
1523 166
        ];
1524
1525 332
        if (array_key_exists('endSession', $incoming)) {
1526 4
            $options['endSession'] = $incoming['endSession'];
1527 2
        }
1528
1529 332
        if (array_key_exists('returnXml', $incoming)) {
1530 12
            $options['returnXml'] = $incoming['returnXml'];
1531 6
        }
1532
1533 332
        return $options;
1534
    }
1535
}
1536