-
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_CancelDocument (issue #93)
- Loading branch information
Showing
21 changed files
with
1,182 additions
and
1 deletion.
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/CancelDocumentConv.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\TicketCancelDocumentOptions; | ||
use Amadeus\Client\Struct; | ||
|
||
/** | ||
* Ticket_CancelDocument request converter | ||
* | ||
* @package Amadeus\Client\RequestCreator\Converter\Ticket | ||
* @author Dieter Devlieghere <dermikagh@gmail.com> | ||
*/ | ||
class CancelDocumentConv extends BaseConverter | ||
{ | ||
/** | ||
* @param TicketCancelDocumentOptions $requestOptions | ||
* @param int|string $version | ||
* @return Struct\Ticket\CancelDocument | ||
*/ | ||
public function convert($requestOptions, $version) | ||
{ | ||
return new Struct\Ticket\CancelDocument($requestOptions); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
src/Amadeus/Client/RequestOptions/Ticket/SequenceRange.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\RequestOptions\Ticket; | ||
|
||
use Amadeus\Client\LoadParamsFromArray; | ||
|
||
/** | ||
* Sequence Number Range | ||
* | ||
* @package Amadeus\Client\RequestOptions\Ticket | ||
* @author Dieter Devlieghere <dermikagh@gmail.com> | ||
*/ | ||
class SequenceRange extends LoadParamsFromArray | ||
{ | ||
/** | ||
* The first document of the range | ||
* | ||
* @var string | ||
*/ | ||
public $from; | ||
|
||
/** | ||
* The last document of the range (OPTIONAL) | ||
* | ||
* @var string | ||
*/ | ||
public $to; | ||
} |
76 changes: 76 additions & 0 deletions
76
src/Amadeus/Client/RequestOptions/TicketCancelDocumentOptions.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,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; | ||
|
||
use Amadeus\Client\RequestOptions\Ticket\SequenceRange; | ||
|
||
/** | ||
* Ticket_CancelDocument request options | ||
* | ||
* @package Amadeus\Client\RequestOptions | ||
* @author Dieter Devlieghere <dermikagh@gmail.com> | ||
*/ | ||
class TicketCancelDocumentOptions extends Base | ||
{ | ||
/** | ||
* E-Ticket document number. | ||
* | ||
* 13-digit document number or 10-digit number (without 3-digit numeric airline code). | ||
* | ||
* @var string | ||
*/ | ||
public $eTicket; | ||
|
||
/** | ||
* @var SequenceRange[] | ||
*/ | ||
public $sequenceRanges = []; | ||
|
||
/** | ||
* Void option. | ||
* | ||
* @var bool | ||
*/ | ||
public $void = false; | ||
|
||
/** | ||
* The targeted Airline Stock Provider (two-character code). | ||
* | ||
* @var string | ||
*/ | ||
public $airlineStockProvider; | ||
|
||
/** | ||
* The targeted Market Stock Provider (two-character code). | ||
* | ||
* @var string | ||
*/ | ||
public $marketStockProvider; | ||
|
||
/** | ||
* Office ID. | ||
* | ||
* @var string | ||
*/ | ||
public $officeId; | ||
} |
45 changes: 45 additions & 0 deletions
45
src/Amadeus/Client/ResponseHandler/Ticket/HandlerCancelDocument.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,45 @@ | ||
<?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; | ||
|
||
use Amadeus\Client\ResponseHandler\StandardResponseHandler; | ||
use Amadeus\Client\Result; | ||
use Amadeus\Client\Session\Handler\SendResult; | ||
|
||
/** | ||
* Ticket_CancelDocument response handler | ||
* | ||
* @package Amadeus\Client\ResponseHandler\Ticket | ||
* @author Dieter Devlieghere <dermikagh@gmail.com> | ||
*/ | ||
class HandlerCancelDocument extends StandardResponseHandler | ||
{ | ||
/** | ||
* @param SendResult $response | ||
* @return Result | ||
*/ | ||
public function analyze(SendResult $response) | ||
{ | ||
return $this->analyzeSimpleResponseErrorCodeAndMessage($response); | ||
} | ||
} |
Oops, something went wrong.