Class: Orb::Resources::Licenses::ExternalLicenses

Inherits:
Object
  • Object
show all
Defined in:
lib/orb/resources/licenses/external_licenses.rb,
sig/orb/resources/licenses/external_licenses.rbs

Instance Method Summary collapse

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.

Parameters:



53
54
55
# File 'lib/orb/resources/licenses/external_licenses.rb', line 53

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.

Date range defaults to the current billing period if not specified.

Parameters:

  • external_license_id (String)
  • license_type_id (String)

    The license type ID to filter licenses by.

  • subscription_id (String)

    The subscription ID to get license usage for.

  • cursor (String, nil)

    Pagination cursor from a previous request.

  • end_date (Date, nil)

    End date for the usage period (YYYY-MM-DD). Defaults to end of current billing p

  • group_by (String, nil)

    How to group the results. Valid values: 'license', 'day'. Can be combined (e.g.,

  • limit (Integer)

    Maximum number of rows in the response data (default 20, max 100).

  • start_date (Date, nil)

    Start date for the usage period (YYYY-MM-DD). Defaults to start of current billi

  • request_options (Orb::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/orb/resources/licenses/external_licenses.rb', line 38

def get_usage(external_license_id, params)
  parsed, options = 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: options
  )
end