UNPKG

orb-billing

Version:

The official TypeScript library for the Orb API

45 lines 1.48 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.ItemsPage = exports.Items = void 0; const resource_1 = require("../resource.js"); const core_1 = require("../core.js"); const pagination_1 = require("../pagination.js"); class Items extends resource_1.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 ((0, core_1.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); } } exports.Items = Items; class ItemsPage extends pagination_1.Page { } exports.ItemsPage = ItemsPage; Items.ItemsPage = ItemsPage; //# sourceMappingURL=items.js.map