whop_sdk 0.0.2 → 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 (338) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +51 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +24 -0
  5. data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +30 -24
  6. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  7. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  8. data/lib/whop_sdk/models/assessment_question_types.rb +18 -0
  9. data/lib/whop_sdk/models/billing_reasons.rb +20 -0
  10. data/lib/whop_sdk/models/card_brands.rb +30 -0
  11. data/lib/whop_sdk/models/checkout_configuration.rb +10 -7
  12. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +251 -38
  13. data/lib/whop_sdk/models/checkout_configuration_list_response.rb +10 -7
  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 +230 -0
  19. data/lib/whop_sdk/models/course_chapter.rb +72 -0
  20. data/lib/whop_sdk/models/course_chapter_create_params.rb +30 -0
  21. data/lib/whop_sdk/models/course_chapter_delete_params.rb +14 -0
  22. data/lib/whop_sdk/models/course_chapter_delete_response.rb +8 -0
  23. data/lib/whop_sdk/models/course_chapter_list_params.rb +54 -0
  24. data/lib/whop_sdk/models/course_chapter_list_response.rb +35 -0
  25. data/lib/whop_sdk/models/course_chapter_retrieve_params.rb +14 -0
  26. data/lib/whop_sdk/models/course_chapter_update_params.rb +22 -0
  27. data/lib/whop_sdk/models/course_create_params.rb +127 -0
  28. data/lib/whop_sdk/models/course_delete_params.rb +14 -0
  29. data/lib/whop_sdk/models/course_delete_response.rb +8 -0
  30. data/lib/whop_sdk/models/course_lesson_create_params.rb +54 -0
  31. data/lib/whop_sdk/models/course_lesson_delete_params.rb +14 -0
  32. data/lib/whop_sdk/models/course_lesson_delete_response.rb +8 -0
  33. data/lib/whop_sdk/models/course_lesson_list_params.rb +62 -0
  34. data/lib/whop_sdk/models/course_lesson_list_response.rb +71 -0
  35. data/lib/whop_sdk/models/course_lesson_retrieve_params.rb +14 -0
  36. data/lib/whop_sdk/models/course_lesson_update_params.rb +399 -0
  37. data/lib/whop_sdk/models/course_list_params.rb +62 -0
  38. data/lib/whop_sdk/models/course_list_response.rb +148 -0
  39. data/lib/whop_sdk/models/course_retrieve_params.rb +14 -0
  40. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  41. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  42. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  43. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  44. data/lib/whop_sdk/models/course_update_params.rb +221 -0
  45. data/lib/whop_sdk/models/experience_duplicate_params.rb +22 -0
  46. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  47. data/lib/whop_sdk/models/forum_post.rb +17 -1
  48. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  49. data/lib/whop_sdk/models/forum_post_list_response.rb +17 -1
  50. data/lib/whop_sdk/models/forum_post_update_params.rb +104 -0
  51. data/lib/whop_sdk/models/invoice.rb +6 -2
  52. data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
  53. data/lib/whop_sdk/models/invoice_list_item.rb +6 -2
  54. data/lib/whop_sdk/models/languages.rb +36 -0
  55. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +9 -0
  56. data/lib/whop_sdk/models/lesson.rb +373 -0
  57. data/lib/whop_sdk/models/lesson_types.rb +20 -0
  58. data/lib/whop_sdk/models/lesson_visibilities.rb +17 -0
  59. data/lib/whop_sdk/models/member_list_params.rb +9 -1
  60. data/lib/whop_sdk/models/membership.rb +31 -1
  61. data/lib/whop_sdk/models/membership_list_params.rb +16 -8
  62. data/lib/whop_sdk/models/membership_list_response.rb +31 -1
  63. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  64. data/lib/whop_sdk/models/message_update_params.rb +92 -0
  65. data/lib/whop_sdk/models/payment.rb +34 -22
  66. data/lib/whop_sdk/models/payment_list_params.rb +3 -18
  67. data/lib/whop_sdk/models/payment_list_response.rb +34 -22
  68. data/lib/whop_sdk/models/payment_method_types.rb +99 -0
  69. data/lib/whop_sdk/models/plan.rb +72 -1
  70. data/lib/whop_sdk/models/plan_create_params.rb +133 -24
  71. data/lib/whop_sdk/models/plan_list_response.rb +75 -1
  72. data/lib/whop_sdk/models/plan_update_params.rb +131 -22
  73. data/lib/whop_sdk/models/product.rb +11 -1
  74. data/lib/whop_sdk/models/product_create_params.rb +1 -45
  75. data/lib/whop_sdk/models/product_list_item.rb +14 -1
  76. data/lib/whop_sdk/models/product_update_params.rb +76 -23
  77. data/lib/whop_sdk/models/promo_code.rb +211 -0
  78. data/lib/whop_sdk/models/promo_code_create_params.rb +140 -0
  79. data/lib/whop_sdk/models/promo_code_delete_params.rb +14 -0
  80. data/lib/whop_sdk/models/promo_code_delete_response.rb +8 -0
  81. data/lib/whop_sdk/models/promo_code_list_params.rb +78 -0
  82. data/lib/whop_sdk/models/promo_code_list_response.rb +181 -0
  83. data/lib/whop_sdk/models/promo_code_retrieve_params.rb +14 -0
  84. data/lib/whop_sdk/models/promo_code_status.rb +17 -0
  85. data/lib/whop_sdk/models/promo_duration.rb +17 -0
  86. data/lib/whop_sdk/models/review_list_params.rb +70 -0
  87. data/lib/whop_sdk/models/review_list_response.rb +183 -0
  88. data/lib/whop_sdk/models/review_retrieve_params.rb +14 -0
  89. data/lib/whop_sdk/models/review_retrieve_response.rb +251 -0
  90. data/lib/whop_sdk/models/review_status.rb +17 -0
  91. data/lib/whop_sdk/models/transfer.rb +9 -1
  92. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  93. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  94. data/lib/whop_sdk/models.rb +84 -0
  95. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  96. data/lib/whop_sdk/resources/apps.rb +1 -1
  97. data/lib/whop_sdk/resources/checkout_configurations.rb +8 -6
  98. data/lib/whop_sdk/resources/companies.rb +70 -0
  99. data/lib/whop_sdk/resources/course_chapters.rb +151 -0
  100. data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
  101. data/lib/whop_sdk/resources/course_lessons.rb +182 -0
  102. data/lib/whop_sdk/resources/course_students.rb +76 -0
  103. data/lib/whop_sdk/resources/courses.rb +185 -0
  104. data/lib/whop_sdk/resources/experiences.rb +34 -1
  105. data/lib/whop_sdk/resources/forum_posts.rb +34 -1
  106. data/lib/whop_sdk/resources/invoices.rb +11 -11
  107. data/lib/whop_sdk/resources/members.rb +3 -1
  108. data/lib/whop_sdk/resources/memberships.rb +6 -4
  109. data/lib/whop_sdk/resources/messages.rb +29 -1
  110. data/lib/whop_sdk/resources/payments.rb +1 -1
  111. data/lib/whop_sdk/resources/plans.rb +25 -5
  112. data/lib/whop_sdk/resources/products.rb +5 -7
  113. data/lib/whop_sdk/resources/promo_codes.rb +161 -0
  114. data/lib/whop_sdk/resources/reviews.rb +68 -0
  115. data/lib/whop_sdk/resources/transfers.rb +3 -1
  116. data/lib/whop_sdk/version.rb +1 -1
  117. data/lib/whop_sdk.rb +61 -1
  118. data/rbi/whop_sdk/client.rbi +18 -0
  119. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  120. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  121. data/rbi/whop_sdk/models/assessment_question_types.rbi +31 -0
  122. data/rbi/whop_sdk/models/billing_reasons.rbi +27 -0
  123. data/rbi/whop_sdk/models/card_brands.rbi +35 -0
  124. data/rbi/whop_sdk/models/checkout_configuration.rbi +4 -2
  125. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +371 -62
  126. data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +4 -2
  127. data/rbi/whop_sdk/models/company.rbi +10 -0
  128. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  129. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  130. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  131. data/rbi/whop_sdk/models/course.rbi +313 -0
  132. data/rbi/whop_sdk/models/course_chapter.rbi +101 -0
  133. data/rbi/whop_sdk/models/course_chapter_create_params.rbi +51 -0
  134. data/rbi/whop_sdk/models/course_chapter_delete_params.rbi +27 -0
  135. data/rbi/whop_sdk/models/course_chapter_delete_response.rbi +8 -0
  136. data/rbi/whop_sdk/models/course_chapter_list_params.rbi +75 -0
  137. data/rbi/whop_sdk/models/course_chapter_list_response.rbi +47 -0
  138. data/rbi/whop_sdk/models/course_chapter_retrieve_params.rbi +30 -0
  139. data/rbi/whop_sdk/models/course_chapter_update_params.rbi +40 -0
  140. data/rbi/whop_sdk/models/course_create_params.rbi +197 -0
  141. data/rbi/whop_sdk/models/course_delete_params.rbi +27 -0
  142. data/rbi/whop_sdk/models/course_delete_response.rbi +7 -0
  143. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +75 -0
  144. data/rbi/whop_sdk/models/course_lesson_delete_params.rbi +27 -0
  145. data/rbi/whop_sdk/models/course_lesson_delete_response.rbi +8 -0
  146. data/rbi/whop_sdk/models/course_lesson_list_params.rbi +83 -0
  147. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +91 -0
  148. data/rbi/whop_sdk/models/course_lesson_retrieve_params.rbi +27 -0
  149. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +677 -0
  150. data/rbi/whop_sdk/models/course_list_params.rbi +83 -0
  151. data/rbi/whop_sdk/models/course_list_response.rbi +198 -0
  152. data/rbi/whop_sdk/models/course_retrieve_params.rbi +27 -0
  153. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  154. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  155. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  156. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  157. data/rbi/whop_sdk/models/course_update_params.rbi +339 -0
  158. data/rbi/whop_sdk/models/experience_duplicate_params.rbi +40 -0
  159. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  160. data/rbi/whop_sdk/models/forum_post.rbi +16 -0
  161. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  162. data/rbi/whop_sdk/models/forum_post_list_response.rbi +16 -0
  163. data/rbi/whop_sdk/models/forum_post_update_params.rbi +177 -0
  164. data/rbi/whop_sdk/models/invoice.rbi +4 -2
  165. data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
  166. data/rbi/whop_sdk/models/invoice_list_item.rbi +4 -2
  167. data/rbi/whop_sdk/models/languages.rbi +40 -0
  168. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +45 -0
  169. data/rbi/whop_sdk/models/lesson.rbi +521 -0
  170. data/rbi/whop_sdk/models/lesson_types.rbi +25 -0
  171. data/rbi/whop_sdk/models/lesson_visibilities.rbi +23 -0
  172. data/rbi/whop_sdk/models/member_list_params.rbi +8 -0
  173. data/rbi/whop_sdk/models/membership.rbi +40 -0
  174. data/rbi/whop_sdk/models/membership_list_params.rbi +16 -8
  175. data/rbi/whop_sdk/models/membership_list_response.rbi +47 -0
  176. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  177. data/rbi/whop_sdk/models/message_update_params.rbi +167 -0
  178. data/rbi/whop_sdk/models/payment.rbi +42 -25
  179. data/rbi/whop_sdk/models/payment_list_params.rbi +3 -63
  180. data/rbi/whop_sdk/models/payment_list_response.rbi +42 -25
  181. data/rbi/whop_sdk/models/payment_method_types.rbi +118 -0
  182. data/rbi/whop_sdk/models/plan.rbi +106 -0
  183. data/rbi/whop_sdk/models/plan_create_params.rbi +212 -34
  184. data/rbi/whop_sdk/models/plan_list_response.rbi +118 -0
  185. data/rbi/whop_sdk/models/plan_update_params.rbi +210 -32
  186. data/rbi/whop_sdk/models/product.rbi +12 -0
  187. data/rbi/whop_sdk/models/product_create_params.rbi +0 -74
  188. data/rbi/whop_sdk/models/product_list_item.rbi +12 -0
  189. data/rbi/whop_sdk/models/product_update_params.rbi +136 -33
  190. data/rbi/whop_sdk/models/promo_code.rbi +248 -0
  191. data/rbi/whop_sdk/models/promo_code_create_params.rbi +161 -0
  192. data/rbi/whop_sdk/models/promo_code_delete_params.rbi +27 -0
  193. data/rbi/whop_sdk/models/promo_code_delete_response.rbi +8 -0
  194. data/rbi/whop_sdk/models/promo_code_list_params.rbi +99 -0
  195. data/rbi/whop_sdk/models/promo_code_list_response.rbi +222 -0
  196. data/rbi/whop_sdk/models/promo_code_retrieve_params.rbi +27 -0
  197. data/rbi/whop_sdk/models/promo_code_status.rbi +21 -0
  198. data/rbi/whop_sdk/models/promo_duration.rbi +21 -0
  199. data/rbi/whop_sdk/models/review_list_params.rbi +91 -0
  200. data/rbi/whop_sdk/models/review_list_response.rbi +243 -0
  201. data/rbi/whop_sdk/models/review_retrieve_params.rbi +27 -0
  202. data/rbi/whop_sdk/models/review_retrieve_response.rbi +354 -0
  203. data/rbi/whop_sdk/models/review_status.rbi +21 -0
  204. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  205. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  206. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  207. data/rbi/whop_sdk/models.rbi +84 -0
  208. data/rbi/whop_sdk/resources/app_builds.rbi +5 -1
  209. data/rbi/whop_sdk/resources/apps.rbi +7 -1
  210. data/rbi/whop_sdk/resources/checkout_configurations.rbi +8 -7
  211. data/rbi/whop_sdk/resources/companies.rbi +63 -0
  212. data/rbi/whop_sdk/resources/course_chapters.rbi +115 -0
  213. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
  214. data/rbi/whop_sdk/resources/course_lessons.rbi +182 -0
  215. data/rbi/whop_sdk/resources/course_students.rbi +65 -0
  216. data/rbi/whop_sdk/resources/courses.rbi +172 -0
  217. data/rbi/whop_sdk/resources/experiences.rbi +32 -1
  218. data/rbi/whop_sdk/resources/forum_posts.rbi +40 -1
  219. data/rbi/whop_sdk/resources/invoices.rbi +18 -18
  220. data/rbi/whop_sdk/resources/members.rbi +3 -0
  221. data/rbi/whop_sdk/resources/memberships.rbi +6 -3
  222. data/rbi/whop_sdk/resources/messages.rbi +36 -1
  223. data/rbi/whop_sdk/resources/payments.rbi +1 -3
  224. data/rbi/whop_sdk/resources/plans.rbi +57 -3
  225. data/rbi/whop_sdk/resources/products.rbi +10 -8
  226. data/rbi/whop_sdk/resources/promo_codes.rbi +147 -0
  227. data/rbi/whop_sdk/resources/reviews.rbi +56 -0
  228. data/rbi/whop_sdk/resources/transfers.rbi +3 -0
  229. data/sig/whop_sdk/client.rbs +12 -0
  230. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  231. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  232. data/sig/whop_sdk/models/assessment_question_types.rbs +17 -0
  233. data/sig/whop_sdk/models/billing_reasons.rbs +24 -0
  234. data/sig/whop_sdk/models/card_brands.rbs +44 -0
  235. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +159 -21
  236. data/sig/whop_sdk/models/company.rbs +5 -0
  237. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  238. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  239. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  240. data/sig/whop_sdk/models/course.rbs +171 -0
  241. data/sig/whop_sdk/models/course_chapter.rbs +49 -0
  242. data/sig/whop_sdk/models/course_chapter_create_params.rbs +28 -0
  243. data/sig/whop_sdk/models/course_chapter_delete_params.rbs +15 -0
  244. data/sig/whop_sdk/models/course_chapter_delete_response.rbs +5 -0
  245. data/sig/whop_sdk/models/course_chapter_list_params.rbs +46 -0
  246. data/sig/whop_sdk/models/course_chapter_list_response.rbs +18 -0
  247. data/sig/whop_sdk/models/course_chapter_retrieve_params.rbs +15 -0
  248. data/sig/whop_sdk/models/course_chapter_update_params.rbs +23 -0
  249. data/sig/whop_sdk/models/course_create_params.rbs +87 -0
  250. data/sig/whop_sdk/models/course_delete_params.rbs +15 -0
  251. data/sig/whop_sdk/models/course_delete_response.rbs +5 -0
  252. data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
  253. data/sig/whop_sdk/models/course_lesson_delete_params.rbs +15 -0
  254. data/sig/whop_sdk/models/course_lesson_delete_response.rbs +5 -0
  255. data/sig/whop_sdk/models/course_lesson_list_params.rbs +51 -0
  256. data/sig/whop_sdk/models/course_lesson_list_response.rbs +50 -0
  257. data/sig/whop_sdk/models/course_lesson_retrieve_params.rbs +15 -0
  258. data/sig/whop_sdk/models/course_lesson_update_params.rbs +248 -0
  259. data/sig/whop_sdk/models/course_list_params.rbs +51 -0
  260. data/sig/whop_sdk/models/course_list_response.rbs +102 -0
  261. data/sig/whop_sdk/models/course_retrieve_params.rbs +15 -0
  262. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  263. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  264. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  265. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  266. data/sig/whop_sdk/models/course_update_params.rbs +156 -0
  267. data/sig/whop_sdk/models/experience_duplicate_params.rbs +23 -0
  268. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  269. data/sig/whop_sdk/models/forum_post.rbs +10 -0
  270. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  271. data/sig/whop_sdk/models/forum_post_list_response.rbs +10 -0
  272. data/sig/whop_sdk/models/forum_post_update_params.rbs +72 -0
  273. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  274. data/sig/whop_sdk/models/languages.rbs +56 -0
  275. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +20 -1
  276. data/sig/whop_sdk/models/lesson.rbs +248 -0
  277. data/sig/whop_sdk/models/lesson_types.rbs +19 -0
  278. data/sig/whop_sdk/models/lesson_visibilities.rbs +14 -0
  279. data/sig/whop_sdk/models/member_list_params.rbs +6 -1
  280. data/sig/whop_sdk/models/membership.rbs +17 -0
  281. data/sig/whop_sdk/models/membership_list_params.rbs +11 -6
  282. data/sig/whop_sdk/models/membership_list_response.rbs +17 -0
  283. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  284. data/sig/whop_sdk/models/message_update_params.rbs +67 -0
  285. data/sig/whop_sdk/models/payment.rbs +17 -12
  286. data/sig/whop_sdk/models/payment_list_params.rbs +4 -25
  287. data/sig/whop_sdk/models/payment_list_response.rbs +17 -12
  288. data/sig/whop_sdk/models/payment_method_types.rbs +182 -0
  289. data/sig/whop_sdk/models/plan.rbs +47 -0
  290. data/sig/whop_sdk/models/plan_create_params.rbs +81 -10
  291. data/sig/whop_sdk/models/plan_list_response.rbs +47 -0
  292. data/sig/whop_sdk/models/plan_update_params.rbs +81 -10
  293. data/sig/whop_sdk/models/product.rbs +5 -0
  294. data/sig/whop_sdk/models/product_create_params.rbs +0 -22
  295. data/sig/whop_sdk/models/product_list_item.rbs +5 -0
  296. data/sig/whop_sdk/models/product_update_params.rbs +46 -10
  297. data/sig/whop_sdk/models/promo_code.rbs +134 -0
  298. data/sig/whop_sdk/models/promo_code_create_params.rbs +96 -0
  299. data/sig/whop_sdk/models/promo_code_delete_params.rbs +15 -0
  300. data/sig/whop_sdk/models/promo_code_delete_response.rbs +5 -0
  301. data/sig/whop_sdk/models/promo_code_list_params.rbs +61 -0
  302. data/sig/whop_sdk/models/promo_code_list_response.rbs +117 -0
  303. data/sig/whop_sdk/models/promo_code_retrieve_params.rbs +15 -0
  304. data/sig/whop_sdk/models/promo_code_status.rbs +15 -0
  305. data/sig/whop_sdk/models/promo_duration.rbs +15 -0
  306. data/sig/whop_sdk/models/review_list_params.rbs +56 -0
  307. data/sig/whop_sdk/models/review_list_response.rbs +116 -0
  308. data/sig/whop_sdk/models/review_retrieve_params.rbs +15 -0
  309. data/sig/whop_sdk/models/review_retrieve_response.rbs +152 -0
  310. data/sig/whop_sdk/models/review_status.rbs +15 -0
  311. data/sig/whop_sdk/models/transfer.rbs +5 -0
  312. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  313. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  314. data/sig/whop_sdk/models.rbs +84 -0
  315. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  316. data/sig/whop_sdk/resources/apps.rbs +1 -1
  317. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  318. data/sig/whop_sdk/resources/companies.rbs +18 -0
  319. data/sig/whop_sdk/resources/course_chapters.rbs +35 -0
  320. data/sig/whop_sdk/resources/course_lessons.rbs +49 -0
  321. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  322. data/sig/whop_sdk/resources/courses.rbs +49 -0
  323. data/sig/whop_sdk/resources/experiences.rbs +7 -1
  324. data/sig/whop_sdk/resources/forum_posts.rbs +10 -1
  325. data/sig/whop_sdk/resources/invoices.rbs +5 -5
  326. data/sig/whop_sdk/resources/members.rbs +1 -0
  327. data/sig/whop_sdk/resources/memberships.rbs +2 -1
  328. data/sig/whop_sdk/resources/messages.rbs +9 -1
  329. data/sig/whop_sdk/resources/payments.rbs +1 -1
  330. data/sig/whop_sdk/resources/plans.rbs +12 -2
  331. data/sig/whop_sdk/resources/products.rbs +2 -3
  332. data/sig/whop_sdk/resources/promo_codes.rbs +45 -0
  333. data/sig/whop_sdk/resources/reviews.rbs +23 -0
  334. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  335. metadata +213 -5
  336. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  337. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  338. data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
