dodopayments 1.49.0 → 1.51.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.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +17 -51
  4. data/lib/dodopayments/client.rb +4 -4
  5. data/lib/dodopayments/internal/transport/base_client.rb +1 -4
  6. data/lib/dodopayments/internal/transport/pooled_net_requester.rb +1 -9
  7. data/lib/dodopayments/internal/type/base_model.rb +6 -11
  8. data/lib/dodopayments/internal/util.rb +1 -1
  9. data/lib/dodopayments/models/checkout_session_create_params.rb +14 -0
  10. data/lib/dodopayments/models/checkout_session_request.rb +347 -0
  11. data/lib/dodopayments/models/checkout_session_response.rb +25 -0
  12. data/lib/dodopayments/models/on_demand_subscription.rb +58 -0
  13. data/lib/dodopayments/models/payment_create_params.rb +1 -4
  14. data/lib/dodopayments/models/subscription.rb +9 -1
  15. data/lib/dodopayments/models/subscription_create_params.rb +3 -56
  16. data/lib/dodopayments/models/subscription_update_params.rb +9 -1
  17. data/lib/dodopayments/models/webhook_create_params.rb +1 -4
  18. data/lib/dodopayments/models/{webhook_create_response.rb → webhook_details.rb} +2 -2
  19. data/lib/dodopayments/models.rb +10 -2
  20. data/lib/dodopayments/resources/checkout_sessions.rb +61 -0
  21. data/lib/dodopayments/resources/subscriptions.rb +2 -2
  22. data/lib/dodopayments/resources/webhooks.rb +8 -8
  23. data/lib/dodopayments/version.rb +1 -1
  24. data/lib/dodopayments.rb +7 -7
  25. data/rbi/dodopayments/client.rbi +3 -3
  26. data/rbi/dodopayments/errors.rbi +2 -2
  27. data/rbi/dodopayments/models/checkout_session_create_params.rbi +32 -0
  28. data/rbi/dodopayments/models/checkout_session_request.rbi +652 -0
  29. data/rbi/dodopayments/models/checkout_session_response.rbi +40 -0
  30. data/rbi/dodopayments/models/dispute.rbi +4 -4
  31. data/rbi/dodopayments/models/get_dispute.rbi +4 -4
  32. data/rbi/dodopayments/models/license_key.rbi +2 -2
  33. data/rbi/dodopayments/models/on_demand_subscription.rbi +86 -0
  34. data/rbi/dodopayments/models/payment.rbi +8 -8
  35. data/rbi/dodopayments/models/refund.rbi +4 -4
  36. data/rbi/dodopayments/models/subscription.rbi +21 -11
  37. data/rbi/dodopayments/models/subscription_create_params.rbi +4 -90
  38. data/rbi/dodopayments/models/subscription_update_params.rbi +2 -0
  39. data/rbi/dodopayments/models/{webhook_list_response.rbi → webhook_details.rbi} +2 -5
  40. data/rbi/dodopayments/models.rbi +11 -2
  41. data/rbi/dodopayments/resources/checkout_sessions.rbi +80 -0
  42. data/rbi/dodopayments/resources/subscriptions.rbi +2 -2
  43. data/rbi/dodopayments/resources/webhooks.rbi +4 -4
  44. data/sig/dodopayments/client.rbs +2 -2
  45. data/sig/dodopayments/models/checkout_session_create_params.rbs +15 -0
  46. data/sig/dodopayments/models/checkout_session_request.rbs +277 -0
  47. data/sig/dodopayments/models/checkout_session_response.rbs +16 -0
  48. data/sig/dodopayments/models/on_demand_subscription.rbs +40 -0
  49. data/sig/dodopayments/models/subscription.rbs +8 -3
  50. data/sig/dodopayments/models/subscription_create_params.rbs +4 -41
  51. data/sig/dodopayments/models/{webhook_list_response.rbs → webhook_details.rbs} +2 -2
  52. data/sig/dodopayments/models.rbs +10 -2
  53. data/sig/dodopayments/resources/checkout_sessions.rbs +24 -0
  54. data/sig/dodopayments/resources/subscriptions.rbs +1 -1
  55. data/sig/dodopayments/resources/webhooks.rbs +4 -4
  56. metadata +20 -20
  57. data/lib/dodopayments/models/webhook_list_response.rb +0 -88
  58. data/lib/dodopayments/models/webhook_retrieve_response.rb +0 -88
  59. data/lib/dodopayments/models/webhook_update_response.rb +0 -88
  60. data/lib/dodopayments/models/your_webhook_url_create_params.rb +0 -32
  61. data/lib/dodopayments/resources/your_webhook_url.rb +0 -56
  62. data/rbi/dodopayments/models/webhook_create_response.rbi +0 -112
  63. data/rbi/dodopayments/models/webhook_retrieve_response.rbi +0 -112
  64. data/rbi/dodopayments/models/webhook_update_response.rbi +0 -112
  65. data/rbi/dodopayments/models/your_webhook_url_create_params.rbi +0 -56
  66. data/rbi/dodopayments/resources/your_webhook_url.rbi +0 -51
  67. data/sig/dodopayments/models/webhook_create_response.rbs +0 -60
  68. data/sig/dodopayments/models/webhook_retrieve_response.rbs +0 -60
  69. data/sig/dodopayments/models/webhook_update_response.rbs +0 -60
  70. data/sig/dodopayments/models/your_webhook_url_create_params.rbs +0 -42
  71. data/sig/dodopayments/resources/your_webhook_url.rbs +0 -18
