Skip to content

Commit 9a950ad

Browse files
committed
New Message: PNR_ListPassengersByFlight
1 parent 6f0a4be commit 9a950ad

File tree

76 files changed

+4456
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+4456
-0
lines changed

docs/list-of-supported-messages.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This is the list of messages that are at least partially supported at this time:
1111
- PNR_AddMultiElements
1212
- PNR_Cancel
1313
- PNR_DisplayHistory
14+
- PNR_ListPassengersByFlight
1415
- PNR_TransferOwnership
1516
- PNR_NameChange
1617
- PNR_Split

docs/samples.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,30 @@ Split passengers 1 and 2 from PNR ABC123:
530530
new PnrSplitOptions(['recordLocator' => 'ABC123', 'passengerTattoos' => [1, 2]])
531531
);
532532
533+
----------------
534+
PNR_ListPassengersByFlight
535+
----------------
536+
537+
List passengers by flight with minimal parameters:
538+
539+
.. code-block:: php
540+
541+
use Amadeus\Client\RequestOptions\PnrListPassengersByFlightOptions;
542+
use Amadeus\Client\RequestOptions\PnrListPassengersByFlight\FlightIdentification;
543+
use Amadeus\Client\RequestOptions\PnrListPassengersByFlight\DateIdentification;
544+
545+
$pnrContent = $client->pnrListPassengersByFlight(
546+
new PnrListPassengersByFlightOptions([
547+
'flightIdentification' => new FlightIdentification([
548+
'marketingCarrier' => 'LH',
549+
'flightNumber' => '1234',
550+
]),
551+
'dateIdentification' => new DateIdentification([
552+
'businessSemantic' => DateIdentification::BUSINESS_SEMANTIC_FLIGHT_DEPARTURE_DATE,
553+
'dateTime' => \DateTime::createFromFormat('Y-m-d', '2025-12-25'),
554+
]),
555+
])
556+
);
533557
534558
*****
535559
Queue

src/Amadeus/Client.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,23 @@ public function pnrTransferOwnership(RequestOptions\PnrTransferOwnershipOptions
395395
return $this->callMessage($msgName, $options, $messageOptions);
396396
}
397397