@@ -0,0 +1,521 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class Lesson < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias { T.any(WhopSDK::Lesson, WhopSDK::Internal::AnyHash) }
8
+
9
+ # The ID of the lesson
10
+ sig { returns(String) }
11
+ attr_accessor :id
12
+
13
+ # Assessment questions for quiz/knowledge check lessons
14
+ sig { returns(T::Array[WhopSDK::Lesson::AssessmentQuestion]) }
15
+ attr_accessor :assessment_questions
16
+
17
+ # The attached files in this lesson as a flat array
18
+ sig { returns(T::Array[WhopSDK::Lesson::Attachment]) }
19
+ attr_accessor :attachments
20
+
21
+ # The content of the lesson
22
+ sig { returns(T.nilable(String)) }
23
+ attr_accessor :content
24
+
25
+ # Number of days from course start until the lesson is unlocked
26
+ sig { returns(T.nilable(Integer)) }
27
+ attr_accessor :days_from_course_start_until_unlock
28
+
29
+ # The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
30
+ sig { returns(WhopSDK::LessonTypes::TaggedSymbol) }
31
+ attr_accessor :lesson_type
32
+
33
+ # The main PDF file for this lesson
34
+ sig { returns(T.nilable(WhopSDK::Lesson::MainPdf)) }
35
+ attr_reader :main_pdf
36
+
37
+ sig { params(main_pdf: T.nilable(WhopSDK::Lesson::MainPdf::OrHash)).void }
38
+ attr_writer :main_pdf
39
+
40
+ # The order of the lesson within its chapter
41
+ sig { returns(Integer) }
42
+ attr_accessor :order
43
+
44
+ # The title of the lesson
45
+ sig { returns(String) }
46
+ attr_accessor :title
47
+
48
+ # The associated Mux asset for video lessons
49
+ sig { returns(T.nilable(WhopSDK::Lesson::VideoAsset)) }
50
+ attr_reader :video_asset
51
+
52
+ sig do
53
+ params(video_asset: T.nilable(WhopSDK::Lesson::VideoAsset::OrHash)).void
54
+ end
55
+ attr_writer :video_asset
56
+
57
+ # The visibility of the lesson. Determines how / whether this lesson is visible to
58
+ # users.
59
+ sig { returns(WhopSDK::LessonVisibilities::TaggedSymbol) }
60
+ attr_accessor :visibility
61
+
62
+ # A lesson from the courses app
63
+ sig do
64
+ params(
65
+ id: String,
66
+ assessment_questions:
67
+ T::Array[WhopSDK::Lesson::AssessmentQuestion::OrHash],
68
+ attachments: T::Array[WhopSDK::Lesson::Attachment::OrHash],
69
+ content: T.nilable(String),
70
+ days_from_course_start_until_unlock: T.nilable(Integer),
71
+ lesson_type: WhopSDK::LessonTypes::OrSymbol,
72
+ main_pdf: T.nilable(WhopSDK::Lesson::MainPdf::OrHash),
73
+ order: Integer,
74
+ title: String,
75
+ video_asset: T.nilable(WhopSDK::Lesson::VideoAsset::OrHash),
76
+ visibility: WhopSDK::LessonVisibilities::OrSymbol
77
+ ).returns(T.attached_class)
78
+ end
79
+ def self.new(
80
+ # The ID of the lesson
81
+ id:,
82
+ # Assessment questions for quiz/knowledge check lessons
83
+ assessment_questions:,
84
+ # The attached files in this lesson as a flat array
85
+ attachments:,
86
+ # The content of the lesson
87
+ content:,
88
+ # Number of days from course start until the lesson is unlocked
89
+ days_from_course_start_until_unlock:,
90
+ # The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
91
+ lesson_type:,
92
+ # The main PDF file for this lesson
93
+ main_pdf:,
94
+ # The order of the lesson within its chapter
95
+ order:,
96
+ # The title of the lesson
97
+ title:,
98
+ # The associated Mux asset for video lessons
99
+ video_asset:,
100
+ # The visibility of the lesson. Determines how / whether this lesson is visible to
101
+ # users.
102
+ visibility:
103
+ )
104
+ end
105
+
106
+ sig do
107
+ override.returns(
108
+ {
109
+ id: String,
110
+ assessment_questions: T::Array[WhopSDK::Lesson::AssessmentQuestion],
111
+ attachments: T::Array[WhopSDK::Lesson::Attachment],
112
+ content: T.nilable(String),
113
+ days_from_course_start_until_unlock: T.nilable(Integer),
114
+ lesson_type: WhopSDK::LessonTypes::TaggedSymbol,
115
+ main_pdf: T.nilable(WhopSDK::Lesson::MainPdf),
116
+ order: Integer,
117
+ title: String,
118
+ video_asset: T.nilable(WhopSDK::Lesson::VideoAsset),
119
+ visibility: WhopSDK::LessonVisibilities::TaggedSymbol
120
+ }
121
+ )
122
+ end
123
+ def to_hash
124
+ end
125
+
126
+ class AssessmentQuestion < WhopSDK::Internal::Type::BaseModel
127
+ OrHash =
128
+ T.type_alias do
129
+ T.any(
130
+ WhopSDK::Lesson::AssessmentQuestion,
131
+ WhopSDK::Internal::AnyHash
132
+ )
133
+ end
134
+
135
+ # The ID of the assessment question
136
+ sig { returns(String) }
137
+ attr_accessor :id
138
+
139
+ # The correct answer for the question. Used for short answer questions. Only
140
+ # visible to admins (users with courses:update permission)
141
+ sig { returns(T.nilable(String)) }
142
+ attr_accessor :correct_answer
143
+
144
+ # When the question was created
145
+ sig { returns(Time) }
146
+ attr_accessor :created_at
147
+
148
+ # Optional image attachment for the question
149
+ sig { returns(T.nilable(WhopSDK::Lesson::AssessmentQuestion::Image)) }
150
+ attr_reader :image
151
+
152
+ sig do
153
+ params(
154
+ image: T.nilable(WhopSDK::Lesson::AssessmentQuestion::Image::OrHash)
155
+ ).void
156
+ end
157
+ attr_writer :image
158
+
159
+ # The answer options for multiple choice/select questions
160
+ sig { returns(T::Array[WhopSDK::Lesson::AssessmentQuestion::Option]) }
161
+ attr_accessor :options
162
+
163
+ # The order of the question within its lesson
164
+ sig { returns(Integer) }
165
+ attr_accessor :order
166
+
167
+ # The text of the question
168
+ sig { returns(String) }
169
+ attr_accessor :question_text
170
+
171
+ # The type of the question
172
+ sig { returns(WhopSDK::AssessmentQuestionTypes::TaggedSymbol) }
173
+ attr_accessor :question_type
174
+
175
+ # An assessment question in a course quiz or knowledge check
176
+ sig do
177
+ params(
178
+ id: String,
179
+ correct_answer: T.nilable(String),
180
+ created_at: Time,
181
+ image:
182
+ T.nilable(WhopSDK::Lesson::AssessmentQuestion::Image::OrHash),
183
+ options:
184
+ T::Array[WhopSDK::Lesson::AssessmentQuestion::Option::OrHash],
185
+ order: Integer,
186
+ question_text: String,
187
+ question_type: WhopSDK::AssessmentQuestionTypes::OrSymbol
188
+ ).returns(T.attached_class)
189
+ end
190
+ def self.new(
191
+ # The ID of the assessment question
192
+ id:,
193
+ # The correct answer for the question. Used for short answer questions. Only
194
+ # visible to admins (users with courses:update permission)
195
+ correct_answer:,
196
+ # When the question was created
197
+ created_at:,
198
+ # Optional image attachment for the question
199
+ image:,
200
+ # The answer options for multiple choice/select questions
201
+ options:,
202
+ # The order of the question within its lesson
203
+ order:,
204
+ # The text of the question
205
+ question_text:,
206
+ # The type of the question
207
+ question_type:
208
+ )
209
+ end
210
+
211
+ sig do
212
+ override.returns(
213
+ {
214
+ id: String,
215
+ correct_answer: T.nilable(String),
216
+ created_at: Time,
217
+ image: T.nilable(WhopSDK::Lesson::AssessmentQuestion::Image),
218
+ options: T::Array[WhopSDK::Lesson::AssessmentQuestion::Option],
219
+ order: Integer,
220
+ question_text: String,
221
+ question_type: WhopSDK::AssessmentQuestionTypes::TaggedSymbol
222
+ }
223
+ )
224
+ end
225
+ def to_hash
226
+ end
227
+
228
+ class Image < WhopSDK::Internal::Type::BaseModel
229
+ OrHash =
230
+ T.type_alias do
231
+ T.any(
232
+ WhopSDK::Lesson::AssessmentQuestion::Image,
233
+ WhopSDK::Internal::AnyHash
234
+ )
235
+ end
236
+
237
+ # The ID of the attachment
238
+ sig { returns(String) }
239
+ attr_accessor :id
240
+
241
+ # The attachment's content type (e.g., image/jpg, video/mp4)
242
+ sig { returns(T.nilable(String)) }
243
+ attr_accessor :content_type
244
+
245
+ # The name of the file
246
+ sig { returns(T.nilable(String)) }
247
+ attr_accessor :filename
248
+
249
+ # This is the URL you use to render optimized attachments on the client. This
250
+ # should be used for apps.
251
+ sig { returns(T.nilable(String)) }
252
+ attr_accessor :url
253
+
254
+ # Optional image attachment for the question
255
+ sig do
256
+ params(
257
+ id: String,
258
+ content_type: T.nilable(String),
259
+ filename: T.nilable(String),
260
+ url: T.nilable(String)
261
+ ).returns(T.attached_class)
262
+ end
263
+ def self.new(
264
+ # The ID of the attachment
265
+ id:,
266
+ # The attachment's content type (e.g., image/jpg, video/mp4)
267
+ content_type:,
268
+ # The name of the file
269
+ filename:,
270
+ # This is the URL you use to render optimized attachments on the client. This
271
+ # should be used for apps.
272
+ url:
273
+ )
274
+ end
275
+
276
+ sig do
277
+ override.returns(
278
+ {
279
+ id: String,
280
+ content_type: T.nilable(String),
281
+ filename: T.nilable(String),
282
+ url: T.nilable(String)
283
+ }
284
+ )
285
+ end
286
+ def to_hash
287
+ end
288
+ end
289
+
290
+ class Option < WhopSDK::Internal::Type::BaseModel
291
+ OrHash =
292
+ T.type_alias do
293
+ T.any(
294
+ WhopSDK::Lesson::AssessmentQuestion::Option,
295
+ WhopSDK::Internal::AnyHash
296
+ )
297
+ end
298
+
299
+ # The ID of the assessment question option
300
+ sig { returns(String) }
301
+ attr_accessor :id
302
+
303
+ # Whether this option is a correct answer. Only visible to admins (users with
304
+ # courses:update permission)
305
+ sig { returns(T.nilable(T::Boolean)) }
306
+ attr_accessor :is_correct
307
+
308
+ # The text of the answer option
309
+ sig { returns(String) }
310
+ attr_accessor :option_text
311
+
312
+ # The order of this option within the question
313
+ sig { returns(Integer) }
314
+ attr_accessor :order
315
+
316
+ # An answer option for a multiple choice or multiple select assessment question
317
+ sig do
318
+ params(
319
+ id: String,
320
+ is_correct: T.nilable(T::Boolean),
321
+ option_text: String,
322
+ order: Integer
323
+ ).returns(T.attached_class)
324
+ end
325
+ def self.new(
326
+ # The ID of the assessment question option
327
+ id:,
328
+ # Whether this option is a correct answer. Only visible to admins (users with
329
+ # courses:update permission)
330
+ is_correct:,
331
+ # The text of the answer option
332
+ option_text:,
333
+ # The order of this option within the question
334
+ order:
335
+ )
336
+ end
337
+
338
+ sig do
339
+ override.returns(
340
+ {
341
+ id: String,
342
+ is_correct: T.nilable(T::Boolean),
343
+ option_text: String,
344
+ order: Integer
345
+ }
346
+ )
347
+ end
348
+ def to_hash
349
+ end
350
+ end
351
+ end
352
+
353
+ class Attachment < WhopSDK::Internal::Type::BaseModel
354
+ OrHash =
355
+ T.type_alias do
356
+ T.any(WhopSDK::Lesson::Attachment, WhopSDK::Internal::AnyHash)
357
+ end
358
+
359
+ # The ID of the attachment
360
+ sig { returns(String) }
361
+ attr_accessor :id
362
+
363
+ # The attachment's content type (e.g., image/jpg, video/mp4)
364
+ sig { returns(T.nilable(String)) }
365
+ attr_accessor :content_type
366
+
367
+ # The name of the file
368
+ sig { returns(T.nilable(String)) }
369
+ attr_accessor :filename
370
+
371
+ # This is the URL you use to render optimized attachments on the client. This
372
+ # should be used for apps.
373
+ sig { returns(T.nilable(String)) }
374
+ attr_accessor :url
375
+
376
+ # Represents an image attachment
377
+ sig do
378
+ params(
379
+ id: String,
380
+ content_type: T.nilable(String),
381
+ filename: T.nilable(String),
382
+ url: T.nilable(String)
383
+ ).returns(T.attached_class)
384
+ end
385
+ def self.new(
386
+ # The ID of the attachment
387
+ id:,
388
+ # The attachment's content type (e.g., image/jpg, video/mp4)
389
+ content_type:,
390
+ # The name of the file
391
+ filename:,
392
+ # This is the URL you use to render optimized attachments on the client. This
393
+ # should be used for apps.
394
+ url:
395
+ )
396
+ end
397
+
398
+ sig do
399
+ override.returns(
400
+ {
401
+ id: String,
402
+ content_type: T.nilable(String),
403
+ filename: T.nilable(String),
404
+ url: T.nilable(String)
405
+ }
406
+ )
407
+ end
408
+ def to_hash
409
+ end
410
+ end
411
+
412
+ class MainPdf < WhopSDK::Internal::Type::BaseModel
413
+ OrHash =
414
+ T.type_alias do
415
+ T.any(WhopSDK::Lesson::MainPdf, WhopSDK::Internal::AnyHash)
416
+ end
417
+
418
+ # The ID of the attachment
419
+ sig { returns(String) }
420
+ attr_accessor :id
421
+
422
+ # The attachment's content type (e.g., image/jpg, video/mp4)
423
+ sig { returns(T.nilable(String)) }
424
+ attr_accessor :content_type
425
+
426
+ # The name of the file
427
+ sig { returns(T.nilable(String)) }
428
+ attr_accessor :filename
429
+
430
+ # This is the URL you use to render optimized attachments on the client. This
431
+ # should be used for apps.
432
+ sig { returns(T.nilable(String)) }
433
+ attr_accessor :url
434
+
435
+ # The main PDF file for this lesson
436
+ sig do
437
+ params(
438
+ id: String,
439
+ content_type: T.nilable(String),
440
+ filename: T.nilable(String),
441
+ url: T.nilable(String)
442
+ ).returns(T.attached_class)
443
+ end
444
+ def self.new(
445
+ # The ID of the attachment
446
+ id:,
447
+ # The attachment's content type (e.g., image/jpg, video/mp4)
448
+ content_type:,
449
+ # The name of the file
450
+ filename:,
451
+ # This is the URL you use to render optimized attachments on the client. This
452
+ # should be used for apps.
453
+ url:
454
+ )
455
+ end
456
+
457
+ sig do
458
+ override.returns(
459
+ {
460
+ id: String,
461
+ content_type: T.nilable(String),
462
+ filename: T.nilable(String),
463
+ url: T.nilable(String)
464
+ }
465
+ )
466
+ end
467
+ def to_hash
468
+ end
469
+ end
470
+
471
+ class VideoAsset < WhopSDK::Internal::Type::BaseModel
472
+ OrHash =
473
+ T.type_alias do
474
+ T.any(WhopSDK::Lesson::VideoAsset, WhopSDK::Internal::AnyHash)
475
+ end
476
+
477
+ # The ID of the Mux asset
478
+ sig { returns(String) }
479
+ attr_accessor :id
480
+
481
+ # The Mux-provided ID of the asset
482
+ sig { returns(T.nilable(String)) }
483
+ attr_accessor :asset_id
484
+
485
+ # The public playback ID of the Mux asset
486
+ sig { returns(T.nilable(String)) }
487
+ attr_accessor :playback_id
488
+
489
+ # The associated Mux asset for video lessons
490
+ sig do
491
+ params(
492
+ id: String,
493
+ asset_id: T.nilable(String),
494
+ playback_id: T.nilable(String)
495
+ ).returns(T.attached_class)
496
+ end
497
+ def self.new(
498
+ # The ID of the Mux asset
499
+ id:,
500
+ # The Mux-provided ID of the asset
501
+ asset_id:,
502
+ # The public playback ID of the Mux asset
503
+ playback_id:
504
+ )
505
+ end
506
+
507
+ sig do
508
+ override.returns(
509
+ {
510
+ id: String,
511
+ asset_id: T.nilable(String),
512
+ playback_id: T.nilable(String)
513
+ }
514
+ )
515
+ end
516
+ def to_hash
517
+ end
518
+ end
519
+ end
520
+ end
521
+ end
@@ -0,0 +1,25 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The available types for a lesson
6
+ module LessonTypes
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::LessonTypes) }
10
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11
+
12
+ TEXT = T.let(:text, WhopSDK::LessonTypes::TaggedSymbol)
13
+ VIDEO = T.let(:video, WhopSDK::LessonTypes::TaggedSymbol)
14
+ PDF = T.let(:pdf, WhopSDK::LessonTypes::TaggedSymbol)
15
+ MULTI = T.let(:multi, WhopSDK::LessonTypes::TaggedSymbol)
16
+ QUIZ = T.let(:quiz, WhopSDK::LessonTypes::TaggedSymbol)
17
+ KNOWLEDGE_CHECK =
18
+ T.let(:knowledge_check, WhopSDK::LessonTypes::TaggedSymbol)
19
+
20
+ sig { override.returns(T::Array[WhopSDK::LessonTypes::TaggedSymbol]) }
21
+ def self.values
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,23 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The available visibilities for a lesson. Determines how / whether a lesson is
6
+ # visible to users.
7
+ module LessonVisibilities
8
+ extend WhopSDK::Internal::Type::Enum
9
+
10
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::LessonVisibilities) }
11
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
12
+
13
+ VISIBLE = T.let(:visible, WhopSDK::LessonVisibilities::TaggedSymbol)
14
+ HIDDEN = T.let(:hidden, WhopSDK::LessonVisibilities::TaggedSymbol)
15
+
16
+ sig do
17
+ override.returns(T::Array[WhopSDK::LessonVisibilities::TaggedSymbol])
18
+ end
19
+ def self.values
20
+ end
21
+ end
22
+ end
23
+ end
@@ -78,6 +78,10 @@ module WhopSDK
78
78
  sig { returns(T.nilable(T::Array[WhopSDK::MemberStatuses::OrSymbol])) }
