hotelsQuoteWithHttpInfo method
- HotelOrderRequest? hotelOrderRequest,
- Future<
void> ? abortTrigger,
Quote hotel rates
Prices up to 5 searched or quoted rates again with the hotel system and issues a new offer for each. Takes the same body as order, { currency, referenceId, items }, and checks it the same way: the whole body first, so a body error gives 400 / 10001 also when it is in a later item, then each item completely (its inputs, its publicId, then a fresh price from the hotel system) before the next, in request order. inputs may be left out; when sent, they are checked as the order checks them. The body and every object in it reject an unknown member (400 / 10001). Stay dates and rooms come from the offer and are returned in each item's details. Nothing is charged or reserved. Each item returns a new publicId for its rate at the current price (the whole stay, all rooms and nights): order with it before details.expiresAt, which is at most 30 minutes away and never past an expiry the hotel system states. A price that rose since the search is returned with 200; only inputs.maxPrice stops a quote, with 409 / 11002 at items[i].inputs.maxPrice. details.availability is onRequest for a rate that is held only on request, which an order refuses with 409 / 11003. Errors name the failing item: a rate that is no longer sold is 409 / 11003, and an unknown, expired or another partner's publicId, another product's offer, a hotel's own id or an expired search session (search again) is 400 / 11004, each at items[i]; input errors (400 / 10001) are at items[i].inputs…. Offer and hotel-system failures return their hotel codes without a path: 503 / 21003 when offers are temporarily unavailable, 21007–21009, and 400 / 21010 when the hotel's room layout no longer matches the searched occupancy (search again).
Note: This method returns the HTTP Response.
Parameters:
- HotelOrderRequest hotelOrderRequest:
Implementation
Future<Response> hotelsQuoteWithHttpInfo({ HotelOrderRequest? hotelOrderRequest, Future<void>? abortTrigger, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/b2b/hotels/quote';
// ignore: prefer_final_locals
Object? postBody = hotelOrderRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json', 'text/json', 'application/*+json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
abortTrigger: abortTrigger,
);
}