whop_sdk 0.0.14 → 0.0.16

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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +8 -0
  5. data/lib/whop_sdk/models/checkout_configuration.rb +9 -1
  6. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
  7. data/lib/whop_sdk/models/checkout_configuration_list_response.rb +9 -1
  8. data/lib/whop_sdk/models/course.rb +57 -1
  9. data/lib/whop_sdk/models/course_lesson_interaction.rb +23 -1
  10. data/lib/whop_sdk/models/course_lesson_interaction_list_item.rb +23 -1
  11. data/lib/whop_sdk/models/experience.rb +9 -1
  12. data/lib/whop_sdk/models/experience_create_params.rb +9 -1
  13. data/lib/whop_sdk/models/experience_list_response.rb +9 -1
  14. data/lib/whop_sdk/models/experience_update_params.rb +9 -1
  15. data/lib/whop_sdk/models/fee_markup_create_params.rb +62 -0
  16. data/lib/whop_sdk/models/fee_markup_create_response.rb +67 -0
  17. data/lib/whop_sdk/models/fee_markup_delete_params.rb +14 -0
  18. data/lib/whop_sdk/models/fee_markup_delete_response.rb +8 -0
  19. data/lib/whop_sdk/models/fee_markup_list_params.rb +58 -0
  20. data/lib/whop_sdk/models/fee_markup_list_response.rb +67 -0
  21. data/lib/whop_sdk/models/fee_markup_type.rb +19 -0
  22. data/lib/whop_sdk/models/payment_list_fees_params.rb +46 -0
  23. data/lib/whop_sdk/models/payment_list_fees_response.rb +84 -0
  24. data/lib/whop_sdk/models/payment_method_list_response.rb +214 -76
  25. data/lib/whop_sdk/models/payment_method_retrieve_response.rb +214 -76
  26. data/lib/whop_sdk/models/payout_method_list_params.rb +54 -0
  27. data/lib/whop_sdk/models/payout_method_list_response.rb +95 -0
  28. data/lib/whop_sdk/models/withdrawal_create_params.rb +46 -0
  29. data/lib/whop_sdk/models/withdrawal_create_response.rb +275 -0
  30. data/lib/whop_sdk/models.rb +14 -0
  31. data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
  32. data/lib/whop_sdk/resources/experiences.rb +6 -2
  33. data/lib/whop_sdk/resources/fee_markups.rb +112 -0
  34. data/lib/whop_sdk/resources/payment_methods.rb +2 -2
  35. data/lib/whop_sdk/resources/payments.rb +35 -0
  36. data/lib/whop_sdk/resources/payout_methods.rb +49 -0
  37. data/lib/whop_sdk/resources/withdrawals.rb +34 -0
  38. data/lib/whop_sdk/version.rb +1 -1
  39. data/lib/whop_sdk.rb +15 -0
  40. data/rbi/whop_sdk/client.rbi +6 -0
  41. data/rbi/whop_sdk/models/checkout_configuration.rbi +8 -0
  42. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
  43. data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +8 -0
  44. data/rbi/whop_sdk/models/course.rbi +115 -3
  45. data/rbi/whop_sdk/models/course_lesson_interaction.rbi +55 -2
  46. data/rbi/whop_sdk/models/course_lesson_interaction_list_item.rbi +60 -2
  47. data/rbi/whop_sdk/models/experience.rbi +8 -0
  48. data/rbi/whop_sdk/models/experience_create_params.rbi +8 -0
  49. data/rbi/whop_sdk/models/experience_list_response.rbi +8 -0
  50. data/rbi/whop_sdk/models/experience_update_params.rbi +8 -0
  51. data/rbi/whop_sdk/models/fee_markup_create_params.rbi +83 -0
  52. data/rbi/whop_sdk/models/fee_markup_create_response.rbi +89 -0
  53. data/rbi/whop_sdk/models/fee_markup_delete_params.rbi +27 -0
  54. data/rbi/whop_sdk/models/fee_markup_delete_response.rbi +8 -0
  55. data/rbi/whop_sdk/models/fee_markup_list_params.rbi +77 -0
  56. data/rbi/whop_sdk/models/fee_markup_list_response.rbi +89 -0
  57. data/rbi/whop_sdk/models/fee_markup_type.rbi +37 -0
  58. data/rbi/whop_sdk/models/payment_list_fees_params.rbi +67 -0
  59. data/rbi/whop_sdk/models/payment_list_fees_response.rbi +239 -0
  60. data/rbi/whop_sdk/models/payment_method_list_response.rbi +305 -83
  61. data/rbi/whop_sdk/models/payment_method_retrieve_response.rbi +305 -88
  62. data/rbi/whop_sdk/models/payout_method_list_params.rbi +75 -0
  63. data/rbi/whop_sdk/models/payout_method_list_response.rbi +200 -0
  64. data/rbi/whop_sdk/models/withdrawal_create_params.rbi +67 -0
  65. data/rbi/whop_sdk/models/withdrawal_create_response.rbi +564 -0
  66. data/rbi/whop_sdk/models.rbi +14 -0
  67. data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
  68. data/rbi/whop_sdk/resources/experiences.rbi +6 -0
  69. data/rbi/whop_sdk/resources/fee_markups.rbi +96 -0
  70. data/rbi/whop_sdk/resources/payment_methods.rbi +2 -2
  71. data/rbi/whop_sdk/resources/payments.rbi +34 -0
  72. data/rbi/whop_sdk/resources/payout_methods.rbi +46 -0
  73. data/rbi/whop_sdk/resources/withdrawals.rbi +29 -0
  74. data/sig/whop_sdk/client.rbs +4 -0
  75. data/sig/whop_sdk/models/checkout_configuration.rbs +5 -0
  76. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
  77. data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +5 -0
  78. data/sig/whop_sdk/models/course.rbs +45 -3
  79. data/sig/whop_sdk/models/course_lesson_interaction.rbs +28 -3
  80. data/sig/whop_sdk/models/course_lesson_interaction_list_item.rbs +28 -3
  81. data/sig/whop_sdk/models/experience.rbs +5 -0
  82. data/sig/whop_sdk/models/experience_create_params.rbs +11 -1
  83. data/sig/whop_sdk/models/experience_list_response.rbs +5 -0
  84. data/sig/whop_sdk/models/experience_update_params.rbs +5 -0
  85. data/sig/whop_sdk/models/fee_markup_create_params.rbs +51 -0
  86. data/sig/whop_sdk/models/fee_markup_create_response.rbs +50 -0
  87. data/sig/whop_sdk/models/fee_markup_delete_params.rbs +15 -0
  88. data/sig/whop_sdk/models/fee_markup_delete_response.rbs +5 -0
  89. data/sig/whop_sdk/models/fee_markup_list_params.rbs +46 -0
  90. data/sig/whop_sdk/models/fee_markup_list_response.rbs +50 -0
  91. data/sig/whop_sdk/models/fee_markup_type.rbs +22 -0
  92. data/sig/whop_sdk/models/payment_list_fees_params.rbs +36 -0
  93. data/sig/whop_sdk/models/payment_list_fees_response.rbs +104 -0
  94. data/sig/whop_sdk/models/payment_method_list_response.rbs +149 -41
  95. data/sig/whop_sdk/models/payment_method_retrieve_response.rbs +149 -41
  96. data/sig/whop_sdk/models/payout_method_list_params.rbs +46 -0
  97. data/sig/whop_sdk/models/payout_method_list_response.rbs +83 -0
  98. data/sig/whop_sdk/models/withdrawal_create_params.rbs +41 -0
  99. data/sig/whop_sdk/models/withdrawal_create_response.rbs +243 -0
  100. data/sig/whop_sdk/models.rbs +14 -0
  101. data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
  102. data/sig/whop_sdk/resources/experiences.rbs +2 -0
  103. data/sig/whop_sdk/resources/fee_markups.rbs +28 -0
  104. data/sig/whop_sdk/resources/payment_methods.rbs +2 -2
  105. data/sig/whop_sdk/resources/payments.rbs +9 -0
  106. data/sig/whop_sdk/resources/payout_methods.rbs +16 -0
  107. data/sig/whop_sdk/resources/withdrawals.rbs +8 -0
  108. metadata +47 -2