79
79
  attr_accessor :statuses
80
80
 
81
+ # The user IDs to filter the members by
82
+ sig { returns(T.nilable(T::Array[String])) }
83
+ attr_accessor :user_ids
84
+
81
85
  sig do
82
86
  params(
83
87
  company_id: String,
@@ -97,6 +101,7 @@ module WhopSDK
97
101
  promo_code_ids: T.nilable(T::Array[String]),
98
102
  query: T.nilable(String),
99
103
  statuses: T.nilable(T::Array[WhopSDK::MemberStatuses::OrSymbol]),
104
+ user_ids: T.nilable(T::Array[String]),
100
105
  request_options: WhopSDK::RequestOptions::OrHash
101
106
  ).returns(T.attached_class)
102
107
  end
@@ -134,6 +139,8 @@ module WhopSDK
134
139
  query: nil,
135
140
  # The statuses to filter the members by
136
141
  statuses: nil,
142
+ # The user IDs to filter the members by
143
+ user_ids: nil,
137
144
  request_options: {}
138
145
  )
139
146
  end
@@ -158,6 +165,7 @@ module WhopSDK
158
165
  promo_code_ids: T.nilable(T::Array[String]),
159
166
  query: T.nilable(String),
160
167
  statuses: T.nilable(T::Array[WhopSDK::MemberStatuses::OrSymbol]),
