UNPKG

revolut-sdk

Version:
18 lines (17 loc) 795 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const api_1 = require("./api"); class Payments extends api_1.default { constructor() { super(...arguments); this.transfer = (transferData) => this.post('/transfer', transferData); this.pay = (paymentData) => this.post('/pay', paymentData); this.transactionById = (transactionId) => this.fetch(`/transaction/${transactionId}`); this.transactionByRequestId = (requestId) => this.fetch(`/transaction/${requestId}`, { params: { id_type: 'request_id' } }); this.cancel = (transactonId) => this.delete(`/transaction/${transactonId}`); this.transactions = (params) => this.fetch('/transactions', { params }); } } exports.default = Payments;