whop_sdk 0.0.3 → 0.0.5

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 (267) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +47 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +8 -0
  5. data/lib/whop_sdk/internal/transport/base_client.rb +7 -1
  6. data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +6 -2
  7. data/lib/whop_sdk/models/access_level.rb +1 -1
  8. data/lib/whop_sdk/models/access_pass_type.rb +2 -1
  9. data/lib/whop_sdk/models/access_token_create_params.rb +67 -0
  10. data/lib/whop_sdk/models/access_token_create_response.rb +27 -0
  11. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  12. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  13. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +119 -43
  14. data/lib/whop_sdk/models/company.rb +13 -1
  15. data/lib/whop_sdk/models/company_create_params.rb +46 -0
  16. data/lib/whop_sdk/models/company_list_params.rb +62 -0
  17. data/lib/whop_sdk/models/company_list_response.rb +175 -0
  18. data/lib/whop_sdk/models/course.rb +18 -1
  19. data/lib/whop_sdk/models/course_create_params.rb +94 -30
  20. data/lib/whop_sdk/models/course_lesson_create_params.rb +77 -1
  21. data/lib/whop_sdk/models/course_lesson_list_response.rb +43 -1
  22. data/lib/whop_sdk/models/course_lesson_update_params.rb +280 -83
  23. data/lib/whop_sdk/models/course_list_response.rb +18 -1
  24. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  25. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  26. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  27. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  28. data/lib/whop_sdk/models/course_update_params.rb +70 -28
  29. data/lib/whop_sdk/models/course_visibilities.rb +17 -0
  30. data/lib/whop_sdk/models/embed_type.rb +16 -0
  31. data/lib/whop_sdk/models/entry.rb +3 -3
  32. data/lib/whop_sdk/models/entry_list_response.rb +3 -3
  33. data/lib/whop_sdk/models/experience.rb +5 -6
  34. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  35. data/lib/whop_sdk/models/forum_post.rb +2 -2
  36. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  37. data/lib/whop_sdk/models/forum_post_list_response.rb +2 -2
  38. data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
  39. data/lib/whop_sdk/models/global_affiliate_status.rb +1 -1
  40. data/lib/whop_sdk/models/invoice_create_params.rb +50 -34
  41. data/lib/whop_sdk/models/invoice_list_params.rb +27 -40
  42. data/lib/whop_sdk/models/lesson.rb +59 -9
  43. data/lib/whop_sdk/models/member_list_params.rb +11 -11
  44. data/lib/whop_sdk/models/member_list_response.rb +3 -3
  45. data/lib/whop_sdk/models/member_retrieve_response.rb +3 -3
  46. data/lib/whop_sdk/models/membership_list_params.rb +9 -9
  47. data/lib/whop_sdk/models/message.rb +2 -2
  48. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  49. data/lib/whop_sdk/models/message_list_response.rb +2 -2
  50. data/lib/whop_sdk/models/message_update_params.rb +51 -27
  51. data/lib/whop_sdk/models/payment.rb +13 -4
  52. data/lib/whop_sdk/models/payment_list_response.rb +13 -4
  53. data/lib/whop_sdk/models/payment_method_types.rb +2 -1
  54. data/lib/whop_sdk/models/plan.rb +54 -5
  55. data/lib/whop_sdk/models/plan_create_params.rb +99 -24
  56. data/lib/whop_sdk/models/plan_list_response.rb +57 -5
  57. data/lib/whop_sdk/models/plan_type.rb +1 -1
  58. data/lib/whop_sdk/models/plan_update_params.rb +97 -22
  59. data/lib/whop_sdk/models/product.rb +1 -1
  60. data/lib/whop_sdk/models/product_create_params.rb +6 -6
  61. data/lib/whop_sdk/models/product_list_item.rb +1 -1
  62. data/lib/whop_sdk/models/product_update_params.rb +57 -33
  63. data/lib/whop_sdk/models/promo_code.rb +3 -3
  64. data/lib/whop_sdk/models/promo_code_list_response.rb +3 -3
  65. data/lib/whop_sdk/models/transfer.rb +9 -1
  66. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  67. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  68. data/lib/whop_sdk/models.rb +14 -0
  69. data/lib/whop_sdk/resources/access_tokens.rb +46 -0
  70. data/lib/whop_sdk/resources/app_builds.rb +5 -3
  71. data/lib/whop_sdk/resources/apps.rb +4 -3
  72. data/lib/whop_sdk/resources/authorized_users.rb +2 -1
  73. data/lib/whop_sdk/resources/chat_channels.rb +9 -2
  74. data/lib/whop_sdk/resources/checkout_configurations.rb +8 -7
  75. data/lib/whop_sdk/resources/companies.rb +72 -1
  76. data/lib/whop_sdk/resources/course_chapters.rb +5 -3
  77. data/lib/whop_sdk/resources/course_lesson_interactions.rb +4 -3
  78. data/lib/whop_sdk/resources/course_lessons.rb +25 -7
  79. data/lib/whop_sdk/resources/course_students.rb +77 -0
  80. data/lib/whop_sdk/resources/courses.rb +24 -7
  81. data/lib/whop_sdk/resources/entries.rb +6 -3
  82. data/lib/whop_sdk/resources/experiences.rb +9 -7
  83. data/lib/whop_sdk/resources/forum_posts.rb +5 -4
  84. data/lib/whop_sdk/resources/forums.rb +3 -2
  85. data/lib/whop_sdk/resources/invoices.rb +22 -16
  86. data/lib/whop_sdk/resources/ledger_accounts.rb +6 -2
  87. data/lib/whop_sdk/resources/members.rb +6 -5
  88. data/lib/whop_sdk/resources/memberships.rb +10 -8
  89. data/lib/whop_sdk/resources/messages.rb +5 -4
  90. data/lib/whop_sdk/resources/payments.rb +7 -4
  91. data/lib/whop_sdk/resources/plans.rb +14 -8
  92. data/lib/whop_sdk/resources/products.rb +10 -8
  93. data/lib/whop_sdk/resources/promo_codes.rb +4 -2
  94. data/lib/whop_sdk/resources/reactions.rb +2 -1
  95. data/lib/whop_sdk/resources/reviews.rb +2 -1
  96. data/lib/whop_sdk/resources/shipments.rb +2 -1
  97. data/lib/whop_sdk/resources/support_channels.rb +2 -1
  98. data/lib/whop_sdk/resources/transfers.rb +5 -2
  99. data/lib/whop_sdk/resources/users.rb +9 -3
  100. data/lib/whop_sdk/version.rb +1 -1
  101. data/lib/whop_sdk.rb +14 -1
  102. data/manifest.yaml +1 -0
  103. data/rbi/whop_sdk/client.rbi +6 -0
  104. data/rbi/whop_sdk/internal/transport/base_client.rbi +5 -0
  105. data/rbi/whop_sdk/internal/transport/pooled_net_requester.rbi +6 -2
  106. data/rbi/whop_sdk/internal/type/base_model.rbi +8 -4
  107. data/rbi/whop_sdk/models/access_level.rbi +1 -1
  108. data/rbi/whop_sdk/models/access_pass_type.rbi +2 -1
  109. data/rbi/whop_sdk/models/access_token_create_params.rbi +126 -0
  110. data/rbi/whop_sdk/models/access_token_create_response.rbi +37 -0
  111. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  112. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  113. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +196 -68
  114. data/rbi/whop_sdk/models/company.rbi +10 -0
  115. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  116. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  117. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  118. data/rbi/whop_sdk/models/course.rbi +21 -3
  119. data/rbi/whop_sdk/models/course_create_params.rbi +126 -38
  120. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +126 -0
  121. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +68 -0
  122. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +449 -111
  123. data/rbi/whop_sdk/models/course_list_response.rbi +21 -3
  124. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  125. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  126. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  127. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  128. data/rbi/whop_sdk/models/course_update_params.rbi +104 -38
  129. data/rbi/whop_sdk/models/course_visibilities.rbi +23 -0
  130. data/rbi/whop_sdk/models/embed_type.rbi +20 -0
  131. data/rbi/whop_sdk/models/entry.rbi +3 -3
  132. data/rbi/whop_sdk/models/entry_list_response.rbi +3 -3
  133. data/rbi/whop_sdk/models/experience.rbi +7 -9
  134. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  135. data/rbi/whop_sdk/models/forum_post.rbi +2 -2
  136. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  137. data/rbi/whop_sdk/models/forum_post_list_response.rbi +2 -2
  138. data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
  139. data/rbi/whop_sdk/models/global_affiliate_status.rbi +1 -1
  140. data/rbi/whop_sdk/models/invoice_create_params.rbi +60 -46
  141. data/rbi/whop_sdk/models/invoice_list_params.rbi +26 -71
  142. data/rbi/whop_sdk/models/lesson.rbi +68 -10
  143. data/rbi/whop_sdk/models/member_list_params.rbi +10 -10
  144. data/rbi/whop_sdk/models/member_list_response.rbi +6 -6
  145. data/rbi/whop_sdk/models/member_retrieve_response.rbi +6 -6
  146. data/rbi/whop_sdk/models/membership_list_params.rbi +8 -8
  147. data/rbi/whop_sdk/models/message.rbi +2 -2
  148. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  149. data/rbi/whop_sdk/models/message_list_response.rbi +2 -2
  150. data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
  151. data/rbi/whop_sdk/models/payment.rbi +13 -3
  152. data/rbi/whop_sdk/models/payment_list_response.rbi +13 -3
  153. data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
  154. data/rbi/whop_sdk/models/plan.rbi +88 -4
  155. data/rbi/whop_sdk/models/plan_create_params.rbi +176 -34
  156. data/rbi/whop_sdk/models/plan_list_response.rbi +100 -4
  157. data/rbi/whop_sdk/models/plan_type.rbi +1 -1
  158. data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
  159. data/rbi/whop_sdk/models/product.rbi +1 -1
  160. data/rbi/whop_sdk/models/product_create_params.rbi +6 -6
  161. data/rbi/whop_sdk/models/product_list_item.rbi +1 -1
  162. data/rbi/whop_sdk/models/product_update_params.rbi +87 -43
  163. data/rbi/whop_sdk/models/promo_code.rbi +3 -3
  164. data/rbi/whop_sdk/models/promo_code_list_response.rbi +3 -3
  165. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  166. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  167. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  168. data/rbi/whop_sdk/models.rbi +14 -0
  169. data/rbi/whop_sdk/resources/access_tokens.rbi +41 -0
  170. data/rbi/whop_sdk/resources/app_builds.rbi +15 -3
  171. data/rbi/whop_sdk/resources/apps.rbi +13 -2
  172. data/rbi/whop_sdk/resources/authorized_users.rbi +5 -1
  173. data/rbi/whop_sdk/resources/chat_channels.rbi +8 -1
  174. data/rbi/whop_sdk/resources/checkout_configurations.rbi +11 -8
  175. data/rbi/whop_sdk/resources/companies.rbi +68 -1
  176. data/rbi/whop_sdk/resources/course_chapters.rbi +11 -2
  177. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +7 -3
  178. data/rbi/whop_sdk/resources/course_lessons.rbi +62 -4
  179. data/rbi/whop_sdk/resources/course_students.rbi +69 -0
  180. data/rbi/whop_sdk/resources/courses.rbi +50 -4
  181. data/rbi/whop_sdk/resources/entries.rbi +15 -3
  182. data/rbi/whop_sdk/resources/experiences.rbi +21 -3
  183. data/rbi/whop_sdk/resources/forum_posts.rbi +18 -3
  184. data/rbi/whop_sdk/resources/forums.rbi +6 -1
  185. data/rbi/whop_sdk/resources/invoices.rbi +38 -23
  186. data/rbi/whop_sdk/resources/ledger_accounts.rbi +7 -2
  187. data/rbi/whop_sdk/resources/members.rbi +9 -5
  188. data/rbi/whop_sdk/resources/memberships.rbi +16 -5
  189. data/rbi/whop_sdk/resources/messages.rbi +18 -3
  190. data/rbi/whop_sdk/resources/payments.rbi +16 -3
  191. data/rbi/whop_sdk/resources/plans.rbi +40 -5
  192. data/rbi/whop_sdk/resources/products.rbi +21 -7
  193. data/rbi/whop_sdk/resources/promo_codes.rbi +10 -2
  194. data/rbi/whop_sdk/resources/reactions.rbi +5 -1
  195. data/rbi/whop_sdk/resources/reviews.rbi +5 -1
  196. data/rbi/whop_sdk/resources/shipments.rbi +5 -1
  197. data/rbi/whop_sdk/resources/support_channels.rbi +5 -1
  198. data/rbi/whop_sdk/resources/transfers.rbi +8 -1
  199. data/rbi/whop_sdk/resources/users.rbi +13 -2
  200. data/sig/whop_sdk/client.rbs +4 -0
  201. data/sig/whop_sdk/internal/transport/base_client.rbs +2 -0
  202. data/sig/whop_sdk/internal/transport/pooled_net_requester.rbs +4 -1
  203. data/sig/whop_sdk/models/access_token_create_params.rbs +56 -0
  204. data/sig/whop_sdk/models/access_token_create_response.rbs +15 -0
  205. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  206. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  207. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
  208. data/sig/whop_sdk/models/company.rbs +5 -0
  209. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  210. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  211. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  212. data/sig/whop_sdk/models/course.rbs +13 -3
  213. data/sig/whop_sdk/models/course_create_params.rbs +49 -10
  214. data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
  215. data/sig/whop_sdk/models/course_lesson_list_response.rbs +25 -0
  216. data/sig/whop_sdk/models/course_lesson_update_params.rbs +162 -30
  217. data/sig/whop_sdk/models/course_list_response.rbs +13 -3
  218. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  219. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  220. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  221. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  222. data/sig/whop_sdk/models/course_update_params.rbs +40 -11
  223. data/sig/whop_sdk/models/course_visibilities.rbs +14 -0
  224. data/sig/whop_sdk/models/embed_type.rbs +14 -0
  225. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  226. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  227. data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
  228. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  229. data/sig/whop_sdk/models/invoice_list_params.rbs +16 -33
  230. data/sig/whop_sdk/models/lesson.rbs +33 -8
  231. data/sig/whop_sdk/models/member_list_params.rbs +5 -5
  232. data/sig/whop_sdk/models/membership_list_params.rbs +5 -5
  233. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  234. data/sig/whop_sdk/models/message_update_params.rbs +29 -10
  235. data/sig/whop_sdk/models/payment.rbs +5 -0
  236. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  237. data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
  238. data/sig/whop_sdk/models/plan.rbs +32 -0
  239. data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
  240. data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
  241. data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
  242. data/sig/whop_sdk/models/product_update_params.rbs +29 -10
  243. data/sig/whop_sdk/models/transfer.rbs +5 -0
  244. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  245. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  246. data/sig/whop_sdk/models.rbs +14 -0
  247. data/sig/whop_sdk/resources/access_tokens.rbs +15 -0
  248. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  249. data/sig/whop_sdk/resources/apps.rbs +1 -1
  250. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  251. data/sig/whop_sdk/resources/companies.rbs +18 -0
  252. data/sig/whop_sdk/resources/course_lessons.rbs +10 -2
  253. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  254. data/sig/whop_sdk/resources/courses.rbs +8 -2
  255. data/sig/whop_sdk/resources/experiences.rbs +1 -1
  256. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  257. data/sig/whop_sdk/resources/invoices.rbs +8 -6
  258. data/sig/whop_sdk/resources/members.rbs +1 -1
  259. data/sig/whop_sdk/resources/memberships.rbs +1 -1
  260. data/sig/whop_sdk/resources/messages.rbs +2 -2
  261. data/sig/whop_sdk/resources/plans.rbs +4 -2
  262. data/sig/whop_sdk/resources/products.rbs +1 -1
  263. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  264. metadata +41 -5
  265. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  266. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  267. data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