@@ -0,0 +1,15 @@
1
+ module Dodopayments
2
+ module Models
3
+ type checkout_session_create_params =
4
+ { } & Dodopayments::Internal::Type::request_parameters
5
+
6
+ class CheckoutSessionCreateParams < Dodopayments::Models::CheckoutSessionRequest
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: Dodopayments::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Dodopayments::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,277 @@
1
+ module Dodopayments
2
+ module Models
3
+ type checkout_session_request =
4
+ {
5
+ product_cart: ::Array[Dodopayments::CheckoutSessionRequest::ProductCart],
6
+ allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
7
+ billing_address: Dodopayments::CheckoutSessionRequest::BillingAddress?,
8
+ billing_currency: Dodopayments::Models::currency?,
9
+ confirm: bool,
10
+ customer: Dodopayments::Models::customer_request?,
11
+ customization: Dodopayments::CheckoutSessionRequest::Customization,
12
+ discount_code: String?,
13
+ feature_flags: Dodopayments::CheckoutSessionRequest::FeatureFlags,
14
+ metadata: ::Hash[Symbol, String]?,
15
+ return_url: String?,
16
+ show_saved_payment_methods: bool,
17
+ subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?
18
+ }
19
+
20
+ class CheckoutSessionRequest < Dodopayments::Internal::Type::BaseModel
21
+ attr_accessor product_cart: ::Array[Dodopayments::CheckoutSessionRequest::ProductCart]
22
+
23
+ attr_accessor allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?
24
+
25
+ attr_accessor billing_address: Dodopayments::CheckoutSessionRequest::BillingAddress?
26
+
27
+ attr_accessor billing_currency: Dodopayments::Models::currency?
28
+
29
+ attr_reader confirm: bool?
30
+
31
+ def confirm=: (bool) -> bool
32
+
33
+ attr_accessor customer: Dodopayments::Models::customer_request?
34
+
35
+ attr_reader customization: Dodopayments::CheckoutSessionRequest::Customization?
36
+
37
+ def customization=: (
38
+ Dodopayments::CheckoutSessionRequest::Customization
39
+ ) -> Dodopayments::CheckoutSessionRequest::Customization
40
+
41
+ attr_accessor discount_code: String?
42
+
43
+ attr_reader feature_flags: Dodopayments::CheckoutSessionRequest::FeatureFlags?
44
+
45
+ def feature_flags=: (
46
+ Dodopayments::CheckoutSessionRequest::FeatureFlags
47
+ ) -> Dodopayments::CheckoutSessionRequest::FeatureFlags
48
+
49
+ attr_accessor metadata: ::Hash[Symbol, String]?
50
+
51
+ attr_accessor return_url: String?
52
+
53
+ attr_reader show_saved_payment_methods: bool?
54
+
55
+ def show_saved_payment_methods=: (bool) -> bool
56
+
57
+ attr_accessor subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?
58
+
59
+ def initialize: (
60
+ product_cart: ::Array[Dodopayments::CheckoutSessionRequest::ProductCart],
61
+ ?allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
62
+ ?billing_address: Dodopayments::CheckoutSessionRequest::BillingAddress?,
63
+ ?billing_currency: Dodopayments::Models::currency?,
64
+ ?confirm: bool,
65
+ ?customer: Dodopayments::Models::customer_request?,
66
+ ?customization: Dodopayments::CheckoutSessionRequest::Customization,
67
+ ?discount_code: String?,
68
+ ?feature_flags: Dodopayments::CheckoutSessionRequest::FeatureFlags,
69
+ ?metadata: ::Hash[Symbol, String]?,
70
+ ?return_url: String?,
71
+ ?show_saved_payment_methods: bool,
72
+ ?subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?
73
+ ) -> void
74
+
75
+ def to_hash: -> {
76
+ product_cart: ::Array[Dodopayments::CheckoutSessionRequest::ProductCart],
77
+ allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
78
+ billing_address: Dodopayments::CheckoutSessionRequest::BillingAddress?,
79
+ billing_currency: Dodopayments::Models::currency?,
80
+ confirm: bool,
81
+ customer: Dodopayments::Models::customer_request?,
82
+ customization: Dodopayments::CheckoutSessionRequest::Customization,
83
+ discount_code: String?,
84
+ feature_flags: Dodopayments::CheckoutSessionRequest::FeatureFlags,
85
+ metadata: ::Hash[Symbol, String]?,
86
+ return_url: String?,
87
+ show_saved_payment_methods: bool,
88
+ subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?
89
+ }
90
+
91
+ type product_cart =
92
+ {
93
+ product_id: String,
94
+ quantity: Integer,
95
+ addons: ::Array[Dodopayments::AttachAddon]?,
96
+ amount: Integer?
97
+ }
98
+
99
+ class ProductCart < Dodopayments::Internal::Type::BaseModel
100
+ attr_accessor product_id: String
101
+
102
+ attr_accessor quantity: Integer
103
+
104
+ attr_accessor addons: ::Array[Dodopayments::AttachAddon]?
105
+
106
+ attr_accessor amount: Integer?
107
+
108
+ def initialize: (
109
+ product_id: String,
110
+ quantity: Integer,
111
+ ?addons: ::Array[Dodopayments::AttachAddon]?,
112
+ ?amount: Integer?
113
+ ) -> void
114
+
115
+ def to_hash: -> {
116
+ product_id: String,
117
+ quantity: Integer,
118
+ addons: ::Array[Dodopayments::AttachAddon]?,
119
+ amount: Integer?
120
+ }
121
+ end
122
+
123
+ type billing_address =
124
+ {
125
+ country: Dodopayments::Models::country_code,
126
+ city: String?,
127
+ state: String?,
128
+ street: String?,
129
+ zipcode: String?
130
+ }
131
+
132
+ class BillingAddress < Dodopayments::Internal::Type::BaseModel
133
+ attr_accessor country: Dodopayments::Models::country_code
134
+
135
+ attr_accessor city: String?
136
+
137
+ attr_accessor state: String?
138
+
139
+ attr_accessor street: String?
140
+
141
+ attr_accessor zipcode: String?
142
+
143
+ def initialize: (
144
+ country: Dodopayments::Models::country_code,
145
+ ?city: String?,
146
+ ?state: String?,
147
+ ?street: String?,
148
+ ?zipcode: String?
149
+ ) -> void
150
+
151
+ def to_hash: -> {
152
+ country: Dodopayments::Models::country_code,
153
+ city: String?,
154
+ state: String?,
155
+ street: String?,
156
+ zipcode: String?
157
+ }
158
+ end
159
+
160
+ type customization =
161
+ {
162
+ show_on_demand_tag: bool,
163
+ show_order_details: bool,
164
+ theme: Dodopayments::Models::CheckoutSessionRequest::Customization::theme
165
+ }
166
+
167
+ class Customization < Dodopayments::Internal::Type::BaseModel
168
+ attr_reader show_on_demand_tag: bool?
169
+
170
+ def show_on_demand_tag=: (bool) -> bool
171
+
172
+ attr_reader show_order_details: bool?
173
+
174
+ def show_order_details=: (bool) -> bool
175
+
176
+ attr_reader theme: Dodopayments::Models::CheckoutSessionRequest::Customization::theme?
177
+
178
+ def theme=: (
179
+ Dodopayments::Models::CheckoutSessionRequest::Customization::theme
180
+ ) -> Dodopayments::Models::CheckoutSessionRequest::Customization::theme
181
+
182
+ def initialize: (
183
+ ?show_on_demand_tag: bool,
184
+ ?show_order_details: bool,
185
+ ?theme: Dodopayments::Models::CheckoutSessionRequest::Customization::theme
186
+ ) -> void
187
+
188
+ def to_hash: -> {
189
+ show_on_demand_tag: bool,
190
+ show_order_details: bool,
191
+ theme: Dodopayments::Models::CheckoutSessionRequest::Customization::theme
192
+ }
193
+
194
+ type theme = :dark | :light | :system
195
+
196
+ module Theme
197
+ extend Dodopayments::Internal::Type::Enum
198
+
199
+ DARK: :dark
200
+ LIGHT: :light
201
+ SYSTEM: :system
202
+
203
+ def self?.values: -> ::Array[Dodopayments::Models::CheckoutSessionRequest::Customization::theme]
204
+ end
205
+ end
206
+
207
+ type feature_flags =
208
+ {
209
+ allow_currency_selection: bool,
210
+ allow_discount_code: bool,
211
+ allow_phone_number_collection: bool,
212
+ allow_tax_id: bool,
213
+ always_create_new_customer: bool
214
+ }
215
+
216
+ class FeatureFlags < Dodopayments::Internal::Type::BaseModel
217
+ attr_reader allow_currency_selection: bool?
218
+
219
+ def allow_currency_selection=: (bool) -> bool
220
+
221
+ attr_reader allow_discount_code: bool?
222
+
223
+ def allow_discount_code=: (bool) -> bool
224
+
225
+ attr_reader allow_phone_number_collection: bool?
226
+
227
+ def allow_phone_number_collection=: (bool) -> bool
228
+
229
+ attr_reader allow_tax_id: bool?
230
+
231
+ def allow_tax_id=: (bool) -> bool
232
+
233
+ attr_reader always_create_new_customer: bool?
234
+
235
+ def always_create_new_customer=: (bool) -> bool
236
+
237
+ def initialize: (
238
+ ?allow_currency_selection: bool,
239
+ ?allow_discount_code: bool,
240
+ ?allow_phone_number_collection: bool,
241
+ ?allow_tax_id: bool,
242
+ ?always_create_new_customer: bool
243
+ ) -> void
244
+
245
+ def to_hash: -> {
246
+ allow_currency_selection: bool,
247
+ allow_discount_code: bool,
248
+ allow_phone_number_collection: bool,
249
+ allow_tax_id: bool,
250
+ always_create_new_customer: bool
251
+ }
252
+ end
253
+
254
+ type subscription_data =
255
+ {
256
+ on_demand: Dodopayments::OnDemandSubscription?,
257
+ trial_period_days: Integer?
258
+ }
259
+
260
+ class SubscriptionData < Dodopayments::Internal::Type::BaseModel
261
+ attr_accessor on_demand: Dodopayments::OnDemandSubscription?
262
+
263
+ attr_accessor trial_period_days: Integer?
264
+
265
+ def initialize: (
266
+ ?on_demand: Dodopayments::OnDemandSubscription?,
267
+ ?trial_period_days: Integer?
268
+ ) -> void
269
+
270
+ def to_hash: -> {
271
+ on_demand: Dodopayments::OnDemandSubscription?,
272
+ trial_period_days: Integer?
273
+ }
274
+ end
275
+ end
276
+ end
277
+ end
@@ -0,0 +1,16 @@
1
+ module Dodopayments
2
+ module Models
3
+ type checkout_session_response =
4
+ { checkout_url: String, session_id: String }
5
+
6
+ class CheckoutSessionResponse < Dodopayments::Internal::Type::BaseModel
7
+ attr_accessor checkout_url: String
8
+
9
+ attr_accessor session_id: String
10
+
11
+ def initialize: (checkout_url: String, session_id: String) -> void
12
+
13
+ def to_hash: -> { checkout_url: String, session_id: String }
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,40 @@
1
+ module Dodopayments
2
+ module Models
3
+ type on_demand_subscription =
4
+ {
5
+ mandate_only: bool,
6
+ adaptive_currency_fees_inclusive: bool?,
7
+ product_currency: Dodopayments::Models::currency?,
8
+ product_description: String?,
9
+ product_price: Integer?
10
+ }
11
+
12
+ class OnDemandSubscription < Dodopayments::Internal::Type::BaseModel
13
+ attr_accessor mandate_only: bool
14
+
15
+ attr_accessor adaptive_currency_fees_inclusive: bool?
16
+
17
+ attr_accessor product_currency: Dodopayments::Models::currency?
18
+
19
+ attr_accessor product_description: String?
20
+
21
+ attr_accessor product_price: Integer?
22
+
23
+ def initialize: (
24
+ mandate_only: bool,
25
+ ?adaptive_currency_fees_inclusive: bool?,
26
+ ?product_currency: Dodopayments::Models::currency?,
27
+ ?product_description: String?,
28
+ ?product_price: Integer?
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ mandate_only: bool,
33
+ adaptive_currency_fees_inclusive: bool?,
34
+ product_currency: Dodopayments::Models::currency?,
35
+ product_description: String?,
36
+ product_price: Integer?
37
+ }
38
+ end
39
+ end
40
+ end
@@ -25,7 +25,8 @@ module Dodopayments
25
25
  trial_period_days: Integer,
