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
@@ -14,56 +14,52 @@ module WhopSDK
14
14
  )
15
15
  end
16
16
 
17
- # The affiliate code to use for the checkout configuration
18
- sig { returns(T.nilable(String)) }
19
- attr_accessor :affiliate_code
20
-
21
- # The metadata to use for the checkout configuration
22
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
23
- attr_accessor :metadata
24
-
25
17
  # Pass this object to create a new plan for this checkout configuration
26
- sig do
27
- returns(T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan))
28
- end
18
+ sig { returns(WhopSDK::CheckoutConfigurationCreateParams::Plan) }
29
19
  attr_reader :plan
30
20
 
31
21
  sig do
32
22
  params(
33
- plan:
34
- T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash)
23
+ plan: WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash
35
24
  ).void
36
25
  end
37
26
  attr_writer :plan
38
27
 
39
- # The ID of the plan to use for the checkout configuration
28
+ # The affiliate code to use for the checkout configuration
40
29
  sig { returns(T.nilable(String)) }
41
- attr_accessor :plan_id
30
+ attr_accessor :affiliate_code
31
+
32
+ # The metadata to use for the checkout configuration
33
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
34
+ attr_accessor :metadata
42
35
 
43
36
  # The URL to redirect the user to after the checkout configuration is created
44
37
  sig { returns(T.nilable(String)) }
45
38
  attr_accessor :redirect_url
46
39
 
40
+ # The ID of the plan to use for the checkout configuration
41
+ sig { returns(String) }
42
+ attr_accessor :plan_id
43
+
47
44
  sig do
48
45
  params(
46
+ plan: WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash,
47
+ plan_id: String,
49
48
  affiliate_code: T.nilable(String),
50
49
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
51
- plan:
52
- T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash),
53
- plan_id: T.nilable(String),
54
50
  redirect_url: T.nilable(String),
55
51
  request_options: WhopSDK::RequestOptions::OrHash
56
52
  ).returns(T.attached_class)
57
53
  end
58
54
  def self.new(
55
+ # Pass this object to create a new plan for this checkout configuration
56
+ plan:,
57
+ # The ID of the plan to use for the checkout configuration
58
+ plan_id:,
59
59
  # The affiliate code to use for the checkout configuration
60
60
  affiliate_code: nil,
61
61
  # The metadata to use for the checkout configuration
62
62
  metadata: nil,
63
- # Pass this object to create a new plan for this checkout configuration
64
- plan: nil,
65
- # The ID of the plan to use for the checkout configuration
66
- plan_id: nil,
67
63
  # The URL to redirect the user to after the checkout configuration is created
68
64
  redirect_url: nil,
69
65
  request_options: {}
@@ -73,11 +69,11 @@ module WhopSDK
73
69
  sig do
74
70
  override.returns(
75
71
  {
72
+ plan: WhopSDK::CheckoutConfigurationCreateParams::Plan,
76
73
  affiliate_code: T.nilable(String),
77
74
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
78
- plan: T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan),
79
- plan_id: T.nilable(String),
80
75
  redirect_url: T.nilable(String),
76
+ plan_id: String,
81
77
  request_options: WhopSDK::RequestOptions
82
78
  }
83
79
  )
@@ -134,20 +130,15 @@ module WhopSDK
134
130
  # An image for the plan. This will be visible on the product page to customers.
135
131
  sig do
136
132
  returns(
137
- T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::Image)
138
- )
139
- end
140
- attr_reader :image
141
-
142
- sig do
143
- params(
144
- image:
145
- T.nilable(
146
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::OrHash
133
+ T.nilable(
134
+ T.any(
135
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
136
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID
147
137
  )
148
- ).void
138
+ )
139
+ )
149
140
  end
150
- attr_writer :image
141
+ attr_accessor :image
151
142
 
152
143
  # An additional amount charged upon first purchase.
