whop_sdk 0.0.7 → 0.0.9

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 (251) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +7 -7
  4. data/lib/whop_sdk/client.rb +12 -0
  5. data/lib/whop_sdk/internal/type/base_model.rb +1 -1
  6. data/lib/whop_sdk/models/account_link_create_params.rb +62 -0
  7. data/lib/whop_sdk/models/account_link_create_response.rb +28 -0
  8. data/lib/whop_sdk/models/app.rb +9 -1
  9. data/lib/whop_sdk/models/app_build_list_params.rb +17 -1
  10. data/lib/whop_sdk/models/app_list_params.rb +10 -1
  11. data/lib/whop_sdk/models/app_list_response.rb +9 -1
  12. data/lib/whop_sdk/models/app_type.rb +18 -0
  13. data/lib/whop_sdk/models/app_update_params.rb +9 -1
  14. data/lib/whop_sdk/models/authorized_user_list_params.rb +17 -1
  15. data/lib/whop_sdk/models/checkout_configuration.rb +69 -7
  16. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +73 -1
  17. data/lib/whop_sdk/models/checkout_configuration_list_params.rb +17 -1
  18. data/lib/whop_sdk/models/checkout_configuration_list_response.rb +69 -7
  19. data/lib/whop_sdk/models/checkout_modes.rb +16 -0
  20. data/lib/whop_sdk/models/company_list_params.rb +17 -1
  21. data/lib/whop_sdk/models/course.rb +9 -1
  22. data/lib/whop_sdk/models/course_lesson_list_response.rb +9 -1
  23. data/lib/whop_sdk/models/course_lesson_mark_as_completed_params.rb +14 -0
  24. data/lib/whop_sdk/models/course_lesson_mark_as_completed_response.rb +8 -0
  25. data/lib/whop_sdk/models/course_lesson_start_params.rb +14 -0
  26. data/lib/whop_sdk/models/course_lesson_start_response.rb +8 -0
  27. data/lib/whop_sdk/models/course_lesson_submit_assessment_params.rb +52 -0
  28. data/lib/whop_sdk/models/course_lesson_submit_assessment_response.rb +151 -0
  29. data/lib/whop_sdk/models/course_list_response.rb +9 -1
  30. data/lib/whop_sdk/models/dispute_list_params.rb +17 -1
  31. data/lib/whop_sdk/models/entry_list_params.rb +17 -1
  32. data/lib/whop_sdk/models/experience_list_params.rb +17 -1
  33. data/lib/whop_sdk/models/forum_post_create_params.rb +3 -14
  34. data/lib/whop_sdk/models/forum_post_update_params.rb +3 -14
  35. data/lib/whop_sdk/models/forum_post_visibility_type.rb +16 -0
  36. data/lib/whop_sdk/models/invoice_list_params.rb +17 -1
  37. data/lib/whop_sdk/models/lesson.rb +104 -2
  38. data/lib/whop_sdk/models/payment_method_types.rb +1 -0
  39. data/lib/whop_sdk/models/payment_provider.rb +22 -0
  40. data/lib/whop_sdk/models/plan_create_params.rb +3 -21
  41. data/lib/whop_sdk/models/plan_list_params.rb +17 -1
  42. data/lib/whop_sdk/models/product_list_params.rb +17 -1
  43. data/lib/whop_sdk/models/product_update_params.rb +1 -61
  44. data/lib/whop_sdk/models/promo_code_list_params.rb +17 -1
  45. data/lib/whop_sdk/models/refund_created_webhook_event.rb +354 -0
  46. data/lib/whop_sdk/models/refund_list_params.rb +78 -0
  47. data/lib/whop_sdk/models/refund_list_response.rb +113 -0
  48. data/lib/whop_sdk/models/refund_reference_status.rb +17 -0
  49. data/lib/whop_sdk/models/refund_reference_type.rb +17 -0
  50. data/lib/whop_sdk/models/refund_retrieve_params.rb +14 -0
  51. data/lib/whop_sdk/models/refund_retrieve_response.rb +307 -0
  52. data/lib/whop_sdk/models/refund_status.rb +19 -0
  53. data/lib/whop_sdk/models/refund_updated_webhook_event.rb +354 -0
  54. data/lib/whop_sdk/models/review_list_params.rb +17 -1
  55. data/lib/whop_sdk/models/transfer_list_params.rb +17 -1
  56. data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
  57. data/lib/whop_sdk/models/withdrawal_fee_types.rb +16 -0
  58. data/lib/whop_sdk/models/withdrawal_list_params.rb +78 -0
  59. data/lib/whop_sdk/models/withdrawal_list_response.rb +87 -0
  60. data/lib/whop_sdk/models/withdrawal_retrieve_params.rb +14 -0
  61. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +320 -0
  62. data/lib/whop_sdk/models/withdrawal_speeds.rb +16 -0
  63. data/lib/whop_sdk/models/withdrawal_status.rb +21 -0
  64. data/lib/whop_sdk/models/withdrawal_types.rb +16 -0
  65. data/lib/whop_sdk/models.rb +42 -0
  66. data/lib/whop_sdk/resources/account_links.rb +47 -0
  67. data/lib/whop_sdk/resources/app_builds.rb +5 -1
  68. data/lib/whop_sdk/resources/apps.rb +6 -2
  69. data/lib/whop_sdk/resources/authorized_users.rb +5 -1
  70. data/lib/whop_sdk/resources/checkout_configurations.rb +16 -2
  71. data/lib/whop_sdk/resources/companies.rb +5 -1
  72. data/lib/whop_sdk/resources/course_lessons.rb +64 -0
  73. data/lib/whop_sdk/resources/disputes.rb +5 -1
  74. data/lib/whop_sdk/resources/entries.rb +5 -1
  75. data/lib/whop_sdk/resources/experiences.rb +5 -1
  76. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  77. data/lib/whop_sdk/resources/invoices.rb +5 -1
  78. data/lib/whop_sdk/resources/plans.rb +7 -7
  79. data/lib/whop_sdk/resources/products.rb +6 -4
  80. data/lib/whop_sdk/resources/promo_codes.rb +5 -1
  81. data/lib/whop_sdk/resources/refunds.rb +82 -0
  82. data/lib/whop_sdk/resources/reviews.rb +5 -1
  83. data/lib/whop_sdk/resources/transfers.rb +5 -1
  84. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  85. data/lib/whop_sdk/resources/withdrawals.rb +79 -0
  86. data/lib/whop_sdk/version.rb +1 -1
  87. data/lib/whop_sdk.rb +33 -0
  88. data/manifest.yaml +1 -0
  89. data/rbi/whop_sdk/client.rbi +9 -0
  90. data/rbi/whop_sdk/models/account_link_create_params.rbi +101 -0
  91. data/rbi/whop_sdk/models/account_link_create_response.rbi +38 -0
  92. data/rbi/whop_sdk/models/app.rbi +8 -0
  93. data/rbi/whop_sdk/models/app_build_list_params.rbi +16 -0
  94. data/rbi/whop_sdk/models/app_list_params.rbi +13 -0
  95. data/rbi/whop_sdk/models/app_list_response.rbi +8 -0
  96. data/rbi/whop_sdk/models/app_type.rbi +22 -0
  97. data/rbi/whop_sdk/models/app_update_params.rbi +8 -0
  98. data/rbi/whop_sdk/models/authorized_user_list_params.rbi +16 -0
  99. data/rbi/whop_sdk/models/checkout_configuration.rbi +117 -7
  100. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +116 -0
  101. data/rbi/whop_sdk/models/checkout_configuration_list_params.rbi +16 -0
  102. data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +127 -7
  103. data/rbi/whop_sdk/models/checkout_modes.rbi +20 -0
  104. data/rbi/whop_sdk/models/company_list_params.rbi +16 -0
  105. data/rbi/whop_sdk/models/course.rbi +8 -0
  106. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +8 -0
  107. data/rbi/whop_sdk/models/course_lesson_mark_as_completed_params.rbi +30 -0
  108. data/rbi/whop_sdk/models/course_lesson_mark_as_completed_response.rbi +8 -0
  109. data/rbi/whop_sdk/models/course_lesson_start_params.rbi +27 -0
  110. data/rbi/whop_sdk/models/course_lesson_start_response.rbi +8 -0
  111. data/rbi/whop_sdk/models/course_lesson_submit_assessment_params.rbi +104 -0
  112. data/rbi/whop_sdk/models/course_lesson_submit_assessment_response.rbi +222 -0
  113. data/rbi/whop_sdk/models/course_list_response.rbi +8 -0
  114. data/rbi/whop_sdk/models/dispute_list_params.rbi +16 -0
  115. data/rbi/whop_sdk/models/entry_list_params.rbi +16 -0
  116. data/rbi/whop_sdk/models/experience_list_params.rbi +16 -0
  117. data/rbi/whop_sdk/models/forum_post_create_params.rbi +3 -37
  118. data/rbi/whop_sdk/models/forum_post_update_params.rbi +3 -37
  119. data/rbi/whop_sdk/models/forum_post_visibility_type.rbi +27 -0
  120. data/rbi/whop_sdk/models/invoice_list_params.rbi +16 -0
  121. data/rbi/whop_sdk/models/lesson.rbi +115 -3
  122. data/rbi/whop_sdk/models/payment_method_types.rbi +1 -0
  123. data/rbi/whop_sdk/models/payment_provider.rbi +27 -0
  124. data/rbi/whop_sdk/models/plan_create_params.rbi +2 -22
  125. data/rbi/whop_sdk/models/plan_list_params.rbi +16 -0
  126. data/rbi/whop_sdk/models/product_list_params.rbi +16 -0
  127. data/rbi/whop_sdk/models/product_update_params.rbi +0 -110
  128. data/rbi/whop_sdk/models/promo_code_list_params.rbi +16 -0
  129. data/rbi/whop_sdk/models/refund_created_webhook_event.rbi +561 -0
  130. data/rbi/whop_sdk/models/refund_list_params.rbi +99 -0
  131. data/rbi/whop_sdk/models/refund_list_response.rbi +155 -0
  132. data/rbi/whop_sdk/models/refund_reference_status.rbi +26 -0
  133. data/rbi/whop_sdk/models/refund_reference_type.rbi +36 -0
  134. data/rbi/whop_sdk/models/refund_retrieve_params.rbi +27 -0
  135. data/rbi/whop_sdk/models/refund_retrieve_response.rbi +484 -0
  136. data/rbi/whop_sdk/models/refund_status.rbi +24 -0
  137. data/rbi/whop_sdk/models/refund_updated_webhook_event.rbi +561 -0
  138. data/rbi/whop_sdk/models/review_list_params.rbi +16 -0
  139. data/rbi/whop_sdk/models/transfer_list_params.rbi +16 -0
  140. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -1
  141. data/rbi/whop_sdk/models/withdrawal_fee_types.rbi +22 -0
  142. data/rbi/whop_sdk/models/withdrawal_list_params.rbi +99 -0
  143. data/rbi/whop_sdk/models/withdrawal_list_response.rbi +107 -0
  144. data/rbi/whop_sdk/models/withdrawal_retrieve_params.rbi +27 -0
  145. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +713 -0
  146. data/rbi/whop_sdk/models/withdrawal_speeds.rbi +22 -0
  147. data/rbi/whop_sdk/models/withdrawal_status.rbi +28 -0
  148. data/rbi/whop_sdk/models/withdrawal_types.rbi +20 -0
  149. data/rbi/whop_sdk/models.rbi +44 -0
  150. data/rbi/whop_sdk/resources/account_links.rbi +39 -0
  151. data/rbi/whop_sdk/resources/app_builds.rbi +6 -0
  152. data/rbi/whop_sdk/resources/apps.rbi +6 -0
  153. data/rbi/whop_sdk/resources/authorized_users.rbi +6 -0
  154. data/rbi/whop_sdk/resources/checkout_configurations.rbi +21 -0
  155. data/rbi/whop_sdk/resources/companies.rbi +6 -0
  156. data/rbi/whop_sdk/resources/course_lessons.rbi +48 -0
  157. data/rbi/whop_sdk/resources/disputes.rbi +6 -0
  158. data/rbi/whop_sdk/resources/entries.rbi +6 -0
  159. data/rbi/whop_sdk/resources/experiences.rbi +6 -0
  160. data/rbi/whop_sdk/resources/forum_posts.rbi +2 -4
  161. data/rbi/whop_sdk/resources/invoices.rbi +6 -0
  162. data/rbi/whop_sdk/resources/plans.rbi +7 -9
  163. data/rbi/whop_sdk/resources/products.rbi +6 -9
  164. data/rbi/whop_sdk/resources/promo_codes.rbi +6 -0
  165. data/rbi/whop_sdk/resources/refunds.rbi +74 -0
  166. data/rbi/whop_sdk/resources/reviews.rbi +6 -0
  167. data/rbi/whop_sdk/resources/transfers.rbi +6 -0
  168. data/rbi/whop_sdk/resources/webhooks.rbi +3 -1
  169. data/rbi/whop_sdk/resources/withdrawals.rbi +71 -0
  170. data/sig/whop_sdk/client.rbs +6 -0
  171. data/sig/whop_sdk/models/account_link_create_params.rbs +52 -0
  172. data/sig/whop_sdk/models/account_link_create_response.rbs +15 -0
  173. data/sig/whop_sdk/models/app.rbs +5 -0
  174. data/sig/whop_sdk/models/app_build_list_params.rbs +10 -0
  175. data/sig/whop_sdk/models/app_list_params.rbs +7 -0
  176. data/sig/whop_sdk/models/app_list_response.rbs +5 -0
  177. data/sig/whop_sdk/models/app_type.rbs +16 -0
  178. data/sig/whop_sdk/models/app_update_params.rbs +5 -0
  179. data/sig/whop_sdk/models/authorized_user_list_params.rbs +10 -0
  180. data/sig/whop_sdk/models/checkout_configuration.rbs +45 -8
  181. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +43 -1
  182. data/sig/whop_sdk/models/checkout_configuration_list_params.rbs +10 -0
  183. data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +45 -8
  184. data/sig/whop_sdk/models/checkout_modes.rbs +14 -0
  185. data/sig/whop_sdk/models/company_list_params.rbs +10 -0
  186. data/sig/whop_sdk/models/course.rbs +5 -0
  187. data/sig/whop_sdk/models/course_lesson_list_response.rbs +5 -0
  188. data/sig/whop_sdk/models/course_lesson_mark_as_completed_params.rbs +15 -0
  189. data/sig/whop_sdk/models/course_lesson_mark_as_completed_response.rbs +5 -0
  190. data/sig/whop_sdk/models/course_lesson_start_params.rbs +15 -0
  191. data/sig/whop_sdk/models/course_lesson_start_response.rbs +5 -0
  192. data/sig/whop_sdk/models/course_lesson_submit_assessment_params.rbs +51 -0
  193. data/sig/whop_sdk/models/course_lesson_submit_assessment_response.rbs +96 -0
  194. data/sig/whop_sdk/models/course_list_response.rbs +5 -0
  195. data/sig/whop_sdk/models/dispute_list_params.rbs +10 -0
  196. data/sig/whop_sdk/models/entry_list_params.rbs +10 -0
  197. data/sig/whop_sdk/models/experience_list_params.rbs +10 -0
  198. data/sig/whop_sdk/models/forum_post_create_params.rbs +4 -15
  199. data/sig/whop_sdk/models/forum_post_update_params.rbs +4 -15
  200. data/sig/whop_sdk/models/forum_post_visibility_type.rbs +14 -0
  201. data/sig/whop_sdk/models/invoice_list_params.rbs +10 -0
  202. data/sig/whop_sdk/models/lesson.rbs +79 -3
  203. data/sig/whop_sdk/models/payment_method_types.rbs +2 -0
  204. data/sig/whop_sdk/models/payment_provider.rbs +28 -0
  205. data/sig/whop_sdk/models/plan_create_params.rbs +0 -10
  206. data/sig/whop_sdk/models/plan_list_params.rbs +10 -0
  207. data/sig/whop_sdk/models/product_list_params.rbs +10 -0
  208. data/sig/whop_sdk/models/product_update_params.rbs +0 -36
  209. data/sig/whop_sdk/models/promo_code_list_params.rbs +10 -0
  210. data/sig/whop_sdk/models/refund_created_webhook_event.rbs +252 -0
  211. data/sig/whop_sdk/models/refund_list_params.rbs +61 -0
  212. data/sig/whop_sdk/models/refund_list_response.rbs +80 -0
  213. data/sig/whop_sdk/models/refund_reference_status.rbs +15 -0
  214. data/sig/whop_sdk/models/refund_reference_type.rbs +18 -0
  215. data/sig/whop_sdk/models/refund_retrieve_params.rbs +15 -0
  216. data/sig/whop_sdk/models/refund_retrieve_response.rbs +215 -0
  217. data/sig/whop_sdk/models/refund_status.rbs +18 -0
  218. data/sig/whop_sdk/models/refund_updated_webhook_event.rbs +252 -0
  219. data/sig/whop_sdk/models/review_list_params.rbs +10 -0
  220. data/sig/whop_sdk/models/transfer_list_params.rbs +10 -0
  221. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  222. data/sig/whop_sdk/models/withdrawal_fee_types.rbs +14 -0
  223. data/sig/whop_sdk/models/withdrawal_list_params.rbs +61 -0
  224. data/sig/whop_sdk/models/withdrawal_list_response.rbs +60 -0
  225. data/sig/whop_sdk/models/withdrawal_retrieve_params.rbs +15 -0
  226. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +297 -0
  227. data/sig/whop_sdk/models/withdrawal_speeds.rbs +14 -0
  228. data/sig/whop_sdk/models/withdrawal_status.rbs +26 -0
  229. data/sig/whop_sdk/models/withdrawal_types.rbs +14 -0
  230. data/sig/whop_sdk/models.rbs +42 -0
  231. data/sig/whop_sdk/resources/account_links.rbs +15 -0
  232. data/sig/whop_sdk/resources/app_builds.rbs +2 -0
  233. data/sig/whop_sdk/resources/apps.rbs +2 -0
  234. data/sig/whop_sdk/resources/authorized_users.rbs +2 -0
  235. data/sig/whop_sdk/resources/checkout_configurations.rbs +5 -0
  236. data/sig/whop_sdk/resources/companies.rbs +2 -0
  237. data/sig/whop_sdk/resources/course_lessons.rbs +16 -0
  238. data/sig/whop_sdk/resources/disputes.rbs +2 -0
  239. data/sig/whop_sdk/resources/entries.rbs +2 -0
  240. data/sig/whop_sdk/resources/experiences.rbs +2 -0
  241. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  242. data/sig/whop_sdk/resources/invoices.rbs +2 -0
  243. data/sig/whop_sdk/resources/plans.rbs +2 -2
  244. data/sig/whop_sdk/resources/products.rbs +2 -1
  245. data/sig/whop_sdk/resources/promo_codes.rbs +2 -0
  246. data/sig/whop_sdk/resources/refunds.rbs +24 -0
  247. data/sig/whop_sdk/resources/reviews.rbs +2 -0
  248. data/sig/whop_sdk/resources/transfers.rbs +2 -0
  249. data/sig/whop_sdk/resources/webhooks.rbs +3 -1
  250. data/sig/whop_sdk/resources/withdrawals.rbs +24 -0
  251. metadata +98 -2
