-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PNR: support individual security element ES (#421)
- Loading branch information
1 parent
2c64678
commit 75674fb
Showing
8 changed files
with
293 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
src/Amadeus/Client/RequestOptions/Pnr/Element/PnrSecurity.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
<?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\Element; | ||
|
||
use Amadeus\Client\RequestOptions\Pnr\Element; | ||
|
||
/** | ||
* PnrSecurity | ||
* | ||
* @package Amadeus\Client\RequestOptions\Pnr\Element | ||
* @author Dieter Devlieghere <dermikagh@gmail.com> | ||
*/ | ||
class PnrSecurity extends Element | ||
{ | ||
/** | ||
* Access Mode "Both read and write" | ||
* | ||
* See documentation Amadeus Core webservices | ||
* Functional documentation PNR_AddMultiElements | ||
* [PNR segment or element name, coded codeset: 001C_1A_98.1.2] | ||
* | ||
* @var string | ||
*/ | ||
const ACCESS_MODE_BOTH = "B"; | ||
/** | ||
* Access Mode "No Access" | ||
* | ||
* See documentation Amadeus Core webservices | ||
* Functional documentation PNR_AddMultiElements | ||
* [PNR segment or element name, coded codeset: 001C_1A_98.1.2] | ||
* | ||
* @var string | ||
*/ | ||
const ACCESS_MODE_NO_ACCESS = "N"; | ||
/** | ||
* Access Mode "Read only" | ||
* | ||
* See documentation Amadeus Core webservices | ||
* Functional documentation PNR_AddMultiElements | ||
* [PNR segment or element name, coded codeset: 001C_1A_98.1.2] | ||
* | ||
* @var string | ||
*/ | ||
const ACCESS_MODE_READ_ONLY = "R"; | ||
/** | ||
* Access Mode "Write only" | ||
* | ||
* See documentation Amadeus Core webservices | ||
* Functional documentation PNR_AddMultiElements | ||
* [PNR segment or element name, coded codeset: 001C_1A_98.1.2] | ||
* | ||
* @var string | ||
*/ | ||
const ACCESS_MODE_WRITE_ONLY = "W"; | ||
/** | ||
* Access Mode "No access mode defined" | ||
* | ||
* See documentation Amadeus Core webservices | ||
* Functional documentation PNR_AddMultiElements | ||
* [PNR segment or element name, coded codeset: 001C_1A_98.1.2] | ||
* | ||
* @var string | ||
*/ | ||
const ACCESS_MODE_UNDEFINED = "X"; | ||
/** | ||
* Amadeus global core office identification | ||
* | ||
* See documentation Amadeus Core webservices | ||
* Functional documentation PNR_AddMultiElements | ||
* [Codeset for General indicator, coded (Ref: 107P 1A 98.1.13)] | ||
* | ||
* @var string | ||
*/ | ||
const INDICATOR_GLOBAL = 'G'; | ||
/** | ||
* IATA number | ||
* | ||
* See documentation Amadeus Core webservices | ||
* Functional documentation PNR_AddMultiElements | ||
* [Codeset for General indicator, coded (Ref: 107P 1A 98.1.13)] | ||
* | ||
* @var string | ||
*/ | ||
const INDICATOR_IATA_NUMBER = 'I'; | ||
/** | ||
* Pseudo-office identification | ||
* | ||
* See documentation Amadeus Core webservices | ||
* Functional documentation PNR_AddMultiElements | ||
* [Codeset for General indicator, coded (Ref: 107P 1A 98.1.13)] | ||
* | ||
* @var string | ||
*/ | ||
const INDICATOR_PSEUDO_OFFICE = 'P'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $identification; | ||
/** | ||
* @var string | ||
*/ | ||
public $accessMode; | ||
/** | ||
* @var string | ||
*/ | ||
public $indicator; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/Amadeus/Client/Struct/Pnr/AddMultiElements/PnrSecurity.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?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\Struct\Pnr\AddMultiElements; | ||
|
||
use Amadeus\Client\RequestOptions\Pnr\Element\PnrSecurity as SecurityReOpts; | ||
|
||
/** | ||
* PnrSecurity | ||
* | ||
* @package Amadeus\Client\Struct\Pnr\AddMultiElements | ||
* @author Dieter Devlieghere <dermikagh@gmail.com> | ||
*/ | ||
class PnrSecurity | ||
{ | ||
/** | ||
* @var Security[] | ||
*/ | ||
public $security; | ||
|
||
public $securityInfo; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $indicator; | ||
|
||
public function __construct(SecurityReOpts $securityReq) | ||
{ | ||
$this->indicator = $securityReq->indicator; | ||
$this->security[] = new Security($securityReq->identification, $securityReq->accessMode); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
src/Amadeus/Client/Struct/Pnr/AddMultiElements/Security.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\Struct\Pnr\AddMultiElements; | ||
|
||
/** | ||
* Security | ||
* | ||
* @package Amadeus\Client\Struct\Pnr\AddMultiElements | ||
* @author Dieter Devlieghere <dermikagh@gmail.com> | ||
*/ | ||
class Security | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public $identification; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $accessMode; | ||
|
||
public function __construct($identification, $accessMode) | ||
{ | ||
$this->identification = $identification; | ||
$this->accessMode = $accessMode; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Amadeus/Client/Struct/Pnr/AddMultiElements/SecurityInfo.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
|
||
namespace Amadeus\Client\Struct\Pnr\AddMultiElements; | ||
|
||
class SecurityInfo | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters