@bootpay/backend-js
Version:
Bootpay Server Side Package for Node.js
53 lines (52 loc) • 1.63 kB
TypeScript
import { AxiosInstance, AxiosRequestConfig } from 'axios';
export interface BootpayRestApiErrorResponse<T = any> {
error_code?: number;
pg_error_code?: number;
message?: string;
}
interface BootpayEntrypoints {
development: string;
stage: string;
production: string;
}
interface BootpayConfiguration {
application_id: string;
private_key: string;
mode?: 'development' | 'production' | 'stage';
}
export declare class BootpayBackendNodejsResource {
$http: AxiosInstance;
$token?: string;
mode: 'development' | 'production' | 'stage';
bootpayConfiguration: BootpayConfiguration;
API_ENTRYPOINTS: BootpayEntrypoints;
apiVersion: string;
sdkVersion: string;
constructor();
/**
* Environments
* Comment by GOSOMI
* @date: 2022-04-12
* @param configuration: BootpayConfiguration
* @returns void
*/
setConfiguration(configuration: BootpayConfiguration): void;
/**
* SET API Version
* Comment by GOSOMI
* @date: 2022-07-29
*/
setApiVersion(version: string): void;
/**
* Set Access Token
* Comment by GOSOMI
* @date: 2022-04-12
*/
setToken(token: string): void;
entrypoints(url: string): string;
get<T = any, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<T>;
post<T = any, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<T>;
put<T = any, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<T>;
delete<T = any, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<T>;
}
export {};