whop_sdk 0.0.23 → 0.0.24

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 (176) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/models/app_build_create_params.rb +16 -55
  5. data/lib/whop_sdk/models/app_create_params.rb +22 -1
  6. data/lib/whop_sdk/models/app_list_params.rb +5 -0
  7. data/lib/whop_sdk/models/app_update_params.rb +14 -53
  8. data/lib/whop_sdk/models/card_brands.rb +16 -0
  9. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +32 -56
  10. data/lib/whop_sdk/models/company_create_params.rb +22 -1
  11. data/lib/whop_sdk/models/company_update_params.rb +28 -106
  12. data/lib/whop_sdk/models/course_create_params.rb +15 -62
  13. data/lib/whop_sdk/models/course_lesson_create_params.rb +14 -53
  14. data/lib/whop_sdk/models/course_lesson_update_params.rb +53 -214
  15. data/lib/whop_sdk/models/course_update_params.rb +14 -61
  16. data/lib/whop_sdk/models/dispute_update_evidence_params.rb +56 -212
  17. data/lib/whop_sdk/models/experience_create_params.rb +22 -1
  18. data/lib/whop_sdk/models/experience_update_params.rb +14 -53
  19. data/lib/whop_sdk/models/forum_post_create_params.rb +13 -52
  20. data/lib/whop_sdk/models/forum_post_update_params.rb +13 -52
  21. data/lib/whop_sdk/models/friendly_receipt_status.rb +23 -11
  22. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +1 -34
  23. data/lib/whop_sdk/models/member_list_response.rb +9 -1
  24. data/lib/whop_sdk/models/member_retrieve_response.rb +9 -1
  25. data/lib/whop_sdk/models/membership.rb +76 -2
  26. data/lib/whop_sdk/models/membership_list_response.rb +38 -2
  27. data/lib/whop_sdk/models/membership_uncancel_params.rb +14 -0
  28. data/lib/whop_sdk/models/message_create_params.rb +13 -52
  29. data/lib/whop_sdk/models/message_update_params.rb +14 -53
  30. data/lib/whop_sdk/models/payment.rb +17 -1
  31. data/lib/whop_sdk/models/payment_list_response.rb +17 -1
  32. data/lib/whop_sdk/models/payment_method_types.rb +58 -57
  33. data/lib/whop_sdk/models/payment_provider.rb +1 -0
  34. data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +26 -1
  35. data/lib/whop_sdk/models/payout_method_list_response.rb +26 -1
  36. data/lib/whop_sdk/models/payout_method_retrieve_response.rb +26 -1
  37. data/lib/whop_sdk/models/plan_create_params.rb +14 -53
  38. data/lib/whop_sdk/models/plan_update_params.rb +14 -53
  39. data/lib/whop_sdk/models/withdrawal_create_params.rb +21 -1
  40. data/lib/whop_sdk/models/withdrawal_create_response.rb +2 -9
  41. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +2 -9
  42. data/lib/whop_sdk/models/withdrawal_list_response.rb +1 -9
  43. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +2 -9
  44. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +2 -9
  45. data/lib/whop_sdk/models.rb +2 -2
  46. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  47. data/lib/whop_sdk/resources/apps.rb +4 -2
  48. data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
  49. data/lib/whop_sdk/resources/companies.rb +5 -3
  50. data/lib/whop_sdk/resources/course_lessons.rb +4 -4
  51. data/lib/whop_sdk/resources/courses.rb +4 -8
  52. data/lib/whop_sdk/resources/disputes.rb +4 -4
  53. data/lib/whop_sdk/resources/experiences.rb +4 -2
  54. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  55. data/lib/whop_sdk/resources/memberships.rb +32 -0
  56. data/lib/whop_sdk/resources/messages.rb +2 -2
  57. data/lib/whop_sdk/resources/notifications.rb +4 -0
  58. data/lib/whop_sdk/resources/plans.rb +2 -2
  59. data/lib/whop_sdk/resources/withdrawals.rb +8 -1
  60. data/lib/whop_sdk/version.rb +1 -1
  61. data/lib/whop_sdk.rb +1 -1
  62. data/rbi/whop_sdk/models/app_build_create_params.rbi +26 -89
  63. data/rbi/whop_sdk/models/app_create_params.rbi +36 -0
  64. data/rbi/whop_sdk/models/app_list_params.rbi +10 -0
  65. data/rbi/whop_sdk/models/app_update_params.rbi +21 -93
  66. data/rbi/whop_sdk/models/card_brands.rbi +17 -0
  67. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +45 -87
  68. data/rbi/whop_sdk/models/company_create_params.rbi +39 -0
  69. data/rbi/whop_sdk/models/company_update_params.rbi +47 -185
  70. data/rbi/whop_sdk/models/course_create_params.rbi +24 -101
  71. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +25 -92
  72. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +97 -359
  73. data/rbi/whop_sdk/models/course_update_params.rbi +24 -101
  74. data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +116 -340
  75. data/rbi/whop_sdk/models/experience_create_params.rbi +41 -0
  76. data/rbi/whop_sdk/models/experience_update_params.rbi +24 -93
  77. data/rbi/whop_sdk/models/forum_post_create_params.rbi +18 -94
  78. data/rbi/whop_sdk/models/forum_post_update_params.rbi +18 -94
  79. data/rbi/whop_sdk/models/friendly_receipt_status.rbi +62 -17
  80. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +0 -105
  81. data/rbi/whop_sdk/models/member_list_response.rbi +8 -0
  82. data/rbi/whop_sdk/models/member_retrieve_response.rbi +8 -0
  83. data/rbi/whop_sdk/models/membership.rbi +126 -4
  84. data/rbi/whop_sdk/models/membership_list_response.rbi +98 -4
  85. data/rbi/whop_sdk/models/membership_uncancel_params.rbi +27 -0
  86. data/rbi/whop_sdk/models/message_create_params.rbi +18 -94
  87. data/rbi/whop_sdk/models/message_update_params.rbi +18 -94
  88. data/rbi/whop_sdk/models/payment.rbi +16 -0
  89. data/rbi/whop_sdk/models/payment_list_response.rbi +16 -0
  90. data/rbi/whop_sdk/models/payment_method_types.rbi +66 -64
  91. data/rbi/whop_sdk/models/payment_provider.rbi +1 -0
  92. data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +26 -0
  93. data/rbi/whop_sdk/models/payout_method_list_response.rbi +26 -0
  94. data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +26 -0
  95. data/rbi/whop_sdk/models/plan_create_params.rbi +21 -93
  96. data/rbi/whop_sdk/models/plan_update_params.rbi +21 -93
  97. data/rbi/whop_sdk/models/withdrawal_create_params.rbi +18 -0
  98. data/rbi/whop_sdk/models/withdrawal_create_response.rbi +8 -11
  99. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +8 -11
  100. data/rbi/whop_sdk/models/withdrawal_list_response.rbi +3 -11
  101. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +8 -11
  102. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +8 -11
  103. data/rbi/whop_sdk/models.rbi +2 -2
  104. data/rbi/whop_sdk/resources/app_builds.rbi +1 -5
  105. data/rbi/whop_sdk/resources/apps.rbi +4 -7
  106. data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
  107. data/rbi/whop_sdk/resources/companies.rbi +5 -13
  108. data/rbi/whop_sdk/resources/course_lessons.rbi +4 -24
  109. data/rbi/whop_sdk/resources/courses.rbi +2 -20
  110. data/rbi/whop_sdk/resources/disputes.rbi +4 -16
  111. data/rbi/whop_sdk/resources/experiences.rbi +4 -7
  112. data/rbi/whop_sdk/resources/forum_posts.rbi +2 -12
  113. data/rbi/whop_sdk/resources/memberships.rbi +26 -0
  114. data/rbi/whop_sdk/resources/messages.rbi +2 -12
  115. data/rbi/whop_sdk/resources/notifications.rbi +4 -0
  116. data/rbi/whop_sdk/resources/plans.rbi +2 -14
  117. data/rbi/whop_sdk/resources/withdrawals.rbi +7 -0
  118. data/sig/whop_sdk/models/app_build_create_params.rbs +9 -30
  119. data/sig/whop_sdk/models/app_create_params.rbs +20 -1
  120. data/sig/whop_sdk/models/app_list_params.rbs +10 -0
  121. data/sig/whop_sdk/models/app_update_params.rbs +9 -30
  122. data/sig/whop_sdk/models/card_brands.rbs +32 -0
  123. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +19 -30
  124. data/sig/whop_sdk/models/company_create_params.rbs +15 -0
  125. data/sig/whop_sdk/models/company_update_params.rbs +18 -60
  126. data/sig/whop_sdk/models/course_create_params.rbs +9 -35
  127. data/sig/whop_sdk/models/course_lesson_create_params.rbs +9 -30
  128. data/sig/whop_sdk/models/course_lesson_update_params.rbs +36 -120
  129. data/sig/whop_sdk/models/course_update_params.rbs +9 -35
  130. data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +36 -120
  131. data/sig/whop_sdk/models/experience_create_params.rbs +15 -0
  132. data/sig/whop_sdk/models/experience_update_params.rbs +9 -30
  133. data/sig/whop_sdk/models/forum_post_create_params.rbs +9 -30
  134. data/sig/whop_sdk/models/forum_post_update_params.rbs +9 -30
  135. data/sig/whop_sdk/models/friendly_receipt_status.rbs +46 -22
  136. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +0 -38
  137. data/sig/whop_sdk/models/member_list_response.rbs +5 -0
  138. data/sig/whop_sdk/models/member_retrieve_response.rbs +5 -0
  139. data/sig/whop_sdk/models/membership.rbs +65 -4
  140. data/sig/whop_sdk/models/membership_list_response.rbs +45 -4
  141. data/sig/whop_sdk/models/membership_uncancel_params.rbs +15 -0
  142. data/sig/whop_sdk/models/message_create_params.rbs +9 -30
  143. data/sig/whop_sdk/models/message_update_params.rbs +9 -30
  144. data/sig/whop_sdk/models/payment.rbs +10 -0
  145. data/sig/whop_sdk/models/payment_list_response.rbs +10 -0
  146. data/sig/whop_sdk/models/payment_method_types.rbs +117 -115
  147. data/sig/whop_sdk/models/payment_provider.rbs +2 -0
  148. data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +15 -0
  149. data/sig/whop_sdk/models/payout_method_list_response.rbs +15 -0
  150. data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +15 -0
  151. data/sig/whop_sdk/models/plan_create_params.rbs +9 -30
  152. data/sig/whop_sdk/models/plan_update_params.rbs +9 -30
  153. data/sig/whop_sdk/models/withdrawal_create_params.rbs +11 -1
  154. data/sig/whop_sdk/models/withdrawal_create_response.rbs +5 -8
  155. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +5 -8
  156. data/sig/whop_sdk/models/withdrawal_list_response.rbs +3 -8
  157. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +5 -8
  158. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +5 -8
  159. data/sig/whop_sdk/models.rbs +2 -2
  160. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  161. data/sig/whop_sdk/resources/apps.rbs +2 -1
  162. data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
  163. data/sig/whop_sdk/resources/companies.rbs +3 -2
  164. data/sig/whop_sdk/resources/course_lessons.rbs +4 -4
  165. data/sig/whop_sdk/resources/courses.rbs +2 -4
  166. data/sig/whop_sdk/resources/disputes.rbs +4 -4
  167. data/sig/whop_sdk/resources/experiences.rbs +2 -1
  168. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  169. data/sig/whop_sdk/resources/memberships.rbs +5 -0
  170. data/sig/whop_sdk/resources/messages.rbs +2 -2
  171. data/sig/whop_sdk/resources/plans.rbs +2 -2
  172. data/sig/whop_sdk/resources/withdrawals.rbs +2 -0
  173. metadata +19 -5
  174. data/lib/whop_sdk/models/withdrawal_types.rb +0 -16
  175. data/rbi/whop_sdk/models/withdrawal_types.rbi +0 -20
  176. data/sig/whop_sdk/models/withdrawal_types.rbs +0 -14