153
144
  sig { returns(T.nilable(Float)) }
@@ -162,11 +153,51 @@ module WhopSDK
162
153
  sig { returns(T.nilable(WhopSDK::TaxType::OrSymbol)) }
163
154
  attr_accessor :override_tax_type
164
155
 
156
+ # The explicit payment method configuration for the plan. If not provided, the
157
+ # platform or company's defaults will apply.
158
+ sig do
159
+ returns(
160
+ T.nilable(
161
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration
162
+ )
163
+ )
164
+ end
165
+ attr_reader :payment_method_configuration
166
+
167
+ sig do
168
+ params(
169
+ payment_method_configuration:
170
+ T.nilable(
171
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration::OrHash
172
+ )
173
+ ).void
174
+ end
175
+ attr_writer :payment_method_configuration
176
+
165
177
  # The type of plan that can be attached to an access pass
166
178
  sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
167
179
  attr_accessor :plan_type
168
180
 
169
- # The product the plan is related to.
181
+ # Pass this object to create a new product for this plan. We will use the product
182
+ # external identifier to find or create an existing product.
183
+ sig do
184
+ returns(
185
+ T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::Product)
186
+ )
187
+ end
188
+ attr_reader :product
189
+
190
+ sig do
191
+ params(
192
+ product:
193
+ T.nilable(
194
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Product::OrHash
195
+ )
196
+ ).void
197
+ end
198
+ attr_writer :product
199
+
200
+ # The product the plan is related to. Either this or product is required.
170
201
  sig { returns(T.nilable(String)) }
171
202
  attr_accessor :product_id
172
203
 
@@ -207,12 +238,23 @@ module WhopSDK
207
238
  force_create_new_plan: T.nilable(T::Boolean),
208
239
  image:
209
240
  T.nilable(
210
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::OrHash
241
+ T.any(
242
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID::OrHash,
243
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID::OrHash
244
+ )
211
245
  ),
212
246
  initial_price: T.nilable(Float),
213
247
  internal_notes: T.nilable(String),
214
248
  override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
249
+ payment_method_configuration:
250
+ T.nilable(
251
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration::OrHash
252
+ ),
215
253
  plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
254
+ product:
255
+ T.nilable(
256
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Product::OrHash
257
+ ),
216
258
  product_id: T.nilable(String),
217
259
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
218
260
  renewal_price: T.nilable(Float),
@@ -246,9 +288,15 @@ module WhopSDK
246
288
  # Whether or not the tax is included in a plan's price (or if it hasn't been set
247
289
  # up)
248
290
  override_tax_type: nil,
291
+ # The explicit payment method configuration for the plan. If not provided, the
292
+ # platform or company's defaults will apply.
293
+ payment_method_configuration: nil,
249
294
  # The type of plan that can be attached to an access pass
250
295
  plan_type: nil,
251
- # The product the plan is related to.
296
+ # Pass this object to create a new product for this plan. We will use the product
297
+ # external identifier to find or create an existing product.
298
+ product: nil,
299
+ # The product the plan is related to. Either this or product is required.
252
300
  product_id: nil,
253
301
  # The methods of how a plan can be released.
254
302
  release_method: nil,
@@ -280,12 +328,23 @@ module WhopSDK
280
328
  force_create_new_plan: T.nilable(T::Boolean),
281
329
  image:
282
330
  T.nilable(
283
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image
331
+ T.any(
332
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
333
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID
334
+ )
284
335
  ),
285
336
  initial_price: T.nilable(Float),
286
337
  internal_notes: T.nilable(String),
287
338
  override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
339
+ payment_method_configuration:
340
+ T.nilable(
341
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration
342
+ ),
288
343
  plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
344
+ product:
345
+ T.nilable(
346
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Product
347
+ ),
289
348
  product_id: T.nilable(String),
290
349
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
291
350
  renewal_price: T.nilable(Float),