data/lib/whop_sdk.rb CHANGED
@@ -180,6 +180,13 @@ require_relative "whop_sdk/models/experience_list_params"
180
180
  require_relative "whop_sdk/models/experience_list_response"
181
181
  require_relative "whop_sdk/models/experience_retrieve_params"
182
182
  require_relative "whop_sdk/models/experience_update_params"
183
+ require_relative "whop_sdk/models/fee_markup_create_params"
184
+ require_relative "whop_sdk/models/fee_markup_create_response"
185
+ require_relative "whop_sdk/models/fee_markup_delete_params"
186
+ require_relative "whop_sdk/models/fee_markup_delete_response"
187
+ require_relative "whop_sdk/models/fee_markup_list_params"
188
+ require_relative "whop_sdk/models/fee_markup_list_response"
189
+ require_relative "whop_sdk/models/fee_markup_type"
183
190
  require_relative "whop_sdk/models/forum"
184
191
  require_relative "whop_sdk/models/forum_list_params"
185
192
  require_relative "whop_sdk/models/forum_list_response"
@@ -242,6 +249,8 @@ require_relative "whop_sdk/models/page_info"
242
249
  require_relative "whop_sdk/models/payment"
243
250
  require_relative "whop_sdk/models/payment_create_params"
244
251
  require_relative "whop_sdk/models/payment_failed_webhook_event"
