orb-billing
Version:
The official TypeScript library for the Orb API
41 lines • 1.75 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../core/resource.mjs";
import { Page } from "../core/pagination.mjs";
import { path } from "../internal/utils/path.mjs";
/**
* 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.
*/
export class LicenseTypes extends 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(path `/license_types/${licenseTypeID}`, options);
}
/**
* This endpoint returns a list of all license types configured for the account,
* ordered in ascending order by creation time.
*
* 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.
*/
list(query = {}, options) {
return this._client.getAPIList('/license_types', (Page), { query, ...options });
}
}
//# sourceMappingURL=license-types.mjs.map