1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Gueststream\PMS\IQWare\API; |
4
|
|
|
|
5
|
|
|
class SummaryItem |
6
|
|
|
{ |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* @var int $RoomIndex |
10
|
|
|
*/ |
11
|
|
|
protected $RoomIndex = null; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @var int $ID_CodeSrc |
15
|
|
|
*/ |
16
|
|
|
protected $ID_CodeSrc = null; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @var string $CodeName |
20
|
|
|
*/ |
21
|
|
|
protected $CodeName = null; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var PricingSBDItemType $ItemType |
25
|
|
|
*/ |
26
|
|
|
protected $ItemType = null; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var \DateTime $ADate |
30
|
|
|
*/ |
31
|
|
|
protected $ADate = null; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var string $QtyElem |
35
|
|
|
*/ |
36
|
|
|
protected $QtyElem = null; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var float $AmountBeforeTaxes |
40
|
|
|
*/ |
41
|
|
|
protected $AmountBeforeTaxes = null; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var float $Taxes |
45
|
|
|
*/ |
46
|
|
|
protected $Taxes = null; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var int $ID_Currency |
50
|
|
|
*/ |
51
|
|
|
protected $ID_Currency = null; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var boolean $InTheRate |
55
|
|
|
*/ |
56
|
|
|
protected $InTheRate = null; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @param int $RoomIndex |
60
|
|
|
* @param int $ID_CodeSrc |
61
|
|
|
* @param PricingSBDItemType $ItemType |
62
|
|
|
* @param \DateTime $ADate |
63
|
|
|
* @param float $AmountBeforeTaxes |
64
|
|
|
* @param float $Taxes |
65
|
|
|
* @param int $ID_Currency |
66
|
|
|
* @param boolean $InTheRate |
67
|
|
|
*/ |
68
|
|
View Code Duplication |
public function __construct($RoomIndex, $ID_CodeSrc, $ItemType, \DateTime $ADate, $AmountBeforeTaxes, $Taxes, $ID_Currency, $InTheRate) |
|
|
|
|
69
|
|
|
{ |
70
|
|
|
$this->RoomIndex = $RoomIndex; |
71
|
|
|
$this->ID_CodeSrc = $ID_CodeSrc; |
72
|
|
|
$this->ItemType = $ItemType; |
73
|
|
|
$this->ADate = $ADate->format(\DateTime::ATOM); |
|
|
|
|
74
|
|
|
$this->AmountBeforeTaxes = $AmountBeforeTaxes; |
75
|
|
|
$this->Taxes = $Taxes; |
76
|
|
|
$this->ID_Currency = $ID_Currency; |
77
|
|
|
$this->InTheRate = $InTheRate; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @return int |
82
|
|
|
*/ |
83
|
|
|
public function getRoomIndex() |
84
|
|
|
{ |
85
|
|
|
return $this->RoomIndex; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @param int $RoomIndex |
90
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
91
|
|
|
*/ |
92
|
|
|
public function setRoomIndex($RoomIndex) |
93
|
|
|
{ |
94
|
|
|
$this->RoomIndex = $RoomIndex; |
95
|
|
|
return $this; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return int |
100
|
|
|
*/ |
101
|
|
|
public function getID_CodeSrc() |
102
|
|
|
{ |
103
|
|
|
return $this->ID_CodeSrc; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @param int $ID_CodeSrc |
108
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
109
|
|
|
*/ |
110
|
|
|
public function setID_CodeSrc($ID_CodeSrc) |
111
|
|
|
{ |
112
|
|
|
$this->ID_CodeSrc = $ID_CodeSrc; |
113
|
|
|
return $this; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @return string |
118
|
|
|
*/ |
119
|
|
|
public function getCodeName() |
120
|
|
|
{ |
121
|
|
|
return $this->CodeName; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @param string $CodeName |
126
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
127
|
|
|
*/ |
128
|
|
|
public function setCodeName($CodeName) |
129
|
|
|
{ |
130
|
|
|
$this->CodeName = $CodeName; |
131
|
|
|
return $this; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @return PricingSBDItemType |
136
|
|
|
*/ |
137
|
|
|
public function getItemType() |
138
|
|
|
{ |
139
|
|
|
return $this->ItemType; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @param PricingSBDItemType $ItemType |
144
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
145
|
|
|
*/ |
146
|
|
|
public function setItemType($ItemType) |
147
|
|
|
{ |
148
|
|
|
$this->ItemType = $ItemType; |
149
|
|
|
return $this; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
/** |
153
|
|
|
* @return \DateTime |
154
|
|
|
*/ |
155
|
|
|
public function getADate() |
156
|
|
|
{ |
157
|
|
|
if ($this->ADate == null) { |
158
|
|
|
return null; |
159
|
|
|
} else { |
160
|
|
|
try { |
161
|
|
|
return new \DateTime($this->ADate); |
162
|
|
|
} catch (\Exception $e) { |
163
|
|
|
return false; |
164
|
|
|
} |
165
|
|
|
} |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* @param \DateTime $ADate |
170
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
171
|
|
|
*/ |
172
|
|
|
public function setADate(\DateTime $ADate) |
173
|
|
|
{ |
174
|
|
|
$this->ADate = $ADate->format(\DateTime::ATOM); |
|
|
|
|
175
|
|
|
return $this; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* @return string |
180
|
|
|
*/ |
181
|
|
|
public function getQtyElem() |
182
|
|
|
{ |
183
|
|
|
return $this->QtyElem; |
184
|
|
|
} |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* @param string $QtyElem |
188
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
189
|
|
|
*/ |
190
|
|
|
public function setQtyElem($QtyElem) |
191
|
|
|
{ |
192
|
|
|
$this->QtyElem = $QtyElem; |
193
|
|
|
return $this; |
194
|
|
|
} |
195
|
|
|
|
196
|
|
|
/** |
197
|
|
|
* @return float |
198
|
|
|
*/ |
199
|
|
|
public function getAmountBeforeTaxes() |
200
|
|
|
{ |
201
|
|
|
return $this->AmountBeforeTaxes; |
202
|
|
|
} |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* @param float $AmountBeforeTaxes |
206
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
207
|
|
|
*/ |
208
|
|
|
public function setAmountBeforeTaxes($AmountBeforeTaxes) |
209
|
|
|
{ |
210
|
|
|
$this->AmountBeforeTaxes = $AmountBeforeTaxes; |
211
|
|
|
return $this; |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* @return float |
216
|
|
|
*/ |
217
|
|
|
public function getTaxes() |
218
|
|
|
{ |
219
|
|
|
return $this->Taxes; |
220
|
|
|
} |
221
|
|
|
|
222
|
|
|
/** |
223
|
|
|
* @param float $Taxes |
224
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
225
|
|
|
*/ |
226
|
|
|
public function setTaxes($Taxes) |
227
|
|
|
{ |
228
|
|
|
$this->Taxes = $Taxes; |
229
|
|
|
return $this; |
230
|
|
|
} |
231
|
|
|
|
232
|
|
|
/** |
233
|
|
|
* @return int |
234
|
|
|
*/ |
235
|
|
|
public function getID_Currency() |
236
|
|
|
{ |
237
|
|
|
return $this->ID_Currency; |
238
|
|
|
} |
239
|
|
|
|
240
|
|
|
/** |
241
|
|
|
* @param int $ID_Currency |
242
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
243
|
|
|
*/ |
244
|
|
|
public function setID_Currency($ID_Currency) |
245
|
|
|
{ |
246
|
|
|
$this->ID_Currency = $ID_Currency; |
247
|
|
|
return $this; |
248
|
|
|
} |
249
|
|
|
|
250
|
|
|
/** |
251
|
|
|
* @return boolean |
252
|
|
|
*/ |
253
|
|
|
public function getInTheRate() |
254
|
|
|
{ |
255
|
|
|
return $this->InTheRate; |
256
|
|
|
} |
257
|
|
|
|
258
|
|
|
/** |
259
|
|
|
* @param boolean $InTheRate |
260
|
|
|
* @return \Gueststream\PMS\IQWare\API\SummaryItem |
261
|
|
|
*/ |
262
|
|
|
public function setInTheRate($InTheRate) |
263
|
|
|
{ |
264
|
|
|
$this->InTheRate = $InTheRate; |
265
|
|
|
return $this; |
266
|
|
|
} |
267
|
|
|
} |
268
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.