UNPKG

e-invoice-api

Version:

The official TypeScript library for the e-invoice API

36 lines 1.07 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../core/resource.mjs"; import { path } from "../internal/utils/path.mjs"; export class Webhooks extends 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(path `/api/webhooks/${webhookID}`, options); } /** * Update a webhook by ID */ update(webhookID, body, options) { return this._client.put(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(path `/api/webhooks/${webhookID}`, options); } } //# sourceMappingURL=webhooks.mjs.map