@@ -0,0 +1,30 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class CourseLessonMarkAsCompletedParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ WhopSDK::CourseLessonMarkAsCompletedParams,
13
+ WhopSDK::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig do
18
+ params(request_options: WhopSDK::RequestOptions::OrHash).returns(
19
+ T.attached_class
20
+ )
21
+ end
22
+ def self.new(request_options: {})
23
+ end
24
+
25
+ sig { override.returns({ request_options: WhopSDK::RequestOptions }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,8 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ CourseLessonMarkAsCompletedResponse =
6
+ T.let(T::Boolean, WhopSDK::Internal::Type::Converter)
7
+ end
8
+ end
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class CourseLessonStartParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::CourseLessonStartParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ sig do
15
+ params(request_options: WhopSDK::RequestOptions::OrHash).returns(
16
+ T.attached_class
17
+ )
18
+ end
19
+ def self.new(request_options: {})
20
+ end
21
+
22
+ sig { override.returns({ request_options: WhopSDK::RequestOptions }) }
23
+ def to_hash
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,8 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ CourseLessonStartResponse =
6
+ T.let(T::Boolean, WhopSDK::Internal::Type::Converter)
7
+ end
8
+ end
@@ -0,0 +1,104 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class CourseLessonSubmitAssessmentParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ WhopSDK::CourseLessonSubmitAssessmentParams,
13
+ WhopSDK::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The answers to the assessment questions
18
+ sig do
19
+ returns(T::Array[WhopSDK::CourseLessonSubmitAssessmentParams::Answer])
20
+ end
21
+ attr_accessor :answers
22
+
23
+ sig do
24
+ params(
25
+ answers:
26
+ T::Array[
27
+ WhopSDK::CourseLessonSubmitAssessmentParams::Answer::OrHash
28
+ ],
29
+ request_options: WhopSDK::RequestOptions::OrHash
30
+ ).returns(T.attached_class)
31
+ end
32
+ def self.new(
33
+ # The answers to the assessment questions
34
+ answers:,
35
+ request_options: {}
36
+ )
37
+ end
38
+
39
+ sig do
40
+ override.returns(
41
+ {
42
+ answers:
43
+ T::Array[WhopSDK::CourseLessonSubmitAssessmentParams::Answer],
44
+ request_options: WhopSDK::RequestOptions
45
+ }
46
+ )
47
+ end
48
+ def to_hash
49
+ end
50
+
51
+ class Answer < WhopSDK::Internal::Type::BaseModel
52
+ OrHash =
53
+ T.type_alias do
54
+ T.any(
55
+ WhopSDK::CourseLessonSubmitAssessmentParams::Answer,
56
+ WhopSDK::Internal::AnyHash
57
+ )
58
+ end
59
+
60
+ # The ID of the question being answered
61
+ sig { returns(String) }
62
+ attr_accessor :question_id
63
+
64
+ # The text answer provided by the user (for short answer questions)
65
+ sig { returns(T.nilable(String)) }
66
+ attr_accessor :answer_text
67
+
68
+ # The IDs of the selected options (for multiple choice/select questions)
69
+ sig { returns(T.nilable(T::Array[String])) }
70
+ attr_accessor :selected_option_ids
71
+
72
+ # Input for a single question's answer in an assessment submission
73
+ sig do
74
+ params(
75
+ question_id: String,
76
+ answer_text: T.nilable(String),
77
+ selected_option_ids: T.nilable(T::Array[String])
78
+ ).returns(T.attached_class)
79
+ end
80
+ def self.new(
81
+ # The ID of the question being answered
82
+ question_id:,
83
+ # The text answer provided by the user (for short answer questions)
84
+ answer_text: nil,
85
+ # The IDs of the selected options (for multiple choice/select questions)
86
+ selected_option_ids: nil
87
+ )
88
+ end
89
+
90
+ sig do
91
+ override.returns(
92
+ {
93
+ question_id: String,
94
+ answer_text: T.nilable(String),
95
+ selected_option_ids: T.nilable(T::Array[String])
96
+ }
97
+ )
98
+ end
99
+ def to_hash
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,222 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class CourseLessonSubmitAssessmentResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::Models::CourseLessonSubmitAssessmentResponse,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The ID of the assessment result
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # When the assessment was taken
19
+ sig { returns(Time) }
20
+ attr_accessor :created_at
21
+
22
+ # The lesson this assessment result is for
23
+ sig do
24
+ returns(WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson)
25
+ end
26
+ attr_reader :lesson
27
+
28
+ sig do
29
+ params(
30
+ lesson:
31
+ WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson::OrHash
32
+ ).void
33
+ end
34
+ attr_writer :lesson
35
+
36
+ # The number of correct answers
37
+ sig { returns(Integer) }
38
+ attr_accessor :result_correct
39
+
40
+ # The grade achieved on the assessment
41
+ sig { returns(Float) }
42
+ attr_accessor :result_grade
43
+
44
+ # Array of graded questions with details
45
+ sig { returns(T::Hash[Symbol, T.anything]) }
46
+ attr_accessor :result_graded_questions
47
+
48
+ # Whether the user achieved a passing grade
49
+ sig { returns(T::Boolean) }
50
+ attr_accessor :result_passing_grade
51
+
52
+ # The total number of questions in the assessment
53
+ sig { returns(Integer) }
54
+ attr_accessor :result_question_count
55
+
56
+ # The percentage score achieved on the assessment
57
+ sig { returns(Float) }
58
+ attr_accessor :score_percent
59
+
60
+ # When the assessment result was last updated
61
+ sig { returns(Time) }
62
+ attr_accessor :updated_at
63
+
64
+ # The user who took the assessment
65
+ sig do
66
+ returns(WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User)
67
+ end
68
+ attr_reader :user
69
+
70
+ sig do
71
+ params(
72
+ user:
73
+ WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User::OrHash
74
+ ).void
75
+ end
76
+ attr_writer :user
77
+
78
+ # The result of a user's assessment attempt
79
+ sig do
80
+ params(
81
+ id: String,
82
+ created_at: Time,
83
+ lesson:
84
+ WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson::OrHash,
85
+ result_correct: Integer,
86
+ result_grade: Float,
87
+ result_graded_questions: T::Hash[Symbol, T.anything],
88
+ result_passing_grade: T::Boolean,
89
+ result_question_count: Integer,
90
+ score_percent: Float,
91
+ updated_at: Time,
92
+ user:
93
+ WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User::OrHash
94
+ ).returns(T.attached_class)
95
+ end
96
+ def self.new(
97
+ # The ID of the assessment result
98
+ id:,
99
+ # When the assessment was taken
100
+ created_at:,
101
+ # The lesson this assessment result is for
102
+ lesson:,
103
+ # The number of correct answers
104
+ result_correct:,
105
+ # The grade achieved on the assessment
106
+ result_grade:,
107
+ # Array of graded questions with details
108
+ result_graded_questions:,
109
+ # Whether the user achieved a passing grade
110
+ result_passing_grade:,
111
+ # The total number of questions in the assessment
112
+ result_question_count:,
113
+ # The percentage score achieved on the assessment
114
+ score_percent:,
115
+ # When the assessment result was last updated
116
+ updated_at:,
117
+ # The user who took the assessment
118
+ user:
119
+ )
120
+ end
121
+
122
+ sig do
123
+ override.returns(
124
+ {
125
+ id: String,
126
+ created_at: Time,
127
+ lesson:
128
+ WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson,
129
+ result_correct: Integer,
130
+ result_grade: Float,
131
+ result_graded_questions: T::Hash[Symbol, T.anything],
132
+ result_passing_grade: T::Boolean,
133
+ result_question_count: Integer,
134
+ score_percent: Float,
135
+ updated_at: Time,
136
+ user: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User
137
+ }
138
+ )
139
+ end
140
+ def to_hash
141
+ end
142
+
143
+ class Lesson < WhopSDK::Internal::Type::BaseModel
144
+ OrHash =
145
+ T.type_alias do
146
+ T.any(
147
+ WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson,
148
+ WhopSDK::Internal::AnyHash
149
+ )
150
+ end
151
+
152
+ # The ID of the lesson
153
+ sig { returns(String) }
154
+ attr_accessor :id
155
+
156
+ # The title of the lesson
157
+ sig { returns(String) }
158
+ attr_accessor :title
159
+
160
+ # The lesson this assessment result is for
161
+ sig { params(id: String, title: String).returns(T.attached_class) }
162
+ def self.new(
163
+ # The ID of the lesson
164
+ id:,
165
+ # The title of the lesson
166
+ title:
167
+ )
168
+ end
169
+
170
+ sig { override.returns({ id: String, title: String }) }
171
+ def to_hash
172
+ end
173
+ end
174
+
175
+ class User < WhopSDK::Internal::Type::BaseModel
176
+ OrHash =
177
+ T.type_alias do
178
+ T.any(
179
+ WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User,
180
+ WhopSDK::Internal::AnyHash
181
+ )
182
+ end
183
+
184
+ # The internal ID of the user.
185
+ sig { returns(String) }
186
+ attr_accessor :id
187
+
188
+ # The name of the user from their Whop account.
189
+ sig { returns(T.nilable(String)) }
190
+ attr_accessor :name
191
+
192
+ # The username of the user from their Whop account.
193
+ sig { returns(String) }
194
+ attr_accessor :username
195
+
196
+ # The user who took the assessment
197
+ sig do
198
+ params(id: String, name: T.nilable(String), username: String).returns(
199
+ T.attached_class
200
+ )
201
+ end
202
+ def self.new(
203
+ # The internal ID of the user.
204
+ id:,
205
+ # The name of the user from their Whop account.
206
+ name:,
207
+ # The username of the user from their Whop account.
208
+ username:
209
+ )
210
+ end
211
+
212
+ sig do
213
+ override.returns(
214
+ { id: String, name: T.nilable(String), username: String }
215
+ )
216
+ end
217
+ def to_hash
218
+ end
219
+ end
220
+ end
221
+ end
222
+ end
@@ -17,6 +17,10 @@ module WhopSDK
17
17
  sig { returns(T.nilable(T::Boolean)) }
18
18
  attr_accessor :certificate_after_completion_enabled
19
19
 
20
+ # The URL of the course's cover image, which is shown in course preview cards
21
+ sig { returns(T.nilable(String)) }
22
+ attr_accessor :cover_image
23
+
20
24
  # The timestamp of when the course was created
21
25
  sig { returns(Time) }
22
26
  attr_accessor :created_at
@@ -73,6 +77,7 @@ module WhopSDK
73
77
  params(
74
78
  id: String,
75
79
  certificate_after_completion_enabled: T.nilable(T::Boolean),
80
+ cover_image: T.nilable(String),
76
81
  created_at: Time,
77
82
  description: T.nilable(String),
78
83
  language: WhopSDK::Languages::OrSymbol,
@@ -92,6 +97,8 @@ module WhopSDK
92
97
  # Whether the course will award its students a PDF certificate after completing
93
98
  # all lessons
94
99
  certificate_after_completion_enabled:,
100
+ # The URL of the course's cover image, which is shown in course preview cards
101
+ cover_image:,
95
102
  # The timestamp of when the course was created
96
103
  created_at:,
97
104
  # A short description of the course
@@ -123,6 +130,7 @@ module WhopSDK
123
130
  {
124
131
  id: String,
125
132
  certificate_after_completion_enabled: T.nilable(T::Boolean),
133
+ cover_image: T.nilable(String),
126
134
  created_at: Time,
127
135
  description: T.nilable(String),
128
136
  language: WhopSDK::Languages::TaggedSymbol,
@@ -23,6 +23,14 @@ module WhopSDK
23
23
  sig { returns(T.nilable(String)) }
24
24
  attr_accessor :before
25
25
 
26
+ # The minimum creation date to filter by
27
+ sig { returns(T.nilable(Time)) }
28
+ attr_accessor :created_after
29
+
30
+ # The maximum creation date to filter by
31
+ sig { returns(T.nilable(Time)) }
32
+ attr_accessor :created_before
33
+
26
34
  # The direction of the sort.
27
35
  sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) }
28
36
  attr_accessor :direction
@@ -40,6 +48,8 @@ module WhopSDK
40
48
  company_id: String,
41
49
  after: T.nilable(String),
42
50
  before: T.nilable(String),
51
+ created_after: T.nilable(Time),
52
+ created_before: T.nilable(Time),
43
53
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
44
54
  first: T.nilable(Integer),
45
55
  last: T.nilable(Integer),
@@ -53,6 +63,10 @@ module WhopSDK
53
63
  after: nil,
54
64
  # Returns the elements in the list that come before the specified cursor.
55
65
  before: nil,
66
+ # The minimum creation date to filter by
67
+ created_after: nil,
68
+ # The maximum creation date to filter by
69
+ created_before: nil,
56
70
  # The direction of the sort.
57
71
  direction: nil,
58
72
  # Returns the first _n_ elements from the list.
@@ -69,6 +83,8 @@ module WhopSDK
69
83
  company_id: String,
70
84
  after: T.nilable(String),
71
85
  before: T.nilable(String),
86
+ created_after: T.nilable(Time),
87
+ created_before: T.nilable(Time),
72
88
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
73
89
  first: T.nilable(Integer),
74
90
  last: T.nilable(Integer),
@@ -23,6 +23,14 @@ module WhopSDK
23
23
  sig { returns(T.nilable(String)) }
24
24
  attr_accessor :before
25
25
 
26
+ # The minimum creation date to filter by
27
+ sig { returns(T.nilable(Time)) }
28
+ attr_accessor :created_after
29
+
30
+ # The maximum creation date to filter by
31
+ sig { returns(T.nilable(Time)) }
32
+ attr_accessor :created_before
33
+
26
34
  # The direction of the sort.
27
35
  sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) }
