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. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
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 |
||
| 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.6.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 | 1 | public function setStateful($newStateful) |
|
| 83 | |||
| 84 | /** |
||
| 85 | * @return bool |
||
| 86 | */ |
||
| 87 | 3 | public function isStateful() |
|
| 91 | |||
| 92 | /** |
||
| 93 | * Get the last raw XML message that was sent out |
||
| 94 | * |
||
| 95 | * @return string|null |
||
| 96 | */ |
||
| 97 | 1 | public function getLastRequest() |
|
| 101 | |||
| 102 | /** |
||
| 103 | * Get the last raw XML message that was received |
||
| 104 | * |
||
| 105 | * @return string|null |
||
| 106 | */ |
||
| 107 | 1 | public function getLastResponse() |
|
| 111 | |||
| 112 | /** |
||
| 113 | * Get the request headers for the last SOAP message that was sent out |
||
| 114 | * |
||
| 115 | * @return string|null |
||
| 116 | */ |
||
| 117 | 1 | public function getLastRequestHeaders() |
|
| 121 | |||
| 122 | /** |
||
| 123 | * Get the response headers for the last SOAP message that was received |
||
| 124 | * |
||
| 125 | * @return string|null |
||
| 126 | */ |
||
| 127 | 1 | public function getLastResponseHeaders() |
|
| 131 | |||
| 132 | /** |
||
| 133 | * Get session information for authenticated session |
||
| 134 | * |
||
| 135 | * - sessionId |
||
| 136 | * - sequenceNr |
||
| 137 | * - securityToken |
||
| 138 | * |
||
| 139 | * @return array|null |
||
| 140 | */ |
||
| 141 | 1 | public function getSessionData() |
|
| 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 | 1 | public function setSessionData(array $sessionData) |
|
| 158 | |||
| 159 | /** |
||
| 160 | * Construct Amadeus Web Services client |
||
| 161 | * |
||
| 162 | * @param Params $params |
||
| 163 | */ |
||
| 164 | 85 | public function __construct(Params $params) |
|
| 172 | |||
| 173 | /** |
||
| 174 | * Authenticate. |
||
| 175 | * |
||
| 176 | * Authentication Parameters were provided at construction time (authParams) |
||
| 177 | * |
||
| 178 | * @return Result |
||
| 179 | * @throws Exception |
||
| 180 | */ |
||
| 181 | 2 | public function securityAuthenticate() |
|
| 194 | |||
| 195 | /** |
||
| 196 | * Terminate a session - only applicable to non-stateless mode. |
||
| 197 | * |
||
| 198 | * @return Result |
||
| 199 | * @throws Exception |
||
| 200 | */ |
||
| 201 | 1 | public function securitySignOut() |
|
| 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 Exception |
||
| 220 | */ |
||
| 221 | 1 | public function pnrRetrieve(RequestOptions\PnrRetrieveOptions $options, $messageOptions = []) |
|
| 227 | |||
| 228 | /** |
||
| 229 | * Create a PNR using PNR_AddMultiElements |
||
| 230 | * |
||
| 231 | * @param RequestOptions\PnrCreatePnrOptions $options |
||
| 232 | * @param array $messageOptions (OPTIONAL) |
||
| 233 | * @return Result |
||
| 234 | */ |
||
| 235 | 1 | public function pnrCreatePnr(RequestOptions\PnrCreatePnrOptions $options, $messageOptions = []) |
|
| 241 | |||
| 242 | /** |
||
| 243 | * PNR_AddMultiElements - Create a new PNR or update an existing PNR. |
||
| 244 | * |
||
| 245 | * https://webservices.amadeus.com/extranet/viewService.do?id=25&flavourId=1&menuId=functional |
||
| 246 | * |
||
| 247 | * @param RequestOptions\PnrAddMultiElementsOptions $options |
||
| 248 | * @param array $messageOptions (OPTIONAL) |
||
| 249 | * @return Result |
||
| 250 | */ |
||
| 251 | 2 | public function pnrAddMultiElements(RequestOptions\PnrAddMultiElementsOptions $options, $messageOptions = []) |
|
| 257 | |||
| 258 | /** |
||
| 259 | * PNR_RetrieveAndDisplay - Retrieve an Amadeus PNR by record locator including extra info |
||
| 260 | * |
||
| 261 | * This extra info is info you cannot see in the regular PNR, like Offers. |
||
| 262 | * |
||
| 263 | * https://webservices.amadeus.com/extranet/viewService.do?id=1922&flavourId=1&menuId=functional |
||
| 264 | * |
||
| 265 | * @param RequestOptions\PnrRetrieveAndDisplayOptions $options Amadeus Record Locator for PNR |
||
| 266 | * @param array $messageOptions (OPTIONAL) |
||
| 267 | * @return Result |
||
| 268 | * @throws Exception |
||
| 269 | **/ |
||
| 270 | 1 | public function pnrRetrieveAndDisplay(RequestOptions\PnrRetrieveAndDisplayOptions $options, $messageOptions = []) |
|
| 276 | |||
| 277 | /** |
||
| 278 | * PNR_Cancel |
||
| 279 | * |
||
| 280 | * @param RequestOptions\PnrCancelOptions $options |
||
| 281 | * @param array $messageOptions (OPTIONAL) |
||
| 282 | * @return Result |
||
| 283 | */ |
||
| 284 | 1 | public function pnrCancel(RequestOptions\PnrCancelOptions $options, $messageOptions = []) |
|
| 290 | |||
| 291 | /** |
||
| 292 | * PNR_DisplayHistory |
||
| 293 | * |
||
| 294 | * @param RequestOptions\PnrDisplayHistoryOptions $options |
||
| 295 | * @param array $messageOptions (OPTIONAL) |
||
| 296 | * @return Result |
||
| 297 | */ |
||
| 298 | 1 | public function pnrDisplayHistory(RequestOptions\PnrDisplayHistoryOptions $options, $messageOptions = []) |
|
| 304 | |||
| 305 | /** |
||
| 306 | * PNR_TransferOwnership |
||
| 307 | * |
||
| 308 | * @param RequestOptions\PnrTransferOwnershipOptions $options |
||
| 309 | * @param array $messageOptions (OPTIONAL) |
||
| 310 | * @return Result |
||
| 311 | */ |
||
| 312 | 1 | public function pnrTransferOwnership(RequestOptions\PnrTransferOwnershipOptions $options, $messageOptions = []) |
|
| 318 | |||
| 319 | /** |
||
| 320 | * PNR_NameChange |
||
| 321 | * |
||
| 322 | * @param RequestOptions\PnrNameChangeOptions $options |
||
| 323 | * @param array $messageOptions (OPTIONAL) |
||
| 324 | * @return Result |
||
| 325 | */ |
||
| 326 | 1 | public function pnrNameChange(RequestOptions\PnrNameChangeOptions $options, $messageOptions = []) |
|
| 332 | |||
| 333 | /** |
||
| 334 | * Queue_List - get a list of all PNR's on a given queue |
||
| 335 | * |
||
| 336 | * https://webservices.amadeus.com/extranet/viewService.do?id=52&flavourId=1&menuId=functional |
||
| 337 | * |
||
| 338 | * @param RequestOptions\QueueListOptions $options |
||
| 339 | * @param array $messageOptions (OPTIONAL) |
||
| 340 | * @return Result |
||
| 341 | */ |
||
| 342 | 1 | public function queueList(RequestOptions\QueueListOptions $options, $messageOptions = []) |
|
| 348 | |||
| 349 | /** |
||
| 350 | * Queue_PlacePNR - Place a PNR on a given queue |
||
| 351 | * |
||
| 352 | * @param RequestOptions\QueuePlacePnrOptions $options |
||
| 353 | * @param array $messageOptions (OPTIONAL) |
||
| 354 | * @return Result |
||
| 355 | */ |
||
| 356 | 1 | public function queuePlacePnr(RequestOptions\QueuePlacePnrOptions $options, $messageOptions = []) |
|
| 362 | |||
| 363 | /** |
||
| 364 | * Queue_RemoveItem - remove an item (a PNR) from a given queue |
||
| 365 | * |
||
| 366 | * @param RequestOptions\QueueRemoveItemOptions $options |
||
| 367 | * @param array $messageOptions (OPTIONAL) |
||
| 368 | * @return Result |
||
| 369 | */ |
||
| 370 | 1 | public function queueRemoveItem(RequestOptions\QueueRemoveItemOptions $options, $messageOptions = []) |
|
| 376 | |||
| 377 | /** |
||
| 378 | * Queue_MoveItem - move an item (a PNR) from one queue to another. |
||
| 379 | * |
||
| 380 | * @param RequestOptions\QueueMoveItemOptions $options |
||
| 381 | * @param array $messageOptions (OPTIONAL) |
||
| 382 | * @return Result |
||
| 383 | */ |
||
| 384 | 1 | public function queueMoveItem(RequestOptions\QueueMoveItemOptions $options, $messageOptions = []) |
|
| 390 | |||
| 391 | /** |
||
| 392 | * Offer_CreateOffer |
||
| 393 | * |
||
| 394 | * @param RequestOptions\OfferCreateOptions $options |
||
| 395 | * @param array $messageOptions (OPTIONAL) |
||
| 396 | * @return Result |
||
| 397 | */ |
||
| 398 | 1 | public function offerCreate(RequestOptions\OfferCreateOptions $options, $messageOptions = []) |
|
| 404 | |||
| 405 | /** |
||
| 406 | * Offer_VerifyOffer |
||
| 407 | * |
||
| 408 | * To be called in the context of an open PNR |
||
| 409 | * |
||
| 410 | * @param RequestOptions\OfferVerifyOptions $options |
||
| 411 | * @param array $messageOptions (OPTIONAL) |
||
| 412 | * @return Result |
||
| 413 | */ |
||
| 414 | 1 | public function offerVerify(RequestOptions\OfferVerifyOptions $options, $messageOptions = []) |
|
| 420 | |||
| 421 | /** |
||
| 422 | * Offer_ConfirmAirOffer |
||
| 423 | * |
||
| 424 | * @param RequestOptions\OfferConfirmAirOptions $options |
||
| 425 | * @param array $messageOptions (OPTIONAL) |
||
| 426 | * @return Result |
||
| 427 | */ |
||
| 428 | 1 | public function offerConfirmAir(RequestOptions\OfferConfirmAirOptions $options, $messageOptions = []) |
|
| 434 | |||
| 435 | /** |
||
| 436 | * Offer_ConfirmHotelOffer |
||
| 437 | * |
||
| 438 | * @param RequestOptions\OfferConfirmHotelOptions $options |
||
| 439 | * @param array $messageOptions (OPTIONAL) |
||
| 440 | * @return Result |
||
| 441 | */ |
||
| 442 | 1 | public function offerConfirmHotel(RequestOptions\OfferConfirmHotelOptions $options, $messageOptions = []) |
|
| 448 | |||
| 449 | /** |
||
| 450 | * Offer_ConfirmCarOffer |
||
| 451 | * |
||
| 452 | * @param RequestOptions\OfferConfirmCarOptions $options |
||
| 453 | * @param array $messageOptions (OPTIONAL) |
||
| 454 | * @return Result |
||
| 455 | */ |
||
| 456 | 1 | public function offerConfirmCar(RequestOptions\OfferConfirmCarOptions $options, $messageOptions = []) |
|
| 462 | |||
| 463 | /** |
||
| 464 | * Fare_MasterPricerTravelBoardSearch |
||
| 465 | * |
||
| 466 | * @param RequestOptions\FareMasterPricerTbSearch $options |
||
| 467 | * @param array $messageOptions (OPTIONAL) |
||
| 468 | * @return Result |
||
| 469 | */ |
||
| 470 | 1 | public function fareMasterPricerTravelBoardSearch( |
|
| 478 | |||
| 479 | /** |
||
| 480 | * Fare_MasterPricerCalendar |
||
| 481 | * |
||
| 482 | * @param RequestOptions\FareMasterPricerCalendarOptions $options |
||
| 483 | * @param array $messageOptions (OPTIONAL) |
||
| 484 | * @return Result |
||
| 485 | */ |
||
| 486 | 1 | public function fareMasterPricerCalendar( |
|
| 494 | |||
| 495 | /** |
||
| 496 | * Fare_PricePnrWithBookingClass |
||
| 497 | * |
||
| 498 | * @param RequestOptions\FarePricePnrWithBookingClassOptions $options |
||
| 499 | * @param array $messageOptions (OPTIONAL) |
||
| 500 | * @return Result |
||
| 501 | */ |
||
| 502 | 2 | public function farePricePnrWithBookingClass( |
|
| 510 | |||
| 511 | /** |
||
| 512 | * Fare_PricePnrWithLowerFares |
||
| 513 | * |
||
| 514 | * @param RequestOptions\FarePricePnrWithLowerFaresOptions $options |
||
| 515 | * @param array $messageOptions (OPTIONAL) |
||
| 516 | * @return Result |
||
| 517 | */ |
||
| 518 | 2 | public function farePricePnrWithLowerFares( |
|
| 526 | |||
| 527 | /** |
||
| 528 | * Fare_PricePnrWithLowestFare |
||
| 529 | * |
||
| 530 | * @param RequestOptions\FarePricePnrWithLowestFareOptions $options |
||
| 531 | * @param array $messageOptions (OPTIONAL) |
||
| 532 | * @return Result |
||
| 533 | */ |
||
| 534 | 2 | public function farePricePnrWithLowestFare( |
|
| 542 | |||
| 543 | /** |
||
| 544 | * Fare_InformativePricingWithoutPNR |
||
| 545 | * |
||
| 546 | * @param RequestOptions\FareInformativePricingWithoutPnrOptions $options |
||
| 547 | * @param array $messageOptions (OPTIONAL) |
||
| 548 | * @return Result |
||
| 549 | */ |
||
| 550 | 1 | public function fareInformativePricingWithoutPnr( |
|
| 558 | |||
| 559 | /** |
||
| 560 | * Fare_InformativeBestPricingWithoutPNR |
||
| 561 | * |
||
| 562 | * @param RequestOptions\FareInformativeBestPricingWithoutPnrOptions $options |
||
| 563 | * @param array $messageOptions (OPTIONAL) |
||
| 564 | * @return Result |
||
| 565 | */ |
||
| 566 | 1 | public function fareInformativeBestPricingWithoutPnr( |
|
| 574 | |||
| 575 | /** |
||
| 576 | * Fare_CheckRules |
||
| 577 | * |
||
| 578 | * @param RequestOptions\FareCheckRulesOptions $options |
||
| 579 | * @param array $messageOptions (OPTIONAL) |
||
| 580 | * @return Result |
||
| 581 | */ |
||
| 582 | 1 | public function fareCheckRules(RequestOptions\FareCheckRulesOptions $options, $messageOptions = []) |
|
| 588 | |||
| 589 | /** |
||
| 590 | * Fare_GetFareRules |
||
| 591 | * |
||
| 592 | * @param RequestOptions\FareGetFareRulesOptions $options |
||
| 593 | * @param array $messageOptions (OPTIONAL) |
||
| 594 | * @return Result |
||
| 595 | */ |
||
| 596 | 1 | public function fareGetFareRules(RequestOptions\FareGetFareRulesOptions $options, $messageOptions = []) |
|
| 602 | |||
| 603 | /** |
||
| 604 | * Fare_ConvertCurrency |
||
| 605 | * |
||
| 606 | * @param RequestOptions\FareConvertCurrencyOptions $options |
||
| 607 | * @param array $messageOptions (OPTIONAL) |
||
| 608 | * @return Result |
||
| 609 | */ |
||
| 610 | 1 | public function fareConvertCurrency(RequestOptions\FareConvertCurrencyOptions $options, $messageOptions = []) |
|
| 611 | { |
||
| 612 | 1 | $msgName = 'Fare_ConvertCurrency'; |
|
| 613 | |||
| 614 | 1 | return $this->callMessage($msgName, $options, $messageOptions); |
|
| 615 | } |
||
| 616 | |||
| 617 | /** |
||
| 618 | * Air_MultiAvailability |
||
| 619 | * |
||
| 620 | * @param RequestOptions\AirMultiAvailabilityOptions $options |
||
| 621 | * @param array $messageOptions (OPTIONAL) |
||
| 622 | * @return Result |
||
| 623 | */ |
||
| 624 | 1 | public function airMultiAvailability( |
|
| 625 | RequestOptions\AirMultiAvailabilityOptions $options, |
||
| 626 | $messageOptions = [] |
||
| 627 | ) { |
||
| 628 | 1 | $msgName = 'Air_MultiAvailability'; |
|
| 629 | |||
| 630 | 1 | return $this->callMessage($msgName, $options, $messageOptions); |
|
| 631 | } |
||
| 632 | |||
| 633 | /** |
||
| 634 | * Air_SellFromRecommendation |
||
| 635 | * |
||
| 636 | * @param RequestOptions\AirSellFromRecommendationOptions $options |
||
| 637 | * @param array $messageOptions (OPTIONAL) |
||
| 638 | * @return Result |
||
| 639 | */ |
||
| 640 | 1 | public function airSellFromRecommendation( |
|
| 648 | |||
| 649 | /** |
||
| 650 | * Air_FlightInfo |
||
| 651 | * |
||
| 652 | * @param RequestOptions\AirFlightInfoOptions $options |
||
| 653 | * @param array $messageOptions (OPTIONAL) |
||
| 654 | * @return Result |
||
| 655 | */ |
||
| 656 | 1 | public function airFlightInfo(RequestOptions\AirFlightInfoOptions $options, $messageOptions = []) |
|
| 662 | |||
| 663 | /** |
||
| 664 | * Air_RetrieveSeatMap |
||
| 665 | * |
||
| 666 | * @param RequestOptions\AirRetrieveSeatMapOptions $options |
||
| 667 | * @param array $messageOptions (OPTIONAL) |
||
| 668 | * @return Result |
||
| 669 | */ |
||
| 670 | 1 | public function airRetrieveSeatMap(RequestOptions\AirRetrieveSeatMapOptions $options, $messageOptions = []) |
|
| 676 | |||
| 677 | /** |
||
| 678 | * Command_Cryptic |
||
| 679 | * |
||
| 680 | * @param RequestOptions\CommandCrypticOptions $options |
||
| 681 | * @param array $messageOptions (OPTIONAL) |
||
| 682 | * @return Result |
||
| 683 | */ |
||
| 684 | 1 | public function commandCryptic(RequestOptions\CommandCrypticOptions $options, $messageOptions = []) |
|
| 685 | { |
||
| 686 | 1 | $msgName = 'Command_Cryptic'; |
|
| 687 | |||
| 688 | 1 | return $this->callMessage($msgName, $options, $messageOptions); |
|
| 689 | } |
||
| 690 | |||
| 691 | /** |
||
| 692 | * MiniRule_GetFromPricingRec |
||
| 693 | * |
||
| 694 | * @param RequestOptions\MiniRuleGetFromPricingRecOptions $options |
||
| 695 | * @param array $messageOptions (OPTIONAL) |
||
| 696 | * @return Result |
||
| 697 | */ |
||
| 698 | 1 | public function miniRuleGetFromPricingRec( |
|
| 699 | RequestOptions\MiniRuleGetFromPricingRecOptions $options, |
||
| 700 | $messageOptions = [] |
||
| 701 | ) { |
||
| 702 | 1 | $msgName = 'MiniRule_GetFromPricingRec'; |
|
| 703 | |||
| 704 | 1 | return $this->callMessage($msgName, $options, $messageOptions); |
|
| 705 | } |
||
| 706 | |||
| 707 | /** |
||
| 708 | * MiniRule_GetFromPricing |
||
| 709 | * |
||
| 710 | * @param RequestOptions\MiniRuleGetFromPricingOptions $options |
||
| 711 | * @param array $messageOptions (OPTIONAL) |
||
| 712 | * @return Result |
||
| 713 | */ |
||
| 714 | 1 | public function miniRuleGetFromPricing( |
|
| 722 | |||
| 723 | /** |
||
| 724 | * MiniRule_GetFromETicket |
||
| 725 | * |
||
| 726 | * @param RequestOptions\MiniRuleGetFromETicketOptions $options |
||
| 727 | * @param array $messageOptions (OPTIONAL) |
||
| 728 | * @return Result |
||
| 729 | */ |
||
| 730 | 1 | public function miniRuleGetFromETicket( |
|
| 738 | |||
| 739 | /** |
||
| 740 | * Info_EncodeDecodeCity |
||
| 741 | * |
||
| 742 | * @param RequestOptions\InfoEncodeDecodeCityOptions $options |
||
| 743 | * @param array $messageOptions (OPTIONAL) |
||
| 744 | * @return Result |
||
| 745 | */ |
||
| 746 | 1 | public function infoEncodeDecodeCity(RequestOptions\InfoEncodeDecodeCityOptions $options, $messageOptions = []) |
|
| 752 | |||
| 753 | /** |
||
| 754 | * PointOfRef_Search |
||
| 755 | * |
||
| 756 | * @param RequestOptions\PointOfRefSearchOptions $options |
||
| 757 | * @param array $messageOptions (OPTIONAL) |
||
| 758 | * @return Result |
||
| 759 | */ |
||
| 760 | 1 | public function pointOfRefSearch(RequestOptions\PointOfRefSearchOptions $options, $messageOptions = []) |
|
| 766 | |||
| 767 | |||
| 768 | /** |
||
| 769 | * Ticket_CreateTSTFromPricing |
||
| 770 | * |
||
| 771 | * @param RequestOptions\TicketCreateTstFromPricingOptions $options |
||
| 772 | * @param array $messageOptions (OPTIONAL) |
||
| 773 | * @return Result |
||
| 774 | */ |
||
| 775 | 1 | public function ticketCreateTSTFromPricing( |
|
| 783 | |||
| 784 | /** |
||
| 785 | * Ticket_CreateTSMFromPricing |
||
| 786 | * |
||
| 787 | * @param RequestOptions\TicketCreateTsmFromPricingOptions $options |
||
| 788 | * @param array $messageOptions (OPTIONAL) |
||
| 789 | * @return Result |
||
| 790 | */ |
||
| 791 | 1 | public function ticketCreateTSMFromPricing( |
|
| 799 | |||
| 800 | /** |
||
| 801 | * Ticket_CreateTSMFareElement |
||
| 802 | * |
||
| 803 | * @param RequestOptions\TicketCreateTsmFareElOptions $options |
||
| 804 | * @param array $messageOptions (OPTIONAL) |
||
| 805 | * @return Result |
||
| 806 | */ |
||
| 807 | 1 | public function ticketCreateTSMFareElement( |
|
| 815 | |||
| 816 | /** |
||
| 817 | * Ticket_DeleteTST |
||
| 818 | * |
||
| 819 | * @param RequestOptions\TicketDeleteTstOptions $options |
||
| 820 | * @param array $messageOptions (OPTIONAL) |
||
| 821 | * @return Result |
||
| 822 | */ |
||
| 823 | 1 | public function ticketDeleteTST(RequestOptions\TicketDeleteTstOptions $options, $messageOptions = []) |
|
| 829 | |||
| 830 | /** |
||
| 831 | * Ticket_DeleteTSMP |
||
| 832 | * |
||
| 833 | * @param RequestOptions\TicketDeleteTsmpOptions $options |
||
| 834 | * @param array $messageOptions (OPTIONAL) |
||
| 835 | * @return Result |
||
| 836 | */ |
||
| 837 | 1 | public function ticketDeleteTSMP(RequestOptions\TicketDeleteTsmpOptions $options, $messageOptions = []) |
|
| 843 | |||
| 844 | /** |
||
| 845 | * Ticket_DisplayTST |
||
| 846 | * |
||
| 847 | * @param RequestOptions\TicketDisplayTstOptions $options |
||
| 848 | * @param array $messageOptions (OPTIONAL) |
||
| 849 | * @return Result |
||
| 850 | */ |
||
| 851 | 1 | public function ticketDisplayTST(RequestOptions\TicketDisplayTstOptions $options, $messageOptions = []) |
|
| 857 | |||
| 858 | /** |
||
| 859 | * Ticket_DisplayTSMP |
||
| 860 | * |
||
| 861 | * @param RequestOptions\TicketDisplayTsmpOptions $options |
||
| 862 | * @param array $messageOptions (OPTIONAL) |
||
| 863 | * @return Result |
||
| 864 | */ |
||
| 865 | 1 | public function ticketDisplayTSMP(RequestOptions\TicketDisplayTsmpOptions $options, $messageOptions = []) |
|
| 871 | |||
| 872 | /** |
||
| 873 | * Ticket_DisplayTSMFareElement |
||
| 874 | * |
||
| 875 | * @param RequestOptions\TicketDisplayTsmFareElOptions $options |
||
| 876 | * @param array $messageOptions (OPTIONAL) |
||
| 877 | * @return Result |
||
| 878 | */ |
||
| 879 | 1 | public function ticketDisplayTSMFareElement( |
|
| 887 | |||
| 888 | /** |
||
| 889 | * Ticket_CheckEligibility |
||
| 890 | * |
||
| 891 | * @param RequestOptions\TicketCheckEligibilityOptions $options |
||
| 892 | * @param array $messageOptions (OPTIONAL) |
||
| 893 | * @return Result |
||
| 894 | */ |
||
| 895 | 1 | public function ticketCheckEligibility( |
|
| 903 | |||
| 904 | /** |
||
| 905 | * Ticket_ATCShopperMasterPricerTravelBoardSearch |
||
| 906 | * |
||
| 907 | * @param RequestOptions\TicketAtcShopperMpTbSearchOptions $options |
||
| 908 | * @param array $messageOptions (OPTIONAL) |
||
| 909 | * @return Result |
||
| 910 | */ |
||
| 911 | 1 | public function ticketAtcShopperMasterPricerTravelBoardSearch( |
|
| 919 | |||
| 920 | /** |
||
| 921 | * Ticket_RepricePNRWithBookingClass |
||
| 922 | * |
||
| 923 | * @param RequestOptions\TicketRepricePnrWithBookingClassOptions $options |
||
| 924 | * @param array $messageOptions (OPTIONAL) |
||
| 925 | * @return Result |
||
| 926 | */ |
||
| 927 | 1 | public function ticketRepricePnrWithBookingClass( |
|
| 935 | |||
| 936 | /** |
||
| 937 | * Ticket_CancelDocument |
||
| 938 | * |
||
| 939 | * @param RequestOptions\TicketCancelDocumentOptions $options |
||
| 940 | * @param array $messageOptions (OPTIONAL) |
||
| 941 | * @return Result |
||
| 942 | */ |
||
| 943 | 1 | public function ticketCancelDocument( |
|
| 951 | |||
| 952 | /** |
||
| 953 | * Ticket_ReissueConfirmedPricing |
||
| 954 | * |
||
| 955 | * @param RequestOptions\TicketReissueConfirmedPricingOptions $options |
||
| 956 | * @param array $messageOptions (OPTIONAL) |
||
| 957 | * @return Result |
||
| 958 | */ |
||
| 959 | 1 | public function ticketReissueConfirmedPricing( |
|
| 967 | |||
| 968 | /** |
||
| 969 | * Ticket_ProcessEDoc |
||
| 970 | * |
||
| 971 | * @param RequestOptions\ticketProcessEdoc $options |
||
| 972 | * @param array $messageOptions (OPTIONAL) |
||
| 973 | * @return Result |
||
| 974 | */ |
||
| 975 | public function ticketProcessEdoc(RequestOptions\ticketProcessEdoc $options, $messageOptions = []) |
||
| 980 | |||
| 981 | /** |
||
| 982 | * DocIssuance_IssueTicket |
||
| 983 | * |
||
| 984 | * @param RequestOptions\DocIssuanceIssueTicketOptions $options |
||
| 985 | * @param array $messageOptions (OPTIONAL) |
||
| 986 | * @return Result |
||
| 987 | */ |
||
| 988 | 1 | public function docIssuanceIssueTicket( |
|
| 996 | |||
| 997 | /** |
||
| 998 | * DocIssuance_IssueMiscellaneousDocuments |
||
| 999 | * |
||
| 1000 | * @param RequestOptions\DocIssuanceIssueMiscDocOptions $options |
||
| 1001 | * @param array $messageOptions (OPTIONAL) |
||
| 1002 | * @return Result |
||
| 1003 | */ |
||
| 1004 | 1 | public function docIssuanceIssueMiscellaneousDocuments( |
|
| 1012 | |||
| 1013 | /** |
||
| 1014 | * DocIssuance_IssueCombined |
||
| 1015 | * |
||
| 1016 | * @param RequestOptions\DocIssuanceIssueCombinedOptions $options |
||
| 1017 | * @param array $messageOptions (OPTIONAL) |
||
| 1018 | * @return Result |
||
| 1019 | */ |
||
| 1020 | 2 | public function docIssuanceIssueCombined( |
|
| 1028 | |||
| 1029 | /** |
||
| 1030 | * DocRefund_InitRefund |
||
| 1031 | * |
||
| 1032 | * @param RequestOptions\DocRefundInitRefundOptions $options |
||
| 1033 | * @param array $messageOptions (OPTIONAL) |
||
| 1034 | * @return Result |
||
| 1035 | */ |
||
| 1036 | 1 | public function docRefundInitRefund( |
|
| 1044 | |||
| 1045 | /** |
||
| 1046 | * DocRefund_UpdateRefund |
||
| 1047 | * |
||
| 1048 | * @param RequestOptions\DocRefundUpdateRefundOptions $options |
||
| 1049 | * @param array $messageOptions (OPTIONAL) |
||
| 1050 | * @return Result |
||
| 1051 | */ |
||
| 1052 | 1 | public function docRefundUpdateRefund( |
|
| 1060 | |||
| 1061 | /** |
||
| 1062 | * DocRefund_ProcessRefund |
||
| 1063 | * |
||
| 1064 | * @param RequestOptions\DocRefundProcessRefundOptions $options |
||
| 1065 | * @param array $messageOptions (OPTIONAL) |
||
| 1066 | * @return Result |
||
| 1067 | */ |
||
| 1068 | 1 | public function docRefundProcessRefund( |
|
| 1076 | |||
| 1077 | |||
| 1078 | /** |
||
| 1079 | * FOP_CreateFormOfPayment |
||
| 1080 | * |
||
| 1081 | * @param RequestOptions\FopCreateFopOptions $options |
||
| 1082 | * @param array $messageOptions (OPTIONAL) |
||
| 1083 | * @return Result |
||
| 1084 | */ |
||
| 1085 | 1 | public function fopCreateFormOfPayment(RequestOptions\FopCreateFopOptions $options, $messageOptions = []) |
|
| 1091 | |||
| 1092 | |||
| 1093 | /** |
||
| 1094 | * FOP_CreateFormOfPayment |
||
| 1095 | * |
||
| 1096 | * @param RequestOptions\FopValidateFopOptions $options |
||
| 1097 | * @param array $messageOptions (OPTIONAL) |
||
| 1098 | * @return Result |
||
| 1099 | */ |
||
| 1100 | 1 | public function fopValidateFOP(RequestOptions\FopValidateFopOptions $options, $messageOptions = []) |
|
| 1106 | |||
| 1107 | /** |
||
| 1108 | * PriceXplorer_ExtremeSearch |
||
| 1109 | * |
||
| 1110 | * @param RequestOptions\PriceXplorerExtremeSearchOptions $options |
||
| 1111 | * @param array $messageOptions (OPTIONAL) |
||
| 1112 | * @return Result |
||
| 1113 | */ |
||
| 1114 | 1 | public function priceXplorerExtremeSearch( |
|
| 1122 | |||
| 1123 | /** |
||
| 1124 | * SalesReports_DisplayQueryReport |
||
| 1125 | * |
||
| 1126 | * @param RequestOptions\SalesReportsDisplayQueryReportOptions $options |
||
| 1127 | * @param array $messageOptions (OPTIONAL) |
||
| 1128 | * @return Result |
||
| 1129 | */ |
||
| 1130 | 1 | public function salesReportsDisplayQueryReport( |
|
| 1138 | |||
| 1139 | /** |
||
| 1140 | * Service_IntegratedPricing |
||
| 1141 | * |
||
| 1142 | * @param RequestOptions\ServiceIntegratedPricingOptions $options |
||
| 1143 | * @param array $messageOptions (OPTIONAL) |
||
| 1144 | * @return Result |
||
| 1145 | */ |
||
| 1146 | 1 | public function serviceIntegratedPricing( |
|
| 1154 | |||
| 1155 | /** |
||
| 1156 | * Service_IntegratedCatalogue |
||
| 1157 | * |
||
| 1158 | * @param RequestOptions\ServiceIntegratedCatalogueOptions $options |
||
| 1159 | * @param array $messageOptions (OPTIONAL) |
||
| 1160 | * @return Result |
||
| 1161 | */ |
||
| 1162 | 1 | public function serviceIntegratedCatalogue( |
|
| 1170 | |||
| 1171 | /** |
||
| 1172 | * Call a message with the given parameters |
||
| 1173 | * |
||
| 1174 | * @param string $messageName |
||
| 1175 | * @param RequestOptions\RequestOptionsInterface $options |
||
| 1176 | * @param array $messageOptions |
||
| 1177 | * @param bool $endSession |
||
| 1178 | * @return Result |
||
| 1179 | * @throws Client\Exception |
||
| 1180 | * @throws Client\Struct\InvalidArgumentException |
||
| 1181 | * @throws Client\InvalidMessageException |
||
| 1182 | * @throws Client\RequestCreator\MessageVersionUnsupportedException |
||
| 1183 | * @throws \RuntimeException |
||
| 1184 | * @throws \InvalidArgumentException |
||
| 1185 | */ |
||
| 1186 | 70 | protected function callMessage($messageName, $options, $messageOptions, $endSession = false) |
|
| 1212 | |||
| 1213 | /** |
||
| 1214 | * Make message options |
||
| 1215 | * |
||
| 1216 | * Message options are meta options when sending a message to the amadeus web services |
||
| 1217 | * - 'endSession' (if stateful) : should we end the current session after sending this call? |
||
| 1218 | * - 'returnXml' : Should we return the XML string in the Result::responseXml property? |
||
| 1219 | * (this overrides the default setting returnXml in the Amadeus\Client\Params for a single message) |
||
| 1220 | * |
||
| 1221 | * @param array $incoming The Message options chosen by the caller - if any. |
||
| 1222 | * @param bool $endSession Switch if you want to terminate the current session after making the call. |
||
| 1223 | * @return array |
||
| 1224 | */ |
||
| 1225 | 76 | protected function makeMessageOptions(array $incoming, $endSession = false) |
|
| 1242 | } |
||
| 1243 |