168
+ user_ids: T.nilable(T::Array[String]),
161
169
  request_options: WhopSDK::RequestOptions
162
170
  }
163
171
  )
@@ -71,6 +71,13 @@ module WhopSDK
71
71
  sig { params(plan: WhopSDK::Membership::Plan::OrHash).void }
72
72
  attr_writer :plan
73
73
 
74
+ # The Product this Membership grants access to.
75
+ sig { returns(WhopSDK::Membership::Product) }
76
+ attr_reader :product
77
+
78
+ sig { params(product: WhopSDK::Membership::Product::OrHash).void }
79
+ attr_writer :product
80
+
74
81
  # The Promo Code that is currently applied to this Membership.
75
82
  sig { returns(T.nilable(WhopSDK::Membership::PromoCode)) }
76
83
  attr_reader :promo_code
@@ -124,6 +131,7 @@ module WhopSDK
124
131
  metadata: T::Hash[Symbol, T.anything],
125
132
  payment_collection_paused: T::Boolean,
126
133
  plan: WhopSDK::Membership::Plan::OrHash,
134
+ product: WhopSDK::Membership::Product::OrHash,
127
135
  promo_code: T.nilable(WhopSDK::Membership::PromoCode::OrHash),
128
136
  renewal_period_end: T.nilable(Time),