28
36
  attr_accessor :direction
@@ -56,6 +64,8 @@ module WhopSDK
56
64
  company_id: String,
57
65
  after: T.nilable(String),
58
66
  before: T.nilable(String),
67
+ created_after: T.nilable(Time),
68
+ created_before: T.nilable(Time),
59
69
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
60
70
  first: T.nilable(Integer),
61
71
  last: T.nilable(Integer),
@@ -73,6 +83,10 @@ module WhopSDK
73
83
  after: nil,
74
84
  # Returns the elements in the list that come before the specified cursor.
75
85
  before: nil,
86
+ # The minimum creation date to filter by
87
+ created_after: nil,
88
+ # The maximum creation date to filter by
89
+ created_before: nil,
76
90
  # The direction of the sort.
77
91
  direction: nil,
78
92
  # Returns the first _n_ elements from the list.
@@ -97,6 +111,8 @@ module WhopSDK
97
111
  company_id: String,
98
112
  after: T.nilable(String),
99
113
  before: T.nilable(String),
114
+ created_after: T.nilable(Time),
115
+ created_before: T.nilable(Time),
100
116
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
101
117
  first: T.nilable(Integer),
102
118
  last: T.nilable(Integer),
@@ -27,6 +27,14 @@ module WhopSDK
27
27
  sig { returns(T.nilable(String)) }
