stigg 0.1.0.pre.beta.62 → 0.1.0.pre.beta.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -1
  4. data/lib/stigg/models/v1/customer_check_entitlement_params.rb +13 -2
  5. data/lib/stigg/models/v1/customer_check_entitlement_response.rb +126 -2
  6. data/lib/stigg/models/v1/customers/entities/entitlement_list_params.rb +95 -0
  7. data/lib/stigg/models/v1/customers/entities/entitlement_list_response.rb +107 -0
  8. data/lib/stigg/models/v1/customers/entities/entitlement_upsert_params.rb +129 -0
  9. data/lib/stigg/models/v1/customers/entities/entitlement_upsert_response.rb +120 -0
  10. data/lib/stigg/models/v1/customers/entity_archive_params.rb +47 -0
  11. data/lib/stigg/models/v1/customers/entity_archive_response.rb +37 -0
  12. data/lib/stigg/models/v1/customers/entity_list_params.rb +90 -0
  13. data/lib/stigg/models/v1/customers/entity_list_response.rb +75 -0
  14. data/lib/stigg/models/v1/customers/entity_retrieve_params.rb +42 -0
  15. data/lib/stigg/models/v1/customers/entity_retrieve_response.rb +89 -0
  16. data/lib/stigg/models/v1/customers/entity_upsert_params.rb +92 -0
  17. data/lib/stigg/models/v1/customers/entity_upsert_response.rb +88 -0
  18. data/lib/stigg/models/v1/entity_type_archive_params.rb +38 -0
  19. data/lib/stigg/models/v1/entity_type_archive_response.rb +36 -0
  20. data/lib/stigg/models/v1/entity_type_check_active_entities_params.rb +34 -0
  21. data/lib/stigg/models/v1/entity_type_check_active_entities_response.rb +40 -0
  22. data/lib/stigg/models/v1/entity_type_list_params.rb +73 -0
  23. data/lib/stigg/models/v1/entity_type_list_response.rb +77 -0
  24. data/lib/stigg/models/v1/entity_type_upsert_params.rb +80 -0
  25. data/lib/stigg/models/v1/entity_type_upsert_response.rb +89 -0
  26. data/lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb +4 -1
  27. data/lib/stigg/models/v1_beta/customers/entitlement_check_params.rb +4 -3
  28. data/lib/stigg/models/v1_beta/customers/entitlement_check_response.rb +4 -4
  29. data/lib/stigg/resources/v1/customers/entities/entitlements.rb +112 -0
  30. data/lib/stigg/resources/v1/customers/entities.rb +178 -0
  31. data/lib/stigg/resources/v1/customers.rb +16 -7
  32. data/lib/stigg/resources/v1/entity_types.rb +160 -0
  33. data/lib/stigg/resources/v1.rb +4 -0
  34. data/lib/stigg/resources/v1_beta/customers/assignments.rb +10 -2
  35. data/lib/stigg/resources/v1_beta/customers/entities.rb +22 -7
  36. data/lib/stigg/resources/v1_beta/customers/entitlements.rb +4 -1
  37. data/lib/stigg/resources/v1_beta/entity_types.rb +6 -1
  38. data/lib/stigg/version.rb +1 -1
  39. data/lib/stigg.rb +23 -0
  40. data/rbi/stigg/models/v1/customer_check_entitlement_params.rbi +19 -2
  41. data/rbi/stigg/models/v1/customer_check_entitlement_response.rbi +230 -0
  42. data/rbi/stigg/models/v1/customers/entities/entitlement_list_params.rbi +138 -0
  43. data/rbi/stigg/models/v1/customers/entities/entitlement_list_response.rbi +135 -0
  44. data/rbi/stigg/models/v1/customers/entities/entitlement_upsert_params.rbi +202 -0
  45. data/rbi/stigg/models/v1/customers/entities/entitlement_upsert_response.rbi +179 -0
  46. data/rbi/stigg/models/v1/customers/entity_archive_params.rbi +74 -0
  47. data/rbi/stigg/models/v1/customers/entity_archive_response.rbi +82 -0
  48. data/rbi/stigg/models/v1/customers/entity_list_params.rbi +169 -0
  49. data/rbi/stigg/models/v1/customers/entity_list_response.rbi +95 -0
  50. data/rbi/stigg/models/v1/customers/entity_retrieve_params.rbi +72 -0
  51. data/rbi/stigg/models/v1/customers/entity_retrieve_response.rbi +142 -0
  52. data/rbi/stigg/models/v1/customers/entity_upsert_params.rbi +154 -0
  53. data/rbi/stigg/models/v1/customers/entity_upsert_response.rbi +137 -0
  54. data/rbi/stigg/models/v1/entity_type_archive_params.rbi +63 -0
  55. data/rbi/stigg/models/v1/entity_type_archive_response.rbi +75 -0
  56. data/rbi/stigg/models/v1/entity_type_check_active_entities_params.rbi +64 -0
  57. data/rbi/stigg/models/v1/entity_type_check_active_entities_response.rbi +87 -0
  58. data/rbi/stigg/models/v1/entity_type_list_params.rbi +144 -0
  59. data/rbi/stigg/models/v1/entity_type_list_response.rbi +98 -0
  60. data/rbi/stigg/models/v1/entity_type_upsert_params.rbi +127 -0
  61. data/rbi/stigg/models/v1/entity_type_upsert_response.rbi +135 -0
  62. data/rbi/stigg/models/v1_beta/customers/assignment_upsert_params.rbi +6 -0
  63. data/rbi/stigg/models/v1_beta/customers/entitlement_check_params.rbi +6 -4
  64. data/rbi/stigg/models/v1_beta/customers/entitlement_check_response.rbi +4 -4
  65. data/rbi/stigg/resources/v1/customers/entities/entitlements.rbi +101 -0
  66. data/rbi/stigg/resources/v1/customers/entities.rbi +149 -0
  67. data/rbi/stigg/resources/v1/customers.rbi +18 -7
  68. data/rbi/stigg/resources/v1/entity_types.rbi +128 -0
  69. data/rbi/stigg/resources/v1.rbi +3 -0
  70. data/rbi/stigg/resources/v1_beta/customers/assignments.rbi +5 -2
  71. data/rbi/stigg/resources/v1_beta/customers/entities.rbi +12 -6
  72. data/rbi/stigg/resources/v1_beta/customers/entitlements.rbi +4 -3
  73. data/rbi/stigg/resources/v1_beta/entity_types.rbi +2 -1
  74. data/sig/stigg/models/v1/customer_check_entitlement_params.rbs +7 -0
  75. data/sig/stigg/models/v1/customer_check_entitlement_response.rbs +92 -0
  76. data/sig/stigg/models/v1/customers/entities/entitlement_list_params.rbs +88 -0
  77. data/sig/stigg/models/v1/customers/entities/entitlement_list_response.rbs +75 -0
  78. data/sig/stigg/models/v1/customers/entities/entitlement_upsert_params.rbs +106 -0
  79. data/sig/stigg/models/v1/customers/entities/entitlement_upsert_response.rbs +92 -0
  80. data/sig/stigg/models/v1/customers/entity_archive_params.rbs +49 -0
  81. data/sig/stigg/models/v1/customers/entity_archive_response.rbs +32 -0
  82. data/sig/stigg/models/v1/customers/entity_list_params.rbs +92 -0
  83. data/sig/stigg/models/v1/customers/entity_list_response.rbs +54 -0
  84. data/sig/stigg/models/v1/customers/entity_retrieve_params.rbs +49 -0
  85. data/sig/stigg/models/v1/customers/entity_retrieve_response.rbs +69 -0
  86. data/sig/stigg/models/v1/customers/entity_upsert_params.rbs +85 -0
  87. data/sig/stigg/models/v1/customers/entity_upsert_response.rbs +71 -0
  88. data/sig/stigg/models/v1/entity_type_archive_params.rbs +38 -0
  89. data/sig/stigg/models/v1/entity_type_archive_response.rbs +30 -0
  90. data/sig/stigg/models/v1/entity_type_check_active_entities_params.rbs +38 -0
  91. data/sig/stigg/models/v1/entity_type_check_active_entities_response.rbs +30 -0
  92. data/sig/stigg/models/v1/entity_type_list_params.rbs +78 -0
  93. data/sig/stigg/models/v1/entity_type_list_response.rbs +52 -0
  94. data/sig/stigg/models/v1/entity_type_upsert_params.rbs +74 -0
  95. data/sig/stigg/models/v1/entity_type_upsert_response.rbs +67 -0
  96. data/sig/stigg/resources/v1/customers/entities/entitlements.rbs +34 -0
  97. data/sig/stigg/resources/v1/customers/entities.rbs +49 -0
  98. data/sig/stigg/resources/v1/customers.rbs +3 -0
  99. data/sig/stigg/resources/v1/entity_types.rbs +40 -0
  100. data/sig/stigg/resources/v1.rbs +2 -0
  101. metadata +71 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46d996faf77838a7270f65e36183022bf9967e5c097e911a942261ca082cdd9d