@@ -46,14 +46,7 @@ module WhopSDK
46
46
  # attachments.
47
47
  sig do
48
48
  returns(
49
- T.nilable(
50
- T::Array[
51
- T.any(
52
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
53
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID
54
- )
55
- ]
56
- )
49
+ T.nilable(T::Array[WhopSDK::CourseLessonUpdateParams::Attachment])
57
50
  )
58
51
  end
59
52
  attr_accessor :attachments
@@ -79,17 +72,16 @@ module WhopSDK
79
72
  attr_accessor :lesson_type
80
73
 
81
74
  # The main PDF file for this lesson
75
+ sig { returns(T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf)) }
76
+ attr_reader :main_pdf
77
+
82
78
  sig do
83
- returns(
84
- T.nilable(
85
- T.any(
86
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID,
87
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID
88
- )
89
- )
90
- )
79
+ params(
80
+ main_pdf:
81
+ T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf::OrHash)
82
+ ).void
91
83
  end
92
- attr_accessor :main_pdf
84
+ attr_writer :main_pdf
93
85
 
94
86
  # Maximum number of attempts allowed for assessments
95
87
  sig { returns(T.nilable(Integer)) }
@@ -100,17 +92,16 @@ module WhopSDK
100
92
  attr_accessor :mux_asset_id
