whop_sdk 0.0.3 → 0.0.4

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 (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +4 -0
  5. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  6. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  7. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +115 -39
  8. data/lib/whop_sdk/models/company.rb +13 -1
  9. data/lib/whop_sdk/models/company_create_params.rb +46 -0
  10. data/lib/whop_sdk/models/company_list_params.rb +62 -0
  11. data/lib/whop_sdk/models/company_list_response.rb +175 -0
  12. data/lib/whop_sdk/models/course_create_params.rb +75 -30
  13. data/lib/whop_sdk/models/course_lesson_update_params.rb +204 -83
  14. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  15. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  16. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  17. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  18. data/lib/whop_sdk/models/course_update_params.rb +51 -27
  19. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  20. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  21. data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
  22. data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
  23. data/lib/whop_sdk/models/lesson.rb +16 -8
  24. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  25. data/lib/whop_sdk/models/message_update_params.rb +51 -27
  26. data/lib/whop_sdk/models/payment.rb +10 -1
  27. data/lib/whop_sdk/models/payment_list_response.rb +10 -1
  28. data/lib/whop_sdk/models/payment_method_types.rb +2 -1
  29. data/lib/whop_sdk/models/plan.rb +48 -1
  30. data/lib/whop_sdk/models/plan_create_params.rb +97 -22
  31. data/lib/whop_sdk/models/plan_list_response.rb +51 -1
  32. data/lib/whop_sdk/models/plan_update_params.rb +97 -22
  33. data/lib/whop_sdk/models/product_update_params.rb +53 -29
  34. data/lib/whop_sdk/models/transfer.rb +9 -1
  35. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  36. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  37. data/lib/whop_sdk/models.rb +8 -0
  38. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  39. data/lib/whop_sdk/resources/apps.rb +1 -1
  40. data/lib/whop_sdk/resources/checkout_configurations.rb +6 -6
  41. data/lib/whop_sdk/resources/companies.rb +70 -0
  42. data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
  43. data/lib/whop_sdk/resources/course_lessons.rb +7 -3
  44. data/lib/whop_sdk/resources/course_students.rb +76 -0
  45. data/lib/whop_sdk/resources/courses.rb +10 -3
  46. data/lib/whop_sdk/resources/experiences.rb +1 -1
  47. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  48. data/lib/whop_sdk/resources/invoices.rb +11 -11
  49. data/lib/whop_sdk/resources/messages.rb +2 -2
  50. data/lib/whop_sdk/resources/plans.rb +8 -4
  51. data/lib/whop_sdk/resources/products.rb +1 -1
  52. data/lib/whop_sdk/resources/transfers.rb +3 -1
  53. data/lib/whop_sdk/version.rb +1 -1
  54. data/lib/whop_sdk.rb +8 -1
  55. data/rbi/whop_sdk/client.rbi +3 -0
  56. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  57. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  58. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +192 -64
  59. data/rbi/whop_sdk/models/company.rbi +10 -0
  60. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  61. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  62. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  63. data/rbi/whop_sdk/models/course_create_params.rbi +104 -38
  64. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +326 -114
  65. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  66. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  67. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  68. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  69. data/rbi/whop_sdk/models/course_update_params.rbi +84 -38
  70. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  71. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  72. data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
  73. data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
  74. data/rbi/whop_sdk/models/lesson.rbi +14 -10
  75. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  76. data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
  77. data/rbi/whop_sdk/models/payment.rbi +10 -0
  78. data/rbi/whop_sdk/models/payment_list_response.rbi +10 -0
  79. data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
  80. data/rbi/whop_sdk/models/plan.rbi +82 -0
  81. data/rbi/whop_sdk/models/plan_create_params.rbi +174 -32
  82. data/rbi/whop_sdk/models/plan_list_response.rbi +94 -0
  83. data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
  84. data/rbi/whop_sdk/models/product_update_params.rbi +83 -39
  85. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  86. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  87. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  88. data/rbi/whop_sdk/models.rbi +8 -0
  89. data/rbi/whop_sdk/resources/app_builds.rbi +5 -1
  90. data/rbi/whop_sdk/resources/apps.rbi +7 -1
  91. data/rbi/whop_sdk/resources/checkout_configurations.rbi +6 -7
  92. data/rbi/whop_sdk/resources/companies.rbi +63 -0
  93. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
  94. data/rbi/whop_sdk/resources/course_lessons.rbi +21 -2
  95. data/rbi/whop_sdk/resources/course_students.rbi +65 -0
  96. data/rbi/whop_sdk/resources/courses.rbi +22 -2
  97. data/rbi/whop_sdk/resources/experiences.rbi +7 -1
  98. data/rbi/whop_sdk/resources/forum_posts.rbi +12 -2
  99. data/rbi/whop_sdk/resources/invoices.rbi +18 -18
  100. data/rbi/whop_sdk/resources/messages.rbi +12 -2
  101. data/rbi/whop_sdk/resources/plans.rbi +28 -2
  102. data/rbi/whop_sdk/resources/products.rbi +6 -1
  103. data/rbi/whop_sdk/resources/transfers.rbi +3 -0
  104. data/sig/whop_sdk/client.rbs +2 -0
  105. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  106. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  107. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
  108. data/sig/whop_sdk/models/company.rbs +5 -0
  109. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  110. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  111. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  112. data/sig/whop_sdk/models/course_create_params.rbs +39 -10
  113. data/sig/whop_sdk/models/course_lesson_update_params.rbs +116 -30
  114. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  115. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  116. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  117. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  118. data/sig/whop_sdk/models/course_update_params.rbs +29 -10
  119. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  120. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  121. data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
  122. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  123. data/sig/whop_sdk/models/lesson.rbs +8 -8
  124. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  125. data/sig/whop_sdk/models/message_update_params.rbs +29 -10
  126. data/sig/whop_sdk/models/payment.rbs +5 -0
  127. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  128. data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
  129. data/sig/whop_sdk/models/plan.rbs +32 -0
  130. data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
  131. data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
  132. data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
  133. data/sig/whop_sdk/models/product_update_params.rbs +29 -10
  134. data/sig/whop_sdk/models/transfer.rbs +5 -0
  135. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  136. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  137. data/sig/whop_sdk/models.rbs +8 -0
  138. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  139. data/sig/whop_sdk/resources/apps.rbs +1 -1
  140. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  141. data/sig/whop_sdk/resources/companies.rbs +18 -0
  142. data/sig/whop_sdk/resources/course_lessons.rbs +4 -2
  143. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  144. data/sig/whop_sdk/resources/courses.rbs +4 -2
  145. data/sig/whop_sdk/resources/experiences.rbs +1 -1
  146. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  147. data/sig/whop_sdk/resources/invoices.rbs +5 -5
  148. data/sig/whop_sdk/resources/messages.rbs +2 -2
  149. data/sig/whop_sdk/resources/plans.rbs +4 -2
  150. data/sig/whop_sdk/resources/products.rbs +1 -1
  151. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  152. metadata +26 -5
  153. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  154. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  155. data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
@@ -2,12 +2,14 @@ module WhopSDK
2
2
  module Models
3
3
  type course_lesson_update_params =
4
4
  {
5
+ assessment_completion_requirement: WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement?,
5
6
  assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]?,
6
- attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]?,
7
+ attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]?,
7
8
  content: String?,
