UNPKG

mercadopago

Version:
24 lines (23 loc) 783 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = get; const path_1 = require("../../../utils/path"); /** * Implementation of the customer retrieval operation. * * Sends a GET request to `/v1/customers/:id` to fetch a single * customer record from MercadoPago. * * @module clients/customer/get */ const restClient_1 = require("../../../utils/restClient"); /** * Retrieve a customer by its unique identifier. * * @returns The customer record matching the given ID. */ function get({ customerId, config }) { return restClient_1.RestClient.fetch(`/v1/customers/${(0, path_1.encodePathParam)(customerId)}`, Object.assign({ headers: { 'Authorization': `Bearer ${config.accessToken}` } }, config.options)); }