252
+ require_relative "whop_sdk/models/payment_list_fees_params"
253
+ require_relative "whop_sdk/models/payment_list_fees_response"
245
254
  require_relative "whop_sdk/models/payment_list_params"
246
255
  require_relative "whop_sdk/models/payment_list_response"
247
256
  require_relative "whop_sdk/models/payment_method_list_params"
@@ -256,6 +265,8 @@ require_relative "whop_sdk/models/payment_retrieve_params"
256
265
  require_relative "whop_sdk/models/payment_retry_params"
257
266
  require_relative "whop_sdk/models/payment_succeeded_webhook_event"
258
267
  require_relative "whop_sdk/models/payment_void_params"
268
+ require_relative "whop_sdk/models/payout_method_list_params"
269
+ require_relative "whop_sdk/models/payout_method_list_response"
259
270
  require_relative "whop_sdk/models/plan"
260
271
  require_relative "whop_sdk/models/plan_create_params"
261
272
  require_relative "whop_sdk/models/plan_delete_params"
@@ -344,6 +355,8 @@ require_relative "whop_sdk/models/who_can_post"
344
355
  require_relative "whop_sdk/models/who_can_post_types"
345
356
  require_relative "whop_sdk/models/who_can_react"
346
357
  require_relative "whop_sdk/models/withdrawal_created_webhook_event"
358
+ require_relative "whop_sdk/models/withdrawal_create_params"
359
+ require_relative "whop_sdk/models/withdrawal_create_response"
347
360
  require_relative "whop_sdk/models/withdrawal_fee_types"
348
361
  require_relative "whop_sdk/models/withdrawal_list_params"
349
362
  require_relative "whop_sdk/models/withdrawal_list_response"
@@ -370,6 +383,7 @@ require_relative "whop_sdk/resources/course_students"
370
383
  require_relative "whop_sdk/resources/disputes"
371
384
  require_relative "whop_sdk/resources/entries"
372
385
  require_relative "whop_sdk/resources/experiences"
386
+ require_relative "whop_sdk/resources/fee_markups"
373
387
  require_relative "whop_sdk/resources/forum_posts"
374
388
  require_relative "whop_sdk/resources/forums"
375
389
  require_relative "whop_sdk/resources/invoices"
@@ -380,6 +394,7 @@ require_relative "whop_sdk/resources/messages"
380
394
  require_relative "whop_sdk/resources/notifications"
381
395
  require_relative "whop_sdk/resources/payment_methods"
382
396
  require_relative "whop_sdk/resources/payments"
397
+ require_relative "whop_sdk/resources/payout_methods"
383
398
  require_relative "whop_sdk/resources/plans"
384
399
  require_relative "whop_sdk/resources/products"
385
400
  require_relative "whop_sdk/resources/promo_codes"
@@ -136,6 +136,12 @@ module WhopSDK
136
136
  sig { returns(WhopSDK::Resources::PaymentMethods) }
137
137
  attr_reader :payment_methods
138
138
 
139
+ sig { returns(WhopSDK::Resources::FeeMarkups) }
140
+ attr_reader :fee_markups
141
+
142
+ sig { returns(WhopSDK::Resources::PayoutMethods) }
143
+ attr_reader :payout_methods
144
+
139
145
  # @api private
