UNPKG

mercadopago

Version:
21 lines (20 loc) 850 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = deleteTransaction; const path_1 = require("../../../../utils/path"); /** * Delete transaction operation -- sends `DELETE /v1/orders/{id}/transactions/{transactionId}`. * * @module clients/order/transaction/delete */ const restClient_1 = require("../../../../utils/restClient"); /** * Remove a payment transaction from an order. * * @returns A bare API response (status and headers only; no body). */ function deleteTransaction({ id, transactionId, config }) { return restClient_1.RestClient.fetch(`/v1/orders/${(0, path_1.encodePathParam)(id)}/transactions/${(0, path_1.encodePathParam)(transactionId)}`, Object.assign({ method: 'DELETE', headers: { 'Authorization': `Bearer ${config.accessToken}` } }, config.options)); }