UNPKG

mercadopago

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