moip-sdk-node-ts
Version:
Moip v2 API wrapper
17 lines (16 loc) • 867 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const api_1 = __importDefault(require("../client/api"));
const getOne = (opts, _id) => api_1.default.get(opts, '/multipayments', _id);
const create = (opts, multiorderId, multipayment) => api_1.default.post(opts, `/multiorders/${multiorderId}/multipayments`, multipayment);
const preAuthorizationCapture = (opts, _id) => api_1.default.post(opts, `/multipayments/${_id}/capture`);
const preAuthorizationCancel = (opts, _id) => api_1.default.post(opts, `/multipayments/${_id}/void`);
exports.default = {
getOne: getOne,
create: create,
preAuthorizationCapture: preAuthorizationCapture,
preAuthorizationCancel: preAuthorizationCancel,
};