Passed
Pull Request — master (#481)
by Artem
03:28
created

Client   F

Complexity

Total Complexity 107

Size/Duplication

Total Lines 1891
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 107
eloc 233
c 3
b 0
f 0
dl 0
loc 1891
ccs 306
cts 306
cp 1
rs 2

104 Methods

Rating   Name   Duplication   Size   Complexity  
A ticketDisplayTSMP() 0 5 1
A pnrCreatePnr() 0 5 1
A ticketInitRefund() 0 7 1
A priceXplorerExtremeSearch() 0 7 1
A callMessage() 0 25 2
A ticketProcessEDoc() 0 5 1
A fareGetFareFamilyDescription() 0 7 1
A queueMoveItem() 0 5 1
A offerConfirmHotel() 0 5 1
A fareMasterPricerTravelBoardSearch() 0 7 1
A queueList() 0 5 1
A ticketAtcShopperMasterPricerCalendar() 0 7 1
A fopValidateFOP() 0 5 1
A serviceIntegratedPricing() 0 7 1
A salesReportsDisplayNetRemitReport() 0 7 1
A pointOfRefSearch() 0 5 1
A queueRemoveItem() 0 5 1
A offerCreate() 0 5 1
A setStateful() 0 3 1
A miniRuleGetFromPricingRec() 0 7 1
A infoEncodeDecodeCity() 0 5 1
A fareInformativeBestPricingWithoutPnr() 0 7 1
A docIssuanceIssueTicket() 0 7 1
A salesReportsDisplayDailyOrSummarizedReport() 0 7 1
A miniRuleGetFromETicket() 0 7 1
A airSellFromRecommendation() 0 7 1
A getLastResponseHeaders() 0 3 1
A pnrTransferOwnership() 0 5 1
A offerConfirmCar() 0 5 1
A pnrRetrieveAndDisplay() 0 5 1
A offerConfirmAir() 0 5 1
A miniRuleGetFromRec() 0 5 1
A ticketCreateTSMFromPricing() 0 7 1
A ticketProcessETicket() 0 5 1
A docRefundIgnoreRefund() 0 7 1
A farePricePnrWithLowestFare() 0 7 1
A ticketDisplayTST() 0 5 1
A offerVerify() 0 5 1
A serviceIntegratedCatalogue() 0 7 1
A makeMessageOptions() 0 16 3
A pnrDisplayHistory() 0 5 1
A commandCryptic() 0 5 1
A docIssuanceIssueMiscellaneousDocuments() 0 7 1
A travelOrderCancel() 0 5 1
A ticketProcessRefund() 0 7 1
A ticketCreateTSMFareElement() 0 7 1
A fareMasterPricerCalendar() 0 7 1
A getLastRequest() 0 3 1
A ticketRepricePnrWithBookingClass() 0 7 1
A isStateful() 0 3 1
A ticketAtcShopperMasterPricerTravelBoardSearch() 0 7 1
A airFlightInfo() 0 5 1
A getSessionData() 0 3 1
A __construct() 0 6 1
A fopCreateFormOfPayment() 0 5 1
A getConsumerId() 0 3 1
A pnrSplit() 0 7 1
A docIssuanceIssueCombined() 0 7 1
A queuePlacePnr() 0 5 1
A securityAuthenticate() 0 11 1
A pnrChangeElement() 0 5 1
A farePricePnrWithLowerFares() 0 7 1
A airMultiAvailability() 0 7 1
A ticketUpdateRefund() 0 7 1
A ticketCreateTASF() 0 7 1
A getLastResponse() 0 3 1
A setConsumerId() 0 4 1
A travelOrderPay() 0 5 1
A pnrAddMultiElements() 0 5 1
A fareMasterPricerExpertSearch() 0 7 1
A miniRuleGetFromPricing() 0 7 1
A ticketIgnoreRefund() 0 7 1
A ticketReissueConfirmedPricing() 0 7 1
A farePriceUpsellWithoutPnr() 0 7 1
A ticketDisplayTSMFareElement() 0 7 1
A fareInformativePricingWithoutPnr() 0 7 1
A travelOfferPrice() 0 5 1
A fareGetFareRules() 0 5 1
A airRebookAirSegment() 0 5 1
A airRetrieveSeatMap() 0 5 1
A docRefundUpdateRefund() 0 7 1
A pnrRetrieve() 0 5 1
A securitySignOut() 0 9 1
A ticketDeleteTSMP() 0 5 1
A ticketDeleteTST() 0 5 1
A getLastRequestHeaders() 0 3 1
A pnrIgnore() 0 5 1
A travelOrderCreate() 0 5 1
A pnrNameChange() 0 5 1
A ticketCancelDocument() 0 7 1
A setSessionData() 0 3 1
A docRefundProcessRefund() 0 7 1
A fareConvertCurrency() 0 5 1
A salesReportsDisplayQueryReport() 0 7 1
A farePricePnrWithBookingClass() 0 7 1
A travelOrderRetrieve() 0 5 1
A ticketRetrieveListOfTSM() 0 7 1
A serviceStandaloneCatalogue() 0 5 1
A ticketCheckEligibility() 0 7 1
A pnrCancel() 0 5 1
A docRefundInitRefund() 0 7 1
A fareCheckRules() 0 5 1
A serviceBookPriceService() 0 7 1
A ticketCreateTSTFromPricing() 0 7 1

How to fix   Complexity   

Complex Class

Complex classes like Client often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use Client, and based on these observations, apply Extract Interface, too.

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