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.4.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 | 79 | 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_ConvertCurrency |
||
| 591 | * |
||
| 592 | * @param RequestOptions\FareConvertCurrencyOptions $options |
||
| 593 | * @param array $messageOptions (OPTIONAL) |
||
| 594 | * @return Result |
||
| 595 | */ |
||
| 596 | 1 | public function fareConvertCurrency(RequestOptions\FareConvertCurrencyOptions $options, $messageOptions = []) |
|
| 602 | |||
| 603 | /** |
||
| 604 | * Air_MultiAvailability |
||
| 605 | * |
||
| 606 | * @param RequestOptions\AirMultiAvailabilityOptions $options |
||
| 607 | * @param array $messageOptions (OPTIONAL) |
||
| 608 | * @return Result |
||
| 609 | */ |
||
| 610 | 1 | public function airMultiAvailability( |
|
| 618 | |||
| 619 | /** |
||
| 620 | * Air_SellFromRecommendation |
||
| 621 | * |
||
| 622 | * @param RequestOptions\AirSellFromRecommendationOptions $options |
||
| 623 | * @param array $messageOptions (OPTIONAL) |
||
| 624 | * @return Result |
||
| 625 | */ |
||
| 626 | 1 | public function airSellFromRecommendation( |
|
| 634 | |||
| 635 | /** |
||
| 636 | * Air_FlightInfo |
||
| 637 | * |
||
| 638 | * @param RequestOptions\AirFlightInfoOptions $options |
||
| 639 | * @param array $messageOptions (OPTIONAL) |
||
| 640 | * @return Result |
||
| 641 | */ |
||
| 642 | 1 | public function airFlightInfo(RequestOptions\AirFlightInfoOptions $options, $messageOptions = []) |
|
| 648 | |||
| 649 | /** |
||
| 650 | * Air_RetrieveSeatMap |
||
| 651 | * |
||
| 652 | * @param RequestOptions\AirRetrieveSeatMapOptions $options |
||
| 653 | * @param array $messageOptions (OPTIONAL) |
||
| 654 | * @return Result |
||
| 655 | */ |
||
| 656 | 1 | public function airRetrieveSeatMap(RequestOptions\AirRetrieveSeatMapOptions $options, $messageOptions = []) |
|
| 662 | |||
| 663 | /** |
||
| 664 | * Command_Cryptic |
||
| 665 | * |
||
| 666 | * @param RequestOptions\CommandCrypticOptions $options |
||
| 667 | * @param array $messageOptions (OPTIONAL) |
||
| 668 | * @return Result |
||
| 669 | */ |
||
| 670 | 1 | public function commandCryptic(RequestOptions\CommandCrypticOptions $options, $messageOptions = []) |
|
| 676 | |||
| 677 | /** |
||
| 678 | * MiniRule_GetFromPricingRec |
||
| 679 | * |
||
| 680 | * @param RequestOptions\MiniRuleGetFromPricingRecOptions $options |
||
| 681 | * @param array $messageOptions (OPTIONAL) |
||
| 682 | * @return Result |
||
| 683 | */ |
||
| 684 | 1 | public function miniRuleGetFromPricingRec( |
|
| 692 | |||
| 693 | /** |
||
| 694 | * MiniRule_GetFromPricing |
||
| 695 | * |
||
| 696 | * @param RequestOptions\MiniRuleGetFromPricingOptions $options |
||
| 697 | * @param array $messageOptions (OPTIONAL) |
||
| 698 | * @return Result |
||
| 699 | */ |
||
| 700 | 1 | public function miniRuleGetFromPricing( |
|
| 708 | |||
| 709 | /** |
||
| 710 | * Info_EncodeDecodeCity |
||
| 711 | * |
||
| 712 | * @param RequestOptions\InfoEncodeDecodeCityOptions $options |
||
| 713 | * @param array $messageOptions (OPTIONAL) |
||
| 714 | * @return Result |
||
| 715 | */ |
||
| 716 | 1 | public function infoEncodeDecodeCity(RequestOptions\InfoEncodeDecodeCityOptions $options, $messageOptions = []) |
|
| 722 | |||
| 723 | /** |
||
| 724 | * PointOfRef_Search |
||
| 725 | * |
||
| 726 | * @param RequestOptions\PointOfRefSearchOptions $options |
||
| 727 | * @param array $messageOptions (OPTIONAL) |
||
| 728 | * @return Result |
||
| 729 | */ |
||
| 730 | 1 | public function pointOfRefSearch(RequestOptions\PointOfRefSearchOptions $options, $messageOptions = []) |
|
| 736 | |||
| 737 | |||
| 738 | /** |
||
| 739 | * Ticket_CreateTSTFromPricing |
||
| 740 | * |
||
| 741 | * @param RequestOptions\TicketCreateTstFromPricingOptions $options |
||
| 742 | * @param array $messageOptions (OPTIONAL) |
||
| 743 | * @return Result |
||
| 744 | */ |
||
| 745 | 1 | public function ticketCreateTSTFromPricing( |
|
| 753 | |||
| 754 | /** |
||
| 755 | * Ticket_CreateTSMFromPricing |
||
| 756 | * |
||
| 757 | * @param RequestOptions\TicketCreateTsmFromPricingOptions $options |
||
| 758 | * @param array $messageOptions (OPTIONAL) |
||
| 759 | * @return Result |
||
| 760 | */ |
||
| 761 | 1 | public function ticketCreateTSMFromPricing( |
|
| 769 | |||
| 770 | /** |
||
| 771 | * Ticket_CreateTSMFareElement |
||
| 772 | * |
||
| 773 | * @param RequestOptions\TicketCreateTsmFareElOptions $options |
||
| 774 | * @param array $messageOptions (OPTIONAL) |
||
| 775 | * @return Result |
||
| 776 | */ |
||
| 777 | 1 | public function ticketCreateTSMFareElement( |
|
| 785 | |||
| 786 | /** |
||
| 787 | * Ticket_DeleteTST |
||
| 788 | * |
||
| 789 | * @param RequestOptions\TicketDeleteTstOptions $options |
||
| 790 | * @param array $messageOptions (OPTIONAL) |
||
| 791 | * @return Result |
||
| 792 | */ |
||
| 793 | 1 | public function ticketDeleteTST(RequestOptions\TicketDeleteTstOptions $options, $messageOptions = []) |
|
| 799 | |||
| 800 | /** |
||
| 801 | * Ticket_DeleteTSMP |
||
| 802 | * |
||
| 803 | * @param RequestOptions\TicketDeleteTsmpOptions $options |
||
| 804 | * @param array $messageOptions (OPTIONAL) |
||
| 805 | * @return Result |
||
| 806 | */ |
||
| 807 | 1 | public function ticketDeleteTSMP(RequestOptions\TicketDeleteTsmpOptions $options, $messageOptions = []) |
|
| 813 | |||
| 814 | /** |
||
| 815 | * Ticket_DisplayTST |
||
| 816 | * |
||
| 817 | * @param RequestOptions\TicketDisplayTstOptions $options |
||
| 818 | * @param array $messageOptions (OPTIONAL) |
||
| 819 | * @return Result |
||
| 820 | */ |
||
| 821 | 1 | public function ticketDisplayTST(RequestOptions\TicketDisplayTstOptions $options, $messageOptions = []) |
|
| 827 | |||
| 828 | /** |
||
| 829 | * Ticket_DisplayTSMP |
||
| 830 | * |
||
| 831 | * @param RequestOptions\TicketDisplayTsmpOptions $options |
||
| 832 | * @param array $messageOptions (OPTIONAL) |
||
| 833 | * @return Result |
||
| 834 | */ |
||
| 835 | 1 | public function ticketDisplayTSMP(RequestOptions\TicketDisplayTsmpOptions $options, $messageOptions = []) |
|
| 841 | |||
| 842 | /** |
||
| 843 | * Ticket_DisplayTSMFareElement |
||
| 844 | * |
||
| 845 | * @param RequestOptions\TicketDisplayTsmFareElOptions $options |
||
| 846 | * @param array $messageOptions (OPTIONAL) |
||
| 847 | * @return Result |
||
| 848 | */ |
||
| 849 | 1 | public function ticketDisplayTSMFareElement( |
|
| 857 | |||
| 858 | /** |
||
| 859 | * Ticket_CheckEligibility |
||
| 860 | * |
||
| 861 | * @param RequestOptions\TicketCheckEligibilityOptions $options |
||
| 862 | * @param array $messageOptions (OPTIONAL) |
||
| 863 | * @return Result |
||
| 864 | */ |
||
| 865 | 1 | public function ticketCheckEligibility( |
|
| 873 | |||
| 874 | /** |
||
| 875 | * Ticket_ATCShopperMasterPricerTravelBoardSearch |
||
| 876 | * |
||
| 877 | * @param RequestOptions\TicketAtcShopperMpTbSearchOptions $options |
||
| 878 | * @param array $messageOptions (OPTIONAL) |
||
| 879 | * @return Result |
||
| 880 | */ |
||
| 881 | 1 | public function ticketAtcShopperMasterPricerTravelBoardSearch( |
|
| 889 | |||
| 890 | /** |
||
| 891 | * Ticket_RepricePNRWithBookingClass |
||
| 892 | * |
||
| 893 | * @param RequestOptions\TicketRepricePnrWithBookingClassOptions $options |
||
| 894 | * @param array $messageOptions (OPTIONAL) |
||
| 895 | * @return Result |
||
| 896 | */ |
||
| 897 | 1 | public function ticketRepricePnrWithBookingClass( |
|
| 905 | |||
| 906 | /** |
||
| 907 | * Ticket_ReissueConfirmedPricing |
||
| 908 | * |
||
| 909 | * @param RequestOptions\TicketReissueConfirmedPricingOptions $options |
||
| 910 | * @param array $messageOptions (OPTIONAL) |
||
| 911 | * @return Result |
||
| 912 | */ |
||
| 913 | 1 | public function ticketReissueConfirmedPricing( |
|
| 921 | |||
| 922 | /** |
||
| 923 | * DocIssuance_IssueTicket |
||
| 924 | * |
||
| 925 | * @param RequestOptions\DocIssuanceIssueTicketOptions $options |
||
| 926 | * @param array $messageOptions (OPTIONAL) |
||
| 927 | * @return Result |
||
| 928 | */ |
||
| 929 | 1 | public function docIssuanceIssueTicket( |
|
| 937 | |||
| 938 | /** |
||
| 939 | * DocIssuance_IssueMiscellaneousDocuments |
||
| 940 | * |
||
| 941 | * @param RequestOptions\DocIssuanceIssueMiscDocOptions $options |
||
| 942 | * @param array $messageOptions (OPTIONAL) |
||
| 943 | * @return Result |
||
| 944 | */ |
||
| 945 | 1 | public function docIssuanceIssueMiscellaneousDocuments( |
|
| 953 | |||
| 954 | /** |
||
| 955 | * DocIssuance_IssueCombined |
||
| 956 | * |
||
| 957 | * @param RequestOptions\DocIssuanceIssueCombinedOptions $options |
||
| 958 | * @param array $messageOptions (OPTIONAL) |
||
| 959 | * @return Result |
||
| 960 | */ |
||
| 961 | 2 | public function docIssuanceIssueCombined( |
|
| 969 | |||
| 970 | /** |
||
| 971 | * DocRefund_InitRefund |
||
| 972 | * |
||
| 973 | * @param RequestOptions\DocRefundInitRefundOptions $options |
||
| 974 | * @param array $messageOptions (OPTIONAL) |
||
| 975 | * @return Result |
||
| 976 | */ |
||
| 977 | 1 | public function docRefundInitRefund( |
|
| 985 | |||
| 986 | /** |
||
| 987 | * DocRefund_UpdateRefund |
||
| 988 | * |
||
| 989 | * @param RequestOptions\DocRefundUpdateRefundOptions $options |
||
| 990 | * @param array $messageOptions (OPTIONAL) |
||
| 991 | * @return Result |
||
| 992 | */ |
||
| 993 | 1 | public function docRefundUpdateRefund( |
|
| 1001 | |||
| 1002 | /** |
||
| 1003 | * FOP_CreateFormOfPayment |
||
| 1004 | * |
||
| 1005 | * @param RequestOptions\FopCreateFopOptions $options |
||
| 1006 | * @param array $messageOptions (OPTIONAL) |
||
| 1007 | * @return Result |
||
| 1008 | */ |
||
| 1009 | 1 | public function fopCreateFormOfPayment(RequestOptions\FopCreateFopOptions $options, $messageOptions = []) |
|
| 1015 | |||
| 1016 | /** |
||
| 1017 | * PriceXplorer_ExtremeSearch |
||
| 1018 | * |
||
| 1019 | * @param RequestOptions\PriceXplorerExtremeSearchOptions $options |
||
| 1020 | * @param array $messageOptions (OPTIONAL) |
||
| 1021 | * @return Result |
||
| 1022 | */ |
||
| 1023 | 1 | public function priceXplorerExtremeSearch( |
|
| 1031 | |||
| 1032 | /** |
||
| 1033 | * SalesReports_DisplayQueryReport |
||
| 1034 | * |
||
| 1035 | * @param RequestOptions\SalesReportsDisplayQueryReportOptions $options |
||
| 1036 | * @param array $messageOptions (OPTIONAL) |
||
| 1037 | * @return Result |
||
| 1038 | */ |
||
| 1039 | 1 | public function salesReportsDisplayQueryReport( |
|
| 1047 | |||
| 1048 | /** |
||
| 1049 | * Service_IntegratedPricing |
||
| 1050 | * |
||
| 1051 | * @param RequestOptions\ServiceIntegratedPricingOptions $options |
||
| 1052 | * @param array $messageOptions (OPTIONAL) |
||
| 1053 | * @return Result |
||
| 1054 | */ |
||
| 1055 | 1 | public function serviceIntegratedPricing( |
|
| 1063 | |||
| 1064 | /** |
||
| 1065 | * Call a message with the given parameters |
||
| 1066 | * |
||
| 1067 | * @param string $messageName |
||
| 1068 | * @param RequestOptions\RequestOptionsInterface $options |
||
| 1069 | * @param array $messageOptions |
||
| 1070 | * @param bool $endSession |
||
| 1071 | * @return Result |
||
| 1072 | * @throws Client\Exception |
||
| 1073 | * @throws Client\Struct\InvalidArgumentException |
||
| 1074 | * @throws Client\InvalidMessageException |
||
| 1075 | * @throws Client\RequestCreator\MessageVersionUnsupportedException |
||
| 1076 | * @throws \RuntimeException |
||
| 1077 | * @throws \InvalidArgumentException |
||
| 1078 | * @throws \SoapFault |
||
| 1079 | */ |
||
| 1080 | 64 | protected function callMessage($messageName, $options, $messageOptions, $endSession = false) |
|
| 1106 | |||
| 1107 | /** |
||
| 1108 | * Make message options |
||
| 1109 | * |
||
| 1110 | * Message options are meta options when sending a message to the amadeus web services |
||
| 1111 | * - 'endSession' (if stateful) : should we end the current session after sending this call? |
||
| 1112 | * - 'returnXml' : Should we return the XML string in the Result::responseXml property? |
||
| 1113 | * (this overrides the default setting returnXml in the Amadeus\Client\Params for a single message) |
||
| 1114 | * |
||
| 1115 | * @param array $incoming The Message options chosen by the caller - if any. |
||
| 1116 | * @param bool $endSession Switch if you want to terminate the current session after making the call. |
||
| 1117 | * @return array |
||
| 1118 | */ |
||
| 1119 | 70 | protected function makeMessageOptions(array $incoming, $endSession = false) |
|
| 1136 | } |
||
| 1137 |