UNPKG

paystack-sdk

Version:
35 lines (34 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DedicatedAccount = void 0; class DedicatedAccount { constructor(http) { this.http = http; } async create(data) { return await this.http.post('/dedicated_account', JSON.stringify(data)); } async list(queryParams) { return await this.http.get('/dedicated_account', { params: { ...queryParams }, }); } async fetch(dedicatedAccountId) { return await this.http.get(`/dedicated_account/${dedicatedAccountId}`); } async deactivate(dedicatedAccountId) { return await this.http.delete(`/dedicated_account/${dedicatedAccountId}`); } async splitTransaction(data) { return await this.http.post('/dedicated_account/split', JSON.stringify(data)); } async removeSplit(accountNumber) { return await this.http.delete('/dedicated_account/split', { data: { account_number: accountNumber }, }); } async providers() { return await this.http.get('/dedicated_account/available_providers'); } } exports.DedicatedAccount = DedicatedAccount;