28
28
  attr_accessor :before
29
29
 
30
+ # The minimum creation date to filter by
31
+ sig { returns(T.nilable(Time)) }
32
+ attr_accessor :created_after
33
+
34
+ # The maximum creation date to filter by
35
+ sig { returns(T.nilable(Time)) }
36
+ attr_accessor :created_before
37
+
30
38
  # Returns the first _n_ elements from the list.
31
39
  sig { returns(T.nilable(Integer)) }
32
40
  attr_accessor :first
@@ -45,6 +53,8 @@ module WhopSDK
45
53
  after: T.nilable(String),
46
54
  app_id: T.nilable(String),
47
55
  before: T.nilable(String),
56
+ created_after: T.nilable(Time),
57
+ created_before: T.nilable(Time),
48
58
  first: T.nilable(Integer),
49
59
  last: T.nilable(Integer),
50
60
  product_id: T.nilable(String),
@@ -60,6 +70,10 @@ module WhopSDK
60
70
  app_id: nil,
61
71
  # Returns the elements in the list that come before the specified cursor.
62
72
  before: nil,
73
+ # The minimum creation date to filter by
74
+ created_after: nil,
75
+ # The maximum creation date to filter by
76
+ created_before: nil,
63
77
  # Returns the first _n_ elements from the list.