26
26
  cancelled_at: Time?,
27
27
  discount_cycles_remaining: Integer?,
28
- discount_id: String?
28
+ discount_id: String?,
29
+ expires_at: Time?
29
30
  }
30
31
 
31
32
  class Subscription < Dodopayments::Internal::Type::BaseModel
@@ -77,6 +78,8 @@ module Dodopayments
77
78
 
78
79
  attr_accessor discount_id: String?
79
80
 
81
+ attr_accessor expires_at: Time?
82
+
80
83
  def initialize: (
81
84
  addons: ::Array[Dodopayments::AddonCartResponseItem],
82
85
  billing: Dodopayments::BillingAddress,
@@ -101,7 +104,8 @@ module Dodopayments
101
104
  trial_period_days: Integer,
102
105
  ?cancelled_at: Time?,
103
106
  ?discount_cycles_remaining: Integer?,
104
- ?discount_id: String?
107
+ ?discount_id: String?,
108
+ ?expires_at: Time?
105
109
  ) -> void
106
110
 
107
111
  def to_hash: -> {
@@ -128,7 +132,8 @@ module Dodopayments
128
132
  trial_period_days: Integer,
129
133
  cancelled_at: Time?,
130
134
  discount_cycles_remaining: Integer?,
131
- discount_id: String?
135
+ discount_id: String?,
136
+ expires_at: Time?
132
137
  }
