Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/list-of-supported-messages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This is the list of messages that are at least partially supported at this time:
- PNR_AddMultiElements
- PNR_Cancel
- PNR_DisplayHistory
- PNR_ListPassengersByFlight
- PNR_TransferOwnership
- PNR_NameChange
- PNR_Split
Expand Down
24 changes: 24 additions & 0 deletions docs/samples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,30 @@ Split passengers 1 and 2 from PNR ABC123:
new PnrSplitOptions(['recordLocator' => 'ABC123', 'passengerTattoos' => [1, 2]])
);

----------------
PNR_ListPassengersByFlight
----------------

List passengers by flight with minimal parameters:

.. code-block:: php

use Amadeus\Client\RequestOptions\PnrListPassengersByFlightOptions;
use Amadeus\Client\RequestOptions\PnrListPassengersByFlight\FlightIdentification;
use Amadeus\Client\RequestOptions\PnrListPassengersByFlight\DateIdentification;

$pnrContent = $client->pnrListPassengersByFlight(
new PnrListPassengersByFlightOptions([
'flightIdentification' => new FlightIdentification([
'marketingCarrier' => 'LH',
'flightNumber' => '1234',
]),
'dateIdentification' => new DateIdentification([
'businessSemantic' => DateIdentification::BUSINESS_SEMANTIC_FLIGHT_DEPARTURE_DATE,
'dateTime' => \DateTime::createFromFormat('Y-m-d', '2025-12-25'),
]),
])
);

*****
Queue
Expand Down
17 changes: 17 additions & 0 deletions src/Amadeus/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,23 @@ public function pnrTransferOwnership(RequestOptions\PnrTransferOwnershipOptions
return $this->callMessage($msgName, $options, $messageOptions);
}

/**
* PNR_ListPassengersByFlight
*
* @param RequestOptions\PnrListPassengersByFlightOptions $options
* @param array $messageOptions (OPTIONAL)
* @return Result
* @throws Client\InvalidMessageException
* @throws Client\RequestCreator\MessageVersionUnsupportedException
* @throws Exception
*/
public function pnrListPassengersByFlight(RequestOptions\PnrListPassengersByFlightOptions $options, $messageOptions = [])
{
$msgName = 'PNR_ListPassengersByFlight';

return $this->callMessage($msgName, $options, $messageOptions);
}

/**
* PNR_NameChange
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

/**
* amadeus-ws-client
*
* Copyright 2015 Amadeus Benelux NV
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package Amadeus
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
*/

namespace Amadeus\Client\RequestCreator\Converter\PNR;

use Amadeus\Client\RequestCreator\Converter\BaseConverter;
use Amadeus\Client\RequestOptions\PnrListPassengersByFlightOptions;
use Amadeus\Client\Struct;

/**
* PNR_ListPassengersByFlight Request converter
*
* @package Amadeus\Client\RequestCreator\Converter\PNR
* @author Evan Chuang <ycchuang1999@gmail.com>
*/
class ListPassengersByFlightConv extends BaseConverter
{
/**
* @param PnrListPassengersByFlightOptions $requestOptions
* @param int|string $version
*
* @return Struct\Pnr\ListPassengersByFlight
*/
public function convert($requestOptions, $version)
{
return new Struct\Pnr\ListPassengersByFlight($requestOptions);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php

/**
* amadeus-ws-client
*
* Copyright 2015 Amadeus Benelux NV
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package Amadeus
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
*/

namespace Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight;

use Amadeus\Client\LoadParamsFromArray;

/**
* Carrier Or Flight
*
* @package Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight
* @author Evan Chuang <ycchuang1999@gmail.com>
*/
class CarrierOrFlight extends LoadParamsFromArray
{
/**
* Marketing Carrier
*
* @var string
*/
public $marketingCarrier;

/**
* Flight Number
*
* @var int
*/
public $flightNumber;

/**
* Operational Alpha Suffix
*
* @var string
*/
public $operationSuffix;

/**
* To convey the Departure Date of the Flight
*
* @var \DateTime
*/
public $departureDate;

/**
* The port of departure of the flight or flight segment. It is mandatory when FDD date is used
*
* @var string
*/
public $boardPoint;

/**
* The port of destination of the flight or flight segment. It is mandatory when FAD date is used.
*
* @var string
*/
public $offPoint;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php

/**
* amadeus-ws-client
*
* Copyright 2015 Amadeus Benelux NV
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package Amadeus
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
*/

namespace Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight;

use Amadeus\Client\LoadParamsFromArray;

/**
* Date Identification
*
* @package Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight
* @author Evan Chuang <ycchuang1999@gmail.com>
*/
class DateIdentification extends LoadParamsFromArray
{
const BUSINESS_SEMANTIC_FLIGHT_ARRIVAL_DATE = 'FAD';
const BUSINESS_SEMANTIC_FLIGHT_DEPARTURE_DATE = 'FDD';
const BUSINESS_SEMANTIC_FIRST_LEG_DATE = 'FLD';

/**
* Business Semantic
*
* self::BUSINESS_SEMANTIC_*
*
* @var string
*/
public $businessSemantic;

/**
* Convey date and/or time
*
* @var \DateTime
*/
public $dateTime;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php

/**
* amadeus-ws-client
*
* Copyright 2015 Amadeus Benelux NV
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package Amadeus
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
*/

namespace Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight;

use Amadeus\Client\LoadParamsFromArray;

/**
* Flight Identification
*
* @package Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight
* @author Evan Chuang <ycchuang1999@gmail.com>
*/
class FlightIdentification extends LoadParamsFromArray
{
/**
* Marketing Carrier
*
* @var string
*/
public $marketingCarrier;

/**
* Flight Number
*
* @var string
*/
public $flightNumber;

/**
* Operational Alpha Suffix
*
* @var string
*/
public $operationSuffix;

/**
* Board Point
*
* The port of departure of the flight or
* flight segment. It is mandatory when FDD date is used.
*
* @var string
*/
public $boardPoint;

/**
* Off Point
*
* The port of arrival of the flight or
* flight segment. It is mandatory when FDD date is used.
*
* @var string
*/
public $offPoint;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php

/**
* amadeus-ws-client
*
* Copyright 2015 Amadeus Benelux NV
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package Amadeus
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
*/

namespace Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight;

use Amadeus\Client\LoadParamsFromArray;

/**
* Frequent Flyer
*
* @package Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight
* @author Evan Chuang <ycchuang1999@gmail.com>
*/
class FrequentFlyer extends LoadParamsFromArray
{
const PRIORITY_CODE_LEVEL_1 = 1;
const PRIORITY_CODE_LEVEL_2 = 2;
const PRIORITY_CODE_LEVEL_3 = 3;
const PRIORITY_CODE_LEVEL_1_TIER_1 = 700;
const PRIORITY_CODE_LEVEL_1_TIER_2 = 701;
const PRIORITY_CODE_LEVEL_1_TIER_3 = 702;
const PRIORITY_CODE_LEVEL_2_TIER_1 = 703;
const PRIORITY_CODE_LEVEL_2_TIER_2 = 704;
const PRIORITY_CODE_LEVEL_2_TIER_3 = 705;

/**
* To specify a Tier linked to the FQTV
*
* @var string
*/
public $tierLevel;

/**
* Priority Code
*
* self::PRIORITY_CODE_*
*
* @var string
*/
public $priorityCode;

/**
* Tier Description
*
* @var string
*/
public $tierDescription;
}
Loading