1 | <?php |
||
7 | class AutocompleteQuery extends Query |
||
8 | { |
||
9 | public const EXTRAS_ID_FORECAST = 'forecast'; |
||
10 | public const EXTRAS_ID_TIMEZONES = 'timezones'; |
||
11 | public const EXTRAS_ID_THEMES = 'themes'; |
||
12 | public const EXTRAS_ID_ENDORSEMENTS = 'endorsements'; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected static $uri = '/autocomplete'; |
||
18 | |||
19 | /** |
||
20 | * Search text. |
||
21 | * It is part or full name of a hotel, another destination or a theme. |
||
22 | * It must be at least 3 characters long. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $text; |
||
27 | |||
28 | /** |
||
29 | * Language code in which to display the results. |
||
30 | * |
||
31 | * @var string like 'en' |
||
32 | */ |
||
33 | protected $language; |
||
34 | |||
35 | /** |
||
36 | * Partner affiliate id that will be appended to the search page URLs. |
||
37 | * |
||
38 | * @var string like '000000' |
||
39 | */ |
||
40 | protected $affiliate_id; |
||
41 | |||
42 | /** |
||
43 | * Specify here what extra items of the result should be included. |
||
44 | * See the endpoint description for more detailed information about each extra. |
||
45 | * |
||
46 | * @var array |
||
47 | */ |
||
48 | protected $extras; |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getText(): string |
||
57 | |||
58 | /** |
||
59 | * @param string $text |
||
60 | * @return AutocompleteQuery |
||
61 | */ |
||
62 | public function setText(string $text): self |
||
67 | |||
68 | /** |
||
69 | * @return string |
||
70 | */ |
||
71 | public function getLanguage(): string |
||
75 | |||
76 | /** |
||
77 | * @param string $language |
||
78 | * @return AutocompleteQuery |
||
79 | */ |
||
80 | public function setLanguage(string $language): self |
||
85 | |||
86 | /** |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getAffiliateId(): string |
||
93 | |||
94 | /** |
||
95 | * @param string $affiliate_id |
||
96 | * @return AutocompleteQuery |
||
97 | */ |
||
98 | public function setAffiliateId(string $affiliate_id): self |
||
103 | |||
104 | /** |
||
105 | * @return null|array |
||
106 | */ |
||
107 | public function getExtras(): ?array |
||
111 | |||
112 | /** |
||
113 | * @param array $extras |
||
114 | * @return AutocompleteQuery |
||
115 | */ |
||
116 | public function setExtras(array $extras): self |
||
122 | |||
123 | /** |
||
124 | * @return self |
||
125 | */ |
||
126 | public function withExtras(): self |
||
137 | |||
138 | /** |
||
139 | * @return array |
||
140 | */ |
||
141 | protected function getAttributeMap(): array |
||
150 | |||
151 | /** |
||
152 | * @return bool |
||
153 | */ |
||
154 | protected function isSecure(): bool |
||
158 | |||
159 | /** |
||
160 | * @return string |
||
161 | */ |
||
162 | protected function model(): string |
||
166 | } |
||
167 |