stigg 0.1.0.pre.beta.56 → 0.1.0.pre.beta.58
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/README.md +1 -1
- data/lib/stigg/models/v1/credit_get_usage_params.rb +5 -3
- data/lib/stigg/models/v1/credit_get_usage_response.rb +8 -6
- data/lib/stigg/models/v1/customer_check_entitlement_response.rb +93 -1
- data/lib/stigg/models/v1/customer_retrieve_entitlements_response.rb +93 -1
- data/lib/stigg/models/v1/subscription_provision_response.rb +93 -1
- data/lib/stigg/models/v1_beta/customers/entitlement_check_response.rb +89 -1
- data/lib/stigg/resources/v1/credits.rb +1 -1
- data/lib/stigg/version.rb +1 -1
- data/rbi/stigg/models/v1/credit_get_usage_params.rbi +8 -4
- data/rbi/stigg/models/v1/credit_get_usage_response.rbi +10 -6
- data/rbi/stigg/models/v1/customer_check_entitlement_response.rbi +164 -0
- data/rbi/stigg/models/v1/customer_retrieve_entitlements_response.rbi +164 -0
- data/rbi/stigg/models/v1/subscription_provision_response.rbi +164 -0
- data/rbi/stigg/models/v1_beta/customers/entitlement_check_response.rbi +164 -0
- data/rbi/stigg/resources/v1/credits.rbi +4 -2
- data/sig/stigg/models/v1/customer_check_entitlement_response.rbs +62 -0
- data/sig/stigg/models/v1/customer_retrieve_entitlements_response.rbs +62 -0
- data/sig/stigg/models/v1/subscription_provision_response.rbs +62 -0
- data/sig/stigg/models/v1_beta/customers/entitlement_check_response.rbs +62 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2dc0923e2fd65116349c3be875f22072437436165685c0188fd19dde1e0b98b3
|
|
4
|
+
data.tar.gz: 4f24a971b86538a9093c71c1373288cba41fd16e62472985f901563bdd22b315
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0cb01d2f91b0406d264d4328b74ace1c5e8b415ef6d7f646d1bca2f402c2676d3143dd8580b001fa5348dc050e0c210b1c6edf1afe9cb86c7afcaf7ccffe3212
|
|
7
|
+
data.tar.gz: 31e6de49e92edf8b611908785bdd5f008854d8088e535ee8cf0c4f8b78df08330d6b4fc38c617a0772dab1becc520cfd321f3120c7c047a43dd985d0112e247f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.0-beta.58](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.57...v0.1.0-beta.58) (2026-10-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* sync OpenAPI spec from stigg-api ([d5d10f1](https://github.com/stiggio/stigg-ruby/commit/d5d10f164c3e066f9f77fb0e2fbac391e671eaeb))
|
|
9
|
+
* sync OpenAPI spec from stigg-api ([84889fd](https://github.com/stiggio/stigg-ruby/commit/84889fd36858b92f1e5ee94530af6f788e03c9c2))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* normalize version.rb to gem prerelease format for stlc codegen ([f535762](https://github.com/stiggio/stigg-ruby/commit/f53576294a3e52bbdae9035bdf3ffdd16907a7a5))
|
|
15
|
+
|
|
16
|
+
## [0.1.0-beta.57](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.56...v0.1.0-beta.57) (2026-10-15)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* sync OpenAPI spec from stigg-api ([0eaa97f](https://github.com/stiggio/stigg-ruby/commit/0eaa97f8b2b65260e5da0e1a2c5d4f37f7dc7aef))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Chores
|
|
25
|
+
|
|
26
|
+
* normalize version.rb to gem prerelease format for stlc codegen ([28cab9a](https://github.com/stiggio/stigg-ruby/commit/28cab9a539b181421d39c03252513203d8f4968c))
|
|
27
|
+
|
|
3
28
|
## [0.1.0-beta.56](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.55...v0.1.0-beta.56) (2026-10-15)
|
|
4
29
|
|
|
5
30
|
|
data/README.md
CHANGED
|
@@ -40,8 +40,10 @@ module Stigg
|
|
|
40
40
|
optional :end_date, Time
|
|
41
41
|
|
|
42
42
|
# @!attribute group_by
|
|
43
|
-
# Comma-separated list of
|
|
44
|
-
#
|
|
43
|
+
# Comma-separated list of keys to group usage series by: up to 3 custom dimension
|
|
44
|
+
# keys, optionally combined with the reserved key `featureId` to also split each
|
|
45
|
+
# series by feature (e.g. `featureId,userId`). Each key matches
|
|
46
|
+
# /^[a-zA-Z0-9_$-]+$/
|
|
45
47
|
#
|
|
46
48
|
# @return [String, nil]
|
|
47
49
|
optional :group_by, String
|
|
@@ -96,7 +98,7 @@ module Stigg
|
|
|
96
98
|
#
|
|
97
99
|
# @param end_date [Time] End date for the credit usage time range (ISO 8601). Defaults to now when startD
|
|
98
100
|
#
|
|
99
|
-
# @param group_by [String] Comma-separated list of
|
|
101
|
+
# @param group_by [String] Comma-separated list of keys to group usage series by: up to 3 custom dimension
|
|
100
102
|
#
|
|
101
103
|
# @param limit [Integer] Maximum number of items to return
|
|
102
104
|
#
|
|
@@ -135,13 +135,14 @@ module Stigg
|
|
|
135
135
|
required :event_count, Float, api_name: :eventCount
|
|
136
136
|
|
|
137
137
|
# @!attribute feature_id
|
|
138
|
-
# The feature ID; null when grouping by dimensions
|
|
138
|
+
# The feature ID; null when grouping by dimensions without `featureId`
|
|
139
139
|
#
|
|
140
140
|
# @return [String, nil]
|
|
141
141
|
required :feature_id, String, api_name: :featureId, nil?: true
|
|
142
142
|
|
|
143
143
|
# @!attribute feature_name
|
|
144
|
-
# The display name of the feature; null when grouping by dimensions
|
|
144
|
+
# The display name of the feature; null when grouping by dimensions without
|
|
145
|
+
# `featureId`
|
|
145
146
|
#
|
|
146
147
|
# @return [String, nil]
|
|
147
148
|
required :feature_name, String, api_name: :featureName, nil?: true
|
|
@@ -160,7 +161,8 @@ module Stigg
|
|
|
160
161
|
required :total_credits, Float, api_name: :totalCredits
|
|
161
162
|
|
|
162
163
|
# @!attribute tags
|
|
163
|
-
# Dimension key/value pairs identifying this series when groupBy
|
|
164
|
+
# Dimension key/value pairs identifying this series when groupBy includes
|
|
165
|
+
# dimension keys (`featureId` is returned in its own field, not as a tag)
|
|
164
166
|
#
|
|
165
167
|
# @return [Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Tag>, nil]
|
|
166
168
|
optional :tags,
|
|
@@ -174,15 +176,15 @@ module Stigg
|
|
|
174
176
|
#
|
|
175
177
|
# @param event_count [Float] Number of distinct usage events that consumed credits in this series. This count
|
|
176
178
|
#
|
|
177
|
-
# @param feature_id [String, nil] The feature ID; null when grouping by dimensions
|
|
179
|
+
# @param feature_id [String, nil] The feature ID; null when grouping by dimensions without `featureId`
|
|
178
180
|
#
|
|
179
|
-
# @param feature_name [String, nil] The display name of the feature; null when grouping by dimensions
|
|
181
|
+
# @param feature_name [String, nil] The display name of the feature; null when grouping by dimensions without `featu
|
|
180
182
|
#
|
|
181
183
|
# @param points [Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Point>] Time-series data points for this feature
|
|
182
184
|
#
|
|
183
185
|
# @param total_credits [Float] Total credits consumed by this feature in the time range
|
|
184
186
|
#
|
|
185
|
-
# @param tags [Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Tag>] Dimension key/value pairs identifying this series when groupBy
|
|
187
|
+
# @param tags [Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Tag>] Dimension key/value pairs identifying this series when groupBy includes dimensio
|
|
186
188
|
|
|
187
189
|
class Point < Stigg::Internal::Type::BaseModel
|
|
188
190
|
# @!attribute event_count
|
|
@@ -289,6 +289,30 @@ module Stigg
|
|
|
289
289
|
# @return [Time, nil]
|
|
290
290
|
optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt
|
|
291
291
|
|
|
292
|
+
# @!attribute reservation
|
|
293
|
+
# The reservation created by this request, when it asked to reserve credits and
|
|
294
|
+
# was granted.
|
|
295
|
+
#
|
|
296
|
+
# @return [Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Reservation, nil]
|
|
297
|
+
optional :reservation,
|
|
298
|
+
-> { Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Reservation },
|
|
299
|
+
nil?: true
|
|
300
|
+
|
|
301
|
+
# @!attribute reserved
|
|
302
|
+
# Credits held by open reservations on active grants. Already included in
|
|
303
|
+
# currentUsage, so usageLimit - currentUsage is the available balance.
|
|
304
|
+
#
|
|
305
|
+
# @return [Float, nil]
|
|
306
|
+
optional :reserved, Float
|
|
307
|
+
|
|
308
|
+
# @!attribute reserved_on_expired_grants
|
|
309
|
+
# Credits still held by open reservations on grants that expired during the hold.
|
|
310
|
+
# They can still be released, but are not part of currentUsage or the balance and
|
|
311
|
+
# must not be subtracted from it.
|
|
312
|
+
#
|
|
313
|
+
# @return [Float, nil]
|
|
314
|
+
optional :reserved_on_expired_grants, Float, api_name: :reservedOnExpiredGrants
|
|
315
|
+
|
|
292
316
|
# @!attribute usage_period_end
|
|
293
317
|
# The end date of the current billing period for recurring credit grants.
|
|
294
318
|
#
|
|
@@ -301,7 +325,11 @@ module Stigg
|
|
|
301
325
|
# @return [Time, nil]
|
|
302
326
|
optional :valid_until, Time, api_name: :validUntil
|
|
303
327
|
|
|
304
|
-
# @!method initialize(access_denied_reason:, currency:, current_usage:, is_granted:, usage_limit:, usage_updated_at:, entitlement_updated_at: nil, usage_period_end: nil, valid_until: nil, type: :CREDIT)
|
|
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)
|
|
329
|
+
# Some parameter documentations has been truncated, see
|
|
330
|
+
# {Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit} for more
|
|
331
|
+
# details.
|
|
332
|
+
#
|
|
305
333
|
# @param access_denied_reason [Symbol, Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::AccessDeniedReason, nil]
|
|
306
334
|
#
|
|
307
335
|
# @param currency [Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Currency] The currency associated with a credit entitlement.
|
|
@@ -316,6 +344,12 @@ module Stigg
|
|
|
316
344
|
#
|
|
317
345
|
# @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration.
|
|
318
346
|
#
|
|
347
|
+
# @param reservation [Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Reservation, nil] The reservation created by this request, when it asked to reserve credits and wa
|
|
348
|
+
#
|
|
349
|
+
# @param reserved [Float] Credits held by open reservations on active grants. Already included in currentU
|
|
350
|
+
#
|
|
351
|
+
# @param reserved_on_expired_grants [Float] Credits still held by open reservations on grants that expired during the hold.
|
|
352
|
+
#
|
|
319
353
|
# @param usage_period_end [Time] The end date of the current billing period for recurring credit grants.
|
|
320
354
|
#
|
|
321
355
|
# @param valid_until [Time] The next time the entitlement should be recalculated
|
|
@@ -398,6 +432,64 @@ module Stigg
|
|
|
398
432
|
#
|
|
399
433
|
# @param unit_singular [String, nil] The singular form of the currency unit.
|
|
400
434
|
end
|
|
435
|
+
|
|
436
|
+
# @see Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit#reservation
|
|
437
|
+
class Reservation < Stigg::Internal::Type::BaseModel
|
|
438
|
+
# @!attribute id
|
|
439
|
+
# The client-provided reservation ID.
|
|
440
|
+
#
|
|
441
|
+
# @return [String]
|
|
442
|
+
required :id, String
|
|
443
|
+
|
|
444
|
+
# @!attribute amount
|
|
445
|
+
# The amount of credits held.
|
|
446
|
+
#
|
|
447
|
+
# @return [Float]
|
|
448
|
+
required :amount, Float
|
|
449
|
+
|
|
450
|
+
# @!attribute expires_at
|
|
451
|
+
# When the reservation expires. Unreleased credits return to the balance at this
|
|
452
|
+
# time.
|
|
453
|
+
#
|
|
454
|
+
# @return [Time]
|
|
455
|
+
required :expires_at, Time, api_name: :expiresAt
|
|
456
|
+
|
|
457
|
+
# @!attribute status
|
|
458
|
+
# The status of the reservation.
|
|
459
|
+
#
|
|
460
|
+
# @return [Symbol, Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Reservation::Status]
|
|
461
|
+
required :status,
|
|
462
|
+
enum: -> { Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Reservation::Status }
|
|
463
|
+
|
|
464
|
+
# @!method initialize(id:, amount:, expires_at:, status:)
|
|
465
|
+
# Some parameter documentations has been truncated, see
|
|
466
|
+
# {Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Reservation}
|
|
467
|
+
# for more details.
|
|
468
|
+
#
|
|
469
|
+
# The reservation created by this request, when it asked to reserve credits and
|
|
470
|
+
# was granted.
|
|
471
|
+
#
|
|
472
|
+
# @param id [String] The client-provided reservation ID.
|
|
473
|
+
#
|
|
474
|
+
# @param amount [Float] The amount of credits held.
|
|
475
|
+
#
|
|
476
|
+
# @param expires_at [Time] When the reservation expires. Unreleased credits return to the balance at this t
|
|
477
|
+
#
|
|
478
|
+
# @param status [Symbol, Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Reservation::Status] The status of the reservation.
|
|
479
|
+
|
|
480
|
+
# The status of the reservation.
|
|
481
|
+
#
|
|
482
|
+
# @see Stigg::Models::V1::CustomerCheckEntitlementResponse::Data::Credit::Reservation#status
|
|
483
|
+
module Status
|
|
484
|
+
extend Stigg::Internal::Type::Enum
|
|
485
|
+
|
|
486
|
+
ACTIVE = :ACTIVE
|
|
487
|
+
RELEASED = :RELEASED
|
|
488
|
+
|
|
489
|
+
# @!method self.values
|
|
490
|
+
# @return [Array<Symbol>]
|
|
491
|
+
end
|
|
492
|
+
end
|
|
401
493
|
end
|
|
402
494
|
|
|
403
495
|
# @!method self.variants
|
|
@@ -331,6 +331,30 @@ module Stigg
|
|
|
331
331
|
# @return [Time, nil]
|
|
332
332
|
optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt
|
|
333
333
|
|
|
334
|
+
# @!attribute reservation
|
|
335
|
+
# The reservation created by this request, when it asked to reserve credits and
|
|
336
|
+
# was granted.
|
|
337
|
+
#
|
|
338
|
+
# @return [Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::Reservation, nil]
|
|
339
|
+
optional :reservation,
|
|
340
|
+
-> { Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::Reservation },
|
|
341
|
+
nil?: true
|
|
342
|
+
|
|
343
|
+
# @!attribute reserved
|
|
344
|
+
# Credits held by open reservations on active grants. Already included in
|
|
345
|
+
# currentUsage, so usageLimit - currentUsage is the available balance.
|
|
346
|
+
#
|
|
347
|
+
# @return [Float, nil]
|
|
348
|
+
optional :reserved, Float
|
|
349
|
+
|
|
350
|
+
# @!attribute reserved_on_expired_grants
|
|
351
|
+
# Credits still held by open reservations on grants that expired during the hold.
|
|
352
|
+
# They can still be released, but are not part of currentUsage or the balance and
|
|
353
|
+
# must not be subtracted from it.
|
|
354
|
+
#
|
|
355
|
+
# @return [Float, nil]
|
|
356
|
+
optional :reserved_on_expired_grants, Float, api_name: :reservedOnExpiredGrants
|
|
357
|
+
|
|
334
358
|
# @!attribute usage_period_end
|
|
335
359
|
# The end date of the current billing period for recurring credit grants.
|
|
336
360
|
#
|
|
@@ -343,7 +367,11 @@ module Stigg
|
|
|
343
367
|
# @return [Time, nil]
|
|
344
368
|
optional :valid_until, Time, api_name: :validUntil
|
|
345
369
|
|
|
346
|
-
# @!method initialize(access_denied_reason:, currency:, current_usage:, is_granted:, usage_limit:, usage_updated_at:, entitlement_updated_at: nil, usage_period_end: nil, valid_until: nil, type: :CREDIT)
|
|
370
|
+
# @!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)
|
|
371
|
+
# Some parameter documentations has been truncated, see
|
|
372
|
+
# {Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit}
|
|
373
|
+
# for more details.
|
|
374
|
+
#
|
|
347
375
|
# @param access_denied_reason [Symbol, Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::AccessDeniedReason, nil]
|
|
348
376
|
#
|
|
349
377
|
# @param currency [Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::Currency] The currency associated with a credit entitlement.
|
|
@@ -358,6 +386,12 @@ module Stigg
|
|
|
358
386
|
#
|
|
359
387
|
# @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration.
|
|
360
388
|
#
|
|
389
|
+
# @param reservation [Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::Reservation, nil] The reservation created by this request, when it asked to reserve credits and wa
|
|
390
|
+
#
|
|
391
|
+
# @param reserved [Float] Credits held by open reservations on active grants. Already included in currentU
|
|
392
|
+
#
|
|
393
|
+
# @param reserved_on_expired_grants [Float] Credits still held by open reservations on grants that expired during the hold.
|
|
394
|
+
#
|
|
361
395
|
# @param usage_period_end [Time] The end date of the current billing period for recurring credit grants.
|
|
362
396
|
#
|
|
363
397
|
# @param valid_until [Time] The next time the entitlement should be recalculated
|
|
@@ -440,6 +474,64 @@ module Stigg
|
|
|
440
474
|
#
|
|
441
475
|
# @param unit_singular [String, nil] The singular form of the currency unit.
|
|
442
476
|
end
|
|
477
|
+
|
|
478
|
+
# @see Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit#reservation
|
|
479
|
+
class Reservation < Stigg::Internal::Type::BaseModel
|
|
480
|
+
# @!attribute id
|
|
481
|
+
# The client-provided reservation ID.
|
|
482
|
+
#
|
|
483
|
+
# @return [String]
|
|
484
|
+
required :id, String
|
|
485
|
+
|
|
486
|
+
# @!attribute amount
|
|
487
|
+
# The amount of credits held.
|
|
488
|
+
#
|
|
489
|
+
# @return [Float]
|
|
490
|
+
required :amount, Float
|
|
491
|
+
|
|
492
|
+
# @!attribute expires_at
|
|
493
|
+
# When the reservation expires. Unreleased credits return to the balance at this
|
|
494
|
+
# time.
|
|
495
|
+
#
|
|
496
|
+
# @return [Time]
|
|
497
|
+
required :expires_at, Time, api_name: :expiresAt
|
|
498
|
+
|
|
499
|
+
# @!attribute status
|
|
500
|
+
# The status of the reservation.
|
|
501
|
+
#
|
|
502
|
+
# @return [Symbol, Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::Reservation::Status]
|
|
503
|
+
required :status,
|
|
504
|
+
enum: -> { Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::Reservation::Status }
|
|
505
|
+
|
|
506
|
+
# @!method initialize(id:, amount:, expires_at:, status:)
|
|
507
|
+
# Some parameter documentations has been truncated, see
|
|
508
|
+
# {Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::Reservation}
|
|
509
|
+
# for more details.
|
|
510
|
+
#
|
|
511
|
+
# The reservation created by this request, when it asked to reserve credits and
|
|
512
|
+
# was granted.
|
|
513
|
+
#
|
|
514
|
+
# @param id [String] The client-provided reservation ID.
|
|
515
|
+
#
|
|
516
|
+
# @param amount [Float] The amount of credits held.
|
|
517
|
+
#
|
|
518
|
+
# @param expires_at [Time] When the reservation expires. Unreleased credits return to the balance at this t
|
|
519
|
+
#
|
|
520
|
+
# @param status [Symbol, Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::Reservation::Status] The status of the reservation.
|
|
521
|
+
|
|
522
|
+
# The status of the reservation.
|
|
523
|
+
#
|
|
524
|
+
# @see Stigg::Models::V1::CustomerRetrieveEntitlementsResponse::Data::Entitlement::Credit::Reservation#status
|
|
525
|
+
module Status
|
|
526
|
+
extend Stigg::Internal::Type::Enum
|
|
527
|
+
|
|
528
|
+
ACTIVE = :ACTIVE
|
|
529
|
+
RELEASED = :RELEASED
|
|
530
|
+
|
|
531
|
+
# @!method self.values
|
|
532
|
+
# @return [Array<Symbol>]
|
|
533
|
+
end
|
|
534
|
+
end
|
|
443
535
|
end
|
|
444
536
|
|
|
445
537
|
# @!method self.variants
|
|
@@ -365,6 +365,30 @@ module Stigg
|
|
|
365
365
|
# @return [Time, nil]
|
|
366
366
|
optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt
|
|
367
367
|
|
|
368
|
+
# @!attribute reservation
|
|
369
|
+
# The reservation created by this request, when it asked to reserve credits and
|
|
370
|
+
# was granted.
|
|
371
|
+
#
|
|
372
|
+
# @return [Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Reservation, nil]
|
|
373
|
+
optional :reservation,
|
|
374
|
+
-> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Reservation },
|
|
375
|
+
nil?: true
|
|
376
|
+
|
|
377
|
+
# @!attribute reserved
|
|
378
|
+
# Credits held by open reservations on active grants. Already included in
|
|
379
|
+
# currentUsage, so usageLimit - currentUsage is the available balance.
|
|
380
|
+
#
|
|
381
|
+
# @return [Float, nil]
|
|
382
|
+
optional :reserved, Float
|
|
383
|
+
|
|
384
|
+
# @!attribute reserved_on_expired_grants
|
|
385
|
+
# Credits still held by open reservations on grants that expired during the hold.
|
|
386
|
+
# They can still be released, but are not part of currentUsage or the balance and
|
|
387
|
+
# must not be subtracted from it.
|
|
388
|
+
#
|
|
389
|
+
# @return [Float, nil]
|
|
390
|
+
optional :reserved_on_expired_grants, Float, api_name: :reservedOnExpiredGrants
|
|
391
|
+
|
|
368
392
|
# @!attribute usage_period_end
|
|
369
393
|
# The end date of the current billing period for recurring credit grants.
|
|
370
394
|
#
|
|
@@ -377,7 +401,11 @@ module Stigg
|
|
|
377
401
|
# @return [Time, nil]
|
|
378
402
|
optional :valid_until, Time, api_name: :validUntil
|
|
379
403
|
|
|
380
|
-
# @!method initialize(access_denied_reason:, currency:, current_usage:, is_granted:, type:, usage_limit:, usage_updated_at:, entitlement_updated_at: nil, usage_period_end: nil, valid_until: nil)
|
|
404
|
+
# @!method initialize(access_denied_reason:, currency:, current_usage:, is_granted:, type:, 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)
|
|
405
|
+
# Some parameter documentations has been truncated, see
|
|
406
|
+
# {Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1}
|
|
407
|
+
# for more details.
|
|
408
|
+
#
|
|
381
409
|
# @param access_denied_reason [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::AccessDeniedReason, nil]
|
|
382
410
|
#
|
|
383
411
|
# @param currency [Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Currency] The currency associated with a credit entitlement.
|
|
@@ -394,6 +422,12 @@ module Stigg
|
|
|
394
422
|
#
|
|
395
423
|
# @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration.
|
|
396
424
|
#
|
|
425
|
+
# @param reservation [Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Reservation, nil] The reservation created by this request, when it asked to reserve credits and wa
|
|
426
|
+
#
|
|
427
|
+
# @param reserved [Float] Credits held by open reservations on active grants. Already included in currentU
|
|
428
|
+
#
|
|
429
|
+
# @param reserved_on_expired_grants [Float] Credits still held by open reservations on grants that expired during the hold.
|
|
430
|
+
#
|
|
397
431
|
# @param usage_period_end [Time] The end date of the current billing period for recurring credit grants.
|
|
398
432
|
#
|
|
399
433
|
# @param valid_until [Time] The next time the entitlement should be recalculated
|
|
@@ -484,6 +518,64 @@ module Stigg
|
|
|
484
518
|
# @!method self.values
|
|
485
519
|
# @return [Array<Symbol>]
|
|
486
520
|
end
|
|
521
|
+
|
|
522
|
+
# @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1#reservation
|
|
523
|
+
class Reservation < Stigg::Internal::Type::BaseModel
|
|
524
|
+
# @!attribute id
|
|
525
|
+
# The client-provided reservation ID.
|
|
526
|
+
#
|
|
527
|
+
# @return [String]
|
|
528
|
+
required :id, String
|
|
529
|
+
|
|
530
|
+
# @!attribute amount
|
|
531
|
+
# The amount of credits held.
|
|
532
|
+
#
|
|
533
|
+
# @return [Float]
|
|
534
|
+
required :amount, Float
|
|
535
|
+
|
|
536
|
+
# @!attribute expires_at
|
|
537
|
+
# When the reservation expires. Unreleased credits return to the balance at this
|
|
538
|
+
# time.
|
|
539
|
+
#
|
|
540
|
+
# @return [Time]
|
|
541
|
+
required :expires_at, Time, api_name: :expiresAt
|
|
542
|
+
|
|
543
|
+
# @!attribute status
|
|
544
|
+
# The status of the reservation.
|
|
545
|
+
#
|
|
546
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Reservation::Status]
|
|
547
|
+
required :status,
|
|
548
|
+
enum: -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Reservation::Status }
|
|
549
|
+
|
|
550
|
+
# @!method initialize(id:, amount:, expires_at:, status:)
|
|
551
|
+
# Some parameter documentations has been truncated, see
|
|
552
|
+
# {Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Reservation}
|
|
553
|
+
# for more details.
|
|
554
|
+
#
|
|
555
|
+
# The reservation created by this request, when it asked to reserve credits and
|
|
556
|
+
# was granted.
|
|
557
|
+
#
|
|
558
|
+
# @param id [String] The client-provided reservation ID.
|
|
559
|
+
#
|
|
560
|
+
# @param amount [Float] The amount of credits held.
|
|
561
|
+
#
|
|
562
|
+
# @param expires_at [Time] When the reservation expires. Unreleased credits return to the balance at this t
|
|
563
|
+
#
|
|
564
|
+
# @param status [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Reservation::Status] The status of the reservation.
|
|
565
|
+
|
|
566
|
+
# The status of the reservation.
|
|
567
|
+
#
|
|
568
|
+
# @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Reservation#status
|
|
569
|
+
module Status
|
|
570
|
+
extend Stigg::Internal::Type::Enum
|
|
571
|
+
|
|
572
|
+
ACTIVE = :ACTIVE
|
|
573
|
+
RELEASED = :RELEASED
|
|
574
|
+
|
|
575
|
+
# @!method self.values
|
|
576
|
+
# @return [Array<Symbol>]
|
|
577
|
+
end
|
|
578
|
+
end
|
|
487
579
|
end
|
|
488
580
|
|
|
489
581
|
# @!method self.variants
|
|
@@ -377,6 +377,30 @@ module Stigg
|
|
|
377
377
|
# @return [Time, nil]
|
|
378
378
|
optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt
|
|
379
379
|
|
|
380
|
+
# @!attribute reservation
|
|
381
|
+
# The reservation created by this request, when it asked to reserve credits and
|
|
382
|
+
# was granted.
|
|
383
|
+
#
|
|
384
|
+
# @return [Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Reservation, nil]
|
|
385
|
+
optional :reservation,
|
|
386
|
+
-> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Reservation },
|
|
387
|
+
nil?: true
|
|
388
|
+
|
|
389
|
+
# @!attribute reserved
|
|
390
|
+
# Credits held by open reservations on active grants. Already included in
|
|
391
|
+
# currentUsage, so usageLimit - currentUsage is the available balance.
|
|
392
|
+
#
|
|
393
|
+
# @return [Float, nil]
|
|
394
|
+
optional :reserved, Float
|
|
395
|
+
|
|
396
|
+
# @!attribute reserved_on_expired_grants
|
|
397
|
+
# Credits still held by open reservations on grants that expired during the hold.
|
|
398
|
+
# They can still be released, but are not part of currentUsage or the balance and
|
|
399
|
+
# must not be subtracted from it.
|
|
400
|
+
#
|
|
401
|
+
# @return [Float, nil]
|
|
402
|
+
optional :reserved_on_expired_grants, Float, api_name: :reservedOnExpiredGrants
|
|
403
|
+
|
|
380
404
|
# @!attribute usage_period_end
|
|
381
405
|
# The end date of the current billing period for recurring credit grants.
|
|
382
406
|
#
|
|
@@ -389,7 +413,7 @@ module Stigg
|
|
|
389
413
|
# @return [Time, nil]
|
|
390
414
|
optional :valid_until, Time, api_name: :validUntil
|
|
391
415
|
|
|
392
|
-
# @!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)
|
|
416
|
+
# @!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)
|
|
393
417
|
# Some parameter documentations has been truncated, see
|
|
394
418
|
# {Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit} for
|
|
395
419
|
# more details.
|
|
@@ -412,6 +436,12 @@ module Stigg
|
|
|
412
436
|
#
|
|
413
437
|
# @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration.
|
|
414
438
|
#
|
|
439
|
+
# @param reservation [Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Reservation, nil] The reservation created by this request, when it asked to reserve credits and wa
|
|
440
|
+
#
|
|
441
|
+
# @param reserved [Float] Credits held by open reservations on active grants. Already included in currentU
|
|
442
|
+
#
|
|
443
|
+
# @param reserved_on_expired_grants [Float] Credits still held by open reservations on grants that expired during the hold.
|
|
444
|
+
#
|
|
415
445
|
# @param usage_period_end [Time] The end date of the current billing period for recurring credit grants.
|
|
416
446
|
#
|
|
417
447
|
# @param valid_until [Time] The next time the entitlement should be recalculated
|
|
@@ -546,6 +576,64 @@ module Stigg
|
|
|
546
576
|
#
|
|
547
577
|
# @param usage_limit [Float, nil] Hard usage limit for this node; null when no assignment is configured.
|
|
548
578
|
end
|
|
579
|
+
|
|
580
|
+
# @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit#reservation
|
|
581
|
+
class Reservation < Stigg::Internal::Type::BaseModel
|
|
582
|
+
# @!attribute id
|
|
583
|
+
# The client-provided reservation ID.
|
|
584
|
+
#
|
|
585
|
+
# @return [String]
|
|
586
|
+
required :id, String
|
|
587
|
+
|
|
588
|
+
# @!attribute amount
|
|
589
|
+
# The amount of credits held.
|
|
590
|
+
#
|
|
591
|
+
# @return [Float]
|
|
592
|
+
required :amount, Float
|
|
593
|
+
|
|
594
|
+
# @!attribute expires_at
|
|
595
|
+
# When the reservation expires. Unreleased credits return to the balance at this
|
|
596
|
+
# time.
|
|
597
|
+
#
|
|
598
|
+
# @return [Time]
|
|
599
|
+
required :expires_at, Time, api_name: :expiresAt
|
|
600
|
+
|
|
601
|
+
# @!attribute status
|
|
602
|
+
# The status of the reservation.
|
|
603
|
+
#
|
|
604
|
+
# @return [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Reservation::Status]
|
|
605
|
+
required :status,
|
|
606
|
+
enum: -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Reservation::Status }
|
|
607
|
+
|
|
608
|
+
# @!method initialize(id:, amount:, expires_at:, status:)
|
|
609
|
+
# Some parameter documentations has been truncated, see
|
|
610
|
+
# {Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Reservation}
|
|
611
|
+
# for more details.
|
|
612
|
+
#
|
|
613
|
+
# The reservation created by this request, when it asked to reserve credits and
|
|
614
|
+
# was granted.
|
|
615
|
+
#
|
|
616
|
+
# @param id [String] The client-provided reservation ID.
|
|
617
|
+
#
|
|
618
|
+
# @param amount [Float] The amount of credits held.
|
|
619
|
+
#
|
|
620
|
+
# @param expires_at [Time] When the reservation expires. Unreleased credits return to the balance at this t
|
|
621
|
+
#
|
|
622
|
+
# @param status [Symbol, Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Reservation::Status] The status of the reservation.
|
|
623
|
+
|
|
624
|
+
# The status of the reservation.
|
|
625
|
+
#
|
|
626
|
+
# @see Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Reservation#status
|
|
627
|
+
module Status
|
|
628
|
+
extend Stigg::Internal::Type::Enum
|
|
629
|
+
|
|
630
|
+
ACTIVE = :ACTIVE
|
|
631
|
+
RELEASED = :RELEASED
|
|
632
|
+
|
|
633
|
+
# @!method self.values
|
|
634
|
+
# @return [Array<Symbol>]
|
|
635
|
+
end
|
|
636
|
+
end
|
|
549
637
|
end
|
|
550
638
|
|
|
551
639
|
# @!method self.variants
|
|
@@ -71,7 +71,7 @@ module Stigg
|
|
|
71
71
|
#
|
|
72
72
|
# @param end_date [Time] Query param: End date for the credit usage time range (ISO 8601). Defaults to no
|
|
73
73
|
#
|
|
74
|
-
# @param group_by [String] Query param: Comma-separated list of
|
|
74
|
+
# @param group_by [String] Query param: Comma-separated list of keys to group usage series by: up to 3 cust
|
|
75
75
|
#
|
|
76
76
|
# @param limit [Integer] Query param: Maximum number of items to return
|
|
77
77
|
#
|
data/lib/stigg/version.rb
CHANGED
|
@@ -45,8 +45,10 @@ module Stigg
|
|
|
45
45
|
sig { params(end_date: Time).void }
|
|
46
46
|
attr_writer :end_date
|
|
47
47
|
|
|
48
|
-
# Comma-separated list of
|
|
49
|
-
#
|
|
48
|
+
# Comma-separated list of keys to group usage series by: up to 3 custom dimension
|
|
49
|
+
# keys, optionally combined with the reserved key `featureId` to also split each
|
|
50
|
+
# series by feature (e.g. `featureId,userId`). Each key matches
|
|
51
|
+
# /^[a-zA-Z0-9_$-]+$/
|
|
50
52
|
sig { returns(T.nilable(String)) }
|
|
51
53
|
attr_reader :group_by
|
|
52
54
|
|
|
@@ -132,8 +134,10 @@ module Stigg
|
|
|
132
134
|
# End date for the credit usage time range (ISO 8601). Defaults to now when
|
|
133
135
|
# startDate is provided
|
|
134
136
|
end_date: nil,
|
|
135
|
-
# Comma-separated list of
|
|
136
|
-
#
|
|
137
|
+
# Comma-separated list of keys to group usage series by: up to 3 custom dimension
|
|
138
|
+
# keys, optionally combined with the reserved key `featureId` to also split each
|
|
139
|
+
# series by feature (e.g. `featureId,userId`). Each key matches
|
|
140
|
+
# /^[a-zA-Z0-9_$-]+$/
|
|
137
141
|
group_by: nil,
|
|
138
142
|
# Maximum number of items to return
|
|
139
143
|
limit: nil,
|