129
137
  renewal_period_start: T.nilable(Time),
@@ -161,6 +169,8 @@ module WhopSDK
161
169
  payment_collection_paused:,
162
170
  # The Plan this Membership is for.
163
171
  plan:,
172
+ # The Product this Membership grants access to.
173
+ product:,
164
174
  # The Promo Code that is currently applied to this Membership.
165
175
  promo_code:,
166
176
  # The timestamp in seconds at which the current billing cycle for this
@@ -194,6 +204,7 @@ module WhopSDK
194
204
  metadata: T::Hash[Symbol, T.anything],
195
205
  payment_collection_paused: T::Boolean,
196
206
  plan: WhopSDK::Membership::Plan,
207
+ product: WhopSDK::Membership::Product,
197
208
  promo_code: T.nilable(WhopSDK::Membership::PromoCode),
198
209
  renewal_period_end: T.nilable(Time),
199
210
  renewal_period_start: T.nilable(Time),
@@ -281,6 +292,35 @@ module WhopSDK
281
292
  end
282
293
  end
283
294
 
295
+ class Product < WhopSDK::Internal::Type::BaseModel
296
+ OrHash =
297
+ T.type_alias do
298
+ T.any(WhopSDK::Membership::Product, WhopSDK::Internal::AnyHash)
299
+ end
300
+
301
+ # The internal ID of the public product.
302
+ sig { returns(String) }
303
+ attr_accessor :id
304
+
305
+ # The title of the product. Use for Whop 4.0.
306
+ sig { returns(String) }
307
+ attr_accessor :title
308
+
309
+ # The Product this Membership grants access to.
310
+ sig { params(id: String, title: String).returns(T.attached_class) }
311
+ def self.new(
312
+ # The internal ID of the public product.
313
+ id:,
314
+ # The title of the product. Use for Whop 4.0.
315
+ title:
316
+ )
317
+ end
318
+
319
+ sig { override.returns({ id: String, title: String }) }
320
+ def to_hash
321
+ end
322
+ end
323
+
284
324
  class PromoCode < WhopSDK::Internal::Type::BaseModel
285
325
  OrHash =
286
326
  T.type_alias do