8
9
  days_from_course_start_until_unlock: Integer?,
9
10
  lesson_type: WhopSDK::Models::lesson_types?,
10
- main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf?,
11
+ main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf?,
12
+ max_attempts: Integer?,
11
13
  mux_asset_id: String?,
12
14
  title: String?,
13
15
  visibility: WhopSDK::Models::lesson_visibilities?
@@ -18,9 +20,11 @@ module WhopSDK
18
20
  extend WhopSDK::Internal::Type::RequestParameters::Converter
19
21
  include WhopSDK::Internal::Type::RequestParameters
20
22
 
23
+ attr_accessor assessment_completion_requirement: WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement?
24
+
21
25
  attr_accessor assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]?
22
26
 
23
- attr_accessor attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]?
27
+ attr_accessor attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]?
24
28
 
25
29
  attr_accessor content: String?
26
30
 
@@ -28,7 +32,9 @@ module WhopSDK
28
32
 
29
33
  attr_accessor lesson_type: WhopSDK::Models::lesson_types?
30
34
 
31
- attr_accessor main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf?
35
+ attr_accessor main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf?
36
+
37
+ attr_accessor max_attempts: Integer?
32
38
 
33
39
  attr_accessor mux_asset_id: String?
34
40
 
@@ -37,12 +43,14 @@ module WhopSDK
37
43
  attr_accessor visibility: WhopSDK::Models::lesson_visibilities?
