UNPKG

paystack-sdk

Version:
22 lines (21 loc) 639 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SubAccount = void 0; class SubAccount { constructor(http) { this.http = http; } async create(data) { return await this.http.post('/subaccount', JSON.stringify(data)); } async list(queryParams) { return await this.http.get('/subaccount', { params: { ...queryParams } }); } async fetch(id) { return await this.http.get(`/subaccount/${id}`); } async update(id, data) { return await this.http.put(`/subaccount/${id}`, JSON.stringify(data)); } } exports.SubAccount = SubAccount;