@revolugo/booking-api-client
Version:
Javascript Revolugo Booking API Client (browser + server)
193 lines (192 loc) • 9.35 kB
TypeScript
import { CancellationPolicyApi } from './CancellationPolicyApi';
import { CurrencyClient } from './CurrencyClient';
import { HotelRoomApi } from './HotelRoomApi';
import { SourceMarket } from './SourceMarket';
import { TagApi } from './TagApi';
import { TaxApi } from './TaxApi';
/**
* Description of the Hotel Room Offer.
* @export
* @interface HotelRoomOfferApi
*/
export interface HotelRoomOfferApi {
/**
* Quantity of breakfast per night included in the given **Hotel Room Offer**
* @type {number}
* @memberof HotelRoomOfferApi
*/
breakfastCount?: number | null;
/**
* This parameter describes the breakfast option for the given **Hotel Room Offer**:
* - **breakfast_option = "INCLUDED"**:
* 1. When **HotelRoomOffer.type = "PACKAGE"**:
* the returned **Hotel Room Offer** includes breakfast for the requested **guest count (adult_count + children over 3)**, you cannot choose otherwise, and the returned **price** already includes it,
* 2. When **HotelRoomOffer.type = "HOTEL_ROOM"**:
* the returned **Hotel Room Offer** includes breakfast for the **Hotel Room Offer** maximum occupancy, you cannot choose otherwise, and the returned **price** already includes it,
* -**breakfast_option = "OPTIONAL"**: the returned **Hotel Room Offer** does not include by default the breakfast and so does the returned **price**, but you'll be able to let your customers choose to add it to their booking. In that case, a **breakfast_price_per_guest_per_night** expressed in the requested **currency** will be available in the returned data, and you'll be to perform one of the two following actions:
* - Call **[Create Hotel Room Offer endpoint](/v1/documentation#operation/postV1Hotel_room_offers)** and get a fresh **Hotel Room Offer** with updated price
* - Compute and display the total price of the **Hotel Room Offer** related to the guest_count and night count requested including extra breafasts.,
* - **breakfast_option = "NOT_INCLUDED"**: the returned **Hotel Room Offer** does not include breakfast and you cannot choose otherwise through API. Guest may still be able to add extra breakfast option(s) at the time of check-in directly at the hotel's reception.
* @type {string}
* @memberof HotelRoomOfferApi
*/
breakfastOption: HotelRoomOfferApiBreakfastOptionEnum;
/**
* Price of breakfast per guest per night for the given **Hotel Room Offer**, expressed in the requested **currency**, when applicable.
*
* <div style="background-color: #ffffef; padding: 20px; border: 1px solid lightgrey; border-radius: 5px;"><b style="color: red; margin-top: 10px;">🛑 DEPRECATED.</b>
*
* <b style="color: orange;">Field renamed to "breakfast_unit_price"</div>
* @type {number}
* @memberof HotelRoomOfferApi
*/
breakfastPricePerGuestPerNight?: number | null;
/**
* Price of breakfast per guest per night for the given **Hotel Room Offer**, expressed in the requested **currency**, when applicable.
* @type {number}
* @memberof HotelRoomOfferApi
*/
breakfastUnitPrice?: number | null;
/**
* The list of cancellation policies applied to the given **Hotel Room Offer**.
* @type {Array<CancellationPolicyApi>}
* @memberof HotelRoomOfferApi
*/
cancellationPolicies: Array<CancellationPolicyApi>;
/**
* When **type = HOTEL_ROOM**: this parameters represents the available quantity for the given **Hotel Room Offer**.
* When **type = PACKAGE**: count = 1 always.
* @type {number}
* @memberof HotelRoomOfferApi
*/
count?: number | null;
/**
*
* @type {CurrencyClient}
* @memberof HotelRoomOfferApi
*/
currency: CurrencyClient;
/**
* id of the associated Hotel.
* @type {string}
* @memberof HotelRoomOfferApi
*/
hotelId: string;
/**
* List of Hotel Rooms included in the Hotel Room Offer.
* @type {Array<HotelRoomApi>}
* @memberof HotelRoomOfferApi
*/
hotelRooms: Array<HotelRoomApi>;
/**
* Hotel Room Offer id.
* @type {string}
* @memberof HotelRoomOfferApi
*/
id?: string;
/**
* An **Hotel Room Offer** of type **PACKAGE** can be of **4 types**, described by **package_type** parameter:
*
* - **CHEAPEST** : The cheapest combination of hotel rooms that can accommodate the requested guest count. Note that it may not match the requested room count (e.g., 4 guests and 2 rooms requested may return an hotel room package including only 1 room with an occupancy of 4).
*
* -**MATCHING_ROOM_COUNT** : the cheapest hotel room package that can accommodate the given guest count and that matches exactly the room count given.
*
* -**BEST_MATCH** : The cheapest hotel room package that matches the given room and guest count with a balanced distribution of guests across the rooms (e.g.; 8 guests and 3 rooms requested may return an **Hotel Room Offer** package including 2 rooms with an occupancy of 3 on each one and 1 room with an occupancy of 2).
*
* -**REGULAR** : any other available package.
* @type {string}
* @memberof HotelRoomOfferApi
*/
packageType?: HotelRoomOfferApiPackageTypeEnum;
/**
* Price with taxes NOT INCLUDED of the given **Hotel Room Offer** including breakfast(s) when applicable, expressed in the requested **currency**.
* @type {number}
* @memberof HotelRoomOfferApi
*/
price: number;
/**
*
* @type {SourceMarket}
* @memberof HotelRoomOfferApi
*/
sourceMarket: SourceMarket;
/**
* Either INCLUDED, NOT_INCLUDED or UNKNOWN
* @type {string}
* @memberof HotelRoomOfferApi
*/
stayTaxesInfo: HotelRoomOfferApiStayTaxesInfoEnum;
/**
*
* @type {Array<TagApi>}
* @memberof HotelRoomOfferApi
*/
tags?: Array<TagApi>;
/**
* Price of the given **Hotel Room Offer** including breakfast(s) when applicable, and including all taxes from returned **taxes** list parameter expressed in the requested **currency**.
*
* This data is not returned for a **Hotel Room Offer** of type **HOTEL_ROOM**, you'll need to compute and display the actual tax included price of the final **Hotel Room** package corresponding to the guest count and night count requested, or make a call to the **[Create Hotel Room Offer](/v1/documentation#operation/postV1Hotel_room_offers)** endpoint in order to get a valid and bookable **Hotel Room Offer** where **type = PACKAGE** based on a packaged list of **Hotel Room Offers** of type **HOTEL_ROOM**.
* @type {number}
* @memberof HotelRoomOfferApi
*/
taxIncludedPrice: number;
/**
*
* @type {Array<TaxApi>}
* @memberof HotelRoomOfferApi
*/
taxes?: Array<TaxApi>;
/**
* Hotel Room Offer type.
*
* **Hotel Room Offers** with **type = "PACKAGE"** are **Hotel Room Offers** that are already bookable and you'll be able to follow the next step of the **Booking Flow** calling **[Create Booking Policies endpoint](/v1/documentation#operation/postV1Booking_policies)**.
*
* Otherwise, you'll be able to create a new **Hotel Room Offer** with **type = "PACKAGE"** from multiple **Hotel Room Offers** with **type = "HOTEL_ROOM"**. See **[Create Hotel Room Offer endpoint](/v1/documentation#operation/postV1Hotel_room_offers)** for details.
* @type {string}
* @memberof HotelRoomOfferApi
*/
type?: HotelRoomOfferApiTypeEnum;
}
/**
* @export
*/
export declare const HotelRoomOfferApiBreakfastOptionEnum: {
readonly Included: "INCLUDED";
readonly NotIncluded: "NOT_INCLUDED";
readonly Optional: "OPTIONAL";
};
export type HotelRoomOfferApiBreakfastOptionEnum = typeof HotelRoomOfferApiBreakfastOptionEnum[keyof typeof HotelRoomOfferApiBreakfastOptionEnum];
/**
* @export
*/
export declare const HotelRoomOfferApiPackageTypeEnum: {
readonly BestMatch: "BEST_MATCH";
readonly Cheapest: "CHEAPEST";
readonly MatchingRoomCount: "MATCHING_ROOM_COUNT";
readonly Regular: "REGULAR";
};
export type HotelRoomOfferApiPackageTypeEnum = typeof HotelRoomOfferApiPackageTypeEnum[keyof typeof HotelRoomOfferApiPackageTypeEnum];
/**
* @export
*/
export declare const HotelRoomOfferApiStayTaxesInfoEnum: {
readonly Included: "included";
readonly NotIncluded: "not_included";
readonly Unknown: "unknown";
};
export type HotelRoomOfferApiStayTaxesInfoEnum = typeof HotelRoomOfferApiStayTaxesInfoEnum[keyof typeof HotelRoomOfferApiStayTaxesInfoEnum];
/**
* @export
*/
export declare const HotelRoomOfferApiTypeEnum: {
readonly HotelRoom: "HOTEL_ROOM";
readonly Package: "PACKAGE";
};
export type HotelRoomOfferApiTypeEnum = typeof HotelRoomOfferApiTypeEnum[keyof typeof HotelRoomOfferApiTypeEnum];
/**
* Check if a given object implements the HotelRoomOfferApi interface.
*/
export declare function instanceOfHotelRoomOfferApi(value: object): boolean;
export declare function HotelRoomOfferApiFromJSON(json: any): HotelRoomOfferApi;
export declare function HotelRoomOfferApiFromJSONTyped(json: any, ignoreDiscriminator: boolean): HotelRoomOfferApi;
export declare function HotelRoomOfferApiToJSON(value?: HotelRoomOfferApi | null): any;