UNPKG

orb-billing

Version:

The official TypeScript library for the Orb API

21 lines 826 B
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../resource.mjs"; import { isRequestOptions } from "../../core.mjs"; export class Usage extends APIResource { /** * Returns usage and remaining credits for all licenses of a given type on a * subscription. * * Date range defaults to the current billing period if not specified. */ getAllUsage(query, options) { return this._client.get('/licenses/usage', { query, ...options }); } getUsage(licenseId, query = {}, options) { if (isRequestOptions(query)) { return this.getUsage(licenseId, {}, query); } return this._client.get(`/licenses/${licenseId}/usage`, { query, ...options }); } } //# sourceMappingURL=usage.mjs.map