UNPKG

paystack-sdk

Version:
39 lines (38 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Invoice = void 0; class Invoice { constructor(http) { this.http = http; } async create(data) { return await this.http.post('/paymentrequest', JSON.stringify(data)); } async list(queryParams) { return await this.http.get('/paymentrequest', { params: { ...queryParams }, }); } async view(id) { return await this.http.get(`'/paymentrequest/${id}`); } async verify(code) { return await this.http.get(`/paymentrequest/verify/${code}`); } async sendNotification(code) { return await this.http.post(`/paymentrequest/notify/${code}`); } async total() { return await this.http.get('/paymentrequest/totals'); } async finalize(code) { return await this.http.post(`/paymentrequest/finalize/${code}`); } async update(id, data) { return await this.http.put(`/paymentrequest/${id}`, JSON.stringify(data)); } async archive(code) { return await this.http.post(`/paymentrequest/archive/${code}`); } } exports.Invoice = Invoice;