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
@@ -11,10 +11,6 @@ module WhopSDK
11
11
  T.any(WhopSDK::MembershipListParams, WhopSDK::Internal::AnyHash)
12
12
  end
13
13
 
14
- # The ID of the company to list memberships for
15
- sig { returns(String) }
16
- attr_accessor :company_id
17
-
18
14
  # The access pass IDs to filter the memberships by
19
15
  sig { returns(T.nilable(T::Array[String])) }
20
16
  attr_accessor :access_pass_ids
@@ -37,6 +33,10 @@ module WhopSDK
37
33
  end
38
34
  attr_accessor :cancel_options
39
35
 
36
+ # The ID of the company to list memberships for
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :company_id
39
+
40
40
  # The minimum creation date to filter by
41
41
  sig { returns(T.nilable(Time)) }
42
42
  attr_accessor :created_after
@@ -73,9 +73,12 @@ module WhopSDK
73
73
  sig { returns(T.nilable(T::Array[WhopSDK::MembershipStatus::OrSymbol])) }
74
74
  attr_accessor :statuses
75
75
 
76
+ # Only return memberships from these whop user ids
77
+ sig { returns(T.nilable(T::Array[String])) }
78
+ attr_accessor :user_ids
79
+
76
80
  sig do
77
81
  params(
78
- company_id: String,
79
82
  access_pass_ids: T.nilable(T::Array[String]),
80
83
  after: T.nilable(String),
81
84
  before: T.nilable(String),
@@ -83,6 +86,7 @@ module WhopSDK
83
86
  T.nilable(
84
87
  T::Array[WhopSDK::MembershipListParams::CancelOption::OrSymbol]
85
88
  ),
89
+ company_id: T.nilable(String),
86
90
  created_after: T.nilable(Time),
87
91
  created_before: T.nilable(Time),
88
92
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
@@ -92,12 +96,11 @@ module WhopSDK
92
96
  plan_ids: T.nilable(T::Array[String]),
93
97
  promo_code_ids: T.nilable(T::Array[String]),
94
98
  statuses: T.nilable(T::Array[WhopSDK::MembershipStatus::OrSymbol]),
99
+ user_ids: T.nilable(T::Array[String]),
95
100
  request_options: WhopSDK::RequestOptions::OrHash
96
101
  ).returns(T.attached_class)
97
102
  end
98
103
  def self.new(
99
- # The ID of the company to list memberships for
100
- company_id:,
101
104
  # The access pass IDs to filter the memberships by
102
105
  access_pass_ids: nil,
103
106
  # Returns the elements in the list that come after the specified cursor.
@@ -106,6 +109,8 @@ module WhopSDK
106
109
  before: nil,
107
110
  # The cancel options to filter the memberships by
108
111
  cancel_options: nil,
112
+ # The ID of the company to list memberships for
113
+ company_id: nil,
109
114
  # The minimum creation date to filter by
110
115
  created_after: nil,
111
116
  # The maximum creation date to filter by
@@ -124,6 +129,8 @@ module WhopSDK
124
129
  promo_code_ids: nil,
125
130
  # The membership status to filter the memberships by
126
131
  statuses: nil,
132
+ # Only return memberships from these whop user ids
133
+ user_ids: nil,
127
134
  request_options: {}
128
135
  )
129
136
  end
@@ -131,7 +138,6 @@ module WhopSDK
131
138
  sig do
132
139
  override.returns(
133
140
  {
134
- company_id: String,
135
141
  access_pass_ids: T.nilable(T::Array[String]),
136
142
  after: T.nilable(String),
137
143
  before: T.nilable(String),
@@ -139,6 +145,7 @@ module WhopSDK
139
145
  T.nilable(
140
146
  T::Array[WhopSDK::MembershipListParams::CancelOption::OrSymbol]
141
147
  ),
148
+ company_id: T.nilable(String),
142
149
  created_after: T.nilable(Time),
143
150
  created_before: T.nilable(Time),
144
151
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
@@ -148,6 +155,7 @@ module WhopSDK
148
155
  plan_ids: T.nilable(T::Array[String]),
149
156
  promo_code_ids: T.nilable(T::Array[String]),
150
157
  statuses: T.nilable(T::Array[WhopSDK::MembershipStatus::OrSymbol]),
158
+ user_ids: T.nilable(T::Array[String]),
151
159
  request_options: WhopSDK::RequestOptions
152
160
  }
153
161
  )