133
138
  end
134
139
  end
@@ -11,7 +11,7 @@ module Dodopayments
11
11
  billing_currency: Dodopayments::Models::currency?,
12
12
  discount_code: String?,
13
13
  metadata: ::Hash[Symbol, String],
14
- on_demand: Dodopayments::SubscriptionCreateParams::OnDemand?,
14
+ on_demand: Dodopayments::OnDemandSubscription?,
15
15
  payment_link: bool?,
16
16
  return_url: String?,
17
17
  show_saved_payment_methods: bool,
@@ -44,7 +44,7 @@ module Dodopayments
44
44
 
45
45
  def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
46
46
 
47
- attr_accessor on_demand: Dodopayments::SubscriptionCreateParams::OnDemand?
47
+ attr_accessor on_demand: Dodopayments::OnDemandSubscription?
48
48
 
49
49
  attr_accessor payment_link: bool?
50
50
 
@@ -68,7 +68,7 @@ module Dodopayments
68
68
  ?billing_currency: Dodopayments::Models::currency?,
69
69
  ?discount_code: String?,
70
70
  ?metadata: ::Hash[Symbol, String],
71
- ?on_demand: Dodopayments::SubscriptionCreateParams::OnDemand?,
71
+ ?on_demand: Dodopayments::OnDemandSubscription?,
72
72
  ?payment_link: bool?,
