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
|
@@ -21,11 +21,13 @@ module Stigg
|
|
|
21
21
|
required :plan_id, String, api_name: :planId
|
|
22
22
|
|
|
23
23
|
# @!attribute addons
|
|
24
|
+
# Addons to include
|
|
24
25
|
#
|
|
25
26
|
# @return [Array<Stigg::Models::V1::SubscriptionPreviewParams::Addon>, nil]
|
|
26
27
|
optional :addons, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionPreviewParams::Addon] }
|
|
27
28
|
|
|
28
29
|
# @!attribute applied_coupon
|
|
30
|
+
# Coupon or discount to apply
|
|
29
31
|
#
|
|
30
32
|
# @return [Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon, nil]
|
|
31
33
|
optional :applied_coupon,
|
|
@@ -33,6 +35,7 @@ module Stigg
|
|
|
33
35
|
api_name: :appliedCoupon
|
|
34
36
|
|
|
35
37
|
# @!attribute billable_features
|
|
38
|
+
# Billable features with quantities
|
|
36
39
|
#
|
|
37
40
|
# @return [Array<Stigg::Models::V1::SubscriptionPreviewParams::BillableFeature>, nil]
|
|
38
41
|
optional :billable_features,
|
|
@@ -40,11 +43,13 @@ module Stigg
|
|
|
40
43
|
api_name: :billableFeatures
|
|
41
44
|
|
|
42
45
|
# @!attribute billing_country_code
|
|
46
|
+
# ISO 3166-1 country code for localization
|
|
43
47
|
#
|
|
44
48
|
# @return [String, nil]
|
|
45
49
|
optional :billing_country_code, String, api_name: :billingCountryCode
|
|
46
50
|
|
|
47
51
|
# @!attribute billing_information
|
|
52
|
+
# Billing and tax configuration
|
|
48
53
|
#
|
|
49
54
|
# @return [Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation, nil]
|
|
50
55
|
optional :billing_information,
|
|
@@ -52,6 +57,7 @@ module Stigg
|
|
|
52
57
|
api_name: :billingInformation
|
|
53
58
|
|
|
54
59
|
# @!attribute billing_period
|
|
60
|
+
# Billing period (MONTHLY or ANNUALLY)
|
|
55
61
|
#
|
|
56
62
|
# @return [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingPeriod, nil]
|
|
57
63
|
optional :billing_period,
|
|
@@ -59,21 +65,25 @@ module Stigg
|
|
|
59
65
|
api_name: :billingPeriod
|
|
60
66
|
|
|
61
67
|
# @!attribute charges
|
|
68
|
+
# One-time or recurring charges
|
|
62
69
|
#
|
|
63
70
|
# @return [Array<Stigg::Models::V1::SubscriptionPreviewParams::Charge>, nil]
|
|
64
71
|
optional :charges, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionPreviewParams::Charge] }
|
|
65
72
|
|
|
66
73
|
# @!attribute paying_customer_id
|
|
74
|
+
# Paying customer ID for delegated billing
|
|
67
75
|
#
|
|
68
76
|
# @return [String, nil]
|
|
69
77
|
optional :paying_customer_id, String, api_name: :payingCustomerId
|
|
70
78
|
|
|
71
79
|
# @!attribute resource_id
|
|
80
|
+
# Resource ID for multi-instance subscriptions
|
|
72
81
|
#
|
|
73
82
|
# @return [String, nil]
|
|
74
83
|
optional :resource_id, String, api_name: :resourceId
|
|
75
84
|
|
|
76
85
|
# @!attribute schedule_strategy
|
|
86
|
+
# When to apply subscription changes
|
|
77
87
|
#
|
|
78
88
|
# @return [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::ScheduleStrategy, nil]
|
|
79
89
|
optional :schedule_strategy,
|
|
@@ -87,6 +97,7 @@ module Stigg
|
|
|
87
97
|
optional :start_date, Time, api_name: :startDate
|
|
88
98
|
|
|
89
99
|
# @!attribute trial_override_configuration
|
|
100
|
+
# Trial period override settings
|
|
90
101
|
#
|
|
91
102
|
# @return [Stigg::Models::V1::SubscriptionPreviewParams::TrialOverrideConfiguration, nil]
|
|
92
103
|
optional :trial_override_configuration,
|
|
@@ -94,6 +105,7 @@ module Stigg
|
|
|
94
105
|
api_name: :trialOverrideConfiguration
|
|
95
106
|
|
|
96
107
|
# @!attribute unit_quantity
|
|
108
|
+
# Unit quantity for per-unit pricing
|
|
97
109
|
#
|
|
98
110
|
# @return [Float, nil]
|
|
99
111
|
optional :unit_quantity, Float, api_name: :unitQuantity
|
|
@@ -103,31 +115,31 @@ module Stigg
|
|
|
103
115
|
#
|
|
104
116
|
# @param plan_id [String] Plan ID
|
|
105
117
|
#
|
|
106
|
-
# @param addons [Array<Stigg::Models::V1::SubscriptionPreviewParams::Addon>]
|
|
118
|
+
# @param addons [Array<Stigg::Models::V1::SubscriptionPreviewParams::Addon>] Addons to include
|
|
107
119
|
#
|
|
108
|
-
# @param applied_coupon [Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon]
|
|
120
|
+
# @param applied_coupon [Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon] Coupon or discount to apply
|
|
109
121
|
#
|
|
110
|
-
# @param billable_features [Array<Stigg::Models::V1::SubscriptionPreviewParams::BillableFeature>]
|
|
122
|
+
# @param billable_features [Array<Stigg::Models::V1::SubscriptionPreviewParams::BillableFeature>] Billable features with quantities
|
|
111
123
|
#
|
|
112
|
-
# @param billing_country_code [String]
|
|
124
|
+
# @param billing_country_code [String] ISO 3166-1 country code for localization
|
|
113
125
|
#
|
|
114
|
-
# @param billing_information [Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation]
|
|
126
|
+
# @param billing_information [Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation] Billing and tax configuration
|
|
115
127
|
#
|
|
116
|
-
# @param billing_period [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingPeriod]
|
|
128
|
+
# @param billing_period [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingPeriod] Billing period (MONTHLY or ANNUALLY)
|
|
117
129
|
#
|
|
118
|
-
# @param charges [Array<Stigg::Models::V1::SubscriptionPreviewParams::Charge>]
|
|
130
|
+
# @param charges [Array<Stigg::Models::V1::SubscriptionPreviewParams::Charge>] One-time or recurring charges
|
|
119
131
|
#
|
|
120
|
-
# @param paying_customer_id [String]
|
|
132
|
+
# @param paying_customer_id [String] Paying customer ID for delegated billing
|
|
121
133
|
#
|
|
122
|
-
# @param resource_id [String]
|
|
134
|
+
# @param resource_id [String] Resource ID for multi-instance subscriptions
|
|
123
135
|
#
|
|
124
|
-
# @param schedule_strategy [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::ScheduleStrategy]
|
|
136
|
+
# @param schedule_strategy [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::ScheduleStrategy] When to apply subscription changes
|
|
125
137
|
#
|
|
126
138
|
# @param start_date [Time] Subscription start date
|
|
127
139
|
#
|
|
128
|
-
# @param trial_override_configuration [Stigg::Models::V1::SubscriptionPreviewParams::TrialOverrideConfiguration]
|
|
140
|
+
# @param trial_override_configuration [Stigg::Models::V1::SubscriptionPreviewParams::TrialOverrideConfiguration] Trial period override settings
|
|
129
141
|
#
|
|
130
|
-
# @param unit_quantity [Float]
|
|
142
|
+
# @param unit_quantity [Float] Unit quantity for per-unit pricing
|
|
131
143
|
#
|
|
132
144
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
133
145
|
|
|
@@ -139,48 +151,62 @@ module Stigg
|
|
|
139
151
|
required :addon_id, String, api_name: :addonId
|
|
140
152
|
|
|
141
153
|
# @!attribute quantity
|
|
154
|
+
# Number of addon instances
|
|
142
155
|
#
|
|
143
156
|
# @return [Integer, nil]
|
|
144
157
|
optional :quantity, Integer
|
|
145
158
|
|
|
146
159
|
# @!method initialize(addon_id:, quantity: nil)
|
|
160
|
+
# Addon configuration
|
|
161
|
+
#
|
|
147
162
|
# @param addon_id [String] Addon ID
|
|
148
163
|
#
|
|
149
|
-
# @param quantity [Integer]
|
|
164
|
+
# @param quantity [Integer] Number of addon instances
|
|
150
165
|
end
|
|
151
166
|
|
|
152
167
|
class AppliedCoupon < Stigg::Internal::Type::BaseModel
|
|
153
168
|
# @!attribute billing_coupon_id
|
|
169
|
+
# Billing provider coupon ID
|
|
154
170
|
#
|
|
155
171
|
# @return [String, nil]
|
|
156
172
|
optional :billing_coupon_id, String, api_name: :billingCouponId
|
|
157
173
|
|
|
158
174
|
# @!attribute configuration
|
|
175
|
+
# Coupon timing configuration
|
|
159
176
|
#
|
|
160
177
|
# @return [Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Configuration, nil]
|
|
161
178
|
optional :configuration, -> { Stigg::V1::SubscriptionPreviewParams::AppliedCoupon::Configuration }
|
|
162
179
|
|
|
163
180
|
# @!attribute coupon_id
|
|
181
|
+
# Stigg coupon ID
|
|
164
182
|
#
|
|
165
183
|
# @return [String, nil]
|
|
166
184
|
optional :coupon_id, String, api_name: :couponId
|
|
167
185
|
|
|
168
186
|
# @!attribute discount
|
|
187
|
+
# Ad-hoc discount configuration
|
|
169
188
|
#
|
|
170
189
|
# @return [Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount, nil]
|
|
171
190
|
optional :discount, -> { Stigg::V1::SubscriptionPreviewParams::AppliedCoupon::Discount }
|
|
172
191
|
|
|
173
192
|
# @!attribute promotion_code
|
|
193
|
+
# Promotion code to apply
|
|
174
194
|
#
|
|
175
195
|
# @return [String, nil]
|
|
176
196
|
optional :promotion_code, String, api_name: :promotionCode
|
|
177
197
|
|
|
178
198
|
# @!method initialize(billing_coupon_id: nil, configuration: nil, coupon_id: nil, discount: nil, promotion_code: nil)
|
|
179
|
-
#
|
|
180
|
-
#
|
|
181
|
-
# @param
|
|
182
|
-
#
|
|
183
|
-
# @param
|
|
199
|
+
# Coupon or discount to apply
|
|
200
|
+
#
|
|
201
|
+
# @param billing_coupon_id [String] Billing provider coupon ID
|
|
202
|
+
#
|
|
203
|
+
# @param configuration [Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Configuration] Coupon timing configuration
|
|
204
|
+
#
|
|
205
|
+
# @param coupon_id [String] Stigg coupon ID
|
|
206
|
+
#
|
|
207
|
+
# @param discount [Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount] Ad-hoc discount configuration
|
|
208
|
+
#
|
|
209
|
+
# @param promotion_code [String] Promotion code to apply
|
|
184
210
|
|
|
185
211
|
# @see Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon#configuration
|
|
186
212
|
class Configuration < Stigg::Internal::Type::BaseModel
|
|
@@ -191,12 +217,15 @@ module Stigg
|
|
|
191
217
|
optional :start_date, Time, api_name: :startDate
|
|
192
218
|
|
|
193
219
|
# @!method initialize(start_date: nil)
|
|
220
|
+
# Coupon timing configuration
|
|
221
|
+
#
|
|
194
222
|
# @param start_date [Time] Coupon start date
|
|
195
223
|
end
|
|
196
224
|
|
|
197
225
|
# @see Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon#discount
|
|
198
226
|
class Discount < Stigg::Internal::Type::BaseModel
|
|
199
227
|
# @!attribute amounts_off
|
|
228
|
+
# Fixed amounts off by currency
|
|
200
229
|
#
|
|
201
230
|
# @return [Array<Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff>, nil]
|
|
202
231
|
optional :amounts_off,
|
|
@@ -207,48 +236,63 @@ module Stigg
|
|
|
207
236
|
nil?: true
|
|
208
237
|
|
|
209
238
|
# @!attribute description
|
|
239
|
+
# Ad-hoc discount
|
|
210
240
|
#
|
|
211
241
|
# @return [String, nil]
|
|
212
242
|
optional :description, String
|
|
213
243
|
|
|
214
244
|
# @!attribute duration_in_months
|
|
245
|
+
# Duration in months
|
|
215
246
|
#
|
|
216
247
|
# @return [Float, nil]
|
|
217
248
|
optional :duration_in_months, Float, api_name: :durationInMonths
|
|
218
249
|
|
|
219
250
|
# @!attribute name
|
|
251
|
+
# Discount name
|
|
220
252
|
#
|
|
221
253
|
# @return [String, nil]
|
|
222
254
|
optional :name, String
|
|
223
255
|
|
|
224
256
|
# @!attribute percent_off
|
|
257
|
+
# Percentage discount
|
|
225
258
|
#
|
|
226
259
|
# @return [Float, nil]
|
|
227
260
|
optional :percent_off, Float, api_name: :percentOff
|
|
228
261
|
|
|
229
262
|
# @!method initialize(amounts_off: nil, description: nil, duration_in_months: nil, name: nil, percent_off: nil)
|
|
230
|
-
#
|
|
231
|
-
#
|
|
232
|
-
# @param
|
|
233
|
-
#
|
|
234
|
-
# @param
|
|
263
|
+
# Ad-hoc discount configuration
|
|
264
|
+
#
|
|
265
|
+
# @param amounts_off [Array<Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff>, nil] Fixed amounts off by currency
|
|
266
|
+
#
|
|
267
|
+
# @param description [String] Ad-hoc discount
|
|
268
|
+
#
|
|
269
|
+
# @param duration_in_months [Float] Duration in months
|
|
270
|
+
#
|
|
271
|
+
# @param name [String] Discount name
|
|
272
|
+
#
|
|
273
|
+
# @param percent_off [Float] Percentage discount
|
|
235
274
|
|
|
236
275
|
class AmountsOff < Stigg::Internal::Type::BaseModel
|
|
237
276
|
# @!attribute amount
|
|
277
|
+
# The price amount
|
|
238
278
|
#
|
|
239
279
|
# @return [Float]
|
|
240
280
|
required :amount, Float
|
|
241
281
|
|
|
242
282
|
# @!attribute currency
|
|
283
|
+
# The price currency
|
|
243
284
|
#
|
|
244
|
-
# @return [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::Currency
|
|
245
|
-
|
|
285
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::Currency]
|
|
286
|
+
required :currency,
|
|
246
287
|
enum: -> { Stigg::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::Currency }
|
|
247
288
|
|
|
248
|
-
# @!method initialize(amount:, currency:
|
|
249
|
-
# @param amount [Float]
|
|
250
|
-
#
|
|
289
|
+
# @!method initialize(amount:, currency:)
|
|
290
|
+
# @param amount [Float] The price amount
|
|
291
|
+
#
|
|
292
|
+
# @param currency [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::Currency] The price currency
|
|
251
293
|
|
|
294
|
+
# The price currency
|
|
295
|
+
#
|
|
252
296
|
# @see Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff#currency
|
|
253
297
|
module Currency
|
|
254
298
|
extend Stigg::Internal::Type::Enum
|
|
@@ -385,18 +429,22 @@ module Stigg
|
|
|
385
429
|
required :feature_id, String, api_name: :featureId
|
|
386
430
|
|
|
387
431
|
# @!attribute quantity
|
|
432
|
+
# Quantity of feature units
|
|
388
433
|
#
|
|
389
434
|
# @return [Float]
|
|
390
435
|
required :quantity, Float
|
|
391
436
|
|
|
392
437
|
# @!method initialize(feature_id:, quantity:)
|
|
438
|
+
# Feature with quantity
|
|
439
|
+
#
|
|
393
440
|
# @param feature_id [String] Feature ID
|
|
394
441
|
#
|
|
395
|
-
# @param quantity [Float]
|
|
442
|
+
# @param quantity [Float] Quantity of feature units
|
|
396
443
|
end
|
|
397
444
|
|
|
398
445
|
class BillingInformation < Stigg::Internal::Type::BaseModel
|
|
399
446
|
# @!attribute billing_address
|
|
447
|
+
# Billing address
|
|
400
448
|
#
|
|
401
449
|
# @return [Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation::BillingAddress, nil]
|
|
402
450
|
optional :billing_address,
|
|
@@ -404,36 +452,43 @@ module Stigg
|
|
|
404
452
|
api_name: :billingAddress
|
|
405
453
|
|
|
406
454
|
# @!attribute charge_on_behalf_of_account
|
|
455
|
+
# Connected account ID for platform billing
|
|
407
456
|
#
|
|
408
457
|
# @return [String, nil]
|
|
409
458
|
optional :charge_on_behalf_of_account, String, api_name: :chargeOnBehalfOfAccount
|
|
410
459
|
|
|
411
460
|
# @!attribute integration_id
|
|
461
|
+
# Billing integration ID
|
|
412
462
|
#
|
|
413
463
|
# @return [String, nil]
|
|
414
464
|
optional :integration_id, String, api_name: :integrationId
|
|
415
465
|
|
|
416
466
|
# @!attribute invoice_days_until_due
|
|
467
|
+
# Days until invoice is due
|
|
417
468
|
#
|
|
418
469
|
# @return [Float, nil]
|
|
419
470
|
optional :invoice_days_until_due, Float, api_name: :invoiceDaysUntilDue
|
|
420
471
|
|
|
421
472
|
# @!attribute is_backdated
|
|
473
|
+
# Whether subscription is backdated
|
|
422
474
|
#
|
|
423
475
|
# @return [Boolean, nil]
|
|
424
476
|
optional :is_backdated, Stigg::Internal::Type::Boolean, api_name: :isBackdated
|
|
425
477
|
|
|
426
478
|
# @!attribute is_invoice_paid
|
|
479
|
+
# Whether invoice is already paid
|
|
427
480
|
#
|
|
428
481
|
# @return [Boolean, nil]
|
|
429
482
|
optional :is_invoice_paid, Stigg::Internal::Type::Boolean, api_name: :isInvoicePaid
|
|
430
483
|
|
|
431
484
|
# @!attribute metadata
|
|
485
|
+
# Additional billing metadata
|
|
432
486
|
#
|
|
433
487
|
# @return [Object, nil]
|
|
434
488
|
optional :metadata, Stigg::Internal::Type::Unknown
|
|
435
489
|
|
|
436
490
|
# @!attribute proration_behavior
|
|
491
|
+
# Proration behavior
|
|
437
492
|
#
|
|
438
493
|
# @return [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation::ProrationBehavior, nil]
|
|
439
494
|
optional :proration_behavior,
|
|
@@ -441,6 +496,7 @@ module Stigg
|
|
|
441
496
|
api_name: :prorationBehavior
|
|
442
497
|
|
|
443
498
|
# @!attribute tax_ids
|
|
499
|
+
# Customer tax IDs
|
|
444
500
|
#
|
|
445
501
|
# @return [Array<Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation::TaxID>, nil]
|
|
446
502
|
optional :tax_ids,
|
|
@@ -450,27 +506,41 @@ module Stigg
|
|
|
450
506
|
api_name: :taxIds
|
|
451
507
|
|
|
452
508
|
# @!attribute tax_percentage
|
|
509
|
+
# Tax percentage to apply
|
|
453
510
|
#
|
|
454
511
|
# @return [Float, nil]
|
|
455
512
|
optional :tax_percentage, Float, api_name: :taxPercentage
|
|
456
513
|
|
|
457
514
|
# @!attribute tax_rate_ids
|
|
515
|
+
# Tax rate IDs from billing provider
|
|
458
516
|
#
|
|
459
517
|
# @return [Array<String>, nil]
|
|
460
518
|
optional :tax_rate_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :taxRateIds
|
|
461
519
|
|
|
462
520
|
# @!method initialize(billing_address: nil, charge_on_behalf_of_account: nil, integration_id: nil, invoice_days_until_due: nil, is_backdated: nil, is_invoice_paid: nil, metadata: nil, proration_behavior: nil, tax_ids: nil, tax_percentage: nil, tax_rate_ids: nil)
|
|
463
|
-
#
|
|
464
|
-
#
|
|
465
|
-
# @param
|
|
466
|
-
#
|
|
467
|
-
# @param
|
|
468
|
-
#
|
|
469
|
-
# @param
|
|
470
|
-
#
|
|
471
|
-
# @param
|
|
472
|
-
#
|
|
473
|
-
# @param
|
|
521
|
+
# Billing and tax configuration
|
|
522
|
+
#
|
|
523
|
+
# @param billing_address [Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation::BillingAddress] Billing address
|
|
524
|
+
#
|
|
525
|
+
# @param charge_on_behalf_of_account [String] Connected account ID for platform billing
|
|
526
|
+
#
|
|
527
|
+
# @param integration_id [String] Billing integration ID
|
|
528
|
+
#
|
|
529
|
+
# @param invoice_days_until_due [Float] Days until invoice is due
|
|
530
|
+
#
|
|
531
|
+
# @param is_backdated [Boolean] Whether subscription is backdated
|
|
532
|
+
#
|
|
533
|
+
# @param is_invoice_paid [Boolean] Whether invoice is already paid
|
|
534
|
+
#
|
|
535
|
+
# @param metadata [Object] Additional billing metadata
|
|
536
|
+
#
|
|
537
|
+
# @param proration_behavior [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation::ProrationBehavior] Proration behavior
|
|
538
|
+
#
|
|
539
|
+
# @param tax_ids [Array<Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation::TaxID>] Customer tax IDs
|
|
540
|
+
#
|
|
541
|
+
# @param tax_percentage [Float] Tax percentage to apply
|
|
542
|
+
#
|
|
543
|
+
# @param tax_rate_ids [Array<String>] Tax rate IDs from billing provider
|
|
474
544
|
|
|
475
545
|
# @see Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation#billing_address
|
|
476
546
|
class BillingAddress < Stigg::Internal::Type::BaseModel
|
|
@@ -505,6 +575,8 @@ module Stigg
|
|
|
505
575
|
optional :state, String
|
|
506
576
|
|
|
507
577
|
# @!method initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil)
|
|
578
|
+
# Billing address
|
|
579
|
+
#
|
|
508
580
|
# @param city [String]
|
|
509
581
|
# @param country [String]
|
|
510
582
|
# @param line1 [String]
|
|
@@ -513,6 +585,8 @@ module Stigg
|
|
|
513
585
|
# @param state [String]
|
|
514
586
|
end
|
|
515
587
|
|
|
588
|
+
# Proration behavior
|
|
589
|
+
#
|
|
516
590
|
# @see Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation#proration_behavior
|
|
517
591
|
module ProrationBehavior
|
|
518
592
|
extend Stigg::Internal::Type::Enum
|
|
@@ -527,21 +601,27 @@ module Stigg
|
|
|
527
601
|
|
|
528
602
|
class TaxID < Stigg::Internal::Type::BaseModel
|
|
529
603
|
# @!attribute type
|
|
604
|
+
# Tax exemption type (e.g., vat, gst)
|
|
530
605
|
#
|
|
531
606
|
# @return [String]
|
|
532
607
|
required :type, String
|
|
533
608
|
|
|
534
609
|
# @!attribute value
|
|
610
|
+
# Tax exemption identifier value
|
|
535
611
|
#
|
|
536
612
|
# @return [String]
|
|
537
613
|
required :value, String
|
|
538
614
|
|
|
539
615
|
# @!method initialize(type:, value:)
|
|
540
|
-
#
|
|
541
|
-
#
|
|
616
|
+
# Tax exemption identifier
|
|
617
|
+
#
|
|
618
|
+
# @param type [String] Tax exemption type (e.g., vat, gst)
|
|
619
|
+
#
|
|
620
|
+
# @param value [String] Tax exemption identifier value
|
|
542
621
|
end
|
|
543
622
|
end
|
|
544
623
|
|
|
624
|
+
# Billing period (MONTHLY or ANNUALLY)
|
|
545
625
|
module BillingPeriod
|
|
546
626
|
extend Stigg::Internal::Type::Enum
|
|
547
627
|
|
|
@@ -560,22 +640,28 @@ module Stigg
|
|
|
560
640
|
required :id, String
|
|
561
641
|
|
|
562
642
|
# @!attribute quantity
|
|
643
|
+
# Charge quantity
|
|
563
644
|
#
|
|
564
645
|
# @return [Float]
|
|
565
646
|
required :quantity, Float
|
|
566
647
|
|
|
567
648
|
# @!attribute type
|
|
649
|
+
# Charge type
|
|
568
650
|
#
|
|
569
651
|
# @return [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::Charge::Type]
|
|
570
652
|
required :type, enum: -> { Stigg::V1::SubscriptionPreviewParams::Charge::Type }
|
|
571
653
|
|
|
572
654
|
# @!method initialize(id:, quantity:, type:)
|
|
655
|
+
# Charge item
|
|
656
|
+
#
|
|
573
657
|
# @param id [String] Charge ID
|
|
574
658
|
#
|
|
575
|
-
# @param quantity [Float]
|
|
659
|
+
# @param quantity [Float] Charge quantity
|
|
576
660
|
#
|
|
577
|
-
# @param type [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::Charge::Type]
|
|
661
|
+
# @param type [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::Charge::Type] Charge type
|
|
578
662
|
|
|
663
|
+
# Charge type
|
|
664
|
+
#
|
|
579
665
|
# @see Stigg::Models::V1::SubscriptionPreviewParams::Charge#type
|
|
580
666
|
module Type
|
|
581
667
|
extend Stigg::Internal::Type::Enum
|
|
@@ -588,6 +674,7 @@ module Stigg
|
|
|
588
674
|
end
|
|
589
675
|
end
|
|
590
676
|
|
|
677
|
+
# When to apply subscription changes
|
|
591
678
|
module ScheduleStrategy
|
|
592
679
|
extend Stigg::Internal::Type::Enum
|
|
593
680
|
|
|
@@ -601,11 +688,13 @@ module Stigg
|
|
|
601
688
|
|
|
602
689
|
class TrialOverrideConfiguration < Stigg::Internal::Type::BaseModel
|
|
603
690
|
# @!attribute is_trial
|
|
691
|
+
# Whether to start as trial
|
|
604
692
|
#
|
|
605
693
|
# @return [Boolean]
|
|
606
694
|
required :is_trial, Stigg::Internal::Type::Boolean, api_name: :isTrial
|
|
607
695
|
|
|
608
696
|
# @!attribute trial_end_behavior
|
|
697
|
+
# Behavior when trial ends
|
|
609
698
|
#
|
|
610
699
|
# @return [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::TrialOverrideConfiguration::TrialEndBehavior, nil]
|
|
611
700
|
optional :trial_end_behavior,
|
|
@@ -621,12 +710,16 @@ module Stigg
|
|
|
621
710
|
optional :trial_end_date, Time, api_name: :trialEndDate
|
|
622
711
|
|
|
623
712
|
# @!method initialize(is_trial:, trial_end_behavior: nil, trial_end_date: nil)
|
|
624
|
-
#
|
|
713
|
+
# Trial period override settings
|
|
625
714
|
#
|
|
626
|
-
# @param
|
|
715
|
+
# @param is_trial [Boolean] Whether to start as trial
|
|
716
|
+
#
|
|
717
|
+
# @param trial_end_behavior [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::TrialOverrideConfiguration::TrialEndBehavior] Behavior when trial ends
|
|
627
718
|
#
|
|
628
719
|
# @param trial_end_date [Time] Trial end date
|
|
629
720
|
|
|
721
|
+
# Behavior when trial ends
|
|
722
|
+
#
|
|
630
723
|
# @see Stigg::Models::V1::SubscriptionPreviewParams::TrialOverrideConfiguration#trial_end_behavior
|
|
631
724
|
module TrialEndBehavior
|
|
632
725
|
extend Stigg::Internal::Type::Enum
|