UNPKG

orb-billing

Version:

The official TypeScript library for the Orb API

25 lines 954 B
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Usage = void 0; const resource_1 = require("../../resource.js"); const core_1 = require("../../core.js"); class Usage extends resource_1.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 ((0, core_1.isRequestOptions)(query)) { return this.getUsage(licenseId, {}, query); } return this._client.get(`/licenses/${licenseId}/usage`, { query, ...options }); } } exports.Usage = Usage; //# sourceMappingURL=usage.js.map