-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PNR_AddMultiElements support for Address & Accounting Information ele…
…ments
- Loading branch information
Showing
14 changed files
with
621 additions
and
8 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
src/Amadeus/Client/RequestOptions/Pnr/Element/AccountingInfo.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,61 @@ | ||
<?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; | ||
|
||
/** | ||
* AccountingInfo | ||
* | ||
* @package Amadeus\Client\RequestOptions\Pnr\Element | ||
*/ | ||
class AccountingInfo extends Element | ||
{ | ||
/** | ||
* Account Number | ||
* | ||
* @var string | ||
*/ | ||
public $accountNumber; | ||
|
||
/** | ||
* Cost Center Number | ||
* | ||
* @var string | ||
*/ | ||
public $costCenter; | ||
|
||
/** | ||
* Company ID Number | ||
* | ||
* @var string | ||
*/ | ||
public $companyIdNumber; | ||
|
||
/** | ||
* Client Reference Number | ||
* | ||
* @var string | ||
*/ | ||
public $clientRefNumber; | ||
} |
100 changes: 100 additions & 0 deletions
100
src/Amadeus/Client/RequestOptions/Pnr/Element/Address.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,100 @@ | ||
<?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; | ||
|
||
/** | ||
* Address | ||
* | ||
* Billing address, Mailing address, structured or unstructured | ||
* | ||
* @package Amadeus\Client\RequestOptions\Pnr\Element | ||
*/ | ||
class Address | ||
{ | ||
const TYPE_BILLING_UNSTRUCTURED = "ABU"; | ||
|
||
const TYPE_MAILING_UNSTRUCTURED = "AMU"; | ||
|
||
const TYPE_BILLING_STRUCTURED = "AB"; | ||
|
||
const TYPE_MAILING_STRUCTURED = "AM"; | ||
|
||
/** | ||
* self::TYPE_* | ||
* | ||
* @var string | ||
*/ | ||
public $type; | ||
|
||
/** | ||
* The entire address as unstructured text (use comma's for newlines) | ||
* | ||
* ONLY FOR UNSTRUCTURED ADDRESSES | ||
* | ||
* @var string | ||
*/ | ||
public $freeText; | ||
|
||
/** | ||
* Name - for structured address | ||
* | ||
* @var string | ||
*/ | ||
public $name; | ||
/** | ||
* Address line 1 - for structured address | ||
* | ||
* @var string | ||
*/ | ||
public $addressLine1; | ||
/** | ||
* Address line 2 - for structured address | ||
* | ||
* @var string | ||
*/ | ||
public $addressLine2; | ||
/** | ||
* City - for structured address | ||
* | ||
* @var string | ||
*/ | ||
public $city; | ||
/** | ||
* State - for structured address | ||
* | ||
* @var string | ||
*/ | ||
public $state; | ||
/** | ||
* Zip Code - for structured address | ||
* | ||
* @var string | ||
*/ | ||
public $zipCode; | ||
/** | ||
* Country - for structured address | ||
* | ||
* @var string | ||
*/ | ||
public $country; | ||
} |
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
66 changes: 66 additions & 0 deletions
66
src/Amadeus/Client/Struct/Pnr/AddMultiElements/Account.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,66 @@ | ||
<?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; | ||
|
||
/** | ||
* Account | ||
* | ||
* @package Amadeus\Client\Struct\Pnr\AddMultiElements | ||
*/ | ||
class Account | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public $number; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $costNumber; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $companyNumber; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $clientReference; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $gSTTaxDetails; | ||
|
||
/** | ||
* Account constructor. | ||
* | ||
* @param null $number | ||
*/ | ||
public function __construct($number = null) | ||
{ | ||
$this->number = $number; | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
src/Amadeus/Client/Struct/Pnr/AddMultiElements/Accounting.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,56 @@ | ||
<?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\AccountingInfo; | ||
|
||
/** | ||
* Accounting | ||
* | ||
* @package Amadeus\Client\Struct\Pnr\AddMultiElements | ||
*/ | ||
class Accounting | ||
{ | ||
/** | ||
* @var Account | ||
*/ | ||
public $account; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $accountNumberOfUnits; | ||
|
||
/** | ||
* Accounting constructor. | ||
* | ||
* @param AccountingInfo $params | ||
*/ | ||
public function __construct(AccountingInfo $params) | ||
{ | ||
$this->account = new Account($params->accountNumber); | ||
$this->account->costNumber = $params->costCenter; | ||
$this->account->clientReference = $params->clientRefNumber; | ||
$this->account->companyNumber = $params->companyIdNumber; | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
src/Amadeus/Client/Struct/Pnr/AddMultiElements/Address.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,65 @@ | ||
<?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; | ||
|
||
/** | ||
* Address | ||
* | ||
* @package Amadeus\Client\Struct\Pnr\AddMultiElements | ||
* @author Dieter Devlieghere <dieter.devlieghere@benelux.amadeus.com> | ||
*/ | ||
class Address | ||
{ | ||
const OPT_ADDRESS_LINE_1 = "A1"; | ||
|
||
|
||
/** | ||
* A1 Address line1 | ||
* A2 Address line 2 | ||
* CI City | ||
* CO Country | ||
* CY Company | ||
* NA Name | ||
* PO P.O. BOX | ||
* ST State | ||
* ZP Postal code | ||
* | ||
* @var string | ||
*/ | ||
public $optionA1 = self::OPT_ADDRESS_LINE_1; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $optionTextA1; | ||
|
||
/** | ||
* Address constructor. | ||
* | ||
* @param string $addressLineOne | ||
*/ | ||
public function __construct($addressLineOne) | ||
{ | ||
$this->optionTextA1 = $addressLineOne; | ||
} | ||
} |
Oops, something went wrong.