Class: Orb::Resources::Licenses::Usage
- Inherits:
-
Object
- Object
- Orb::Resources::Licenses::Usage
- Defined in:
- lib/orb/resources/licenses/usage.rb,
sig/orb/resources/licenses/usage.rbs
Instance Method Summary collapse
-
#get_all_usage(license_type_id:, subscription_id:, cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) ⇒ Orb::Models::Licenses::UsageGetAllUsageResponse
Some parameter documentations has been truncated, see Models::Licenses::UsageGetAllUsageParams for more details.
-
#get_usage(license_id, cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) ⇒ Orb::Models::Licenses::UsageGetUsageResponse
Some parameter documentations has been truncated, see Models::Licenses::UsageGetUsageParams for more details.
-
#initialize(client:) ⇒ Usage
constructor
private
A new instance of Usage.
Constructor Details
#initialize(client:) ⇒ Usage
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 Usage.
89 90 91 |
# File 'lib/orb/resources/licenses/usage.rb', line 89 def initialize(client:) @client = client end |
Instance Method Details
#get_all_usage(license_type_id:, subscription_id:, cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) ⇒ Orb::Models::Licenses::UsageGetAllUsageResponse
Some parameter documentations has been truncated, see Models::Licenses::UsageGetAllUsageParams for more details.
Returns usage and remaining credits for all licenses of a given type on a subscription.
Date range defaults to the current billing period if not specified.
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/orb/resources/licenses/usage.rb', line 36 def get_all_usage(params) parsed, = Orb::Licenses::UsageGetAllUsageParams.dump_request(params) query = Orb::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "licenses/usage", query: query, model: Orb::Models::Licenses::UsageGetAllUsageResponse, options: ) end |
#get_usage(license_id, cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) ⇒ Orb::Models::Licenses::UsageGetUsageResponse
Some parameter documentations has been truncated, see Models::Licenses::UsageGetUsageParams for more details.
Returns usage and remaining credits for a specific license over a date range.
Date range defaults to the current billing period if not specified.
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/orb/resources/licenses/usage.rb', line 74 def get_usage(license_id, params = {}) parsed, = Orb::Licenses::UsageGetUsageParams.dump_request(params) query = Orb::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["licenses/%1$s/usage", license_id], query: query, model: Orb::Models::Licenses::UsageGetUsageResponse, options: ) end |