UNPKG

paypal-rest-api

Version:

A typescript module for integrating with PayPal REST APIs.

26 lines (25 loc) 798 B
import * as joi from "joi"; import { Api } from "../abstracts"; import { Client, RequestOptions } from "../client"; import { IAccessToken } from "./types"; export declare class Oauth extends Api { private _clientId; private _clientSecret; static paths: { access: string; }; static schemas: { access: joi.ObjectSchema; clientId: joi.StringSchema; clientSecret: joi.StringSchema; }; token: IAccessToken; constructor(client: Client, _clientId: string, _clientSecret: string); clientId: string; clientSecret: string; requestAccessToken(options?: Partial<RequestOptions>): Promise<any>; getAccessToken(): Promise<IAccessToken>; setAccessToken(token: IAccessToken): void; expired(): boolean; valid(): boolean; }