mercadopago
Version:
Mercadopago SDK for Node.js
25 lines (24 loc) • 813 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = get;
/**
* Get-card-token operation.
*
* Sends a `GET /v1/card_tokens/:id` request to the MercadoPago API and
* returns the full {@link CardTokenResponse} for the given token.
*
* @module cardToken/get
*/
const restClient_1 = require("../../../utils/restClient");
/**
* Retrieve a single card token by its unique identifier.
*
* @param id - Card token identifier to look up.
* @param config - SDK configuration including the access token.
* @returns The full card token resource.
*/
function get({ id, config }) {
return restClient_1.RestClient.fetch(`/v1/card_tokens/${id}`, Object.assign({ headers: {
'Authorization': `Bearer ${config.accessToken}`,
} }, config.options));
}