@@ -87,6 +87,17 @@ module WhopSDK
87
87
  end
88
88
  attr_writer :plan
89
89
 
90
+ # The Product this Membership grants access to.
91
+ sig { returns(WhopSDK::Models::MembershipListResponse::Product) }
92
+ attr_reader :product
93
+
94
+ sig do
95
+ params(
96
+ product: WhopSDK::Models::MembershipListResponse::Product::OrHash
97
+ ).void
98
+ end
99
+ attr_writer :product
100
+
90
101
  # The Promo Code that is currently applied to this Membership.
91
102
  sig do
92
103
  returns(T.nilable(WhopSDK::Models::MembershipListResponse::PromoCode))
@@ -150,6 +161,7 @@ module WhopSDK
150
161
  metadata: T::Hash[Symbol, T.anything],
151
162
  payment_collection_paused: T::Boolean,
152
163
  plan: WhopSDK::Models::MembershipListResponse::Plan::OrHash,
164
+ product: WhopSDK::Models::MembershipListResponse::Product::OrHash,
153
165
  promo_code:
154
166
  T.nilable(
155
167
  WhopSDK::Models::MembershipListResponse::PromoCode::OrHash
@@ -190,6 +202,8 @@ module WhopSDK
190
202
  payment_collection_paused:,
191
203
  # The Plan this Membership is for.
192
204
  plan:,
205
+ # The Product this Membership grants access to.
206
+ product:,
193
207
  # The Promo Code that is currently applied to this Membership.
194
208
  promo_code:,
195
209
  # The timestamp in seconds at which the current billing cycle for this
@@ -223,6 +237,7 @@ module WhopSDK
223
237
  metadata: T::Hash[Symbol, T.anything],
224
238
  payment_collection_paused: T::Boolean,
225
239
  plan: WhopSDK::Models::MembershipListResponse::Plan,
240
+ product: WhopSDK::Models::MembershipListResponse::Product,
226
241
  promo_code:
227
242
  T.nilable(WhopSDK::Models::MembershipListResponse::PromoCode),
228
243
  renewal_period_end: T.nilable(Time),
@@ -320,6 +335,38 @@ module WhopSDK
320
335
  end
321
336
  end
322
337
 
338
+ class Product < WhopSDK::Internal::Type::BaseModel
339
+ OrHash =
340
+ T.type_alias do
341
+ T.any(
342
+ WhopSDK::Models::MembershipListResponse::Product,
343
+ WhopSDK::Internal::AnyHash
344
+ )
345
+ end
346
+
347
+ # The internal ID of the public product.
348
+ sig { returns(String) }
349
+ attr_accessor :id
350
+
351
+ # The title of the product. Use for Whop 4.0.
352
+ sig { returns(String) }
353
+ attr_accessor :title
354
+
355
+ # The Product this Membership grants access to.
356
+ sig { params(id: String, title: String).returns(T.attached_class) }
357
+ def self.new(
358
+ # The internal ID of the public product.
359
+ id:,
360
+ # The title of the product. Use for Whop 4.0.
361
+ title:
362
+ )
363
+ end
364
+
365
+ sig { override.returns({ id: String, title: String }) }
366
+ def to_hash
367
+ end
368
+ end
369
+
323
370
  class PromoCode < WhopSDK::Internal::Type::BaseModel
324
371
  OrHash =
325
372
  T.type_alias do
@@ -21,7 +21,16 @@ module WhopSDK
21
21
 
22
22
  # The attachments for this message, such as videos or images.
23
23
  sig do
24
- returns(T.nilable(T::Array[WhopSDK::MessageCreateParams::Attachment]))
24
+ returns(
25
+ T.nilable(
26
+ T::Array[
27
+ T.any(
28
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
29
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID
30
+ )
31
+ ]
32
+ )
33
+ )
25
34
  end
26
35
  attr_accessor :attachments
27
36
 
@@ -40,7 +49,12 @@ module WhopSDK
40
49
  content: String,
41
50
  attachments:
42
51
  T.nilable(
43
- T::Array[WhopSDK::MessageCreateParams::Attachment::OrHash]
52
+ T::Array[
53
+ T.any(
54
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
55
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID::OrHash
56
+ )
57
+ ]
44
58
  ),
45
59
  poll: T.nilable(WhopSDK::MessageCreateParams::Poll::OrHash),
46
60
  request_options: WhopSDK::RequestOptions::OrHash
@@ -65,7 +79,14 @@ module WhopSDK
65
79
  channel_id: String,
66
80
  content: String,
67
81
  attachments:
68
- T.nilable(T::Array[WhopSDK::MessageCreateParams::Attachment]),
82
+ T.nilable(
83
+ T::Array[
84
+ T.any(
85
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
86
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID
87
+ )
88
+ ]
89
+ ),
69
90
  poll: T.nilable(WhopSDK::MessageCreateParams::Poll),
70
91
  request_options: WhopSDK::RequestOptions
71
92
  }
