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 |
||
45 | class Client |
||
46 | { |
||
47 | /** |
||
48 | * Amadeus SOAP header version 1 |
||
49 | */ |
||
50 | const HEADER_V1 = "1"; |
||
51 | /** |
||
52 | * Amadeus SOAP header version 2 |
||
53 | */ |
||
54 | const HEADER_V2 = "2"; |
||
55 | /** |
||
56 | * Amadeus SOAP header version 4 |
||
57 | */ |
||
58 | const HEADER_V4 = "4"; |
||
59 | |||
60 | /** |
||
61 | * Version string |
||
62 | * |
||
63 | * @var string |
||
64 | */ |
||
65 | const VERSION = "1.2.0-dev"; |
||
66 | |||
67 | /** |
||
68 | * An identifier string for the library (to be used in Received From entries) |
||
69 | * |
||
70 | * @var string |
||
71 | */ |
||
72 | const RECEIVED_FROM_IDENTIFIER = "amabnl-amadeus-ws-client"; |
||
73 | |||
74 | /** |
||
75 | * Session Handler will be sending all the messages and handling all session-related things. |
||
76 | * |
||
77 | * @var HandlerInterface |
||
78 | */ |
||
79 | protected $sessionHandler; |
||
80 | |||
81 | /** |
||
82 | * Request Creator is will create the correct message structure to send to the SOAP server. |
||
83 | * |
||
84 | * @var RequestCreatorInterface |
||
85 | */ |
||
86 | protected $requestCreator; |
||
87 | |||
88 | /** |
||
89 | * Response Handler will check the received response for errors. |
||
90 | * |
||
91 | * @var ResponseHandlerInterface |
||
92 | */ |
||
93 | protected $responseHandler; |
||
94 | |||
95 | /** |
||
96 | * Authentication parameters |
||
97 | * |
||
98 | * @var Params\AuthParams |
||
99 | */ |
||
100 | protected $authParams; |
||
101 | |||
102 | /** |
||
103 | * @var string |
||
104 | */ |
||
105 | protected $lastMessage; |
||
106 | |||
107 | /** |
||
108 | * Whether to return the response of a message as XML as well as PHP object |
||
109 | * |
||
110 | * @var bool |
||
111 | */ |
||
112 | protected $returnResultXml; |
||
113 | |||
114 | /** |
||
115 | * Set the session as stateful (true) or stateless (false) |
||
116 | * |
||
117 | * @param bool $newStateful |
||
118 | */ |
||
119 | 1 | public function setStateful($newStateful) |
|
123 | |||
124 | /** |
||
125 | * @return bool |
||
126 | */ |
||
127 | 3 | public function isStateful() |
|
131 | |||
132 | /** |
||
133 | * Get the last raw XML message that was sent out |
||
134 | * |
||
135 | * @return string|null |
||
136 | */ |
||
137 | 1 | public function getLastRequest() |
|
141 | |||
142 | /** |
||
143 | * Get the last raw XML message that was received |
||
144 | * |
||
145 | * @return string|null |
||
146 | */ |
||
147 | 1 | public function getLastResponse() |
|
151 | |||
152 | /** |
||
153 | * Get session information for authenticated session |
||
154 | * |
||
155 | * - sessionId |
||
156 | * - sequenceNr |
||
157 | * - securityToken |
||
158 | * |
||
159 | * @return array|null |
||
160 | */ |
||
161 | 1 | public function getSessionData() |
|
165 | |||
166 | /** |
||
167 | * Restore a previously used session |
||
168 | * |
||
169 | * To be used when implementing your own session pooling system on legacy Soap Header 2 applications. |
||
170 | * |
||
171 | * @param array $sessionData |
||
172 | * @return bool |
||
173 | */ |
||
174 | 1 | public function setSessionData(array $sessionData) |
|
178 | |||
179 | /** |
||
180 | * Construct Amadeus Web Services client |
||
181 | * |
||
182 | * @param Params $params |
||
183 | */ |
||
184 | 70 | public function __construct($params) |
|
214 | |||
215 | /** |
||
216 | * Authenticate. |
||
217 | * |
||
218 | * Parameters were provided at construction time (sessionhandlerparams) |
||
219 | * |
||
220 | * @return Result |
||
221 | * @throws Exception |
||
222 | */ |
||
223 | 1 | public function securityAuthenticate() |
|
236 | |||
237 | /** |
||
238 | * Terminate a session - only applicable to non-stateless mode. |
||
239 | * |
||
240 | * @return Result |
||
241 | * @throws Exception |
||
242 | */ |
||
243 | 1 | public function securitySignOut() |
|
254 | |||
255 | /** |
||
256 | * PNR_Retrieve - Retrieve an Amadeus PNR by record locator |
||
257 | * |
||
258 | * @param RequestOptions\PnrRetrieveOptions $options |
||
259 | * @param array $messageOptions (OPTIONAL) |
||
260 | * @return Result |
||
261 | * @throws Exception |
||
262 | */ |
||
263 | 1 | public function pnrRetrieve(RequestOptions\PnrRetrieveOptions $options, $messageOptions = []) |
|
269 | |||
270 | /** |
||
271 | * Create a PNR using PNR_AddMultiElements |
||
272 | * |
||
273 | * @param RequestOptions\PnrCreatePnrOptions $options |
||
274 | * @param array $messageOptions (OPTIONAL) |
||
275 | * @return Result |
||
276 | */ |
||
277 | 1 | public function pnrCreatePnr(RequestOptions\PnrCreatePnrOptions $options, $messageOptions = []) |
|
283 | |||
284 | /** |
||
285 | * PNR_AddMultiElements - Create a new PNR or update an existing PNR. |
||
286 | * |
||
287 | * https://webservices.amadeus.com/extranet/viewService.do?id=25&flavourId=1&menuId=functional |
||
288 | * |
||
289 | * @param RequestOptions\PnrAddMultiElementsOptions $options |
||
290 | * @param array $messageOptions (OPTIONAL) |
||
291 | * @return Result |
||
292 | */ |
||
293 | 2 | public function pnrAddMultiElements(RequestOptions\PnrAddMultiElementsOptions $options, $messageOptions = []) |
|
299 | |||
300 | /** |
||
301 | * PNR_RetrieveAndDisplay - Retrieve an Amadeus PNR by record locator including extra info |
||
302 | * |
||
303 | * This extra info is info you cannot see in the regular PNR, like Offers. |
||
304 | * |
||
305 | * By default, the result will be the PNR_RetrieveAndDisplayReply XML as string. |
||
306 | * That way you can easily parse the PNR's contents with XPath. |
||
307 | * |
||
308 | * Set $messageOptions['asString'] = FALSE to get the response as a PHP object. |
||
309 | * |
||
310 | * https://webservices.amadeus.com/extranet/viewService.do?id=1922&flavourId=1&menuId=functional |
||
311 | * |
||
312 | * @param RequestOptions\PnrRetrieveAndDisplayOptions $options Amadeus Record Locator for PNR |
||
313 | * @param array $messageOptions (OPTIONAL) |
||
314 | * @return Result |
||
315 | * @throws Exception |
||
316 | **/ |
||
317 | 1 | public function pnrRetrieveAndDisplay(RequestOptions\PnrRetrieveAndDisplayOptions $options, $messageOptions = []) |
|
323 | |||
324 | /** |
||
325 | * PNR_Cancel |
||
326 | * |
||
327 | * @param RequestOptions\PnrCancelOptions $options |
||
328 | * @param array $messageOptions (OPTIONAL) |
||
329 | * @return Result |
||
330 | */ |
||
331 | 1 | public function pnrCancel(RequestOptions\PnrCancelOptions $options, $messageOptions = []) |
|
337 | |||
338 | /** |
||
339 | * PNR_DisplayHistory |
||
340 | * |
||
341 | * @param RequestOptions\PnrDisplayHistoryOptions $options |
||
342 | * @param array $messageOptions (OPTIONAL) |
||
343 | * @return Result |
||
344 | */ |
||
345 | 1 | public function pnrDisplayHistory(RequestOptions\PnrDisplayHistoryOptions $options, $messageOptions = []) |
|
351 | |||
352 | /** |
||
353 | * PNR_TransferOwnership |
||
354 | * |
||
355 | * @param RequestOptions\PnrTransferOwnershipOptions $options |
||
356 | * @param array $messageOptions (OPTIONAL) |
||
357 | * @return Result |
||
358 | */ |
||
359 | 1 | public function pnrTransferOwnership(RequestOptions\PnrTransferOwnershipOptions $options, $messageOptions = []) |
|
365 | |||
366 | /** |
||
367 | * PNR_NameChange |
||
368 | * |
||
369 | * @param RequestOptions\PnrNameChangeOptions $options |
||
370 | * @param array $messageOptions (OPTIONAL) |
||
371 | * @return Result |
||
372 | */ |
||
373 | 1 | public function pnrNameChange(RequestOptions\PnrNameChangeOptions $options, $messageOptions = []) |
|
379 | |||
380 | /** |
||
381 | * Queue_List - get a list of all PNR's on a given queue |
||
382 | * |
||
383 | * https://webservices.amadeus.com/extranet/viewService.do?id=52&flavourId=1&menuId=functional |
||
384 | * |
||
385 | * @param RequestOptions\QueueListOptions $options |
||
386 | * @param array $messageOptions (OPTIONAL) |
||
387 | * @return Result |
||
388 | */ |
||
389 | 1 | public function queueList(RequestOptions\QueueListOptions $options, $messageOptions = []) |
|
395 | |||
396 | /** |
||
397 | * Queue_PlacePNR - Place a PNR on a given queue |
||
398 | * |
||
399 | * @param RequestOptions\QueuePlacePnrOptions $options |
||
400 | * @param array $messageOptions (OPTIONAL) |
||
401 | * @return Result |
||
402 | */ |
||
403 | 1 | public function queuePlacePnr(RequestOptions\QueuePlacePnrOptions $options, $messageOptions = []) |
|
409 | |||
410 | /** |
||
411 | * Queue_RemoveItem - remove an item (a PNR) from a given queue |
||
412 | * |
||
413 | * @param RequestOptions\QueueRemoveItemOptions $options |
||
414 | * @param array $messageOptions (OPTIONAL) |
||
415 | * @return Result |
||
416 | */ |
||
417 | 1 | public function queueRemoveItem(RequestOptions\QueueRemoveItemOptions $options, $messageOptions = []) |
|
423 | |||
424 | /** |
||
425 | * Queue_MoveItem - move an item (a PNR) from one queue to another. |
||
426 | * |
||
427 | * @param RequestOptions\QueueMoveItemOptions $options |
||
428 | * @param array $messageOptions (OPTIONAL) |
||
429 | * @return Result |
||
430 | */ |
||
431 | 1 | public function queueMoveItem(RequestOptions\QueueMoveItemOptions $options, $messageOptions = []) |
|
437 | |||
438 | /** |
||
439 | * Offer_CreateOffer |
||
440 | * |
||
441 | * @param RequestOptions\OfferCreateOptions $options |
||
442 | * @param array $messageOptions (OPTIONAL) |
||
443 | * @return Result |
||
444 | */ |
||
445 | 1 | public function offerCreate(RequestOptions\OfferCreateOptions $options, $messageOptions = []) |
|
451 | |||
452 | /** |
||
453 | * Offer_VerifyOffer |
||
454 | * |
||
455 | * To be called in the context of an open PNR |
||
456 | * |
||
457 | * @param RequestOptions\OfferVerifyOptions $options |
||
458 | * @param array $messageOptions (OPTIONAL) |
||
459 | * @return Result |
||
460 | */ |
||
461 | 1 | public function offerVerify(RequestOptions\OfferVerifyOptions $options, $messageOptions = []) |
|
467 | |||
468 | /** |
||
469 | * Offer_ConfirmAirOffer |
||
470 | * |
||
471 | * @param RequestOptions\OfferConfirmAirOptions $options |
||
472 | * @param array $messageOptions (OPTIONAL) |
||
473 | * @return Result |
||
474 | */ |
||
475 | 1 | public function offerConfirmAir(RequestOptions\OfferConfirmAirOptions $options, $messageOptions = []) |
|
481 | |||
482 | /** |
||
483 | * Offer_ConfirmHotelOffer |
||
484 | * |
||
485 | * @param RequestOptions\OfferConfirmHotelOptions $options |
||
486 | * @param array $messageOptions (OPTIONAL) |
||
487 | * @return Result |
||
488 | */ |
||
489 | 1 | public function offerConfirmHotel(RequestOptions\OfferConfirmHotelOptions $options, $messageOptions = []) |
|
495 | |||
496 | /** |
||
497 | * Offer_ConfirmCarOffer |
||
498 | * |
||
499 | * @param RequestOptions\OfferConfirmCarOptions $options |
||
500 | * @param array $messageOptions (OPTIONAL) |
||
501 | * @return Result |
||
502 | */ |
||
503 | 1 | public function offerConfirmCar(RequestOptions\OfferConfirmCarOptions $options, $messageOptions = []) |
|
509 | |||
510 | /** |
||
511 | * Fare_MasterPricerTravelBoardSearch |
||
512 | * |
||
513 | * @param RequestOptions\FareMasterPricerTbSearch $options |
||
514 | * @param array $messageOptions (OPTIONAL) |
||
515 | * @return Result |
||
516 | */ |
||
517 | 1 | public function fareMasterPricerTravelBoardSearch( |
|
525 | |||
526 | /** |
||
527 | * Fare_MasterPricerCalendar |
||
528 | * |
||
529 | * @param RequestOptions\FareMasterPricerCalendarOptions $options |
||
530 | * @param array $messageOptions (OPTIONAL) |
||
531 | * @return Result |
||
532 | */ |
||
533 | 1 | public function fareMasterPricerCalendar( |
|
541 | |||
542 | /** |
||
543 | * Fare_PricePnrWithBookingClass |
||
544 | * |
||
545 | * @param RequestOptions\FarePricePnrWithBookingClassOptions $options |
||
546 | * @param array $messageOptions (OPTIONAL) |
||
547 | * @return Result |
||
548 | */ |
||
549 | 2 | public function farePricePnrWithBookingClass( |
|
557 | |||
558 | /** |
||
559 | * Fare_PricePnrWithLowerFares |
||
560 | * |
||
561 | * @param RequestOptions\FarePricePnrWithLowerFaresOptions $options |
||
562 | * @param array $messageOptions (OPTIONAL) |
||
563 | * @return Result |
||
564 | */ |
||
565 | 2 | public function farePricePnrWithLowerFares( |
|
573 | |||
574 | /** |
||
575 | * Fare_PricePnrWithLowestFare |
||
576 | * |
||
577 | * @param RequestOptions\FarePricePnrWithLowestFareOptions $options |
||
578 | * @param array $messageOptions (OPTIONAL) |
||
579 | * @return Result |
||
580 | */ |
||
581 | 2 | public function farePricePnrWithLowestFare( |
|
589 | |||
590 | /** |
||
591 | * Fare_InformativePricingWithoutPNR |
||
592 | * |
||
593 | * @param RequestOptions\FareInformativePricingWithoutPnrOptions $options |
||
594 | * @param array $messageOptions (OPTIONAL) |
||
595 | * @return Result |
||
596 | */ |
||
597 | 1 | public function fareInformativePricingWithoutPnr( |
|
605 | |||
606 | /** |
||
607 | * Fare_InformativeBestPricingWithoutPNR |
||
608 | * |
||
609 | * @param RequestOptions\FareInformativeBestPricingWithoutPnrOptions $options |
||
610 | * @param array $messageOptions (OPTIONAL) |
||
611 | * @return Result |
||
612 | */ |
||
613 | 1 | public function fareInformativeBestPricingWithoutPnr( |
|
621 | |||
622 | /** |
||
623 | * Fare_CheckRules |
||
624 | * |
||
625 | * @param RequestOptions\FareCheckRulesOptions $options |
||
626 | * @param array $messageOptions (OPTIONAL) |
||
627 | * @return Result |
||
628 | */ |
||
629 | 1 | public function fareCheckRules(RequestOptions\FareCheckRulesOptions $options, $messageOptions = []) |
|
635 | |||
636 | /** |
||
637 | * Fare_ConvertCurrency |
||
638 | * |
||
639 | * @param RequestOptions\FareConvertCurrencyOptions $options |
||
640 | * @param array $messageOptions (OPTIONAL) |
||
641 | * @return Result |
||
642 | */ |
||
643 | 1 | public function fareConvertCurrency(RequestOptions\FareConvertCurrencyOptions $options, $messageOptions = []) |
|
649 | |||
650 | /** |
||
651 | * Air_MultiAvailability |
||
652 | * |
||
653 | * @param RequestOptions\AirMultiAvailabilityOptions $options |
||
654 | * @param array $messageOptions (OPTIONAL) |
||
655 | * @return Result |
||
656 | */ |
||
657 | 1 | public function airMultiAvailability( |
|
665 | |||
666 | /** |
||
667 | * Air_SellFromRecommendation |
||
668 | * |
||
669 | * @param RequestOptions\AirSellFromRecommendationOptions $options |
||
670 | * @param array $messageOptions (OPTIONAL) |
||
671 | * @return Result |
||
672 | */ |
||
673 | 1 | public function airSellFromRecommendation( |
|
681 | |||
682 | /** |
||
683 | * Air_FlightInfo |
||
684 | * |
||
685 | * @param RequestOptions\AirFlightInfoOptions $options |
||
686 | * @param array $messageOptions (OPTIONAL) |
||
687 | * @return Result |
||
688 | */ |
||
689 | 1 | public function airFlightInfo(RequestOptions\AirFlightInfoOptions $options, $messageOptions = []) |
|
695 | |||
696 | /** |
||
697 | * Air_RetrieveSeatMap |
||
698 | * |
||
699 | * @param RequestOptions\AirRetrieveSeatMapOptions $options |
||
700 | * @param array $messageOptions (OPTIONAL) |
||
701 | * @return Result |
||
702 | */ |
||
703 | 1 | public function airRetrieveSeatMap(RequestOptions\AirRetrieveSeatMapOptions $options, $messageOptions = []) |
|
709 | |||
710 | /** |
||
711 | * Command_Cryptic |
||
712 | * |
||
713 | * @param RequestOptions\CommandCrypticOptions $options |
||
714 | * @param array $messageOptions (OPTIONAL) |
||
715 | * @return Result |
||
716 | */ |
||
717 | 1 | public function commandCryptic(RequestOptions\CommandCrypticOptions $options, $messageOptions = []) |
|
723 | |||
724 | /** |
||
725 | * MiniRule_GetFromPricingRec |
||
726 | * |
||
727 | * @param RequestOptions\MiniRuleGetFromPricingRecOptions $options |
||
728 | * @param array $messageOptions (OPTIONAL) |
||
729 | * @return Result |
||
730 | */ |
||
731 | 1 | public function miniRuleGetFromPricingRec( |
|
739 | |||
740 | /** |
||
741 | * MiniRule_GetFromPricing |
||
742 | * |
||
743 | * @param RequestOptions\MiniRuleGetFromPricingOptions $options |
||
744 | * @param array $messageOptions (OPTIONAL) |
||
745 | * @return Result |
||
746 | */ |
||
747 | 1 | public function miniRuleGetFromPricing( |
|
755 | |||
756 | /** |
||
757 | * Info_EncodeDecodeCity |
||
758 | * |
||
759 | * @param RequestOptions\InfoEncodeDecodeCityOptions $options |
||
760 | * @param array $messageOptions (OPTIONAL) |
||
761 | * @return Result |
||
762 | */ |
||
763 | 1 | public function infoEncodeDecodeCity(RequestOptions\InfoEncodeDecodeCityOptions $options, $messageOptions = []) |
|
769 | |||
770 | /** |
||
771 | * PointOfRef_Search |
||
772 | * |
||
773 | * @param RequestOptions\PointOfRefSearchOptions $options |
||
774 | * @param array $messageOptions (OPTIONAL) |
||
775 | * @return Result |
||
776 | */ |
||
777 | 1 | public function pointOfRefSearch(RequestOptions\PointOfRefSearchOptions $options, $messageOptions = []) |
|
783 | |||
784 | |||
785 | /** |
||
786 | * Ticket_CreateTSTFromPricing |
||
787 | * |
||
788 | * @param RequestOptions\TicketCreateTstFromPricingOptions $options |
||
789 | * @param array $messageOptions (OPTIONAL) |
||
790 | * @return Result |
||
791 | */ |
||
792 | 1 | public function ticketCreateTSTFromPricing( |
|
800 | |||
801 | /** |
||
802 | * Ticket_CreateTSMFromPricing |
||
803 | * |
||
804 | * @param RequestOptions\TicketCreateTsmFromPricingOptions $options |
||
805 | * @param array $messageOptions (OPTIONAL) |
||
806 | * @return Result |
||
807 | */ |
||
808 | 1 | public function ticketCreateTSMFromPricing( |
|
816 | |||
817 | /** |
||
818 | * Ticket_DeleteTST |
||
819 | * |
||
820 | * @param RequestOptions\TicketDeleteTstOptions $options |
||
821 | * @param array $messageOptions (OPTIONAL) |
||
822 | * @return Result |
||
823 | */ |
||
824 | 1 | public function ticketDeleteTST(RequestOptions\TicketDeleteTstOptions $options, $messageOptions = []) |
|
830 | |||
831 | /** |
||
832 | * Ticket_DeleteTSMP |
||
833 | * |
||
834 | * @param RequestOptions\TicketDeleteTsmpOptions $options |
||
835 | * @param array $messageOptions (OPTIONAL) |
||
836 | * @return Result |
||
837 | */ |
||
838 | 1 | public function ticketDeleteTSMP(RequestOptions\TicketDeleteTsmpOptions $options, $messageOptions = []) |
|
844 | |||
845 | /** |
||
846 | * Ticket_DisplayTST |
||
847 | * |
||
848 | * @param RequestOptions\TicketDisplayTstOptions $options |
||
849 | * @param array $messageOptions (OPTIONAL) |
||
850 | * @return Result |
||
851 | */ |
||
852 | 1 | public function ticketDisplayTST(RequestOptions\TicketDisplayTstOptions $options, $messageOptions = []) |
|
858 | |||
859 | /** |
||
860 | * Ticket_DisplayTSMP |
||
861 | * |
||
862 | * @param RequestOptions\TicketDisplayTsmpOptions $options |
||
863 | * @param array $messageOptions (OPTIONAL) |
||
864 | * @return Result |
||
865 | */ |
||
866 | 1 | public function ticketDisplayTSMP(RequestOptions\TicketDisplayTsmpOptions $options, $messageOptions = []) |
|
872 | |||
873 | /** |
||
874 | * Ticket_DisplayTSMFareElement |
||
875 | * |
||
876 | * @param RequestOptions\TicketDisplayTsmFareElOptions $options |
||
877 | * @param array $messageOptions (OPTIONAL) |
||
878 | * @return Result |
||
879 | */ |
||
880 | 1 | public function ticketDisplayTSMFareElement( |
|
888 | |||
889 | /** |
||
890 | * DocIssuance_IssueTicket |
||
891 | * |
||
892 | * @param RequestOptions\DocIssuanceIssueTicketOptions $options |
||
893 | * @param array $messageOptions (OPTIONAL) |
||
894 | * @return Result |
||
895 | */ |
||
896 | 1 | public function docIssuanceIssueTicket( |
|
904 | |||
905 | /** |
||
906 | * DocIssuance_IssueMiscellaneousDocuments |
||
907 | * |
||
908 | * @param RequestOptions\DocIssuanceIssueMiscDocOptions $options |
||
909 | * @param array $messageOptions (OPTIONAL) |
||
910 | * @return Result |
||
911 | */ |
||
912 | 1 | public function docIssuanceIssueMiscellaneousDocuments( |
|
920 | |||
921 | /** |
||
922 | * DocIssuance_IssueCombined |
||
923 | * |
||
924 | * @param RequestOptions\DocIssuanceIssueCombinedOptions $options |
||
925 | * @param array $messageOptions (OPTIONAL) |
||
926 | * @return Result |
||
927 | */ |
||
928 | 2 | public function docIssuanceIssueCombined( |
|
936 | |||
937 | /** |
||
938 | * FOP_CreateFormOfPayment |
||
939 | * |
||
940 | * @param RequestOptions\FopCreateFopOptions $options |
||
941 | * @param array $messageOptions (OPTIONAL) |
||
942 | * @return Result |
||
943 | */ |
||
944 | 1 | public function fopCreateFormOfPayment(RequestOptions\FopCreateFopOptions $options, $messageOptions = []) |
|
950 | |||
951 | /** |
||
952 | * PriceXplorer_ExtremeSearch |
||
953 | * |
||
954 | * @param RequestOptions\PriceXplorerExtremeSearchOptions $options |
||
955 | * @param array $messageOptions (OPTIONAL) |
||
956 | * @return Result |
||
957 | */ |
||
958 | 1 | public function priceXplorerExtremeSearch( |
|
966 | |||
967 | /** |
||
968 | * SalesReports_DisplayQueryReport |
||
969 | * |
||
970 | * @param RequestOptions\SalesReportsDisplayQueryReportOptions $options |
||
971 | * @param array $messageOptions (OPTIONAL) |
||
972 | * @return Result |
||
973 | */ |
||
974 | 1 | public function salesReportsDisplayQueryReport( |
|
982 | |||
983 | /** |
||
984 | * Service_IntegratedPricing |
||
985 | * |
||
986 | * @param RequestOptions\ServiceIntegratedPricingOptions $options |
||
987 | * @param array $messageOptions (OPTIONAL) |
||
988 | * @return Result |
||
989 | */ |
||
990 | 1 | public function serviceIntegratedPricing( |
|
998 | |||
999 | /** |
||
1000 | * Call a message with the given parameters |
||
1001 | * |
||
1002 | * @param string $messageName |
||
1003 | * @param RequestOptions\RequestOptionsInterface $options |
||
1004 | * @param array $messageOptions |
||
1005 | * @param bool $endSession |
||
1006 | * @return Result |
||
1007 | * @throws Client\Exception |
||
1008 | * @throws Client\Struct\InvalidArgumentException |
||
1009 | * @throws Client\InvalidMessageException |
||
1010 | * @throws Client\RequestCreator\MessageVersionUnsupportedException |
||
1011 | * @throws \RuntimeException |
||
1012 | * @throws \InvalidArgumentException |
||
1013 | * @throws \SoapFault |
||
1014 | */ |
||
1015 | 56 | protected function callMessage($messageName, $options, $messageOptions, $endSession = false) |
|
1041 | |||
1042 | /** |
||
1043 | * Make message options |
||
1044 | * |
||
1045 | * Message options are meta options when sending a message to the amadeus web services |
||
1046 | * - 'endSession' (if stateful) : should we end the current session after sending this call? |
||
1047 | * - 'returnXml' : Should we return the XML string in the Result::responseXml property? |
||
1048 | * (this overrides the default setting returnXml in the Amadeus\Client\Params for a single message) |
||
1049 | * |
||
1050 | * @param array $incoming The Message options chosen by the caller - if any. |
||
1051 | * @param bool $endSession Switch if you want to terminate the current session after making the call. |
||
1052 | * @return array |
||
1053 | */ |
||
1054 | 62 | protected function makeMessageOptions(array $incoming, $endSession = false) |
|
1071 | |||
1072 | /** |
||
1073 | * Load the session handler |
||
1074 | * |
||
1075 | * Either load the provided session handler or create one depending on incoming parameters. |
||
1076 | * |
||
1077 | * @param HandlerInterface|null $sessionHandler |
||
1078 | * @param Params\SessionHandlerParams|null $params |
||
1079 | * @return HandlerInterface |
||
1080 | */ |
||
1081 | 70 | protected function loadSessionHandler($sessionHandler, $params) |
|
1091 | |||
1092 | /** |
||
1093 | * Load a request creator |
||
1094 | * |
||
1095 | * A request creator is responsible for generating the correct request to send. |
||
1096 | * |
||
1097 | * @param RequestCreatorInterface|null $requestCreator |
||
1098 | * @param Params\RequestCreatorParams $params |
||
1099 | * @param string $libIdentifier Library identifier & version string (for Received From) |
||
1100 | * @param string $originatorOffice The Office we are signed in with. |
||
1101 | * @param array $mesVer Messages & Versions array of active messages in the WSDL |
||
1102 | * @return RequestCreatorInterface |
||
1103 | * @throws \RuntimeException |
||
1104 | */ |
||
1105 | 69 | protected function loadRequestCreator($requestCreator, $params, $libIdentifier, $originatorOffice, $mesVer) |
|
1121 | |||
1122 | /** |
||
1123 | * Load a response handler |
||
1124 | * |
||
1125 | * @param ResponseHandlerInterface|null $responseHandler |
||
1126 | * @return ResponseHandlerInterface |
||
1127 | * @throws \RuntimeException |
||
1128 | */ |
||
1129 | 69 | protected function loadResponseHandler($responseHandler) |
|
1139 | } |
||
1140 |