140
146
  sig { override.returns(T::Hash[String, String]) }
141
147
  private def auth_headers
@@ -20,6 +20,10 @@ module WhopSDK
20
20
  sig { returns(String) }
21
21
  attr_accessor :company_id
22
22
 
23
+ # The available currencies on the platform
24
+ sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) }
25
+ attr_accessor :currency
26
+
23
27
  # The metadata to use for the checkout configuration
24
28
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
25
29
  attr_accessor :metadata
@@ -78,6 +82,7 @@ module WhopSDK
78
82
  id: String,
79
83
  affiliate_code: T.nilable(String),
80
84
  company_id: String,
85
+ currency: T.nilable(WhopSDK::Currency::OrSymbol),
81
86
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
82
87
  mode: WhopSDK::CheckoutModes::OrSymbol,
83
88
  payment_method_configuration:
@@ -96,6 +101,8 @@ module WhopSDK
96
101
  affiliate_code:,
97
102
  # The ID of the company to use for the checkout configuration
98
103
  company_id:,
104
+ # The available currencies on the platform
105
+ currency:,
99
106
  # The metadata to use for the checkout configuration
100
107
  metadata:,
101
108
  # The mode of the checkout session.
@@ -120,6 +127,7 @@ module WhopSDK
120
127
  id: String,
121
128
  affiliate_code: T.nilable(String),
122
129
  company_id: String,
130
+ currency: T.nilable(WhopSDK::Currency::TaggedSymbol),
123
131
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
124
132
  mode: WhopSDK::CheckoutModes::TaggedSymbol,
125
133
  payment_method_configuration:
@@ -29,6 +29,10 @@ module WhopSDK
29
29
  sig { returns(T.nilable(String)) }
30
30
  attr_accessor :affiliate_code
31
31
 
32
+ # The available currencies on the platform
33
+ sig { returns(T.nilable(WhopSDK::Currency::OrSymbol)) }
34
+ attr_accessor :currency
35
+
32
36
  # The metadata to use for the checkout configuration
33
37
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
34
38
  attr_accessor :metadata
@@ -77,6 +81,7 @@ module WhopSDK
77
81
  plan_id: String,
78
82
  company_id: String,
79
83
  affiliate_code: T.nilable(String),
84
+ currency: T.nilable(WhopSDK::Currency::OrSymbol),
80
85
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
81
86
  payment_method_configuration:
82
87
  T.nilable(
@@ -97,6 +102,8 @@ module WhopSDK
97
102
  company_id:,
98
103
  # The affiliate code to use for the checkout configuration
99
104
  affiliate_code: nil,
105
+ # The available currencies on the platform
106
+ currency: nil,
100
107
  # The metadata to use for the checkout configuration
101
108
  metadata: nil,
102
109
  # This currently only works for configurations made in 'setup' mode. The explicit
@@ -115,6 +122,7 @@ module WhopSDK
115
122
  {
116
123
  plan: WhopSDK::CheckoutConfigurationCreateParams::Plan,
117
124
  affiliate_code: T.nilable(String),
125
+ currency: T.nilable(WhopSDK::Currency::OrSymbol),
118
126
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
119
127
  mode: Symbol,
120
128
  payment_method_configuration:
@@ -23,6 +23,10 @@ module WhopSDK
23
23
  sig { returns(String) }
24
24
  attr_accessor :company_id
25
25
 
26
+ # The available currencies on the platform
27
+ sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) }
28
+ attr_accessor :currency
29
+
26
30
  # The metadata to use for the checkout configuration
27
31
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
28
32
  attr_accessor :metadata
@@ -90,6 +94,7 @@ module WhopSDK
90
94
  id: String,
91
95
  affiliate_code: T.nilable(String),
92
96
  company_id: String,
97
+ currency: T.nilable(WhopSDK::Currency::OrSymbol),
93
98
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
94
99
  mode: WhopSDK::CheckoutModes::OrSymbol,
95
100
  payment_method_configuration:
@@ -111,6 +116,8 @@ module WhopSDK
111
116
  affiliate_code:,
112
117
  # The ID of the company to use for the checkout configuration
113
118
  company_id:,
