import { HTTPParams, RequestOptions, ITripayResponse, HTTPBody } from './request.interface'; /** * HTTPRequest class for making HTTP requests to the Tripay API. */ export declare class HTTPRequest { private body; private params; private apiToken?; private baseUrl; /** * Constructs a new instance of the HTTPRequest class. * * @param {RequestOptions} options - The options for the HTTP request. * @property {string} apiToken - The Tripay API token. * @property {string} baseUrl - The base URL for the API. */ constructor(options?: RequestOptions); /** * Sets the body of the function. * * @param {HTTPBody} body - The body to be set. * @return {HTTPRequest} This function does not return a value. */ setBody(body: HTTPBody): HTTPRequest; /** * Sets the params for the HTTPRequest. * * @param {HTTPParams} params - The params to be set. * @return {HTTPRequest} - The updated HTTPRequest. */ setParams(params: HTTPParams): HTTPRequest; /** * Generates a user agent string for the current environment. * * @return {string} The generated user agent string. */ private generateUserAgent; /** * Removes undefined values from an object and converts other values to strings. * @param obj - The object to remove undefined values from. * @returns A new object with undefined values removed and other values converted to strings. */ private removeUndefinedValues; /** * Fetches data asynchronously from the given URL. * * @param {string} url - The URL to fetch data from. * @param {string} method - The HTTP method to use for the request. Can be 'GET' or 'POST'. * @return {Promise} A Promise that resolves to a ITripayResponse object. * @throws {TripayError} If the request failed. */ fetch(url: string, method?: 'GET' | 'POST'): Promise; }