@@ -7,6 +7,14 @@ module WhopSDK
7
7
  extend WhopSDK::Internal::Type::RequestParameters::Converter
8
8
  include WhopSDK::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute assessment_completion_requirement
11
+ # Completion requirements for quiz/knowledge check lessons
12
+ #
13
+ # @return [WhopSDK::Models::CourseLessonUpdateParams::AssessmentCompletionRequirement, nil]
14
+ optional :assessment_completion_requirement,
15
+ -> { WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement },
16
+ nil?: true
17
+
10
18
  # @!attribute assessment_questions
11
19
  # Assessment questions for quiz/knowledge check lessons. Replaces all existing
12
20
  # questions.
@@ -20,9 +28,9 @@ module WhopSDK
20
28
  # General attachments for the lesson (PDFs, files, etc). Replaces all existing
21
29
  # attachments.
22
30
  #
23
- # @return [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment>, nil]
31
+ # @return [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID>, nil]
24
32
  optional :attachments,
25
- -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseLessonUpdateParams::Attachment] },
33
+ -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::CourseLessonUpdateParams::Attachment] },
26
34
  nil?: true
27
35
 
28
36
  # @!attribute content
@@ -37,6 +45,18 @@ module WhopSDK
37
45
  # @return [Integer, nil]
