UNPKG

paystack-sdk

Version:
30 lines (29 loc) 759 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Product = void 0; /** * @class Product * # Producs * The products API allows you create and manage inventories * on your integration */ class Product { constructor(http) { this.http = http; } async create(data) { return await this.http.post('/product', JSON.stringify(data)); } async list(queryParams) { return await this.http.get('/product', { params: { ...queryParams }, }); } async fetch(id) { return await this.http.get(`/product/${id}`); } async update(id, data) { return await this.http.put(`/product/${id}`, JSON.stringify(data)); } } exports.Product = Product;