38
44
 
39
45
  def initialize: (
46
+ ?assessment_completion_requirement: WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement?,
40
47
  ?assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]?,
41
- ?attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]?,
48
+ ?attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]?,
42
49
  ?content: String?,
43
50
  ?days_from_course_start_until_unlock: Integer?,
44
51
  ?lesson_type: WhopSDK::Models::lesson_types?,
45
- ?main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf?,
52
+ ?main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf?,
53
+ ?max_attempts: Integer?,
46
54
  ?mux_asset_id: String?,
47
55
  ?title: String?,
48
56
  ?visibility: WhopSDK::Models::lesson_visibilities?,
@@ -50,25 +58,46 @@ module WhopSDK
50
58
  ) -> void
51
59
 
52
60
  def to_hash: -> {
61
+ assessment_completion_requirement: WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement?,
53
62
  assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]?,
54
- attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]?,
63
+ attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]?,
55
64
  content: String?,
56
65
  days_from_course_start_until_unlock: Integer?,
57
66
  lesson_type: WhopSDK::Models::lesson_types?,
58
- main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf?,
67
+ main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf?,
68
+ max_attempts: Integer?,
59
69
  mux_asset_id: String?,
60
70
  title: String?,
61
71
  visibility: WhopSDK::Models::lesson_visibilities?,
62
72
  request_options: WhopSDK::RequestOptions
63
73
  }
64
74
 
75
+ type assessment_completion_requirement =
76
+ { minimum_grade_percent: Float?, minimum_questions_correct: Integer? }
77
+
78
+ class AssessmentCompletionRequirement < WhopSDK::Internal::Type::BaseModel
79
+ attr_accessor minimum_grade_percent: Float?
80
+
81
+ attr_accessor minimum_questions_correct: Integer?
82
+
83
+ def initialize: (
84
+ ?minimum_grade_percent: Float?,
85
+ ?minimum_questions_correct: Integer?
86
+ ) -> void
87
+
88
+ def to_hash: -> {
89
+ minimum_grade_percent: Float?,
90
+ minimum_questions_correct: Integer?
91
+ }
92
+ end
93
+
65
94
  type assessment_question =
66
95
  {
67
96
  correct_answer: String,
68
97
  question_text: String,
69
98
  question_type: WhopSDK::Models::assessment_question_types,
70
99
  id: String?,
71
- image: WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image?,
100
+ image: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image?,
72
101
  options: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option]?
73
102
  }
74
103
 
@@ -81,7 +110,7 @@ module WhopSDK
81
110
 
82
111
  attr_accessor id: String?
83
112
 
84
- attr_accessor image: WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image?
113
+ attr_accessor image: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image?
85
114
 
86
115
  attr_accessor options: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option]?
87
116
 
@@ -90,7 +119,7 @@ module WhopSDK
90
119
  question_text: String,
91
120
  question_type: WhopSDK::Models::assessment_question_types,
92
121
  ?id: String?,
93
- ?image: WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image?,
122
+ ?image: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image?,
94
123
  ?options: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option]?
95
124
  ) -> void
96
125
 
@@ -99,20 +128,39 @@ module WhopSDK
99
128
  question_text: String,
100
129
  question_type: WhopSDK::Models::assessment_question_types,
101
130
  id: String?,
102
- image: WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image?,
131
+ image: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image?,
103
132
  options: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option]?
104
133
  }
105
134
 
106
- type image = { id: String?, direct_upload_id: String? }
135
+ type image =
136
+ WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID
137
+ | WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID
107
138
 
108
- class Image < WhopSDK::Internal::Type::BaseModel
109
- attr_accessor id: String?
139
+ module Image
140
+ extend WhopSDK::Internal::Type::Union
141
+
142
+ type attachment_input_with_direct_upload_id =
143
+ { direct_upload_id: String }
144
+
145
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
146
+ attr_accessor direct_upload_id: String
147
+
148
+ def initialize: (direct_upload_id: String) -> void
149
+
150
+ def to_hash: -> { direct_upload_id: String }
151
+ end
152
+
153
+ type attachment_input_with_id = { id: String }
154
+
155
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
156
+ attr_accessor id: String
110
157
 