38
46
  optional :days_from_course_start_until_unlock, Integer, nil?: true
39
47
 
48
+ # @!attribute embed_id
49
+ # ID for the embed (YouTube video ID or Loom share ID)
50
+ #
51
+ # @return [String, nil]
52
+ optional :embed_id, String, nil?: true
53
+
54
+ # @!attribute embed_type
55
+ # The type of embed for a lesson
56
+ #
57
+ # @return [Symbol, WhopSDK::Models::EmbedType, nil]
58
+ optional :embed_type, enum: -> { WhopSDK::EmbedType }, nil?: true
59
+
40
60
  # @!attribute lesson_type
41
61
  # The available types for a lesson
42
62
  #
@@ -46,8 +66,14 @@ module WhopSDK
46
66
  # @!attribute main_pdf
47
67
  # The main PDF file for this lesson
48
68
  #
49
- # @return [WhopSDK::Models::CourseLessonUpdateParams::MainPdf, nil]
50
- optional :main_pdf, -> { WhopSDK::CourseLessonUpdateParams::MainPdf }, nil?: true
69
+ # @return [WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID, nil]
70
+ optional :main_pdf, union: -> { WhopSDK::CourseLessonUpdateParams::MainPdf }, nil?: true
71
+
72
+ # @!attribute max_attempts
73
+ # Maximum number of attempts allowed for assessments
74
+ #
75
+ # @return [Integer, nil]
76
+ optional :max_attempts, Integer, nil?: true
51
77
 
