HotelAvailability::getAttributeMap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 19
ccs 0
cts 19
cp 0
rs 9.6333
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace DJStarCOM\BookingComSDK\Models;
4
5
use stdClass;
6
7
/**
8
 * @package DJStarCOM\BookingComSDK\Models
9
 */
10
class HotelAvailability extends Model
11
{
12
    /**
13
     * @var int
14
     */
15
    protected $hotel_id;
16
17
    /**
18
     * @var string
19
     */
20
    protected $hotel_name;
21
22
    /**
23
     * @var string
24
     */
25
    protected $stars;
26
27
    /**
28
     * @var string
29
     */
30
    protected $country;
31
32
    /**
33
     * @var stdClass
34
     */
35
    protected $location;
36
37
    /**
38
     * @var string
39
     */
40
    protected $address;
41
42
    /**
43
     * @var array
44
     */
45
    protected $rooms;
46
47
    /**
48
     * @var array
49
     */
50
    protected $hotel_amenities;
51
52
    /**
53
     * @var float
54
     */
55
    protected $price;
56
57
    /**
58
     * @var string
59
     */
60
    protected $hotel_currency_code;
61
62
    /**
63
     * @var stdClass
64
     */
65
    protected $checkin_time;
66
67
    /**
68
     * @var string
69
     */
70
    protected $default_language;
71
72
    /**
73
     * @var string
74
     */
75
    protected $postcode;
76
77
    /**
78
     * @var stdClass
79
     */
80
    protected $cheapest_breakfast_rate;
81
82
    /**
83
     * @return int|null|string
84
     */
85
    public function getPrimaryKey()
86
    {
87
        return $this->hotel_id;
88
    }
89
90
    /**
91
     * Unique ID to represent this hotel.
92
     * @return int
93
     */
94
    public function getHotelId(): int
95
    {
96
        return $this->hotel_id;
97
    }
98
99
    /**
100
     * The name of the hotel
101
     * @return string
102
     */
103
    public function getHotelName(): ?string
104
    {
105
        return $this->hotel_name;
106
    }
107
108
    /**
109
     * The star rating of the hotel.
110
     * @return string
111
     */
112
    public function getStars(): ?string
113
    {
114
        return $this->stars;
115
    }
116
117
    /**
118
     * The country that the hotel is located in.
119
     * @return string
120
     */
121
    public function getCountry(): ?string
122
    {
123
        return $this->country;
124
    }
125
126
    /**
127
     * Latitude and longitude of the hotel. Controlled by a setting.
128
     * @return object
129
     */
130
    public function getLocation(): ?stdClass
131
    {
132
        return $this->location;
133
    }
134
135
    /**
136
     * The address of the hotel.
137
     * @return string
138
     */
139
    public function getAddress(): ?string
140
    {
141
        return $this->address;
142
    }
143
144
    /**
145
     * Group of rooms
146
     * @return array
147
     */
148
    public function getRooms(): ?array
149
    {
150
        return $this->rooms;
151
    }
152
153
    /**
154
     * Amenities that are available at this hotel
155
     * @return array
156
     */
157
    public function getHotelAmenities(): ?array
158
    {
159
        return $this->hotel_amenities;
160
    }
161
162
    /**
163
     * The display price of the room in this hotel.
164
     * @return float
165
     */
166
    public function getPrice(): ?float
167
    {
168
        return $this->price;
169
    }
170
171
    /**
172
     * The currency code of the hotel's currency.
173
     * @return string
174
     */
175
    public function getHotelCurrencyCode(): ?string
176
    {
177
        return $this->hotel_currency_code;
178
    }
179
180
    /**
181
     * The time that the hotel accept guests checking in.
182
     * @return object
183
     */
184
    public function getCheckinTime(): ?stdClass
185
    {
186
        return $this->checkin_time;
187
    }
188
189
    /**
190
     * The default language of the hotel.
191
     * @return string
192
     */
193
    public function getDefaultLanguage(): ?string
194
    {
195
        return $this->default_language;
196
    }
197
198
    /**
199
     * The postcode or zipcode of the hotel.
200
     * @return string
201
     */
202
    public function getPostcode(): ?string
203
    {
204
        return $this->postcode;
205
    }
206
207
    /**
208
     * The minimum price of the room, and other room associated information.
209
     * @return object
210
     */
211
    public function getCheapestBreakfastRate(): ?stdClass
212
    {
213
        return $this->cheapest_breakfast_rate;
214
    }
215
216
    /**
217
     * @return array
218
     */
219
    protected function getAttributeMap(): array
220
    {
221
        return [
222
            'hotel_id'                => 'integer',
223
            'hotel_name'              => 'string',
224
            'stars'                   => 'string',
225
            'country'                 => 'string',
226
            'location'                => 'object',
227
            'address'                 => 'string',
228
            'rooms'                   => 'array',
229
            'hotel_amenities'         => 'array',
230
            'price'                   => 'float',
231
            'hotel_currency_code'     => 'string',
232
            'checkin_time'            => 'object',
233
            'default_language'        => 'string',
234
            'postcode'                => 'string',
235
            'cheapest_breakfast_rate' => 'object',
236
        ];
237
    }
238
}
239