111
- attr_accessor direct_upload_id: String?
158
+ def initialize: (id: String) -> void
112
159
 
113
- def initialize: (?id: String?, ?direct_upload_id: String?) -> void
160
+ def to_hash: -> { id: String }
161
+ end
114
162
 
115
- def to_hash: -> { id: String?, direct_upload_id: String? }
163
+ def self?.variants: -> ::Array[WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image]
116
164
  end
117
165
 
118
166
  type option = { is_correct: bool, option_text: String, id: String? }
@@ -134,28 +182,66 @@ module WhopSDK
134
182
  end
135
183
  end
136
184
 
137
- type attachment = { id: String?, direct_upload_id: String? }
185
+ type attachment =
186
+ WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID
187
+ | WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID
138
188
 
139
- class Attachment < WhopSDK::Internal::Type::BaseModel
140
- attr_accessor id: String?
189
+ module Attachment
190
+ extend WhopSDK::Internal::Type::Union
191
+
192
+ type attachment_input_with_direct_upload_id =
193
+ { direct_upload_id: String }
194
+
195
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
196
+ attr_accessor direct_upload_id: String
141
197
 
142
- attr_accessor direct_upload_id: String?
198
+ def initialize: (direct_upload_id: String) -> void
199
+
200
+ def to_hash: -> { direct_upload_id: String }
201
+ end
143
202
 
144
- def initialize: (?id: String?, ?direct_upload_id: String?) -> void
203
+ type attachment_input_with_id = { id: String }
204
+
205
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
206
+ attr_accessor id: String
207
+
208
+ def initialize: (id: String) -> void
209
+
210
+ def to_hash: -> { id: String }
211
+ end
145
212
 
146
- def to_hash: -> { id: String?, direct_upload_id: String? }
213
+ def self?.variants: -> ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]
147
214
  end
148
215
 
149
- type main_pdf = { id: String?, direct_upload_id: String? }
216
+ type main_pdf =
217
+ WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID
218
+ | WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID
150
219
 
151
- class MainPdf < WhopSDK::Internal::Type::BaseModel
152
- attr_accessor id: String?
220
+ module MainPdf
221
+ extend WhopSDK::Internal::Type::Union
222
+
223
+ type attachment_input_with_direct_upload_id =
224
+ { direct_upload_id: String }
225
+
226
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
227
+ attr_accessor direct_upload_id: String
153
228
 
154
- attr_accessor direct_upload_id: String?
229
+ def initialize: (direct_upload_id: String) -> void
230
+
231
+ def to_hash: -> { direct_upload_id: String }
232
+ end
155
233
 
156
- def initialize: (?id: String?, ?direct_upload_id: String?) -> void
234
+ type attachment_input_with_id = { id: String }
235
+
236
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
237
+ attr_accessor id: String
238
+
239
+ def initialize: (id: String) -> void
240
+
241
+ def to_hash: -> { id: String }
242
+ end
157
243
 
158
- def to_hash: -> { id: String?, direct_upload_id: String? }
244
+ def self?.variants: -> ::Array[WhopSDK::Models::CourseLessonUpdateParams::main_pdf]
159
245
  end
160
246
  end
161
247
  end
