-
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_UpdateRefund (only waiver codes for now) (#407)
Implemented Ticket_UpdateRefund. For now only waiver codes are supported.
- Loading branch information
Showing
16 changed files
with
620 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
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/UpdateRefundConv.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\TicketUpdateRefundOptions; | ||
use Amadeus\Client\Struct; | ||
|
||
/** | ||
* Ticket_UpdateRefund request converter | ||
* | ||
* @package Amadeus\Client\RequestCreator\Converter\Ticket | ||
* @author Vladimir Kikot <[email protected]> | ||
*/ | ||
class UpdateRefundConv extends BaseConverter | ||
{ | ||
/** | ||
* @param TicketUpdateRefundOptions $requestOptions | ||
* @param int|string $version | ||
* @return Struct\Ticket\UpdateRefund | ||
*/ | ||
public function convert($requestOptions, $version) | ||
{ | ||
return new Struct\Ticket\UpdateRefund($requestOptions); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
src/Amadeus/Client/RequestOptions/TicketUpdateRefundOptions.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,41 @@ | ||
<?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; | ||
|
||
/** | ||
* TicketUpdateRefundOptions Request Options | ||
* | ||
* @package Amadeus\Client\RequestOptions | ||
* @author Vladimir Kikot <[email protected]> | ||
*/ | ||
class TicketUpdateRefundOptions extends Base | ||
{ | ||
/** @var int */ | ||
public $contractBundleId; | ||
|
||
/** @var string */ | ||
public $waiverCode; | ||
|
||
/** @var string */ | ||
public $version = '3.000'; | ||
} |
33 changes: 33 additions & 0 deletions
33
src/Amadeus/Client/ResponseHandler/Ticket/HandlerUpdateRefund.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; | ||
|
||
/** | ||
* HandlerUpdateRefund | ||
* | ||
* @package Amadeus\Client\ResponseHandler\Ticket | ||
* @author Vladimir Kikot <[email protected]> | ||
*/ | ||
class HandlerUpdateRefund extends HandlerInitRefund | ||
{ | ||
} |
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,53 @@ | ||
<?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\TicketUpdateRefundOptions; | ||
use Amadeus\Client\Struct\BaseWsMessage; | ||
use Amadeus\Client\Struct\Ticket\UpdateRefund\ContractBundle; | ||
|
||
/** | ||
* UpdateRefund request structure | ||
* | ||
* @package Amadeus\Client\Struct\Ticket | ||
* @author Vladimir Kikot <[email protected]> | ||
*/ | ||
class UpdateRefund extends BaseWsMessage | ||
{ | ||
/** @var ContractBundle $ContractBundle */ | ||
public $ContractBundle; | ||
|
||
/** @var string */ | ||
public $Version; | ||
|
||
/** | ||
* UpdateRefund constructor. | ||
* | ||
* @param TicketUpdateRefundOptions $options | ||
*/ | ||
public function __construct($options) | ||
{ | ||
$this->ContractBundle = new ContractBundle($options->contractBundleId, $options->waiverCode); | ||
$this->Version = $options->version; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
src/Amadeus/Client/Struct/Ticket/UpdateRefund/ContractBundle.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\Ticket\UpdateRefund; | ||
|
||
use Amadeus\Client\Struct\BaseWsMessage; | ||
|
||
/** | ||
* ContractBundle request structure | ||
* | ||
* @package Amadeus\Client\Struct\Ticket\UpdateRefund | ||
* @author Vladimir Kikot <[email protected]> | ||
*/ | ||
class ContractBundle extends BaseWsMessage | ||
{ | ||
/** @var int */ | ||
public $ID; | ||
|
||
/** @var WaiverCode */ | ||
public $WaiverCode; | ||
|
||
/** | ||
* ContractBundle constructor. | ||
* | ||
* @param int $id | ||
* @param string $waiverCode | ||
*/ | ||
public function __construct($id, $waiverCode) | ||
{ | ||
$this->ID = $id; | ||
$this->WaiverCode = new WaiverCode($waiverCode); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
src/Amadeus/Client/Struct/Ticket/UpdateRefund/WaiverCode.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,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\UpdateRefund; | ||
|
||
use Amadeus\Client\Struct\BaseWsMessage; | ||
|
||
/** | ||
* WaiverCode request structure | ||
* | ||
* @package Amadeus\Client\Struct\Ticket\UpdateRefund | ||
* @author Vladimir Kikot <[email protected]> | ||
*/ | ||
class WaiverCode extends BaseWsMessage | ||
{ | ||
/** @var string */ | ||
public $Code; | ||
|
||
/** | ||
* WaiverCode constructor. | ||
* | ||
* @param string $waiverCode | ||
*/ | ||
public function __construct($waiverCode) | ||
{ | ||
$this->Code = $waiverCode; | ||
} | ||
} |
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
Oops, something went wrong.