stigg 0.1.0.pre.beta.6 → 0.1.0.pre.beta.8

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/stigg/client.rb +4 -0
  5. data/lib/stigg/models/v1_beta/customers/entitlement_check_params.rb +79 -0
  6. data/lib/stigg/models/v1_beta/customers/entitlement_check_response.rb +530 -0
  7. data/lib/stigg/models/v1_beta/entity_archive_params.rb +31 -0
  8. data/lib/stigg/models/v1_beta/entity_archive_response.rb +35 -0
  9. data/lib/stigg/models/v1_beta/entity_list_params.rb +74 -0
  10. data/lib/stigg/models/v1_beta/entity_list_response.rb +61 -0
  11. data/lib/stigg/models/v1_beta/entity_retrieve_params.rb +28 -0
  12. data/lib/stigg/models/v1_beta/entity_retrieve_response.rb +75 -0
  13. data/lib/stigg/models/v1_beta/entity_type_list_params.rb +40 -0
  14. data/lib/stigg/models/v1_beta/entity_type_list_response.rb +60 -0
  15. data/lib/stigg/models/v1_beta/entity_type_upsert_params.rb +57 -0
  16. data/lib/stigg/models/v1_beta/entity_type_upsert_response.rb +73 -0
  17. data/lib/stigg/models/v1_beta/entity_unarchive_params.rb +31 -0
  18. data/lib/stigg/models/v1_beta/entity_unarchive_response.rb +35 -0
  19. data/lib/stigg/models/v1_beta/entity_upsert_params.rb +66 -0
  20. data/lib/stigg/models/v1_beta/entity_upsert_response.rb +73 -0
  21. data/lib/stigg/models.rb +2 -0
  22. data/lib/stigg/resources/v1/events.rb +0 -4
  23. data/lib/stigg/resources/v1_beta/customers/entitlements.rb +64 -0
  24. data/lib/stigg/resources/v1_beta/customers.rb +20 -0
  25. data/lib/stigg/resources/v1_beta/entities.rb +150 -0
  26. data/lib/stigg/resources/v1_beta/entity_types.rb +70 -0
  27. data/lib/stigg/resources/v1_beta.rb +26 -0
  28. data/lib/stigg/version.rb +1 -1
  29. data/lib/stigg.rb +21 -5
  30. data/rbi/stigg/client.rbi +3 -0
  31. data/rbi/stigg/models/v1_beta/customers/entitlement_check_params.rbi +120 -0
  32. data/rbi/stigg/models/v1_beta/customers/entitlement_check_response.rbi +1063 -0
  33. data/rbi/stigg/models/v1_beta/entity_archive_params.rbi +51 -0
  34. data/rbi/stigg/models/v1_beta/entity_archive_response.rbi +74 -0
  35. data/rbi/stigg/models/v1_beta/entity_list_params.rbi +143 -0
  36. data/rbi/stigg/models/v1_beta/entity_list_response.rbi +83 -0
  37. data/rbi/stigg/models/v1_beta/entity_retrieve_params.rbi +45 -0
  38. data/rbi/stigg/models/v1_beta/entity_retrieve_response.rbi +124 -0
  39. data/rbi/stigg/models/v1_beta/entity_type_list_params.rbi +70 -0
  40. data/rbi/stigg/models/v1_beta/entity_type_list_response.rbi +80 -0
  41. data/rbi/stigg/models/v1_beta/entity_type_upsert_params.rbi +103 -0
  42. data/rbi/stigg/models/v1_beta/entity_type_upsert_response.rbi +120 -0
  43. data/rbi/stigg/models/v1_beta/entity_unarchive_params.rbi +54 -0
  44. data/rbi/stigg/models/v1_beta/entity_unarchive_response.rbi +74 -0
  45. data/rbi/stigg/models/v1_beta/entity_upsert_params.rbi +116 -0
  46. data/rbi/stigg/models/v1_beta/entity_upsert_response.rbi +120 -0
  47. data/rbi/stigg/models.rbi +2 -0
  48. data/rbi/stigg/resources/v1/events.rbi +0 -3
  49. data/rbi/stigg/resources/v1_beta/customers/entitlements.rbi +55 -0
  50. data/rbi/stigg/resources/v1_beta/customers.rbi +17 -0
  51. data/rbi/stigg/resources/v1_beta/entities.rbi +118 -0
  52. data/rbi/stigg/resources/v1_beta/entity_types.rbi +57 -0
  53. data/rbi/stigg/resources/v1_beta.rbi +21 -0
  54. data/sig/stigg/client.rbs +2 -0
  55. data/sig/stigg/models/v1_beta/customers/entitlement_check_params.rbs +72 -0
  56. data/sig/stigg/models/v1_beta/customers/entitlement_check_response.rbs +465 -0
  57. data/sig/stigg/models/v1_beta/entity_archive_params.rbs +30 -0
  58. data/sig/stigg/models/v1_beta/entity_archive_response.rbs +30 -0
  59. data/sig/stigg/models/v1_beta/entity_list_params.rbs +76 -0
  60. data/sig/stigg/models/v1_beta/entity_list_response.rbs +47 -0
  61. data/sig/stigg/models/v1_beta/entity_retrieve_params.rbs +30 -0
  62. data/sig/stigg/models/v1_beta/entity_retrieve_response.rbs +62 -0
  63. data/sig/stigg/models/v1_beta/entity_type_list_params.rbs +40 -0
  64. data/sig/stigg/models/v1_beta/entity_type_list_response.rbs +42 -0
  65. data/sig/stigg/models/v1_beta/entity_type_upsert_params.rbs +53 -0
  66. data/sig/stigg/models/v1_beta/entity_type_upsert_response.rbs +57 -0
  67. data/sig/stigg/models/v1_beta/entity_unarchive_params.rbs +30 -0
  68. data/sig/stigg/models/v1_beta/entity_unarchive_response.rbs +30 -0
  69. data/sig/stigg/models/v1_beta/entity_upsert_params.rbs +60 -0
  70. data/sig/stigg/models/v1_beta/entity_upsert_response.rbs +62 -0
  71. data/sig/stigg/models.rbs +2 -0
  72. data/sig/stigg/resources/v1/events.rbs +0 -2
  73. data/sig/stigg/resources/v1_beta/customers/entitlements.rbs +22 -0
  74. data/sig/stigg/resources/v1_beta/customers.rbs +11 -0
  75. data/sig/stigg/resources/v1_beta/entities.rbs +43 -0
  76. data/sig/stigg/resources/v1_beta/entity_types.rbs +21 -0
  77. data/sig/stigg/resources/v1_beta.rbs +13 -0
  78. metadata +65 -17
  79. data/lib/stigg/models/v1/events/beta/customers/entitlement_check_params.rb +0 -84
  80. data/lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb +0 -535
  81. data/lib/stigg/resources/v1/events/beta/customers/entitlements.rb +0 -69
  82. data/lib/stigg/resources/v1/events/beta/customers.rb +0 -24
  83. data/lib/stigg/resources/v1/events/beta.rb +0 -22
  84. data/rbi/stigg/models/v1/events/beta/customers/entitlement_check_params.rbi +0 -124
  85. data/rbi/stigg/models/v1/events/beta/customers/entitlement_check_response.rbi +0 -1067
  86. data/rbi/stigg/resources/v1/events/beta/customers/entitlements.rbi +0 -59
  87. data/rbi/stigg/resources/v1/events/beta/customers.rbi +0 -25
  88. data/rbi/stigg/resources/v1/events/beta.rbi +0 -19
  89. data/sig/stigg/models/v1/events/beta/customers/entitlement_check_params.rbs +0 -78
  90. data/sig/stigg/models/v1/events/beta/customers/entitlement_check_response.rbs +0 -469
  91. data/sig/stigg/resources/v1/events/beta/customers/entitlements.rbs +0 -26
  92. data/sig/stigg/resources/v1/events/beta/customers.rbs +0 -15
  93. data/sig/stigg/resources/v1/events/beta.rbs +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8306af9f56c2866b0124eb07cd3302843917ee34605e8a3e05fd4184f6ec8e2c