@@ -0,0 +1,51 @@
1
+ module WhopSDK
2
+ module Models
3
+ type course_student_list_params =
4
+ {
5
+ course_id: String,
6
+ after: String?,
7
+ before: String?,
8
+ first: Integer?,
9
+ keyword: String?,
10
+ last: Integer?
11
+ }
12
+ & WhopSDK::Internal::Type::request_parameters
13
+
14
+ class CourseStudentListParams < WhopSDK::Internal::Type::BaseModel
15
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
16
+ include WhopSDK::Internal::Type::RequestParameters
17
+
18
+ attr_accessor course_id: String
19
+
20
+ attr_accessor after: String?
21
+
22
+ attr_accessor before: String?
23
+
24
+ attr_accessor first: Integer?
25
+
26
+ attr_accessor keyword: String?
27
+
28
+ attr_accessor last: Integer?
29
+
30
+ def initialize: (
31
+ course_id: String,
32
+ ?after: String?,
33
+ ?before: String?,
34
+ ?first: Integer?,
35
+ ?keyword: String?,
36
+ ?last: Integer?,
37
+ ?request_options: WhopSDK::request_opts
38
+ ) -> void
39
+
40
+ def to_hash: -> {
41
+ course_id: String,
42
+ after: String?,
43
+ before: String?,
44
+ first: Integer?,
45
+ keyword: String?,
46
+ last: Integer?,
47
+ request_options: WhopSDK::RequestOptions
48
+ }
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,64 @@
1
+ module WhopSDK
2
+ module Models
3
+ type course_student_list_response =
4
+ {
5
+ id: String,
6
+ completed_lessons_count: Integer,
7
+ completion_rate: Float,
8
+ first_interaction_at: Time,
9
+ last_interaction_at: Time,
10
+ total_lessons_count: Integer,
11
+ user: WhopSDK::Models::CourseStudentListResponse::User
12
+ }
13
+
14
+ class CourseStudentListResponse < WhopSDK::Internal::Type::BaseModel
15
+ attr_accessor id: String
16
+
17
+ attr_accessor completed_lessons_count: Integer
18
+
19
+ attr_accessor completion_rate: Float
20
+
21
+ attr_accessor first_interaction_at: Time
22
+
23
+ attr_accessor last_interaction_at: Time
24
+
25
+ attr_accessor total_lessons_count: Integer
26
+
27
+ attr_accessor user: WhopSDK::Models::CourseStudentListResponse::User
28
+
29
+ def initialize: (
30
+ id: String,
31
+ completed_lessons_count: Integer,
32
+ completion_rate: Float,
33
+ first_interaction_at: Time,
34
+ last_interaction_at: Time,
35
+ total_lessons_count: Integer,
36
+ user: WhopSDK::Models::CourseStudentListResponse::User
37
+ ) -> void
38
+
39
+ def to_hash: -> {
40
+ id: String,
41
+ completed_lessons_count: Integer,
42
+ completion_rate: Float,
43
+ first_interaction_at: Time,
44
+ last_interaction_at: Time,
45
+ total_lessons_count: Integer,
46
+ user: WhopSDK::Models::CourseStudentListResponse::User
47
+ }
48
+
49
+ type user = { id: String, name: String?, username: String }
50
+
51
+ class User < WhopSDK::Internal::Type::BaseModel
52
+ attr_accessor id: String
53
+
54
+ attr_accessor name: String?
55
+
56
+ attr_accessor username: String
57
+
58
+ def initialize: (id: String, name: String?, username: String) -> void
59
+
60
+ def to_hash: -> { id: String, name: String?, username: String }
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,15 @@
1
+ module WhopSDK
2
+ module Models
3
+ type course_student_retrieve_params =
4
+ { } & WhopSDK::Internal::Type::request_parameters
5
+
6
+ class CourseStudentRetrieveParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: WhopSDK::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: WhopSDK::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,106 @@
1
+ module WhopSDK
2
+ module Models
3
+ type course_student_retrieve_response =
4
+ {
5
+ id: String,
6
+ completed_lessons_count: Integer,
7
+ completion_rate: Float,
8
+ course: WhopSDK::Models::CourseStudentRetrieveResponse::Course,
9
+ first_interaction_at: Time,
10
+ last_interaction_at: Time,
11
+ total_lessons_count: Integer,
12
+ user: WhopSDK::Models::CourseStudentRetrieveResponse::User
13
+ }
14
+
15
+ class CourseStudentRetrieveResponse < WhopSDK::Internal::Type::BaseModel
16
+ attr_accessor id: String
17
+
18
+ attr_accessor completed_lessons_count: Integer
19
+
20
+ attr_accessor completion_rate: Float
21
+
22
+ attr_accessor course: WhopSDK::Models::CourseStudentRetrieveResponse::Course
23
+
24
+ attr_accessor first_interaction_at: Time
25
+
26
+ attr_accessor last_interaction_at: Time
27
+
28
+ attr_accessor total_lessons_count: Integer
29
+
30
+ attr_accessor user: WhopSDK::Models::CourseStudentRetrieveResponse::User
31
+
32
+ def initialize: (
33
+ id: String,
34
+ completed_lessons_count: Integer,
35
+ completion_rate: Float,
36
+ course: WhopSDK::Models::CourseStudentRetrieveResponse::Course,
37
+ first_interaction_at: Time,
38
+ last_interaction_at: Time,
39
+ total_lessons_count: Integer,
40
+ user: WhopSDK::Models::CourseStudentRetrieveResponse::User
41
+ ) -> void
42
+
43
+ def to_hash: -> {
44
+ id: String,
45
+ completed_lessons_count: Integer,
46
+ completion_rate: Float,
47
+ course: WhopSDK::Models::CourseStudentRetrieveResponse::Course,
48
+ first_interaction_at: Time,
49
+ last_interaction_at: Time,
50
+ total_lessons_count: Integer,
51
+ user: WhopSDK::Models::CourseStudentRetrieveResponse::User
52
+ }
53
+
54
+ type course =
55
+ {
56
+ id: String,
57
+ experience: WhopSDK::Models::CourseStudentRetrieveResponse::Course::Experience,
58
+ title: String?
59
+ }
60
+
61
+ class Course < WhopSDK::Internal::Type::BaseModel
62
+ attr_accessor id: String
63
+
64
+ attr_accessor experience: WhopSDK::Models::CourseStudentRetrieveResponse::Course::Experience
65
+
66
+ attr_accessor title: String?
67
+
68
+ def initialize: (
69
+ id: String,
70
+ experience: WhopSDK::Models::CourseStudentRetrieveResponse::Course::Experience,
71
+ title: String?
72
+ ) -> void
73
+
74
+ def to_hash: -> {
75
+ id: String,
76
+ experience: WhopSDK::Models::CourseStudentRetrieveResponse::Course::Experience,
77
+ title: String?
78
+ }
79
+
80
+ type experience = { id: String }
81
+
82
+ class Experience < WhopSDK::Internal::Type::BaseModel
83
+ attr_accessor id: String
84
+
85
+ def initialize: (id: String) -> void
86
+
87
+ def to_hash: -> { id: String }
88
+ end
89
+ end
90
+
91
+ type user = { id: String, name: String?, username: String }
92
+
93
+ class User < WhopSDK::Internal::Type::BaseModel
94
+ attr_accessor id: String
95
+
96
+ attr_accessor name: String?
97
+
98
+ attr_accessor username: String
99
+
100
+ def initialize: (id: String, name: String?, username: String) -> void
101
+
102
+ def to_hash: -> { id: String, name: String?, username: String }
103
+ end
104
+ end
105
+ end
106
+ end
@@ -9,7 +9,7 @@ module WhopSDK
9
9
  language: WhopSDK::Models::languages?,
