-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented Ticket_CreateTSMFareElement for Amadeus Ticket Changer Sh…
…opper flow (Issue #39)
- Loading branch information
Showing
11 changed files
with
444 additions
and
2 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
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
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
46 changes: 46 additions & 0 deletions
46
src/Amadeus/Client/RequestCreator/Converter/Ticket/CreateTSMFareElementConv.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,46 @@ | ||
<?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\Ticket; | ||
|
||
use Amadeus\Client\RequestCreator\Converter\BaseConverter; | ||
use Amadeus\Client\RequestOptions\TicketCreateTsmFareElOptions; | ||
use Amadeus\Client\Struct; | ||
|
||
/** | ||
* Ticket_CreateTSMFareElement Request converter | ||
* | ||
* @package Amadeus\Client\RequestCreator\Converter\Ticket | ||
* @author Dieter Devlieghere <dieter.devlieghere@benelux.amadeus.com> | ||
*/ | ||
class CreateTSMFareElementConv extends BaseConverter | ||
{ | ||
/** | ||
* @param TicketCreateTsmFareElOptions $requestOptions | ||
* @param int|string $version | ||
* @return Struct\Ticket\CreateTSMFareElement | ||
*/ | ||
public function convert($requestOptions, $version) | ||
{ | ||
return new Struct\Ticket\CreateTSMFareElement($requestOptions); | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
src/Amadeus/Client/RequestOptions/TicketCreateTsmFareElOptions.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,62 @@ | ||
<?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; | ||
|
||
/** | ||
* TicketCreateTsmFareElOptions | ||
* | ||
* @package Amadeus\Client\RequestOptions | ||
* @author Dieter Devlieghere <dieter.devlieghere@benelux.amadeus.com> | ||
*/ | ||
class TicketCreateTsmFareElOptions extends Base | ||
{ | ||
const TYPE_FARE_DISCOUNT = "FD"; | ||
const TYPE_ENDORSEMENT = "FE"; | ||
const TYPE_COMMISSION = "FM"; | ||
const TYPE_ORIGINAL_EXCHANGE_DOCUMENT = "FO"; | ||
const TYPE_FORM_OF_PAYMENT = "FP"; | ||
const TYPE_TOUR_CODE = "FT"; | ||
const TYPE_MISCELLANEOUS_INFORMATION_1 = "FZ1"; | ||
const TYPE_MISCELLANEOUS_INFORMATION_2 = "FZ2"; | ||
|
||
/** | ||
* Type of the Fare element of the associated TSM. | ||
* | ||
* @var string | ||
*/ | ||
public $elementType; | ||
|
||
/** | ||
* The tattoo of the associated TSM. | ||
* | ||
* @var int | ||
*/ | ||
public $tattoo; | ||
|
||
/** | ||
* Unstructured fare element information | ||
* | ||
* @var string | ||
*/ | ||
public $info; | ||
} |
33 changes: 33 additions & 0 deletions
33
src/Amadeus/Client/ResponseHandler/Ticket/HandlerCreateTSMFareElement.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,33 @@ | ||
<?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\ResponseHandler\Ticket; | ||
|
||
/** | ||
* HandlerCreateTSMFareElement | ||
* | ||
* @package Amadeus\Client\ResponseHandler\Ticket | ||
* @author Dieter Devlieghere <dieter.devlieghere@benelux.amadeus.com> | ||
*/ | ||
class HandlerCreateTSMFareElement extends HandlerDisplayTSMFareElement | ||
{ | ||
} |
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,62 @@ | ||
<?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\Ticket; | ||
|
||
use Amadeus\Client\RequestOptions\TicketCreateTsmFareElOptions; | ||
use Amadeus\Client\Struct\BaseWsMessage; | ||
use Amadeus\Client\Struct\Ticket\DisplayTSMFareElement\FareElementTattoo; | ||
|
||
/** | ||
* Ticket_CreateTSMFareElement | ||
* | ||
* @package Amadeus\Client\Struct\Ticket | ||
* @author Dieter Devlieghere <dieter.devlieghere@benelux.amadeus.com> | ||
*/ | ||
class CreateTSMFareElement extends BaseWsMessage | ||
{ | ||
/** | ||
* @var FareElementTattoo | ||
*/ | ||
public $fareElementTattoo; | ||
|
||
/** | ||
* @var FareElementInfo | ||
*/ | ||
public $fareElementInfo; | ||
|
||
|
||
/** | ||
* Ticket_CreateTSMFareElement constructor. | ||
* | ||
* @param TicketCreateTsmFareElOptions $requestOptions | ||
*/ | ||
public function __construct($requestOptions) | ||
{ | ||
$this->fareElementTattoo = new FareElementTattoo( | ||
$requestOptions->tattoo, | ||
$requestOptions->elementType | ||
); | ||
|
||
$this->fareElementInfo = new FareElementInfo($requestOptions->info); | ||
} | ||
} |
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,47 @@ | ||
<?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\Ticket; | ||
|
||
/** | ||
* FareElementInfo | ||
* | ||
* @package Amadeus\Client\Struct\Ticket | ||
* @author Dieter Devlieghere <dieter.devlieghere@benelux.amadeus.com> | ||
*/ | ||
class FareElementInfo | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public $text; | ||
|
||
/** | ||
* FareElementInfo constructor. | ||
* | ||
* @param string $text | ||
*/ | ||
public function __construct($text) | ||
{ | ||
$this->text = $text; | ||
} | ||
} |
Oops, something went wrong.