@@ -373,49 +432,299 @@ module WhopSDK
373
432
  end
374
433
  end
375
434
 
376
- class Image < WhopSDK::Internal::Type::BaseModel
435
+ # An image for the plan. This will be visible on the product page to customers.
436
+ module Image
437
+ extend WhopSDK::Internal::Type::Union
438
+
439
+ Variants =
440
+ T.type_alias do
441
+ T.any(
442
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
443
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID
444
+ )
445
+ end
446
+
447
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
448
+ OrHash =
449
+ T.type_alias do
450
+ T.any(
451
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
452
+ WhopSDK::Internal::AnyHash
453
+ )
454
+ end
455
+
456
+ # This ID should be used the first time you upload an attachment. It is the ID of
457
+ # the direct upload that was created when uploading the file to S3 via the
458
+ # mediaDirectUpload mutation.
459
+ sig { returns(String) }
460
+ attr_accessor :direct_upload_id
461
+
462
+ # Input for an attachment
463
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
464
+ def self.new(
465
+ # This ID should be used the first time you upload an attachment. It is the ID of
466
+ # the direct upload that was created when uploading the file to S3 via the
467
+ # mediaDirectUpload mutation.
468
+ direct_upload_id:
469
+ )
470
+ end
471
+
472
+ sig { override.returns({ direct_upload_id: String }) }
473
+ def to_hash
474
+ end
475
+ end
476
+
477
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
478
+ OrHash =
479
+ T.type_alias do
480
+ T.any(
481
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID,
482
+ WhopSDK::Internal::AnyHash
483
+ )
484
+ end
485
+
486
+ # The ID of an existing attachment object. Use this when updating a resource and
487
+ # keeping a subset of the attachments. Don't use this unless you know what you're
488
+ # doing.
489
+ sig { returns(String) }
490
+ attr_accessor :id
491
+
492
+ # Input for an attachment
493
+ sig { params(id: String).returns(T.attached_class) }
494
+ def self.new(
495
+ # The ID of an existing attachment object. Use this when updating a resource and
496
+ # keeping a subset of the attachments. Don't use this unless you know what you're
497
+ # doing.
498
+ id:
499
+ )
500
+ end
501
+
502
+ sig { override.returns({ id: String }) }
503
+ def to_hash
504
+ end
505
+ end
506
+
507
+ sig do
508
+ override.returns(
509
+ T::Array[
510
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::Variants
511
+ ]
512
+ )
513
+ end
514
+ def self.variants
515
+ end
516
+ end
517
+
518
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
519
+ OrHash =
520
+ T.type_alias do
521
+ T.any(
522
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration,
523
+ WhopSDK::Internal::AnyHash
524
+ )
525
+ end
526
+
527
+ # An array of payment method identifiers that are explicitly disabled. Only
528
+ # applies if the include_platform_defaults is true.
529
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
530
+ attr_accessor :disabled
531
+
532
+ # An array of payment method identifiers that are explicitly enabled. This means
533
+ # these payment methods will be shown on checkout. Example use case is to only
534
+ # enable a specific payment method like cashapp, or extending the platform
535
+ # defaults with additional methods.
536
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
537
+ attr_accessor :enabled
538
+
539
+ # Whether Whop's platform default payment method enablement settings are included
540
+ # in this configuration. The full list of default payment methods can be found in
541
+ # the documentation at docs.whop.com/payments.
542
+ sig { returns(T::Boolean) }
543
+ attr_accessor :include_platform_defaults
544
+
545
+ # The explicit payment method configuration for the plan. If not provided, the
546
+ # platform or company's defaults will apply.
547
+ sig do
548
+ params(
549
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
550
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
551
+ include_platform_defaults: T::Boolean
552
+ ).returns(T.attached_class)
553
+ end
554
+ def self.new(
555
+ # An array of payment method identifiers that are explicitly disabled. Only
556
+ # applies if the include_platform_defaults is true.
557
+ disabled:,
558
+ # An array of payment method identifiers that are explicitly enabled. This means
559
+ # these payment methods will be shown on checkout. Example use case is to only
560
+ # enable a specific payment method like cashapp, or extending the platform
561
+ # defaults with additional methods.
562
+ enabled:,
563
+ # Whether Whop's platform default payment method enablement settings are included
564
+ # in this configuration. The full list of default payment methods can be found in
565
+ # the documentation at docs.whop.com/payments.
566
+ include_platform_defaults:
567
+ )
568
+ end
569
+
570
+ sig do
571
+ override.returns(
572
+ {
573
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
574
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
575
+ include_platform_defaults: T::Boolean
576
+ }
577
+ )
578
+ end
579
+ def to_hash
580
+ end
581
+ end
582
+
583
+ class Product < WhopSDK::Internal::Type::BaseModel
377
584
  OrHash =