4
- data.tar.gz: 31872e5d20a38209c1c554a08af61d49326dee4ca86ca95cd663d4ac05992e38
3
+ metadata.gz: 70f15c897729ecad045000897480e8eb6737149b27d193d81043bf0fb911ce29
4
+ data.tar.gz: 769b53256d12fb857e847ddbec044e1e8ffb0f6516309091949105f7470617c8
5
5
  SHA512:
6
- metadata.gz: 1461061f7a986b6070ae919e702152e50dc75bb1adcf893175cc2c5476096334334de5e89eedefe19a78f51f398dd9f2aefcb48efda70da72675201b6f63d969
7
- data.tar.gz: 408a782be980012bd23a8a8a2edef308b90a761fa2c57d2007b6cd52d1a7b7ccb47b22a590ad21b8cf6e3e66ca139aaf9944a7fd8939a6ff0dac86d190307bdd
6
+ metadata.gz: fd0793b0bac6d6fb76e48c484a91d1b987665aac31a4ce5782e02acf94f044ebc50275df08406a33d3c98ab68bda1fd4704fe1c988b36e1f396ee94574dd423f
7
+ data.tar.gz: 21763c72383e15868a6919d4b4734e623ff1194a7095ab3b12ecd08ac9bd2781cb01c2464d3ed0164ba6f2abd140b239ffd3d86318a8dbd586ec2b0e8cf66678
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-beta.8 (2026-05-25)
4
+
5
+ Full Changelog: [v0.1.0-beta.7...v0.1.0-beta.8](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.7...v0.1.0-beta.8)
6
+
7
+ ### Features
8
+
9
+ * **api:** add entities resource with retrieve/list/archive/unarchive/upsert methods ([7ed5106](https://github.com/stiggio/stigg-ruby/commit/7ed5106db56d60583655a9750cf2a3e58c9fb3c7))
10
+
11
+ ## 0.1.0-beta.7 (2026-05-24)
12
+
13
+ Full Changelog: [v0.1.0-beta.6...v0.1.0-beta.7](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.6...v0.1.0-beta.7)
14
+
15
+ ### Features
16
+
17
+ * **api:** add entity_types resource with list/upsert to events beta ([0b33857](https://github.com/stiggio/stigg-ruby/commit/0b33857c6a530e5f4508a231d8545f7b2f28a19d))
18
+
3
19
  ## 0.1.0-beta.6 (2026-05-21)
4
20
 
5
21
  Full Changelog: [v0.1.0-beta.5...v0.1.0-beta.6](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.5...v0.1.0-beta.6)
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.6"
27
+ gem "stigg", "~> 0.1.0.pre.beta.8"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
data/lib/stigg/client.rb CHANGED
@@ -21,6 +21,9 @@ module Stigg
21
21
  # @return [Stigg::Resources::V1]
22
22
  attr_reader :v1
23
23
 
24
+ # @return [Stigg::Resources::V1Beta]
25
+ attr_reader :v1_beta
26
+
24
27
  # @api private
25
28
  #
26
29
  # @return [Hash{String=>String}]
@@ -81,6 +84,7 @@ module Stigg
81
84
  )
82
85
 
83
86
  @v1 = Stigg::Resources::V1.new(client: self)
87
+ @v1_beta = Stigg::Resources::V1Beta.new(client: self)
84
88
  end
85
89
  end
86
90
  end
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1Beta
6
+ module Customers
7
+ # @see Stigg::Resources::V1Beta::Customers::Entitlements#check
8
+ class EntitlementCheckParams < Stigg::Internal::Type::BaseModel
9
+ extend Stigg::Internal::Type::RequestParameters::Converter
10
+ include Stigg::Internal::Type::RequestParameters
11
+
12
+ # @!attribute id
13
+ #
14
+ # @return [String]
15
+ required :id, String
16
+
17
+ # @!attribute currency_id
18
+ # Currency ID (refId) to check for credit entitlements. Mutually exclusive with
19
+ # `featureId`.
20
+ #
21
+ # @return [String, nil]
22
+ optional :currency_id, String
23
+
24
+ # @!attribute dimensions
25
+ # Optional attribution map (e.g. `dimensions[userId]=u1`). When provided, the
26
+ # response includes a `chains` array with per-entity governance limits.
27
+ #
28
+ # @return [Hash{Symbol=>String}, nil]
29
+ optional :dimensions, Stigg::Internal::Type::HashOf[String]
30
+
31
+ # @!attribute feature_id
32
+ # Feature ID (refId) to check. Mutually exclusive with `currencyId`.
33
+ #
34
+ # @return [String, nil]
35
+ optional :feature_id, String
36
+
37
+ # @!attribute requested_usage
38
+ # Requested usage amount to evaluate against the entitlement limit (numeric
39
+ # features only)
40
+ #
41
+ # @return [Integer, nil]
42
+ optional :requested_usage, Integer
43
+
44
+ # @!attribute requested_values
45
+ # Requested values to evaluate against allowed values (enum features only)
46
+ #
47
+ # @return [Array<String>, nil]
48
+ optional :requested_values, Stigg::Internal::Type::ArrayOf[String]
49
+
50
+ # @!attribute resource_id
51
+ # Resource ID to scope the entitlement check to a specific resource
52
+ #
53
+ # @return [String, nil]
54
+ optional :resource_id, String
55
+
56
+ # @!method initialize(id:, currency_id: nil, dimensions: nil, feature_id: nil, requested_usage: nil, requested_values: nil, resource_id: nil, request_options: {})
57
+ # Some parameter documentations has been truncated, see
58
+ # {Stigg::Models::V1Beta::Customers::EntitlementCheckParams} for more details.
59
+ #
60
+ # @param id [String]
61
+ #
62
+ # @param currency_id [String] Currency ID (refId) to check for credit entitlements. Mutually exclusive with `f
63
+ #
64
+ # @param dimensions [Hash{Symbol=>String}] Optional attribution map (e.g. `dimensions[userId]=u1`). When provided, the resp
65
+ #
66
+ # @param feature_id [String] Feature ID (refId) to check. Mutually exclusive with `currencyId`.
67
+ #
68
+ # @param requested_usage [Integer] Requested usage amount to evaluate against the entitlement limit (numeric featur
69
+ #
70
+ # @param requested_values [Array<String>] Requested values to evaluate against allowed values (enum features only)
71
+ #
72
+ # @param resource_id [String] Resource ID to scope the entitlement check to a specific resource
73
+ #
74
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,530 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1Beta
6
+ module Customers
7
+ # @see Stigg::Resources::V1Beta::Customers::Entitlements#check
8
+ class EntitlementCheckResponse < Stigg::Internal::Type::BaseModel
9
+ # @!attribute data
10
+ # Feature entitlement with optional governance chains attached.
11
+ #
12
+ # @return [Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit]
13
+ required :data, union: -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data }
14
+
15
+ # @!method initialize(data:)
16
+ # Response object
17
+ #
18
+ # @param data [Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit] Feature entitlement with optional governance chains attached.
19
+
20
+ # Feature entitlement with optional governance chains attached.
21
+ #
22
+ # @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse#data
23
+ module Data
24
+ extend Stigg::Internal::Type::Union
25
+
26
+ discriminator :type
27
+
28
+ # Feature entitlement with optional governance chains attached.
29
+ variant :FEATURE, -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature }
30
+
31
+ # Credit entitlement with optional governance chains attached.
32
+ variant :CREDIT, -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit }
33
+
34
+ class Feature < Stigg::Internal::Type::BaseModel
35
+ # @!attribute access_denied_reason
36
+ #
37
+ # @return [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::AccessDeniedReason, nil]
38
+ required :access_denied_reason,
39
+ enum: -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::AccessDeniedReason },
40
+ api_name: :accessDeniedReason,
41
+ nil?: true
42
+
43
+ # @!attribute is_granted
44
+ #
45
+ # @return [Boolean]
46
+ required :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted
47
+
48
+ # @!attribute type
49
+ #
50
+ # @return [Symbol, :FEATURE]
51
+ required :type, const: :FEATURE
52
+
53
+ # @!attribute chains
54
+ # Per-entity rollups, one chain per resolved dimension. Omitted when dimensions
55
+ # was not provided.
56
+ #
57
+ # @return [Array<Array<Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Chain>>, nil]
58
+ optional :chains,
59
+ -> do
60
+ Stigg::Internal::Type::ArrayOf[
61
+ Stigg::Internal::Type::ArrayOf[Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Chain]
62
+ ]
63
+ end
64
+
65
+ # @!attribute current_usage
66
+ #
67
+ # @return [Float, nil]
68
+ optional :current_usage, Float, api_name: :currentUsage
69
+
70
+ # @!attribute entitlement_updated_at
71
+ # Timestamp of the last update to the entitlement grant or configuration.
72
+ #
73
+ # @return [Time, nil]
74
+ optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt
75
+
76
+ # @!attribute feature
77
+ #
78
+ # @return [Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature, nil]
79
+ optional :feature,
80
+ -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature }
81
+
82
+ # @!attribute has_unlimited_usage
83
+ #
84
+ # @return [Boolean, nil]
85
+ optional :has_unlimited_usage, Stigg::Internal::Type::Boolean, api_name: :hasUnlimitedUsage
86
+
87
+ # @!attribute reset_period
88
+ #
89
+ # @return [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::ResetPeriod, nil]
90
+ optional :reset_period,
91
+ enum: -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::ResetPeriod },
92
+ api_name: :resetPeriod,
93
+ nil?: true
94
+
95
+ # @!attribute usage_limit
96
+ #
97
+ # @return [Float, nil]
98
+ optional :usage_limit, Float, api_name: :usageLimit, nil?: true
99
+
100
+ # @!attribute usage_period_anchor
101
+ # The anchor for calculating the usage period for metered entitlements with a
102
+ # reset period configured
103
+ #
104
+ # @return [Time, nil]
105
+ optional :usage_period_anchor, Time, api_name: :usagePeriodAnchor
106
+
107
+ # @!attribute usage_period_end
108
+ # The end date of the usage period for metered entitlements with a reset period
109
+ # configured
110
+ #
111
+ # @return [Time, nil]
112
+ optional :usage_period_end, Time, api_name: :usagePeriodEnd
113
+
114
+ # @!attribute usage_period_start
115
+ # The start date of the usage period for metered entitlements with a reset period
116
+ # configured
117
+ #
118
+ # @return [Time, nil]
119
+ optional :usage_period_start, Time, api_name: :usagePeriodStart
120
+
121
+ # @!attribute valid_until
122
+ # The next time the entitlement should be recalculated
123
+ #
124
+ # @return [Time, nil]
125
+ optional :valid_until, Time, api_name: :validUntil
126
+
127
+ # @!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)
128
+ # Some parameter documentations has been truncated, see
129
+ # {Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature} for
130
+ # more details.
131
+ #
132
+ # Feature entitlement with optional governance chains attached.
133
+ #
134
+ # @param access_denied_reason [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::AccessDeniedReason, nil]
135
+ #
136
+ # @param is_granted [Boolean]
137
+ #
138
+ # @param chains [Array<Array<Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Chain>>] Per-entity rollups, one chain per resolved dimension. Omitted when dimensions wa
139
+ #
140
+ # @param current_usage [Float]
141
+ #
142
+ # @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration.
143
+ #
144
+ # @param feature [Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature]
145
+ #
146
+ # @param has_unlimited_usage [Boolean]
147
+ #
148
+ # @param reset_period [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::ResetPeriod, nil]
149
+ #
150
+ # @param usage_limit [Float, nil]
151
+ #
152
+ # @param usage_period_anchor [Time] The anchor for calculating the usage period for metered entitlements with a rese
153
+ #
154
+ # @param usage_period_end [Time] The end date of the usage period for metered entitlements with a reset period co
155
+ #
156
+ # @param usage_period_start [Time] The start date of the usage period for metered entitlements with a reset period
157
+ #
158
+ # @param valid_until [Time] The next time the entitlement should be recalculated
159
+ #
160
+ # @param type [Symbol, :FEATURE]
161
+
162
+ # @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature#access_denied_reason
163
+ module AccessDeniedReason
164
+ extend Stigg::Internal::Type::Enum
165
+
166
+ FEATURE_NOT_FOUND = :FeatureNotFound
167
+ CUSTOMER_NOT_FOUND = :CustomerNotFound
168
+ CUSTOMER_IS_ARCHIVED = :CustomerIsArchived
169
+ CUSTOMER_RESOURCE_NOT_FOUND = :CustomerResourceNotFound
170
+ NO_ACTIVE_SUBSCRIPTION = :NoActiveSubscription
171
+ NO_FEATURE_ENTITLEMENT_IN_SUBSCRIPTION = :NoFeatureEntitlementInSubscription
172
+ REQUESTED_USAGE_EXCEEDING_LIMIT = :RequestedUsageExceedingLimit
173
+ REQUESTED_VALUES_MISMATCH = :RequestedValuesMismatch
174
+ BUDGET_EXCEEDED = :BudgetExceeded
175
+ UNKNOWN = :Unknown
176
+ FEATURE_TYPE_MISMATCH = :FeatureTypeMismatch
177
+ REVOKED = :Revoked
178
+ INSUFFICIENT_CREDITS = :InsufficientCredits
179
+ ENTITLEMENT_NOT_FOUND = :EntitlementNotFound
180
+
181
+ # @!method self.values
182
+ # @return [Array<Symbol>]
183
+ end
184
+
185
+ class Chain < Stigg::Internal::Type::BaseModel
186
+ # @!attribute current_usage
187
+ # Amount consumed by this entity in the current cadence period.
188
+ #
189
+ # @return [Float]
190
+ required :current_usage, Float, api_name: :currentUsage
191
+
192
+ # @!attribute entity_id
193
+ # External id of the entity within the customer.
194
+ #
195
+ # @return [String]
196
+ required :entity_id, String, api_name: :entityId
197
+
198
+ # @!attribute is_granted
199
+ # Whether this node alone permits the requested usage.
200
+ #
201
+ # @return [Boolean]
202
+ required :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted
203
+
204
+ # @!attribute usage_limit
205
+ # Hard usage limit for this node; null when no assignment is configured.
206
+ #
207
+ # @return [Float, nil]
208
+ required :usage_limit, Float, api_name: :usageLimit, nil?: true
209
+
210
+ # @!method initialize(current_usage:, entity_id:, is_granted:, usage_limit:)
211
+ # Per-entity governance node — limit and current usage for a single resolved
212
+ # entity.
213
+ #
214
+ # @param current_usage [Float] Amount consumed by this entity in the current cadence period.
215
+ #
216
+ # @param entity_id [String] External id of the entity within the customer.
217
+ #
218
+ # @param is_granted [Boolean] Whether this node alone permits the requested usage.
219
+ #
220
+ # @param usage_limit [Float, nil] Hard usage limit for this node; null when no assignment is configured.
221
+ end
222
+
223
+ # @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature#feature
224
+ class Feature < Stigg::Internal::Type::BaseModel
225
+ # @!attribute id
226
+ # The unique reference ID of the entitlement.
227
+ #
228
+ # @return [String]
229
+ required :id, String
230
+
231
+ # @!attribute display_name
232
+ # The human-readable name of the entitlement, shown in UI elements.
233
+ #
234
+ # @return [String]
235
+ required :display_name, String, api_name: :displayName
236
+
237
+ # @!attribute feature_status
238
+ # The current status of the feature.
239
+ #
240
+ # @return [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature::FeatureStatus]
241
+ required :feature_status,
242
+ enum: -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature::FeatureStatus },
243
+ api_name: :featureStatus
244
+
245
+ # @!attribute feature_type
246
+ # The type of feature associated with the entitlement.
247
+ #
248
+ # @return [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature::FeatureType]
249
+ required :feature_type,
250
+ enum: -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature::FeatureType },
251
+ api_name: :featureType
252
+
253
+ # @!method initialize(id:, display_name:, feature_status:, feature_type:)
254
+ # @param id [String] The unique reference ID of the entitlement.
255
+ #
256
+ # @param display_name [String] The human-readable name of the entitlement, shown in UI elements.
257
+ #
258
+ # @param feature_status [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature::FeatureStatus] The current status of the feature.
259
+ #
260
+ # @param feature_type [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature::FeatureType] The type of feature associated with the entitlement.
261
+
262
+ # The current status of the feature.
263
+ #
264
+ # @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature#feature_status
265
+ module FeatureStatus
266
+ extend Stigg::Internal::Type::Enum
267
+
268
+ NEW = :NEW
269
+ SUSPENDED = :SUSPENDED
270
+ ACTIVE = :ACTIVE
271
+
272
+ # @!method self.values
273
+ # @return [Array<Symbol>]
274
+ end
275
+
276
+ # The type of feature associated with the entitlement.
277
+ #
278
+ # @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature#feature_type
279
+ module FeatureType
280
+ extend Stigg::Internal::Type::Enum
281
+
282
+ BOOLEAN = :BOOLEAN
283
+ NUMBER = :NUMBER
284
+ ENUM = :ENUM
285
+
286
+ # @!method self.values
287
+ # @return [Array<Symbol>]
288
+ end
289
+ end
290
+
291
+ # @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature#reset_period
292
+ module ResetPeriod
293
+ extend Stigg::Internal::Type::Enum
294
+
295
+ YEAR = :YEAR
296
+ MONTH = :MONTH
297
+ WEEK = :WEEK
298
+ DAY = :DAY
299
+ HOUR = :HOUR
300
+
301
+ # @!method self.values
302
+ # @return [Array<Symbol>]
303
+ end
304
+ end
305
+
306
+ class Credit < Stigg::Internal::Type::BaseModel
307
+ # @!attribute access_denied_reason
308
+ #
309
+ # @return [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::AccessDeniedReason, nil]
310
+ required :access_denied_reason,
311
+ enum: -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::AccessDeniedReason },
312
+ api_name: :accessDeniedReason,
313
+ nil?: true
314
+
315
+ # @!attribute currency
316
+ # The currency associated with a credit entitlement.
317
+ #
318
+ # @return [Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Currency]
319
+ required :currency,
320
+ -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Currency }
321
+
322
+ # @!attribute current_usage
323
+ #
324
+ # @return [Float]
325
+ required :current_usage, Float, api_name: :currentUsage
326
+
327
+ # @!attribute is_granted
328
+ #
329
+ # @return [Boolean]
330
+ required :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted
331
+
332
+ # @!attribute type
333
+ #
334
+ # @return [Symbol, :CREDIT]
335
+ required :type, const: :CREDIT
336
+
337
+ # @!attribute usage_limit
338
+ #
339
+ # @return [Float]
340
+ required :usage_limit, Float, api_name: :usageLimit
341
+
342
+ # @!attribute usage_updated_at
343
+ # Timestamp of the last update to the credit usage.
344
+ #
345
+ # @return [Time]
346
+ required :usage_updated_at, Time, api_name: :usageUpdatedAt
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::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Chain>>, nil]
353
+ optional :chains,
354
+ -> do
355
+ Stigg::Internal::Type::ArrayOf[
356
+ Stigg::Internal::Type::ArrayOf[Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Chain]
357
+ ]
358
+ end
359
+
360
+ # @!attribute entitlement_updated_at
361
+ # Timestamp of the last update to the entitlement grant or configuration.
362
+ #
363
+ # @return [Time, nil]
364
+ optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt
365
+
366
+ # @!attribute usage_period_end
367
+ # The end date of the current billing period for recurring credit grants.
368
+ #
369
+ # @return [Time, nil]
370
+ optional :usage_period_end, Time, api_name: :usagePeriodEnd
371
+
372
+ # @!attribute valid_until
373
+ # The next time the entitlement should be recalculated
374
+ #
375
+ # @return [Time, nil]
376
+ optional :valid_until, Time, api_name: :validUntil
377
+
378
+ # @!method initialize(access_denied_reason:, currency:, current_usage:, is_granted:, usage_limit:, usage_updated_at:, chains: nil, entitlement_updated_at: nil, usage_period_end: nil, valid_until: nil, type: :CREDIT)
379
+ # Some parameter documentations has been truncated, see
380
+ # {Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit} for
381
+ # more details.
382
+ #
383
+ # Credit entitlement with optional governance chains attached.
384
+ #
385
+ # @param access_denied_reason [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::AccessDeniedReason, nil]
386
+ #
387
+ # @param currency [Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Currency] The currency associated with a credit entitlement.
388
+ #
389
+ # @param current_usage [Float]
390
+ #
391
+ # @param is_granted [Boolean]
392
+ #
393
+ # @param usage_limit [Float]
394
+ #
395
+ # @param usage_updated_at [Time] Timestamp of the last update to the credit usage.
396
+ #
397
+ # @param chains [Array<Array<Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Chain>>] Per-entity rollups, one chain per resolved dimension. Omitted when dimensions wa
398
+ #
399
+ # @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration.
400
+ #
401
+ # @param usage_period_end [Time] The end date of the current billing period for recurring credit grants.
402
+ #
403
+ # @param valid_until [Time] The next time the entitlement should be recalculated
404
+ #
405
+ # @param type [Symbol, :CREDIT]
406
+
407
+ # @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit#access_denied_reason
408
+ module AccessDeniedReason
409
+ extend Stigg::Internal::Type::Enum
410
+
411
+ FEATURE_NOT_FOUND = :FeatureNotFound
412
+ CUSTOMER_NOT_FOUND = :CustomerNotFound
413
+ CUSTOMER_IS_ARCHIVED = :CustomerIsArchived
414
+ CUSTOMER_RESOURCE_NOT_FOUND = :CustomerResourceNotFound
415
+ NO_ACTIVE_SUBSCRIPTION = :NoActiveSubscription
416
+ NO_FEATURE_ENTITLEMENT_IN_SUBSCRIPTION = :NoFeatureEntitlementInSubscription
417
+ REQUESTED_USAGE_EXCEEDING_LIMIT = :RequestedUsageExceedingLimit
418
+ REQUESTED_VALUES_MISMATCH = :RequestedValuesMismatch
419
+ BUDGET_EXCEEDED = :BudgetExceeded
420
+ UNKNOWN = :Unknown
421
+ FEATURE_TYPE_MISMATCH = :FeatureTypeMismatch
422
+ REVOKED = :Revoked
423
+ INSUFFICIENT_CREDITS = :InsufficientCredits
424
+ ENTITLEMENT_NOT_FOUND = :EntitlementNotFound
425
+
426
+ # @!method self.values
427
+ # @return [Array<Symbol>]
428
+ end
429
+
430
+ # @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit#currency
431
+ class Currency < Stigg::Internal::Type::BaseModel
432
+ # @!attribute currency_id
433
+ # The unique identifier of the custom currency.
434
+ #
435
+ # @return [String]
436
+ required :currency_id, String, api_name: :currencyId
437
+
438
+ # @!attribute display_name
439
+ # The display name of the currency.
440
+ #
441
+ # @return [String]
442
+ required :display_name, String, api_name: :displayName
443
+
444
+ # @!attribute description
445
+ # A description of the currency.
446
+ #
447
+ # @return [String, nil]
448
+ optional :description, String, nil?: true
449
+
450
+ # @!attribute metadata
451
+ # Additional metadata associated with the currency.
452
+ #
453
+ # @return [Hash{Symbol=>String}, nil]
454
+ optional :metadata, Stigg::Internal::Type::HashOf[String], nil?: true
455
+
456
+ # @!attribute unit_plural
457
+ # The plural form of the currency unit.
458
+ #
459
+ # @return [String, nil]
460
+ optional :unit_plural, String, api_name: :unitPlural, nil?: true
461
+
462
+ # @!attribute unit_singular
463
+ # The singular form of the currency unit.
464
+ #
465
+ # @return [String, nil]
466
+ optional :unit_singular, String, api_name: :unitSingular, nil?: true
467
+
468
+ # @!method initialize(currency_id:, display_name:, description: nil, metadata: nil, unit_plural: nil, unit_singular: nil)
469
+ # The currency associated with a credit entitlement.
470
+ #
471
+ # @param currency_id [String] The unique identifier of the custom currency.
472
+ #
473
+ # @param display_name [String] The display name of the currency.
474
+ #
475
+ # @param description [String, nil] A description of the currency.
476
+ #
477
+ # @param metadata [Hash{Symbol=>String}, nil] Additional metadata associated with the currency.
478
+ #
479
+ # @param unit_plural [String, nil] The plural form of the currency unit.
480
+ #
481
+ # @param unit_singular [String, nil] The singular form of the currency unit.
482
+ end
483
+
484
+ class Chain < Stigg::Internal::Type::BaseModel
485
+ # @!attribute current_usage
486
+ # Amount consumed by this entity in the current cadence period.
487
+ #
488
+ # @return [Float]
489
+ required :current_usage, Float, api_name: :currentUsage
490
+
491
+ # @!attribute entity_id
492
+ # External id of the entity within the customer.
493
+ #
494
+ # @return [String]
495
+ required :entity_id, String, api_name: :entityId
496
+
497
+ # @!attribute is_granted
498
+ # Whether this node alone permits the requested usage.
499
+ #
500
+ # @return [Boolean]
501
+ required :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted
502
+
503
+ # @!attribute usage_limit
504
+ # Hard usage limit for this node; null when no assignment is configured.
505
+ #
506
+ # @return [Float, nil]
507
+ required :usage_limit, Float, api_name: :usageLimit, nil?: true
508
+
509
+ # @!method initialize(current_usage:, entity_id:, is_granted:, usage_limit:)
510
+ # Per-entity governance node — limit and current usage for a single resolved
511
+ # entity.
512
+ #
513
+ # @param current_usage [Float] Amount consumed by this entity in the current cadence period.
514
+ #
515
+ # @param entity_id [String] External id of the entity within the customer.
516
+ #
517
+ # @param is_granted [Boolean] Whether this node alone permits the requested usage.
518
+ #
519
+ # @param usage_limit [Float, nil] Hard usage limit for this node; null when no assignment is configured.
520
+ end
521
+ end
522
+
523
+ # @!method self.variants
524
+ # @return [Array(Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Feature, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit)]
525
+ end
526
+ end
527
+ end
528
+ end
529
+ end
530
+ end