@@ -74,52 +95,84 @@ module WhopSDK
74
95
  def to_hash
75
96
  end
76
97
 
77
- class Attachment < WhopSDK::Internal::Type::BaseModel
78
- OrHash =
98
+ # Input for an attachment
99
+ module Attachment
100
+ extend WhopSDK::Internal::Type::Union
101
+
102
+ Variants =
79
103
  T.type_alias do
80
104
  T.any(
81
- WhopSDK::MessageCreateParams::Attachment,
82
- WhopSDK::Internal::AnyHash
105
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
106
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID
83
107
  )
84
108
  end
85
109
 
86
- # The ID of an existing attachment object. Use this when updating a resource and
87
- # keeping a subset of the attachments. Don't use this unless you know what you're
88
- # doing.
89
- sig { returns(T.nilable(String)) }
90
- attr_accessor :id
110
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
111
+ OrHash =
112
+ T.type_alias do
113
+ T.any(
114
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
115
+ WhopSDK::Internal::AnyHash
116
+ )
117
+ end
91
118
 
92
- # This ID should be used the first time you upload an attachment. It is the ID of
93
- # the direct upload that was created when uploading the file to S3 via the
94
- # mediaDirectUpload mutation.
95
- sig { returns(T.nilable(String)) }
96
- attr_accessor :direct_upload_id
119
+ # This ID should be used the first time you upload an attachment. It is the ID of
120
+ # the direct upload that was created when uploading the file to S3 via the
121
+ # mediaDirectUpload mutation.
122
+ sig { returns(String) }
123
+ attr_accessor :direct_upload_id
97
124
 
98
- # Input for an attachment
99
- sig do
100
- params(
101
- id: T.nilable(String),
102
- direct_upload_id: T.nilable(String)
103
- ).returns(T.attached_class)
125
+ # Input for an attachment
126
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
127
+ def self.new(
128
+ # This ID should be used the first time you upload an attachment. It is the ID of
129
+ # the direct upload that was created when uploading the file to S3 via the
130
+ # mediaDirectUpload mutation.
131
+ direct_upload_id:
132
+ )
133
+ end
134
+
135
+ sig { override.returns({ direct_upload_id: String }) }
136
+ def to_hash
137
+ end
104
138
  end
105
- def self.new(
139
+
140
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
141
+ OrHash =
142
+ T.type_alias do
143
+ T.any(
144
+ WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID,
145
+ WhopSDK::Internal::AnyHash
146
+ )
147
+ end
148
+
106
149
  # The ID of an existing attachment object. Use this when updating a resource and
107
150
  # keeping a subset of the attachments. Don't use this unless you know what you're
108
151
  # doing.
109
- id: nil,
110
- # This ID should be used the first time you upload an attachment. It is the ID of
111
- # the direct upload that was created when uploading the file to S3 via the
112
- # mediaDirectUpload mutation.
113
- direct_upload_id: nil
114
- )
152
+ sig { returns(String) }
153
+ attr_accessor :id
154
+
155
+ # Input for an attachment
156
+ sig { params(id: String).returns(T.attached_class) }
157
+ def self.new(
158
+ # The ID of an existing attachment object. Use this when updating a resource and
159
+ # keeping a subset of the attachments. Don't use this unless you know what you're
160
+ # doing.
161
+ id:
162
+ )
163
+ end
164
+
165
+ sig { override.returns({ id: String }) }
166
+ def to_hash
167
+ end
115
168
  end
116
169
 
117
170
  sig do
118
171
  override.returns(
119
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
172
+ T::Array[WhopSDK::MessageCreateParams::Attachment::Variants]
120
173
  )
121
174
  end