10
10
  require_completing_lessons_in_order: bool?,
11
11
  tagline: String?,
12
- thumbnail: WhopSDK::CourseUpdateParams::Thumbnail?,
12
+ thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail?,
13
13
  title: String?
14
14
  }
15
15
  & WhopSDK::Internal::Type::request_parameters
@@ -32,7 +32,7 @@ module WhopSDK
32
32
 
33
33
  attr_accessor tagline: String?
34
34
 
35
- attr_accessor thumbnail: WhopSDK::CourseUpdateParams::Thumbnail?
35
+ attr_accessor thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail?
36
36
 
37
37
  attr_accessor title: String?
38
38
 
@@ -44,7 +44,7 @@ module WhopSDK
44
44
  ?language: WhopSDK::Models::languages?,
45
45
  ?require_completing_lessons_in_order: bool?,
46
46
  ?tagline: String?,
47
- ?thumbnail: WhopSDK::CourseUpdateParams::Thumbnail?,
47
+ ?thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail?,
48
48
  ?title: String?,
49
49
  ?request_options: WhopSDK::request_opts
50
50
  ) -> void
@@ -57,7 +57,7 @@ module WhopSDK
57
57
  language: WhopSDK::Models::languages?,
58
58
  require_completing_lessons_in_order: bool?,
59
59
  tagline: String?,
60
- thumbnail: WhopSDK::CourseUpdateParams::Thumbnail?,
60
+ thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail?,
61
61
  title: String?,
62
62
  request_options: WhopSDK::RequestOptions
63
63
  }
@@ -121,16 +121,35 @@ module WhopSDK
121
121
  end
122
122
  end
123
123
 
124
- type thumbnail = { id: String?, direct_upload_id: String? }
124
+ type thumbnail =
125
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID
126
+ | WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID
125
127
 
126
- class Thumbnail < WhopSDK::Internal::Type::BaseModel
127
- attr_accessor id: String?
128
+ module Thumbnail
129
+ extend WhopSDK::Internal::Type::Union
128
130
 
