hotelsGetPropertyWithHttpInfo method
Get a hotel
Returns one hotel's content: the item that search returns, without offers. Use it to show a hotel's information: name, description, star rating, address, images, amenities and contact. A hotel has no price without a stay, so the response has no offers key; send the id in a search's searchCriteria.hotelIds for its rates. The route serves the hotels of the OpenRoam catalog, as the catalog files list them. An ID that is unknown, not a hotel ID, or not in the catalog (such as a temporary ID a search gave a hotel outside the catalog) gives 404 / 10004. The route takes no query parameters.
Note: This method returns the HTTP Response.
Parameters:
- String id (required):
The hotel's
id(hotel_…) from search or the catalog files.
Implementation
Future<Response> hotelsGetPropertyWithHttpInfo(String id, { Future<void>? abortTrigger, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/b2b/hotels/properties/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
abortTrigger: abortTrigger,
);
}