122
- def to_hash
175
+ def self.variants
123
176
  end
124
177
  end
125
178
 
@@ -0,0 +1,167 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class MessageUpdateParams < 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::MessageUpdateParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # The attachments for this message
15
+ sig do
16
+ returns(
17
+ T.nilable(
18
+ T::Array[
19
+ T.any(
20
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
21
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID
22
+ )
23
+ ]
24
+ )
25
+ )
26
+ end
27
+ attr_accessor :attachments
28
+
29
+ # The content of the message in Markdown format
30
+ sig { returns(T.nilable(String)) }
31
+ attr_accessor :content
32
+
33
+ # Whether this message is pinned
34
+ sig { returns(T.nilable(T::Boolean)) }
35
+ attr_accessor :is_pinned
36
+
37
+ sig do
38
+ params(
39
+ attachments:
40
+ T.nilable(
41
+ T::Array[
42
+ T.any(
43
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
44
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID::OrHash
45
+ )
46
+ ]
47
+ ),
48
+ content: T.nilable(String),
49
+ is_pinned: T.nilable(T::Boolean),
50
+ request_options: WhopSDK::RequestOptions::OrHash
51
+ ).returns(T.attached_class)
52
+ end
53
+ def self.new(
54
+ # The attachments for this message
55
+ attachments: nil,
56
+ # The content of the message in Markdown format
57
+ content: nil,
58
+ # Whether this message is pinned
59
+ is_pinned: nil,
60
+ request_options: {}
61
+ )
62
+ end
63
+
64
+ sig do
65
+ override.returns(
66
+ {
67
+ attachments:
68
+ T.nilable(
69
+ T::Array[
70
+ T.any(
71
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
72
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID
73
+ )
74
+ ]
75
+ ),
76
+ content: T.nilable(String),
77
+ is_pinned: T.nilable(T::Boolean),
78
+ request_options: WhopSDK::RequestOptions
79
+ }
80
+ )
81
+ end
82
+ def to_hash
83
+ end
84
+
85
+ # Input for an attachment
86
+ module Attachment
87
+ extend WhopSDK::Internal::Type::Union
88
+
89
+ Variants =
90
+ T.type_alias do
91
+ T.any(
92
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
93
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID
94
+ )
95
+ end
96
+
97
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
98
+ OrHash =
99
+ T.type_alias do
100
+ T.any(
101
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
102
+ WhopSDK::Internal::AnyHash
103
+ )
104
+ end
105
+
106
+ # This ID should be used the first time you upload an attachment. It is the ID of
107
+ # the direct upload that was created when uploading the file to S3 via the
108
+ # mediaDirectUpload mutation.
109
+ sig { returns(String) }
110
+ attr_accessor :direct_upload_id
111
+
112
+ # Input for an attachment
113
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
114
+ def self.new(
115
+ # This ID should be used the first time you upload an attachment. It is the ID of
116
+ # the direct upload that was created when uploading the file to S3 via the
117
+ # mediaDirectUpload mutation.
118
+ direct_upload_id:
119
+ )
120
+ end
121
+
122
+ sig { override.returns({ direct_upload_id: String }) }
123
+ def to_hash
124
+ end
125
+ end
126
+
127
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
128
+ OrHash =
129
+ T.type_alias do
130
+ T.any(
131
+ WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID,
132
+ WhopSDK::Internal::AnyHash
133
+ )
134
+ end
135
+
136
+ # The ID of an existing attachment object. Use this when updating a resource and
137
+ # keeping a subset of the attachments. Don't use this unless you know what you're
138
+ # doing.
139
+ sig { returns(String) }
140
+ attr_accessor :id
141
+
142
+ # Input for an attachment
143
+ sig { params(id: String).returns(T.attached_class) }
144
+ def self.new(
145
+ # The ID of an existing attachment object. Use this when updating a resource and
146
+ # keeping a subset of the attachments. Don't use this unless you know what you're
147
+ # doing.
148
+ id:
149
+ )
150
+ end
151
+
152
+ sig { override.returns({ id: String }) }
153
+ def to_hash
154
+ end
155
+ end
156
+
157
+ sig do
158
+ override.returns(
159
+ T::Array[WhopSDK::MessageUpdateParams::Attachment::Variants]
160
+ )
161
+ end
162
+ def self.variants
163
+ end
164
+ end
165
+ end
166
+ end
167
+ end
@@ -29,12 +29,12 @@ module WhopSDK
29
29
  end