4
- data.tar.gz: bc985e5c0c934cc3ae392435311b76c0eb74bf426f2c2a75a2a09db92bf5df48
3
+ metadata.gz: 6c114a3a61416839ea99a2c4c5f98fa95969c19f1c5e622a393ac2e1bba8f3a4
4
+ data.tar.gz: 54492f3692b1f942b0a98ad32f74c341975da228177ca6d89758ff4df243a432
5
5
  SHA512:
6
- metadata.gz: dc2b51e86b366ba00337400477ec5a5209e27157d041de0472ebdbe334252de062f312f3d9bfc818f87695d734271cc3a4499fe56d629e0d53a57f3c8103a782
7
- data.tar.gz: dd59b1ae13e0ad4edc6cdf4503e0fc8f8e36f766ffed0dd5434bea4a7af06c66c0cdeb1a5a363ac651d285f23a70240e71ed4e8b73932313742eec858289dfa3
6
+ metadata.gz: 40bb0400981005162f616816e6d5d8ae1827343de4fc2023a8b26301c4b2114d91bf18da1e5f2ec7b837b5b34f8d02183c10bbbee78deda837575df8acb470d2
7
+ data.tar.gz: 66072f1f337fbf2b6d72dfc1b9c238560b107675750600f62d01cd2bd69703ab2dd8d467cf5654ef52e123c9b07d79e827c5a00b00ef5e4a6cbebd81b24a4d65
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.0-beta.63](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.62...v0.1.0-beta.63) (2026-10-30)
4
+
5
+
6
+ ### Features
7
+
8
+ * **STIGG-9594:** add the v1 governance resources and v1-beta deprecation messages ([dca8ab0](https://github.com/stiggio/stigg-ruby/commit/dca8ab05c289863df048895cd9c3848f679b83cd))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * sync OpenAPI spec from stigg-api ([7407bad](https://github.com/stiggio/stigg-ruby/commit/7407bade916d8ef0ff00f38e2424d5d72137b492))
14
+ * sync OpenAPI spec from stigg-api ([dfa506f](https://github.com/stiggio/stigg-ruby/commit/dfa506f71d8be6cd7b8a0733f79a2356a2683ef7))
15
+ * sync OpenAPI spec from stigg-api ([a43c0a9](https://github.com/stiggio/stigg-ruby/commit/a43c0a93ba3c3077db2f54a0faa9786eecddcec8))
16
+ * sync OpenAPI spec from stigg-api ([316bf50](https://github.com/stiggio/stigg-ruby/commit/316bf50276593b429ccc7333e5cb08288b057fda))
17
+
18
+
19
+ ### Chores
20
+
21
+ * normalize version.rb to gem prerelease format for stlc codegen ([dc4e82a](https://github.com/stiggio/stigg-ruby/commit/dc4e82a110db751da07d0da17048fa1e29800233))
22
+
3
23
  ## [0.1.0-beta.62](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.61...v0.1.0-beta.62) (2026-10-29)
4
24
 
5
25
 
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "stigg", "~> 0.1.0.pre.beta.61"
27
+ gem "stigg", "~> 0.1.0.pre.beta.62"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -20,6 +20,14 @@ module Stigg
20
20
  # @return [String, nil]
21
21
  optional :currency_id, String
22
22
 
23
+ # @!attribute dimensions
24
+ # Attribution map of the entities the usage is attributed to (e.g.
25
+ # `dimensions[userId]=u1`). When provided, their governance budgets are checked
26
+ # too and the response includes `chains`.
27
+ #
28
+ # @return [Hash{Symbol=>String}, nil]
29
+ optional :dimensions, Stigg::Internal::Type::HashOf[String]
30
+
23
31
  # @!attribute feature_id
24
32
  # Feature ID (refId) to check. Mutually exclusive with `currencyId`.
25
33
  #
@@ -68,7 +76,8 @@ module Stigg
68
76
 
69
77
  # @!attribute reserve_amount
70
78
  # Credits to reserve (credit entitlements only). The check is decided and the
71
- # credits held atomically; `requestedUsage` is ignored.
79
+ # credits held atomically; `requestedUsage` is ignored. Not supported with
80
+ # `dimensions`.
72
81
  #
73
82
  # @return [Float, nil]
74
83
  optional :reserve_amount, Float
@@ -89,7 +98,7 @@ module Stigg
89
98
  # @return [String, nil]
90
99
  optional :x_environment_id, String
91
100
 
92
- # @!method initialize(id:, currency_id: nil, feature_id: nil, requested_usage: nil, requested_values: nil, reservation_expires_at: nil, reservation_id: nil, reservation_metadata: nil, reservation_ttl_seconds: nil, reserve_amount: nil, resource_id: nil, x_account_id: nil, x_environment_id: nil, request_options: {})
101
+ # @!method initialize(id:, currency_id: nil, dimensions: nil, feature_id: nil, requested_usage: nil, requested_values: nil, reservation_expires_at: nil, reservation_id: nil, reservation_metadata: nil, reservation_ttl_seconds: nil, reserve_amount: nil, resource_id: nil, x_account_id: nil, x_environment_id: nil, request_options: {})
93
102
  # Some parameter documentations has been truncated, see
94
103
  # {Stigg::Models::V1::CustomerCheckEntitlementParams} for more details.
95
104
  #
@@ -97,6 +106,8 @@ module Stigg
97
106
  #
98
107
  # @param currency_id [String] Currency ID (refId) to check for credit entitlements. Mutually exclusive with `f
99
108
  #
109
+ # @param dimensions [Hash{Symbol=>String}] Attribution map of the entities the usage is attributed to (e.g. `dimensions[use
110
+ #
100
111
  # @param feature_id [String] Feature ID (refId) to check. Mutually exclusive with `currencyId`.
101
112
  #
102
113
  # @param requested_usage [Integer] Requested usage amount to evaluate against the entitlement limit (numeric featur
@@ -44,6 +44,14 @@ module Stigg
44
44
  # @return [Symbol, :FEATURE]
45
45
  required :type, const: :FEATURE
46
46
 
47
+ # @!attribute chains
48
+ # Per-entity rollups, one chain per resolved dimension. Omitted when dimensions
49
+ # was not provided.
50
+ #
51
+ # @return [Array<Array<Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Feature::Chain>>, nil]
52
+ optional :chains,
53
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Feature::Chain]] }
54
+
47
55
  # @!attribute current_usage
48
56
  #
49
57
  # @return [Float, nil]
@@ -105,7 +113,7 @@ module Stigg
105
113
  # @return [Time, nil]
106
114
  optional :valid_until, Time, api_name: :validUntil
107
115
 
108
- # @!method initialize(access_denied_reason:, is_granted:, current_usage: nil, entitlement_updated_at: nil, feature: nil, has_unlimited_usage: nil, reset_period: nil, usage_limit: nil, usage_period_anchor: nil, usage_period_end: nil, usage_period_start: nil, valid_until: nil, type: :FEATURE)
116
+ # @!method initialize(access_denied_reason:, is_granted:, chains: nil, current_usage: nil, entitlement_updated_at: nil, feature: nil, has_unlimited_usage: nil, reset_period: nil, usage_limit: nil, usage_period_anchor: nil, usage_period_end: nil, usage_period_start: nil, valid_until: nil, type: :FEATURE)
109
117
  # Some parameter documentations has been truncated, see
110
118
  # {Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Feature} for more
111
119
  # details.
@@ -114,6 +122,8 @@ module Stigg
114
122
  #
115
123
  # @param is_granted [Boolean]
116
124
  #
125
+ # @param chains [Array<Array<Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Feature::Chain>>] Per-entity rollups, one chain per resolved dimension. Omitted when dimensions wa
126
+ #
117
127
  # @param current_usage [Float]
118
128
  #
119
129
  # @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration.
@@ -159,6 +169,58 @@ module Stigg
159
169
  # @return [Array<Symbol>]
160
170
  end
161
171
 
172
+ class Chain < Stigg::Internal::Type::BaseModel
173
+ # @!attribute current_usage
174
+ # Amount consumed by this entity in the current cadence period.
175
+ #
176
+ # @return [Float]
177
+ required :current_usage, Float, api_name: :currentUsage
178
+
179
+ # @!attribute entity_id
180
+ # External id of the entity within the customer.
181
+ #
182
+ # @return [String]
183
+ required :entity_id, String, api_name: :entityId
184
+
185
+ # @!attribute is_granted
186
+ # Whether this node alone permits the requested usage.
187
+ #
188
+ # @return [Boolean]
189
+ required :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted
190
+
191
+ # @!attribute scope_entity_ids
192
+ # External ids of the entities this budget is scoped to. Empty (`[]`) is the
193
+ # node-wide budget; a non-empty set is the dimension-scoped budget that matched
194
+ # this request — use it to tell apart multiple budgets on the same entity.
195
+ #
196
+ # @return [Array<String>]
197
+ required :scope_entity_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :scopeEntityIds
198
+
199
+ # @!attribute usage_limit
200
+ # Hard usage limit for this node; null when the entity has no entity entitlement.
201
+ #
202
+ # @return [Float, nil]
203
+ required :usage_limit, Float, api_name: :usageLimit, nil?: true
204
+
205
+ # @!method initialize(current_usage:, entity_id:, is_granted:, scope_entity_ids:, usage_limit:)
206
+ # Some parameter documentations has been truncated, see
207
+ # {Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Feature::Chain} for
208
+ # more details.
209
+ #
210
+ # Per-entity governance node — limit and current usage for a single resolved
211
+ # entity.
212
+ #
213
+ # @param current_usage [Float] Amount consumed by this entity in the current cadence period.
214
+ #
215
+ # @param entity_id [String] External id of the entity within the customer.
216
+ #
217
+ # @param is_granted [Boolean] Whether this node alone permits the requested usage.
218
+ #
219
+ # @param scope_entity_ids [Array<String>] External ids of the entities this budget is scoped to. Empty (`[]`) is the node-
220
+ #
221
+ # @param usage_limit [Float, nil] Hard usage limit for this node; null when the entity has no entity entitlement.
222
+ end
223
+
162
224
  # @see Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Feature#feature
163
225
  class Feature < Stigg::Internal::Type::BaseModel
164
226
  # @!attribute id
@@ -283,6 +345,14 @@ module Stigg
283
345
  # @return [Time]
284
346
  required :usage_updated_at, Time, api_name: :usageUpdatedAt
285
347
 
348
+ # @!attribute chains
349
+ # Per-entity rollups, one chain per resolved dimension. Omitted when dimensions
350
+ # was not provided.
351
+ #
352
+ # @return [Array<Array<Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Chain>>, nil]
353
+ optional :chains,
354
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Chain]] }
355
+
286
356
  # @!attribute entitlement_updated_at
287
357
  # Timestamp of the last update to the entitlement grant or configuration.
288
358
  #
@@ -325,7 +395,7 @@ module Stigg
325
395
  # @return [Time, nil]
326
396
  optional :valid_until, Time, api_name: :validUntil
327
397
 
328
- # @!method initialize(access_denied_reason:, currency:, current_usage:, is_granted:, usage_limit:, usage_updated_at:, entitlement_updated_at: nil, reservation: nil, reserved: nil, reserved_on_expired_grants: nil, usage_period_end: nil, valid_until: nil, type: :CREDIT)
398
+ # @!method initialize(access_denied_reason:, currency:, current_usage:, is_granted:, usage_limit:, usage_updated_at:, chains: nil, entitlement_updated_at: nil, reservation: nil, reserved: nil, reserved_on_expired_grants: nil, usage_period_end: nil, valid_until: nil, type: :CREDIT)
329
399
  # Some parameter documentations has been truncated, see
330
400
  # {Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit} for more
331
401
  # details.
@@ -342,6 +412,8 @@ module Stigg
342
412
  #
343
413
  # @param usage_updated_at [Time] Timestamp of the last update to the credit usage.
344
414
  #
415
+ # @param chains [Array<Array<Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Chain>>] Per-entity rollups, one chain per resolved dimension. Omitted when dimensions wa
416
+ #
345
417
  # @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration.
346
418
  #
347
419
  # @param reservation [Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Reservation, nil] The reservation created by this request, when it asked to reserve credits and wa
@@ -433,6 +505,58 @@ module Stigg
433
505
  # @param unit_singular [String, nil] The singular form of the currency unit.
434
506
  end
435
507
 
508
+ class Chain < Stigg::Internal::Type::BaseModel
509
+ # @!attribute current_usage
510
+ # Amount consumed by this entity in the current cadence period.
511
+ #
512
+ # @return [Float]
513
+ required :current_usage, Float, api_name: :currentUsage
514
+
515
+ # @!attribute entity_id
516
+ # External id of the entity within the customer.
517
+ #
518
+ # @return [String]
519
+ required :entity_id, String, api_name: :entityId
520
+
521
+ # @!attribute is_granted
522
+ # Whether this node alone permits the requested usage.
523
+ #
524
+ # @return [Boolean]
525
+ required :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted
526
+
527
+ # @!attribute scope_entity_ids
528
+ # External ids of the entities this budget is scoped to. Empty (`[]`) is the
529
+ # node-wide budget; a non-empty set is the dimension-scoped budget that matched
530
+ # this request — use it to tell apart multiple budgets on the same entity.
531
+ #
532
+ # @return [Array<String>]
533
+ required :scope_entity_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :scopeEntityIds
534
+
535
+ # @!attribute usage_limit
536
+ # Hard usage limit for this node; null when the entity has no entity entitlement.
537
+ #
538
+ # @return [Float, nil]
539
+ required :usage_limit, Float, api_name: :usageLimit, nil?: true
540
+
541
+ # @!method initialize(current_usage:, entity_id:, is_granted:, scope_entity_ids:, usage_limit:)
542
+ # Some parameter documentations has been truncated, see
543
+ # {Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Chain} for
544
+ # more details.
545
+ #
546
+ # Per-entity governance node — limit and current usage for a single resolved
547
+ # entity.
548
+ #
549
+ # @param current_usage [Float] Amount consumed by this entity in the current cadence period.
550
+ #
551
+ # @param entity_id [String] External id of the entity within the customer.
552
+ #
553
+ # @param is_granted [Boolean] Whether this node alone permits the requested usage.
554
+ #
555
+ # @param scope_entity_ids [Array<String>] External ids of the entities this budget is scoped to. Empty (`[]`) is the node-
556
+ #
557
+ # @param usage_limit [Float, nil] Hard usage limit for this node; null when the entity has no entity entitlement.
558
+ end
559
+
436
560
  # @see Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit#reservation
437
561
  class Reservation < Stigg::Internal::Type::BaseModel
438
562
  # @!attribute id
@@ -0,0 +1,95 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Customers
7
+ module Entities
8
+ # @see Stigg::Resources::V1::Customers::Entities::Entitlements#list
9
+ class EntitlementListParams < Stigg::Internal::Type::BaseModel
10
+ extend Stigg::Internal::Type::RequestParameters::Converter
11
+ include Stigg::Internal::Type::RequestParameters
12
+
13
+ # @!attribute id
14
+ #
15
+ # @return [String]
16
+ required :id, String
17
+
18
+ # @!attribute after
19
+ # Return items that come after this cursor
20
+ #
21
+ # @return [String, nil]
22
+ optional :after, String
23
+
24
+ # @!attribute before
25
+ # Return items that come before this cursor
26
+ #
27
+ # @return [String, nil]
28
+ optional :before, String
29
+
30
+ # @!attribute currency_id
31
+ # Filter entity entitlements to a specific currency, by its ID. Mutually exclusive
32
+ # with `featureId`.
33
+ #
34
+ # @return [String, nil]
35
+ optional :currency_id, String
36
+
37
+ # @!attribute entity_id
38
+ # Filter entity entitlements to a specific entity ID
39
+ #
40
+ # @return [String, nil]
41
+ optional :entity_id, String
42
+
43
+ # @!attribute feature_id
44
+ # Filter entity entitlements to a specific feature, by its ID. Mutually exclusive
45
+ # with `currencyId`.
46
+ #
47
+ # @return [String, nil]
48
+ optional :feature_id, String
49
+
50
+ # @!attribute limit
51
+ # Maximum number of items to return
52
+ #
53
+ # @return [Integer, nil]
54
+ optional :limit, Integer
55
+
56
+ # @!attribute x_account_id
57
+ #
58
+ # @return [String, nil]
59
+ optional :x_account_id, String
60
+
61
+ # @!attribute x_environment_id
62
+ #
63
+ # @return [String, nil]
64
+ optional :x_environment_id, String
65
+
66
+ # @!method initialize(id:, after: nil, before: nil, currency_id: nil, entity_id: nil, feature_id: nil, limit: nil, x_account_id: nil, x_environment_id: nil, request_options: {})
67
+ # Some parameter documentations has been truncated, see
68
+ # {Stigg::Models::V1::Customers::Entities::EntitlementListParams} for more
69
+ # details.
70
+ #
71
+ # @param id [String]
72
+ #
73
+ # @param after [String] Return items that come after this cursor
74
+ #
75
+ # @param before [String] Return items that come before this cursor
76
+ #
77
+ # @param currency_id [String] Filter entity entitlements to a specific currency, by its ID. Mutually exclusive
78
+ #
79
+ # @param entity_id [String] Filter entity entitlements to a specific entity ID
80
+ #
81
+ # @param feature_id [String] Filter entity entitlements to a specific feature, by its ID. Mutually exclusive
82
+ #
83
+ # @param limit [Integer] Maximum number of items to return
84
+ #
85
+ # @param x_account_id [String]
86
+ #
87
+ # @param x_environment_id [String]
88
+ #
89
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Customers
7
+ module Entities
8
+ # @see Stigg::Resources::V1::Customers::Entities::Entitlements#list
9
+ class EntitlementListResponse < Stigg::Internal::Type::BaseModel
10
+ # @!attribute id
11
+ # Synthetic UUID identifier — also the cursor anchor for paginated lists
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute cadence
17
+ # Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`,
18
+ # `PT1M`.
19
+ #
20
+ # @return [String]
21
+ required :cadence, String
22
+
23
+ # @!attribute created_at
24
+ # Timestamp of when the record was created
25
+ #
26
+ # @return [Time]
27
+ required :created_at, Time, api_name: :createdAt
28
+
29
+ # @!attribute entity_id
30
+ # The entity ID this entity entitlement is attached to
31
+ #
32
+ # @return [String]
33
+ required :entity_id, String, api_name: :entityId
34
+
35
+ # @!attribute parent_id
36
+ # Parent entity ID in the hierarchy, or `null` for a root.
37
+ #
38
+ # @return [String, nil]
39
+ required :parent_id, String, api_name: :parentId, nil?: true
40
+
41
+ # @!attribute scope_entity_ids
42
+ # Dimension-scoped sub-limit key: the set of entity IDs this limit applies to.
43
+ # Empty is the node-wide limit that always matches; a non-empty set only applies
44
+ # when every listed entity is present in the resolved set (order-insensitive).
45
+ #
46
+ # @return [Array<String>]
47
+ required :scope_entity_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :scopeEntityIds
48
+
49
+ # @!attribute updated_at
50
+ # Timestamp of when the record was last updated
51
+ #
52
+ # @return [Time]
53
+ required :updated_at, Time, api_name: :updatedAt
54
+
55
+ # @!attribute usage_limit
56
+ # Maximum usage allowed within one cadence window
57
+ #
58
+ # @return [Float, nil]
59
+ required :usage_limit, Float, api_name: :usageLimit, nil?: true
60
+
61
+ # @!attribute currency_id
62
+ # Currency ID this entity entitlement grants (present when it grants a credit
63
+ # currency).
64
+ #
65
+ # @return [String, nil]
66
+ optional :currency_id, String, api_name: :currencyId
67
+
68
+ # @!attribute feature_id
69
+ # Feature ID this entity entitlement grants (present when it grants a feature).
70
+ #
71
+ # @return [String, nil]
72
+ optional :feature_id, String, api_name: :featureId
73
+
74
+ # @!method initialize(id:, cadence:, created_at:, entity_id:, parent_id:, scope_entity_ids:, updated_at:, usage_limit:, currency_id: nil, feature_id: nil)
75
+ # Some parameter documentations has been truncated, see
76
+ # {Stigg::Models::V1::Customers::Entities::EntitlementListResponse} for more
77
+ # details.
78
+ #
79
+ # An entity entitlement for an entity belonging to a customer. Defines how much of
80
+ # the feature or currency the entity may consume (`usageLimit`) and how often the
81
+ # counter resets (`cadence`).
82
+ #
83
+ # @param id [String] Synthetic UUID identifier — also the cursor anchor for paginated lists
84
+ #
85
+ # @param cadence [String] Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`, `PT
86
+ #
87
+ # @param created_at [Time] Timestamp of when the record was created
88
+ #
89
+ # @param entity_id [String] The entity ID this entity entitlement is attached to
90
+ #
91
+ # @param parent_id [String, nil] Parent entity ID in the hierarchy, or `null` for a root.
92
+ #
93
+ # @param scope_entity_ids [Array<String>] Dimension-scoped sub-limit key: the set of entity IDs this limit applies to. Emp
94
+ #
95
+ # @param updated_at [Time] Timestamp of when the record was last updated
96
+ #
97
+ # @param usage_limit [Float, nil] Maximum usage allowed within one cadence window
98
+ #
99
+ # @param currency_id [String] Currency ID this entity entitlement grants (present when it grants a credit curr
100
+ #
101
+ # @param feature_id [String] Feature ID this entity entitlement grants (present when it grants a feature).
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,129 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Customers
7
+ module Entities
8
+ # @see Stigg::Resources::V1::Customers::Entities::Entitlements#upsert
9
+ class EntitlementUpsertParams < Stigg::Internal::Type::BaseModel
10
+ extend Stigg::Internal::Type::RequestParameters::Converter
11
+ include Stigg::Internal::Type::RequestParameters
12
+
13
+ # @!attribute id
14
+ #
15
+ # @return [String]
16
+ required :id, String
17
+
18
+ # @!attribute entity_entitlements
19
+ # Entity entitlements to upsert (1–100 per request)
20
+ #
21
+ # @return [Array<Stigg::Models::V1::Customers::Entities::EntitlementUpsertParams::EntityEntitlement>]
22
+ required :entity_entitlements,
23
+ -> {
24
+ Stigg::Internal::Type::ArrayOf[Stigg::V1::Customers::Entities::EntitlementUpsertParams::EntityEntitlement]
25
+ },
26
+ api_name: :entityEntitlements
27
+
28
+ # @!attribute x_account_id
29
+ #
30
+ # @return [String, nil]
31
+ optional :x_account_id, String
32
+
33
+ # @!attribute x_environment_id
34
+ #
35
+ # @return [String, nil]
36
+ optional :x_environment_id, String
37
+
38
+ # @!method initialize(id:, entity_entitlements:, x_account_id: nil, x_environment_id: nil, request_options: {})
39
+ # @param id [String]
40
+ #
41
+ # @param entity_entitlements [Array<Stigg::Models::V1::Customers::Entities::EntitlementUpsertParams::EntityEntitlement>] Entity entitlements to upsert (1–100 per request)
42
+ #
43
+ # @param x_account_id [String]
44
+ #
45
+ # @param x_environment_id [String]
46
+ #
47
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
48
+
49
+ class EntityEntitlement < Stigg::Internal::Type::BaseModel
50
+ # @!attribute entity_id
51
+ # The entity ID this entity entitlement is attached to
52
+ #
53
+ # @return [String]
54
+ required :entity_id, String, api_name: :entityId
55
+
56
+ # @!attribute cadence
57
+ # Usage-reset cadence (required on create) as an ISO-8601 single-unit duration,
58
+ # e.g. `P1M`, `P30D`, `PT1M`.
59
+ #
60
+ # @return [String, nil]
61
+ optional :cadence, String
62
+
63
+ # @!attribute currency_id
64
+ # Currency ID this entity entitlement grants (credit limits). Mutually exclusive
65
+ # with `featureId`.
66
+ #
67
+ # @return [String, nil]
68
+ optional :currency_id, String, api_name: :currencyId
69
+
70
+ # @!attribute feature_id
71
+ # Feature ID this entity entitlement grants. Mutually exclusive with `currencyId`.
72
+ #
73
+ # @return [String, nil]
74
+ optional :feature_id, String, api_name: :featureId
75
+
76
+ # @!attribute parent_id
77
+ # Parent entity ID in the hierarchy. Omit to leave the current parent untouched (a
78
+ # new node defaults to a root); `null` detaches to a root; an ID sets or changes
79
+ # the parent. Reparenting or detaching an existing node is leaf-only; place a
80
+ # parent before its children, or in the same batch.
81
+ #
82
+ # @return [String, nil]
83
+ optional :parent_id, String, api_name: :parentId, nil?: true
84
+
85
+ # @!attribute scope_entity_ids
86
+ # Dimension-scoped sub-limit: the set of entity IDs this limit applies to
87
+ # (order-insensitive, unique, at most 5). Omit or leave empty for the node-wide
88
+ # limit.
89
+ #
90
+ # @return [Array<String>, nil]
91
+ optional :scope_entity_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :scopeEntityIds
92
+
93
+ # @!attribute usage_limit
94
+ # Maximum usage allowed within one cadence window (required on create)
95
+ #
96
+ # @return [Float, nil]
97
+ optional :usage_limit, Float, api_name: :usageLimit, nil?: true
98
+
99
+ # @!method initialize(entity_id:, cadence: nil, currency_id: nil, feature_id: nil, parent_id: nil, scope_entity_ids: nil, usage_limit: nil)
100
+ # Some parameter documentations has been truncated, see
101
+ # {Stigg::Models::V1::Customers::Entities::EntitlementUpsertParams::EntityEntitlement}
102
+ # for more details.
103
+ #
104
+ # A single entity entitlement to create or update. Identify the feature or
105
+ # currency with exactly one of `featureId` or `currencyId`. The natural key is the
106
+ # `(entityId, featureId or currencyId, scopeEntityIds)` triple. On create both
107
+ # `usageLimit` and `cadence` are required; on update they may be omitted
108
+ # individually to preserve the existing value.
109
+ #
110
+ # @param entity_id [String] The entity ID this entity entitlement is attached to
111
+ #
112
+ # @param cadence [String] Usage-reset cadence (required on create) as an ISO-8601 single-unit duration, e.
113
+ #
114
+ # @param currency_id [String] Currency ID this entity entitlement grants (credit limits). Mutually exclusive w
115
+ #
116
+ # @param feature_id [String] Feature ID this entity entitlement grants. Mutually exclusive with `currencyId`.
117
+ #
118
+ # @param parent_id [String, nil] Parent entity ID in the hierarchy. Omit to leave the current parent untouched (a
119
+ #
120
+ # @param scope_entity_ids [Array<String>] Dimension-scoped sub-limit: the set of entity IDs this limit applies to (order-i
121
+ #
122
+ # @param usage_limit [Float, nil] Maximum usage allowed within one cadence window (required on create)
123
+ end
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
129
+ end