119
+ # The available currencies on the platform
120
+ currency:,
114
121
  # The metadata to use for the checkout configuration
115
122
  metadata:,
116
123
  # The mode of the checkout session.
@@ -135,6 +142,7 @@ module WhopSDK
135
142
  id: String,
136
143
  affiliate_code: T.nilable(String),
137
144
  company_id: String,
145
+ currency: T.nilable(WhopSDK::Currency::TaggedSymbol),
138
146
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
139
147
  mode: WhopSDK::CheckoutModes::TaggedSymbol,
140
148
  payment_method_configuration:
@@ -226,17 +226,49 @@ module WhopSDK
226
226
  sig { returns(Integer) }
227
227
  attr_accessor :order
228
228
 
229
+ # The thumbnail for the lesson
230
+ sig do
231
+ returns(T.nilable(WhopSDK::Course::Chapter::Lesson::Thumbnail))
232
+ end
233
+ attr_reader :thumbnail
234
+
235
+ sig do
236
+ params(
237
+ thumbnail:
238
+ T.nilable(WhopSDK::Course::Chapter::Lesson::Thumbnail::OrHash)
239
+ ).void
240
+ end
241
+ attr_writer :thumbnail
242
+
229
243
  # The title of the lesson
230
244
  sig { returns(String) }
231
245
  attr_accessor :title
232
246
 
247
+ # The associated Mux asset for video lessons
248
+ sig do
249
+ returns(T.nilable(WhopSDK::Course::Chapter::Lesson::VideoAsset))
250
+ end
251
+ attr_reader :video_asset
252
+
253
+ sig do
254
+ params(
255
+ video_asset:
256
+ T.nilable(WhopSDK::Course::Chapter::Lesson::VideoAsset::OrHash)
257
+ ).void
258
+ end
259
+ attr_writer :video_asset
260
+
233
261
  # A lesson from the courses app
234
262
  sig do
235
263
  params(
236
264
  id: String,
237
265
  lesson_type: WhopSDK::LessonTypes::OrSymbol,
238
266
  order: Integer,
239
- title: String
267
+ thumbnail:
268
+ T.nilable(WhopSDK::Course::Chapter::Lesson::Thumbnail::OrHash),
269
+ title: String,
270
+ video_asset:
271
+ T.nilable(WhopSDK::Course::Chapter::Lesson::VideoAsset::OrHash)
240
272
  ).returns(T.attached_class)
241
273
  end
242
274
  def self.new(
@@ -246,8 +278,12 @@ module WhopSDK
246
278
  lesson_type:,
247
279
  # The order of the lesson within its chapter
248
280
  order:,
281
+ # The thumbnail for the lesson
282
+ thumbnail:,
249
283
  # The title of the lesson
250
- title:
284
+ title:,
285
+ # The associated Mux asset for video lessons
286
+ video_asset:
251
287
  )
252
288
  end
253
289
 
@@ -257,12 +293,88 @@ module WhopSDK
257
293
  id: String,
258
294
  lesson_type: WhopSDK::LessonTypes::TaggedSymbol,
259
295
  order: Integer,
260
- title: String
296
+ thumbnail:
297
+ T.nilable(WhopSDK::Course::Chapter::Lesson::Thumbnail),
298
+ title: String,
299
+ video_asset:
300
+ T.nilable(WhopSDK::Course::Chapter::Lesson::VideoAsset)
261
301
  }
262
302
  )
263
303
  end
264
304
  def to_hash
265
305
  end
