UNPKG

orb-billing

Version:

The official TypeScript library for the Orb API

41 lines 1.63 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.ExternalLicenses = void 0; const resource_1 = require("../../core/resource.js"); const path_1 = require("../../internal/utils/path.js"); class ExternalLicenses extends resource_1.APIResource { /** * Returns usage and remaining credits for a license identified by its external * license ID. * * Resolves the currently active license with this external ID, i.e. the license * whose active window contains the current time. An external license ID can map to * multiple licenses over time, so if none is currently active (deactivated, window * ended, or not yet started) this returns a 404. To fetch usage for a license * regardless of active state, use the endpoint that takes Orb's internal license * ID. * * Date range defaults to the current billing period if not specified. * * @example * ```ts * const response = * await client.licenses.externalLicenses.getUsage( * 'external_license_id', * { * license_type_id: 'license_type_id', * subscription_id: 'subscription_id', * }, * ); * ``` */ getUsage(externalLicenseID, query, options) { return this._client.get((0, path_1.path) `/licenses/external_licenses/${externalLicenseID}/usage`, { query, ...options, }); } } exports.ExternalLicenses = ExternalLicenses; //# sourceMappingURL=external-licenses.js.map