64
78
  first: nil,
65
79
  # Returns the last _n_ elements from the list.
@@ -77,6 +91,8 @@ module WhopSDK
77
91
  after: T.nilable(String),
78
92
  app_id: T.nilable(String),
79
93
  before: T.nilable(String),
94
+ created_after: T.nilable(Time),
95
+ created_before: T.nilable(Time),
80
96
  first: T.nilable(Integer),
81
97
  last: T.nilable(Integer),
82
98
  product_id: T.nilable(String),
@@ -75,9 +75,7 @@ module WhopSDK
75
75
  attr_accessor :title
76
76
 
77
77
  # The visibility types for forum posts
78
- sig do
79
- returns(T.nilable(WhopSDK::ForumPostCreateParams::Visibility::OrSymbol))
80
- end
78
+ sig { returns(T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol)) }
81
79
  attr_accessor :visibility
82
80
 
83
81
  sig do
@@ -100,8 +98,7 @@ module WhopSDK
100
98
  pinned: T.nilable(T::Boolean),
101
99
  poll: T.nilable(WhopSDK::ForumPostCreateParams::Poll::OrHash),
102
100
  title: T.nilable(String),
103
- visibility:
104
- T.nilable(WhopSDK::ForumPostCreateParams::Visibility::OrSymbol),
101
+ visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
105
102
  request_options: WhopSDK::RequestOptions::OrHash