73
73
  ?return_url: String?,
74
74
  ?show_saved_payment_methods: bool,
@@ -87,7 +87,7 @@ module Dodopayments
87
87
  billing_currency: Dodopayments::Models::currency?,
88
88
  discount_code: String?,
89
89
  metadata: ::Hash[Symbol, String],
90
- on_demand: Dodopayments::SubscriptionCreateParams::OnDemand?,
90
+ on_demand: Dodopayments::OnDemandSubscription?,
91
91
  payment_link: bool?,
92
92
  return_url: String?,
93
93
  show_saved_payment_methods: bool,
@@ -95,43 +95,6 @@ module Dodopayments
95
95
  trial_period_days: Integer?,
96
96
  request_options: Dodopayments::RequestOptions
97
97
  }
98
-
99
- type on_demand =
100
- {
101
- mandate_only: bool,
102
- adaptive_currency_fees_inclusive: bool?,
103
- product_currency: Dodopayments::Models::currency?,
104
- product_description: String?,
105
- product_price: Integer?
106
- }
107
-
108
- class OnDemand < Dodopayments::Internal::Type::BaseModel
109
- attr_accessor mandate_only: bool
110
-
111
- attr_accessor adaptive_currency_fees_inclusive: bool?
112
-
113
- attr_accessor product_currency: Dodopayments::Models::currency?
114
-
115
- attr_accessor product_description: String?
116
-
117
- attr_accessor product_price: Integer?
118
-
119
- def initialize: (
120
- mandate_only: bool,
121
- ?adaptive_currency_fees_inclusive: bool?,
122
- ?product_currency: Dodopayments::Models::currency?,
123
- ?product_description: String?,
124
- ?product_price: Integer?
125
- ) -> void
126
-
127
- def to_hash: -> {
128
- mandate_only: bool,
129
- adaptive_currency_fees_inclusive: bool?,
130
- product_currency: Dodopayments::Models::currency?,
131
- product_description: String?,
132
- product_price: Integer?
133
- }
134
- end
135
98
  end