378
585
  T.type_alias do
379
586
  T.any(
380
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image,
587
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Product,
381
588
  WhopSDK::Internal::AnyHash
382
589
  )
383
590
  end
384
591
 
385
- # The ID of an existing attachment object. Use this when updating a resource and
386
- # keeping a subset of the attachments. Don't use this unless you know what you're
387
- # doing.
592
+ # A unique ID used to find or create a product. When provided during creation, we
593
+ # will look for an existing product with this external identifier if found, it
594
+ # will be updated; otherwise, a new product will be created.
595
+ sig { returns(String) }
596
+ attr_accessor :external_identifier
597
+
598
+ # The title of the product.
599
+ sig { returns(String) }
600
+ attr_accessor :title
601
+
602
+ # The different business types a company can be.
603
+ sig { returns(T.nilable(WhopSDK::BusinessTypes::OrSymbol)) }
604
+ attr_accessor :business_type
605
+
606
+ # Whether or not to collect shipping information at checkout from the customer.
607
+ sig { returns(T.nilable(T::Boolean)) }
608
+ attr_accessor :collect_shipping_address
609
+
610
+ # The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
611
+ # between 5 and 22 characters, contain at least one letter, and not contain any of
612
+ # the following characters: <, >, \, ', "
388
613
  sig { returns(T.nilable(String)) }
389
- attr_accessor :id
614
+ attr_accessor :custom_statement_descriptor
390
615
 
391
- # This ID should be used the first time you upload an attachment. It is the ID of
392
- # the direct upload that was created when uploading the file to S3 via the
393
- # mediaDirectUpload mutation.
616
+ # A written description of the product.
394
617
  sig { returns(T.nilable(String)) }
395
- attr_accessor :direct_upload_id
618
+ attr_accessor :description
396
619
 
397
- # An image for the plan. This will be visible on the product page to customers.
620
+ # The percentage of the revenue that goes to the global affiliate program.
621
+ sig { returns(T.nilable(Float)) }
622
+ attr_accessor :global_affiliate_percentage
623
+
624
+ # The different statuses of the global affiliate program for an access pass.
625
+ sig { returns(T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol)) }
626
+ attr_accessor :global_affiliate_status
627
+
628
+ # The headline of the product.
629
+ sig { returns(T.nilable(String)) }
630
+ attr_accessor :headline
631
+
632
+ # The different industry types a company can be in.
633
+ sig { returns(T.nilable(WhopSDK::IndustryTypes::OrSymbol)) }
634
+ attr_accessor :industry_type
635
+
636
+ # The ID of the product tax code to apply to this product.
637
+ sig { returns(T.nilable(String)) }
638
+ attr_accessor :product_tax_code_id
639
+
640
+ # The URL to redirect the customer to after a purchase.
641
+ sig { returns(T.nilable(String)) }
642
+ attr_accessor :redirect_purchase_url
643
+
644
+ # The route of the product.
645
+ sig { returns(T.nilable(String)) }
646
+ attr_accessor :route
647
+
648
+ # Visibility of a resource
649
+ sig { returns(T.nilable(WhopSDK::Visibility::OrSymbol)) }
650
+ attr_accessor :visibility
651
+
652
+ # Pass this object to create a new product for this plan. We will use the product
653
+ # external identifier to find or create an existing product.
398
654
  sig do
