1 | <?php |
||
10 | class Booking |
||
11 | { |
||
12 | const STATUS_NEW = 'new'; |
||
13 | const STATUS_MODIFIED = 'modified'; |
||
14 | const STATUS_CANCELLED = 'cancelled'; |
||
15 | |||
16 | /** |
||
17 | * OTA Id |
||
18 | * |
||
19 | * @Serializer\Expose() |
||
20 | * @Serializer\Type("string") |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $code; |
||
25 | |||
26 | /** |
||
27 | * hotel name (optional) |
||
28 | * |
||
29 | * @Serializer\Expose() |
||
30 | * @Serializer\Type("string") |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $name; |
||
35 | |||
36 | /** |
||
37 | * hotel id (optional) |
||
38 | * |
||
39 | * @Serializer\Expose() |
||
40 | * @Serializer\Type("string") |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $hotelId; |
||
45 | |||
46 | /** |
||
47 | * array of rooms booked |
||
48 | * |
||
49 | * @Serializer\Expose() |
||
50 | * @Serializer\Type("array<XoteliaClient\Model\Room>") |
||
51 | * |
||
52 | * @var array |
||
53 | */ |
||
54 | protected $rooms; |
||
55 | |||
56 | /** |
||
57 | * Not used anymore |
||
58 | * |
||
59 | * @Serializer\Expose() |
||
60 | * @Serializer\Type("float") |
||
61 | * |
||
62 | * @var float |
||
63 | */ |
||
64 | protected $price = 0; |
||
65 | |||
66 | /** |
||
67 | * Sum of all payment (deposit, total payment, ...) related to this booking |
||
68 | * |
||
69 | * @Serializer\Expose() |
||
70 | * @Serializer\Type("float") |
||
71 | * |
||
72 | * @var float |
||
73 | */ |
||
74 | protected $alreadyPaid; |
||
75 | |||
76 | /** |
||
77 | * Fees to charge on booking cancellation |
||
78 | * |
||
79 | * @Serializer\Expose() |
||
80 | * @Serializer\Type("float") |
||
81 | * |
||
82 | * @var float |
||
83 | */ |
||
84 | protected $totalCancellationFee; |
||
85 | |||
86 | /** |
||
87 | * Currency in which payment have to be paid |
||
88 | * |
||
89 | * @Serializer\Expose() |
||
90 | * @Serializer\Type("XoteliaClient\Model\Currency") |
||
91 | * |
||
92 | * @var \XoteliaClient\Model\Currency |
||
93 | */ |
||
94 | protected $currency; |
||
95 | |||
96 | /** |
||
97 | * Customer information |
||
98 | * |
||
99 | * @Serializer\Expose() |
||
100 | * @Serializer\Type("XoteliaClient\Model\Customer") |
||
101 | * |
||
102 | * @var \XoteliaClient\Model\Customer |
||
103 | */ |
||
104 | protected $customer; |
||
105 | |||
106 | /** |
||
107 | * OTA name |
||
108 | * |
||
109 | * @Serializer\Expose() |
||
110 | * @Serializer\Type("string") |
||
111 | * |
||
112 | * @var string |
||
113 | */ |
||
114 | protected $ota; |
||
115 | |||
116 | /** |
||
117 | * new/modified/cancelled |
||
118 | * |
||
119 | * @Serializer\Expose() |
||
120 | * @Serializer\Type("string") |
||
121 | * |
||
122 | * @var string |
||
123 | */ |
||
124 | protected $status; |
||
125 | |||
126 | /** |
||
127 | * @Serializer\Expose() |
||
128 | * @Serializer\Type("DateTime") |
||
129 | * |
||
130 | * @var \DateTime |
||
131 | */ |
||
132 | protected $createdByOtaAt; |
||
133 | |||
134 | /** |
||
135 | * ID provided by xotelia |
||
136 | * |
||
137 | * @Serializer\Expose() |
||
138 | * @Serializer\Type("string") |
||
139 | * |
||
140 | * @var string |
||
141 | */ |
||
142 | protected $internalId; |
||
143 | |||
144 | public function __construct() |
||
148 | |||
149 | /** |
||
150 | * @param string $code |
||
151 | * |
||
152 | * @return $this |
||
153 | */ |
||
154 | public function setCode($code) |
||
160 | |||
161 | /** |
||
162 | * @param $name |
||
163 | * |
||
164 | * @return $this |
||
165 | */ |
||
166 | public function setName($name) |
||
172 | |||
173 | /** |
||
174 | * @param float $price |
||
175 | * |
||
176 | * @return $this |
||
177 | */ |
||
178 | public function setPrice($price) |
||
184 | |||
185 | /** |
||
186 | * @param Currency $currency |
||
187 | * |
||
188 | * @return $this |
||
189 | */ |
||
190 | public function setCurrency(Currency $currency) |
||
196 | |||
197 | /** |
||
198 | * @param Customer $customer |
||
199 | * |
||
200 | * @return $this |
||
201 | */ |
||
202 | public function setCustomer(Customer $customer) |
||
208 | |||
209 | /** |
||
210 | * @param $ota |
||
211 | * |
||
212 | * @return $this |
||
213 | */ |
||
214 | public function setOta($ota) |
||
220 | |||
221 | /** |
||
222 | * @return string |
||
223 | */ |
||
224 | public function getCode() |
||
228 | |||
229 | /** |
||
230 | * @return string |
||
231 | */ |
||
232 | public function getName() |
||
236 | |||
237 | /** |
||
238 | * @return float |
||
239 | */ |
||
240 | public function getPrice() |
||
244 | |||
245 | /** |
||
246 | * @return Currency |
||
247 | */ |
||
248 | public function getCurrency() |
||
252 | |||
253 | /** |
||
254 | * @return Customer |
||
255 | */ |
||
256 | public function getCustomer() |
||
260 | |||
261 | /** |
||
262 | * @return string |
||
263 | */ |
||
264 | public function getOta() |
||
268 | |||
269 | /** |
||
270 | * @return string |
||
271 | */ |
||
272 | public function getStatus() |
||
276 | |||
277 | /** |
||
278 | * @param string $status |
||
279 | * |
||
280 | * @return $this |
||
281 | */ |
||
282 | public function setStatus($status) |
||
288 | |||
289 | /** |
||
290 | * @return float |
||
291 | */ |
||
292 | public function getTotalCancellationFee() |
||
296 | |||
297 | /** |
||
298 | * @param float $totalCancellationFee |
||
299 | * |
||
300 | * @return $this |
||
301 | */ |
||
302 | public function setTotalCancellationFee($totalCancellationFee) |
||
308 | |||
309 | /** |
||
310 | * @return Room[] |
||
311 | */ |
||
312 | public function getRooms() |
||
316 | |||
317 | /** |
||
318 | * @param array $rooms |
||
319 | * |
||
320 | * @return $this |
||
321 | */ |
||
322 | public function setRooms($rooms) |
||
328 | |||
329 | /** |
||
330 | * @return float |
||
331 | */ |
||
332 | public function getAlreadyPaid() |
||
336 | |||
337 | /** |
||
338 | * @param float $alreadyPaid |
||
339 | * |
||
340 | * @return $this |
||
341 | */ |
||
342 | public function setAlreadyPaid($alreadyPaid) |
||
348 | |||
349 | public function getStartDate() |
||
353 | |||
354 | public function getEndDate() |
||
358 | |||
359 | /** |
||
360 | * @return string |
||
361 | */ |
||
362 | public function getHotelId() |
||
366 | |||
367 | /** |
||
368 | * @param string $hotelId |
||
369 | * |
||
370 | * @return $this |
||
371 | */ |
||
372 | public function setHotelId($hotelId) |
||
378 | |||
379 | /** |
||
380 | * @return \DateTime |
||
381 | */ |
||
382 | public function getCreatedByOtaAt() |
||
386 | |||
387 | /** |
||
388 | * @param \DateTime $createdByOtaAt |
||
389 | * |
||
390 | * @return $this |
||
391 | */ |
||
392 | public function setCreatedByOtaAt($createdByOtaAt) |
||
398 | |||
399 | /** |
||
400 | * @return string |
||
401 | */ |
||
402 | public function getInternalId() |
||
406 | |||
407 | /** |
||
408 | * @param string $internalId |
||
409 | * |
||
410 | * @return $this |
||
411 | */ |
||
412 | public function setInternalId($internalId) |
||
418 | } |
||
419 |