106
103
  ).returns(T.attached_class)
107
104
  end
@@ -158,8 +155,7 @@ module WhopSDK
158
155
  pinned: T.nilable(T::Boolean),
159
156
  poll: T.nilable(WhopSDK::ForumPostCreateParams::Poll),
160
157
  title: T.nilable(String),
161
- visibility:
162
- T.nilable(WhopSDK::ForumPostCreateParams::Visibility::OrSymbol),
158
+ visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
163
159
  request_options: WhopSDK::RequestOptions
164
160
  }
165
161
  )
@@ -314,36 +310,6 @@ module WhopSDK
314
310
  end
315
311
  end
316
312
  end
317
-
318
- # The visibility types for forum posts
319
- module Visibility
320
- extend WhopSDK::Internal::Type::Enum
321
-
322
- TaggedSymbol =
323
- T.type_alias do
324
- T.all(Symbol, WhopSDK::ForumPostCreateParams::Visibility)
325
- end
326
- OrSymbol = T.type_alias { T.any(Symbol, String) }
327
-
328
- MEMBERS_ONLY =
329
- T.let(
330
- :members_only,
331
- WhopSDK::ForumPostCreateParams::Visibility::TaggedSymbol
332
- )
333
- GLOBALLY_VISIBLE =
334
- T.let(
335
- :globally_visible,
336
- WhopSDK::ForumPostCreateParams::Visibility::TaggedSymbol
337
- )
338
-
339
- sig do
340
- override.returns(
341
- T::Array[WhopSDK::ForumPostCreateParams::Visibility::TaggedSymbol]
342
- )
343
- end
344
- def self.values
345
- end
346
- end
347
313
  end