399
655
  params(
400
- id: T.nilable(String),
401
- direct_upload_id: T.nilable(String)
656
+ external_identifier: String,
657
+ title: String,
658
+ business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
659
+ collect_shipping_address: T.nilable(T::Boolean),
660
+ custom_statement_descriptor: T.nilable(String),
661
+ description: T.nilable(String),
662
+ global_affiliate_percentage: T.nilable(Float),
663
+ global_affiliate_status:
664
+ T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol),
665
+ headline: T.nilable(String),
666
+ industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
667
+ product_tax_code_id: T.nilable(String),
668
+ redirect_purchase_url: T.nilable(String),
669
+ route: T.nilable(String),
670
+ visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
402
671
  ).returns(T.attached_class)
403
672
  end
404
673
  def self.new(
405
- # The ID of an existing attachment object. Use this when updating a resource and
406
- # keeping a subset of the attachments. Don't use this unless you know what you're
407
- # doing.
408
- id: nil,
409
- # This ID should be used the first time you upload an attachment. It is the ID of
410
- # the direct upload that was created when uploading the file to S3 via the
411
- # mediaDirectUpload mutation.
412
- direct_upload_id: nil
674
+ # A unique ID used to find or create a product. When provided during creation, we
675
+ # will look for an existing product with this external identifier if found, it
676
+ # will be updated; otherwise, a new product will be created.
677
+ external_identifier:,
678
+ # The title of the product.
679
+ title:,
680
+ # The different business types a company can be.
681
+ business_type: nil,
682
+ # Whether or not to collect shipping information at checkout from the customer.
683
+ collect_shipping_address: nil,
684
+ # The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
685
+ # between 5 and 22 characters, contain at least one letter, and not contain any of
686
+ # the following characters: <, >, \, ', "
687
+ custom_statement_descriptor: nil,
688
+ # A written description of the product.
689
+ description: nil,
690
+ # The percentage of the revenue that goes to the global affiliate program.
691
+ global_affiliate_percentage: nil,
692
+ # The different statuses of the global affiliate program for an access pass.
693
+ global_affiliate_status: nil,
694
+ # The headline of the product.
695
+ headline: nil,
696
+ # The different industry types a company can be in.
697
+ industry_type: nil,
698
+ # The ID of the product tax code to apply to this product.
699
+ product_tax_code_id: nil,
700
+ # The URL to redirect the customer to after a purchase.
701
+ redirect_purchase_url: nil,
702
+ # The route of the product.
703
+ route: nil,
704
+ # Visibility of a resource
705
+ visibility: nil
413
706
  )
414
707
  end
415
708
 
416
709
  sig do
417
710
  override.returns(
418
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
711
+ {
712
+ external_identifier: String,
713
+ title: String,
714
+ business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
715
+ collect_shipping_address: T.nilable(T::Boolean),
716
+ custom_statement_descriptor: T.nilable(String),
717
+ description: T.nilable(String),
718
+ global_affiliate_percentage: T.nilable(Float),
719
+ global_affiliate_status:
720
+ T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol),
721
+ headline: T.nilable(String),
722
+ industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
723
+ product_tax_code_id: T.nilable(String),
724
+ redirect_purchase_url: T.nilable(String),
725
+ route: T.nilable(String),
726
+ visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
727
+ }
419
728
  )
420
729
  end
421
730
  def to_hash
@@ -38,7 +38,8 @@ module WhopSDK
38
38
  end
39
39
  attr_writer :plan
40
40
 