136
99
  end
137
100
  end
@@ -1,6 +1,6 @@
1
1
  module Dodopayments
2
2
  module Models
3
- type webhook_list_response =
3
+ type webhook_details =
4
4
  {
5
5
  id: String,
6
6
  created_at: String,
@@ -13,7 +13,7 @@ module Dodopayments
13
13
  rate_limit: Integer?
14
14
  }
15
15
 
16
- class WebhookListResponse < Dodopayments::Internal::Type::BaseModel
16
+ class WebhookDetails < Dodopayments::Internal::Type::BaseModel
17
17
  attr_accessor id: String
18
18
 
19
19
  attr_accessor created_at: String
@@ -31,6 +31,12 @@ module Dodopayments
31
31
 
32
32
  class BrandUpdateParams = Dodopayments::Models::BrandUpdateParams
33
33
 
34
+ class CheckoutSessionCreateParams = Dodopayments::Models::CheckoutSessionCreateParams
35
+
36
+ class CheckoutSessionRequest = Dodopayments::Models::CheckoutSessionRequest
37
+
38
+ class CheckoutSessionResponse = Dodopayments::Models::CheckoutSessionResponse
39
+
34
40
  module CountryCode = Dodopayments::Models::CountryCode
35
41
 
36
42
  class CreateNewCustomer = Dodopayments::Models::CreateNewCustomer
@@ -115,6 +121,8 @@ module Dodopayments
115
121
 
116
122
  class NewCustomer = Dodopayments::Models::NewCustomer
117
123
 
124
+ class OnDemandSubscription = Dodopayments::Models::OnDemandSubscription
125
+
118
126
  class OneTimeProductCartItem = Dodopayments::Models::OneTimeProductCartItem
