Hotel class

Constructors

Hotel({String? id, String? name, String? countryCode, String? category, String? logoUrl, String? description, List<HotelOffer> offers = const [], HotelDetails? details})
Returns a new Hotel instance.

Properties

category ↔ String?
Always null: the property type is not available yet.
getter/setter pair
countryCode ↔ String?
ISO 3166-1 alpha-2 code of the hotel's country; null when it is not known.
getter/setter pair
description ↔ String?
The stored hotel description, in HTML. Null on location-search pages, which leave it out.
getter/setter pair
details ↔ HotelDetails?
Hotel facts outside the item keys every partner service shares.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
id ↔ String?
The hotel's ID (hotel_…). Send it in searchCriteria.hotelIds to search this hotel again; it is not an offer and cannot be quoted or ordered. Stable for a hotel in the OpenRoam catalog; for any other hotel a temporary, partner-scoped ID that stops working after 30 minutes.
getter/setter pair
logoUrl ↔ String?
The hotel's main image, hosted by OpenRoam; null when there is none.
getter/setter pair
name ↔ String?
The hotel's name.
getter/setter pair
offers ↔ List<HotelOffer>
Orderable rates for the stay: every rate on a hotelIds search, the cheapest one on a location-search page.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Hotel?
Returns a new Hotel instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Hotel>
mapFromJson(dynamic json) → Map<String, Hotel>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Hotel>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.