101
93
 
102
94
  # The thumbnail for the lesson in png, jpeg, or gif format
95
+ sig { returns(T.nilable(WhopSDK::CourseLessonUpdateParams::Thumbnail)) }
96
+ attr_reader :thumbnail
97
+
103
98
  sig do
104
- returns(
105
- T.nilable(
106
- T.any(
107
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
108
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID
109
- )
110
- )
111
- )
99
+ params(
100
+ thumbnail:
101
+ T.nilable(WhopSDK::CourseLessonUpdateParams::Thumbnail::OrHash)
102
+ ).void
112
103
  end
113
- attr_accessor :thumbnail
104
+ attr_writer :thumbnail
114
105
 
115
106
  # The title of the lesson
116
107
  sig { returns(T.nilable(String)) }
@@ -135,12 +126,7 @@ module WhopSDK
135
126
  ),
136
127
  attachments:
137
128
  T.nilable(
138
- T::Array[
139
- T.any(
140
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
141
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID::OrHash
142
- )
143
- ]
129
+ T::Array[WhopSDK::CourseLessonUpdateParams::Attachment::OrHash]
144
130
  ),
145
131
  content: T.nilable(String),
146
132
  days_from_course_start_until_unlock: T.nilable(Integer),
@@ -148,21 +134,11 @@ module WhopSDK
148
134
  embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
