UNPKG

@revolugo/booking-api-client

Version:

Javascript Revolugo Booking API Client (browser + server)

132 lines (131 loc) 8.42 kB
import { AllowedPaymentMethodApi, BookingPoliciesApi, BookingPoliciesCreateApi } from '../models/index.ts'; /** * Revolugo Booking API Reference * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.5.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime.ts'; export interface BookingPoliciesRetrievePayload { id: string; } export interface BookingPoliciesPaymentMethodsPayload { id: string; } export interface BookingPoliciesCreatePayload { bookingPoliciesCreateApi?: BookingPoliciesCreateApi; } /** * BookingPolicies - interface * * @export * @interface BookingPoliciesInterface */ export interface BookingPoliciesInterface { /** * * @summary Get Booking Policy * @param {string} id Id of requested **Booking Policy** returned by [Create Booking Policy endpoint](v1/documentation#tag/Booking-Policies/operation/postV1Booking_policies). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BookingPoliciesInterface */ retrieveRaw(requestParameters: BookingPoliciesRetrievePayload, initOverrides?: RequestInit & { minCallCount?: number; maxCallCount?: number; }): Promise<runtime.ApiResponse<BookingPoliciesApi>>; /** * Get Booking Policy */ retrieve(requestParameters: BookingPoliciesRetrievePayload, initOverrides?: RequestInit & { minCallCount?: number; maxCallCount?: number; }): Promise<BookingPoliciesApi>; /** * Retrieve payment methods for a booking policy * @summary Payment Methods for a Booking policy * @param {string} id Booking policy id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BookingPoliciesInterface */ paymentMethodsRaw(requestParameters: BookingPoliciesPaymentMethodsPayload, initOverrides?: RequestInit & { minCallCount?: number; maxCallCount?: number; }): Promise<runtime.ApiResponse<Array<AllowedPaymentMethodApi>>>; /** * Retrieve payment methods for a booking policy * Payment Methods for a Booking policy */ paymentMethods(requestParameters: BookingPoliciesPaymentMethodsPayload, initOverrides?: RequestInit & { minCallCount?: number; maxCallCount?: number; }): Promise<Array<AllowedPaymentMethodApi>>; /** * In order to be able to create and confirm a booking against a specific **Hotel Room Offer** package, you need to make a booking policy call. Retrieving a booking policy returns additional information about the booking being made and includes details like cancellation policies. This API call is equivalent to an availability check and it is important not to let long periods between retrieval of this policy and the booking confirmation call itself as this will often reduce the likelihood of the **Hotel Room Offer** being successfully booked. The **booking_policy_id** returned is meant to be used to carry out a pre-book call via **[Pre Book endpoint](/v1/documentation#operation/postV1Bookings)** on the next **Booking Flow** step. ⚠️ This call may take from 1 second up to 15 seconds to return as we may request various suppliers to fulfill this request. * @summary Create Booking Policies * @param {BookingPoliciesCreateApi} [bookingPoliciesCreateApi] Create Booking Policies * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BookingPoliciesInterface */ createRaw(requestParameters: BookingPoliciesCreatePayload, initOverrides?: RequestInit & { minCallCount?: number; maxCallCount?: number; }): Promise<runtime.ApiResponse<BookingPoliciesApi>>; /** * In order to be able to create and confirm a booking against a specific **Hotel Room Offer** package, you need to make a booking policy call. Retrieving a booking policy returns additional information about the booking being made and includes details like cancellation policies. This API call is equivalent to an availability check and it is important not to let long periods between retrieval of this policy and the booking confirmation call itself as this will often reduce the likelihood of the **Hotel Room Offer** being successfully booked. The **booking_policy_id** returned is meant to be used to carry out a pre-book call via **[Pre Book endpoint](/v1/documentation#operation/postV1Bookings)** on the next **Booking Flow** step. ⚠️ This call may take from 1 second up to 15 seconds to return as we may request various suppliers to fulfill this request. * Create Booking Policies */ create(requestParameters: BookingPoliciesCreatePayload, initOverrides?: RequestInit & { minCallCount?: number; maxCallCount?: number; }): Promise<BookingPoliciesApi>; } /** * */ export declare class BookingPolicies extends runtime.BaseAPI implements BookingPoliciesInterface { /** * Get Booking Policy */ retrieveRaw(requestParameters: BookingPoliciesRetrievePayload, initOverrides?: RequestInit & { minCallCount?: number; maxCallCount?: number; }): Promise<runtime.ApiResponse<BookingPoliciesApi>>; /** * Get Booking Policy */ retrieve(requestParameters: BookingPoliciesRetrievePayload, initOverrides?: RequestInit): Promise<BookingPoliciesApi>; /** * Retrieve payment methods for a booking policy * Payment Methods for a Booking policy */ paymentMethodsRaw(requestParameters: BookingPoliciesPaymentMethodsPayload, initOverrides?: RequestInit & { minCallCount?: number; maxCallCount?: number; }): Promise<runtime.ApiResponse<Array<AllowedPaymentMethodApi>>>; /** * Retrieve payment methods for a booking policy * Payment Methods for a Booking policy */ paymentMethods(requestParameters: BookingPoliciesPaymentMethodsPayload, initOverrides?: RequestInit): Promise<Array<AllowedPaymentMethodApi>>; /** * In order to be able to create and confirm a booking against a specific **Hotel Room Offer** package, you need to make a booking policy call. Retrieving a booking policy returns additional information about the booking being made and includes details like cancellation policies. This API call is equivalent to an availability check and it is important not to let long periods between retrieval of this policy and the booking confirmation call itself as this will often reduce the likelihood of the **Hotel Room Offer** being successfully booked. The **booking_policy_id** returned is meant to be used to carry out a pre-book call via **[Pre Book endpoint](/v1/documentation#operation/postV1Bookings)** on the next **Booking Flow** step. ⚠️ This call may take from 1 second up to 15 seconds to return as we may request various suppliers to fulfill this request. * Create Booking Policies */ createRaw(requestParameters: BookingPoliciesCreatePayload, initOverrides?: RequestInit & { minCallCount?: number; maxCallCount?: number; }): Promise<runtime.ApiResponse<BookingPoliciesApi>>; /** * In order to be able to create and confirm a booking against a specific **Hotel Room Offer** package, you need to make a booking policy call. Retrieving a booking policy returns additional information about the booking being made and includes details like cancellation policies. This API call is equivalent to an availability check and it is important not to let long periods between retrieval of this policy and the booking confirmation call itself as this will often reduce the likelihood of the **Hotel Room Offer** being successfully booked. The **booking_policy_id** returned is meant to be used to carry out a pre-book call via **[Pre Book endpoint](/v1/documentation#operation/postV1Bookings)** on the next **Booking Flow** step. ⚠️ This call may take from 1 second up to 15 seconds to return as we may request various suppliers to fulfill this request. * Create Booking Policies */ create(requestParameters?: BookingPoliciesCreatePayload, initOverrides?: RequestInit): Promise<BookingPoliciesApi>; }