119
127
 
120
128
  class Payment = Dodopayments::Models::Payment
@@ -185,6 +193,8 @@ module Dodopayments
185
193
 
186
194
  class WebhookDeleteParams = Dodopayments::Models::WebhookDeleteParams
187
195
 
196
+ class WebhookDetails = Dodopayments::Models::WebhookDetails
197
+
188
198
  module WebhookEventType = Dodopayments::Models::WebhookEventType
189
199
 
190
200
  class WebhookListParams = Dodopayments::Models::WebhookListParams
@@ -198,6 +208,4 @@ module Dodopayments
198
208
  module Webhooks = Dodopayments::Models::Webhooks
199
209
 
200
210
  class WebhookUpdateParams = Dodopayments::Models::WebhookUpdateParams
201
-
202
- class YourWebhookURLCreateParams = Dodopayments::Models::YourWebhookURLCreateParams
203
211
  end
@@ -0,0 +1,24 @@
1
+ module Dodopayments
2
+ module Resources
3
+ class CheckoutSessions
4
+ def create: (
5
+ product_cart: ::Array[Dodopayments::CheckoutSessionRequest::ProductCart],
6
+ ?allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
7
+ ?billing_address: Dodopayments::CheckoutSessionRequest::BillingAddress?,
8
+ ?billing_currency: Dodopayments::Models::currency?,
9
+ ?confirm: bool,
10
+ ?customer: Dodopayments::Models::customer_request?,
11
+ ?customization: Dodopayments::CheckoutSessionRequest::Customization,
12
+ ?discount_code: String?,
13
+ ?feature_flags: Dodopayments::CheckoutSessionRequest::FeatureFlags,
14
+ ?metadata: ::Hash[Symbol, String]?,
15
+ ?return_url: String?,
16
+ ?show_saved_payment_methods: bool,
17
+ ?subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?,
18
+ ?request_options: Dodopayments::request_opts
19
+ ) -> Dodopayments::CheckoutSessionResponse
20
+
21
+ def initialize: (client: Dodopayments::Client) -> void
22
+ end
23
+ end
24
+ end
@@ -11,7 +11,7 @@ module Dodopayments
11
11
  ?billing_currency: Dodopayments::Models::currency?,
12
12
  ?discount_code: String?,
13
13
  ?metadata: ::Hash[Symbol, String],
14
- ?on_demand: Dodopayments::SubscriptionCreateParams::OnDemand?,
14
+ ?on_demand: Dodopayments::OnDemandSubscription?,
15
15
  ?payment_link: bool?,
16
16
  ?return_url: String?,
17
17
  ?show_saved_payment_methods: bool,
@@ -13,12 +13,12 @@ module Dodopayments
13
13
  ?metadata: ::Hash[Symbol, String]?,
14
14
  ?rate_limit: Integer?,
15
15
  ?request_options: Dodopayments::request_opts
16
- ) -> Dodopayments::Models::WebhookCreateResponse
16
+ ) -> Dodopayments::WebhookDetails
17
17
 
18
18
  def retrieve: (
19
19
  String webhook_id,
20
20
  ?request_options: Dodopayments::request_opts
21
- ) -> Dodopayments::Models::WebhookRetrieveResponse
21
+ ) -> Dodopayments::WebhookDetails
22
22
 
23
23
  def update: (
24
24
  String webhook_id,
@@ -29,13 +29,13 @@ module Dodopayments
29
29
  ?rate_limit: Integer?,
30
30
  ?url: String?,
31
31
  ?request_options: Dodopayments::request_opts
32
- ) -> Dodopayments::Models::WebhookUpdateResponse
32
+ ) -> Dodopayments::WebhookDetails
33
33
 
34
34
  def list: (
35
35
  ?iterator: String?,
36
36
  ?limit: Integer?,
37
37
  ?request_options: Dodopayments::request_opts
38
- ) -> Dodopayments::Internal::CursorPagePagination[Dodopayments::Models::WebhookListResponse]
38
+ ) -> Dodopayments::Internal::CursorPagePagination[Dodopayments::WebhookDetails]
39
39
 
40
40
  def delete: (
41
41
  String webhook_id,