stigg 0.1.0.pre.beta.30 → 0.1.0.pre.beta.31

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e6feb55427e00181b58f2936f8f6620b2949b6d89c3658ae65a924db35dd1cd
4
- data.tar.gz: e412e91ba4d6119240b0a543a4ee3d6996d153b115b8a54aa4ffa3bf62c13169
3
+ metadata.gz: 62b43ccdd36eb38e4c60c014fafbae81b9dcbde64df188b41acf6dc3fa68ed84
4
+ data.tar.gz: 5f3f6bf7dbaaf3c9c5757a2f145ff99e90e7918ac9160f662075fc0a748c27d1
5
5
  SHA512:
6
- metadata.gz: 6edc943aae83bc076a8c93a7faa9c514f2c1ccf80cc1f78a22c9e9198a37a3db0ced0a090c347dce1f71f3a1d64212e5741fafb32c48a60fed369f8cb47d664b
7
- data.tar.gz: 4ce1abc4fdcb2d6f163004f5ddd01a0d61cdbb53b5a9be32b5e14f38ec5204c5d00d239ddebf61680362846135babb7594239d3496259cfb6d5ce85e2d6ba59f
6
+ metadata.gz: abecfb4018b4e477bc69e7d2a21b86dc4a2bcb872d0f84187c80f9a99b2a81f49c455249b2d97af69b595aff2c97f7b1a7dca9d67447dac48549f1199c346285
7
+ data.tar.gz: 9b63fe79671b002b75d89b5ce2fc15a1916ed2a245800871e7ee29c2549f0b0fe3a3d9f98615ab49d25a2b5a34a522cefcd45f8efe30bccc02cc9df86c5e8f36
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-beta.31 (2026-06-23)
4
+
5
+ Full Changelog: [v0.1.0-beta.30...v0.1.0-beta.31](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.30...v0.1.0-beta.31)
6
+
7
+ ### Features
8
+
9
+ * **api:** add usage_period_end field to usage report credit ([ecc06df](https://github.com/stiggio/stigg-ruby/commit/ecc06df3022b64875c058427de2419dbcebab073))
10
+
3
11
  ## 0.1.0-beta.30 (2026-06-23)
4
12
 
5
13
  Full Changelog: [v0.1.0-beta.29...v0.1.0-beta.30](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.29...v0.1.0-beta.30)
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.30"
27
+ gem "stigg", "~> 0.1.0.pre.beta.31"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -149,7 +149,14 @@ module Stigg
149
149
  # @return [Float]
150
150
  required :usage_limit, Float, api_name: :usageLimit
151
151
 
152
- # @!method initialize(currency_id:, current_usage:, timestamp:, usage_limit:)
152
+ # @!attribute usage_period_end
153
+ # End of the current credit grant period (when recurring credits reset), if
154
+ # applicable
155
+ #
156
+ # @return [Time, nil]
157
+ optional :usage_period_end, Time, api_name: :usagePeriodEnd, nil?: true
158
+
159
+ # @!method initialize(currency_id:, current_usage:, timestamp:, usage_limit:, usage_period_end: nil)
153
160
  # Some parameter documentations has been truncated, see
154
161
  # {Stigg::Models::V1::UsageReportResponse::Data::Credit} for more details.
155
162
  #
@@ -162,6 +169,8 @@ module Stigg
162
169
  # @param timestamp [Time] The grant-version timestamp of this balance, used by the SDK for last-write-wins
163
170
  #
164
171
  # @param usage_limit [Float] The total credits granted
172
+ #
173
+ # @param usage_period_end [Time, nil] End of the current credit grant period (when recurring credits reset), if applic
165
174
  end
166
175
  end
167
176
  end
data/lib/stigg/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stigg
4
- VERSION = "0.1.0.pre.beta.30"
4
+ VERSION = "0.1.0.pre.beta.31"
5
5
  end
@@ -210,13 +210,19 @@ module Stigg
210
210
  sig { returns(Float) }
211
211
  attr_accessor :usage_limit
212
212
 
213
+ # End of the current credit grant period (when recurring credits reset), if
214
+ # applicable
215
+ sig { returns(T.nilable(Time)) }
216
+ attr_accessor :usage_period_end
217
+
213
218
  # Optimistic credit balance for a credit-backed feature
214
219
  sig do
215
220
  params(
216
221
  currency_id: String,
217
222
  current_usage: Float,
218
223
  timestamp: Time,
219
- usage_limit: Float
224
+ usage_limit: Float,
225
+ usage_period_end: T.nilable(Time)
220
226
  ).returns(T.attached_class)
221
227
  end
222
228
  def self.new(
@@ -228,7 +234,10 @@ module Stigg
228
234
  # reconciliation
229
235
  timestamp:,
230
236
  # The total credits granted
231
- usage_limit:
237
+ usage_limit:,
238
+ # End of the current credit grant period (when recurring credits reset), if
239
+ # applicable
240
+ usage_period_end: nil
232
241
  )
233
242
  end
234
243
 
@@ -238,7 +247,8 @@ module Stigg
238
247
  currency_id: String,
239
248
  current_usage: Float,
240
249
  timestamp: Time,
241
- usage_limit: Float
250
+ usage_limit: Float,
251
+ usage_period_end: T.nilable(Time)
242
252
  }
243
253
  )
244
254
  end
@@ -91,7 +91,8 @@ module Stigg
91
91
  currency_id: String,
92
92
  current_usage: Float,
93
93
  timestamp: Time,
94
- usage_limit: Float
94
+ usage_limit: Float,
95
+ usage_period_end: Time?
95
96
  }
96
97
 
97
98
  class Credit < Stigg::Internal::Type::BaseModel
@@ -103,18 +104,22 @@ module Stigg
103
104
 
104
105
  attr_accessor usage_limit: Float
105
106
 
107
+ attr_accessor usage_period_end: Time?
108
+
106
109
  def initialize: (
107
110
  currency_id: String,
108
111
  current_usage: Float,
109
112
  timestamp: Time,
110
- usage_limit: Float
113
+ usage_limit: Float,
114
+ ?usage_period_end: Time?
111
115
  ) -> void
112
116
 
113
117
  def to_hash: -> {
114
118
  currency_id: String,
115
119
  current_usage: Float,
116
120
  timestamp: Time,
117
- usage_limit: Float
121
+ usage_limit: Float,
122
+ usage_period_end: Time?
118
123
  }
119
124
  end
120
125
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stigg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.beta.30
4
+ version: 0.1.0.pre.beta.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stigg