52
78
  # @!attribute mux_asset_id
53
79
  # The ID of the Mux asset to attach to this lesson for video lessons
@@ -55,6 +81,12 @@ module WhopSDK
55
81
  # @return [String, nil]
56
82
  optional :mux_asset_id, String, nil?: true
57
83
 
84
+ # @!attribute thumbnail
85
+ # The thumbnail for the lesson in png, jpeg, or gif format
86
+ #
87
+ # @return [WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID, nil]
88
+ optional :thumbnail, union: -> { WhopSDK::CourseLessonUpdateParams::Thumbnail }, nil?: true
89
+
58
90
  # @!attribute title
59
91
  # The title of the lesson
60
92
  #
@@ -68,30 +100,67 @@ module WhopSDK
68
100
  # @return [Symbol, WhopSDK::Models::LessonVisibilities, nil]
69
101
  optional :visibility, enum: -> { WhopSDK::LessonVisibilities }, nil?: true
70
102
 
71
- # @!method initialize(assessment_questions: nil, attachments: nil, content: nil, days_from_course_start_until_unlock: nil, lesson_type: nil, main_pdf: nil, mux_asset_id: nil, title: nil, visibility: nil, request_options: {})
103
+ # @!method initialize(assessment_completion_requirement: nil, assessment_questions: nil, attachments: nil, content: nil, days_from_course_start_until_unlock: nil, embed_id: nil, embed_type: nil, lesson_type: nil, main_pdf: nil, max_attempts: nil, mux_asset_id: nil, thumbnail: nil, title: nil, visibility: nil, request_options: {})
72
104
  # Some parameter documentations has been truncated, see
73
105
  # {WhopSDK::Models::CourseLessonUpdateParams} for more details.
74
106
  #
