Class: Orb::Resources::Licenses::ExternalLicenses
- Inherits:
-
Object
- Object
- Orb::Resources::Licenses::ExternalLicenses
- Defined in:
- lib/orb/resources/licenses/external_licenses.rb,
sig/orb/resources/licenses/external_licenses.rbs
Instance Method Summary collapse
-
#get_usage(external_license_id, license_type_id:, subscription_id:, cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) ⇒ Orb::Models::Licenses::ExternalLicenseGetUsageResponse
Some parameter documentations has been truncated, see Models::Licenses::ExternalLicenseGetUsageParams for more details.
-
#initialize(client:) ⇒ ExternalLicenses
constructor
private
A new instance of ExternalLicenses.
Constructor Details
#initialize(client:) ⇒ ExternalLicenses
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 ExternalLicenses.
60 61 62 |
# File 'lib/orb/resources/licenses/external_licenses.rb', line 60 def initialize(client:) @client = client end |
Instance Method Details
#get_usage(external_license_id, license_type_id:, subscription_id:, cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) ⇒ Orb::Models::Licenses::ExternalLicenseGetUsageResponse
Some parameter documentations has been truncated, see Models::Licenses::ExternalLicenseGetUsageParams for more details.
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.
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/orb/resources/licenses/external_licenses.rb', line 45 def get_usage(external_license_id, params) parsed, = Orb::Licenses::ExternalLicenseGetUsageParams.dump_request(params) query = Orb::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["licenses/external_licenses/%1$s/usage", external_license_id], query: query, model: Orb::Models::Licenses::ExternalLicenseGetUsageResponse, options: ) end |