149
135
  lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol),
150
136
  main_pdf:
151
- T.nilable(
152
- T.any(
153
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID::OrHash,
154
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID::OrHash
155
- )
156
- ),
137
+ T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf::OrHash),
157
138
  max_attempts: T.nilable(Integer),
158
139
  mux_asset_id: T.nilable(String),
159
140
  thumbnail:
160
- T.nilable(
161
- T.any(
162
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
163
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID::OrHash
164
- )
165
- ),
141
+ T.nilable(WhopSDK::CourseLessonUpdateParams::Thumbnail::OrHash),
166
142
  title: T.nilable(String),
167
143
  visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol),
168
144
  request_options: WhopSDK::RequestOptions::OrHash
@@ -217,34 +193,17 @@ module WhopSDK
217
193
  ),
218
194
  attachments:
219
195
  T.nilable(
220
- T::Array[
221
- T.any(
222
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
223
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID
224
- )
225
- ]
196
+ T::Array[WhopSDK::CourseLessonUpdateParams::Attachment]
226
197
  ),
227
198
  content: T.nilable(String),
228
199
  days_from_course_start_until_unlock: T.nilable(Integer),
229
200
  embed_id: T.nilable(String),
230
201
  embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
231
202
  lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol),
232
- main_pdf:
233
- T.nilable(
234
- T.any(
235
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID,
236
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID
237
- )
238
- ),
203
+ main_pdf: T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf),
239
204
  max_attempts: T.nilable(Integer),
240
205
  mux_asset_id: T.nilable(String),
241
- thumbnail:
242
- T.nilable(
243
- T.any(
244
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
245
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID
246
- )
247
- ),
206
+ thumbnail: T.nilable(WhopSDK::CourseLessonUpdateParams::Thumbnail),
248
207
  title: T.nilable(String),
249
208
  visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol),
250
209
  request_options: WhopSDK::RequestOptions
@@ -332,14 +291,21 @@ module WhopSDK
332
291
  sig do
333
292
  returns(
334
293
  T.nilable(
335
- T.any(
336
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID,
337
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID
338
- )
294
+ WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image
339
295
  )
340
296
  )
341
297
  end
