HotelSearchRequest class

Constructors

HotelSearchRequest({HotelSearchCriteria? searchCriteria, required DateTime checkIn, required DateTime checkOut, List<RoomOccupancyInput> rooms = const [], required String? guestNationality, String? guestCountryOfResidence, HotelSearchFilters? filters, String? cursor, int? limit, String? currency})
Returns a new HotelSearchRequest instance.

Properties

checkIn ↔ DateTime
Check-in date (yyyy-MM-dd); today or later.
getter/setter pair
checkOut ↔ DateTime
Check-out date (yyyy-MM-dd); after checkIn, at most 30 nights later.
getter/setter pair
currency ↔ String?
Three-letter ISO 4217 price currency; the API key's currency when omitted.
getter/setter pair
cursor ↔ String?
Location searches only: the previous response's nextCursor, to get the next page. Opaque; do not build or change it. A malformed cursor returns 400.
getter/setter pair
filters ↔ HotelSearchFilters?
Optional filters on star rating, price, board type and amenities.
getter/setter pair
guestCountryOfResidence ↔ String?
Guests' country of residence as a two-letter ISO 3166-1 alpha-2 code. Optional; defaults to guestNationality.
getter/setter pair
guestNationality ↔ String?
Guests' nationality as a two-letter ISO 3166-1 alpha-2 code, for example AE. Required: rates are priced for this market.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
limit ↔ int?
Location searches only: hotels per page, 1–50 (default 20); larger values are capped at 50.
getter/setter pair
rooms ↔ List<RoomOccupancyInput>
One entry per room, 1–9 rooms. Each room is matched by its 1-based position when ordering.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
searchCriteria ↔ HotelSearchCriteria?
What to search: location or hotelIds. Required.
getter/setter pair

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

Constants

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