107
+ # @param assessment_completion_requirement [WhopSDK::Models::CourseLessonUpdateParams::AssessmentCompletionRequirement, nil] Completion requirements for quiz/knowledge check lessons
108
+ #
75
109
  # @param assessment_questions [Array<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion>, nil] Assessment questions for quiz/knowledge check lessons. Replaces all existing que
76
110
  #
77
- # @param attachments [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment>, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att
111
+ # @param attachments [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID>, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att
78
112
  #
79
113
  # @param content [String, nil] The content of the lesson
80
114
  #
81
115
  # @param days_from_course_start_until_unlock [Integer, nil] Days from course start until unlock
82
116
  #
117
+ # @param embed_id [String, nil] ID for the embed (YouTube video ID or Loom share ID)
118
+ #
119
+ # @param embed_type [Symbol, WhopSDK::Models::EmbedType, nil] The type of embed for a lesson
120
+ #
83
121
  # @param lesson_type [Symbol, WhopSDK::Models::LessonTypes, nil] The available types for a lesson
84
122
  #
85
- # @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf, nil] The main PDF file for this lesson
123
+ # @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID, nil] The main PDF file for this lesson
124
+ #
125
+ # @param max_attempts [Integer, nil] Maximum number of attempts allowed for assessments
86
126
  #
87
127
  # @param mux_asset_id [String, nil] The ID of the Mux asset to attach to this lesson for video lessons
88
128
  #
129
+ # @param thumbnail [WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the lesson in png, jpeg, or gif format
130
+ #
89
131
  # @param title [String, nil] The title of the lesson
90
132
  #
91
133
  # @param visibility [Symbol, WhopSDK::Models::LessonVisibilities, nil] The available visibilities for a lesson. Determines how / whether a lesson is vi
92
134
  #
93
135
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
94
136
 
137
+ class AssessmentCompletionRequirement < WhopSDK::Internal::Type::BaseModel
138
+ # @!attribute minimum_grade_percent
139
+ # The minimum grade percentage required to pass (0-100). Cannot be set together
140
+ # with minimum_questions_correct.
141
+ #
142
+ # @return [Float, nil]
143
+ optional :minimum_grade_percent, Float, nil?: true
144
+
145
+ # @!attribute minimum_questions_correct
146
+ # The minimum number of questions that must be answered correctly. Cannot be set
147
+ # together with minimum_grade_percent.
148
+ #
149
+ # @return [Integer, nil]
150
+ optional :minimum_questions_correct, Integer, nil?: true
151
+
152
+ # @!method initialize(minimum_grade_percent: nil, minimum_questions_correct: nil)
153
+ # Some parameter documentations has been truncated, see
154
+ # {WhopSDK::Models::CourseLessonUpdateParams::AssessmentCompletionRequirement} for
155
+ # more details.
156
+ #
157
+ # Completion requirements for quiz/knowledge check lessons
158
+ #
159
+ # @param minimum_grade_percent [Float, nil] The minimum grade percentage required to pass (0-100). Cannot be set together wi
160
+ #
161
+ # @param minimum_questions_correct [Integer, nil] The minimum number of questions that must be answered correctly. Cannot be set t
162
+ end
163
+
95
164
  class AssessmentQuestion < WhopSDK::Internal::Type::BaseModel
96
165
  # @!attribute correct_answer
97
166
  # The correct answer for the question. Used for short answer questions
@@ -121,8 +190,12 @@ module WhopSDK
121
190
  # @!attribute image
122
191
  # Optional image attachment for the question
123
192
  #
124
- # @return [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image, nil]
125
- optional :image, -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image }, nil?: true
193
+ # @return [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID, nil]
194
+ optional :image,
195
+ union: -> {
196
+ WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image
197
+ },
198
+ nil?: true
126
199
 
127
200
  # @!attribute options
128
201
  # The answer options for multiple choice/select questions
@@ -149,38 +222,62 @@ module WhopSDK
149
222
  #
150
223
  # @param id [String, nil] The ID of an existing question. If provided, the question will be updated. If no
151
224
  #
152
- # @param image [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image, nil] Optional image attachment for the question
225
+ # @param image [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID, nil] Optional image attachment for the question
153
226
  #
154
227
  # @param options [Array<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Option>, nil] The answer options for multiple choice/select questions
155
228
 
229
+ # Optional image attachment for the question
230
+ #
156
231
  # @see WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion#image
157
- class Image < WhopSDK::Internal::Type::BaseModel
158
- # @!attribute id
159
- # The ID of an existing attachment object. Use this when updating a resource and
160
- # keeping a subset of the attachments. Don't use this unless you know what you're
161
- # doing.
162
- #
163
- # @return [String, nil]
164
- optional :id, String, nil?: true
232
+ module Image
233
+ extend WhopSDK::Internal::Type::Union
165
234
 
166
- # @!attribute direct_upload_id
167
- # This ID should be used the first time you upload an attachment. It is the ID of
168
- # the direct upload that was created when uploading the file to S3 via the
169
- # mediaDirectUpload mutation.
170
- #
171
- # @return [String, nil]
172
- optional :direct_upload_id, String, nil?: true
235
+ # Input for an attachment
236
+ variant -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID }
173
237
 
