whop_sdk 0.0.2 → 0.0.3

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 (263) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +20 -0
  5. data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +30 -24
  6. data/lib/whop_sdk/models/assessment_question_types.rb +18 -0
  7. data/lib/whop_sdk/models/billing_reasons.rb +20 -0
  8. data/lib/whop_sdk/models/card_brands.rb +30 -0
  9. data/lib/whop_sdk/models/checkout_configuration.rb +10 -7
  10. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +140 -3
  11. data/lib/whop_sdk/models/checkout_configuration_list_response.rb +10 -7
  12. data/lib/whop_sdk/models/course.rb +230 -0
  13. data/lib/whop_sdk/models/course_chapter.rb +72 -0
  14. data/lib/whop_sdk/models/course_chapter_create_params.rb +30 -0
  15. data/lib/whop_sdk/models/course_chapter_delete_params.rb +14 -0
  16. data/lib/whop_sdk/models/course_chapter_delete_response.rb +8 -0
  17. data/lib/whop_sdk/models/course_chapter_list_params.rb +54 -0
  18. data/lib/whop_sdk/models/course_chapter_list_response.rb +35 -0
  19. data/lib/whop_sdk/models/course_chapter_retrieve_params.rb +14 -0
  20. data/lib/whop_sdk/models/course_chapter_update_params.rb +22 -0
  21. data/lib/whop_sdk/models/course_create_params.rb +82 -0
  22. data/lib/whop_sdk/models/course_delete_params.rb +14 -0
  23. data/lib/whop_sdk/models/course_delete_response.rb +8 -0
  24. data/lib/whop_sdk/models/course_lesson_create_params.rb +54 -0
  25. data/lib/whop_sdk/models/course_lesson_delete_params.rb +14 -0
  26. data/lib/whop_sdk/models/course_lesson_delete_response.rb +8 -0
  27. data/lib/whop_sdk/models/course_lesson_list_params.rb +62 -0
  28. data/lib/whop_sdk/models/course_lesson_list_response.rb +71 -0
  29. data/lib/whop_sdk/models/course_lesson_retrieve_params.rb +14 -0
  30. data/lib/whop_sdk/models/course_lesson_update_params.rb +278 -0
  31. data/lib/whop_sdk/models/course_list_params.rb +62 -0
  32. data/lib/whop_sdk/models/course_list_response.rb +148 -0
  33. data/lib/whop_sdk/models/course_retrieve_params.rb +14 -0
  34. data/lib/whop_sdk/models/course_update_params.rb +197 -0
  35. data/lib/whop_sdk/models/experience_duplicate_params.rb +22 -0
  36. data/lib/whop_sdk/models/forum_post.rb +17 -1
  37. data/lib/whop_sdk/models/forum_post_list_response.rb +17 -1
  38. data/lib/whop_sdk/models/forum_post_update_params.rb +80 -0
  39. data/lib/whop_sdk/models/invoice.rb +6 -2
  40. data/lib/whop_sdk/models/invoice_list_item.rb +6 -2
  41. data/lib/whop_sdk/models/languages.rb +36 -0
  42. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +9 -0
  43. data/lib/whop_sdk/models/lesson.rb +365 -0
  44. data/lib/whop_sdk/models/lesson_types.rb +20 -0
  45. data/lib/whop_sdk/models/lesson_visibilities.rb +17 -0
  46. data/lib/whop_sdk/models/member_list_params.rb +9 -1
  47. data/lib/whop_sdk/models/membership.rb +31 -1
  48. data/lib/whop_sdk/models/membership_list_params.rb +16 -8
  49. data/lib/whop_sdk/models/membership_list_response.rb +31 -1
  50. data/lib/whop_sdk/models/message_update_params.rb +68 -0
  51. data/lib/whop_sdk/models/payment.rb +24 -21
  52. data/lib/whop_sdk/models/payment_list_params.rb +3 -18
  53. data/lib/whop_sdk/models/payment_list_response.rb +24 -21
  54. data/lib/whop_sdk/models/payment_method_types.rb +98 -0
  55. data/lib/whop_sdk/models/plan.rb +25 -1
  56. data/lib/whop_sdk/models/plan_create_params.rb +37 -3
  57. data/lib/whop_sdk/models/plan_list_response.rb +25 -1
  58. data/lib/whop_sdk/models/plan_update_params.rb +35 -1
  59. data/lib/whop_sdk/models/product.rb +11 -1
  60. data/lib/whop_sdk/models/product_create_params.rb +1 -45
  61. data/lib/whop_sdk/models/product_list_item.rb +14 -1
  62. data/lib/whop_sdk/models/product_update_params.rb +30 -1
  63. data/lib/whop_sdk/models/promo_code.rb +211 -0
  64. data/lib/whop_sdk/models/promo_code_create_params.rb +140 -0
  65. data/lib/whop_sdk/models/promo_code_delete_params.rb +14 -0
  66. data/lib/whop_sdk/models/promo_code_delete_response.rb +8 -0
  67. data/lib/whop_sdk/models/promo_code_list_params.rb +78 -0
  68. data/lib/whop_sdk/models/promo_code_list_response.rb +181 -0
  69. data/lib/whop_sdk/models/promo_code_retrieve_params.rb +14 -0
  70. data/lib/whop_sdk/models/promo_code_status.rb +17 -0
  71. data/lib/whop_sdk/models/promo_duration.rb +17 -0
  72. data/lib/whop_sdk/models/review_list_params.rb +70 -0
  73. data/lib/whop_sdk/models/review_list_response.rb +183 -0
  74. data/lib/whop_sdk/models/review_retrieve_params.rb +14 -0
  75. data/lib/whop_sdk/models/review_retrieve_response.rb +251 -0
  76. data/lib/whop_sdk/models/review_status.rb +17 -0
  77. data/lib/whop_sdk/models.rb +76 -0
  78. data/lib/whop_sdk/resources/checkout_configurations.rb +2 -0
  79. data/lib/whop_sdk/resources/course_chapters.rb +151 -0
  80. data/lib/whop_sdk/resources/course_lessons.rb +178 -0
  81. data/lib/whop_sdk/resources/courses.rb +178 -0
  82. data/lib/whop_sdk/resources/experiences.rb +33 -0
  83. data/lib/whop_sdk/resources/forum_posts.rb +33 -0
  84. data/lib/whop_sdk/resources/members.rb +3 -1
  85. data/lib/whop_sdk/resources/memberships.rb +6 -4
  86. data/lib/whop_sdk/resources/messages.rb +28 -0
  87. data/lib/whop_sdk/resources/payments.rb +1 -1
  88. data/lib/whop_sdk/resources/plans.rb +19 -3
  89. data/lib/whop_sdk/resources/products.rb +4 -6
  90. data/lib/whop_sdk/resources/promo_codes.rb +161 -0
  91. data/lib/whop_sdk/resources/reviews.rb +68 -0
  92. data/lib/whop_sdk/version.rb +1 -1
  93. data/lib/whop_sdk.rb +53 -0
  94. data/rbi/whop_sdk/client.rbi +15 -0
  95. data/rbi/whop_sdk/models/assessment_question_types.rbi +31 -0
  96. data/rbi/whop_sdk/models/billing_reasons.rbi +27 -0
  97. data/rbi/whop_sdk/models/card_brands.rbi +35 -0
  98. data/rbi/whop_sdk/models/checkout_configuration.rbi +4 -2
  99. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +183 -2
  100. data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +4 -2
  101. data/rbi/whop_sdk/models/course.rbi +313 -0
  102. data/rbi/whop_sdk/models/course_chapter.rbi +101 -0
  103. data/rbi/whop_sdk/models/course_chapter_create_params.rbi +51 -0
  104. data/rbi/whop_sdk/models/course_chapter_delete_params.rbi +27 -0
  105. data/rbi/whop_sdk/models/course_chapter_delete_response.rbi +8 -0
  106. data/rbi/whop_sdk/models/course_chapter_list_params.rbi +75 -0
  107. data/rbi/whop_sdk/models/course_chapter_list_response.rbi +47 -0
  108. data/rbi/whop_sdk/models/course_chapter_retrieve_params.rbi +30 -0
  109. data/rbi/whop_sdk/models/course_chapter_update_params.rbi +40 -0
  110. data/rbi/whop_sdk/models/course_create_params.rbi +131 -0
  111. data/rbi/whop_sdk/models/course_delete_params.rbi +27 -0
  112. data/rbi/whop_sdk/models/course_delete_response.rbi +7 -0
  113. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +75 -0
  114. data/rbi/whop_sdk/models/course_lesson_delete_params.rbi +27 -0
  115. data/rbi/whop_sdk/models/course_lesson_delete_response.rbi +8 -0
  116. data/rbi/whop_sdk/models/course_lesson_list_params.rbi +83 -0
  117. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +91 -0
  118. data/rbi/whop_sdk/models/course_lesson_retrieve_params.rbi +27 -0
  119. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +465 -0
  120. data/rbi/whop_sdk/models/course_list_params.rbi +83 -0
  121. data/rbi/whop_sdk/models/course_list_response.rbi +198 -0
  122. data/rbi/whop_sdk/models/course_retrieve_params.rbi +27 -0
  123. data/rbi/whop_sdk/models/course_update_params.rbi +293 -0
  124. data/rbi/whop_sdk/models/experience_duplicate_params.rbi +40 -0
  125. data/rbi/whop_sdk/models/forum_post.rbi +16 -0
  126. data/rbi/whop_sdk/models/forum_post_list_response.rbi +16 -0
  127. data/rbi/whop_sdk/models/forum_post_update_params.rbi +124 -0
  128. data/rbi/whop_sdk/models/invoice.rbi +4 -2
  129. data/rbi/whop_sdk/models/invoice_list_item.rbi +4 -2
  130. data/rbi/whop_sdk/models/languages.rbi +40 -0
  131. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +45 -0
  132. data/rbi/whop_sdk/models/lesson.rbi +517 -0
  133. data/rbi/whop_sdk/models/lesson_types.rbi +25 -0
  134. data/rbi/whop_sdk/models/lesson_visibilities.rbi +23 -0
  135. data/rbi/whop_sdk/models/member_list_params.rbi +8 -0
  136. data/rbi/whop_sdk/models/membership.rbi +40 -0
  137. data/rbi/whop_sdk/models/membership_list_params.rbi +16 -8
  138. data/rbi/whop_sdk/models/membership_list_response.rbi +47 -0
  139. data/rbi/whop_sdk/models/message_update_params.rbi +114 -0
  140. data/rbi/whop_sdk/models/payment.rbi +32 -25
  141. data/rbi/whop_sdk/models/payment_list_params.rbi +3 -63
  142. data/rbi/whop_sdk/models/payment_list_response.rbi +32 -25
  143. data/rbi/whop_sdk/models/payment_method_types.rbi +116 -0
  144. data/rbi/whop_sdk/models/plan.rbi +24 -0
  145. data/rbi/whop_sdk/models/plan_create_params.rbi +38 -2
  146. data/rbi/whop_sdk/models/plan_list_response.rbi +24 -0
  147. data/rbi/whop_sdk/models/plan_update_params.rbi +36 -0
  148. data/rbi/whop_sdk/models/product.rbi +12 -0
  149. data/rbi/whop_sdk/models/product_create_params.rbi +0 -74
  150. data/rbi/whop_sdk/models/product_list_item.rbi +12 -0
  151. data/rbi/whop_sdk/models/product_update_params.rbi +59 -0
  152. data/rbi/whop_sdk/models/promo_code.rbi +248 -0
  153. data/rbi/whop_sdk/models/promo_code_create_params.rbi +161 -0
  154. data/rbi/whop_sdk/models/promo_code_delete_params.rbi +27 -0
  155. data/rbi/whop_sdk/models/promo_code_delete_response.rbi +8 -0
  156. data/rbi/whop_sdk/models/promo_code_list_params.rbi +99 -0
  157. data/rbi/whop_sdk/models/promo_code_list_response.rbi +222 -0
  158. data/rbi/whop_sdk/models/promo_code_retrieve_params.rbi +27 -0
  159. data/rbi/whop_sdk/models/promo_code_status.rbi +21 -0
  160. data/rbi/whop_sdk/models/promo_duration.rbi +21 -0
  161. data/rbi/whop_sdk/models/review_list_params.rbi +91 -0
  162. data/rbi/whop_sdk/models/review_list_response.rbi +243 -0
  163. data/rbi/whop_sdk/models/review_retrieve_params.rbi +27 -0
  164. data/rbi/whop_sdk/models/review_retrieve_response.rbi +354 -0
  165. data/rbi/whop_sdk/models/review_status.rbi +21 -0
  166. data/rbi/whop_sdk/models.rbi +76 -0
  167. data/rbi/whop_sdk/resources/checkout_configurations.rbi +2 -0
  168. data/rbi/whop_sdk/resources/course_chapters.rbi +115 -0
  169. data/rbi/whop_sdk/resources/course_lessons.rbi +163 -0
  170. data/rbi/whop_sdk/resources/courses.rbi +152 -0
  171. data/rbi/whop_sdk/resources/experiences.rbi +25 -0
  172. data/rbi/whop_sdk/resources/forum_posts.rbi +29 -0
  173. data/rbi/whop_sdk/resources/members.rbi +3 -0
  174. data/rbi/whop_sdk/resources/memberships.rbi +6 -3
  175. data/rbi/whop_sdk/resources/messages.rbi +25 -0
  176. data/rbi/whop_sdk/resources/payments.rbi +1 -3
  177. data/rbi/whop_sdk/resources/plans.rbi +29 -1
  178. data/rbi/whop_sdk/resources/products.rbi +4 -7
  179. data/rbi/whop_sdk/resources/promo_codes.rbi +147 -0
  180. data/rbi/whop_sdk/resources/reviews.rbi +56 -0
  181. data/sig/whop_sdk/client.rbs +10 -0
  182. data/sig/whop_sdk/models/assessment_question_types.rbs +17 -0
  183. data/sig/whop_sdk/models/billing_reasons.rbs +24 -0
  184. data/sig/whop_sdk/models/card_brands.rbs +44 -0
  185. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +87 -0
  186. data/sig/whop_sdk/models/course.rbs +171 -0
  187. data/sig/whop_sdk/models/course_chapter.rbs +49 -0
  188. data/sig/whop_sdk/models/course_chapter_create_params.rbs +28 -0
  189. data/sig/whop_sdk/models/course_chapter_delete_params.rbs +15 -0
  190. data/sig/whop_sdk/models/course_chapter_delete_response.rbs +5 -0
  191. data/sig/whop_sdk/models/course_chapter_list_params.rbs +46 -0
  192. data/sig/whop_sdk/models/course_chapter_list_response.rbs +18 -0
  193. data/sig/whop_sdk/models/course_chapter_retrieve_params.rbs +15 -0
  194. data/sig/whop_sdk/models/course_chapter_update_params.rbs +23 -0
  195. data/sig/whop_sdk/models/course_create_params.rbs +58 -0
  196. data/sig/whop_sdk/models/course_delete_params.rbs +15 -0
  197. data/sig/whop_sdk/models/course_delete_response.rbs +5 -0
  198. data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
  199. data/sig/whop_sdk/models/course_lesson_delete_params.rbs +15 -0
  200. data/sig/whop_sdk/models/course_lesson_delete_response.rbs +5 -0
  201. data/sig/whop_sdk/models/course_lesson_list_params.rbs +51 -0
  202. data/sig/whop_sdk/models/course_lesson_list_response.rbs +50 -0
  203. data/sig/whop_sdk/models/course_lesson_retrieve_params.rbs +15 -0
  204. data/sig/whop_sdk/models/course_lesson_update_params.rbs +162 -0
  205. data/sig/whop_sdk/models/course_list_params.rbs +51 -0
  206. data/sig/whop_sdk/models/course_list_response.rbs +102 -0
  207. data/sig/whop_sdk/models/course_retrieve_params.rbs +15 -0
  208. data/sig/whop_sdk/models/course_update_params.rbs +137 -0
  209. data/sig/whop_sdk/models/experience_duplicate_params.rbs +23 -0
  210. data/sig/whop_sdk/models/forum_post.rbs +10 -0
  211. data/sig/whop_sdk/models/forum_post_list_response.rbs +10 -0
  212. data/sig/whop_sdk/models/forum_post_update_params.rbs +53 -0
  213. data/sig/whop_sdk/models/languages.rbs +56 -0
  214. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +20 -1
  215. data/sig/whop_sdk/models/lesson.rbs +248 -0
  216. data/sig/whop_sdk/models/lesson_types.rbs +19 -0
  217. data/sig/whop_sdk/models/lesson_visibilities.rbs +14 -0
  218. data/sig/whop_sdk/models/member_list_params.rbs +6 -1
  219. data/sig/whop_sdk/models/membership.rbs +17 -0
  220. data/sig/whop_sdk/models/membership_list_params.rbs +11 -6
  221. data/sig/whop_sdk/models/membership_list_response.rbs +17 -0
  222. data/sig/whop_sdk/models/message_update_params.rbs +48 -0
  223. data/sig/whop_sdk/models/payment.rbs +12 -12
  224. data/sig/whop_sdk/models/payment_list_params.rbs +4 -25
  225. data/sig/whop_sdk/models/payment_list_response.rbs +12 -12
  226. data/sig/whop_sdk/models/payment_method_types.rbs +180 -0
  227. data/sig/whop_sdk/models/plan.rbs +15 -0
  228. data/sig/whop_sdk/models/plan_create_params.rbs +20 -0
  229. data/sig/whop_sdk/models/plan_list_response.rbs +15 -0
  230. data/sig/whop_sdk/models/plan_update_params.rbs +20 -0
  231. data/sig/whop_sdk/models/product.rbs +5 -0
  232. data/sig/whop_sdk/models/product_create_params.rbs +0 -22
  233. data/sig/whop_sdk/models/product_list_item.rbs +5 -0
  234. data/sig/whop_sdk/models/product_update_params.rbs +17 -0
  235. data/sig/whop_sdk/models/promo_code.rbs +134 -0
  236. data/sig/whop_sdk/models/promo_code_create_params.rbs +96 -0
  237. data/sig/whop_sdk/models/promo_code_delete_params.rbs +15 -0
  238. data/sig/whop_sdk/models/promo_code_delete_response.rbs +5 -0
  239. data/sig/whop_sdk/models/promo_code_list_params.rbs +61 -0
  240. data/sig/whop_sdk/models/promo_code_list_response.rbs +117 -0
  241. data/sig/whop_sdk/models/promo_code_retrieve_params.rbs +15 -0
  242. data/sig/whop_sdk/models/promo_code_status.rbs +15 -0
  243. data/sig/whop_sdk/models/promo_duration.rbs +15 -0
  244. data/sig/whop_sdk/models/review_list_params.rbs +56 -0
  245. data/sig/whop_sdk/models/review_list_response.rbs +116 -0
  246. data/sig/whop_sdk/models/review_retrieve_params.rbs +15 -0
  247. data/sig/whop_sdk/models/review_retrieve_response.rbs +152 -0
  248. data/sig/whop_sdk/models/review_status.rbs +15 -0
  249. data/sig/whop_sdk/models.rbs +76 -0
  250. data/sig/whop_sdk/resources/course_chapters.rbs +35 -0
  251. data/sig/whop_sdk/resources/course_lessons.rbs +47 -0
  252. data/sig/whop_sdk/resources/courses.rbs +47 -0
  253. data/sig/whop_sdk/resources/experiences.rbs +6 -0
  254. data/sig/whop_sdk/resources/forum_posts.rbs +9 -0
  255. data/sig/whop_sdk/resources/members.rbs +1 -0
  256. data/sig/whop_sdk/resources/memberships.rbs +2 -1
  257. data/sig/whop_sdk/resources/messages.rbs +8 -0
  258. data/sig/whop_sdk/resources/payments.rbs +1 -1
  259. data/sig/whop_sdk/resources/plans.rbs +8 -0
  260. data/sig/whop_sdk/resources/products.rbs +1 -2
  261. data/sig/whop_sdk/resources/promo_codes.rbs +45 -0
  262. data/sig/whop_sdk/resources/reviews.rbs +23 -0
  263. metadata +189 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a368b91451a8e4ce3380014bb0aa8f23f2fa592e70e124f402c1d4e00b786ce
