|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* amadeus-ws-client |
|
4
|
|
|
* |
|
5
|
|
|
* Copyright 2015 Amadeus Benelux NV |
|
6
|
|
|
* |
|
7
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
8
|
|
|
* you may not use this file except in compliance with the License. |
|
9
|
|
|
* You may obtain a copy of the License at |
|
10
|
|
|
* |
|
11
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
|
12
|
|
|
* |
|
13
|
|
|
* Unless required by applicable law or agreed to in writing, software |
|
14
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
|
15
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
16
|
|
|
* See the License for the specific language governing permissions and |
|
17
|
|
|
* limitations under the License. |
|
18
|
|
|
* |
|
19
|
|
|
* @package Amadeus |
|
20
|
|
|
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0 |
|
21
|
|
|
*/ |
|
22
|
|
|
|
|
23
|
|
|
namespace Amadeus\Client\Struct\DocRefund; |
|
24
|
|
|
|
|
25
|
|
|
use Amadeus\Client\RequestOptions\DocRefundInitRefundOptions; |
|
26
|
|
|
use Amadeus\Client\Struct\BaseWsMessage; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* DocRefund_InitRefund request structure |
|
30
|
|
|
* |
|
31
|
|
|
* @package Amadeus\Client\Struct\DocRefund |
|
32
|
|
|
* @author Dieter Devlieghere <[email protected]> |
|
33
|
|
|
*/ |
|
34
|
|
|
class InitRefund extends BaseWsMessage |
|
35
|
|
|
{ |
|
36
|
|
|
/** |
|
37
|
|
|
* @var TicketNumberGroup |
|
38
|
|
|
*/ |
|
39
|
|
|
public $ticketNumberGroup; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @var ActionDetails |
|
43
|
|
|
*/ |
|
44
|
|
|
public $actionDetails; |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* @var ItemNumberGroup |
|
48
|
|
|
*/ |
|
49
|
|
|
public $itemNumberGroup; |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* @var mixed |
|
53
|
|
|
*/ |
|
54
|
|
|
public $currencyOverride; |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* @var mixed |
|
58
|
|
|
*/ |
|
59
|
|
|
public $stockProviderDetails; |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* @var mixed |
|
63
|
|
|
*/ |
|
64
|
|
|
public $targetOfficeDetails; |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* @var mixed |
|
68
|
|
|
*/ |
|
69
|
|
|
public $transactionContext; |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* InitRefund constructor. |
|
73
|
|
|
* |
|
74
|
|
|
* @param DocRefundInitRefundOptions $options |
|
75
|
|
|
*/ |
|
76
|
6 |
|
public function __construct($options) |
|
77
|
|
|
{ |
|
78
|
6 |
|
if (!empty($options->ticketNumber)) { |
|
79
|
4 |
|
$this->ticketNumberGroup = new TicketNumberGroup($options->ticketNumber); |
|
80
|
4 |
|
} |
|
81
|
|
|
|
|
82
|
6 |
|
if (!empty($options->actionCodes)) { |
|
83
|
4 |
|
$this->actionDetails = new ActionDetails($options->actionCodes); |
|
84
|
4 |
|
} |
|
85
|
|
|
|
|
86
|
6 |
|
if ($this->checkAnyNotEmpty($options->itemNumber, $options->itemNumberType, $options->couponNumber)) { |
|
87
|
2 |
|
$this->itemNumberGroup = new ItemNumberGroup( |
|
88
|
2 |
|
$options->itemNumber, |
|
89
|
2 |
|
$options->itemNumberType, |
|
90
|
2 |
|
$options->couponNumber |
|
91
|
2 |
|
); |
|
92
|
2 |
|
} |
|
93
|
6 |
|
} |
|
94
|
|
|
} |
|
95
|
|
|
|