398+
/**
399+
* PNR_ListPassengersByFlight
400+
*
401+
* @param RequestOptions\PnrListPassengersByFlightOptions $options
402+
* @param array $messageOptions (OPTIONAL)
403+
* @return Result
404+
* @throws Client\InvalidMessageException
405+
* @throws Client\RequestCreator\MessageVersionUnsupportedException
406+
* @throws Exception
407+
*/
408+
public function pnrListPassengersByFlight(RequestOptions\PnrListPassengersByFlightOptions $options, $messageOptions = [])
409+
{
410+
$msgName = 'PNR_ListPassengersByFlight';
411+
412+
return $this->callMessage($msgName, $options, $messageOptions);
413+
}
414+
398415
/**
399416
* PNR_NameChange
400417
*
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
/**
4+
* amadeus-ws-client
5+
*
6+
* Copyright 2015 Amadeus Benelux NV
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*
20+
* @package Amadeus
21+
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
22+
*/
23+
24+
namespace Amadeus\Client\RequestCreator\Converter\PNR;
25+
26+
use Amadeus\Client\RequestCreator\Converter\BaseConverter;
27+
use Amadeus\Client\RequestOptions\PnrListPassengersByFlightOptions;
28+
use Amadeus\Client\Struct;
29+
30+
/**
31+
* PNR_ListPassengersByFlight Request converter
32+
*
33+
* @package Amadeus\Client\RequestCreator\Converter\PNR
34+
* @author Evan Chuang <[email protected]>
35+
*/
36+
class ListPassengersByFlightConv extends BaseConverter
37+
{
38+
/**
39+
* @param PnrListPassengersByFlightOptions $requestOptions
40+
* @param int|string $version
41+
*
42+
* @return Struct\Pnr\ListPassengersByFlight
43+
*/
44+
public function convert($requestOptions, $version)
45+
{
46+
return new Struct\Pnr\ListPassengersByFlight($requestOptions);
47+
}
48+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?php
2+
3+
/**
4+
* amadeus-ws-client
5+
*
6+
* Copyright 2015 Amadeus Benelux NV
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*
20+
* @package Amadeus
21+
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
22+
*/
23+
24+
namespace Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight;
25+
26+
use Amadeus\Client\LoadParamsFromArray;
27+
28+
/**
29+
* Carrier Or Flight
30+
*
31+
* @package Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight
32+
* @author Evan Chuang <[email protected]>
33+
*/
34+
class CarrierOrFlight extends LoadParamsFromArray
35+
{
36+
/**
37+
* Marketing Carrier
38+
*
39+
* @var string
40+
*/
41+
public $marketingCarrier;
42+
43+
/**
44+
* Flight Number
45+
*
46+
* @var int
47+
*/
48+
public $flightNumber;
49+
50+
/**
51+
* Operational Alpha Suffix
52+
*
53+
* @var string
54+
*/
55+
public $operationSuffix;
56+
57+
/**
58+
* To convey the Departure Date of the Flight
59+
*
60+
* @var \DateTime
61+
*/
62+
public $departureDate;
63+
64+
/**
65+
* The port of departure of the flight or flight segment. It is mandatory when FDD date is used
66+
*
67+
* @var string
68+
*/
69+
public $boardPoint;
70+
71+
/**
72+
* The port of destination of the flight or flight segment. It is mandatory when FAD date is used.
73+
*
74+
* @var string
75+
*/
76+
public $offPoint;
77+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
/**
3+
* amadeus-ws-client
4+
*
5+
* Copyright 2015 Amadeus Benelux NV
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*
19+
* @package Amadeus
20+
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
21+
*/
22+
23+
namespace Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight;
24+
25+
use Amadeus\Client\LoadParamsFromArray;
26+
27+
/**
28+
* Date Identification
29+
*
30+
* @package Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight
31+
* @author Evan Chuang <[email protected]>
32+
*/
33+
class DateIdentification extends LoadParamsFromArray
34+
{
35+
const BUSINESS_SEMANTIC_FLIGHT_ARRIVAL_DATE = 'FAD';
36+
const BUSINESS_SEMANTIC_FLIGHT_DEPARTURE_DATE = 'FDD';
37+
const BUSINESS_SEMANTIC_FIRST_LEG_DATE = 'FLD';
38+
39+
/**
40+
* Business Semantic
41+
*
42+
* self::BUSINESS_SEMANTIC_*
43+
*
44+
* @var string
45+
*/
46+
public $businessSemantic;
47+
48+
/**
49+
* Convey date and/or time
50+
*
51+
* @var \DateTime
52+
*/
53+
public $dateTime;
54+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
/**
3+
* amadeus-ws-client
4+
*
5+
* Copyright 2015 Amadeus Benelux NV
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*
19+
* @package Amadeus
20+
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
21+
*/
22+
23+
namespace Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight;
24+
25+
use Amadeus\Client\LoadParamsFromArray;
26+
27+
/**
28+
* Flight Identification
29+
*
30+
* @package Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight
31+
* @author Evan Chuang <[email protected]>
32+
*/
33+
class FlightIdentification extends LoadParamsFromArray
34+
{
35+
/**
36+
* Marketing Carrier
37+
*
38+
* @var string
39+
*/
40+
public $marketingCarrier;
41+
42+
/**
43+
* Flight Number
44+
*
45+
* @var string
46+
*/
47+
public $flightNumber;
48+
49+
/**
50+
* Operational Alpha Suffix
51+
*
52+
* @var string
53+
*/
54+
public $operationSuffix;
55+
56+
/**
57+
* Board Point
58+
*
59+
* The port of departure of the flight or
60+
* flight segment. It is mandatory when FDD date is used.
61+
*
62+
* @var string
63+
*/
64+
public $boardPoint;
65+
66+
/**
67+
* Off Point
68+
*
69+
* The port of arrival of the flight or
70+
* flight segment. It is mandatory when FDD date is used.
71+
*
72+
* @var string
73+
*/
74+
public $offPoint;
75+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php
2+
3+
/**
4+
* amadeus-ws-client
5+
*
6+
* Copyright 2015 Amadeus Benelux NV
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*
20+
* @package Amadeus
21+
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
22+
*/
23+
24+
namespace Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight;
25+
26+
use Amadeus\Client\LoadParamsFromArray;
27+
28+
/**
29+
* Frequent Flyer
30+
*
31+
* @package Amadeus\Client\RequestOptions\Pnr\ListPassengersByFlight
32+
* @author Evan Chuang <[email protected]>
33+
*/
34+
class FrequentFlyer extends LoadParamsFromArray
35+
{
36+
const PRIORITY_CODE_LEVEL_1 = 1;
37+
const PRIORITY_CODE_LEVEL_2 = 2;
38+
const PRIORITY_CODE_LEVEL_3 = 3;
39+
const PRIORITY_CODE_LEVEL_1_TIER_1 = 700;
40+
const PRIORITY_CODE_LEVEL_1_TIER_2 = 701;
41+
const PRIORITY_CODE_LEVEL_1_TIER_3 = 702;
42+
const PRIORITY_CODE_LEVEL_2_TIER_1 = 703;
43+
const PRIORITY_CODE_LEVEL_2_TIER_2 = 704;
44+
const PRIORITY_CODE_LEVEL_2_TIER_3 = 705;
45+
46+
/**
47+
* To specify a Tier linked to the FQTV
48+
*
49+
* @var string
50+
*/
51+
public $tierLevel;
52+
53+
/**
54+
* Priority Code
55+
*
56+
* self::PRIORITY_CODE_*
57+
*
58+
* @var string
59+
*/
60+
public $priorityCode;
61+
62+
/**
63+
* Tier Description
64+
*
65+
* @var string
66+
*/
67+
public $tierDescription;
68+
}

0 commit comments

Comments
 (0)