1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace DJStarCOM\BookingComSDK\Query; |
4
|
|
|
|
5
|
|
|
use DateTime; |
6
|
|
|
use DJStarCOM\BookingComSDK\Models\HotelAvailability; |
7
|
|
|
|
8
|
|
|
class HotelAvailabilityQuery extends Query |
9
|
|
|
{ |
10
|
|
|
public const ORDER_BY_DISTANCE = 'distance'; |
11
|
|
|
public const ORDER_BY_POPULARITY = 'popularity'; |
12
|
|
|
public const ORDER_BY_PRICE = 'price'; |
13
|
|
|
public const ORDER_BY_RANKING = 'ranking'; |
14
|
|
|
public const ORDER_BY_REVIEW_SCORE = 'review_score'; |
15
|
|
|
public const ORDER_BY_STARS = 'stars'; |
16
|
|
|
public const ORDER_DIRECTION_ASC = 'asc'; |
17
|
|
|
public const ORDER_DIRECTION_DESC = 'desc'; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var string Shows cheapest breakfast rate for the hotel |
21
|
|
|
*/ |
22
|
|
|
public const EXTRAS_ADD_CHEAPEST_BREAKFAST_RATE = 'add_cheapest_breakfast_rate'; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var string Show amenities provided by hotel |
26
|
|
|
*/ |
27
|
|
|
public const EXTRAS_HOTEL_AMENITIES = 'hotel_amenities'; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var string Show extra hotel details |
31
|
|
|
*/ |
32
|
|
|
public const EXTRAS_HOTEL_DETAILS = 'hotel_details'; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var string Show payment terms like prepay or cancellation for the room |
36
|
|
|
*/ |
37
|
|
|
public const EXTRAS_PAYMENT_TERMS = 'payment_terms'; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var string Show amenities in the room |
41
|
|
|
*/ |
42
|
|
|
public const EXTRAS_ROOM_AMENITIES = 'room_amenities'; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @var string Show extra room details |
46
|
|
|
*/ |
47
|
|
|
public const EXTRAS_ROOM_DETAILS = 'room_details'; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @var string Show policies for the room |
51
|
|
|
*/ |
52
|
|
|
public const EXTRAS_ROOM_POLICIES = 'room_policies'; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @var string Only show hotels that have a reception that's open 24 hours/day |
56
|
|
|
*/ |
57
|
|
|
public const FILTER_IS_24HR = 'is_24hr'; |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @var string Filter to show only no_cc properties in the response. |
61
|
|
|
*/ |
62
|
|
|
public const FILTER_NO_CC_FILTER = 'no_cc_filter'; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @var string Do not show dormitory beds or rooms, or hotels that only have such rooms |
66
|
|
|
*/ |
67
|
|
|
public const FILTER_NO_DORMS = 'no_dorms'; |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* This is used when debugging or when you are initially setting up your integration. |
71
|
|
|
* A test hotel can be used to test all of our endpoints including making a booking |
72
|
|
|
* @var string |
73
|
|
|
*/ |
74
|
|
|
public const FILTER_SHOW_TEST = 'show_test'; |
75
|
|
|
|
76
|
|
|
public const ROOM_ADULT_GUEST = 'A'; |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @var string |
80
|
|
|
*/ |
81
|
|
|
protected static $uri = '/hotelAvailability'; |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* Limit the result list to the specified cities. You can get the list of city_ids from cities. |
85
|
|
|
*/ |
86
|
|
|
protected $city_ids; |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* Limit the result list to the specified regions. You can get the list of region_ids form regions. |
90
|
|
|
*/ |
91
|
|
|
protected $region_ids; |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* Limit the result list to the specified districts. You can get the list of district_ids from districts. |
95
|
|
|
*/ |
96
|
|
|
protected $district_ids; |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* Limit the result list to the specified hotels where they have availability for the specified guests and dates. |
100
|
|
|
*/ |
101
|
|
|
protected $hotel_ids; |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* The arrival date. Must be within 360 days in the future and in the format yyyy-mm-dd. |
105
|
|
|
*/ |
106
|
|
|
protected $checkin; |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* The departure date. Must be later than {checkin}. Must be between 1 and 30 days after {checkin}. |
110
|
|
|
* Must be within 360 days in the future and in the format yyyy-mm-dd. |
111
|
|
|
*/ |
112
|
|
|
protected $checkout; |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* The maximum number of entries to return (less can and often are returned). |
116
|
|
|
* This can be used together with {offset} to paginate through results. The default number returned is 1000. |
117
|
|
|
* When requesting 1000, there can be less than 1000 rows returned, but this does not mean the end of the resultset, |
118
|
|
|
* instead you should keep paginating by increasing the offset by 1000 until you get a page with 0 results - |
119
|
|
|
* that is what signifies the end. |
120
|
|
|
* @var int |
121
|
|
|
*/ |
122
|
|
|
protected $rows; |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* This is the index of item you wish to use as the starting point for this page (when paginating). |
126
|
|
|
* Used together with {rows} for pagination. Eg. rows=1000&offset=0 will be first 1000 results. |
127
|
|
|
* rows=1000&offset=1000 will be the next 1000. You should continue to increment the offset to paginate, |
128
|
|
|
* and you should use the value of rows as the number you increase by each time. |
129
|
|
|
* @var int |
130
|
|
|
*/ |
131
|
|
|
protected $offset; |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* Show the results in this language. Note: only some cities are translated. |
135
|
|
|
* @var string |
136
|
|
|
*/ |
137
|
|
|
protected $language; |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* Returns the price in this currency |
141
|
|
|
* @var string |
142
|
|
|
*/ |
143
|
|
|
protected $currency; |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* The way to order your results. (distance, popularity, price, ranking, review_score, stars) |
147
|
|
|
* @var string |
148
|
|
|
*/ |
149
|
|
|
protected $order_by; |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* The direction you wish for your order_by parameter to be ordered in. |
153
|
|
|
* Possible values are order_dir=asc for ascending or order_dir=desc for descending |
154
|
|
|
* @var string |
155
|
|
|
*/ |
156
|
|
|
protected $order_dir; |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* Returns extra results mentioned in this. |
160
|
|
|
* |
161
|
|
|
* Additional information available (via extras parameter) are: |
162
|
|
|
* add_cheapest_breakfast_rate: Shows cheapest breakfast rate for the hotel |
163
|
|
|
* hotel_amenities: Show amenities provided by hotel |
164
|
|
|
* hotel_details: Show extra hotel details |
165
|
|
|
* payment_terms: Show payment terms like prepay or cancellation for the room |
166
|
|
|
* room_amenities: Show amenities in the room |
167
|
|
|
* room_details: Show extra room details |
168
|
|
|
* room_policies: Show policies for the room |
169
|
|
|
* |
170
|
|
|
* @var array |
171
|
|
|
*/ |
172
|
|
|
protected $extras; |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* Limit the result list to the items satisfying the specified rules |
176
|
|
|
* |
177
|
|
|
* Available options to filter the output (via options parameter) are: |
178
|
|
|
* is_24hr: Only show hotels that have a reception that's open 24 hours/day |
179
|
|
|
* no_cc_filter: Filter to show only no_cc properties in the response. Added in version 2.1. |
180
|
|
|
* no_dorms: Do not show dormitory beds or rooms, or hotels that only have such rooms |
181
|
|
|
* show_test: This is used when debugging or when you are initially setting up your integration. |
182
|
|
|
* @var array |
183
|
|
|
*/ |
184
|
|
|
protected $filter; |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* A comma separated array of guests to stay in this room where "A" represents an adult and an integer |
188
|
|
|
* represents a child. eg room1=A,A,4 would be a room with 2 adults and 1 four year-old child. |
189
|
|
|
* Child age numbers are 0..17. |
190
|
|
|
* Similar parameters available for up to 30 rooms - room1..room30. |
191
|
|
|
*/ |
192
|
|
|
protected $room1; |
193
|
|
|
protected $room2; |
194
|
|
|
protected $room3; |
195
|
|
|
protected $room4; |
196
|
|
|
protected $room5; |
197
|
|
|
protected $room6; |
198
|
|
|
protected $room7; |
199
|
|
|
protected $room8; |
200
|
|
|
protected $room9; |
201
|
|
|
protected $room10; |
202
|
|
|
protected $room11; |
203
|
|
|
protected $room12; |
204
|
|
|
protected $room13; |
205
|
|
|
protected $room14; |
206
|
|
|
protected $room15; |
207
|
|
|
protected $room16; |
208
|
|
|
protected $room17; |
209
|
|
|
protected $room18; |
210
|
|
|
protected $room19; |
211
|
|
|
protected $room20; |
212
|
|
|
protected $room21; |
213
|
|
|
protected $room22; |
214
|
|
|
protected $room23; |
215
|
|
|
protected $room24; |
216
|
|
|
protected $room25; |
217
|
|
|
protected $room26; |
218
|
|
|
protected $room27; |
219
|
|
|
protected $room28; |
220
|
|
|
protected $room29; |
221
|
|
|
protected $room30; |
222
|
|
|
|
223
|
|
|
/** |
224
|
|
|
* @return bool |
225
|
|
|
*/ |
226
|
|
|
public function isSecure(): bool |
227
|
|
|
{ |
228
|
|
|
return false; |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* @return array |
233
|
|
|
*/ |
234
|
|
|
public function getCityIds(): ?array |
235
|
|
|
{ |
236
|
|
|
return $this->city_ids; |
237
|
|
|
} |
238
|
|
|
|
239
|
|
|
/** |
240
|
|
|
* @param array $city_ids |
241
|
|
|
* @return self |
242
|
|
|
*/ |
243
|
|
|
public function setCityIds(array $city_ids): self |
244
|
|
|
{ |
245
|
|
|
$this->city_ids = $city_ids; |
246
|
|
|
|
247
|
|
|
return $this; |
248
|
|
|
} |
249
|
|
|
|
250
|
|
|
/** |
251
|
|
|
* @return array |
252
|
|
|
*/ |
253
|
|
|
public function getRegionIds(): ?array |
254
|
|
|
{ |
255
|
|
|
return $this->region_ids; |
256
|
|
|
} |
257
|
|
|
|
258
|
|
|
/** |
259
|
|
|
* @param array $region_ids |
260
|
|
|
* @return self |
261
|
|
|
*/ |
262
|
|
|
public function setRegionIds(array $region_ids): self |
263
|
|
|
{ |
264
|
|
|
$this->region_ids = $region_ids; |
265
|
|
|
|
266
|
|
|
return $this; |
267
|
|
|
} |
268
|
|
|
|
269
|
|
|
/** |
270
|
|
|
* @return array |
271
|
|
|
*/ |
272
|
|
|
public function getDistrictIds(): ?array |
273
|
|
|
{ |
274
|
|
|
return $this->district_ids; |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
/** |
278
|
|
|
* @param array $district_ids |
279
|
|
|
* @return self |
280
|
|
|
*/ |
281
|
|
|
public function setDistrictIds(array $district_ids): self |
282
|
|
|
{ |
283
|
|
|
$this->district_ids = $district_ids; |
284
|
|
|
|
285
|
|
|
return $this; |
286
|
|
|
} |
287
|
|
|
|
288
|
|
|
/** |
289
|
|
|
* @return array |
290
|
|
|
*/ |
291
|
|
|
public function getHotelIds(): ?array |
292
|
|
|
{ |
293
|
|
|
return $this->hotel_ids; |
294
|
|
|
} |
295
|
|
|
|
296
|
|
|
/** |
297
|
|
|
* @param array $hotel_ids |
298
|
|
|
* @return self |
299
|
|
|
*/ |
300
|
|
|
public function setHotelIds(array $hotel_ids): self |
301
|
|
|
{ |
302
|
|
|
$this->hotel_ids = $hotel_ids; |
303
|
|
|
|
304
|
|
|
return $this; |
305
|
|
|
} |
306
|
|
|
|
307
|
|
|
/** |
308
|
|
|
* @return string |
309
|
|
|
*/ |
310
|
|
|
public function getCheckin(): ?string |
311
|
|
|
{ |
312
|
|
|
return $this->checkin; |
313
|
|
|
} |
314
|
|
|
|
315
|
|
|
/** |
316
|
|
|
* @param DateTime $checkin |
317
|
|
|
* @return self |
318
|
|
|
*/ |
319
|
|
|
public function setCheckin(DateTime $checkin): self |
320
|
|
|
{ |
321
|
|
|
$this->checkin = $checkin->format('Y-m-d'); |
322
|
|
|
|
323
|
|
|
return $this; |
324
|
|
|
} |
325
|
|
|
|
326
|
|
|
/** |
327
|
|
|
* @return string |
328
|
|
|
*/ |
329
|
|
|
public function getCheckout(): ?string |
330
|
|
|
{ |
331
|
|
|
return $this->checkout; |
332
|
|
|
} |
333
|
|
|
|
334
|
|
|
/** |
335
|
|
|
* @param DateTime $checkout |
336
|
|
|
* @return self |
337
|
|
|
*/ |
338
|
|
|
public function setCheckout(DateTime $checkout): self |
339
|
|
|
{ |
340
|
|
|
$this->checkout = $checkout->format('Y-m-d'); |
341
|
|
|
|
342
|
|
|
return $this; |
343
|
|
|
} |
344
|
|
|
|
345
|
|
|
/** |
346
|
|
|
* @return int |
347
|
|
|
*/ |
348
|
|
|
public function getRows(): ?int |
349
|
|
|
{ |
350
|
|
|
return $this->rows; |
351
|
|
|
} |
352
|
|
|
|
353
|
|
|
/** |
354
|
|
|
* @param int $rows |
355
|
|
|
* @return self |
356
|
|
|
*/ |
357
|
|
|
public function setRows(int $rows): self |
358
|
|
|
{ |
359
|
|
|
$this->rows = $rows; |
360
|
|
|
|
361
|
|
|
return $this; |
362
|
|
|
} |
363
|
|
|
|
364
|
|
|
/** |
365
|
|
|
* @return string |
366
|
|
|
*/ |
367
|
|
|
public function getLanguage(): ?string |
368
|
|
|
{ |
369
|
|
|
return $this->language; |
370
|
|
|
} |
371
|
|
|
|
372
|
|
|
/** |
373
|
|
|
* @param string $language |
374
|
|
|
* @return self |
375
|
|
|
*/ |
376
|
|
|
public function setLanguage(string $language): self |
377
|
|
|
{ |
378
|
|
|
$this->language = $language; |
379
|
|
|
|
380
|
|
|
return $this; |
381
|
|
|
} |
382
|
|
|
|
383
|
|
|
/** |
384
|
|
|
* @return array |
385
|
|
|
*/ |
386
|
|
|
public function getRoom1(): ?array |
387
|
|
|
{ |
388
|
|
|
return $this->room1; |
389
|
|
|
} |
390
|
|
|
|
391
|
|
|
/** |
392
|
|
|
* @param array $room1 |
393
|
|
|
* @return self |
394
|
|
|
*/ |
395
|
|
|
public function setRoom1(array $room1): self |
396
|
|
|
{ |
397
|
|
|
$this->room1 = $room1; |
398
|
|
|
|
399
|
|
|
return $this; |
400
|
|
|
} |
401
|
|
|
|
402
|
|
|
/** |
403
|
|
|
* @return array |
404
|
|
|
*/ |
405
|
|
|
public function getRoom2(): ?array |
406
|
|
|
{ |
407
|
|
|
return $this->room2; |
408
|
|
|
} |
409
|
|
|
|
410
|
|
|
/** |
411
|
|
|
* @param array $room2 |
412
|
|
|
* @return self |
413
|
|
|
*/ |
414
|
|
|
public function setRoom2(array $room2): self |
415
|
|
|
{ |
416
|
|
|
$this->room2 = $room2; |
417
|
|
|
|
418
|
|
|
return $this; |
419
|
|
|
} |
420
|
|
|
|
421
|
|
|
/** |
422
|
|
|
* @return array |
423
|
|
|
*/ |
424
|
|
|
public function getRoom3(): ?array |
425
|
|
|
{ |
426
|
|
|
return $this->room3; |
427
|
|
|
} |
428
|
|
|
|
429
|
|
|
/** |
430
|
|
|
* @param array $room3 |
431
|
|
|
* @return self |
432
|
|
|
*/ |
433
|
|
|
public function setRoom3(array $room3): self |
434
|
|
|
{ |
435
|
|
|
$this->room3 = $room3; |
436
|
|
|
|
437
|
|
|
return $this; |
438
|
|
|
} |
439
|
|
|
|
440
|
|
|
/** |
441
|
|
|
* @return array |
442
|
|
|
*/ |
443
|
|
|
public function getRoom4(): ?array |
444
|
|
|
{ |
445
|
|
|
return $this->room4; |
446
|
|
|
} |
447
|
|
|
|
448
|
|
|
/** |
449
|
|
|
* @param array $room4 |
450
|
|
|
* @return self |
451
|
|
|
*/ |
452
|
|
|
public function setRoom4(array $room4): self |
453
|
|
|
{ |
454
|
|
|
$this->room4 = $room4; |
455
|
|
|
|
456
|
|
|
return $this; |
457
|
|
|
} |
458
|
|
|
|
459
|
|
|
/** |
460
|
|
|
* @return array |
461
|
|
|
*/ |
462
|
|
|
public function getRoom5(): ?array |
463
|
|
|
{ |
464
|
|
|
return $this->room5; |
465
|
|
|
} |
466
|
|
|
|
467
|
|
|
/** |
468
|
|
|
* @param array $room5 |
469
|
|
|
* @return self |
470
|
|
|
*/ |
471
|
|
|
public function setRoom5(array $room5): self |
472
|
|
|
{ |
473
|
|
|
$this->room5 = $room5; |
474
|
|
|
|
475
|
|
|
return $this; |
476
|
|
|
} |
477
|
|
|
|
478
|
|
|
/** |
479
|
|
|
* @return array |
480
|
|
|
*/ |
481
|
|
|
public function getRoom6(): ?array |
482
|
|
|
{ |
483
|
|
|
return $this->room6; |
484
|
|
|
} |
485
|
|
|
|
486
|
|
|
/** |
487
|
|
|
* @param array $room6 |
488
|
|
|
* @return self |
489
|
|
|
*/ |
490
|
|
|
public function setRoom6(array $room6): self |
491
|
|
|
{ |
492
|
|
|
$this->room6 = $room6; |
493
|
|
|
|
494
|
|
|
return $this; |
495
|
|
|
} |
496
|
|
|
|
497
|
|
|
/** |
498
|
|
|
* @return array |
499
|
|
|
*/ |
500
|
|
|
public function getRoom7(): ?array |
501
|
|
|
{ |
502
|
|
|
return $this->room7; |
503
|
|
|
} |
504
|
|
|
|
505
|
|
|
/** |
506
|
|
|
* @param array $room7 |
507
|
|
|
* @return self |
508
|
|
|
*/ |
509
|
|
|
public function setRoom7(array $room7): self |
510
|
|
|
{ |
511
|
|
|
$this->room7 = $room7; |
512
|
|
|
|
513
|
|
|
return $this; |
514
|
|
|
} |
515
|
|
|
|
516
|
|
|
/** |
517
|
|
|
* @return array |
518
|
|
|
*/ |
519
|
|
|
public function getRoom8(): ?array |
520
|
|
|
{ |
521
|
|
|
return $this->room8; |
522
|
|
|
} |
523
|
|
|
|
524
|
|
|
/** |
525
|
|
|
* @param array $room8 |
526
|
|
|
* @return self |
527
|
|
|
*/ |
528
|
|
|
public function setRoom8(array $room8): self |
529
|
|
|
{ |
530
|
|
|
$this->room8 = $room8; |
531
|
|
|
|
532
|
|
|
return $this; |
533
|
|
|
} |
534
|
|
|
|
535
|
|
|
/** |
536
|
|
|
* @return array |
537
|
|
|
*/ |
538
|
|
|
public function getRoom9(): ?array |
539
|
|
|
{ |
540
|
|
|
return $this->room9; |
541
|
|
|
} |
542
|
|
|
|
543
|
|
|
/** |
544
|
|
|
* @param array $room9 |
545
|
|
|
* @return self |
546
|
|
|
*/ |
547
|
|
|
public function setRoom9(array $room9): self |
548
|
|
|
{ |
549
|
|
|
$this->room9 = $room9; |
550
|
|
|
|
551
|
|
|
return $this; |
552
|
|
|
} |
553
|
|
|
|
554
|
|
|
/** |
555
|
|
|
* @return array |
556
|
|
|
*/ |
557
|
|
|
public function getRoom10(): ?array |
558
|
|
|
{ |
559
|
|
|
return $this->room10; |
560
|
|
|
} |
561
|
|
|
|
562
|
|
|
/** |
563
|
|
|
* @param array $room10 |
564
|
|
|
* @return self |
565
|
|
|
*/ |
566
|
|
|
public function setRoom10(array $room10): self |
567
|
|
|
{ |
568
|
|
|
$this->room10 = $room10; |
569
|
|
|
|
570
|
|
|
return $this; |
571
|
|
|
} |
572
|
|
|
|
573
|
|
|
/** |
574
|
|
|
* @return array |
575
|
|
|
*/ |
576
|
|
|
public function getRoom11(): ?array |
577
|
|
|
{ |
578
|
|
|
return $this->room11; |
579
|
|
|
} |
580
|
|
|
|
581
|
|
|
/** |
582
|
|
|
* @param array $room11 |
583
|
|
|
* @return self |
584
|
|
|
*/ |
585
|
|
|
public function setRoom11(array $room11): self |
586
|
|
|
{ |
587
|
|
|
$this->room11 = $room11; |
588
|
|
|
|
589
|
|
|
return $this; |
590
|
|
|
} |
591
|
|
|
|
592
|
|
|
/** |
593
|
|
|
* @return array |
594
|
|
|
*/ |
595
|
|
|
public function getRoom12(): ?array |
596
|
|
|
{ |
597
|
|
|
return $this->room12; |
598
|
|
|
} |
599
|
|
|
|
600
|
|
|
/** |
601
|
|
|
* @param array $room12 |
602
|
|
|
* @return self |
603
|
|
|
*/ |
604
|
|
|
public function setRoom12(array $room12): self |
605
|
|
|
{ |
606
|
|
|
$this->room12 = $room12; |
607
|
|
|
|
608
|
|
|
return $this; |
609
|
|
|
} |
610
|
|
|
|
611
|
|
|
/** |
612
|
|
|
* @return array |
613
|
|
|
*/ |
614
|
|
|
public function getRoom13(): ?array |
615
|
|
|
{ |
616
|
|
|
return $this->room13; |
617
|
|
|
} |
618
|
|
|
|
619
|
|
|
/** |
620
|
|
|
* @param array $room13 |
621
|
|
|
* @return self |
622
|
|
|
*/ |
623
|
|
|
public function setRoom13(array $room13): self |
624
|
|
|
{ |
625
|
|
|
$this->room13 = $room13; |
626
|
|
|
|
627
|
|
|
return $this; |
628
|
|
|
} |
629
|
|
|
|
630
|
|
|
/** |
631
|
|
|
* @return array |
632
|
|
|
*/ |
633
|
|
|
public function getRoom14(): ?array |
634
|
|
|
{ |
635
|
|
|
return $this->room14; |
636
|
|
|
} |
637
|
|
|
|
638
|
|
|
/** |
639
|
|
|
* @param array $room14 |
640
|
|
|
* @return self |
641
|
|
|
*/ |
642
|
|
|
public function setRoom14(array $room14): self |
643
|
|
|
{ |
644
|
|
|
$this->room14 = $room14; |
645
|
|
|
|
646
|
|
|
return $this; |
647
|
|
|
} |
648
|
|
|
|
649
|
|
|
/** |
650
|
|
|
* @return array |
651
|
|
|
*/ |
652
|
|
|
public function getRoom15(): ?array |
653
|
|
|
{ |
654
|
|
|
return $this->room15; |
655
|
|
|
} |
656
|
|
|
|
657
|
|
|
/** |
658
|
|
|
* @param array $room15 |
659
|
|
|
* @return self |
660
|
|
|
*/ |
661
|
|
|
public function setRoom15(array $room15): self |
662
|
|
|
{ |
663
|
|
|
$this->room15 = $room15; |
664
|
|
|
|
665
|
|
|
return $this; |
666
|
|
|
} |
667
|
|
|
|
668
|
|
|
/** |
669
|
|
|
* @return array |
670
|
|
|
*/ |
671
|
|
|
public function getRoom16(): ?array |
672
|
|
|
{ |
673
|
|
|
return $this->room16; |
674
|
|
|
} |
675
|
|
|
|
676
|
|
|
/** |
677
|
|
|
* @param array $room16 |
678
|
|
|
* @return self |
679
|
|
|
*/ |
680
|
|
|
public function setRoom16(array $room16): self |
681
|
|
|
{ |
682
|
|
|
$this->room16 = $room16; |
683
|
|
|
|
684
|
|
|
return $this; |
685
|
|
|
} |
686
|
|
|
|
687
|
|
|
/** |
688
|
|
|
* @return array |
689
|
|
|
*/ |
690
|
|
|
public function getRoom17(): ?array |
691
|
|
|
{ |
692
|
|
|
return $this->room17; |
693
|
|
|
} |
694
|
|
|
|
695
|
|
|
/** |
696
|
|
|
* @param array $room17 |
697
|
|
|
* @return self |
698
|
|
|
*/ |
699
|
|
|
public function setRoom17(array $room17): self |
700
|
|
|
{ |
701
|
|
|
$this->room17 = $room17; |
702
|
|
|
|
703
|
|
|
return $this; |
704
|
|
|
} |
705
|
|
|
|
706
|
|
|
/** |
707
|
|
|
* @return array |
708
|
|
|
*/ |
709
|
|
|
public function getRoom18(): ?array |
710
|
|
|
{ |
711
|
|
|
return $this->room18; |
712
|
|
|
} |
713
|
|
|
|
714
|
|
|
/** |
715
|
|
|
* @param array $room18 |
716
|
|
|
* @return self |
717
|
|
|
*/ |
718
|
|
|
public function setRoom18(array $room18): self |
719
|
|
|
{ |
720
|
|
|
$this->room18 = $room18; |
721
|
|
|
|
722
|
|
|
return $this; |
723
|
|
|
} |
724
|
|
|
|
725
|
|
|
/** |
726
|
|
|
* @return array |
727
|
|
|
*/ |
728
|
|
|
public function getRoom19(): ?array |
729
|
|
|
{ |
730
|
|
|
return $this->room19; |
731
|
|
|
} |
732
|
|
|
|
733
|
|
|
/** |
734
|
|
|
* @param array $room19 |
735
|
|
|
* @return self |
736
|
|
|
*/ |
737
|
|
|
public function setRoom19(array $room19): self |
738
|
|
|
{ |
739
|
|
|
$this->room19 = $room19; |
740
|
|
|
|
741
|
|
|
return $this; |
742
|
|
|
} |
743
|
|
|
|
744
|
|
|
/** |
745
|
|
|
* @return array |
746
|
|
|
*/ |
747
|
|
|
public function getRoom20(): ?array |
748
|
|
|
{ |
749
|
|
|
return $this->room20; |
750
|
|
|
} |
751
|
|
|
|
752
|
|
|
/** |
753
|
|
|
* @param array $room20 |
754
|
|
|
* @return self |
755
|
|
|
*/ |
756
|
|
|
public function setRoom20(array $room20): self |
757
|
|
|
{ |
758
|
|
|
$this->room20 = $room20; |
759
|
|
|
|
760
|
|
|
return $this; |
761
|
|
|
} |
762
|
|
|
|
763
|
|
|
/** |
764
|
|
|
* @return array |
765
|
|
|
*/ |
766
|
|
|
public function getRoom21(): ?array |
767
|
|
|
{ |
768
|
|
|
return $this->room21; |
769
|
|
|
} |
770
|
|
|
|
771
|
|
|
/** |
772
|
|
|
* @param array $room21 |
773
|
|
|
* @return self |
774
|
|
|
*/ |
775
|
|
|
public function setRoom21(array $room21): self |
776
|
|
|
{ |
777
|
|
|
$this->room21 = $room21; |
778
|
|
|
|
779
|
|
|
return $this; |
780
|
|
|
} |
781
|
|
|
|
782
|
|
|
/** |
783
|
|
|
* @return array |
784
|
|
|
*/ |
785
|
|
|
public function getRoom22(): ?array |
786
|
|
|
{ |
787
|
|
|
return $this->room22; |
788
|
|
|
} |
789
|
|
|
|
790
|
|
|
/** |
791
|
|
|
* @param array $room22 |
792
|
|
|
* @return self |
793
|
|
|
*/ |
794
|
|
|
public function setRoom22(array $room22): self |
795
|
|
|
{ |
796
|
|
|
$this->room22 = $room22; |
797
|
|
|
|
798
|
|
|
return $this; |
799
|
|
|
} |
800
|
|
|
|
801
|
|
|
/** |
802
|
|
|
* @return array |
803
|
|
|
*/ |
804
|
|
|
public function getRoom23(): ?array |
805
|
|
|
{ |
806
|
|
|
return $this->room23; |
807
|
|
|
} |
808
|
|
|
|
809
|
|
|
/** |
810
|
|
|
* @param array $room23 |
811
|
|
|
* @return self |
812
|
|
|
*/ |
813
|
|
|
public function setRoom23(array $room23): self |
814
|
|
|
{ |
815
|
|
|
$this->room23 = $room23; |
816
|
|
|
|
817
|
|
|
return $this; |
818
|
|
|
} |
819
|
|
|
|
820
|
|
|
/** |
821
|
|
|
* @return array |
822
|
|
|
*/ |
823
|
|
|
public function getRoom24(): ?array |
824
|
|
|
{ |
825
|
|
|
return $this->room24; |
826
|
|
|
} |
827
|
|
|
|
828
|
|
|
/** |
829
|
|
|
* @param array $room24 |
830
|
|
|
* @return self |
831
|
|
|
*/ |
832
|
|
|
public function setRoom24(array $room24): self |
833
|
|
|
{ |
834
|
|
|
$this->room24 = $room24; |
835
|
|
|
|
836
|
|
|
return $this; |
837
|
|
|
} |
838
|
|
|
|
839
|
|
|
/** |
840
|
|
|
* @return array |
841
|
|
|
*/ |
842
|
|
|
public function getRoom25(): ?array |
843
|
|
|
{ |
844
|
|
|
return $this->room25; |
845
|
|
|
} |
846
|
|
|
|
847
|
|
|
/** |
848
|
|
|
* @param array $room25 |
849
|
|
|
* @return self |
850
|
|
|
*/ |
851
|
|
|
public function setRoom25(array $room25): self |
852
|
|
|
{ |
853
|
|
|
$this->room25 = $room25; |
854
|
|
|
|
855
|
|
|
return $this; |
856
|
|
|
} |
857
|
|
|
|
858
|
|
|
/** |
859
|
|
|
* @return array |
860
|
|
|
*/ |
861
|
|
|
public function getRoom26(): ?array |
862
|
|
|
{ |
863
|
|
|
return $this->room26; |
864
|
|
|
} |
865
|
|
|
|
866
|
|
|
/** |
867
|
|
|
* @param array $room26 |
868
|
|
|
* @return self |
869
|
|
|
*/ |
870
|
|
|
public function setRoom26(array $room26): self |
871
|
|
|
{ |
872
|
|
|
$this->room26 = $room26; |
873
|
|
|
|
874
|
|
|
return $this; |
875
|
|
|
} |
876
|
|
|
|
877
|
|
|
/** |
878
|
|
|
* @return array |
879
|
|
|
*/ |
880
|
|
|
public function getRoom27(): ?array |
881
|
|
|
{ |
882
|
|
|
return $this->room27; |
883
|
|
|
} |
884
|
|
|
|
885
|
|
|
/** |
886
|
|
|
* @param array $room27 |
887
|
|
|
* @return self |
888
|
|
|
*/ |
889
|
|
|
public function setRoom27(array $room27): self |
890
|
|
|
{ |
891
|
|
|
$this->room27 = $room27; |
892
|
|
|
|
893
|
|
|
return $this; |
894
|
|
|
} |
895
|
|
|
|
896
|
|
|
/** |
897
|
|
|
* @return array |
898
|
|
|
*/ |
899
|
|
|
public function getRoom28(): ?array |
900
|
|
|
{ |
901
|
|
|
return $this->room28; |
902
|
|
|
} |
903
|
|
|
|
904
|
|
|
/** |
905
|
|
|
* @param array $room28 |
906
|
|
|
* @return self |
907
|
|
|
*/ |
908
|
|
|
public function setRoom28(array $room28): self |
909
|
|
|
{ |
910
|
|
|
$this->room28 = $room28; |
911
|
|
|
|
912
|
|
|
return $this; |
913
|
|
|
} |
914
|
|
|
|
915
|
|
|
/** |
916
|
|
|
* @return array |
917
|
|
|
*/ |
918
|
|
|
public function getRoom29(): ?array |
919
|
|
|
{ |
920
|
|
|
return $this->room29; |
921
|
|
|
} |
922
|
|
|
|
923
|
|
|
/** |
924
|
|
|
* @param array $room29 |
925
|
|
|
* @return self |
926
|
|
|
*/ |
927
|
|
|
public function setRoom29(array $room29): self |
928
|
|
|
{ |
929
|
|
|
$this->room29 = $room29; |
930
|
|
|
|
931
|
|
|
return $this; |
932
|
|
|
} |
933
|
|
|
|
934
|
|
|
/** |
935
|
|
|
* @return array |
936
|
|
|
*/ |
937
|
|
|
public function getRoom30(): ?array |
938
|
|
|
{ |
939
|
|
|
return $this->room30; |
940
|
|
|
} |
941
|
|
|
|
942
|
|
|
/** |
943
|
|
|
* @param array $room30 |
944
|
|
|
* @return self |
945
|
|
|
*/ |
946
|
|
|
public function setRoom30(array $room30): self |
947
|
|
|
{ |
948
|
|
|
$this->room30 = $room30; |
949
|
|
|
|
950
|
|
|
return $this; |
951
|
|
|
} |
952
|
|
|
|
953
|
|
|
/** |
954
|
|
|
* @return array |
955
|
|
|
*/ |
956
|
|
|
public function getExtras(): ?array |
957
|
|
|
{ |
958
|
|
|
return $this->extras; |
959
|
|
|
} |
960
|
|
|
|
961
|
|
|
/** |
962
|
|
|
* @param array $extras |
963
|
|
|
* @return self |
964
|
|
|
*/ |
965
|
|
|
public function setExtras(array $extras): self |
966
|
|
|
{ |
967
|
|
|
$this->extras = $extras; |
968
|
|
|
|
969
|
|
|
return $this; |
970
|
|
|
} |
971
|
|
|
|
972
|
|
|
public function withExtras() |
973
|
|
|
{ |
974
|
|
|
$this->extras = [ |
975
|
|
|
self::EXTRAS_ADD_CHEAPEST_BREAKFAST_RATE, |
976
|
|
|
self::EXTRAS_HOTEL_AMENITIES, |
977
|
|
|
self::EXTRAS_HOTEL_DETAILS, |
978
|
|
|
self::EXTRAS_PAYMENT_TERMS, |
979
|
|
|
self::EXTRAS_ROOM_AMENITIES, |
980
|
|
|
self::EXTRAS_ROOM_DETAILS, |
981
|
|
|
self::EXTRAS_ROOM_POLICIES, |
982
|
|
|
]; |
983
|
|
|
|
984
|
|
|
return $this; |
985
|
|
|
} |
986
|
|
|
|
987
|
|
|
/** |
988
|
|
|
* @return int |
989
|
|
|
*/ |
990
|
|
|
public function getOffset(): ?int |
991
|
|
|
{ |
992
|
|
|
return $this->offset; |
993
|
|
|
} |
994
|
|
|
|
995
|
|
|
/** |
996
|
|
|
* @param int $offset |
997
|
|
|
* @return self |
998
|
|
|
*/ |
999
|
|
|
public function setOffset(int $offset): self |
1000
|
|
|
{ |
1001
|
|
|
$this->offset = $offset; |
1002
|
|
|
|
1003
|
|
|
return $this; |
1004
|
|
|
} |
1005
|
|
|
|
1006
|
|
|
/** |
1007
|
|
|
* @return string |
1008
|
|
|
*/ |
1009
|
|
|
public function getCurrency(): ?string |
1010
|
|
|
{ |
1011
|
|
|
return $this->currency; |
1012
|
|
|
} |
1013
|
|
|
|
1014
|
|
|
/** |
1015
|
|
|
* @param string $currency |
1016
|
|
|
* @return self |
1017
|
|
|
*/ |
1018
|
|
|
public function setCurrency(string $currency): self |
1019
|
|
|
{ |
1020
|
|
|
$this->currency = $currency; |
1021
|
|
|
|
1022
|
|
|
return $this; |
1023
|
|
|
} |
1024
|
|
|
|
1025
|
|
|
/** |
1026
|
|
|
* @return string |
1027
|
|
|
*/ |
1028
|
|
|
public function getOrderBy(): ?string |
1029
|
|
|
{ |
1030
|
|
|
return $this->order_by; |
1031
|
|
|
} |
1032
|
|
|
|
1033
|
|
|
/** |
1034
|
|
|
* @param string $order_by |
1035
|
|
|
* @return self |
1036
|
|
|
*/ |
1037
|
|
|
public function setOrderBy(string $order_by): self |
1038
|
|
|
{ |
1039
|
|
|
$this->order_by = $order_by; |
1040
|
|
|
|
1041
|
|
|
return $this; |
1042
|
|
|
} |
1043
|
|
|
|
1044
|
|
|
/** |
1045
|
|
|
* @return string |
1046
|
|
|
*/ |
1047
|
|
|
public function getOrderDir(): ?string |
1048
|
|
|
{ |
1049
|
|
|
return $this->order_dir; |
1050
|
|
|
} |
1051
|
|
|
|
1052
|
|
|
/** |
1053
|
|
|
* @param string $order_dir |
1054
|
|
|
* @return self |
1055
|
|
|
*/ |
1056
|
|
|
public function setOrderDir(string $order_dir): self |
1057
|
|
|
{ |
1058
|
|
|
$this->order_dir = $order_dir; |
1059
|
|
|
|
1060
|
|
|
return $this; |
1061
|
|
|
} |
1062
|
|
|
|
1063
|
|
|
/** |
1064
|
|
|
* @return array |
1065
|
|
|
*/ |
1066
|
|
|
public function getFilter(): ?array |
1067
|
|
|
{ |
1068
|
|
|
return $this->filter; |
1069
|
|
|
} |
1070
|
|
|
|
1071
|
|
|
/** |
1072
|
|
|
* @param array $filter |
1073
|
|
|
* @return self |
1074
|
|
|
*/ |
1075
|
|
|
public function setFilter(array $filter): self |
1076
|
|
|
{ |
1077
|
|
|
$this->filter = $filter; |
1078
|
|
|
|
1079
|
|
|
return $this; |
1080
|
|
|
} |
1081
|
|
|
|
1082
|
|
|
protected function getAttributeMap(): array |
1083
|
|
|
{ |
1084
|
|
|
return [ |
1085
|
|
|
'city_ids' => 'array', |
1086
|
|
|
'region_ids' => 'array', |
1087
|
|
|
'district_ids' => 'array', |
1088
|
|
|
'hotel_ids' => 'array', |
1089
|
|
|
'checkin' => 'string', |
1090
|
|
|
'checkout' => 'string', |
1091
|
|
|
'rows' => 'integer', |
1092
|
|
|
'offset' => 'integer', |
1093
|
|
|
'language' => 'string', |
1094
|
|
|
'currency' => 'string', |
1095
|
|
|
'order_by' => 'string', |
1096
|
|
|
'order_dir' => 'string', |
1097
|
|
|
'extras' => 'array', |
1098
|
|
|
'filter' => 'array', |
1099
|
|
|
'room1' => 'array', |
1100
|
|
|
'room2' => 'array', |
1101
|
|
|
'room3' => 'array', |
1102
|
|
|
'room4' => 'array', |
1103
|
|
|
'room5' => 'array', |
1104
|
|
|
'room6' => 'array', |
1105
|
|
|
'room7' => 'array', |
1106
|
|
|
'room8' => 'array', |
1107
|
|
|
'room9' => 'array', |
1108
|
|
|
'room10' => 'array', |
1109
|
|
|
'room11' => 'array', |
1110
|
|
|
'room12' => 'array', |
1111
|
|
|
'room13' => 'array', |
1112
|
|
|
'room14' => 'array', |
1113
|
|
|
'room15' => 'array', |
1114
|
|
|
'room16' => 'array', |
1115
|
|
|
'room17' => 'array', |
1116
|
|
|
'room18' => 'array', |
1117
|
|
|
'room19' => 'array', |
1118
|
|
|
'room20' => 'array', |
1119
|
|
|
'room21' => 'array', |
1120
|
|
|
'room22' => 'array', |
1121
|
|
|
'room23' => 'array', |
1122
|
|
|
'room24' => 'array', |
1123
|
|
|
'room25' => 'array', |
1124
|
|
|
'room26' => 'array', |
1125
|
|
|
'room27' => 'array', |
1126
|
|
|
'room28' => 'array', |
1127
|
|
|
'room29' => 'array', |
1128
|
|
|
'room30' => 'array', |
1129
|
|
|
]; |
1130
|
|
|
} |
1131
|
|
|
|
1132
|
|
|
/** |
1133
|
|
|
* Specify Model class name. |
1134
|
|
|
* |
1135
|
|
|
* @return string |
1136
|
|
|
*/ |
1137
|
|
|
protected function model(): string |
1138
|
|
|
{ |
1139
|
|
|
return HotelAvailability::class; |
1140
|
|
|
} |
1141
|
|
|
} |
1142
|
|
|
|