30
30
  attr_writer :billing_address
31
31
 
32
- # The billing reason
33
- sig { returns(T.nilable(String)) }
32
+ # The reason why a specific payment was billed
33
+ sig { returns(T.nilable(WhopSDK::BillingReasons::TaggedSymbol)) }
34
34
  attr_accessor :billing_reason
35
35
 
36
- # The type of card used as the payment method.
37
- sig { returns(T.nilable(String)) }
36
+ # Possible card brands that a payment token can have
37
+ sig { returns(T.nilable(WhopSDK::CardBrands::TaggedSymbol)) }
38
38
  attr_accessor :card_brand
39
39
 
40
40
  # The last 4 digits of the card used to make the payment.
@@ -84,13 +84,17 @@ module WhopSDK
84
84
  end
85
85
  attr_writer :membership
86
86
 
87
+ # The custom metadata stored on this payment. This will be copied the checkout
88
+ # configuration for which this payment was made
89
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
90
+ attr_accessor :metadata
91
+
87
92
  # The datetime the payment was paid
88
93
  sig { returns(T.nilable(Time)) }
89
94
  attr_accessor :paid_at
90
95
 
91
- # Returns the type of payment method used for the payment, if available. Ex.
92
- # klarna, affirm, card, cashapp
93
- sig { returns(T.nilable(String)) }
96
+ # The different types of payment methods that can be used.
97
+ sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) }
94
98
  attr_accessor :payment_method_type
95
99
 
96
100
  # The plan attached to this payment.
@@ -116,7 +120,8 @@ module WhopSDK
116
120
  end
117
121
  attr_writer :promo_code
118
122
 
119
- # Whether the payment can be refunded.
123
+ # True only for payments that are `paid`, have not been fully refunded, and were
124
+ # processed by a payment processor that allows refunds.
120
125
  sig { returns(T::Boolean) }
121
126
  attr_accessor :refundable
122
127
 
@@ -128,7 +133,9 @@ module WhopSDK
128
133
  sig { returns(T.nilable(Time)) }
129
134
  attr_accessor :refunded_at
130
135
 
131
- # Whether the payment can be retried.
136
+ # True when the payment status is `open` and its membership is in one of the
137
+ # retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
138
+ # otherwise false. Used to decide if Whop can attempt the charge again.
132
139
  sig { returns(T::Boolean) }
133
140
  attr_accessor :retryable
134
141
 
@@ -159,7 +166,8 @@ module WhopSDK
159
166
  sig { params(user: T.nilable(WhopSDK::Payment::User::OrHash)).void }
160
167
  attr_writer :user
161
168
 
162
- # Whether the payment can be voided.
169
+ # True when the payment is tied to a membership in `past_due`, the payment status
170
+ # is `open`, and the processor allows voiding payments; otherwise false.
163
171
  sig { returns(T::Boolean) }
164
172
  attr_accessor :voidable
165
173
 
@@ -170,8 +178,8 @@ module WhopSDK
170
178
  amount_after_fees: Float,
171
179
  auto_refunded: T::Boolean,
172
180
  billing_address: T.nilable(WhopSDK::Payment::BillingAddress::OrHash),
173
- billing_reason: T.nilable(String),
174
- card_brand: T.nilable(String),
181
+ billing_reason: T.nilable(WhopSDK::BillingReasons::OrSymbol),
182
+ card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
175
183
  card_last4: T.nilable(String),
176
184
  company: T.nilable(WhopSDK::Payment::Company::OrHash),
177
185
  created_at: Time,
@@ -181,8 +189,9 @@ module WhopSDK
181
189
  last_payment_attempt: T.nilable(Time),
182
190
  member: T.nilable(WhopSDK::Payment::Member::OrHash),
183
191
  membership: T.nilable(WhopSDK::Payment::Membership::OrHash),
192
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
184
193
  paid_at: T.nilable(Time),
185
- payment_method_type: T.nilable(String),
194
+ payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
186
195
  plan: T.nilable(WhopSDK::Payment::Plan::OrHash),
187
196
  product: T.nilable(WhopSDK::Payment::Product::OrHash),
188
197
  promo_code: T.nilable(WhopSDK::Payment::PromoCode::OrHash),
