UNPKG

mercadopago

Version:
24 lines (23 loc) 778 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = get; const path_1 = require("../../../utils/path"); /** * Implementation of the "get preference" operation. * * Sends a GET to `/checkout/preferences/{id}` and returns the full * preference resource. * * @module clients/preference/get */ const restClient_1 = require("../../../utils/restClient"); /** * Retrieve an existing Checkout Pro preference by its unique identifier. * * @returns The full preference resource. */ function get({ id, config }) { return restClient_1.RestClient.fetch(`/checkout/preferences/${(0, path_1.encodePathParam)(id)}`, Object.assign({ headers: { 'Authorization': `Bearer ${config.accessToken}` } }, config.options)); }