stigg 0.1.0.pre.alpha.11 → 0.1.0.pre.alpha.12

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: ffcab10dd6cdcb3e259b8bcf56ddb845d37a5759fe3d05864666ba3a45c3ebf4
4
- data.tar.gz: 0366e3ed1fde37abc148b1ed45c0551b857aa36387ee31ba17e98695419adcf8
3
+ metadata.gz: 18cfb99fbc47b461de3b97ec88b2add3906f6ac04cc340f003ac4b915428e987
4
+ data.tar.gz: 5e2d8c5f464d13c122c78a4fadf25cca42179501462dbd71dd5a9ac55224ce1a
5
5
  SHA512:
6
- metadata.gz: 9a5c803bf5198ff74226d674c329f3f7040c087526fbacebe42dd61b9aad1c33cca43542600653818aaa27e94ec05ec4e045ce1b896d05d296b2064fe107fc36
7
- data.tar.gz: 5a4913d33521a49cd3d6182a9002569254038bd21c627c295cdab227b2e37eb86c43719c17d2717563fcd4de23681912c43fd2b72c6962beba20439b5c70dca3
6
+ metadata.gz: d4bed75ee09990e57394947917f3868d1b4316249746efff6defccd4476c49fbaee7a37eef5a362a607c25f4b3e1210a230451e6bb05541ee534d075410bf759
7
+ data.tar.gz: cae0a028b670b2e245bce500da799eff41769f90c8cfc815e2a444bd2bca2a192721a9c1611566d2fb5689d15fab15a742c2c57c89084feed3f67397cf3278bf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.12 (2026-03-02)
4
+
5
+ Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.11...v0.1.0-alpha.12)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([4d99784](https://github.com/stiggio/stigg-ruby/commit/4d997842856dc0181d9de96f9e4f70ddb20e4f22))
10
+
3
11
  ## 0.1.0-alpha.11 (2026-03-02)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)
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.alpha.11"
27
+ gem "stigg", "~> 0.1.0.pre.alpha.12"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -48,6 +48,14 @@ module Stigg
48
48
  # @return [String, nil]
49
49
  optional :billing_country_code, String, api_name: :billingCountryCode
50
50
 
51
+ # @!attribute billing_cycle_anchor
52
+ # Billing cycle anchor behavior for the subscription
53
+ #
54
+ # @return [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingCycleAnchor, nil]
55
+ optional :billing_cycle_anchor,
56
+ enum: -> { Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor },
57
+ api_name: :billingCycleAnchor
58
+
51
59
  # @!attribute billing_information
52
60
  # Billing and tax configuration
53
61
  #
@@ -110,7 +118,7 @@ module Stigg
110
118
  # @return [Float, nil]
111
119
  optional :unit_quantity, Float, api_name: :unitQuantity
112
120
 
113
- # @!method initialize(customer_id:, plan_id:, addons: nil, applied_coupon: nil, billable_features: nil, billing_country_code: nil, billing_information: nil, billing_period: nil, charges: nil, paying_customer_id: nil, resource_id: nil, schedule_strategy: nil, start_date: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
121
+ # @!method initialize(customer_id:, plan_id:, addons: nil, applied_coupon: nil, billable_features: nil, billing_country_code: nil, billing_cycle_anchor: nil, billing_information: nil, billing_period: nil, charges: nil, paying_customer_id: nil, resource_id: nil, schedule_strategy: nil, start_date: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
114
122
  # @param customer_id [String] Customer ID
115
123
  #
116
124
  # @param plan_id [String] Plan ID
@@ -123,6 +131,8 @@ module Stigg
123
131
  #
124
132
  # @param billing_country_code [String] ISO 3166-1 country code for localization
125
133
  #
134
+ # @param billing_cycle_anchor [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingCycleAnchor] Billing cycle anchor behavior for the subscription
135
+ #
126
136
  # @param billing_information [Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation] Billing and tax configuration
127
137
  #
128
138
  # @param billing_period [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingPeriod] Billing period (MONTHLY or ANNUALLY)
@@ -442,6 +452,17 @@ module Stigg
442
452
  # @param quantity [Float] Quantity of feature units
443
453
  end
444
454
 
455
+ # Billing cycle anchor behavior for the subscription
456
+ module BillingCycleAnchor
457
+ extend Stigg::Internal::Type::Enum
458
+
459
+ UNCHANGED = :UNCHANGED
460
+ NOW = :NOW
461
+
462
+ # @!method self.values
463
+ # @return [Array<Symbol>]
464
+ end
465
+
445
466
  class BillingInformation < Stigg::Internal::Type::BaseModel
446
467
  # @!attribute billing_address
447
468
  # Billing address
@@ -53,6 +53,14 @@ module Stigg
53
53
  # @return [String, nil]
54
54
  optional :billing_country_code, String, api_name: :billingCountryCode, nil?: true
55
55
 
56
+ # @!attribute billing_cycle_anchor
57
+ # Billing cycle anchor behavior for the subscription
58
+ #
59
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::BillingCycleAnchor, nil]
60
+ optional :billing_cycle_anchor,
61
+ enum: -> { Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor },
62
+ api_name: :billingCycleAnchor
63
+
56
64
  # @!attribute billing_id
57
65
  # External billing system identifier
58
66
  #
@@ -175,7 +183,7 @@ module Stigg
175
183
  # @return [Float, nil]
176
184
  optional :unit_quantity, Float, api_name: :unitQuantity
177
185
 
178
- # @!method initialize(customer_id:, plan_id:, id: nil, addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_country_code: nil, billing_id: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, checkout_options: nil, metadata: nil, minimum_spend: nil, paying_customer_id: nil, payment_collection_method: nil, price_overrides: nil, resource_id: nil, salesforce_id: nil, schedule_strategy: nil, start_date: nil, subscription_entitlements: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
186
+ # @!method initialize(customer_id:, plan_id:, id: nil, addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_country_code: nil, billing_cycle_anchor: nil, billing_id: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, checkout_options: nil, metadata: nil, minimum_spend: nil, paying_customer_id: nil, payment_collection_method: nil, price_overrides: nil, resource_id: nil, salesforce_id: nil, schedule_strategy: nil, start_date: nil, subscription_entitlements: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
179
187
  # @param customer_id [String] Customer ID to provision the subscription for
180
188
  #
181
189
  # @param plan_id [String] Plan ID to provision
@@ -190,6 +198,8 @@ module Stigg
190
198
  #
191
199
  # @param billing_country_code [String, nil] The ISO 3166-1 alpha-2 country code for billing
192
200
  #
201
+ # @param billing_cycle_anchor [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::BillingCycleAnchor] Billing cycle anchor behavior for the subscription
202
+ #
193
203
  # @param billing_id [String, nil] External billing system identifier
194
204
  #
195
205
  # @param billing_information [Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation]
@@ -506,6 +516,17 @@ module Stigg
506
516
  end
507
517
  end
508
518
 
519
+ # Billing cycle anchor behavior for the subscription
520
+ module BillingCycleAnchor
521
+ extend Stigg::Internal::Type::Enum
522
+
523
+ UNCHANGED = :UNCHANGED
524
+ NOW = :NOW
525
+
526
+ # @!method self.values
527
+ # @return [Array<Symbol>]
528
+ end
529
+
509
530
  class BillingInformation < Stigg::Internal::Type::BaseModel
510
531
  # @!attribute billing_address
511
532
  # Billing address for the subscription
@@ -27,6 +27,13 @@ module Stigg
27
27
  Stigg::Internal::Type::Boolean,
28
28
  api_name: :awaitPaymentConfirmation
29
29
 
30
+ # @!attribute billing_cycle_anchor
31
+ #
32
+ # @return [Symbol, Stigg::Models::V1::SubscriptionUpdateParams::BillingCycleAnchor, nil]
33
+ optional :billing_cycle_anchor,
34
+ enum: -> { Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor },
35
+ api_name: :billingCycleAnchor
36
+
30
37
  # @!attribute billing_information
31
38
  #
32
39
  # @return [Stigg::Models::V1::SubscriptionUpdateParams::BillingInformation, nil]
@@ -99,13 +106,15 @@ module Stigg
99
106
  # @return [Time, nil]
100
107
  optional :trial_end_date, Time, api_name: :trialEndDate
101
108
 
102
- # @!method initialize(addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, metadata: nil, minimum_spend: nil, price_overrides: nil, promotion_code: nil, schedule_strategy: nil, subscription_entitlements: nil, trial_end_date: nil, request_options: {})
109
+ # @!method initialize(addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_cycle_anchor: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, metadata: nil, minimum_spend: nil, price_overrides: nil, promotion_code: nil, schedule_strategy: nil, subscription_entitlements: nil, trial_end_date: nil, request_options: {})
103
110
  # @param addons [Array<Stigg::Models::V1::SubscriptionUpdateParams::Addon>]
104
111
  #
105
112
  # @param applied_coupon [Stigg::Models::V1::SubscriptionUpdateParams::AppliedCoupon]
106
113
  #
107
114
  # @param await_payment_confirmation [Boolean]
108
115
  #
116
+ # @param billing_cycle_anchor [Symbol, Stigg::Models::V1::SubscriptionUpdateParams::BillingCycleAnchor]
117
+ #
109
118
  # @param billing_information [Stigg::Models::V1::SubscriptionUpdateParams::BillingInformation]
110
119
  #
111
120
  # @param billing_period [Symbol, Stigg::Models::V1::SubscriptionUpdateParams::BillingPeriod]
@@ -379,6 +388,16 @@ module Stigg
379
388
  end
380
389
  end
381
390
 
391
+ module BillingCycleAnchor
392
+ extend Stigg::Internal::Type::Enum
393
+
394
+ UNCHANGED = :UNCHANGED
395
+ NOW = :NOW
396
+
397
+ # @!method self.values
398
+ # @return [Array<Symbol>]
399
+ end
400
+
382
401
  class BillingInformation < Stigg::Internal::Type::BaseModel
383
402
  # @!attribute billing_address
384
403
  # Physical address
@@ -37,7 +37,7 @@ module Stigg
37
37
  # Updates an active subscription's properties including billing period, add-ons,
38
38
  # unit quantities, and discounts.
39
39
  #
40
- # @overload update(id, addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, metadata: nil, minimum_spend: nil, price_overrides: nil, promotion_code: nil, schedule_strategy: nil, subscription_entitlements: nil, trial_end_date: nil, request_options: {})
40
+ # @overload update(id, addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_cycle_anchor: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, metadata: nil, minimum_spend: nil, price_overrides: nil, promotion_code: nil, schedule_strategy: nil, subscription_entitlements: nil, trial_end_date: nil, request_options: {})
41
41
  #
42
42
  # @param id [String] The unique identifier of the entity
43
43
  #
@@ -47,6 +47,8 @@ module Stigg
47
47
  #
48
48
  # @param await_payment_confirmation [Boolean]
49
49
  #
50
+ # @param billing_cycle_anchor [Symbol, Stigg::Models::V1::SubscriptionUpdateParams::BillingCycleAnchor]
51
+ #
50
52
  # @param billing_information [Stigg::Models::V1::SubscriptionUpdateParams::BillingInformation]
51
53
  #
52
54
  # @param billing_period [Symbol, Stigg::Models::V1::SubscriptionUpdateParams::BillingPeriod]
@@ -246,7 +248,7 @@ module Stigg
246
248
  # Previews the pricing impact of creating or updating a subscription without
247
249
  # making changes. Returns estimated costs, taxes, and proration details.
248
250
  #
249
- # @overload preview(customer_id:, plan_id:, addons: nil, applied_coupon: nil, billable_features: nil, billing_country_code: nil, billing_information: nil, billing_period: nil, charges: nil, paying_customer_id: nil, resource_id: nil, schedule_strategy: nil, start_date: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
251
+ # @overload preview(customer_id:, plan_id:, addons: nil, applied_coupon: nil, billable_features: nil, billing_country_code: nil, billing_cycle_anchor: nil, billing_information: nil, billing_period: nil, charges: nil, paying_customer_id: nil, resource_id: nil, schedule_strategy: nil, start_date: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
250
252
  #
251
253
  # @param customer_id [String] Customer ID
252
254
  #
@@ -260,6 +262,8 @@ module Stigg
260
262
  #
261
263
  # @param billing_country_code [String] ISO 3166-1 country code for localization
262
264
  #
265
+ # @param billing_cycle_anchor [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingCycleAnchor] Billing cycle anchor behavior for the subscription
266
+ #
263
267
  # @param billing_information [Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation] Billing and tax configuration
264
268
  #
265
269
  # @param billing_period [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingPeriod] Billing period (MONTHLY or ANNUALLY)
@@ -297,7 +301,7 @@ module Stigg
297
301
  # Creates a new subscription for an existing customer. When payment is required
298
302
  # and no payment method exists, returns a checkout URL.
299
303
  #
300
- # @overload provision(customer_id:, plan_id:, id: nil, addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_country_code: nil, billing_id: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, checkout_options: nil, metadata: nil, minimum_spend: nil, paying_customer_id: nil, payment_collection_method: nil, price_overrides: nil, resource_id: nil, salesforce_id: nil, schedule_strategy: nil, start_date: nil, subscription_entitlements: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
304
+ # @overload provision(customer_id:, plan_id:, id: nil, addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_country_code: nil, billing_cycle_anchor: nil, billing_id: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, checkout_options: nil, metadata: nil, minimum_spend: nil, paying_customer_id: nil, payment_collection_method: nil, price_overrides: nil, resource_id: nil, salesforce_id: nil, schedule_strategy: nil, start_date: nil, subscription_entitlements: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
301
305
  #
302
306
  # @param customer_id [String] Customer ID to provision the subscription for
303
307
  #
@@ -313,6 +317,8 @@ module Stigg
313
317
  #
314
318
  # @param billing_country_code [String, nil] The ISO 3166-1 alpha-2 country code for billing
315
319
  #
320
+ # @param billing_cycle_anchor [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::BillingCycleAnchor] Billing cycle anchor behavior for the subscription
321
+ #
316
322
  # @param billing_id [String, nil] External billing system identifier
317
323
  #
318
324
  # @param billing_information [Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation]
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.alpha.11"
4
+ VERSION = "0.1.0.pre.alpha.12"
5
5
  end
@@ -82,6 +82,24 @@ module Stigg
82
82
  sig { params(billing_country_code: String).void }
83
83
  attr_writer :billing_country_code
84
84
 
85
+ # Billing cycle anchor behavior for the subscription
86
+ sig do
87
+ returns(
88
+ T.nilable(
89
+ Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor::OrSymbol
90
+ )
91
+ )
92
+ end
93
+ attr_reader :billing_cycle_anchor
94
+
95
+ sig do
96
+ params(
97
+ billing_cycle_anchor:
98
+ Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor::OrSymbol
99
+ ).void
100
+ end
101
+ attr_writer :billing_cycle_anchor
102
+
85
103
  # Billing and tax configuration
86
104
  sig do
87
105
  returns(
@@ -209,6 +227,8 @@ module Stigg
209
227
  Stigg::V1::SubscriptionPreviewParams::BillableFeature::OrHash
210
228
  ],
211
229
  billing_country_code: String,
230
+ billing_cycle_anchor:
231
+ Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor::OrSymbol,
212
232
  billing_information:
213
233
  Stigg::V1::SubscriptionPreviewParams::BillingInformation::OrHash,
214
234
  billing_period:
@@ -239,6 +259,8 @@ module Stigg
239
259
  billable_features: nil,
240
260
  # ISO 3166-1 country code for localization
241
261
  billing_country_code: nil,
262
+ # Billing cycle anchor behavior for the subscription
263
+ billing_cycle_anchor: nil,
242
264
  # Billing and tax configuration
243
265
  billing_information: nil,
244
266
  # Billing period (MONTHLY or ANNUALLY)
@@ -272,6 +294,8 @@ module Stigg
272
294
  billable_features:
273
295
  T::Array[Stigg::V1::SubscriptionPreviewParams::BillableFeature],
274
296
  billing_country_code: String,
297
+ billing_cycle_anchor:
298
+ Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor::OrSymbol,
275
299
  billing_information:
276
300
  Stigg::V1::SubscriptionPreviewParams::BillingInformation,
277
301
  billing_period:
@@ -1252,6 +1276,41 @@ module Stigg
1252
1276
  end
1253
1277
  end
1254
1278
 
1279
+ # Billing cycle anchor behavior for the subscription
1280
+ module BillingCycleAnchor
1281
+ extend Stigg::Internal::Type::Enum
1282
+
1283
+ TaggedSymbol =
1284
+ T.type_alias do
1285
+ T.all(
1286
+ Symbol,
1287
+ Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor
1288
+ )
1289
+ end
1290
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1291
+
1292
+ UNCHANGED =
1293
+ T.let(
1294
+ :UNCHANGED,
1295
+ Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor::TaggedSymbol
1296
+ )
1297
+ NOW =
1298
+ T.let(
1299
+ :NOW,
1300
+ Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor::TaggedSymbol
1301
+ )
1302
+
1303
+ sig do
1304
+ override.returns(
1305
+ T::Array[
1306
+ Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor::TaggedSymbol
1307
+ ]
1308
+ )
1309
+ end
1310
+ def self.values
1311
+ end
1312
+ end
1313
+
1255
1314
  class BillingInformation < Stigg::Internal::Type::BaseModel
1256
1315
  OrHash =
1257
1316
  T.type_alias do
@@ -72,6 +72,24 @@ module Stigg
72
72
  sig { returns(T.nilable(String)) }
73
73
  attr_accessor :billing_country_code
74
74
 
75
+ # Billing cycle anchor behavior for the subscription
76
+ sig do
77
+ returns(
78
+ T.nilable(
79
+ Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor::OrSymbol
80
+ )
81
+ )
82
+ end
83
+ attr_reader :billing_cycle_anchor
84
+
85
+ sig do
86
+ params(
87
+ billing_cycle_anchor:
88
+ Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor::OrSymbol
89
+ ).void
90
+ end
91
+ attr_writer :billing_cycle_anchor
92
+
75
93
  # External billing system identifier
76
94
  sig { returns(T.nilable(String)) }
77
95
  attr_accessor :billing_id
@@ -309,6 +327,8 @@ module Stigg
309
327
  Stigg::V1::SubscriptionProvisionParams::AppliedCoupon::OrHash,
310
328
  await_payment_confirmation: T::Boolean,
311
329
  billing_country_code: T.nilable(String),
330
+ billing_cycle_anchor:
331
+ Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor::OrSymbol,
312
332
  billing_id: T.nilable(String),
313
333
  billing_information:
314
334
  Stigg::V1::SubscriptionProvisionParams::BillingInformation::OrHash,
@@ -361,6 +381,8 @@ module Stigg
361
381
  await_payment_confirmation: nil,
362
382
  # The ISO 3166-1 alpha-2 country code for billing
363
383
  billing_country_code: nil,
384
+ # Billing cycle anchor behavior for the subscription
385
+ billing_cycle_anchor: nil,
364
386
  # External billing system identifier
365
387
  billing_id: nil,
366
388
  billing_information: nil,
@@ -405,6 +427,8 @@ module Stigg
405
427
  Stigg::V1::SubscriptionProvisionParams::AppliedCoupon,
406
428
  await_payment_confirmation: T::Boolean,
407
429
  billing_country_code: T.nilable(String),
430
+ billing_cycle_anchor:
431
+ Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor::OrSymbol,
408
432
  billing_id: T.nilable(String),
409
433
  billing_information:
410
434
  Stigg::V1::SubscriptionProvisionParams::BillingInformation,
@@ -1365,6 +1389,41 @@ module Stigg
1365
1389
  end
1366
1390
  end
1367
1391
 
1392
+ # Billing cycle anchor behavior for the subscription
1393
+ module BillingCycleAnchor
1394
+ extend Stigg::Internal::Type::Enum
1395
+
1396
+ TaggedSymbol =
1397
+ T.type_alias do
1398
+ T.all(
1399
+ Symbol,
1400
+ Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor
1401
+ )
1402
+ end
1403
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1404
+
1405
+ UNCHANGED =
1406
+ T.let(
1407
+ :UNCHANGED,
1408
+ Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor::TaggedSymbol
1409
+ )
1410
+ NOW =
1411
+ T.let(
1412
+ :NOW,
1413
+ Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor::TaggedSymbol
1414
+ )
1415
+
1416
+ sig do
1417
+ override.returns(
1418
+ T::Array[
1419
+ Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor::TaggedSymbol
1420
+ ]
1421
+ )
1422
+ end
1423
+ def self.values
1424
+ end
1425
+ end
1426
+
1368
1427
  class BillingInformation < Stigg::Internal::Type::BaseModel
1369
1428
  OrHash =
1370
1429
  T.type_alias do
@@ -45,6 +45,23 @@ module Stigg
45
45
  sig { params(await_payment_confirmation: T::Boolean).void }
46
46
  attr_writer :await_payment_confirmation
47
47
 
48
+ sig do
49
+ returns(
50
+ T.nilable(
51
+ Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor::OrSymbol
52
+ )
53
+ )
54
+ end
55
+ attr_reader :billing_cycle_anchor
56
+
57
+ sig do
58
+ params(
59
+ billing_cycle_anchor:
60
+ Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor::OrSymbol
61
+ ).void
62
+ end
63
+ attr_writer :billing_cycle_anchor
64
+
48
65
  sig do
49
66
  returns(
50
67
  T.nilable(Stigg::V1::SubscriptionUpdateParams::BillingInformation)
@@ -202,6 +219,8 @@ module Stigg
202
219
  applied_coupon:
203
220
  Stigg::V1::SubscriptionUpdateParams::AppliedCoupon::OrHash,
204
221
  await_payment_confirmation: T::Boolean,
222
+ billing_cycle_anchor:
223
+ Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor::OrSymbol,
205
224
  billing_information:
206
225
  Stigg::V1::SubscriptionUpdateParams::BillingInformation::OrHash,
207
226
  billing_period:
@@ -234,6 +253,7 @@ module Stigg
234
253
  addons: nil,
235
254
  applied_coupon: nil,
236
255
  await_payment_confirmation: nil,
256
+ billing_cycle_anchor: nil,
237
257
  billing_information: nil,
238
258
  billing_period: nil,
239
259
  budget: nil,
@@ -258,6 +278,8 @@ module Stigg
258
278
  applied_coupon:
259
279
  Stigg::V1::SubscriptionUpdateParams::AppliedCoupon,
260
280
  await_payment_confirmation: T::Boolean,
281
+ billing_cycle_anchor:
282
+ Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor::OrSymbol,
261
283
  billing_information:
262
284
  Stigg::V1::SubscriptionUpdateParams::BillingInformation,
263
285
  billing_period:
@@ -1184,6 +1206,40 @@ module Stigg
1184
1206
  end
1185
1207
  end
1186
1208
 
1209
+ module BillingCycleAnchor
1210
+ extend Stigg::Internal::Type::Enum
1211
+
1212
+ TaggedSymbol =
1213
+ T.type_alias do
1214
+ T.all(
1215
+ Symbol,
1216
+ Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor
1217
+ )
1218
+ end
1219
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1220
+
1221
+ UNCHANGED =
1222
+ T.let(
1223
+ :UNCHANGED,
1224
+ Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor::TaggedSymbol
1225
+ )
1226
+ NOW =
1227
+ T.let(
1228
+ :NOW,
1229
+ Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor::TaggedSymbol
1230
+ )
1231
+
1232
+ sig do
1233
+ override.returns(
1234
+ T::Array[
1235
+ Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor::TaggedSymbol
1236
+ ]
1237
+ )
1238
+ end
1239
+ def self.values
1240
+ end
1241
+ end
1242
+
1187
1243
  class BillingInformation < Stigg::Internal::Type::BaseModel
1188
1244
  OrHash =
1189
1245
  T.type_alias do
@@ -38,6 +38,8 @@ module Stigg
38
38
  applied_coupon:
39
39
  Stigg::V1::SubscriptionUpdateParams::AppliedCoupon::OrHash,
40
40
  await_payment_confirmation: T::Boolean,
41
+ billing_cycle_anchor:
42
+ Stigg::V1::SubscriptionUpdateParams::BillingCycleAnchor::OrSymbol,
41
43
  billing_information:
42
44
  Stigg::V1::SubscriptionUpdateParams::BillingInformation::OrHash,
43
45
  billing_period:
@@ -72,6 +74,7 @@ module Stigg
72
74
  addons: nil,
73
75
  applied_coupon: nil,
74
76
  await_payment_confirmation: nil,
77
+ billing_cycle_anchor: nil,
75
78
  billing_information: nil,
76
79
  billing_period: nil,
77
80
  budget: nil,
@@ -237,6 +240,8 @@ module Stigg
237
240
  Stigg::V1::SubscriptionPreviewParams::BillableFeature::OrHash
238
241
  ],
239
242
  billing_country_code: String,
243
+ billing_cycle_anchor:
244
+ Stigg::V1::SubscriptionPreviewParams::BillingCycleAnchor::OrSymbol,
240
245
  billing_information:
241
246
  Stigg::V1::SubscriptionPreviewParams::BillingInformation::OrHash,
242
247
  billing_period:
@@ -267,6 +272,8 @@ module Stigg
267
272
  billable_features: nil,
268
273
  # ISO 3166-1 country code for localization
269
274
  billing_country_code: nil,
275
+ # Billing cycle anchor behavior for the subscription
276
+ billing_cycle_anchor: nil,
270
277
  # Billing and tax configuration
271
278
  billing_information: nil,
272
279
  # Billing period (MONTHLY or ANNUALLY)
@@ -302,6 +309,8 @@ module Stigg
302
309
  Stigg::V1::SubscriptionProvisionParams::AppliedCoupon::OrHash,
303
310
  await_payment_confirmation: T::Boolean,
304
311
  billing_country_code: T.nilable(String),
312
+ billing_cycle_anchor:
313
+ Stigg::V1::SubscriptionProvisionParams::BillingCycleAnchor::OrSymbol,
305
314
  billing_id: T.nilable(String),
306
315
  billing_information:
307
316
  Stigg::V1::SubscriptionProvisionParams::BillingInformation::OrHash,
@@ -354,6 +363,8 @@ module Stigg
354
363
  await_payment_confirmation: nil,
355
364
  # The ISO 3166-1 alpha-2 country code for billing
356
365
  billing_country_code: nil,
366
+ # Billing cycle anchor behavior for the subscription
367
+ billing_cycle_anchor: nil,
357
368
  # External billing system identifier
358
369
  billing_id: nil,
359
370
  billing_information: nil,
@@ -9,6 +9,7 @@ module Stigg
9
9
  applied_coupon: Stigg::V1::SubscriptionPreviewParams::AppliedCoupon,
10
10
  billable_features: ::Array[Stigg::V1::SubscriptionPreviewParams::BillableFeature],
11
11
  billing_country_code: String,
12
+ billing_cycle_anchor: Stigg::Models::V1::SubscriptionPreviewParams::billing_cycle_anchor,
12
13
  billing_information: Stigg::V1::SubscriptionPreviewParams::BillingInformation,
13
14
  billing_period: Stigg::Models::V1::SubscriptionPreviewParams::billing_period,
14
15
  charges: ::Array[Stigg::V1::SubscriptionPreviewParams::Charge],
@@ -51,6 +52,12 @@ module Stigg
51
52
 
52
53
  def billing_country_code=: (String) -> String
53
54
 
55
+ attr_reader billing_cycle_anchor: Stigg::Models::V1::SubscriptionPreviewParams::billing_cycle_anchor?
56
+
57
+ def billing_cycle_anchor=: (
58
+ Stigg::Models::V1::SubscriptionPreviewParams::billing_cycle_anchor
59
+ ) -> Stigg::Models::V1::SubscriptionPreviewParams::billing_cycle_anchor
60
+
54
61
  attr_reader billing_information: Stigg::V1::SubscriptionPreviewParams::BillingInformation?
55
62
 
56
63
  def billing_information=: (
@@ -104,6 +111,7 @@ module Stigg
104
111
  ?applied_coupon: Stigg::V1::SubscriptionPreviewParams::AppliedCoupon,
105
112
  ?billable_features: ::Array[Stigg::V1::SubscriptionPreviewParams::BillableFeature],
106
113
  ?billing_country_code: String,
114
+ ?billing_cycle_anchor: Stigg::Models::V1::SubscriptionPreviewParams::billing_cycle_anchor,
107
115
  ?billing_information: Stigg::V1::SubscriptionPreviewParams::BillingInformation,
108
116
  ?billing_period: Stigg::Models::V1::SubscriptionPreviewParams::billing_period,
109
117
  ?charges: ::Array[Stigg::V1::SubscriptionPreviewParams::Charge],
@@ -123,6 +131,7 @@ module Stigg
123
131
  applied_coupon: Stigg::V1::SubscriptionPreviewParams::AppliedCoupon,
124
132
  billable_features: ::Array[Stigg::V1::SubscriptionPreviewParams::BillableFeature],
125
133
  billing_country_code: String,
134
+ billing_cycle_anchor: Stigg::Models::V1::SubscriptionPreviewParams::billing_cycle_anchor,
126
135
  billing_information: Stigg::V1::SubscriptionPreviewParams::BillingInformation,
127
136
  billing_period: Stigg::Models::V1::SubscriptionPreviewParams::billing_period,
128
137
  charges: ::Array[Stigg::V1::SubscriptionPreviewParams::Charge],
@@ -530,6 +539,17 @@ module Stigg
530
539
  def to_hash: -> { feature_id: String, quantity: Float }
531
540
  end
532
541
 
542
+ type billing_cycle_anchor = :UNCHANGED | :NOW
543
+
544
+ module BillingCycleAnchor
545
+ extend Stigg::Internal::Type::Enum
546
+
547
+ UNCHANGED: :UNCHANGED
548
+ NOW: :NOW
549
+
550
+ def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionPreviewParams::billing_cycle_anchor]
551
+ end
552
+
533
553
  type billing_information =
534
554
  {
535
555
  billing_address: Stigg::V1::SubscriptionPreviewParams::BillingInformation::BillingAddress,
@@ -10,6 +10,7 @@ module Stigg
10
10
  applied_coupon: Stigg::V1::SubscriptionProvisionParams::AppliedCoupon,
11
11
  await_payment_confirmation: bool,
12
12
  billing_country_code: String?,
13
+ billing_cycle_anchor: Stigg::Models::V1::SubscriptionProvisionParams::billing_cycle_anchor,
13
14
  billing_id: String?,
14
15
  billing_information: Stigg::V1::SubscriptionProvisionParams::BillingInformation,
15
16
  billing_period: Stigg::Models::V1::SubscriptionProvisionParams::billing_period,
@@ -61,6 +62,12 @@ module Stigg
61
62
 
62
63
  attr_accessor billing_country_code: String?
63
64
 
65
+ attr_reader billing_cycle_anchor: Stigg::Models::V1::SubscriptionProvisionParams::billing_cycle_anchor?
66
+
67
+ def billing_cycle_anchor=: (
68
+ Stigg::Models::V1::SubscriptionProvisionParams::billing_cycle_anchor
69
+ ) -> Stigg::Models::V1::SubscriptionProvisionParams::billing_cycle_anchor
70
+
64
71
  attr_accessor billing_id: String?
65
72
 
66
73
  attr_reader billing_information: Stigg::V1::SubscriptionProvisionParams::BillingInformation?
@@ -147,6 +154,7 @@ module Stigg
147
154
  ?applied_coupon: Stigg::V1::SubscriptionProvisionParams::AppliedCoupon,
148
155
  ?await_payment_confirmation: bool,
149
156
  ?billing_country_code: String?,
157
+ ?billing_cycle_anchor: Stigg::Models::V1::SubscriptionProvisionParams::billing_cycle_anchor,
150
158
  ?billing_id: String?,
151
159
  ?billing_information: Stigg::V1::SubscriptionProvisionParams::BillingInformation,
152
160
  ?billing_period: Stigg::Models::V1::SubscriptionProvisionParams::billing_period,
@@ -176,6 +184,7 @@ module Stigg
176
184
  applied_coupon: Stigg::V1::SubscriptionProvisionParams::AppliedCoupon,
177
185
  await_payment_confirmation: bool,
178
186
  billing_country_code: String?,
187
+ billing_cycle_anchor: Stigg::Models::V1::SubscriptionProvisionParams::billing_cycle_anchor,
179
188
  billing_id: String?,
180
189
  billing_information: Stigg::V1::SubscriptionProvisionParams::BillingInformation,
181
190
  billing_period: Stigg::Models::V1::SubscriptionProvisionParams::billing_period,
@@ -580,6 +589,17 @@ module Stigg
580
589
  end
581
590
  end
582
591
 
592
+ type billing_cycle_anchor = :UNCHANGED | :NOW
593
+
594
+ module BillingCycleAnchor
595
+ extend Stigg::Internal::Type::Enum
596
+
597
+ UNCHANGED: :UNCHANGED
598
+ NOW: :NOW
599
+
600
+ def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionProvisionParams::billing_cycle_anchor]
601
+ end
602
+
583
603
  type billing_information =
584
604
  {
585
605
  billing_address: Stigg::V1::SubscriptionProvisionParams::BillingInformation::BillingAddress,
@@ -6,6 +6,7 @@ module Stigg
6
6
  addons: ::Array[Stigg::V1::SubscriptionUpdateParams::Addon],
7
7
  applied_coupon: Stigg::V1::SubscriptionUpdateParams::AppliedCoupon,
8
8
  await_payment_confirmation: bool,
9
+ billing_cycle_anchor: Stigg::Models::V1::SubscriptionUpdateParams::billing_cycle_anchor,
9
10
  billing_information: Stigg::V1::SubscriptionUpdateParams::BillingInformation,
10
11
  billing_period: Stigg::Models::V1::SubscriptionUpdateParams::billing_period,
11
12
  budget: Stigg::V1::SubscriptionUpdateParams::Budget?,
@@ -40,6 +41,12 @@ module Stigg
40
41
 
41
42
  def await_payment_confirmation=: (bool) -> bool
42
43
 
44
+ attr_reader billing_cycle_anchor: Stigg::Models::V1::SubscriptionUpdateParams::billing_cycle_anchor?
45
+
46
+ def billing_cycle_anchor=: (
47
+ Stigg::Models::V1::SubscriptionUpdateParams::billing_cycle_anchor
48
+ ) -> Stigg::Models::V1::SubscriptionUpdateParams::billing_cycle_anchor
49
+
43
50
  attr_reader billing_information: Stigg::V1::SubscriptionUpdateParams::BillingInformation?
44
51
 
45
52
  def billing_information=: (
@@ -96,6 +103,7 @@ module Stigg
96
103
  ?addons: ::Array[Stigg::V1::SubscriptionUpdateParams::Addon],
97
104
  ?applied_coupon: Stigg::V1::SubscriptionUpdateParams::AppliedCoupon,
98
105
  ?await_payment_confirmation: bool,
106
+ ?billing_cycle_anchor: Stigg::Models::V1::SubscriptionUpdateParams::billing_cycle_anchor,
99
107
  ?billing_information: Stigg::V1::SubscriptionUpdateParams::BillingInformation,
100
108
  ?billing_period: Stigg::Models::V1::SubscriptionUpdateParams::billing_period,
101
109
  ?budget: Stigg::V1::SubscriptionUpdateParams::Budget?,
@@ -114,6 +122,7 @@ module Stigg
114
122
  addons: ::Array[Stigg::V1::SubscriptionUpdateParams::Addon],
115
123
  applied_coupon: Stigg::V1::SubscriptionUpdateParams::AppliedCoupon,
116
124
  await_payment_confirmation: bool,
125
+ billing_cycle_anchor: Stigg::Models::V1::SubscriptionUpdateParams::billing_cycle_anchor,
117
126
  billing_information: Stigg::V1::SubscriptionUpdateParams::BillingInformation,
118
127
  billing_period: Stigg::Models::V1::SubscriptionUpdateParams::billing_period,
119
128
  budget: Stigg::V1::SubscriptionUpdateParams::Budget?,
@@ -513,6 +522,17 @@ module Stigg
513
522
  end
514
523
  end
515
524
 
525
+ type billing_cycle_anchor = :UNCHANGED | :NOW
526
+
527
+ module BillingCycleAnchor
528
+ extend Stigg::Internal::Type::Enum
529
+
530
+ UNCHANGED: :UNCHANGED
531
+ NOW: :NOW
532
+
533
+ def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionUpdateParams::billing_cycle_anchor]
534
+ end
535
+
516
536
  type billing_information =
517
537
  {
518
538
  billing_address: Stigg::V1::SubscriptionUpdateParams::BillingInformation::BillingAddress,
@@ -18,6 +18,7 @@ module Stigg
18
18
  ?addons: ::Array[Stigg::V1::SubscriptionUpdateParams::Addon],
19
19
  ?applied_coupon: Stigg::V1::SubscriptionUpdateParams::AppliedCoupon,
20
20
  ?await_payment_confirmation: bool,
21
+ ?billing_cycle_anchor: Stigg::Models::V1::SubscriptionUpdateParams::billing_cycle_anchor,
21
22
  ?billing_information: Stigg::V1::SubscriptionUpdateParams::BillingInformation,
22
23
  ?billing_period: Stigg::Models::V1::SubscriptionUpdateParams::billing_period,
23
24
  ?budget: Stigg::V1::SubscriptionUpdateParams::Budget?,
@@ -79,6 +80,7 @@ module Stigg
79
80
  ?applied_coupon: Stigg::V1::SubscriptionPreviewParams::AppliedCoupon,
80
81
  ?billable_features: ::Array[Stigg::V1::SubscriptionPreviewParams::BillableFeature],
81
82
  ?billing_country_code: String,
83
+ ?billing_cycle_anchor: Stigg::Models::V1::SubscriptionPreviewParams::billing_cycle_anchor,
82
84
  ?billing_information: Stigg::V1::SubscriptionPreviewParams::BillingInformation,
83
85
  ?billing_period: Stigg::Models::V1::SubscriptionPreviewParams::billing_period,
84
86
  ?charges: ::Array[Stigg::V1::SubscriptionPreviewParams::Charge],
@@ -99,6 +101,7 @@ module Stigg
99
101
  ?applied_coupon: Stigg::V1::SubscriptionProvisionParams::AppliedCoupon,
100
102
  ?await_payment_confirmation: bool,
101
103
  ?billing_country_code: String?,
104
+ ?billing_cycle_anchor: Stigg::Models::V1::SubscriptionProvisionParams::billing_cycle_anchor,
102
105
  ?billing_id: String?,
103
106
  ?billing_information: Stigg::V1::SubscriptionProvisionParams::BillingInformation,
104
107
  ?billing_period: Stigg::Models::V1::SubscriptionProvisionParams::billing_period,
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.alpha.11
4
+ version: 0.1.0.pre.alpha.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stigg