Class: Orb::Resources::LicenseTypes
- Inherits:
-
Object
- Object
- Orb::Resources::LicenseTypes
- Defined in:
- lib/orb/resources/license_types.rb,
sig/orb/resources/license_types.rbs
Overview
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.
Instance Method Summary collapse
-
#create(grouping_key:, name:, request_options: {}) ⇒ Orb::Models::LicenseTypeCreateResponse
Some parameter documentations has been truncated, see Models::LicenseTypeCreateParams for more details.
-
#initialize(client:) ⇒ LicenseTypes
constructor
private
A new instance of LicenseTypes.
-
#list(cursor: nil, limit: nil, request_options: {}) ⇒ Orb::Internal::Page<Orb::Models::LicenseTypeListResponse>
Some parameter documentations has been truncated, see Models::LicenseTypeListParams for more details.
-
#retrieve(license_type_id, request_options: {}) ⇒ Orb::Models::LicenseTypeRetrieveResponse
This endpoint returns a license type identified by its license_type_id.
Constructor Details
#initialize(client:) ⇒ LicenseTypes
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of LicenseTypes.
99 100 101 |
# File 'lib/orb/resources/license_types.rb', line 99 def initialize(client:) @client = client end |
Instance Method Details
#create(grouping_key:, name:, request_options: {}) ⇒ Orb::Models::LicenseTypeCreateResponse
Some parameter documentations has been truncated, see Models::LicenseTypeCreateParams for more details.
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.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/orb/resources/license_types.rb', line 29 def create(params) parsed, = Orb::LicenseTypeCreateParams.dump_request(params) @client.request( method: :post, path: "license_types", body: parsed, model: Orb::Models::LicenseTypeCreateResponse, options: ) end |
#list(cursor: nil, limit: nil, request_options: {}) ⇒ Orb::Internal::Page<Orb::Models::LicenseTypeListResponse>
Some parameter documentations has been truncated, see Models::LicenseTypeListParams for more details.
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.
83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/orb/resources/license_types.rb', line 83 def list(params = {}) parsed, = Orb::LicenseTypeListParams.dump_request(params) query = Orb::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "license_types", query: query, page: Orb::Internal::Page, model: Orb::Models::LicenseTypeListResponse, options: ) end |
#retrieve(license_type_id, request_options: {}) ⇒ Orb::Models::LicenseTypeRetrieveResponse
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.
53 54 55 56 57 58 59 60 |
# File 'lib/orb/resources/license_types.rb', line 53 def retrieve(license_type_id, params = {}) @client.request( method: :get, path: ["license_types/%1$s", license_type_id], model: Orb::Models::LicenseTypeRetrieveResponse, options: params[:request_options] ) end |