306
+
307
+ class Thumbnail < WhopSDK::Internal::Type::BaseModel
308
+ OrHash =
309
+ T.type_alias do
310
+ T.any(
311
+ WhopSDK::Course::Chapter::Lesson::Thumbnail,
312
+ WhopSDK::Internal::AnyHash
313
+ )
314
+ end
315
+
316
+ # This is the URL you use to render optimized attachments on the client. This
317
+ # should be used for apps.
318
+ sig { returns(T.nilable(String)) }
319
+ attr_accessor :url
320
+
321
+ # The thumbnail for the lesson
322
+ sig { params(url: T.nilable(String)).returns(T.attached_class) }
323
+ def self.new(
324
+ # This is the URL you use to render optimized attachments on the client. This
325
+ # should be used for apps.
326
+ url:
327
+ )
328
+ end
329
+
330
+ sig { override.returns({ url: T.nilable(String) }) }
331
+ def to_hash
332
+ end
333
+ end
334
+
335
+ class VideoAsset < WhopSDK::Internal::Type::BaseModel
336
+ OrHash =
337
+ T.type_alias do
338
+ T.any(
339
+ WhopSDK::Course::Chapter::Lesson::VideoAsset,
340
+ WhopSDK::Internal::AnyHash
341
+ )
342
+ end
343
+
344
+ # The duration of the video in seconds
345
+ sig { returns(T.nilable(Integer)) }
346
+ attr_accessor :duration_seconds
347
+
348
+ # The signed thumbnail playback token of the Mux asset
349
+ sig { returns(T.nilable(String)) }
350
+ attr_accessor :signed_thumbnail_playback_token
351
+
352
+ # The associated Mux asset for video lessons
353
+ sig do
354
+ params(
355
+ duration_seconds: T.nilable(Integer),
356
+ signed_thumbnail_playback_token: T.nilable(String)
357
+ ).returns(T.attached_class)
358
+ end
359
+ def self.new(
360
+ # The duration of the video in seconds
361
+ duration_seconds:,
362
+ # The signed thumbnail playback token of the Mux asset
363
+ signed_thumbnail_playback_token:
364
+ )
365
+ end
366
+
367
+ sig do
368
+ override.returns(
369
+ {
370
+ duration_seconds: T.nilable(Integer),
371
+ signed_thumbnail_playback_token: T.nilable(String)
372
+ }
373
+ )
374
+ end
375
+ def to_hash
376
+ end
377
+ end
266
378
  end
267
379
  end
268
380
 
@@ -187,23 +187,76 @@ module WhopSDK
187
187
  sig { returns(String) }
188
188
  attr_accessor :id
189
189
 
190
+ # The chapter this lesson belongs to
191
+ sig { returns(WhopSDK::CourseLessonInteraction::Lesson::Chapter) }
192
+ attr_reader :chapter
193
+
194
+ sig do
195
+ params(
196
+ chapter: WhopSDK::CourseLessonInteraction::Lesson::Chapter::OrHash
197
+ ).void
198
+ end
199
+ attr_writer :chapter
200
+
190
201
  # The title of the lesson
191
202
  sig { returns(String) }
192
203
  attr_accessor :title
193
204
 
194
205
  # The lesson this interaction is for
195
- sig { params(id: String, title: String).returns(T.attached_class) }
206
+ sig do
207
+ params(
208
+ id: String,
209
+ chapter: WhopSDK::CourseLessonInteraction::Lesson::Chapter::OrHash,
210
+ title: String
211
+ ).returns(T.attached_class)
212
+ end
196
213
  def self.new(
197
214
  # The ID of the lesson
198
215
  id:,
216
+ # The chapter this lesson belongs to
217
+ chapter:,
199
218
  # The title of the lesson
200
219
  title:
201
220
  )
202
221
  end
203
222
 
204
- sig { override.returns({ id: String, title: String }) }
223
+ sig do
224
+ override.returns(
225
+ {
226
+ id: String,
227
+ chapter: WhopSDK::CourseLessonInteraction::Lesson::Chapter,
228
+ title: String
229
+ }
230
+ )
231
+ end
205
232
  def to_hash
206
233
  end
234
+
235
+ class Chapter < WhopSDK::Internal::Type::BaseModel
236
+ OrHash =
237
+ T.type_alias do
238
+ T.any(
239
+ WhopSDK::CourseLessonInteraction::Lesson::Chapter,
240
+ WhopSDK::Internal::AnyHash
241
+ )
242
+ end
243
+
244
+ # The ID of the chapter. Looks like chap_XXX
245
+ sig { returns(String) }
246
+ attr_accessor :id
247
+
248
+ # The chapter this lesson belongs to
249
+ sig { params(id: String).returns(T.attached_class) }
250
+ def self.new(
251
+ # The ID of the chapter. Looks like chap_XXX
252
+ id:
253
+ )
254
+ end
255
+
256
+ sig { override.returns({ id: String }) }
257
+ def to_hash
258
+ end
259
+ end
207
260
  end
208
261
 
209
262
  class User < WhopSDK::Internal::Type::BaseModel
