Skip to content

Commit

Permalink
Add example
Browse files Browse the repository at this point in the history
  • Loading branch information
therealartz committed Mar 15, 2021
1 parent a3d3692 commit d4fcc66
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions docs/samples/masterpricertravelboard.rst
Expand Up @@ -911,9 +911,9 @@ Multi-Ticket
============

The Multi-Ticket option allows you to get inbound, outbound and complete flights in one response.
Works only on return trip search.
Works only on return trip search.

`multiTicketWeights` is optional. If passed the sum of each weight has to sum up to 100.
`multiTicketWeights` is optional. If passed the sum of each weight has to sum up to 100.

.. code-block:: php
Expand Down Expand Up @@ -1355,3 +1355,41 @@ See all available type codes in `Amadeus\Client\RequestOptions\Fare\MasterPricer
]
]);
Multiple passenger types
========================

In case you need to combine passenger types to get some specific private fares in union with ADT private fares.
It will returned both ADT and IIT fares for one passenger.

.. code-block:: php
use Amadeus\Client\RequestOptions\FareMasterPricerTbSearch;
use Amadeus\Client\RequestOptions\Fare\MPItinerary;
use Amadeus\Client\RequestOptions\Fare\MPLocation;
use Amadeus\Client\RequestOptions\Fare\MPPassenger;
use Amadeus\Client\RequestOptions\Fare\MPDate;
$opt = new FareMasterPricerTbSearch([
'nrOfRequestedPassengers' => 1,
'passengers' => [
new MPPassenger([
'type' => [
MPPassenger::TYPE_ADULT,
MPPassenger::TYPE_INDIVIDUAL_INCLUSIVE_TOUR,
],
'count' => 1,
]),
],
'itinerary' => [
new MPItinerary([
'departureLocation' => new MPLocation(['airport' => 'JFK']),
'arrivalLocation' => new MPLocation(['airport' => 'KEF']),
'date' => new MPDate([
'dateTime' => new \DateTime('2021-11-01T00:00:00+0000', new \DateTimeZone('UTC'))
]),
]),
],
'flightOptions' => [
FareMasterPricerTbSearch::FLIGHTOPT_UNIFARES,
],
]);

0 comments on commit d4fcc66

Please sign in to comment.