UNPKG

mercadopago

Version:
24 lines (23 loc) 823 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = update; const path_1 = require("../../../utils/path"); /** * Implementation of the customer update operation. * * Sends a PUT request to `/v1/customers/:id` to modify an existing * customer record in MercadoPago. * * @module clients/customer/update */ const restClient_1 = require("../../../utils/restClient"); /** * Update an existing customer's information. * * @returns The updated customer record. */ function update({ customerId, body, config }) { return restClient_1.RestClient.fetch(`/v1/customers/${(0, path_1.encodePathParam)(customerId)}`, Object.assign({ headers: { 'Authorization': `Bearer ${config.accessToken}` }, body: JSON.stringify(body), method: 'PUT' }, config.options)); }