342
- attr_accessor :image
298
+ attr_reader :image
299
+
300
+ sig do
301
+ params(
302
+ image:
303
+ T.nilable(
304
+ WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::OrHash
305
+ )
306
+ ).void
307
+ end
308
+ attr_writer :image
343
309
 
344
310
  # The answer options for multiple choice/select questions
345
311
  sig do
@@ -362,10 +328,7 @@ module WhopSDK
362
328
  id: T.nilable(String),
363
329
  image:
364
330
  T.nilable(
365
- T.any(
366
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID::OrHash,
367
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID::OrHash
368
- )
331
+ WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::OrHash
369
332
  ),
370
333
  options:
371
334
  T.nilable(
@@ -401,10 +364,7 @@ module WhopSDK
401
364
  id: T.nilable(String),
402
365
  image:
403
366
  T.nilable(
404
- T.any(
405
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID,
406
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID
407
- )
367
+ WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image
408
368
  ),
409
369
  options:
410
370
  T.nilable(
@@ -418,86 +378,29 @@ module WhopSDK
418
378
  def to_hash
419
379
  end
420
380
 
421
- # Optional image attachment for the question
422
- module Image
423
- extend WhopSDK::Internal::Type::Union
424
-
425
- Variants =
381
+ class Image < WhopSDK::Internal::Type::BaseModel
382
+ OrHash =
426
383
  T.type_alias do
427
384
  T.any(
428
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID,
429
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID
385
+ WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image,
386
+ WhopSDK::Internal::AnyHash
430
387
  )
431
388
  end
432
389
 
433
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
434
- OrHash =
435
- T.type_alias do
436
- T.any(
437
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID,
438
- WhopSDK::Internal::AnyHash
439
- )
440
- end
441
-
442
- # This ID should be used the first time you upload an attachment. It is the ID of
443
- # the direct upload that was created when uploading the file to S3 via the
444
- # mediaDirectUpload mutation.
445
- sig { returns(String) }
446
- attr_accessor :direct_upload_id
447
-
448
- # Input for an attachment
449
- sig { params(direct_upload_id: String).returns(T.attached_class) }
450
- def self.new(
451
- # This ID should be used the first time you upload an attachment. It is the ID of
452
- # the direct upload that was created when uploading the file to S3 via the
453
- # mediaDirectUpload mutation.
454
- direct_upload_id:
455
- )
456
- end
457
-
458
- sig { override.returns({ direct_upload_id: String }) }
459
- def to_hash
460
- end
461
- end
462
-
463
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
464
- OrHash =
465
- T.type_alias do
466
- T.any(
467
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID,
468
- WhopSDK::Internal::AnyHash
469
- )
470
- end
471
-
472
- # The ID of an existing attachment object. Use this when updating a resource and
473
- # keeping a subset of the attachments. Don't use this unless you know what you're
474
- # doing.
475
- sig { returns(String) }
476
- attr_accessor :id
477
-
478
- # Input for an attachment
479
- sig { params(id: String).returns(T.attached_class) }
480
- def self.new(
481
- # The ID of an existing attachment object. Use this when updating a resource and
482
- # keeping a subset of the attachments. Don't use this unless you know what you're
483
- # doing.
484
- id:
485
- )
486
- end
390
+ # The ID of an existing file object.
391
+ sig { returns(String) }
392
+ attr_accessor :id
487
393
 
488
- sig { override.returns({ id: String }) }
489
- def to_hash
490
- end
394
+ # Optional image attachment for the question
395
+ sig { params(id: String).returns(T.attached_class) }
396
+ def self.new(
397
+ # The ID of an existing file object.
398
+ id:
399
+ )
491
400
  end
492
401
 
493
- sig do
494
- override.returns(
495
- T::Array[
496
- WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::Variants
497
- ]
498
- )
499
- end
500
- def self.variants
402
+ sig { override.returns({ id: String }) }
403
+ def to_hash
501
404
  end
502
405
  end
503
406
 
@@ -556,246 +459,81 @@ module WhopSDK
556
459
  end
557
460
  end
558
461
 
559
- # Input for an attachment
560
- module Attachment
561
- extend WhopSDK::Internal::Type::Union
562
-
563
- Variants =
462
+ class Attachment < WhopSDK::Internal::Type::BaseModel
463
+ OrHash =
564
464
  T.type_alias do
565
465
  T.any(
566
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
567
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID
466
+ WhopSDK::CourseLessonUpdateParams::Attachment,
467
+ WhopSDK::Internal::AnyHash
568
468
  )
569
469
  end
570
470
 
571
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
572
- OrHash =
573
- T.type_alias do
574
- T.any(
575
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
576
- WhopSDK::Internal::AnyHash
577
- )
578
- end
579
-
580
- # This ID should be used the first time you upload an attachment. It is the ID of
581
- # the direct upload that was created when uploading the file to S3 via the
582
- # mediaDirectUpload mutation.
583
- sig { returns(String) }
584
- attr_accessor :direct_upload_id
585
-
586
- # Input for an attachment
587
- sig { params(direct_upload_id: String).returns(T.attached_class) }
588
- def self.new(
589
- # This ID should be used the first time you upload an attachment. It is the ID of
590
- # the direct upload that was created when uploading the file to S3 via the
591
- # mediaDirectUpload mutation.
592
- direct_upload_id:
593
- )
594
- end
595
-
596
- sig { override.returns({ direct_upload_id: String }) }
597
- def to_hash
598
- end
599
- end
600
-
601
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
602
- OrHash =
603
- T.type_alias do
604
- T.any(
605
- WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID,
606
- WhopSDK::Internal::AnyHash
607
- )
608
- end
609
-
610
- # The ID of an existing attachment object. Use this when updating a resource and
611
- # keeping a subset of the attachments. Don't use this unless you know what you're
612
- # doing.
613
- sig { returns(String) }
614
- attr_accessor :id
615
-
616
- # Input for an attachment
617
- sig { params(id: String).returns(T.attached_class) }
618
- def self.new(
619
- # The ID of an existing attachment object. Use this when updating a resource and
620
- # keeping a subset of the attachments. Don't use this unless you know what you're
621
- # doing.
622
- id:
623
- )
624
- end
471
+ # The ID of an existing file object.
472
+ sig { returns(String) }
473
+ attr_accessor :id
625
474
 
626
- sig { override.returns({ id: String }) }
627
- def to_hash
628
- end
475
+ # Input for an attachment
476
+ sig { params(id: String).returns(T.attached_class) }
477
+ def self.new(
478
+ # The ID of an existing file object.
479
+ id:
480
+ )
629
481
  end
630
482
 
631
- sig do
632
- override.returns(
633
- T::Array[WhopSDK::CourseLessonUpdateParams::Attachment::Variants]
634
- )
635
- end
636
- def self.variants
483
+ sig { override.returns({ id: String }) }
484
+ def to_hash
637
485
  end
638
486
  end
639
487
 
640
- # The main PDF file for this lesson
641
- module MainPdf
642
- extend WhopSDK::Internal::Type::Union
643
-
644
- Variants =
488
+ class MainPdf < WhopSDK::Internal::Type::BaseModel
489
+ OrHash =
645
490
  T.type_alias do
646
491
  T.any(
647
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID,
648
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID
492
+ WhopSDK::CourseLessonUpdateParams::MainPdf,
493
+ WhopSDK::Internal::AnyHash
649
494
  )
650
495
  end
651
496
 
652
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
653
- OrHash =
654
- T.type_alias do
655
- T.any(
656
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID,
657
- WhopSDK::Internal::AnyHash
658
- )
659
- end
660
-
661
- # This ID should be used the first time you upload an attachment. It is the ID of
662
- # the direct upload that was created when uploading the file to S3 via the
663
- # mediaDirectUpload mutation.
664
- sig { returns(String) }
665
- attr_accessor :direct_upload_id
666
-
667
- # Input for an attachment
668
- sig { params(direct_upload_id: String).returns(T.attached_class) }
669
- def self.new(
670
- # This ID should be used the first time you upload an attachment. It is the ID of
671
- # the direct upload that was created when uploading the file to S3 via the
672
- # mediaDirectUpload mutation.
673
- direct_upload_id:
674
- )
675
- end
676
-
677
- sig { override.returns({ direct_upload_id: String }) }
678
- def to_hash
679
- end
680
- end
681
-
682
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
683
- OrHash =
684
- T.type_alias do
685
- T.any(
686
- WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID,
687
- WhopSDK::Internal::AnyHash
688
- )
689
- end
690
-
691
- # The ID of an existing attachment object. Use this when updating a resource and
692
- # keeping a subset of the attachments. Don't use this unless you know what you're
693
- # doing.
694
- sig { returns(String) }
695
- attr_accessor :id
696
-
697
- # Input for an attachment
698
- sig { params(id: String).returns(T.attached_class) }
699
- def self.new(
700
- # The ID of an existing attachment object. Use this when updating a resource and
701
- # keeping a subset of the attachments. Don't use this unless you know what you're
702
- # doing.
703
- id:
704
- )
705
- end
497
+ # The ID of an existing file object.
498
+ sig { returns(String) }
499
+ attr_accessor :id
706
500
 
707
- sig { override.returns({ id: String }) }
708
- def to_hash
709
- end
501
+ # The main PDF file for this lesson
502
+ sig { params(id: String).returns(T.attached_class) }
503
+ def self.new(
504
+ # The ID of an existing file object.
505
+ id:
506
+ )
710
507
  end
711
508
 
712
- sig do
713
- override.returns(
714
- T::Array[WhopSDK::CourseLessonUpdateParams::MainPdf::Variants]
715
- )
716
- end
717
- def self.variants
509
+ sig { override.returns({ id: String }) }
510
+ def to_hash
718
511
  end
719
512
  end
720
513
 
721
- # The thumbnail for the lesson in png, jpeg, or gif format
722
- module Thumbnail
723
- extend WhopSDK::Internal::Type::Union
724
-
725
- Variants =
514
+ class Thumbnail < WhopSDK::Internal::Type::BaseModel
515
+ OrHash =
726
516
  T.type_alias do
727
517
  T.any(
728
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
729
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID
518
+ WhopSDK::CourseLessonUpdateParams::Thumbnail,
519
+ WhopSDK::Internal::AnyHash
730
520
  )
731
521
  end
732
522
 
733
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
734
- OrHash =
735
- T.type_alias do
736
- T.any(
737
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
738
- WhopSDK::Internal::AnyHash
739
- )
740
- end
741
-
742
- # This ID should be used the first time you upload an attachment. It is the ID of
743
- # the direct upload that was created when uploading the file to S3 via the
744
- # mediaDirectUpload mutation.
745
- sig { returns(String) }
746
- attr_accessor :direct_upload_id
747
-
748
- # Input for an attachment
749
- sig { params(direct_upload_id: String).returns(T.attached_class) }
750
- def self.new(
751
- # This ID should be used the first time you upload an attachment. It is the ID of
752
- # the direct upload that was created when uploading the file to S3 via the
753
- # mediaDirectUpload mutation.
754
- direct_upload_id:
755
- )
756
- end
757
-
758
- sig { override.returns({ direct_upload_id: String }) }
759
- def to_hash
760
- end
761
- end
762
-
763
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
764
- OrHash =
765
- T.type_alias do
766
- T.any(
767
- WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID,
768
- WhopSDK::Internal::AnyHash
769
- )
770
- end
771
-
772
- # The ID of an existing attachment object. Use this when updating a resource and
773
- # keeping a subset of the attachments. Don't use this unless you know what you're
774
- # doing.
775
- sig { returns(String) }
776
- attr_accessor :id
777
-
778
- # Input for an attachment
779
- sig { params(id: String).returns(T.attached_class) }
780
- def self.new(
781
- # The ID of an existing attachment object. Use this when updating a resource and
782
- # keeping a subset of the attachments. Don't use this unless you know what you're
783
- # doing.
784
- id:
785
- )
786
- end
523
+ # The ID of an existing file object.
524
+ sig { returns(String) }
525
+ attr_accessor :id
787
526
 
788
- sig { override.returns({ id: String }) }
789
- def to_hash
790
- end
527
+ # The thumbnail for the lesson in png, jpeg, or gif format
528
+ sig { params(id: String).returns(T.attached_class) }
529
+ def self.new(
530
+ # The ID of an existing file object.
531
+ id:
532
+ )
791
533
  end
792
534
 
793
- sig do
794
- override.returns(
795
- T::Array[WhopSDK::CourseLessonUpdateParams::Thumbnail::Variants]
796
- )
797
- end
798
- def self.variants
535
+ sig { override.returns({ id: String }) }
536
+ def to_hash
799
537
  end
800
538
  end
801
539
  end