orb-billing
Version:
The official TypeScript library for the Orb API
44 lines • 1.89 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.LicenseTypeListResponsesPage = exports.LicenseTypes = void 0;
const resource_1 = require("../resource.js");
const core_1 = require("../core.js");
const pagination_1 = require("../pagination.js");
/**
* The LicenseType resource represents a type of license that can be assigned to users.
* License types are used during billing by grouping metrics on the configured grouping key.
*/
class LicenseTypes extends resource_1.APIResource {
/**
* This endpoint is used to create a new license type.
*
* License types are used to group licenses and define billing behavior. Each
* license type has a name and a grouping key that determines how metrics are
* aggregated for billing purposes.
*/
create(body, options) {
return this._client.post('/license_types', { body, ...options });
}
/**
* This endpoint returns a license type identified by its license_type_id.
*
* Use this endpoint to retrieve details about a specific license type, including
* its name and grouping key.
*/
retrieve(licenseTypeId, options) {
return this._client.get(`/license_types/${licenseTypeId}`, options);
}
list(query = {}, options) {
if ((0, core_1.isRequestOptions)(query)) {
return this.list({}, query);
}
return this._client.getAPIList('/license_types', LicenseTypeListResponsesPage, { query, ...options });
}
}
exports.LicenseTypes = LicenseTypes;
class LicenseTypeListResponsesPage extends pagination_1.Page {
}
exports.LicenseTypeListResponsesPage = LicenseTypeListResponsesPage;
LicenseTypes.LicenseTypeListResponsesPage = LicenseTypeListResponsesPage;
//# sourceMappingURL=license-types.js.map