174
- # @!method initialize(id: nil, direct_upload_id: nil)
175
- # Some parameter documentations has been truncated, see
176
- # {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image} for more
177
- # details.
178
- #
179
- # Optional image attachment for the question
180
- #
181
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
182
- #
183
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
238
+ # Input for an attachment
239
+ variant -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID }
240
+
241
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
242
+ # @!attribute direct_upload_id
243
+ # This ID should be used the first time you upload an attachment. It is the ID of
244
+ # the direct upload that was created when uploading the file to S3 via the
245
+ # mediaDirectUpload mutation.
246
+ #
247
+ # @return [String]
248
+ required :direct_upload_id, String
249
+
250
+ # @!method initialize(direct_upload_id:)
251
+ # Some parameter documentations has been truncated, see
252
+ # {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID}
253
+ # for more details.
254
+ #
255
+ # Input for an attachment
256
+ #
257
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
258
+ end
259
+
260
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
261
+ # @!attribute id
262
+ # The ID of an existing attachment object. Use this when updating a resource and
263
+ # keeping a subset of the attachments. Don't use this unless you know what you're
264
+ # doing.
265
+ #
266
+ # @return [String]
267
+ required :id, String
268
+
269
+ # @!method initialize(id:)
270
+ # Some parameter documentations has been truncated, see
271
+ # {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID}
272
+ # for more details.
273
+ #
274
+ # Input for an attachment
275
+ #
276
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
277
+ end
278
+
279
+ # @!method self.variants
280
+ # @return [Array(WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID)]
184
281
  end
185
282
 
186
283
  class Option < WhopSDK::Internal::Type::BaseModel
@@ -218,60 +315,160 @@ module WhopSDK
218
315
  end
219
316
  end
220
317
 
221
- class Attachment < WhopSDK::Internal::Type::BaseModel
222
- # @!attribute id
223
- # The ID of an existing attachment object. Use this when updating a resource and
224
- # keeping a subset of the attachments. Don't use this unless you know what you're
225
- # doing.
226
- #
227
- # @return [String, nil]
228
- optional :id, String, nil?: true
318
+ # Input for an attachment
319
+ module Attachment
320
+ extend WhopSDK::Internal::Type::Union
229
321
 
230
- # @!attribute direct_upload_id
231
- # This ID should be used the first time you upload an attachment. It is the ID of
232
- # the direct upload that was created when uploading the file to S3 via the
233
- # mediaDirectUpload mutation.
234
- #
235
- # @return [String, nil]
236
- optional :direct_upload_id, String, nil?: true
322
+ # Input for an attachment
323
+ variant -> { WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID }
237
324
 
238
- # @!method initialize(id: nil, direct_upload_id: nil)
239
- # Some parameter documentations has been truncated, see
240
- # {WhopSDK::Models::CourseLessonUpdateParams::Attachment} for more details.
241
- #
242
- # Input for an attachment
243
- #
244
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
245
- #
246
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
325
+ # Input for an attachment
326
+ variant -> { WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID }
327
+
328
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
329
+ # @!attribute direct_upload_id
330
+ # This ID should be used the first time you upload an attachment. It is the ID of
331
+ # the direct upload that was created when uploading the file to S3 via the
332
+ # mediaDirectUpload mutation.
333
+ #
334
+ # @return [String]
335
+ required :direct_upload_id, String
336
+
337
+ # @!method initialize(direct_upload_id:)
338
+ # Some parameter documentations has been truncated, see
339
+ # {WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID}
340
+ # for more details.
341
+ #
342
+ # Input for an attachment
343
+ #
344
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
345
+ end
346
+
347
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
348
+ # @!attribute id
349
+ # The ID of an existing attachment object. Use this when updating a resource and
350
+ # keeping a subset of the attachments. Don't use this unless you know what you're
351
+ # doing.
352
+ #
353
+ # @return [String]
354
+ required :id, String
355
+
356
+ # @!method initialize(id:)
357
+ # Some parameter documentations has been truncated, see
358
+ # {WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID}
359
+ # for more details.
360
+ #
361
+ # Input for an attachment
362
+ #
363
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
364
+ end
365
+
366
+ # @!method self.variants
367
+ # @return [Array(WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID)]
247
368
  end
248
369
 
249
- class MainPdf < WhopSDK::Internal::Type::BaseModel
250
- # @!attribute id
251
- # The ID of an existing attachment object. Use this when updating a resource and
252
- # keeping a subset of the attachments. Don't use this unless you know what you're
253
- # doing.
254
- #
255
- # @return [String, nil]
256
- optional :id, String, nil?: true
370
+ # The main PDF file for this lesson
371
+ module MainPdf
372
+ extend WhopSDK::Internal::Type::Union
257
373
 
258
- # @!attribute direct_upload_id
259
- # This ID should be used the first time you upload an attachment. It is the ID of
260
- # the direct upload that was created when uploading the file to S3 via the
261
- # mediaDirectUpload mutation.
262
- #
263
- # @return [String, nil]
264
- optional :direct_upload_id, String, nil?: true
374
+ # Input for an attachment
375
+ variant -> { WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID }
265
376
 