41
- # The URL to redirect the user to after the checkout configuration is created
41
+ # A URL you can send to customers to complete a checkout. It looks like
42
+ # `/checkout/plan_xxxx?session={id}`
42
43
  sig { returns(String) }
43
44
  attr_accessor :purchase_url
44
45
 
@@ -74,7 +75,8 @@ module WhopSDK
74
75
  metadata:,
75
76
  # The plan to use for the checkout configuration
76
77
  plan:,
77
- # The URL to redirect the user to after the checkout configuration is created
78
+ # A URL you can send to customers to complete a checkout. It looks like
79
+ # `/checkout/plan_xxxx?session={id}`
78
80
  purchase_url:,
79
81
  # The URL to redirect the user to after the checkout configuration is created
80
82
  redirect_url:
@@ -37,6 +37,11 @@ module WhopSDK
37
37
  sig { returns(Integer) }
38
38
  attr_accessor :member_count
39
39
 
40
+ # A key-value store of data for the account, created/updated by the platform that
41
+ # made the account.
42
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
43
+ attr_accessor :metadata
44
+
40
45
  # The user who owns this company
41
46
  sig { returns(WhopSDK::Company::OwnerUser) }
42
47
  attr_reader :owner_user
@@ -78,6 +83,7 @@ module WhopSDK
78
83
  industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
79
84
  logo: T.nilable(WhopSDK::Company::Logo::OrHash),
80
85
  member_count: Integer,
86
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
81
87
  owner_user: WhopSDK::Company::OwnerUser::OrHash,
82
88
  published_reviews_count: Integer,
83
89
  route: String,
@@ -102,6 +108,9 @@ module WhopSDK
102
108
  logo:,
103
109
  # The number of members in the company.
104
110
  member_count:,
111
+ # A key-value store of data for the account, created/updated by the platform that
112
+ # made the account.
113
+ metadata:,
105
114
  # The user who owns this company
106
115
  owner_user:,
107
116
  # The number of reviews that have been published for the company.
@@ -129,6 +138,7 @@ module WhopSDK
129
138
  industry_type: T.nilable(WhopSDK::IndustryTypes::TaggedSymbol),
130
139
  logo: T.nilable(WhopSDK::Company::Logo),
131
140
  member_count: Integer,
141
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
132
142
  owner_user: WhopSDK::Company::OwnerUser,
133
143
  published_reviews_count: Integer,
134
144
  route: String,
@@ -0,0 +1,67 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class CompanyCreateParams < 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::CompanyCreateParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # The email of the user who the company will belong to.
15
+ sig { returns(String) }
16
+ attr_accessor :email
17
+
18
+ # The company ID of the platform creating this company.
19
+ sig { returns(String) }
20
+ attr_accessor :parent_company_id
21
+
22
+ # The name of the company being created.
23
+ sig { returns(String) }
24
+ attr_accessor :title
25
+
26
+ # Additional metadata for the account
27
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
28
+ attr_accessor :metadata
29
+
30
+ sig do
31
+ params(
32
+ email: String,
33
+ parent_company_id: String,
34
+ title: String,
35
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
36
+ request_options: WhopSDK::RequestOptions::OrHash
37
+ ).returns(T.attached_class)
38
+ end
39
+ def self.new(
40
+ # The email of the user who the company will belong to.
41
+ email:,
42
+ # The company ID of the platform creating this company.
43
+ parent_company_id:,
44
+ # The name of the company being created.
45
+ title:,
46
+ # Additional metadata for the account
47
+ metadata: nil,
48
+ request_options: {}
49
+ )
50
+ end
51
+
52
+ sig do
53
+ override.returns(
54
+ {
55
+ email: String,
56
+ parent_company_id: String,
57
+ title: String,
58
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
59
+ request_options: WhopSDK::RequestOptions
60
+ }
61
+ )
62
+ end
63
+ def to_hash
64
+ end
65
+ end
66
+ end
67
+ end