@@ -96,23 +96,81 @@ module WhopSDK
96
96
  sig { returns(String) }
97
97
  attr_accessor :id
98
98
 
99
+ # The chapter this lesson belongs to
100
+ sig do
101
+ returns(WhopSDK::CourseLessonInteractionListItem::Lesson::Chapter)
102
+ end
103
+ attr_reader :chapter
104
+
105
+ sig do
106
+ params(
107
+ chapter:
108
+ WhopSDK::CourseLessonInteractionListItem::Lesson::Chapter::OrHash
109
+ ).void
110
+ end
111
+ attr_writer :chapter
112
+
99
113
  # The title of the lesson
100
114
  sig { returns(String) }
101
115
  attr_accessor :title
102
116
 
103
117
  # The lesson this interaction is for
104
- sig { params(id: String, title: String).returns(T.attached_class) }
118
+ sig do
119
+ params(
120
+ id: String,
121
+ chapter:
122
+ WhopSDK::CourseLessonInteractionListItem::Lesson::Chapter::OrHash,
123
+ title: String
124
+ ).returns(T.attached_class)
125
+ end
105
126
  def self.new(
106
127
  # The ID of the lesson
107
128
  id:,
129
+ # The chapter this lesson belongs to
130
+ chapter:,
108
131
  # The title of the lesson
109
132
  title:
110
133
  )
111
134
  end
112
135
 
113
- sig { override.returns({ id: String, title: String }) }
136
+ sig do
137
+ override.returns(
138
+ {
139
+ id: String,
140
+ chapter:
141
+ WhopSDK::CourseLessonInteractionListItem::Lesson::Chapter,
142
+ title: String
143
+ }
144
+ )
145
+ end
114
146
  def to_hash
115
147
  end
148
+
149
+ class Chapter < WhopSDK::Internal::Type::BaseModel
150
+ OrHash =
151
+ T.type_alias do
152
+ T.any(
153
+ WhopSDK::CourseLessonInteractionListItem::Lesson::Chapter,
154
+ WhopSDK::Internal::AnyHash
155
+ )
156
+ end
157
+
158
+ # The ID of the chapter. Looks like chap_XXX
159
+ sig { returns(String) }
160
+ attr_accessor :id
161
+
162
+ # The chapter this lesson belongs to
163
+ sig { params(id: String).returns(T.attached_class) }
164
+ def self.new(
165
+ # The ID of the chapter. Looks like chap_XXX
166
+ id:
167
+ )
168
+ end
169
+
170
+ sig { override.returns({ id: String }) }
171
+ def to_hash
172
+ end
173
+ end
116
174
  end
117
175
 
118
176
  class User < WhopSDK::Internal::Type::BaseModel
@@ -35,6 +35,10 @@ module WhopSDK
35
35
  sig { params(image: T.nilable(WhopSDK::Experience::Image::OrHash)).void }
36
36
  attr_writer :image
37
37
 
38
+ # Whether the experience is visible to the public
39
+ sig { returns(T::Boolean) }
40
+ attr_accessor :is_public
41
+
38
42
  # The written name of the description.
39
43
  sig { returns(String) }
40
44
  attr_accessor :name
@@ -57,6 +61,7 @@ module WhopSDK
57
61
  company: WhopSDK::Experience::Company::OrHash,
58
62
  created_at: Time,
59
63
  image: T.nilable(WhopSDK::Experience::Image::OrHash),
64
+ is_public: T::Boolean,
60
65
  name: String,
61
66
  order: T.nilable(String),
62
67
  products: T::Array[WhopSDK::Experience::Product::OrHash]
@@ -73,6 +78,8 @@ module WhopSDK
73
78
  created_at:,
74
79
  # The logo for the experience.
75
80
  image:,
81
+ # Whether the experience is visible to the public
82
+ is_public:,
76
83
  # The written name of the description.
77
84
  name:,
78
85
  # The order of the experience in the section
@@ -92,6 +99,7 @@ module WhopSDK
92
99
  company: WhopSDK::Experience::Company,
93
100
  created_at: Time,
94
101
  image: T.nilable(WhopSDK::Experience::Image),
102
+ is_public: T::Boolean,
95
103
  name: String,
96
104
  order: T.nilable(String),