266
- # @!method initialize(id: nil, direct_upload_id: nil)
267
- # Some parameter documentations has been truncated, see
268
- # {WhopSDK::Models::CourseLessonUpdateParams::MainPdf} for more details.
269
- #
270
- # The main PDF file for this lesson
271
- #
272
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
273
- #
274
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
377
+ # Input for an attachment
378
+ variant -> { WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID }
379
+
380
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
381
+ # @!attribute direct_upload_id
382
+ # This ID should be used the first time you upload an attachment. It is the ID of
383
+ # the direct upload that was created when uploading the file to S3 via the
384
+ # mediaDirectUpload mutation.
385
+ #
386
+ # @return [String]
387
+ required :direct_upload_id, String
388
+
389
+ # @!method initialize(direct_upload_id:)
390
+ # Some parameter documentations has been truncated, see
391
+ # {WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID}
392
+ # for more details.
393
+ #
394
+ # Input for an attachment
395
+ #
396
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
397
+ end
398
+
399
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
400
+ # @!attribute id
401
+ # The ID of an existing attachment object. Use this when updating a resource and
402
+ # keeping a subset of the attachments. Don't use this unless you know what you're
403
+ # doing.
404
+ #
405
+ # @return [String]
406
+ required :id, String
407
+
408
+ # @!method initialize(id:)
409
+ # Some parameter documentations has been truncated, see
410
+ # {WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID} for
411
+ # more details.
412
+ #
413
+ # Input for an attachment
414
+ #
415
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
416
+ end
417
+
418
+ # @!method self.variants
419
+ # @return [Array(WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID)]
420
+ end
421
+
422
+ # The thumbnail for the lesson in png, jpeg, or gif format
423
+ module Thumbnail
424
+ extend WhopSDK::Internal::Type::Union
425
+
426
+ # Input for an attachment
427
+ variant -> { WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID }
428
+
429
+ # Input for an attachment
430
+ variant -> { WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID }
431
+
432
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
433
+ # @!attribute direct_upload_id
434
+ # This ID should be used the first time you upload an attachment. It is the ID of
435
+ # the direct upload that was created when uploading the file to S3 via the
436
+ # mediaDirectUpload mutation.
437
+ #
438
+ # @return [String]
439
+ required :direct_upload_id, String
440
+
441
+ # @!method initialize(direct_upload_id:)
442
+ # Some parameter documentations has been truncated, see
443
+ # {WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID}
444
+ # for more details.
445
+ #
446
+ # Input for an attachment
447
+ #
448
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
449
+ end
450
+
451
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
452
+ # @!attribute id
453
+ # The ID of an existing attachment object. Use this when updating a resource and
454
+ # keeping a subset of the attachments. Don't use this unless you know what you're
455
+ # doing.
456
+ #
457
+ # @return [String]
458
+ required :id, String
459
+
460
+ # @!method initialize(id:)
461
+ # Some parameter documentations has been truncated, see
462
+ # {WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID}
463
+ # for more details.
464
+ #
465
+ # Input for an attachment
466
+ #
467
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
468
+ end
469
+
470
+ # @!method self.variants
471
+ # @return [Array(WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID)]
275
472
  end
276
473
  end
277
474
  end
@@ -36,6 +36,12 @@ module WhopSDK
36
36
  # @return [Symbol, WhopSDK::Models::Languages]
37
37
  required :language, enum: -> { WhopSDK::Languages }
38
38
 
39
+ # @!attribute order
40
+ # The order of the course within its experience
41
+ #
42
+ # @return [String]
43
+ required :order, String
44
+
39
45
  # @!attribute require_completing_lessons_in_order
40
46
  # Whether the course requires students to complete the previous lesson before
41
47
  # moving on to the next one
@@ -67,7 +73,14 @@ module WhopSDK
67
73
  # @return [Time]
68
74
  required :updated_at, Time
69
75
 
70
- # @!method initialize(id:, certificate_after_completion_enabled:, created_at:, description:, language:, require_completing_lessons_in_order:, tagline:, thumbnail:, title:, updated_at:)
76
+ # @!attribute visibility
77
+ # The visibility of the course. Determines how / whether this course is visible to
78
+ # users.
79
+ #
80
+ # @return [Symbol, WhopSDK::Models::CourseVisibilities]
81
+ required :visibility, enum: -> { WhopSDK::CourseVisibilities }
82
+
83
+ # @!method initialize(id:, certificate_after_completion_enabled:, created_at:, description:, language:, order:, require_completing_lessons_in_order:, tagline:, thumbnail:, title:, updated_at:, visibility:)
71
84
  # Some parameter documentations has been truncated, see
72
85
  # {WhopSDK::Models::CourseListResponse} for more details.
73
86
  #
@@ -83,6 +96,8 @@ module WhopSDK
83
96
  #
84
97
  # @param language [Symbol, WhopSDK::Models::Languages] The language spoken in the video content of the course, used to generate closed
85
98
  #
99
+ # @param order [String] The order of the course within its experience
100
+ #
86
101
  # @param require_completing_lessons_in_order [Boolean] Whether the course requires students to complete the previous lesson before movi
87
102
  #
88
103
  # @param tagline [String, nil] A short tagline for the course. It is displayed under the course title in the UI
@@ -92,6 +107,8 @@ module WhopSDK
92
107
  # @param title [String, nil] The title of the course
