import ResourceRequest from './resource-request'; import Reservation from './s-objects/reservation'; declare enum Environment { DEVELOP = 0, ACCEPTANCE = 1, STAGING = 2, PRODUCTION = 3 } /** * Booker25 object allows for interaction with booker25 */ declare class Booker25 { static version: string; private readonly environment; private readonly api; /** * @param apiKey - The api key generated from the booker25 general settings page. * @param environment - What environment to connect to. Default: Environment.PRODUCTION */ constructor(apiKey: string, environment?: Environment); /** * Creates a new request for resources. The request can then be specified using methods on the resource request. * * @returns new resource request using the authentication from this Booker25 instance */ buildResourceRequest(): ResourceRequest; /** * Saves a reservation object to salesforce. With the contact, lead, and service reservations added to it. * Behaviour and allowed opperations can be changed through settings on the salesforce org. * * @param reservation The reservation object to save * @returns The saved reservation object with any new values populated by the save in salesforce. */ saveReservation(reservation: Reservation): Promise; /** * Sends the reservation object to salesforce to have the price calculations run. * The calculated price is then populated on the reservation returned. * * @param reservation The reservation to calculate the price for. * @returns The reservation with updated price fields. */ calculatePrice(reservation: Reservation): Promise; } export { Environment }; export default Booker25;