@@ -208,9 +217,9 @@ module WhopSDK
208
217
  auto_refunded:,
209
218
  # The address of the user who made the payment.
210
219
  billing_address:,
211
- # The billing reason
220
+ # The reason why a specific payment was billed
212
221
  billing_reason:,
213
- # The type of card used as the payment method.
222
+ # Possible card brands that a payment token can have
214
223
  card_brand:,
215
224
  # The last 4 digits of the card used to make the payment.
216
225
  card_last4:,
@@ -230,10 +239,12 @@ module WhopSDK
230
239
  member:,
231
240
  # The membership attached to this payment.
232
241
  membership:,
242
+ # The custom metadata stored on this payment. This will be copied the checkout
243
+ # configuration for which this payment was made
244
+ metadata:,
233
245
  # The datetime the payment was paid
234
246
  paid_at:,
235
- # Returns the type of payment method used for the payment, if available. Ex.
236
- # klarna, affirm, card, cashapp
247
+ # The different types of payment methods that can be used.
237
248
  payment_method_type:,
238
249
  # The plan attached to this payment.
239
250
  plan:,
@@ -241,13 +252,16 @@ module WhopSDK
241
252
  product:,
242
253
  # The promo code used for this payment.
243
254
  promo_code:,
244
- # Whether the payment can be refunded.
255
+ # True only for payments that are `paid`, have not been fully refunded, and were
256
+ # processed by a payment processor that allows refunds.
245
257
  refundable:,
246
258
  # The payment refund amount(if applicable).
247
259
  refunded_amount:,
248
260
  # When the payment was refunded (if applicable).
249
261
  refunded_at:,
250
- # Whether the payment can be retried.
262
+ # True when the payment status is `open` and its membership is in one of the
263
+ # retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
264
+ # otherwise false. Used to decide if Whop can attempt the charge again.
251
265
  retryable:,
252
266
  # The status of a receipt
253
267
  status:,
@@ -261,7 +275,8 @@ module WhopSDK
261
275
  usd_total:,
262
276
  # The user that made this payment.
263
277
  user:,
264
- # Whether the payment can be voided.
278
+ # True when the payment is tied to a membership in `past_due`, the payment status
279
+ # is `open`, and the processor allows voiding payments; otherwise false.
265
280
  voidable:
266
281
  )
267
282
  end
@@ -273,8 +288,8 @@ module WhopSDK
273
288
  amount_after_fees: Float,
274
289
  auto_refunded: T::Boolean,
275
290
  billing_address: T.nilable(WhopSDK::Payment::BillingAddress),
276
- billing_reason: T.nilable(String),
277
- card_brand: T.nilable(String),
291
+ billing_reason: T.nilable(WhopSDK::BillingReasons::TaggedSymbol),
292
+ card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol),
278
293
  card_last4: T.nilable(String),
279
294
  company: T.nilable(WhopSDK::Payment::Company),
280
295
  created_at: Time,
@@ -284,8 +299,10 @@ module WhopSDK
284
299
  last_payment_attempt: T.nilable(Time),
285
300
  member: T.nilable(WhopSDK::Payment::Member),
286
301
  membership: T.nilable(WhopSDK::Payment::Membership),
302
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
287
303
  paid_at: T.nilable(Time),
288
- payment_method_type: T.nilable(String),
304
+ payment_method_type:
305
+ T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
289
306
  plan: T.nilable(WhopSDK::Payment::Plan),
290
307
  product: T.nilable(WhopSDK::Payment::Product),
291
308
  promo_code: T.nilable(WhopSDK::Payment::PromoCode),
@@ -579,7 +596,7 @@ module WhopSDK
579
596
  sig { returns(T.nilable(String)) }
580
597
  attr_accessor :code
581
598
 
582
- # The number of billing cycles the promo is applied for.
599
+ # The number of months the promo is applied for.
583
600
  sig { returns(T.nilable(Integer)) }
584
601
  attr_accessor :number_of_intervals
585
602
 
@@ -607,7 +624,7 @@ module WhopSDK
607
624
  base_currency:,
608
625
  # The specific code used to apply the promo at checkout.
609
626
  code:,
610
- # The number of billing cycles the promo is applied for.
627
+ # The number of months the promo is applied for.
611
628
  number_of_intervals:,
612
629
  # The type (% or flat amount) of the promo.
613
630
  promo_type: