stigg 0.1.0.pre.beta.38 → 0.1.0.pre.beta.39
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 +8 -0
- data/README.md +1 -1
- data/lib/stigg/models/v1/credits/consumption_consume_response.rb +5 -2
- data/lib/stigg/models/v1/usage_report_response.rb +17 -3
- data/lib/stigg/version.rb +1 -1
- data/rbi/stigg/models/v1/credits/consumption_consume_response.rbi +8 -2
- data/rbi/stigg/models/v1/usage_report_response.rbi +22 -2
- data/sig/stigg/models/v1/usage_report_response.rbs +5 -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: 1ca8af19b360c0e53c61b068cb9a1c035eb1ad282bc3e66f09b9054afbd6150c
|
|
4
|
+
data.tar.gz: a24b6c21c2dd7f37696fba89035eb3b557a6be4663a549309b268ff327fc16bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6fd739bce4d9b2be72e402caca86f297a519482e5b512f48864bbdfa9d2b21c8e029cb5b87fd7e23460ed4d2cc2f39cf25ae4e642b4e31714dad2eebb188703
|
|
7
|
+
data.tar.gz: c8235a7e6d019fa08a4d9b3295de9eb6b9614985d81d46b11b6da1725e6cb19e82ef64ef7bc59a4ecd31e806b3077eb988c1f40807ed7ed519418887f7416d54
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.39 (2026-07-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-beta.38...v0.1.0-beta.39](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.38...v0.1.0-beta.39)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add consumed field to consumption/usage credit responses ([ee2eae5](https://github.com/stiggio/stigg-ruby/commit/ee2eae5db2e9042d5f47b1265fe638e07e955f6a))
|
|
10
|
+
|
|
3
11
|
## 0.1.0-beta.38 (2026-07-08)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.1.0-beta.37...v0.1.0-beta.38](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.37...v0.1.0-beta.38)
|
data/README.md
CHANGED
|
@@ -83,7 +83,10 @@ module Stigg
|
|
|
83
83
|
required :currency_id, String, api_name: :currencyId
|
|
84
84
|
|
|
85
85
|
# @!attribute current_usage
|
|
86
|
-
# The
|
|
86
|
+
# The wallet's total consumed credits for this currency (optimistic — includes
|
|
87
|
+
# not-yet-reconciled usage), shared across every feature that draws on the
|
|
88
|
+
# currency. This is the running balance, not this call's deduction — see
|
|
89
|
+
# `consumed` for that.
|
|
87
90
|
#
|
|
88
91
|
# @return [Float]
|
|
89
92
|
required :current_usage, Float, api_name: :currentUsage
|
|
@@ -118,7 +121,7 @@ module Stigg
|
|
|
118
121
|
#
|
|
119
122
|
# @param currency_id [String] The credit currency identifier
|
|
120
123
|
#
|
|
121
|
-
# @param current_usage [Float] The
|
|
124
|
+
# @param current_usage [Float] The wallet's total consumed credits for this currency (optimistic — includes not
|
|
122
125
|
#
|
|
123
126
|
# @param timestamp [Time] The grant-version timestamp of this balance, used by the SDK for last-write-wins
|
|
124
127
|
#
|
|
@@ -124,6 +124,15 @@ module Stigg
|
|
|
124
124
|
|
|
125
125
|
# @see Stigg::Models::V1::UsageReportResponse::Data#credit
|
|
126
126
|
class Credit < Stigg::Internal::Type::BaseModel
|
|
127
|
+
# @!attribute consumed
|
|
128
|
+
# The credits this single reportUsage call deducted, in credit units — scoped to
|
|
129
|
+
# this one measurement (0 for idempotency duplicates). Contrast `currentUsage`,
|
|
130
|
+
# which is the wallet-wide running total shared across all features on this
|
|
131
|
+
# currency. Use it to reconcile expected per-call deductions.
|
|
132
|
+
#
|
|
133
|
+
# @return [Float]
|
|
134
|
+
required :consumed, Float
|
|
135
|
+
|
|
127
136
|
# @!attribute currency_id
|
|
128
137
|
# The credit currency identifier
|
|
129
138
|
#
|
|
@@ -131,7 +140,10 @@ module Stigg
|
|
|
131
140
|
required :currency_id, String, api_name: :currencyId
|
|
132
141
|
|
|
133
142
|
# @!attribute current_usage
|
|
134
|
-
# The
|
|
143
|
+
# The wallet's total consumed credits for this currency (optimistic — includes
|
|
144
|
+
# not-yet-reconciled usage), shared across every feature that draws on the
|
|
145
|
+
# currency. This is the running balance, not this call's deduction — see
|
|
146
|
+
# `consumed` for that.
|
|
135
147
|
#
|
|
136
148
|
# @return [Float]
|
|
137
149
|
required :current_usage, Float, api_name: :currentUsage
|
|
@@ -156,15 +168,17 @@ module Stigg
|
|
|
156
168
|
# @return [Time, nil]
|
|
157
169
|
optional :usage_period_end, Time, api_name: :usagePeriodEnd, nil?: true
|
|
158
170
|
|
|
159
|
-
# @!method initialize(currency_id:, current_usage:, timestamp:, usage_limit:, usage_period_end: nil)
|
|
171
|
+
# @!method initialize(consumed:, currency_id:, current_usage:, timestamp:, usage_limit:, usage_period_end: nil)
|
|
160
172
|
# Some parameter documentations has been truncated, see
|
|
161
173
|
# {Stigg::Models::V1::UsageReportResponse::Data::Credit} for more details.
|
|
162
174
|
#
|
|
163
175
|
# Optimistic credit balance for a credit-backed feature
|
|
164
176
|
#
|
|
177
|
+
# @param consumed [Float] The credits this single reportUsage call deducted, in credit units — scoped to t
|
|
178
|
+
#
|
|
165
179
|
# @param currency_id [String] The credit currency identifier
|
|
166
180
|
#
|
|
167
|
-
# @param current_usage [Float] The
|
|
181
|
+
# @param current_usage [Float] The wallet's total consumed credits for this currency (optimistic — includes not
|
|
168
182
|
#
|
|
169
183
|
# @param timestamp [Time] The grant-version timestamp of this balance, used by the SDK for last-write-wins
|
|
170
184
|
#
|
data/lib/stigg/version.rb
CHANGED
|
@@ -165,7 +165,10 @@ module Stigg
|
|
|
165
165
|
sig { returns(String) }
|
|
166
166
|
attr_accessor :currency_id
|
|
167
167
|
|
|
168
|
-
# The
|
|
168
|
+
# The wallet's total consumed credits for this currency (optimistic — includes
|
|
169
|
+
# not-yet-reconciled usage), shared across every feature that draws on the
|
|
170
|
+
# currency. This is the running balance, not this call's deduction — see
|
|
171
|
+
# `consumed` for that.
|
|
169
172
|
sig { returns(Float) }
|
|
170
173
|
attr_accessor :current_usage
|
|
171
174
|
|
|
@@ -197,7 +200,10 @@ module Stigg
|
|
|
197
200
|
def self.new(
|
|
198
201
|
# The credit currency identifier
|
|
199
202
|
currency_id:,
|
|
200
|
-
# The
|
|
203
|
+
# The wallet's total consumed credits for this currency (optimistic — includes
|
|
204
|
+
# not-yet-reconciled usage), shared across every feature that draws on the
|
|
205
|
+
# currency. This is the running balance, not this call's deduction — see
|
|
206
|
+
# `consumed` for that.
|
|
201
207
|
current_usage:,
|
|
202
208
|
# The grant-version timestamp of this balance, used by the SDK for last-write-wins
|
|
203
209
|
# reconciliation
|
|
@@ -193,11 +193,21 @@ module Stigg
|
|
|
193
193
|
)
|
|
194
194
|
end
|
|
195
195
|
|
|
196
|
+
# The credits this single reportUsage call deducted, in credit units — scoped to
|
|
197
|
+
# this one measurement (0 for idempotency duplicates). Contrast `currentUsage`,
|
|
198
|
+
# which is the wallet-wide running total shared across all features on this
|
|
199
|
+
# currency. Use it to reconcile expected per-call deductions.
|
|
200
|
+
sig { returns(Float) }
|
|
201
|
+
attr_accessor :consumed
|
|
202
|
+
|
|
196
203
|
# The credit currency identifier
|
|
197
204
|
sig { returns(String) }
|
|
198
205
|
attr_accessor :currency_id
|
|
199
206
|
|
|
200
|
-
# The
|
|
207
|
+
# The wallet's total consumed credits for this currency (optimistic — includes
|
|
208
|
+
# not-yet-reconciled usage), shared across every feature that draws on the
|
|
209
|
+
# currency. This is the running balance, not this call's deduction — see
|
|
210
|
+
# `consumed` for that.
|
|
201
211
|
sig { returns(Float) }
|
|
202
212
|
attr_accessor :current_usage
|
|
203
213
|
|
|
@@ -218,6 +228,7 @@ module Stigg
|
|
|
218
228
|
# Optimistic credit balance for a credit-backed feature
|
|
219
229
|
sig do
|
|
220
230
|
params(
|
|
231
|
+
consumed: Float,
|
|
221
232
|
currency_id: String,
|
|
222
233
|
current_usage: Float,
|
|
223
234
|
timestamp: Time,
|
|
@@ -226,9 +237,17 @@ module Stigg
|
|
|
226
237
|
).returns(T.attached_class)
|
|
227
238
|
end
|
|
228
239
|
def self.new(
|
|
240
|
+
# The credits this single reportUsage call deducted, in credit units — scoped to
|
|
241
|
+
# this one measurement (0 for idempotency duplicates). Contrast `currentUsage`,
|
|
242
|
+
# which is the wallet-wide running total shared across all features on this
|
|
243
|
+
# currency. Use it to reconcile expected per-call deductions.
|
|
244
|
+
consumed:,
|
|
229
245
|
# The credit currency identifier
|
|
230
246
|
currency_id:,
|
|
231
|
-
# The
|
|
247
|
+
# The wallet's total consumed credits for this currency (optimistic — includes
|
|
248
|
+
# not-yet-reconciled usage), shared across every feature that draws on the
|
|
249
|
+
# currency. This is the running balance, not this call's deduction — see
|
|
250
|
+
# `consumed` for that.
|
|
232
251
|
current_usage:,
|
|
233
252
|
# The grant-version timestamp of this balance, used by the SDK for last-write-wins
|
|
234
253
|
# reconciliation
|
|
@@ -244,6 +263,7 @@ module Stigg
|
|
|
244
263
|
sig do
|
|
245
264
|
override.returns(
|
|
246
265
|
{
|
|
266
|
+
consumed: Float,
|
|
247
267
|
currency_id: String,
|
|
248
268
|
current_usage: Float,
|
|
249
269
|
timestamp: Time,
|
|
@@ -88,6 +88,7 @@ module Stigg
|
|
|
88
88
|
|
|
89
89
|
type credit =
|
|
90
90
|
{
|
|
91
|
+
consumed: Float,
|
|
91
92
|
currency_id: String,
|
|
92
93
|
current_usage: Float,
|
|
93
94
|
timestamp: Time,
|
|
@@ -96,6 +97,8 @@ module Stigg
|
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
class Credit < Stigg::Internal::Type::BaseModel
|
|
100
|
+
attr_accessor consumed: Float
|
|
101
|
+
|
|
99
102
|
attr_accessor currency_id: String
|
|
100
103
|
|
|
101
104
|
attr_accessor current_usage: Float
|
|
@@ -107,6 +110,7 @@ module Stigg
|
|
|
107
110
|
attr_accessor usage_period_end: Time?
|
|
108
111
|
|
|
109
112
|
def initialize: (
|
|
113
|
+
consumed: Float,
|
|
110
114
|
currency_id: String,
|
|
111
115
|
current_usage: Float,
|
|
112
116
|
timestamp: Time,
|
|
@@ -115,6 +119,7 @@ module Stigg
|
|
|
115
119
|
) -> void
|
|
116
120
|
|
|
117
121
|
def to_hash: -> {
|
|
122
|
+
consumed: Float,
|
|
118
123
|
currency_id: String,
|
|
119
124
|
current_usage: Float,
|
|
120
125
|
timestamp: Time,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stigg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.0.pre.beta.
|
|
4
|
+
version: 0.1.0.pre.beta.39
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stigg
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|