UNPKG

e-invoice-api

Version:

The official TypeScript library for the e-invoice API

40 lines 1.25 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Webhooks = void 0; const resource_1 = require("../core/resource.js"); const path_1 = require("../internal/utils/path.js"); class Webhooks extends resource_1.APIResource { /** * Create a new webhook */ create(body, options) { return this._client.post('/api/webhooks/', { body, ...options }); } /** * Get a webhook by ID */ retrieve(webhookID, options) { return this._client.get((0, path_1.path) `/api/webhooks/${webhookID}`, options); } /** * Update a webhook by ID */ update(webhookID, body, options) { return this._client.put((0, path_1.path) `/api/webhooks/${webhookID}`, { body, ...options }); } /** * Get all webhooks for the current tenant */ list(options) { return this._client.get('/api/webhooks/', options); } /** * Delete a webhook */ delete(webhookID, options) { return this._client.delete((0, path_1.path) `/api/webhooks/${webhookID}`, options); } } exports.Webhooks = Webhooks; //# sourceMappingURL=webhooks.js.map