129
- attr_accessor direct_upload_id: String?
131
+ type attachment_input_with_direct_upload_id =
132
+ { direct_upload_id: String }
130
133
 
131
- def initialize: (?id: String?, ?direct_upload_id: String?) -> void
134
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
135
+ attr_accessor direct_upload_id: String
132
136
 
133
- def to_hash: -> { id: String?, direct_upload_id: String? }
137
+ def initialize: (direct_upload_id: String) -> void
138
+
139
+ def to_hash: -> { direct_upload_id: String }
140
+ end
141
+
142
+ type attachment_input_with_id = { id: String }
143
+
144
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
145
+ attr_accessor id: String
146
+
147
+ def initialize: (id: String) -> void
148
+
149
+ def to_hash: -> { id: String }
150
+ end
151
+
152
+ def self?.variants: -> ::Array[WhopSDK::Models::CourseUpdateParams::thumbnail]
134
153
  end
135
154
  end
136
155
  end
@@ -3,7 +3,7 @@ module WhopSDK
3
3
  type experience_update_params =
4
4
  {
5
5
  access_level: WhopSDK::Models::ExperienceUpdateParams::access_level?,
6
- logo: WhopSDK::ExperienceUpdateParams::Logo?,
6
+ logo: WhopSDK::Models::ExperienceUpdateParams::logo?,
7
7
  name: String?,
8
8
  order: String?,
9
9
  section_id: String?
@@ -16,7 +16,7 @@ module WhopSDK
16
16
 
17
17
  attr_accessor access_level: WhopSDK::Models::ExperienceUpdateParams::access_level?
18
18
 
19
- attr_accessor logo: WhopSDK::ExperienceUpdateParams::Logo?
19
+ attr_accessor logo: WhopSDK::Models::ExperienceUpdateParams::logo?
20
20
 
21
21
  attr_accessor name: String?
22
22
 
@@ -26,7 +26,7 @@ module WhopSDK
26
26
 
27
27
  def initialize: (
28
28
  ?access_level: WhopSDK::Models::ExperienceUpdateParams::access_level?,
29
- ?logo: WhopSDK::ExperienceUpdateParams::Logo?,
29
+ ?logo: WhopSDK::Models::ExperienceUpdateParams::logo?,
30
30
  ?name: String?,
31
31
  ?order: String?,
32
32
  ?section_id: String?,
@@ -35,7 +35,7 @@ module WhopSDK
35
35
 
36
36
  def to_hash: -> {
37
37
  access_level: WhopSDK::Models::ExperienceUpdateParams::access_level?,
38
- logo: WhopSDK::ExperienceUpdateParams::Logo?,
38
+ logo: WhopSDK::Models::ExperienceUpdateParams::logo?,
39
39
  name: String?,
40
40
  order: String?,
41
41
  section_id: String?,
@@ -53,16 +53,35 @@ module WhopSDK
53
53
  def self?.values: -> ::Array[WhopSDK::Models::ExperienceUpdateParams::access_level]
54
54
  end
55
55
 
56
- type logo = { id: String?, direct_upload_id: String? }
56
+ type logo =
57
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID
58
+ | WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID
57
59
 
58
- class Logo < WhopSDK::Internal::Type::BaseModel
59
- attr_accessor id: String?
60
+ module Logo
61
+ extend WhopSDK::Internal::Type::Union
60
62
 
61
- attr_accessor direct_upload_id: String?
63
+ type attachment_input_with_direct_upload_id =
64
+ { direct_upload_id: String }
62
65
 
63
- def initialize: (?id: String?, ?direct_upload_id: String?) -> void
66
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
67
+ attr_accessor direct_upload_id: String
64
68
 
65
- def to_hash: -> { id: String?, direct_upload_id: String? }
69
+ def initialize: (direct_upload_id: String) -> void
70
+
71
+ def to_hash: -> { direct_upload_id: String }
72
+ end
73
+
74
+ type attachment_input_with_id = { id: String }
75
+
76
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
77
+ attr_accessor id: String
78
+
79
+ def initialize: (id: String) -> void
80
+
81
+ def to_hash: -> { id: String }
82
+ end
83
+
84
+ def self?.variants: -> ::Array[WhopSDK::Models::ExperienceUpdateParams::logo]
66
85
  end
67
86
  end
68
87
  end