Class: Stigg::Resources::V1::Events::Beta::Customers
- Inherits:
-
Object
- Object
- Stigg::Resources::V1::Events::Beta::Customers
- Defined in:
- lib/stigg/resources/v1/events/beta/customers.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Customers
constructor
private
A new instance of Customers.
-
#retrieve_governance(id, after: nil, currency_ids: nil, entity_id_search: nil, entity_type_ids: nil, feature_ids: nil, limit: nil, min_utilization: nil, order: nil, scope: nil, sort_by: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::CustomerRetrieveGovernanceResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::CustomerRetrieveGovernanceParams for more details.
Constructor Details
#initialize(client:) ⇒ Customers
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 Customers.
91 92 93 |
# File 'lib/stigg/resources/v1/events/beta/customers.rb', line 91 def initialize(client:) @client = client end |
Instance Method Details
#retrieve_governance(id, after: nil, currency_ids: nil, entity_id_search: nil, entity_type_ids: nil, feature_ids: nil, limit: nil, min_utilization: nil, order: nil, scope: nil, sort_by: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::CustomerRetrieveGovernanceResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::CustomerRetrieveGovernanceParams for more details.
Queries the customer’s governance hierarchy tree, returning a cursor-paginated list of nodes with their usage configuration (limit, cadence, scope) and current usage, sortable and filterable by usage. Each node carries ‘parentId` so the tree can be rebuilt client-side. Usage is read from a periodically-refreshed read model and never gates access.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/stigg/resources/v1/events/beta/customers.rb', line 52 def retrieve_governance(id, params = {}) query_params = [ :after, :currency_ids, :entity_id_search, :entity_type_ids, :feature_ids, :limit, :min_utilization, :order, :scope, :sort_by ] parsed, = Stigg::V1::Events::Beta::CustomerRetrieveGovernanceParams.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/governance", id], query: query.transform_keys( currency_ids: "currencyIds", entity_id_search: "entityIdSearch", entity_type_ids: "entityTypeIds", feature_ids: "featureIds", min_utilization: "minUtilization", sort_by: "sortBy" ), headers: parsed.except(*query_params).transform_keys( x_account_id: "x-account-id", x_environment_id: "x-environment-id" ), model: Stigg::Models::V1::Events::Beta::CustomerRetrieveGovernanceResponse, options: ) end |