93
108
  #
94
109
  # @param updated_at [Time] The timestamp of when the course was last updated
110
+ #
111
+ # @param visibility [Symbol, WhopSDK::Models::CourseVisibilities] The visibility of the course. Determines how / whether this course is visible to
95
112
 
96
113
  # @see WhopSDK::Models::CourseListResponse#thumbnail
97
114
  class Thumbnail < WhopSDK::Internal::Type::BaseModel
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CourseStudents#list
6
+ class CourseStudentListParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute course_id
11
+ # The ID of the course
12
+ #
13
+ # @return [String]
14
+ required :course_id, String
15
+
16
+ # @!attribute after
17
+ # Returns the elements in the list that come after the specified cursor.
18
+ #
19
+ # @return [String, nil]
20
+ optional :after, String, nil?: true
21
+
22
+ # @!attribute before
23
+ # Returns the elements in the list that come before the specified cursor.
24
+ #
25
+ # @return [String, nil]
26
+ optional :before, String, nil?: true
27
+
28
+ # @!attribute first
29
+ # Returns the first _n_ elements from the list.
30
+ #
31
+ # @return [Integer, nil]
32
+ optional :first, Integer, nil?: true
33
+
34
+ # @!attribute keyword
35
+ # Filter students by name - returns students whose names match the keyword
36
+ #
37
+ # @return [String, nil]
38
+ optional :keyword, String, nil?: true
39
+
40
+ # @!attribute last
41
+ # Returns the last _n_ elements from the list.
42
+ #
43
+ # @return [Integer, nil]
44
+ optional :last, Integer, nil?: true
45
+
46
+ # @!method initialize(course_id:, after: nil, before: nil, first: nil, keyword: nil, last: nil, request_options: {})
47
+ # @param course_id [String] The ID of the course
48
+ #
49
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
50
+ #
51
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
52
+ #
53
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
54
+ #
55
+ # @param keyword [String, nil] Filter students by name - returns students whose names match the keyword
56
+ #
57
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
58
+ #
59
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,97 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CourseStudents#list
6
+ class CourseStudentListResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the course student. Looks like crsi_XXX
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute completed_lessons_count
14
+ # The number of lessons the student has completed
15
+ #
16
+ # @return [Integer]
17
+ required :completed_lessons_count, Integer
18
+
19
+ # @!attribute completion_rate
20
+ # The percentage of lessons completed (0-100)
21
+ #
22
+ # @return [Float]
23
+ required :completion_rate, Float
24
+
25
+ # @!attribute first_interaction_at
26
+ # When the student first interacted with the course
27
+ #
28
+ # @return [Time]
29
+ required :first_interaction_at, Time
30
+
31
+ # @!attribute last_interaction_at
32
+ # When the student last interacted with the course
33
+ #
34
+ # @return [Time]
35
+ required :last_interaction_at, Time
36
+
37
+ # @!attribute total_lessons_count
38
+ # The total number of lessons the student has access to
39
+ #
40
+ # @return [Integer]
41
+ required :total_lessons_count, Integer
42
+
43
+ # @!attribute user
44
+ # The user who is enrolled in the course
45
+ #
46
+ # @return [WhopSDK::Models::CourseStudentListResponse::User]
47
+ required :user, -> { WhopSDK::Models::CourseStudentListResponse::User }
48
+
49
+ # @!method initialize(id:, completed_lessons_count:, completion_rate:, first_interaction_at:, last_interaction_at:, total_lessons_count:, user:)
50
+ # A course student (enrollment of a student in a course)
51
+ #
52
+ # @param id [String] The ID of the course student. Looks like crsi_XXX
53
+ #
54
+ # @param completed_lessons_count [Integer] The number of lessons the student has completed
55
+ #
56
+ # @param completion_rate [Float] The percentage of lessons completed (0-100)
57
+ #
58
+ # @param first_interaction_at [Time] When the student first interacted with the course
59
+ #
60
+ # @param last_interaction_at [Time] When the student last interacted with the course
61
+ #
62
+ # @param total_lessons_count [Integer] The total number of lessons the student has access to
63
+ #
64
+ # @param user [WhopSDK::Models::CourseStudentListResponse::User] The user who is enrolled in the course
65
+
66
+ # @see WhopSDK::Models::CourseStudentListResponse#user
67
+ class User < WhopSDK::Internal::Type::BaseModel
68
+ # @!attribute id
69
+ # The internal ID of the user.
70
+ #
71
+ # @return [String]
72
+ required :id, String
73
+
74
+ # @!attribute name
75
+ # The name of the user from their Whop account.
76
+ #
77
+ # @return [String, nil]
78
+ required :name, String, nil?: true
79
+
80
+ # @!attribute username
81
+ # The username of the user from their Whop account.
82
+ #
83
+ # @return [String]
84
+ required :username, String
85
+
86
+ # @!method initialize(id:, name:, username:)
87
+ # The user who is enrolled in the course
88
+ #
89
+ # @param id [String] The internal ID of the user.
90
+ #
91
+ # @param name [String, nil] The name of the user from their Whop account.
92
+ #
93
+ # @param username [String] The username of the user from their Whop account.
94
+ end
95
+ end
96
+ end
97
+ end