UNPKG

orb-billing

Version:

The official TypeScript library for the Orb API

40 lines 1.29 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../resource.mjs"; import { isRequestOptions } from "../core.mjs"; import { Page } from "../pagination.mjs"; export class Items extends APIResource { /** * This endpoint is used to create an [Item](/core-concepts#item). */ create(body, options) { return this._client.post('/items', { body, ...options }); } /** * This endpoint can be used to update properties on the Item. */ update(itemId, body, options) { return this._client.put(`/items/${itemId}`, { body, ...options }); } list(query = {}, options) { if (isRequestOptions(query)) { return this.list({}, query); } return this._client.getAPIList('/items', ItemsPage, { query, ...options }); } /** * Archive item */ archive(itemId, options) { return this._client.post(`/items/${itemId}/archive`, options); } /** * This endpoint returns an item identified by its item_id. */ fetch(itemId, options) { return this._client.get(`/items/${itemId}`, options); } } export class ItemsPage extends Page { } Items.ItemsPage = ItemsPage; //# sourceMappingURL=items.mjs.map