dodopayments 2.24.0 → 2.26.0
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 +16 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/brand.rb +9 -1
- data/lib/dodopayments/models/brand_archive_params.rb +35 -0
- data/lib/dodopayments/models/brand_archive_response.rb +57 -0
- data/lib/dodopayments/models/brand_list_params.rb +9 -1
- data/lib/dodopayments/models/checkout_session_flags.rb +13 -1
- data/lib/dodopayments/models/entitlements/license_key_grant.rb +24 -3
- data/lib/dodopayments/models/price.rb +34 -30
- data/lib/dodopayments/models/subscription_change_plan_response.rb +47 -0
- data/lib/dodopayments/models/subscription_update_params.rb +16 -4
- data/lib/dodopayments/models/update_subscription_plan_req.rb +35 -1
- data/lib/dodopayments/models.rb +2 -0
- data/lib/dodopayments/resources/brands.rb +35 -2
- data/lib/dodopayments/resources/subscriptions.rb +14 -6
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +3 -0
- data/rbi/dodopayments/models/brand.rbi +8 -0
- data/rbi/dodopayments/models/brand_archive_params.rbi +58 -0
- data/rbi/dodopayments/models/brand_archive_response.rbi +80 -0
- data/rbi/dodopayments/models/brand_list_params.rbi +22 -5
- data/rbi/dodopayments/models/checkout_session_flags.rbi +22 -3
- data/rbi/dodopayments/models/entitlements/license_key_grant.rbi +22 -2
- data/rbi/dodopayments/models/price.rbi +47 -30
- data/rbi/dodopayments/models/subscription_change_plan_response.rbi +69 -0
- data/rbi/dodopayments/models/subscription_update_params.rbi +28 -4
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +58 -0
- data/rbi/dodopayments/models.rbi +2 -0
- data/rbi/dodopayments/resources/brands.rbi +30 -4
- data/rbi/dodopayments/resources/subscriptions.rbi +63 -3
- data/sig/dodopayments/models/brand.rbs +5 -0
- data/sig/dodopayments/models/brand_archive_params.rbs +28 -0
- data/sig/dodopayments/models/brand_archive_response.rbs +45 -0
- data/sig/dodopayments/models/brand_list_params.rbs +14 -3
- data/sig/dodopayments/models/checkout_session_flags.rbs +10 -3
- data/sig/dodopayments/models/entitlements/license_key_grant.rbs +10 -0
- data/sig/dodopayments/models/price.rbs +21 -15
- data/sig/dodopayments/models/subscription_change_plan_response.rbs +35 -0
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +14 -0
- data/sig/dodopayments/models.rbs +2 -0
- data/sig/dodopayments/resources/brands.rbs +7 -0
- data/sig/dodopayments/resources/subscriptions.rbs +5 -1
- metadata +11 -2
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class SubscriptionChangePlanResponse < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Dodopayments::Models::SubscriptionChangePlanResponse,
|
|
10
|
+
Dodopayments::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Client secret for an embedded checkout.
|
|
15
|
+
sig { returns(T.nilable(String)) }
|
|
16
|
+
attr_accessor :client_secret
|
|
17
|
+
|
|
18
|
+
# When the link stops working.
|
|
19
|
+
sig { returns(T.nilable(Time)) }
|
|
20
|
+
attr_accessor :expires_on
|
|
21
|
+
|
|
22
|
+
# Id of the payment that settles the plan change.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_accessor :payment_id
|
|
25
|
+
|
|
26
|
+
# Checkout page URL. Give this to the customer.
|
|
27
|
+
sig { returns(T.nilable(String)) }
|
|
28
|
+
attr_accessor :payment_link
|
|
29
|
+
|
|
30
|
+
# Handles for a hosted checkout page that settles a plan change.
|
|
31
|
+
#
|
|
32
|
+
# The four fields repeat `UpdatePaymentMethodResponse` and a subset of
|
|
33
|
+
# `CreateSubscriptionResponse`. A shared type would rename the generated SDK types
|
|
34
|
+
# for all three routes, so each route keeps its own.
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
client_secret: T.nilable(String),
|
|
38
|
+
expires_on: T.nilable(Time),
|
|
39
|
+
payment_id: T.nilable(String),
|
|
40
|
+
payment_link: T.nilable(String)
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
# Client secret for an embedded checkout.
|
|
45
|
+
client_secret: nil,
|
|
46
|
+
# When the link stops working.
|
|
47
|
+
expires_on: nil,
|
|
48
|
+
# Id of the payment that settles the plan change.
|
|
49
|
+
payment_id: nil,
|
|
50
|
+
# Checkout page URL. Give this to the customer.
|
|
51
|
+
payment_link: nil
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
override.returns(
|
|
57
|
+
{
|
|
58
|
+
client_secret: T.nilable(String),
|
|
59
|
+
expires_on: T.nilable(Time),
|
|
60
|
+
payment_id: T.nilable(String),
|
|
61
|
+
payment_link: T.nilable(String)
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -98,11 +98,23 @@ module Dodopayments
|
|
|
98
98
|
sig { returns(T.nilable(Time)) }
|
|
99
99
|
attr_accessor :next_billing_date
|
|
100
100
|
|
|
101
|
-
# `
|
|
102
|
-
#
|
|
101
|
+
# Removed. Use `status: paused` to pause and `status: active` to resume. This
|
|
102
|
+
# field always fails with 422, so a caller still on it gets a loud error instead
|
|
103
|
+
# of a silent no-op.
|
|
103
104
|
sig { returns(T.nilable(T::Boolean)) }
|
|
104
105
|
attr_accessor :pause
|
|
105
106
|
|
|
107
|
+
# Set to `cancelled` to cancel the subscription. See `cancel_reason`,
|
|
108
|
+
# `cancellation_feedback`, `cancellation_comment`, and
|
|
109
|
+
# `cancel_at_next_billing_date` for cancellation options.
|
|
110
|
+
#
|
|
111
|
+
# Set to `paused` to pause an active subscription. Set to `active` to resume a
|
|
112
|
+
# `paused` subscription. `active` also resumes an `on_hold` subscription that has
|
|
113
|
+
# an unpaid pause invoice. This voids that invoice.
|
|
114
|
+
#
|
|
115
|
+
# Send `paused` or `active` alone. A request that combines either with any other
|
|
116
|
+
# field fails with 422. `cancelled` is not exclusive this way — see
|
|
117
|
+
# `cancel_reason` and friends below.
|
|
106
118
|
sig { returns(T.nilable(Dodopayments::SubscriptionStatus::OrSymbol)) }
|
|
107
119
|
attr_accessor :status
|
|
108
120
|
|
|
@@ -182,9 +194,21 @@ module Dodopayments
|
|
|
182
194
|
# Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
183
195
|
metadata: nil,
|
|
184
196
|
next_billing_date: nil,
|
|
185
|
-
# `
|
|
186
|
-
#
|
|
197
|
+
# Removed. Use `status: paused` to pause and `status: active` to resume. This
|
|
198
|
+
# field always fails with 422, so a caller still on it gets a loud error instead
|
|
199
|
+
# of a silent no-op.
|
|
187
200
|
pause: nil,
|
|
201
|
+
# Set to `cancelled` to cancel the subscription. See `cancel_reason`,
|
|
202
|
+
# `cancellation_feedback`, `cancellation_comment`, and
|
|
203
|
+
# `cancel_at_next_billing_date` for cancellation options.
|
|
204
|
+
#
|
|
205
|
+
# Set to `paused` to pause an active subscription. Set to `active` to resume a
|
|
206
|
+
# `paused` subscription. `active` also resumes an `on_hold` subscription that has
|
|
207
|
+
# an unpaid pause invoice. This voids that invoice.
|
|
208
|
+
#
|
|
209
|
+
# Send `paused` or `active` alone. A request that combines either with any other
|
|
210
|
+
# field fails with 422. `cancelled` is not exclusive this way — see
|
|
211
|
+
# `cancel_reason` and friends below.
|
|
188
212
|
status: nil,
|
|
189
213
|
# New number of `subscription_period_interval` units the subscription entitlement
|
|
190
214
|
# should span. Used together with `subscription_period_interval` to extend the
|
|
@@ -37,6 +37,38 @@ module Dodopayments
|
|
|
37
37
|
sig { returns(T.nilable(T::Array[Dodopayments::AttachAddon])) }
|
|
38
38
|
attr_accessor :addons
|
|
39
39
|
|
|
40
|
+
# Replace a scheduled plan change with this one.
|
|
41
|
+
#
|
|
42
|
+
# The scheduled change is cancelled by the transaction that applies this change. A
|
|
43
|
+
# change that never applies leaves the schedule in place.
|
|
44
|
+
#
|
|
45
|
+
# `effective_at: next_billing_date` is allowed. The new schedule then replaces the
|
|
46
|
+
# old one in the request transaction.
|
|
47
|
+
#
|
|
48
|
+
# A pending plan change still gets a `409`. This field does not affect it.
|
|
49
|
+
#
|
|
50
|
+
# The preview route shares this request body, so a preview that sets this field
|
|
51
|
+
# also passes the scheduled-change `409`.
|
|
52
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
53
|
+
attr_reader :cancel_scheduled_change_plan
|
|
54
|
+
|
|
55
|
+
sig { params(cancel_scheduled_change_plan: T::Boolean).void }
|
|
56
|
+
attr_writer :cancel_scheduled_change_plan
|
|
57
|
+
|
|
58
|
+
# Collect the plan-change amount with a payment link. The customer then pays on a
|
|
59
|
+
# checkout page.
|
|
60
|
+
#
|
|
61
|
+
# The business needs the `allow_plan_change_via_payment_link` capability. The
|
|
62
|
+
# request needs `effective_at: immediately`. The request also needs
|
|
63
|
+
# `on_payment_failure: prevent_change`.
|
|
64
|
+
#
|
|
65
|
+
# The preview route shares this request body and ignores this field.
|
|
66
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
67
|
+
attr_reader :collect_via_payment_link
|
|
68
|
+
|
|
69
|
+
sig { params(collect_via_payment_link: T::Boolean).void }
|
|
70
|
+
attr_writer :collect_via_payment_link
|
|
71
|
+
|
|
40
72
|
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
41
73
|
# discount_codes.
|
|
42
74
|
sig { returns(T.nilable(String)) }
|
|
@@ -103,6 +135,8 @@ module Dodopayments
|
|
|
103
135
|
quantity: Integer,
|
|
104
136
|
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
|
105
137
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon::OrHash]),
|
|
138
|
+
cancel_scheduled_change_plan: T::Boolean,
|
|
139
|
+
collect_via_payment_link: T::Boolean,
|
|
106
140
|
discount_code: T.nilable(String),
|
|
107
141
|
discount_codes: T.nilable(T::Array[String]),
|
|
108
142
|
effective_at:
|
|
@@ -128,6 +162,28 @@ module Dodopayments
|
|
|
128
162
|
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
|
129
163
|
# addons
|
|
130
164
|
addons: nil,
|
|
165
|
+
# Replace a scheduled plan change with this one.
|
|
166
|
+
#
|
|
167
|
+
# The scheduled change is cancelled by the transaction that applies this change. A
|
|
168
|
+
# change that never applies leaves the schedule in place.
|
|
169
|
+
#
|
|
170
|
+
# `effective_at: next_billing_date` is allowed. The new schedule then replaces the
|
|
171
|
+
# old one in the request transaction.
|
|
172
|
+
#
|
|
173
|
+
# A pending plan change still gets a `409`. This field does not affect it.
|
|
174
|
+
#
|
|
175
|
+
# The preview route shares this request body, so a preview that sets this field
|
|
176
|
+
# also passes the scheduled-change `409`.
|
|
177
|
+
cancel_scheduled_change_plan: nil,
|
|
178
|
+
# Collect the plan-change amount with a payment link. The customer then pays on a
|
|
179
|
+
# checkout page.
|
|
180
|
+
#
|
|
181
|
+
# The business needs the `allow_plan_change_via_payment_link` capability. The
|
|
182
|
+
# request needs `effective_at: immediately`. The request also needs
|
|
183
|
+
# `on_payment_failure: prevent_change`.
|
|
184
|
+
#
|
|
185
|
+
# The preview route shares this request body and ignores this field.
|
|
186
|
+
collect_via_payment_link: nil,
|
|
131
187
|
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
132
188
|
# discount_codes.
|
|
133
189
|
discount_code: nil,
|
|
@@ -164,6 +220,8 @@ module Dodopayments
|
|
|
164
220
|
quantity: Integer,
|
|
165
221
|
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
|
166
222
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon]),
|
|
223
|
+
cancel_scheduled_change_plan: T::Boolean,
|
|
224
|
+
collect_via_payment_link: T::Boolean,
|
|
167
225
|
discount_code: T.nilable(String),
|
|
168
226
|
discount_codes: T.nilable(T::Array[String]),
|
|
169
227
|
effective_at:
|
data/rbi/dodopayments/models.rbi
CHANGED
|
@@ -64,11 +64,37 @@ module Dodopayments
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
sig do
|
|
67
|
-
params(
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
params(
|
|
68
|
+
include_archived: T::Boolean,
|
|
69
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
70
|
+
).returns(Dodopayments::Models::BrandListResponse)
|
|
71
|
+
end
|
|
72
|
+
def list(
|
|
73
|
+
# Set to true to also list archived brands. Default false.
|
|
74
|
+
include_archived: nil,
|
|
75
|
+
request_options: {}
|
|
76
|
+
)
|
|
70
77
|
end
|
|
71
|
-
|
|
78
|
+
|
|
79
|
+
# Archive a brand. Its products, live subscriptions, and product collections move
|
|
80
|
+
# to the `move_products_to` brand. Archive is permanent.
|
|
81
|
+
sig do
|
|
82
|
+
params(
|
|
83
|
+
id: String,
|
|
84
|
+
move_products_to: T.nilable(String),
|
|
85
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
86
|
+
).returns(Dodopayments::Models::BrandArchiveResponse)
|
|
87
|
+
end
|
|
88
|
+
def archive(
|
|
89
|
+
# Brand Id
|
|
90
|
+
id,
|
|
91
|
+
# Brand that takes over the products and the live subscriptions of the brand you
|
|
92
|
+
# archive. It must be a brand of the same business, and it must not be archived.
|
|
93
|
+
# The primary brand (its brand id is the business id) is a valid target. Omit this
|
|
94
|
+
# field only when the brand holds no products and no live subscriptions.
|
|
95
|
+
move_products_to: nil,
|
|
96
|
+
request_options: {}
|
|
97
|
+
)
|
|
72
98
|
end
|
|
73
99
|
|
|
74
100
|
sig do
|
|
@@ -187,9 +187,21 @@ module Dodopayments
|
|
|
187
187
|
# Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
188
188
|
metadata: nil,
|
|
189
189
|
next_billing_date: nil,
|
|
190
|
-
# `
|
|
191
|
-
#
|
|
190
|
+
# Removed. Use `status: paused` to pause and `status: active` to resume. This
|
|
191
|
+
# field always fails with 422, so a caller still on it gets a loud error instead
|
|
192
|
+
# of a silent no-op.
|
|
192
193
|
pause: nil,
|
|
194
|
+
# Set to `cancelled` to cancel the subscription. See `cancel_reason`,
|
|
195
|
+
# `cancellation_feedback`, `cancellation_comment`, and
|
|
196
|
+
# `cancel_at_next_billing_date` for cancellation options.
|
|
197
|
+
#
|
|
198
|
+
# Set to `paused` to pause an active subscription. Set to `active` to resume a
|
|
199
|
+
# `paused` subscription. `active` also resumes an `on_hold` subscription that has
|
|
200
|
+
# an unpaid pause invoice. This voids that invoice.
|
|
201
|
+
#
|
|
202
|
+
# Send `paused` or `active` alone. A request that combines either with any other
|
|
203
|
+
# field fails with 422. `cancelled` is not exclusive this way — see
|
|
204
|
+
# `cancel_reason` and friends below.
|
|
193
205
|
status: nil,
|
|
194
206
|
# New number of `subscription_period_interval` units the subscription entitlement
|
|
195
207
|
# should span. Used together with `subscription_period_interval` to extend the
|
|
@@ -268,6 +280,8 @@ module Dodopayments
|
|
|
268
280
|
quantity: Integer,
|
|
269
281
|
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
|
270
282
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon::OrHash]),
|
|
283
|
+
cancel_scheduled_change_plan: T::Boolean,
|
|
284
|
+
collect_via_payment_link: T::Boolean,
|
|
271
285
|
discount_code: T.nilable(String),
|
|
272
286
|
discount_codes: T.nilable(T::Array[String]),
|
|
273
287
|
effective_at:
|
|
@@ -279,7 +293,7 @@ module Dodopayments
|
|
|
279
293
|
Dodopayments::UpdateSubscriptionPlanReq::OnPaymentFailure::OrSymbol
|
|
280
294
|
),
|
|
281
295
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
282
|
-
).
|
|
296
|
+
).returns(Dodopayments::Models::SubscriptionChangePlanResponse)
|
|
283
297
|
end
|
|
284
298
|
def change_plan(
|
|
285
299
|
# Subscription Id
|
|
@@ -296,6 +310,28 @@ module Dodopayments
|
|
|
296
310
|
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
|
297
311
|
# addons
|
|
298
312
|
addons: nil,
|
|
313
|
+
# Replace a scheduled plan change with this one.
|
|
314
|
+
#
|
|
315
|
+
# The scheduled change is cancelled by the transaction that applies this change. A
|
|
316
|
+
# change that never applies leaves the schedule in place.
|
|
317
|
+
#
|
|
318
|
+
# `effective_at: next_billing_date` is allowed. The new schedule then replaces the
|
|
319
|
+
# old one in the request transaction.
|
|
320
|
+
#
|
|
321
|
+
# A pending plan change still gets a `409`. This field does not affect it.
|
|
322
|
+
#
|
|
323
|
+
# The preview route shares this request body, so a preview that sets this field
|
|
324
|
+
# also passes the scheduled-change `409`.
|
|
325
|
+
cancel_scheduled_change_plan: nil,
|
|
326
|
+
# Collect the plan-change amount with a payment link. The customer then pays on a
|
|
327
|
+
# checkout page.
|
|
328
|
+
#
|
|
329
|
+
# The business needs the `allow_plan_change_via_payment_link` capability. The
|
|
330
|
+
# request needs `effective_at: immediately`. The request also needs
|
|
331
|
+
# `on_payment_failure: prevent_change`.
|
|
332
|
+
#
|
|
333
|
+
# The preview route shares this request body and ignores this field.
|
|
334
|
+
collect_via_payment_link: nil,
|
|
299
335
|
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
300
336
|
# discount_codes.
|
|
301
337
|
discount_code: nil,
|
|
@@ -374,6 +410,8 @@ module Dodopayments
|
|
|
374
410
|
quantity: Integer,
|
|
375
411
|
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
|
376
412
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon::OrHash]),
|
|
413
|
+
cancel_scheduled_change_plan: T::Boolean,
|
|
414
|
+
collect_via_payment_link: T::Boolean,
|
|
377
415
|
discount_code: T.nilable(String),
|
|
378
416
|
discount_codes: T.nilable(T::Array[String]),
|
|
379
417
|
effective_at:
|
|
@@ -402,6 +440,28 @@ module Dodopayments
|
|
|
402
440
|
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
|
403
441
|
# addons
|
|
404
442
|
addons: nil,
|
|
443
|
+
# Replace a scheduled plan change with this one.
|
|
444
|
+
#
|
|
445
|
+
# The scheduled change is cancelled by the transaction that applies this change. A
|
|
446
|
+
# change that never applies leaves the schedule in place.
|
|
447
|
+
#
|
|
448
|
+
# `effective_at: next_billing_date` is allowed. The new schedule then replaces the
|
|
449
|
+
# old one in the request transaction.
|
|
450
|
+
#
|
|
451
|
+
# A pending plan change still gets a `409`. This field does not affect it.
|
|
452
|
+
#
|
|
453
|
+
# The preview route shares this request body, so a preview that sets this field
|
|
454
|
+
# also passes the scheduled-change `409`.
|
|
455
|
+
cancel_scheduled_change_plan: nil,
|
|
456
|
+
# Collect the plan-change amount with a payment link. The customer then pays on a
|
|
457
|
+
# checkout page.
|
|
458
|
+
#
|
|
459
|
+
# The business needs the `allow_plan_change_via_payment_link` capability. The
|
|
460
|
+
# request needs `effective_at: immediately`. The request also needs
|
|
461
|
+
# `on_payment_failure: prevent_change`.
|
|
462
|
+
#
|
|
463
|
+
# The preview route shares this request body and ignores this field.
|
|
464
|
+
collect_via_payment_link: nil,
|
|
405
465
|
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
406
466
|
# discount_codes.
|
|
407
467
|
discount_code: nil,
|
|
@@ -8,6 +8,7 @@ module Dodopayments
|
|
|
8
8
|
statement_descriptor: String,
|
|
9
9
|
verification_enabled: bool,
|
|
10
10
|
verification_status: Dodopayments::Models::Brand::verification_status,
|
|
11
|
+
archived_at: Time?,
|
|
11
12
|
description: String?,
|
|
12
13
|
image: String?,
|
|
13
14
|
name: String?,
|
|
@@ -29,6 +30,8 @@ module Dodopayments
|
|
|
29
30
|
|
|
30
31
|
attr_accessor verification_status: Dodopayments::Models::Brand::verification_status
|
|
31
32
|
|
|
33
|
+
attr_accessor archived_at: Time?
|
|
34
|
+
|
|
32
35
|
attr_accessor description: String?
|
|
33
36
|
|
|
34
37
|
attr_accessor image: String?
|
|
@@ -48,6 +51,7 @@ module Dodopayments
|
|
|
48
51
|
statement_descriptor: String,
|
|
49
52
|
verification_enabled: bool,
|
|
50
53
|
verification_status: Dodopayments::Models::Brand::verification_status,
|
|
54
|
+
?archived_at: Time?,
|
|
51
55
|
?description: String?,
|
|
52
56
|
?image: String?,
|
|
53
57
|
?name: String?,
|
|
@@ -63,6 +67,7 @@ module Dodopayments
|
|
|
63
67
|
statement_descriptor: String,
|
|
64
68
|
verification_enabled: bool,
|
|
65
69
|
verification_status: Dodopayments::Models::Brand::verification_status,
|
|
70
|
+
archived_at: Time?,
|
|
66
71
|
description: String?,
|
|
67
72
|
image: String?,
|
|
68
73
|
name: String?,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type brand_archive_params =
|
|
4
|
+
{ id: String, move_products_to: String? }
|
|
5
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class BrandArchiveParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor id: String
|
|
12
|
+
|
|
13
|
+
attr_accessor move_products_to: String?
|
|
14
|
+
|
|
15
|
+
def initialize: (
|
|
16
|
+
id: String,
|
|
17
|
+
?move_products_to: String?,
|
|
18
|
+
?request_options: Dodopayments::request_opts
|
|
19
|
+
) -> void
|
|
20
|
+
|
|
21
|
+
def to_hash: -> {
|
|
22
|
+
id: String,
|
|
23
|
+
move_products_to: String?,
|
|
24
|
+
request_options: Dodopayments::RequestOptions
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type brand_archive_response =
|
|
4
|
+
{
|
|
5
|
+
archived_at: Time,
|
|
6
|
+
brand_id: String,
|
|
7
|
+
collections_moved: Integer,
|
|
8
|
+
products_moved: Integer,
|
|
9
|
+
subscriptions_moved: Integer,
|
|
10
|
+
moved_to_brand_id: String?
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class BrandArchiveResponse < Dodopayments::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor archived_at: Time
|
|
15
|
+
|
|
16
|
+
attr_accessor brand_id: String
|
|
17
|
+
|
|
18
|
+
attr_accessor collections_moved: Integer
|
|
19
|
+
|
|
20
|
+
attr_accessor products_moved: Integer
|
|
21
|
+
|
|
22
|
+
attr_accessor subscriptions_moved: Integer
|
|
23
|
+
|
|
24
|
+
attr_accessor moved_to_brand_id: String?
|
|
25
|
+
|
|
26
|
+
def initialize: (
|
|
27
|
+
archived_at: Time,
|
|
28
|
+
brand_id: String,
|
|
29
|
+
collections_moved: Integer,
|
|
30
|
+
products_moved: Integer,
|
|
31
|
+
subscriptions_moved: Integer,
|
|
32
|
+
?moved_to_brand_id: String?
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
archived_at: Time,
|
|
37
|
+
brand_id: String,
|
|
38
|
+
collections_moved: Integer,
|
|
39
|
+
products_moved: Integer,
|
|
40
|
+
subscriptions_moved: Integer,
|
|
41
|
+
moved_to_brand_id: String?
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
module Dodopayments
|
|
2
2
|
module Models
|
|
3
3
|
type brand_list_params =
|
|
4
|
-
{
|
|
4
|
+
{ include_archived: bool }
|
|
5
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
5
6
|
|
|
6
7
|
class BrandListParams < Dodopayments::Internal::Type::BaseModel
|
|
7
8
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
9
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
attr_reader include_archived: bool?
|
|
11
12
|
|
|
12
|
-
def
|
|
13
|
+
def include_archived=: (bool) -> bool
|
|
14
|
+
|
|
15
|
+
def initialize: (
|
|
16
|
+
?include_archived: bool,
|
|
17
|
+
?request_options: Dodopayments::request_opts
|
|
18
|
+
) -> void
|
|
19
|
+
|
|
20
|
+
def to_hash: -> {
|
|
21
|
+
include_archived: bool,
|
|
22
|
+
request_options: Dodopayments::RequestOptions
|
|
23
|
+
}
|
|
13
24
|
end
|
|
14
25
|
end
|
|
15
26
|
end
|
|
@@ -18,7 +18,8 @@ module Dodopayments
|
|
|
18
18
|
allow_tax_id: bool,
|
|
19
19
|
always_create_new_customer: bool,
|
|
20
20
|
redirect_immediately: bool,
|
|
21
|
-
require_phone_number: bool
|
|
21
|
+
require_phone_number: bool,
|
|
22
|
+
single_page: bool
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
class CheckoutSessionFlags < Dodopayments::Internal::Type::BaseModel
|
|
@@ -90,6 +91,10 @@ module Dodopayments
|
|
|
90
91
|
|
|
91
92
|
def require_phone_number=: (bool) -> bool
|
|
92
93
|
|
|
94
|
+
attr_reader single_page: bool?
|
|
95
|
+
|
|
96
|
+
def single_page=: (bool) -> bool
|
|
97
|
+
|
|
93
98
|
def initialize: (
|
|
94
99
|
?allow_currency_selection: bool,
|
|
95
100
|
?allow_customer_editing_business_name: bool,
|
|
@@ -107,7 +112,8 @@ module Dodopayments
|
|
|
107
112
|
?allow_tax_id: bool,
|
|
108
113
|
?always_create_new_customer: bool,
|
|
109
114
|
?redirect_immediately: bool,
|
|
110
|
-
?require_phone_number: bool
|
|
115
|
+
?require_phone_number: bool,
|
|
116
|
+
?single_page: bool
|
|
111
117
|
) -> void
|
|
112
118
|
|
|
113
119
|
def to_hash: -> {
|
|
@@ -127,7 +133,8 @@ module Dodopayments
|
|
|
127
133
|
allow_tax_id: bool,
|
|
128
134
|
always_create_new_customer: bool,
|
|
129
135
|
redirect_immediately: bool,
|
|
130
|
-
require_phone_number: bool
|
|
136
|
+
require_phone_number: bool,
|
|
137
|
+
single_page: bool
|
|
131
138
|
}
|
|
132
139
|
end
|
|
133
140
|
end
|
|
@@ -3,31 +3,41 @@ module Dodopayments
|
|
|
3
3
|
module Entitlements
|
|
4
4
|
type license_key_grant =
|
|
5
5
|
{
|
|
6
|
+
id: String,
|
|
6
7
|
activations_used: Integer,
|
|
7
8
|
key: String,
|
|
9
|
+
status: Dodopayments::Models::license_key_status,
|
|
8
10
|
activations_limit: Integer?,
|
|
9
11
|
expires_at: Time?
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
class LicenseKeyGrant < Dodopayments::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
13
17
|
attr_accessor activations_used: Integer
|
|
14
18
|
|
|
15
19
|
attr_accessor key: String
|
|
16
20
|
|
|
21
|
+
attr_accessor status: Dodopayments::Models::license_key_status
|
|
22
|
+
|
|
17
23
|
attr_accessor activations_limit: Integer?
|
|
18
24
|
|
|
19
25
|
attr_accessor expires_at: Time?
|
|
20
26
|
|
|
21
27
|
def initialize: (
|
|
28
|
+
id: String,
|
|
22
29
|
activations_used: Integer,
|
|
23
30
|
key: String,
|
|
31
|
+
status: Dodopayments::Models::license_key_status,
|
|
24
32
|
?activations_limit: Integer?,
|
|
25
33
|
?expires_at: Time?
|
|
26
34
|
) -> void
|
|
27
35
|
|
|
28
36
|
def to_hash: -> {
|
|
37
|
+
id: String,
|
|
29
38
|
activations_used: Integer,
|
|
30
39
|
key: String,
|
|
40
|
+
status: Dodopayments::Models::license_key_status,
|
|
31
41
|
activations_limit: Integer?,
|
|
32
42
|
expires_at: Time?
|
|
33
43
|
}
|