348
314
  end
349
315
  end
@@ -40,9 +40,7 @@ module WhopSDK
40
40
  attr_accessor :title
41
41
 
42
42
  # The visibility types for forum posts
43
- sig do
44
- returns(T.nilable(WhopSDK::ForumPostUpdateParams::Visibility::OrSymbol))
45
- end
43
+ sig { returns(T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol)) }
46
44
  attr_accessor :visibility
47
45
 
48
46
  sig do
@@ -59,8 +57,7 @@ module WhopSDK
59
57
  content: T.nilable(String),
60
58
  is_pinned: T.nilable(T::Boolean),
61
59
  title: T.nilable(String),
62
- visibility:
63
- T.nilable(WhopSDK::ForumPostUpdateParams::Visibility::OrSymbol),
60
+ visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
64
61
  request_options: WhopSDK::RequestOptions::OrHash
65
62
  ).returns(T.attached_class)
66
63
  end
@@ -95,8 +92,7 @@ module WhopSDK
95
92
  content: T.nilable(String),
96
93
  is_pinned: T.nilable(T::Boolean),
97
94
  title: T.nilable(String),
98
- visibility:
99
- T.nilable(WhopSDK::ForumPostUpdateParams::Visibility::OrSymbol),
95
+ visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
100
96
  request_options: WhopSDK::RequestOptions
101
97
  }
102
98
  )
@@ -184,36 +180,6 @@ module WhopSDK
184
180
  def self.variants
185
181
  end
186
182
  end
187
-
188
- # The visibility types for forum posts
189
- module Visibility
190
- extend WhopSDK::Internal::Type::Enum
191
-
192
- TaggedSymbol =
193
- T.type_alias do
194
- T.all(Symbol, WhopSDK::ForumPostUpdateParams::Visibility)
195
- end
196
- OrSymbol = T.type_alias { T.any(Symbol, String) }
197
-
198
- MEMBERS_ONLY =
199
- T.let(
200
- :members_only,
201
- WhopSDK::ForumPostUpdateParams::Visibility::TaggedSymbol
202
- )
203
- GLOBALLY_VISIBLE =
204
- T.let(
205
- :globally_visible,
206
- WhopSDK::ForumPostUpdateParams::Visibility::TaggedSymbol
207
- )
208
-
209
- sig do
210
- override.returns(
211
- T::Array[WhopSDK::ForumPostUpdateParams::Visibility::TaggedSymbol]
212
- )
213
- end
214
- def self.values
215
- end
216
- end
217
183
  end
218
184
  end
219
185
  end