UNPKG

mercadopago

Version:
24 lines (23 loc) 801 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = remove; const path_1 = require("../../../utils/path"); /** * Implementation of the customer removal operation. * * Sends a DELETE request to `/v1/customers/:id` to remove an existing * customer from MercadoPago. * * @module clients/customer/remove */ const restClient_1 = require("../../../utils/restClient"); /** * Remove a customer by its unique identifier. * * @returns The customer record that was deleted. */ function remove({ customerId, config }) { return restClient_1.RestClient.fetch(`/v1/customers/${(0, path_1.encodePathParam)(customerId)}`, Object.assign({ headers: { 'Authorization': `Bearer ${config.accessToken}` }, method: 'DELETE' }, config.options)); }