97
105
  products: T::Array[WhopSDK::Experience::Product]
@@ -19,6 +19,10 @@ module WhopSDK
19
19
  sig { returns(String) }
20
20
  attr_accessor :company_id
21
21
 
22
+ # Whether the experience is publicly accessible
23
+ sig { returns(T.nilable(T::Boolean)) }
24
+ attr_accessor :is_public
25
+
22
26
  # The name of the experience
23
27
  sig { returns(T.nilable(String)) }
24
28
  attr_accessor :name
@@ -31,6 +35,7 @@ module WhopSDK
31
35
  params(
32
36
  app_id: String,
33
37
  company_id: String,
38
+ is_public: T.nilable(T::Boolean),
34
39
  name: T.nilable(String),
35
40
  section_id: T.nilable(String),
36
41
  request_options: WhopSDK::RequestOptions::OrHash
@@ -41,6 +46,8 @@ module WhopSDK
41
46
  app_id:,
42
47
  # The ID of the company to create the experience for
43
48
  company_id:,
49
+ # Whether the experience is publicly accessible
50
+ is_public: nil,
44
51
  # The name of the experience
45
52
  name: nil,
46
53
  # The ID of the section to create the experience in
@@ -54,6 +61,7 @@ module WhopSDK
54
61
  {
55
62
  app_id: String,
56
63
  company_id: String,
64
+ is_public: T.nilable(T::Boolean),
57
65
  name: T.nilable(String),
58
66
  section_id: T.nilable(String),
59
67
  request_options: WhopSDK::RequestOptions
@@ -51,6 +51,10 @@ module WhopSDK
51
51
  end
52
52
  attr_writer :image
53
53
 
54
+ # Whether the experience is visible to the public
55
+ sig { returns(T::Boolean) }
56
+ attr_accessor :is_public
57
+
54
58
  # The written name of the description.
55
59
  sig { returns(String) }
56
60
  attr_accessor :name
@@ -68,6 +72,7 @@ module WhopSDK
68
72
  created_at: Time,
69
73
  image:
70
74
  T.nilable(WhopSDK::Models::ExperienceListResponse::Image::OrHash),
75
+ is_public: T::Boolean,
71
76
  name: String,
72
77
  order: T.nilable(String)
73
78
  ).returns(T.attached_class)
@@ -83,6 +88,8 @@ module WhopSDK
83
88
  created_at:,
84
89
  # The logo for the experience.
85
90
  image:,
91
+ # Whether the experience is visible to the public
92
+ is_public:,
86
93
  # The written name of the description.
87
94
  name:,
88
95
  # The order of the experience in the section
@@ -98,6 +105,7 @@ module WhopSDK
98
105
  company: WhopSDK::Models::ExperienceListResponse::Company,
99
106
  created_at: Time,
100
107
  image: T.nilable(WhopSDK::Models::ExperienceListResponse::Image),
108
+ is_public: T::Boolean,
101
109
  name: String,
102
110
  order: T.nilable(String)
103
111
  }
@@ -19,6 +19,10 @@ module WhopSDK
19
19
  end
20
20
  attr_accessor :access_level
21
21
 
22
+ # Whether the experience is publicly accessible.
23
+ sig { returns(T.nilable(T::Boolean)) }
24
+ attr_accessor :is_public
25
+
22
26
  # The logo for the experience
23
27
  sig do
24
28
  returns(
@@ -48,6 +52,7 @@ module WhopSDK
48
52
  params(
49
53
  access_level:
50
54
  T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol),
55
+ is_public: T.nilable(T::Boolean),
51
56
  logo:
52
57
  T.nilable(
53
58
  T.any(
@@ -64,6 +69,8 @@ module WhopSDK
64
69
  def self.new(
65
70
  # The different access levels for experiences (PUBLIC IS NEVER USED ANYMORE).
66
71
  access_level: nil,
72
+ # Whether the experience is publicly accessible.
73
+ is_public: nil,
67
74
  # The logo for the experience
68
75
  logo: nil,
69
76
  # The name of the experience.
@@ -81,6 +88,7 @@ module WhopSDK
81
88
  {
82
89
  access_level:
83
90
  T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol),
91
+ is_public: T.nilable(T::Boolean),
84
92
  logo:
85
93
  T.nilable(
86
94
  T.any(