@hyperse/paypal-node-sdk
Version:
NodeJS SDK for PayPal Checkout APIs
48 lines (47 loc) • 1.15 kB
TypeScript
/**
* Documentation
*
* @see {@link https://github.com/paypal/Checkout-NodeJS-SDK/blob/develop/lib/core/access_token.js}
*/
export interface AccessTokenOptions {
/**
* The access token
*/
access_token: string;
/**
* The token type
*/
expires_in: number;
/**
* The duration of the token in milliseconds
*/
token_type: string;
/**
* The refresh token if any to refresh the current token
*/
refresh_token: string;
}
/**
* An OAuth2 access token
*
* Documentation
*
* @see {@link https://github.com/hyperse-io/paypal-node-sdk/tree/main/src/core/AccessToken.ts}
*/
export declare class AccessToken {
private _accessToken;
private _tokenType;
private _expiresIn;
private _dateCreated;
constructor(options: AccessTokenOptions);
/**
* Get the expiration status of the token
* @return - True if the token is expired otherwise false
*/
isExpired(): boolean;
/**
* Get the value of an Authorization header with the current access token
* @return The Authorization header value
*/
authorizationString(): string;
}