4
- data.tar.gz: 9c2a3a5bc01a5fd9162a50b18030ea1193e35c3736bc69b4f10c0da830e5971d
3
+ metadata.gz: afe05506f28ccca20981f2b307f501db7097679a24e1b8b07a2bcdf9d006b6bd
4
+ data.tar.gz: 320397d496636b3615be4976b4f686140c2fc47aa11eda1b5244624ff839934e
5
5
  SHA512:
6
- metadata.gz: 537ce48ee64d9a2bd1898085e184a6c96bb3099470f6e5497dd40c440ed0bf001b2592ab2de22717f7c44aebc6d737ec90e45ec9398c86bfdafdf82f6483641e
7
- data.tar.gz: fff5e337d1e7c12593bf0988b60c88e08ac4913e1bf4228f2afab1dab4f879e25d575069ac5140d89c74c57b5ae15968718e7b2528eeb9e0ad93341ffd48a64e
6
+ metadata.gz: 59fe556c0733922c11d76fdabf92519fc8e5b56e4a10d9c12dde958d5c27ac97358a13f2879e2e3ddd5d6ea6bc87f061ad0b9f9bfb7a00a42b7458a9828b541a
7
+ data.tar.gz: 5e48dc2bbaebcd0830c4a16fc68c7d98f442c8fc48dd527a7f879e75dc1f6b69cc7547ffb810f6eadc35775f54fee67046a69c195eb3cd8b4886c0f2f46bd445
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.3 (2025-10-28)
4
+
5
+ Full Changelog: [v0.0.2...v0.0.3](https://github.com/whopio/whopsdk-ruby/compare/v0.0.2...v0.0.3)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([f57593b](https://github.com/whopio/whopsdk-ruby/commit/f57593b8c663eb02087053b4afdae6a1cb3f0332))
10
+ * **api:** api update ([f93cc72](https://github.com/whopio/whopsdk-ruby/commit/f93cc72cb4ea4b88eb038ba1beb3e1b15abdeb71))
11
+ * **api:** api update ([d0607e1](https://github.com/whopio/whopsdk-ruby/commit/d0607e1e42b88416cb361b71c517ef8cb3d63086))
12
+ * **api:** api update ([e585196](https://github.com/whopio/whopsdk-ruby/commit/e585196705e29132831730fd7420b9ae008078c1))
13
+ * **api:** api update ([af02bee](https://github.com/whopio/whopsdk-ruby/commit/af02beef6674bafe3a06324ec028ad4aa373dc80))
14
+ * **api:** api update ([d82e763](https://github.com/whopio/whopsdk-ruby/commit/d82e76376492bbadfcf2076055efe159fe1910f8))
15
+ * **api:** api update ([9e7307e](https://github.com/whopio/whopsdk-ruby/commit/9e7307e336c1085c0e591c9783f61a5524a5fd64))
16
+ * **api:** api update ([bd96e80](https://github.com/whopio/whopsdk-ruby/commit/bd96e80107f6c07541c57a63a90a633af22728fc))
17
+ * **api:** api update ([6115201](https://github.com/whopio/whopsdk-ruby/commit/61152016923691ee1a5b779c1fff55137cce8bfc))
18
+ * **api:** api update ([857fa4b](https://github.com/whopio/whopsdk-ruby/commit/857fa4b486a7eca620fb007b2a49b6274999973c))
19
+ * **api:** api update ([d0758be](https://github.com/whopio/whopsdk-ruby/commit/d0758be1bc5d663f20615c010308320257055907))
20
+ * **api:** api update ([6cce5a5](https://github.com/whopio/whopsdk-ruby/commit/6cce5a50461c8f30523ca1b426d6119c030d4095))
21
+ * **api:** api update ([dd7ec59](https://github.com/whopio/whopsdk-ruby/commit/dd7ec595756131adb75a0b610973deb36944abec))
22
+ * **api:** api update ([5200b69](https://github.com/whopio/whopsdk-ruby/commit/5200b6950ee0ee7d76caf2bc41418733c57b46b7))
23
+ * **api:** manual updates ([2f07d4c](https://github.com/whopio/whopsdk-ruby/commit/2f07d4ce1da116b57bd84e864a351091ec76da19))
24
+ * **api:** manual updates ([1389faf](https://github.com/whopio/whopsdk-ruby/commit/1389faf501860796adc9672dd5fa69be895e95dd))
25
+ * handle thread interrupts in the core HTTP client ([15125cb](https://github.com/whopio/whopsdk-ruby/commit/15125cbe9bdfabe2dfe7877474dd2910ef20ac23))
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **api:** add jwt and openssl as deps in gemspec ([#3](https://github.com/whopio/whopsdk-ruby/issues/3)) ([8f51b55](https://github.com/whopio/whopsdk-ruby/commit/8f51b55a3c9367312eac1f54e9b111766c68fded))
31
+
3
32
  ## 0.0.2 (2025-10-22)
4
33
 
5
34
  Full Changelog: [v0.0.1...v0.0.2](https://github.com/whopio/whopsdk-ruby/compare/v0.0.1...v0.0.2)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "whop_sdk", "~> 0.0.2"
20
+ gem "whop_sdk", "~> 0.0.3"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -97,6 +97,21 @@ module WhopSDK
97
97
  # @return [WhopSDK::Resources::Forums]
98
98
  attr_reader :forums
99
99
 
100
+ # @return [WhopSDK::Resources::PromoCodes]
101
+ attr_reader :promo_codes
102
+
103
+ # @return [WhopSDK::Resources::Courses]
104
+ attr_reader :courses
105
+
106
+ # @return [WhopSDK::Resources::CourseChapters]
107
+ attr_reader :course_chapters
108
+
109
+ # @return [WhopSDK::Resources::CourseLessons]
110
+ attr_reader :course_lessons
111
+
112
+ # @return [WhopSDK::Resources::Reviews]
113
+ attr_reader :reviews
114
+
100
115
  # @api private
101
116
  #
102
117
  # @return [Hash{String=>String}]
@@ -181,6 +196,11 @@ module WhopSDK
181
196
  @reactions = WhopSDK::Resources::Reactions.new(client: self)
182
197
  @members = WhopSDK::Resources::Members.new(client: self)
183
198
  @forums = WhopSDK::Resources::Forums.new(client: self)
199
+ @promo_codes = WhopSDK::Resources::PromoCodes.new(client: self)
200
+ @courses = WhopSDK::Resources::Courses.new(client: self)
201
+ @course_chapters = WhopSDK::Resources::CourseChapters.new(client: self)
202
+ @course_lessons = WhopSDK::Resources::CourseLessons.new(client: self)
203
+ @reviews = WhopSDK::Resources::Reviews.new(client: self)
184
204
  end
185
205
 
186
206
  # Verifies a Whop user token
@@ -128,40 +128,48 @@ module WhopSDK
128
128
  url, deadline = request.fetch_values(:url, :deadline)
129
129
 
130
130
  req = nil
131
- eof = false
132
131
  finished = false
133
- closing = nil
134
132
 
135
133
  # rubocop:disable Metrics/BlockLength
136
134
  enum = Enumerator.new do |y|
137
135
  next if finished
138
136
 
139
137
  with_pool(url, deadline: deadline) do |conn|
140
- req, closing = self.class.build_request(request) do
141
- self.class.calibrate_socket_timeout(conn, deadline)
142
- end
143
-
144
- self.class.calibrate_socket_timeout(conn, deadline)
145
- unless conn.started?
146
- conn.keep_alive_timeout = self.class::KEEP_ALIVE_TIMEOUT
147
- conn.start
148
- end
138
+ eof = false
139
+ closing = nil
140
+ ::Thread.handle_interrupt(Object => :never) do
141
+ ::Thread.handle_interrupt(Object => :immediate) do
142
+ req, closing = self.class.build_request(request) do
143
+ self.class.calibrate_socket_timeout(conn, deadline)
144
+ end
149
145
 
150
- self.class.calibrate_socket_timeout(conn, deadline)
151
- conn.request(req) do |rsp|
152
- y << [req, rsp]
153
- break if finished
154
-
155
- rsp.read_body do |bytes|
156
- y << bytes.force_encoding(Encoding::BINARY)
157
- break if finished
146
+ self.class.calibrate_socket_timeout(conn, deadline)
147
+ unless conn.started?
148
+ conn.keep_alive_timeout = self.class::KEEP_ALIVE_TIMEOUT
149
+ conn.start
150
+ end
158
151
 
159
152
  self.class.calibrate_socket_timeout(conn, deadline)
153
+ conn.request(req) do |rsp|
154
+ y << [req, rsp]
155
+ break if finished
156
+
157
+ rsp.read_body do |bytes|
158
+ y << bytes.force_encoding(Encoding::BINARY)
159
+ break if finished
160
+
161
+ self.class.calibrate_socket_timeout(conn, deadline)
162
+ end
163
+ eof = true
164
+ end
165
+ end
166
+ ensure
167
+ begin
168
+ conn.finish if !eof && conn&.started?
169
+ ensure
170
+ closing&.call
160
171
  end
161
- eof = true
162
172
  end
163
- ensure
164
- conn.finish if !eof && conn&.started?
165
173
  end
166
174
  rescue Timeout::Error
167
175
  raise WhopSDK::Errors::APITimeoutError.new(url: url, request: req)
@@ -174,8 +182,6 @@ module WhopSDK
174
182
  body = WhopSDK::Internal::Util.fused_enum(enum, external: true) do
175
183
  finished = true
176
184
  loop { enum.next }
177
- ensure
178
- closing&.call
179
185
  end
180
186
  [Integer(response.code), response, body]
181
187
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The available types for an assessment question
6
+ module AssessmentQuestionTypes
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ SHORT_ANSWER = :short_answer
10
+ TRUE_FALSE = :true_false
11
+ MULTIPLE_CHOICE = :multiple_choice
12
+ MULTIPLE_SELECT = :multiple_select
13
+
14
+ # @!method self.values
15
+ # @return [Array<Symbol>]
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The reason why a specific payment was billed
6
+ module BillingReasons
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ SUBSCRIPTION_CREATE = :subscription_create
10
+ SUBSCRIPTION_CYCLE = :subscription_cycle
11
+ SUBSCRIPTION_UPDATE = :subscription_update
12
+ ONE_TIME = :one_time
13
+ MANUAL = :manual
14
+ SUBSCRIPTION = :subscription
15
+
16
+ # @!method self.values
17
+ # @return [Array<Symbol>]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # Possible card brands that a payment token can have
6
+ module CardBrands
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ MASTERCARD = :mastercard
10
+ VISA = :visa
11
+ AMEX = :amex
12
+ DISCOVER = :discover
13
+ UNIONPAY = :unionpay
14
+ JCB = :jcb
15
+ DINERS = :diners
16
+ LINK = :link
17
+ TROY = :troy
18
+ VISADANKORT = :visadankort
19
+ VISABANCONTACT = :visabancontact
20
+ CHINA_UNION_PAY = :china_union_pay
21
+ RUPAY = :rupay
22
+ JCBRUPAY = :jcbrupay
23
+ ELO = :elo
24
+ UNKNOWN = :unknown
25
+
26
+ # @!method self.values
27
+ # @return [Array<Symbol>]
28
+ end
29
+ end
30
+ end
@@ -34,7 +34,8 @@ module WhopSDK
34
34
  required :plan, -> { WhopSDK::CheckoutConfiguration::Plan }
35
35
 
36
36
  # @!attribute purchase_url
37
- # The URL to redirect the user to after the checkout configuration is created
37
+ # A URL you can send to customers to complete a checkout. It looks like
38
+ # `/checkout/plan_xxxx?session={id}`
38
39
  #
39
40
  # @return [String]
40
41
  required :purchase_url, String
@@ -46,11 +47,13 @@ module WhopSDK
46
47
  required :redirect_url, String, nil?: true
47
48
 
48
49
  # @!method initialize(id:, affiliate_code:, company_id:, metadata:, plan:, purchase_url:, redirect_url:)
49
- # A checkout configuration object. Can be used to create a reusable custom
50
- # configuration for a checkout, including attaching plans, affiliates and custom
51
- # metadata to the checkout. This configuration can be re-used by multiple users.
52
- # All successful payments and memberships resulting from a checkout will contain
53
- # the passed metadata.
50
+ # Some parameter documentations has been truncated, see
51
+ # {WhopSDK::Models::CheckoutConfiguration} for more details.
52
+ #
53
+ # A checkout configuration object.
54
+ # Can be used to create a reusable custom configuration for a checkout, including attaching plans, affiliates and custom metadata to the checkout.
55
+ # This configuration can be re-used by multiple users.
56
+ # All successful payments and memberships resulting from a checkout will contain the passed metadata.
54
57
  #
55
58
  # @param id [String] The ID of the checkout configuration
56
59
  #
@@ -62,7 +65,7 @@ module WhopSDK
62
65
  #
63
66
  # @param plan [WhopSDK::Models::CheckoutConfiguration::Plan] The plan to use for the checkout configuration
64
67
  #
65
- # @param purchase_url [String] The URL to redirect the user to after the checkout configuration is created
68
+ # @param purchase_url [String] A URL you can send to customers to complete a checkout. It looks like `/checkout
66
69
  #
67
70
  # @param redirect_url [String, nil] The URL to redirect the user to after the checkout configuration is created
68
71
 
@@ -129,8 +129,15 @@ module WhopSDK
129
129
  # @return [Symbol, WhopSDK::Models::PlanType, nil]
130
130
  optional :plan_type, enum: -> { WhopSDK::PlanType }, nil?: true
131
131
 
132
+ # @!attribute product
133
+ # Pass this object to create a new product for this plan. We will use the product
134
+ # external identifier to find or create an existing product.
135
+ #
136
+ # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product, nil]
137
+ optional :product, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Product }, nil?: true
138
+
132
139
  # @!attribute product_id
133
- # The product the plan is related to.
140
+ # The product the plan is related to. Either this or product is required.
134
141
  #
135
142
  # @return [String, nil]
136
143
  optional :product_id, String, nil?: true
@@ -165,7 +172,7 @@ module WhopSDK
165
172
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
166
173
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
167
174
 
168
- # @!method initialize(company_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, plan_type: nil, product_id: nil, release_method: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil)
175
+ # @!method initialize(company_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil)
169
176
  # Some parameter documentations has been truncated, see
170
177
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan} for more details.
171
178
  #
@@ -195,7 +202,9 @@ module WhopSDK
195
202
  #
196
203
  # @param plan_type [Symbol, WhopSDK::Models::PlanType, nil] The type of plan that can be attached to an access pass
197
204
  #
198
- # @param product_id [String, nil] The product the plan is related to.
205
+ # @param product [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product, nil] Pass this object to create a new product for this plan. We will use the product
206
+ #
207
+ # @param product_id [String, nil] The product the plan is related to. Either this or product is required.
199
208
  #
200
209
  # @param release_method [Symbol, WhopSDK::Models::ReleaseMethod, nil] The methods of how a plan can be released.
201
210
  #
@@ -287,6 +296,134 @@ module WhopSDK
287
296
  #
288
297
  # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
289
298
  end
299
+
300
+ # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Plan#product
301
+ class Product < WhopSDK::Internal::Type::BaseModel
302
+ # @!attribute external_identifier
303
+ # A unique ID used to find or create a product. When provided during creation, we
304
+ # will look for an existing product with this external identifier — if found, it
305
+ # will be updated; otherwise, a new product will be created.
306
+ #
307
+ # @return [String]
308
+ required :external_identifier, String
309
+
310
+ # @!attribute title
311
+ # The title of the product.
312
+ #
313
+ # @return [String]
314
+ required :title, String
315
+
316
+ # @!attribute business_type
317
+ # The different business types a company can be.
318
+ #
319
+ # @return [Symbol, WhopSDK::Models::BusinessTypes, nil]
320
+ optional :business_type, enum: -> { WhopSDK::BusinessTypes }, nil?: true
321
+
322
+ # @!attribute collect_shipping_address
323
+ # Whether or not to collect shipping information at checkout from the customer.
324
+ #
325
+ # @return [Boolean, nil]
326
+ optional :collect_shipping_address, WhopSDK::Internal::Type::Boolean, nil?: true
327
+
328
+ # @!attribute custom_statement_descriptor
329
+ # The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
330
+ # between 5 and 22 characters, contain at least one letter, and not contain any of
331
+ # the following characters: <, >, \, ', "
332
+ #
333
+ # @return [String, nil]
334
+ optional :custom_statement_descriptor, String, nil?: true
335
+
336
+ # @!attribute description
337
+ # A written description of the product.
338
+ #
339
+ # @return [String, nil]
340
+ optional :description, String, nil?: true
341
+
342
+ # @!attribute global_affiliate_percentage
343
+ # The percentage of the revenue that goes to the global affiliate program.
344
+ #
345
+ # @return [Float, nil]
346
+ optional :global_affiliate_percentage, Float, nil?: true
347
+
348
+ # @!attribute global_affiliate_status
349
+ # The different statuses of the global affiliate program for an access pass.
350
+ #
351
+ # @return [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil]
352
+ optional :global_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus }, nil?: true
353
+
354
+ # @!attribute headline
355
+ # The headline of the product.
356
+ #
357
+ # @return [String, nil]
358
+ optional :headline, String, nil?: true
359
+
360
+ # @!attribute industry_type
361
+ # The different industry types a company can be in.
362
+ #
363
+ # @return [Symbol, WhopSDK::Models::IndustryTypes, nil]
364
+ optional :industry_type, enum: -> { WhopSDK::IndustryTypes }, nil?: true
365
+
366
+ # @!attribute product_tax_code_id
367
+ # The ID of the product tax code to apply to this product.
368
+ #
369
+ # @return [String, nil]
370
+ optional :product_tax_code_id, String, nil?: true
371
+
372
+ # @!attribute redirect_purchase_url
373
+ # The URL to redirect the customer to after a purchase.
374
+ #
375
+ # @return [String, nil]
376
+ optional :redirect_purchase_url, String, nil?: true
377
+
378
+ # @!attribute route
379
+ # The route of the product.
380
+ #
381
+ # @return [String, nil]
382
+ optional :route, String, nil?: true
383
+
384
+ # @!attribute visibility
385
+ # Visibility of a resource
386
+ #
387
+ # @return [Symbol, WhopSDK::Models::Visibility, nil]
388
+ optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
389
+
390
+ # @!method initialize(external_identifier:, title:, business_type: nil, collect_shipping_address: nil, custom_statement_descriptor: nil, description: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, industry_type: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, visibility: nil)
391
+ # Some parameter documentations has been truncated, see
392
+ # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product} for more
393
+ # details.
394
+ #
395
+ # Pass this object to create a new product for this plan. We will use the product
396
+ # external identifier to find or create an existing product.
397
+ #
398
+ # @param external_identifier [String] A unique ID used to find or create a product. When provided during creation, we
399
+ #
400
+ # @param title [String] The title of the product.
401
+ #
402
+ # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
403
+ #
404
+ # @param collect_shipping_address [Boolean, nil] Whether or not to collect shipping information at checkout from the customer.
405
+ #
406
+ # @param custom_statement_descriptor [String, nil] The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
407
+ # betwee
408
+ #
409
+ # @param description [String, nil] A written description of the product.
410
+ #
411
+ # @param global_affiliate_percentage [Float, nil] The percentage of the revenue that goes to the global affiliate program.
412
+ #
413
+ # @param global_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for an access pass.
414
+ #
415
+ # @param headline [String, nil] The headline of the product.
416
+ #
417
+ # @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in.
418
+ #
419
+ # @param product_tax_code_id [String, nil] The ID of the product tax code to apply to this product.
420
+ #
421
+ # @param redirect_purchase_url [String, nil] The URL to redirect the customer to after a purchase.
422
+ #
423
+ # @param route [String, nil] The route of the product.
424
+ #
425
+ # @param visibility [Symbol, WhopSDK::Models::Visibility, nil] Visibility of a resource
426
+ end
290
427
  end
291
428
  end
292
429
  end
@@ -35,7 +35,8 @@ module WhopSDK
35
35
  required :plan, -> { WhopSDK::Models::CheckoutConfigurationListResponse::Plan }
36
36
 
37
37
  # @!attribute purchase_url
38
- # The URL to redirect the user to after the checkout configuration is created
38
+ # A URL you can send to customers to complete a checkout. It looks like
39
+ # `/checkout/plan_xxxx?session={id}`
39
40
  #
40
41
  # @return [String]
41
42
  required :purchase_url, String
@@ -47,11 +48,13 @@ module WhopSDK
47
48
  required :redirect_url, String, nil?: true
48
49
 
49
50
  # @!method initialize(id:, affiliate_code:, company_id:, metadata:, plan:, purchase_url:, redirect_url:)
50
- # A checkout configuration object. Can be used to create a reusable custom
51
- # configuration for a checkout, including attaching plans, affiliates and custom
52
- # metadata to the checkout. This configuration can be re-used by multiple users.
53
- # All successful payments and memberships resulting from a checkout will contain
54
- # the passed metadata.
51
+ # Some parameter documentations has been truncated, see
52
+ # {WhopSDK::Models::CheckoutConfigurationListResponse} for more details.
53
+ #
54
+ # A checkout configuration object.
55
+ # Can be used to create a reusable custom configuration for a checkout, including attaching plans, affiliates and custom metadata to the checkout.
56
+ # This configuration can be re-used by multiple users.
57
+ # All successful payments and memberships resulting from a checkout will contain the passed metadata.
55
58
  #
56
59
  # @param id [String] The ID of the checkout configuration
57
60
  #
@@ -63,7 +66,7 @@ module WhopSDK
63
66
  #
64
67
  # @param plan [WhopSDK::Models::CheckoutConfigurationListResponse::Plan] The plan to use for the checkout configuration
65
68
  #
66
- # @param purchase_url [String] The URL to redirect the user to after the checkout configuration is created
69
+ # @param purchase_url [String] A URL you can send to customers to complete a checkout. It looks like `/checkout
67
70
  #
68
71
  # @param redirect_url [String, nil] The URL to redirect the user to after the checkout configuration is created
69
72