Class: Stigg::Resources::V1Beta::Customers
- Inherits:
-
Object
- Object
- Stigg::Resources::V1Beta::Customers
- Defined in:
- lib/stigg/resources/v1_beta/customers.rb,
lib/stigg/resources/v1_beta/customers/entities.rb,
lib/stigg/resources/v1_beta/customers/assignments.rb,
lib/stigg/resources/v1_beta/customers/entitlements.rb,
sig/stigg/resources/v1_beta/customers.rbs,
sig/stigg/resources/v1_beta/customers/entities.rbs,
sig/stigg/resources/v1_beta/customers/assignments.rbs,
sig/stigg/resources/v1_beta/customers/entitlements.rbs
Defined Under Namespace
Classes: Assignments, Entities, Entitlements
Instance Attribute Summary collapse
- #assignments ⇒ Stigg::Resources::V1Beta::Customers::Assignments readonly
- #entities ⇒ Stigg::Resources::V1Beta::Customers::Entities readonly
- #entitlements ⇒ Stigg::Resources::V1Beta::Customers::Entitlements readonly
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::V1Beta::CustomerRetrieveGovernanceResponse
Some parameter documentations has been truncated, see Models::V1Beta::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.
97 98 99 100 101 102 |
# File 'lib/stigg/resources/v1_beta/customers.rb', line 97 def initialize(client:) @client = client @entitlements = Stigg::Resources::V1Beta::Customers::Entitlements.new(client: client) @entities = Stigg::Resources::V1Beta::Customers::Entities.new(client: client) @assignments = Stigg::Resources::V1Beta::Customers::Assignments.new(client: client) end |
Instance Attribute Details
#assignments ⇒ Stigg::Resources::V1Beta::Customers::Assignments (readonly)
14 15 16 |
# File 'lib/stigg/resources/v1_beta/customers.rb', line 14 def assignments @assignments end |
#entities ⇒ Stigg::Resources::V1Beta::Customers::Entities (readonly)
11 12 13 |
# File 'lib/stigg/resources/v1_beta/customers.rb', line 11 def entities @entities end |
#entitlements ⇒ Stigg::Resources::V1Beta::Customers::Entitlements (readonly)
8 9 10 |
# File 'lib/stigg/resources/v1_beta/customers.rb', line 8 def entitlements @entitlements 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::V1Beta::CustomerRetrieveGovernanceResponse
Some parameter documentations has been truncated, see Models::V1Beta::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.
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 87 88 89 90 91 92 |
# File 'lib/stigg/resources/v1_beta/customers.rb', line 58 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::V1Beta::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::V1Beta::CustomerRetrieveGovernanceResponse, options: ) end |