stigg 0.1.0.pre.alpha.1 → 0.1.0.pre.alpha.2
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 +14 -0
- data/README.md +29 -1
- data/lib/stigg/internal/my_cursor_id_page.rb +32 -4
- data/lib/stigg/models/v1/coupon_create_params.rb +2 -0
- data/lib/stigg/models/v1/coupon_create_response.rb +11 -6
- data/lib/stigg/models/v1/coupon_list_params.rb +14 -14
- data/lib/stigg/models/v1/coupon_list_response.rb +262 -278
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +11 -6
- data/lib/stigg/models/v1/customer_create_params.rb +2 -0
- data/lib/stigg/models/v1/customer_list_params.rb +14 -14
- data/lib/stigg/models/v1/customer_list_response.rb +160 -174
- data/lib/stigg/models/v1/customer_response.rb +8 -1
- data/lib/stigg/models/v1/customer_update_params.rb +2 -0
- data/lib/stigg/models/v1/customers/payment_method_attach_params.rb +3 -1
- data/lib/stigg/models/v1/subscription_create_params.rb +1485 -6
- data/lib/stigg/models/v1/subscription_create_response.rb +703 -4
- data/lib/stigg/models/v1/subscription_delegate_params.rb +7 -2
- data/lib/stigg/models/v1/subscription_delegate_response.rb +42 -2
- data/lib/stigg/models/v1/subscription_list_params.rb +20 -24
- data/lib/stigg/models/v1/subscription_list_response.rb +255 -236
- data/lib/stigg/models/v1/subscription_migrate_params.rb +3 -3
- data/lib/stigg/models/v1/subscription_migrate_response.rb +42 -2
- data/lib/stigg/models/v1/subscription_preview_params.rb +139 -46
- data/lib/stigg/models/v1/subscription_preview_response.rb +164 -49
- data/lib/stigg/models/v1/subscription_retrieve_response.rb +42 -2
- data/lib/stigg/models/v1/subscription_transfer_params.rb +2 -6
- data/lib/stigg/models/v1/subscription_transfer_response.rb +42 -2
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rb +2 -0
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +2 -0
- data/lib/stigg/models/v1_create_event_params.rb +2 -0
- data/lib/stigg/models/v1_create_event_response.rb +8 -1
- data/lib/stigg/models/v1_create_usage_params.rb +19 -3
- data/lib/stigg/models/v1_create_usage_response.rb +7 -1
- data/lib/stigg/resources/v1/coupons.rb +12 -10
- data/lib/stigg/resources/v1/customers/payment_method.rb +6 -5
- data/lib/stigg/resources/v1/customers/usage.rb +0 -41
- data/lib/stigg/resources/v1/customers.rb +20 -20
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +6 -4
- data/lib/stigg/resources/v1/subscriptions.rb +74 -49
- data/lib/stigg/resources/v1.rb +2 -2
- data/lib/stigg/version.rb +1 -1
- data/lib/stigg.rb +0 -7
- data/rbi/stigg/internal/my_cursor_id_page.rbi +27 -0
- data/rbi/stigg/models/v1/coupon_create_params.rbi +1 -0
- data/rbi/stigg/models/v1/coupon_create_response.rbi +11 -10
- data/rbi/stigg/models/v1/coupon_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/coupon_list_response.rbi +812 -869
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +11 -10
- data/rbi/stigg/models/v1/customer_create_params.rbi +1 -0
- data/rbi/stigg/models/v1/customer_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/customer_list_response.rbi +307 -347
- data/rbi/stigg/models/v1/customer_response.rbi +8 -1
- data/rbi/stigg/models/v1/customer_update_params.rbi +1 -0
- data/rbi/stigg/models/v1/customers/payment_method_attach_params.rbi +3 -0
- data/rbi/stigg/models/v1/subscription_create_params.rbi +4975 -84
- data/rbi/stigg/models/v1/subscription_create_response.rbi +2508 -1
- data/rbi/stigg/models/v1/subscription_delegate_params.rbi +6 -2
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscription_list_params.rbi +26 -28
- data/rbi/stigg/models/v1/subscription_list_response.rbi +460 -435
- data/rbi/stigg/models/v1/subscription_migrate_params.rbi +3 -3
- data/rbi/stigg/models/v1/subscription_migrate_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscription_preview_params.rbi +112 -14
- data/rbi/stigg/models/v1/subscription_preview_response.rbi +139 -6
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscription_transfer_params.rbi +2 -4
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +1 -0
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbi +1 -0
- data/rbi/stigg/models/v1_create_event_params.rbi +1 -0
- data/rbi/stigg/models/v1_create_event_response.rbi +8 -1
- data/rbi/stigg/models/v1_create_usage_params.rbi +44 -4
- data/rbi/stigg/models/v1_create_usage_response.rbi +8 -1
- data/rbi/stigg/resources/v1/coupons.rbi +20 -12
- data/rbi/stigg/resources/v1/customers/payment_method.rbi +9 -3
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -29
- data/rbi/stigg/resources/v1/customers.rbi +34 -20
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +12 -4
- data/rbi/stigg/resources/v1/subscriptions.rbi +102 -23
- data/rbi/stigg/resources/v1.rbi +2 -2
- data/sig/stigg/internal/my_cursor_id_page.rbs +17 -0
- data/sig/stigg/models/v1/coupon_create_response.rbs +4 -4
- data/sig/stigg/models/v1/coupon_list_params.rbs +11 -11
- data/sig/stigg/models/v1/coupon_list_response.rbs +331 -351
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +4 -4
- data/sig/stigg/models/v1/customer_list_params.rbs +11 -11
- data/sig/stigg/models/v1/customer_list_response.rbs +133 -153
- data/sig/stigg/models/v1/subscription_create_params.rbs +2029 -5
- data/sig/stigg/models/v1/subscription_create_response.rbs +1022 -0
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +31 -0
- data/sig/stigg/models/v1/subscription_list_params.rbs +14 -14
- data/sig/stigg/models/v1/subscription_list_response.rbs +196 -189
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +31 -0
- data/sig/stigg/models/v1/subscription_preview_params.rbs +2 -6
- data/sig/stigg/models/v1/subscription_retrieve_response.rbs +31 -0
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +31 -0
- data/sig/stigg/models/v1_create_usage_params.rbs +15 -5
- data/sig/stigg/resources/v1/coupons.rbs +3 -3
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -10
- data/sig/stigg/resources/v1/customers.rbs +3 -5
- data/sig/stigg/resources/v1/subscriptions.rbs +19 -4
- metadata +2 -23
- data/lib/stigg/models/v1/customers/promotional_create_params.rb +0 -294
- data/lib/stigg/models/v1/customers/promotional_create_response.rb +0 -268
- data/lib/stigg/models/v1/customers/promotional_revoke_params.rb +0 -24
- data/lib/stigg/models/v1/customers/promotional_revoke_response.rb +0 -268
- data/lib/stigg/models/v1/customers/usage_retrieve_params.rb +0 -56
- data/lib/stigg/models/v1/customers/usage_retrieve_response.rb +0 -145
- data/lib/stigg/resources/v1/customers/promotional.rb +0 -69
- data/rbi/stigg/models/v1/customers/promotional_create_params.rbi +0 -639
- data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +0 -495
- data/rbi/stigg/models/v1/customers/promotional_revoke_params.rbi +0 -42
- data/rbi/stigg/models/v1/customers/promotional_revoke_response.rbi +0 -497
- data/rbi/stigg/models/v1/customers/usage_retrieve_params.rbi +0 -84
- data/rbi/stigg/models/v1/customers/usage_retrieve_response.rbi +0 -353
- data/rbi/stigg/resources/v1/customers/promotional.rbi +0 -53
- data/sig/stigg/models/v1/customers/promotional_create_params.rbs +0 -234
- data/sig/stigg/models/v1/customers/promotional_create_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/promotional_revoke_params.rbs +0 -27
- data/sig/stigg/models/v1/customers/promotional_revoke_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/usage_retrieve_params.rbs +0 -54
- data/sig/stigg/models/v1/customers/usage_retrieve_response.rbs +0 -134
- data/sig/stigg/resources/v1/customers/promotional.rbs +0 -23
|
@@ -23,6 +23,7 @@ module Stigg
|
|
|
23
23
|
sig { returns(String) }
|
|
24
24
|
attr_accessor :plan_id
|
|
25
25
|
|
|
26
|
+
# Addons to include
|
|
26
27
|
sig do
|
|
27
28
|
returns(
|
|
28
29
|
T.nilable(T::Array[Stigg::V1::SubscriptionPreviewParams::Addon])
|
|
@@ -38,6 +39,7 @@ module Stigg
|
|
|
38
39
|
end
|
|
39
40
|
attr_writer :addons
|
|
40
41
|
|
|
42
|
+
# Coupon or discount to apply
|
|
41
43
|
sig do
|
|
42
44
|
returns(
|
|
43
45
|
T.nilable(Stigg::V1::SubscriptionPreviewParams::AppliedCoupon)
|
|
@@ -53,6 +55,7 @@ module Stigg
|
|
|
53
55
|
end
|
|
54
56
|
attr_writer :applied_coupon
|
|
55
57
|
|
|
58
|
+
# Billable features with quantities
|
|
56
59
|
sig do
|
|
57
60
|
returns(
|
|
58
61
|
T.nilable(
|
|
@@ -72,12 +75,14 @@ module Stigg
|
|
|
72
75
|
end
|
|
73
76
|
attr_writer :billable_features
|
|
74
77
|
|
|
78
|
+
# ISO 3166-1 country code for localization
|
|
75
79
|
sig { returns(T.nilable(String)) }
|
|
76
80
|
attr_reader :billing_country_code
|
|
77
81
|
|
|
78
82
|
sig { params(billing_country_code: String).void }
|
|
79
83
|
attr_writer :billing_country_code
|
|
80
84
|
|
|
85
|
+
# Billing and tax configuration
|
|
81
86
|
sig do
|
|
82
87
|
returns(
|
|
83
88
|
T.nilable(Stigg::V1::SubscriptionPreviewParams::BillingInformation)
|
|
@@ -93,6 +98,7 @@ module Stigg
|
|
|
93
98
|
end
|
|
94
99
|
attr_writer :billing_information
|
|
95
100
|
|
|
101
|
+
# Billing period (MONTHLY or ANNUALLY)
|
|
96
102
|
sig do
|
|
97
103
|
returns(
|
|
98
104
|
T.nilable(
|
|
@@ -110,6 +116,7 @@ module Stigg
|
|
|
110
116
|
end
|
|
111
117
|
attr_writer :billing_period
|
|
112
118
|
|
|
119
|
+
# One-time or recurring charges
|
|
113
120
|
sig do
|
|
114
121
|
returns(
|
|
115
122
|
T.nilable(T::Array[Stigg::V1::SubscriptionPreviewParams::Charge])
|
|
@@ -125,18 +132,21 @@ module Stigg
|
|
|
125
132
|
end
|
|
126
133
|
attr_writer :charges
|
|
127
134
|
|
|
135
|
+
# Paying customer ID for delegated billing
|
|
128
136
|
sig { returns(T.nilable(String)) }
|
|
129
137
|
attr_reader :paying_customer_id
|
|
130
138
|
|
|
131
139
|
sig { params(paying_customer_id: String).void }
|
|
132
140
|
attr_writer :paying_customer_id
|
|
133
141
|
|
|
142
|
+
# Resource ID for multi-instance subscriptions
|
|
134
143
|
sig { returns(T.nilable(String)) }
|
|
135
144
|
attr_reader :resource_id
|
|
136
145
|
|
|
137
146
|
sig { params(resource_id: String).void }
|
|
138
147
|
attr_writer :resource_id
|
|
139
148
|
|
|
149
|
+
# When to apply subscription changes
|
|
140
150
|
sig do
|
|
141
151
|
returns(
|
|
142
152
|
T.nilable(
|
|
@@ -161,6 +171,7 @@ module Stigg
|
|
|
161
171
|
sig { params(start_date: Time).void }
|
|
162
172
|
attr_writer :start_date
|
|
163
173
|
|
|
174
|
+
# Trial period override settings
|
|
164
175
|
sig do
|
|
165
176
|
returns(
|
|
166
177
|
T.nilable(
|
|
@@ -178,6 +189,7 @@ module Stigg
|
|
|
178
189
|
end
|
|
179
190
|
attr_writer :trial_override_configuration
|
|
180
191
|
|
|
192
|
+
# Unit quantity for per-unit pricing
|
|
181
193
|
sig { returns(T.nilable(Float)) }
|
|
182
194
|
attr_reader :unit_quantity
|
|
183
195
|
|
|
@@ -219,19 +231,31 @@ module Stigg
|
|
|
219
231
|
customer_id:,
|
|
220
232
|
# Plan ID
|
|
221
233
|
plan_id:,
|
|
234
|
+
# Addons to include
|
|
222
235
|
addons: nil,
|
|
236
|
+
# Coupon or discount to apply
|
|
223
237
|
applied_coupon: nil,
|
|
238
|
+
# Billable features with quantities
|
|
224
239
|
billable_features: nil,
|
|
240
|
+
# ISO 3166-1 country code for localization
|
|
225
241
|
billing_country_code: nil,
|
|
242
|
+
# Billing and tax configuration
|
|
226
243
|
billing_information: nil,
|
|
244
|
+
# Billing period (MONTHLY or ANNUALLY)
|
|
227
245
|
billing_period: nil,
|
|
246
|
+
# One-time or recurring charges
|
|
228
247
|
charges: nil,
|
|
248
|
+
# Paying customer ID for delegated billing
|
|
229
249
|
paying_customer_id: nil,
|
|
250
|
+
# Resource ID for multi-instance subscriptions
|
|
230
251
|
resource_id: nil,
|
|
252
|
+
# When to apply subscription changes
|
|
231
253
|
schedule_strategy: nil,
|
|
232
254
|
# Subscription start date
|
|
233
255
|
start_date: nil,
|
|
256
|
+
# Trial period override settings
|
|
234
257
|
trial_override_configuration: nil,
|
|
258
|
+
# Unit quantity for per-unit pricing
|
|
235
259
|
unit_quantity: nil,
|
|
236
260
|
request_options: {}
|
|
237
261
|
)
|
|
@@ -281,12 +305,14 @@ module Stigg
|
|
|
281
305
|
sig { returns(String) }
|
|
282
306
|
attr_accessor :addon_id
|
|
283
307
|
|
|
308
|
+
# Number of addon instances
|
|
284
309
|
sig { returns(T.nilable(Integer)) }
|
|
285
310
|
attr_reader :quantity
|
|
286
311
|
|
|
287
312
|
sig { params(quantity: Integer).void }
|
|
288
313
|
attr_writer :quantity
|
|
289
314
|
|
|
315
|
+
# Addon configuration
|
|
290
316
|
sig do
|
|
291
317
|
params(addon_id: String, quantity: Integer).returns(
|
|
292
318
|
T.attached_class
|
|
@@ -295,6 +321,7 @@ module Stigg
|
|
|
295
321
|
def self.new(
|
|
296
322
|
# Addon ID
|
|
297
323
|
addon_id:,
|
|
324
|
+
# Number of addon instances
|
|
298
325
|
quantity: nil
|
|
299
326
|
)
|
|
300
327
|
end
|
|
@@ -313,12 +340,14 @@ module Stigg
|
|
|
313
340
|
)
|
|
314
341
|
end
|
|
315
342
|
|
|
343
|
+
# Billing provider coupon ID
|
|
316
344
|
sig { returns(T.nilable(String)) }
|
|
317
345
|
attr_reader :billing_coupon_id
|
|
318
346
|
|
|
319
347
|
sig { params(billing_coupon_id: String).void }
|
|
320
348
|
attr_writer :billing_coupon_id
|
|
321
349
|
|
|
350
|
+
# Coupon timing configuration
|
|
322
351
|
sig do
|
|
323
352
|
returns(
|
|
324
353
|
T.nilable(
|
|
@@ -336,12 +365,14 @@ module Stigg
|
|
|
336
365
|
end
|
|
337
366
|
attr_writer :configuration
|
|
338
367
|
|
|
368
|
+
# Stigg coupon ID
|
|
339
369
|
sig { returns(T.nilable(String)) }
|
|
340
370
|
attr_reader :coupon_id
|
|
341
371
|
|
|
342
372
|
sig { params(coupon_id: String).void }
|
|
343
373
|
attr_writer :coupon_id
|
|
344
374
|
|
|
375
|
+
# Ad-hoc discount configuration
|
|
345
376
|
sig do
|
|
346
377
|
returns(
|
|
347
378
|
T.nilable(
|
|
@@ -359,12 +390,14 @@ module Stigg
|
|
|
359
390
|
end
|
|
360
391
|
attr_writer :discount
|
|
361
392
|
|
|
393
|
+
# Promotion code to apply
|
|
362
394
|
sig { returns(T.nilable(String)) }
|
|
363
395
|
attr_reader :promotion_code
|
|
364
396
|
|
|
365
397
|
sig { params(promotion_code: String).void }
|
|
366
398
|
attr_writer :promotion_code
|
|
367
399
|
|
|
400
|
+
# Coupon or discount to apply
|
|
368
401
|
sig do
|
|
369
402
|
params(
|
|
370
403
|
billing_coupon_id: String,
|
|
@@ -377,10 +410,15 @@ module Stigg
|
|
|
377
410
|
).returns(T.attached_class)
|
|
378
411
|
end
|
|
379
412
|
def self.new(
|
|
413
|
+
# Billing provider coupon ID
|
|
380
414
|
billing_coupon_id: nil,
|
|
415
|
+
# Coupon timing configuration
|
|
381
416
|
configuration: nil,
|
|
417
|
+
# Stigg coupon ID
|
|
382
418
|
coupon_id: nil,
|
|
419
|
+
# Ad-hoc discount configuration
|
|
383
420
|
discount: nil,
|
|
421
|
+
# Promotion code to apply
|
|
384
422
|
promotion_code: nil
|
|
385
423
|
)
|
|
386
424
|
end
|
|
@@ -417,6 +455,7 @@ module Stigg
|
|
|
417
455
|
sig { params(start_date: Time).void }
|
|
418
456
|
attr_writer :start_date
|
|
419
457
|
|
|
458
|
+
# Coupon timing configuration
|
|
420
459
|
sig { params(start_date: Time).returns(T.attached_class) }
|
|
421
460
|
def self.new(
|
|
422
461
|
# Coupon start date
|
|
@@ -438,6 +477,7 @@ module Stigg
|
|
|
438
477
|
)
|
|
439
478
|
end
|
|
440
479
|
|
|
480
|
+
# Fixed amounts off by currency
|
|
441
481
|
sig do
|
|
442
482
|
returns(
|
|
443
483
|
T.nilable(
|
|
@@ -449,30 +489,35 @@ module Stigg
|
|
|
449
489
|
end
|
|
450
490
|
attr_accessor :amounts_off
|
|
451
491
|
|
|
492
|
+
# Ad-hoc discount
|
|
452
493
|
sig { returns(T.nilable(String)) }
|
|
453
494
|
attr_reader :description
|
|
454
495
|
|
|
455
496
|
sig { params(description: String).void }
|
|
456
497
|
attr_writer :description
|
|
457
498
|
|
|
499
|
+
# Duration in months
|
|
458
500
|
sig { returns(T.nilable(Float)) }
|
|
459
501
|
attr_reader :duration_in_months
|
|
460
502
|
|
|
461
503
|
sig { params(duration_in_months: Float).void }
|
|
462
504
|
attr_writer :duration_in_months
|
|
463
505
|
|
|
506
|
+
# Discount name
|
|
464
507
|
sig { returns(T.nilable(String)) }
|
|
465
508
|
attr_reader :name
|
|
466
509
|
|
|
467
510
|
sig { params(name: String).void }
|
|
468
511
|
attr_writer :name
|
|
469
512
|
|
|
513
|
+
# Percentage discount
|
|
470
514
|
sig { returns(T.nilable(Float)) }
|
|
471
515
|
attr_reader :percent_off
|
|
472
516
|
|
|
473
517
|
sig { params(percent_off: Float).void }
|
|
474
518
|
attr_writer :percent_off
|
|
475
519
|
|
|
520
|
+
# Ad-hoc discount configuration
|
|
476
521
|
sig do
|
|
477
522
|
params(
|
|
478
523
|
amounts_off:
|
|
@@ -488,10 +533,15 @@ module Stigg
|
|
|
488
533
|
).returns(T.attached_class)
|
|
489
534
|
end
|
|
490
535
|
def self.new(
|
|
536
|
+
# Fixed amounts off by currency
|
|
491
537
|
amounts_off: nil,
|
|
538
|
+
# Ad-hoc discount
|
|
492
539
|
description: nil,
|
|
540
|
+
# Duration in months
|
|
493
541
|
duration_in_months: nil,
|
|
542
|
+
# Discount name
|
|
494
543
|
name: nil,
|
|
544
|
+
# Percentage discount
|
|
495
545
|
percent_off: nil
|
|
496
546
|
)
|
|
497
547
|
end
|
|
@@ -524,25 +574,17 @@ module Stigg
|
|
|
524
574
|
)
|
|
525
575
|
end
|
|
526
576
|
|
|
577
|
+
# The price amount
|
|
527
578
|
sig { returns(Float) }
|
|
528
579
|
attr_accessor :amount
|
|
529
580
|
|
|
581
|
+
# The price currency
|
|
530
582
|
sig do
|
|
531
583
|
returns(
|
|
532
|
-
|
|
533
|
-
Stigg::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::Currency::OrSymbol
|
|
534
|
-
)
|
|
584
|
+
Stigg::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::Currency::OrSymbol
|
|
535
585
|
)
|
|
536
586
|
end
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
sig do
|
|
540
|
-
params(
|
|
541
|
-
currency:
|
|
542
|
-
Stigg::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::Currency::OrSymbol
|
|
543
|
-
).void
|
|
544
|
-
end
|
|
545
|
-
attr_writer :currency
|
|
587
|
+
attr_accessor :currency
|
|
546
588
|
|
|
547
589
|
sig do
|
|
548
590
|
params(
|
|
@@ -551,7 +593,12 @@ module Stigg
|
|
|
551
593
|
Stigg::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::Currency::OrSymbol
|
|
552
594
|
).returns(T.attached_class)
|
|
553
595
|
end
|
|
554
|
-
def self.new(
|
|
596
|
+
def self.new(
|
|
597
|
+
# The price amount
|
|
598
|
+
amount:,
|
|
599
|
+
# The price currency
|
|
600
|
+
currency:
|
|
601
|
+
)
|
|
555
602
|
end
|
|
556
603
|
|
|
557
604
|
sig do
|
|
@@ -566,6 +613,7 @@ module Stigg
|
|
|
566
613
|
def to_hash
|
|
567
614
|
end
|
|
568
615
|
|
|
616
|
+
# The price currency
|
|
569
617
|
module Currency
|
|
570
618
|
extend Stigg::Internal::Type::Enum
|
|
571
619
|
|
|
@@ -1186,9 +1234,11 @@ module Stigg
|
|
|
1186
1234
|
sig { returns(String) }
|
|
1187
1235
|
attr_accessor :feature_id
|
|
1188
1236
|
|
|
1237
|
+
# Quantity of feature units
|
|
1189
1238
|
sig { returns(Float) }
|
|
1190
1239
|
attr_accessor :quantity
|
|
1191
1240
|
|
|
1241
|
+
# Feature with quantity
|
|
1192
1242
|
sig do
|
|
1193
1243
|
params(feature_id: String, quantity: Float).returns(
|
|
1194
1244
|
T.attached_class
|
|
@@ -1197,6 +1247,7 @@ module Stigg
|
|
|
1197
1247
|
def self.new(
|
|
1198
1248
|
# Feature ID
|
|
1199
1249
|
feature_id:,
|
|
1250
|
+
# Quantity of feature units
|
|
1200
1251
|
quantity:
|
|
1201
1252
|
)
|
|
1202
1253
|
end
|
|
@@ -1215,6 +1266,7 @@ module Stigg
|
|
|
1215
1266
|
)
|
|
1216
1267
|
end
|
|
1217
1268
|
|
|
1269
|
+
# Billing address
|
|
1218
1270
|
sig do
|
|
1219
1271
|
returns(
|
|
1220
1272
|
T.nilable(
|
|
@@ -1232,42 +1284,49 @@ module Stigg
|
|
|
1232
1284
|
end
|
|
1233
1285
|
attr_writer :billing_address
|
|
1234
1286
|
|
|
1287
|
+
# Connected account ID for platform billing
|
|
1235
1288
|
sig { returns(T.nilable(String)) }
|
|
1236
1289
|
attr_reader :charge_on_behalf_of_account
|
|
1237
1290
|
|
|
1238
1291
|
sig { params(charge_on_behalf_of_account: String).void }
|
|
1239
1292
|
attr_writer :charge_on_behalf_of_account
|
|
1240
1293
|
|
|
1294
|
+
# Billing integration ID
|
|
1241
1295
|
sig { returns(T.nilable(String)) }
|
|
1242
1296
|
attr_reader :integration_id
|
|
1243
1297
|
|
|
1244
1298
|
sig { params(integration_id: String).void }
|
|
1245
1299
|
attr_writer :integration_id
|
|
1246
1300
|
|
|
1301
|
+
# Days until invoice is due
|
|
1247
1302
|
sig { returns(T.nilable(Float)) }
|
|
1248
1303
|
attr_reader :invoice_days_until_due
|
|
1249
1304
|
|
|
1250
1305
|
sig { params(invoice_days_until_due: Float).void }
|
|
1251
1306
|
attr_writer :invoice_days_until_due
|
|
1252
1307
|
|
|
1308
|
+
# Whether subscription is backdated
|
|
1253
1309
|
sig { returns(T.nilable(T::Boolean)) }
|
|
1254
1310
|
attr_reader :is_backdated
|
|
1255
1311
|
|
|
1256
1312
|
sig { params(is_backdated: T::Boolean).void }
|
|
1257
1313
|
attr_writer :is_backdated
|
|
1258
1314
|
|
|
1315
|
+
# Whether invoice is already paid
|
|
1259
1316
|
sig { returns(T.nilable(T::Boolean)) }
|
|
1260
1317
|
attr_reader :is_invoice_paid
|
|
1261
1318
|
|
|
1262
1319
|
sig { params(is_invoice_paid: T::Boolean).void }
|
|
1263
1320
|
attr_writer :is_invoice_paid
|
|
1264
1321
|
|
|
1322
|
+
# Additional billing metadata
|
|
1265
1323
|
sig { returns(T.nilable(T.anything)) }
|
|
1266
1324
|
attr_reader :metadata
|
|
1267
1325
|
|
|
1268
1326
|
sig { params(metadata: T.anything).void }
|
|
1269
1327
|
attr_writer :metadata
|
|
1270
1328
|
|
|
1329
|
+
# Proration behavior
|
|
1271
1330
|
sig do
|
|
1272
1331
|
returns(
|
|
1273
1332
|
T.nilable(
|
|
@@ -1285,6 +1344,7 @@ module Stigg
|
|
|
1285
1344
|
end
|
|
1286
1345
|
attr_writer :proration_behavior
|
|
1287
1346
|
|
|
1347
|
+
# Customer tax IDs
|
|
1288
1348
|
sig do
|
|
1289
1349
|
returns(
|
|
1290
1350
|
T.nilable(
|
|
@@ -1306,18 +1366,21 @@ module Stigg
|
|
|
1306
1366
|
end
|
|
1307
1367
|
attr_writer :tax_ids
|
|
1308
1368
|
|
|
1369
|
+
# Tax percentage to apply
|
|
1309
1370
|
sig { returns(T.nilable(Float)) }
|
|
1310
1371
|
attr_reader :tax_percentage
|
|
1311
1372
|
|
|
1312
1373
|
sig { params(tax_percentage: Float).void }
|
|
1313
1374
|
attr_writer :tax_percentage
|
|
1314
1375
|
|
|
1376
|
+
# Tax rate IDs from billing provider
|
|
1315
1377
|
sig { returns(T.nilable(T::Array[String])) }
|
|
1316
1378
|
attr_reader :tax_rate_ids
|
|
1317
1379
|
|
|
1318
1380
|
sig { params(tax_rate_ids: T::Array[String]).void }
|
|
1319
1381
|
attr_writer :tax_rate_ids
|
|
1320
1382
|
|
|
1383
|
+
# Billing and tax configuration
|
|
1321
1384
|
sig do
|
|
1322
1385
|
params(
|
|
1323
1386
|
billing_address:
|
|
@@ -1339,16 +1402,27 @@ module Stigg
|
|
|
1339
1402
|
).returns(T.attached_class)
|
|
1340
1403
|
end
|
|
1341
1404
|
def self.new(
|
|
1405
|
+
# Billing address
|
|
1342
1406
|
billing_address: nil,
|
|
1407
|
+
# Connected account ID for platform billing
|
|
1343
1408
|
charge_on_behalf_of_account: nil,
|
|
1409
|
+
# Billing integration ID
|
|
1344
1410
|
integration_id: nil,
|
|
1411
|
+
# Days until invoice is due
|
|
1345
1412
|
invoice_days_until_due: nil,
|
|
1413
|
+
# Whether subscription is backdated
|
|
1346
1414
|
is_backdated: nil,
|
|
1415
|
+
# Whether invoice is already paid
|
|
1347
1416
|
is_invoice_paid: nil,
|
|
1417
|
+
# Additional billing metadata
|
|
1348
1418
|
metadata: nil,
|
|
1419
|
+
# Proration behavior
|
|
1349
1420
|
proration_behavior: nil,
|
|
1421
|
+
# Customer tax IDs
|
|
1350
1422
|
tax_ids: nil,
|
|
1423
|
+
# Tax percentage to apply
|
|
1351
1424
|
tax_percentage: nil,
|
|
1425
|
+
# Tax rate IDs from billing provider
|
|
1352
1426
|
tax_rate_ids: nil
|
|
1353
1427
|
)
|
|
1354
1428
|
end
|
|
@@ -1423,6 +1497,7 @@ module Stigg
|
|
|
1423
1497
|
sig { params(state: String).void }
|
|
1424
1498
|
attr_writer :state
|
|
1425
1499
|
|
|
1500
|
+
# Billing address
|
|
1426
1501
|
sig do
|
|
1427
1502
|
params(
|
|
1428
1503
|
city: String,
|
|
@@ -1459,6 +1534,7 @@ module Stigg
|
|
|
1459
1534
|
end
|
|
1460
1535
|
end
|
|
1461
1536
|
|
|
1537
|
+
# Proration behavior
|
|
1462
1538
|
module ProrationBehavior
|
|
1463
1539
|
extend Stigg::Internal::Type::Enum
|
|
1464
1540
|
|
|
@@ -1507,16 +1583,24 @@ module Stigg
|
|
|
1507
1583
|
)
|
|
1508
1584
|
end
|
|
1509
1585
|
|
|
1586
|
+
# Tax exemption type (e.g., vat, gst)
|
|
1510
1587
|
sig { returns(String) }
|
|
1511
1588
|
attr_accessor :type
|
|
1512
1589
|
|
|
1590
|
+
# Tax exemption identifier value
|
|
1513
1591
|
sig { returns(String) }
|
|
1514
1592
|
attr_accessor :value
|
|
1515
1593
|
|
|
1594
|
+
# Tax exemption identifier
|
|
1516
1595
|
sig do
|
|
1517
1596
|
params(type: String, value: String).returns(T.attached_class)
|
|
1518
1597
|
end
|
|
1519
|
-
def self.new(
|
|
1598
|
+
def self.new(
|
|
1599
|
+
# Tax exemption type (e.g., vat, gst)
|
|
1600
|
+
type:,
|
|
1601
|
+
# Tax exemption identifier value
|
|
1602
|
+
value:
|
|
1603
|
+
)
|
|
1520
1604
|
end
|
|
1521
1605
|
|
|
1522
1606
|
sig { override.returns({ type: String, value: String }) }
|
|
@@ -1525,6 +1609,7 @@ module Stigg
|
|
|
1525
1609
|
end
|
|
1526
1610
|
end
|
|
1527
1611
|
|
|
1612
|
+
# Billing period (MONTHLY or ANNUALLY)
|
|
1528
1613
|
module BillingPeriod
|
|
1529
1614
|
extend Stigg::Internal::Type::Enum
|
|
1530
1615
|
|
|
@@ -1569,9 +1654,11 @@ module Stigg
|
|
|
1569
1654
|
sig { returns(String) }
|
|
1570
1655
|
attr_accessor :id
|
|
1571
1656
|
|
|
1657
|
+
# Charge quantity
|
|
1572
1658
|
sig { returns(Float) }
|
|
1573
1659
|
attr_accessor :quantity
|
|
1574
1660
|
|
|
1661
|
+
# Charge type
|
|
1575
1662
|
sig do
|
|
1576
1663
|
returns(
|
|
1577
1664
|
Stigg::V1::SubscriptionPreviewParams::Charge::Type::OrSymbol
|
|
@@ -1579,6 +1666,7 @@ module Stigg
|
|
|
1579
1666
|
end
|
|
1580
1667
|
attr_accessor :type
|
|
1581
1668
|
|
|
1669
|
+
# Charge item
|
|
1582
1670
|
sig do
|
|
1583
1671
|
params(
|
|
1584
1672
|
id: String,
|
|
@@ -1589,7 +1677,9 @@ module Stigg
|
|
|
1589
1677
|
def self.new(
|
|
1590
1678
|
# Charge ID
|
|
1591
1679
|
id:,
|
|
1680
|
+
# Charge quantity
|
|
1592
1681
|
quantity:,
|
|
1682
|
+
# Charge type
|
|
1593
1683
|
type:
|
|
1594
1684
|
)
|
|
1595
1685
|
end
|
|
@@ -1607,6 +1697,7 @@ module Stigg
|
|
|
1607
1697
|
def to_hash
|
|
1608
1698
|
end
|
|
1609
1699
|
|
|
1700
|
+
# Charge type
|
|
1610
1701
|
module Type
|
|
1611
1702
|
extend Stigg::Internal::Type::Enum
|
|
1612
1703
|
|
|
@@ -1642,6 +1733,7 @@ module Stigg
|
|
|
1642
1733
|
end
|
|
1643
1734
|
end
|
|
1644
1735
|
|
|
1736
|
+
# When to apply subscription changes
|
|
1645
1737
|
module ScheduleStrategy
|
|
1646
1738
|
extend Stigg::Internal::Type::Enum
|
|
1647
1739
|
|
|
@@ -1690,9 +1782,11 @@ module Stigg
|
|
|
1690
1782
|
)
|
|
1691
1783
|
end
|
|
1692
1784
|
|
|
1785
|
+
# Whether to start as trial
|
|
1693
1786
|
sig { returns(T::Boolean) }
|
|
1694
1787
|
attr_accessor :is_trial
|
|
1695
1788
|
|
|
1789
|
+
# Behavior when trial ends
|
|
1696
1790
|
sig do
|
|
1697
1791
|
returns(
|
|
1698
1792
|
T.nilable(
|
|
@@ -1717,6 +1811,7 @@ module Stigg
|
|
|
1717
1811
|
sig { params(trial_end_date: Time).void }
|
|
1718
1812
|
attr_writer :trial_end_date
|
|
1719
1813
|
|
|
1814
|
+
# Trial period override settings
|
|
1720
1815
|
sig do
|
|
1721
1816
|
params(
|
|
1722
1817
|
is_trial: T::Boolean,
|
|
@@ -1726,7 +1821,9 @@ module Stigg
|
|
|
1726
1821
|
).returns(T.attached_class)
|
|
1727
1822
|
end
|
|
1728
1823
|
def self.new(
|
|
1824
|
+
# Whether to start as trial
|
|
1729
1825
|
is_trial:,
|
|
1826
|
+
# Behavior when trial ends
|
|
1730
1827
|
trial_end_behavior: nil,
|
|
1731
1828
|
# Trial end date
|
|
1732
1829
|
trial_end_date: nil
|
|
@@ -1746,6 +1843,7 @@ module Stigg
|
|
|
1746
1843
|
def to_hash
|
|
1747
1844
|
end
|
|
1748
1845
|
|
|
1846
|
+
# Behavior when trial ends
|
|
1749
1847
|
module TrialEndBehavior
|
|
1750
1848
|
extend Stigg::Internal::Type::Enum
|
|
1751
1849
|
|