Class: Stigg::Resources::V1Beta::Customers::Entitlements
- Inherits:
-
Object
- Object
- Stigg::Resources::V1Beta::Customers::Entitlements
- Defined in:
- lib/stigg/resources/v1_beta/customers/entitlements.rb,
sig/stigg/resources/v1_beta/customers/entitlements.rbs
Instance Method Summary collapse
-
#check(id, currency_id: nil, dimensions: nil, feature_id: nil, requested_usage: nil, requested_values: nil, resource_id: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1Beta::Customers::EntitlementCheckResponse
Some parameter documentations has been truncated, see Models::V1Beta::Customers::EntitlementCheckParams for more details.
-
#initialize(client:) ⇒ Entitlements
constructor
private
A new instance of Entitlements.
Constructor Details
#initialize(client:) ⇒ Entitlements
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 Entitlements.
67 68 69 |
# File 'lib/stigg/resources/v1_beta/customers/entitlements.rb', line 67 def initialize(client:) @client = client end |
Instance Method Details
#check(id, currency_id: nil, dimensions: nil, feature_id: nil, requested_usage: nil, requested_values: nil, resource_id: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1Beta::Customers::EntitlementCheckResponse
Some parameter documentations has been truncated, see Models::V1Beta::Customers::EntitlementCheckParams for more details.
Experimental — request and response shapes may change without notice. Same
semantics as Check entitlement, plus an optional dimensions query param that
resolves to per-entity governance limits surfaced as chains on the response.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/stigg/resources/v1_beta/customers/entitlements.rb', line 40 def check(id, params = {}) query_params = [:currency_id, :dimensions, :feature_id, :requested_usage, :requested_values, :resource_id] parsed, = Stigg::V1Beta::Customers::EntitlementCheckParams.dump_request(params) query = Stigg::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :get, path: ["api/v1-beta/customers/%1$s/entitlements/check", id], query: query.transform_keys( currency_id: "currencyId", feature_id: "featureId", requested_usage: "requestedUsage", requested_values: "requestedValues", resource_id: "resourceId" ), headers: parsed.except(*query_params).transform_keys( x_account_id: "x-account-id", x_environment_id: "x-environment-id" ), model: Stigg::Models::V1Beta::Customers::EntitlementCheckResponse, options: ) end |