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
@@ -22,9 +22,9 @@ module WhopSDK
22
22
  # @!attribute attachments
23
23
  # The attachments for this message, such as videos or images.
24
24
  #
25
- # @return [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil]
25
+ # @return [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil]
26
26
  optional :attachments,
27
- -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::MessageCreateParams::Attachment] },
27
+ -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageCreateParams::Attachment] },
28
28
  nil?: true
29
29
 
30
30
  # @!attribute poll
@@ -38,38 +38,62 @@ module WhopSDK
38
38
  #
39
39
  # @param content [String] The content of the message in Markdown format.
40
40
  #
41
- # @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil] The attachments for this message, such as videos or images.
41
+ # @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message, such as videos or images.
42
42
  #
43
43
  # @param poll [WhopSDK::Models::MessageCreateParams::Poll, nil] The poll for this message
44
44
  #
45
45
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
46
46
 
47
- class Attachment < WhopSDK::Internal::Type::BaseModel
48
- # @!attribute id
49
- # The ID of an existing attachment object. Use this when updating a resource and
50
- # keeping a subset of the attachments. Don't use this unless you know what you're
51
- # doing.
52
- #
53
- # @return [String, nil]
54
- optional :id, String, nil?: true
47
+ # Input for an attachment
48
+ module Attachment
49
+ extend WhopSDK::Internal::Type::Union
55
50
 
56
- # @!attribute direct_upload_id
57
- # This ID should be used the first time you upload an attachment. It is the ID of
58
- # the direct upload that was created when uploading the file to S3 via the
59
- # mediaDirectUpload mutation.
60
- #
61
- # @return [String, nil]
62
- optional :direct_upload_id, String, nil?: true
51
+ # Input for an attachment
52
+ variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID }
63
53
 
64
- # @!method initialize(id: nil, direct_upload_id: nil)
65
- # Some parameter documentations has been truncated, see
66
- # {WhopSDK::Models::MessageCreateParams::Attachment} for more details.
67
- #
68
- # Input for an attachment
69
- #
70
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
71
- #
72
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
54
+ # Input for an attachment
55
+ variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID }
56
+
57
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
58
+ # @!attribute direct_upload_id
59
+ # This ID should be used the first time you upload an attachment. It is the ID of
60
+ # the direct upload that was created when uploading the file to S3 via the
61
+ # mediaDirectUpload mutation.
62
+ #
63
+ # @return [String]
64
+ required :direct_upload_id, String
65
+
66
+ # @!method initialize(direct_upload_id:)
67
+ # Some parameter documentations has been truncated, see
68
+ # {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID}
69
+ # for more details.
70
+ #
71
+ # Input for an attachment
72
+ #
73
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
74
+ end
75
+
76
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
77
+ # @!attribute id
78
+ # The ID of an existing attachment object. Use this when updating a resource and
79
+ # keeping a subset of the attachments. Don't use this unless you know what you're
80
+ # doing.
81
+ #
82
+ # @return [String]
83
+ required :id, String
84
+
85
+ # @!method initialize(id:)
86
+ # Some parameter documentations has been truncated, see
87
+ # {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID} for
88
+ # more details.
89
+ #
90
+ # Input for an attachment
91
+ #
92
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
93
+ end
94
+
95
+ # @!method self.variants
96
+ # @return [Array(WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID)]
73
97
  end
74
98
 
75
99
  class Poll < WhopSDK::Internal::Type::BaseModel
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Messages#update
6
+ class MessageUpdateParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute attachments
11
+ # The attachments for this message
12
+ #
13
+ # @return [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil]
14
+ optional :attachments,
15
+ -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageUpdateParams::Attachment] },
16
+ nil?: true
17
+
18
+ # @!attribute content
19
+ # The content of the message in Markdown format
20
+ #
21
+ # @return [String, nil]
22
+ optional :content, String, nil?: true
23
+
24
+ # @!attribute is_pinned
25
+ # Whether this message is pinned
26
+ #
27
+ # @return [Boolean, nil]
28
+ optional :is_pinned, WhopSDK::Internal::Type::Boolean, nil?: true
29
+
30
+ # @!method initialize(attachments: nil, content: nil, is_pinned: nil, request_options: {})
31
+ # @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message
32
+ #
33
+ # @param content [String, nil] The content of the message in Markdown format
34
+ #
35
+ # @param is_pinned [Boolean, nil] Whether this message is pinned
36
+ #
37
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
38
+
39
+ # Input for an attachment
40
+ module Attachment
41
+ extend WhopSDK::Internal::Type::Union
42
+
43
+ # Input for an attachment
44
+ variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID }
45
+
46
+ # Input for an attachment
47
+ variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID }
48
+
49
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
50
+ # @!attribute direct_upload_id
51
+ # This ID should be used the first time you upload an attachment. It is the ID of
52
+ # the direct upload that was created when uploading the file to S3 via the
53
+ # mediaDirectUpload mutation.
54
+ #
55
+ # @return [String]
56
+ required :direct_upload_id, String
57
+
58
+ # @!method initialize(direct_upload_id:)
59
+ # Some parameter documentations has been truncated, see
60
+ # {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID}
61
+ # for more details.
62
+ #
63
+ # Input for an attachment
64
+ #
65
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
66
+ end
67
+
68
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
69
+ # @!attribute id
70
+ # The ID of an existing attachment object. Use this when updating a resource and
71
+ # keeping a subset of the attachments. Don't use this unless you know what you're
72
+ # doing.
73
+ #
74
+ # @return [String]
75
+ required :id, String
76
+
77
+ # @!method initialize(id:)
78
+ # Some parameter documentations has been truncated, see
79
+ # {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID} for
80
+ # more details.
81
+ #
82
+ # Input for an attachment
83
+ #
84
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
85
+ end
86
+
87
+ # @!method self.variants
88
+ # @return [Array(WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID)]
89
+ end
90
+ end
91
+ end
92
+ end
@@ -28,16 +28,16 @@ module WhopSDK
28
28
  required :billing_address, -> { WhopSDK::Payment::BillingAddress }, nil?: true
29
29
 
30
30
  # @!attribute billing_reason
31
- # The billing reason
31
+ # The reason why a specific payment was billed
32
32
  #
33
- # @return [String, nil]
34
- required :billing_reason, String, nil?: true
33
+ # @return [Symbol, WhopSDK::Models::BillingReasons, nil]
34
+ required :billing_reason, enum: -> { WhopSDK::BillingReasons }, nil?: true
35
35
 
36
36
  # @!attribute card_brand
37
- # The type of card used as the payment method.
37
+ # Possible card brands that a payment token can have
38
38
  #
39
- # @return [String, nil]
40
- required :card_brand, String, nil?: true
39
+ # @return [Symbol, WhopSDK::Models::CardBrands, nil]
40
+ required :card_brand, enum: -> { WhopSDK::CardBrands }, nil?: true
41
41
 
42
42
  # @!attribute card_last4
43
43
  # The last 4 digits of the card used to make the payment.
@@ -93,6 +93,13 @@ module WhopSDK
93
93
  # @return [WhopSDK::Models::Payment::Membership, nil]
94
94
  required :membership, -> { WhopSDK::Payment::Membership }, nil?: true
95
95
 
96
+ # @!attribute metadata
97
+ # The custom metadata stored on this payment. This will be copied the checkout
98
+ # configuration for which this payment was made
99
+ #
100
+ # @return [Hash{Symbol=>Object}, nil]
101
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
102
+
96
103
  # @!attribute paid_at
97
104
  # The datetime the payment was paid
98
105
  #
@@ -100,11 +107,10 @@ module WhopSDK
100
107
  required :paid_at, Time, nil?: true
101
108
 
102
109
  # @!attribute payment_method_type
103
- # Returns the type of payment method used for the payment, if available. Ex.
104
- # klarna, affirm, card, cashapp
110
+ # The different types of payment methods that can be used.
105
111
  #
106
- # @return [String, nil]
107
- required :payment_method_type, String, nil?: true
112
+ # @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil]
113
+ required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true
108
114
 
109
115
  # @!attribute plan
110
116
  # The plan attached to this payment.
@@ -125,7 +131,8 @@ module WhopSDK
125
131
  required :promo_code, -> { WhopSDK::Payment::PromoCode }, nil?: true
126
132
 
127
133
  # @!attribute refundable
128
- # Whether the payment can be refunded.
134
+ # True only for payments that are `paid`, have not been fully refunded, and were
135
+ # processed by a payment processor that allows refunds.
129
136
  #
130
137
  # @return [Boolean]
131
138
  required :refundable, WhopSDK::Internal::Type::Boolean
@@ -143,7 +150,9 @@ module WhopSDK
143
150
  required :refunded_at, Time, nil?: true
144
151
 
145
152
  # @!attribute retryable
146
- # Whether the payment can be retried.
153
+ # True when the payment status is `open` and its membership is in one of the
154
+ # retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
155
+ # otherwise false. Used to decide if Whop can attempt the charge again.
147
156
  #
148
157
  # @return [Boolean]
149
158
  required :retryable, WhopSDK::Internal::Type::Boolean
@@ -185,12 +194,13 @@ module WhopSDK
185
194
  required :user, -> { WhopSDK::Payment::User }, nil?: true
186
195
 
187
196
  # @!attribute voidable
188
- # Whether the payment can be voided.
197
+ # True when the payment is tied to a membership in `past_due`, the payment status
198
+ # is `open`, and the processor allows voiding payments; otherwise false.
189
199
  #
190
200
  # @return [Boolean]
191
201
  required :voidable, WhopSDK::Internal::Type::Boolean
192
202
 
193
- # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
203
+ # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
194
204
  # Some parameter documentations has been truncated, see {WhopSDK::Models::Payment}
195
205
  # for more details.
196
206
  #
@@ -204,9 +214,9 @@ module WhopSDK
204
214
  #
205
215
  # @param billing_address [WhopSDK::Models::Payment::BillingAddress, nil] The address of the user who made the payment.
206
216
  #
207
- # @param billing_reason [String, nil] The billing reason
217
+ # @param billing_reason [Symbol, WhopSDK::Models::BillingReasons, nil] The reason why a specific payment was billed
208
218
  #
209
- # @param card_brand [String, nil] The type of card used as the payment method.
219
+ # @param card_brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
210
220
  #
211
221
  # @param card_last4 [String, nil] The last 4 digits of the card used to make the payment.
212
222
  #
@@ -226,9 +236,11 @@ module WhopSDK
226
236
  #
227
237
  # @param membership [WhopSDK::Models::Payment::Membership, nil] The membership attached to this payment.
228
238
  #
239
+ # @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied the checkout con
240
+ #
229
241
  # @param paid_at [Time, nil] The datetime the payment was paid
230
242
  #
231
- # @param payment_method_type [String, nil] Returns the type of payment method used for the payment, if available. Ex. klarn
243
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
232
244
  #
233
245
  # @param plan [WhopSDK::Models::Payment::Plan, nil] The plan attached to this payment.
234
246
  #
@@ -236,13 +248,13 @@ module WhopSDK
236
248
  #
237
249
  # @param promo_code [WhopSDK::Models::Payment::PromoCode, nil] The promo code used for this payment.
238
250
  #
239
- # @param refundable [Boolean] Whether the payment can be refunded.
251
+ # @param refundable [Boolean] True only for payments that are `paid`, have not been fully refunded, and were p
240
252
  #
241
253
  # @param refunded_amount [Float, nil] The payment refund amount(if applicable).
242
254
  #
243
255
  # @param refunded_at [Time, nil] When the payment was refunded (if applicable).
244
256
  #
245
- # @param retryable [Boolean] Whether the payment can be retried.
257
+ # @param retryable [Boolean] True when the payment status is `open` and its membership is in one of the retry
246
258
  #
247
259
  # @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt
248
260
  #
@@ -256,7 +268,7 @@ module WhopSDK
256
268
  #
257
269
  # @param user [WhopSDK::Models::Payment::User, nil] The user that made this payment.
258
270
  #
259
- # @param voidable [Boolean] Whether the payment can be voided.
271
+ # @param voidable [Boolean] True when the payment is tied to a membership in `past_due`, the payment status
260
272
 
261
273
  # @see WhopSDK::Models::Payment#billing_address
262
274
  class BillingAddress < WhopSDK::Internal::Type::BaseModel
@@ -465,7 +477,7 @@ module WhopSDK
465
477
  required :code, String, nil?: true
466
478
 
467
479
  # @!attribute number_of_intervals
468
- # The number of billing cycles the promo is applied for.
480
+ # The number of months the promo is applied for.
469
481
  #
470
482
  # @return [Integer, nil]
471
483
  required :number_of_intervals, Integer, nil?: true
@@ -487,7 +499,7 @@ module WhopSDK
487
499
  #
488
500
  # @param code [String, nil] The specific code used to apply the promo at checkout.
489
501
  #
490
- # @param number_of_intervals [Integer, nil] The number of billing cycles the promo is applied for.
502
+ # @param number_of_intervals [Integer, nil] The number of months the promo is applied for.
491
503
  #
492
504
  # @param promo_type [Symbol, WhopSDK::Models::PromoType] The type (% or flat amount) of the promo.
493
505
  end
@@ -28,9 +28,9 @@ module WhopSDK
28
28
  # @!attribute billing_reasons
29
29
  # The billing reason for the payment
30
30
  #
31
- # @return [Array<Symbol, WhopSDK::Models::PaymentListParams::BillingReason>, nil]
31
+ # @return [Array<Symbol, WhopSDK::Models::BillingReasons>, nil]
32
32
  optional :billing_reasons,
33
- -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentListParams::BillingReason] },
33
+ -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::BillingReasons] },
34
34
  nil?: true
35
35
 
36
36
  # @!attribute created_after
@@ -114,7 +114,7 @@ module WhopSDK
114
114
  #
115
115
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
116
116
  #
117
- # @param billing_reasons [Array<Symbol, WhopSDK::Models::PaymentListParams::BillingReason>, nil] The billing reason for the payment
117
+ # @param billing_reasons [Array<Symbol, WhopSDK::Models::BillingReasons>, nil] The billing reason for the payment
118
118
  #
119
119
  # @param created_after [Time, nil] The minimum creation date to filter by
120
120
  #
@@ -142,21 +142,6 @@ module WhopSDK
142
142
  #
143
143
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
144
144
 
145
- # The reason why a specific payment was billed
146
- module BillingReason
147
- extend WhopSDK::Internal::Type::Enum
148
-
149
- SUBSCRIPTION_CREATE = :subscription_create
150
- SUBSCRIPTION_CYCLE = :subscription_cycle
151
- SUBSCRIPTION_UPDATE = :subscription_update
152
- ONE_TIME = :one_time
153
- MANUAL = :manual
154
- SUBSCRIPTION = :subscription
155
-
156
- # @!method self.values
157
- # @return [Array<Symbol>]
158
- end
159
-
160
145
  # The order to sort the results by.
161
146
  module Order
162
147
  extend WhopSDK::Internal::Type::Enum
@@ -29,16 +29,16 @@ module WhopSDK
29
29
  required :billing_address, -> { WhopSDK::Models::PaymentListResponse::BillingAddress }, nil?: true
30
30
 
31
31
  # @!attribute billing_reason
32
- # The billing reason
32
+ # The reason why a specific payment was billed
33
33
  #
34
- # @return [String, nil]
35
- required :billing_reason, String, nil?: true
34
+ # @return [Symbol, WhopSDK::Models::BillingReasons, nil]
35
+ required :billing_reason, enum: -> { WhopSDK::BillingReasons }, nil?: true
36
36
 
37
37
  # @!attribute card_brand
38
- # The type of card used as the payment method.
38
+ # Possible card brands that a payment token can have
39
39
  #
40
- # @return [String, nil]
41
- required :card_brand, String, nil?: true
40
+ # @return [Symbol, WhopSDK::Models::CardBrands, nil]
41
+ required :card_brand, enum: -> { WhopSDK::CardBrands }, nil?: true
42
42
 
43
43
  # @!attribute card_last4
44
44
  # The last 4 digits of the card used to make the payment.
@@ -94,6 +94,13 @@ module WhopSDK
94
94
  # @return [WhopSDK::Models::PaymentListResponse::Membership, nil]
95
95
  required :membership, -> { WhopSDK::Models::PaymentListResponse::Membership }, nil?: true
96
96
 
97
+ # @!attribute metadata
98
+ # The custom metadata stored on this payment. This will be copied the checkout
99
+ # configuration for which this payment was made
100
+ #
101
+ # @return [Hash{Symbol=>Object}, nil]
102
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
103
+
97
104
  # @!attribute paid_at
98
105
  # The datetime the payment was paid
99
106
  #
@@ -101,11 +108,10 @@ module WhopSDK
101
108
  required :paid_at, Time, nil?: true
102
109
 
103
110
  # @!attribute payment_method_type
104
- # Returns the type of payment method used for the payment, if available. Ex.
105
- # klarna, affirm, card, cashapp
111
+ # The different types of payment methods that can be used.
106
112
  #
107
- # @return [String, nil]
108
- required :payment_method_type, String, nil?: true
113
+ # @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil]
114
+ required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true
109
115
 
110
116
  # @!attribute plan
111
117
  # The plan attached to this payment.
@@ -126,7 +132,8 @@ module WhopSDK
126
132
  required :promo_code, -> { WhopSDK::Models::PaymentListResponse::PromoCode }, nil?: true
127
133
 
128
134
  # @!attribute refundable
129
- # Whether the payment can be refunded.
135
+ # True only for payments that are `paid`, have not been fully refunded, and were
136
+ # processed by a payment processor that allows refunds.
130
137
  #
131
138
  # @return [Boolean]
132
139
  required :refundable, WhopSDK::Internal::Type::Boolean
@@ -144,7 +151,9 @@ module WhopSDK
144
151
  required :refunded_at, Time, nil?: true
145
152
 
146
153
  # @!attribute retryable
147
- # Whether the payment can be retried.
154
+ # True when the payment status is `open` and its membership is in one of the
155
+ # retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
156
+ # otherwise false. Used to decide if Whop can attempt the charge again.
148
157
  #
149
158
  # @return [Boolean]
150
159
  required :retryable, WhopSDK::Internal::Type::Boolean
@@ -186,12 +195,13 @@ module WhopSDK
186
195
  required :user, -> { WhopSDK::Models::PaymentListResponse::User }, nil?: true
187
196
 
188
197
  # @!attribute voidable
189
- # Whether the payment can be voided.
198
+ # True when the payment is tied to a membership in `past_due`, the payment status
199
+ # is `open`, and the processor allows voiding payments; otherwise false.
190
200
  #
191
201
  # @return [Boolean]
192
202
  required :voidable, WhopSDK::Internal::Type::Boolean
193
203
 
194
- # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
204
+ # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
195
205
  # Some parameter documentations has been truncated, see
196
206
  # {WhopSDK::Models::PaymentListResponse} for more details.
197
207
  #
@@ -205,9 +215,9 @@ module WhopSDK
205
215
  #
206
216
  # @param billing_address [WhopSDK::Models::PaymentListResponse::BillingAddress, nil] The address of the user who made the payment.
207
217
  #
208
- # @param billing_reason [String, nil] The billing reason
218
+ # @param billing_reason [Symbol, WhopSDK::Models::BillingReasons, nil] The reason why a specific payment was billed
209
219
  #
210
- # @param card_brand [String, nil] The type of card used as the payment method.
220
+ # @param card_brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
211
221
  #
212
222
  # @param card_last4 [String, nil] The last 4 digits of the card used to make the payment.
213
223
  #
@@ -227,9 +237,11 @@ module WhopSDK
227
237
  #
228
238
  # @param membership [WhopSDK::Models::PaymentListResponse::Membership, nil] The membership attached to this payment.
229
239
  #
240
+ # @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied the checkout con
241
+ #
230
242
  # @param paid_at [Time, nil] The datetime the payment was paid
231
243
  #
232
- # @param payment_method_type [String, nil] Returns the type of payment method used for the payment, if available. Ex. klarn
244
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
233
245
  #
234
246
  # @param plan [WhopSDK::Models::PaymentListResponse::Plan, nil] The plan attached to this payment.
235
247
  #
@@ -237,13 +249,13 @@ module WhopSDK
237
249
  #
238
250
  # @param promo_code [WhopSDK::Models::PaymentListResponse::PromoCode, nil] The promo code used for this payment.
239
251
  #
240
- # @param refundable [Boolean] Whether the payment can be refunded.
252
+ # @param refundable [Boolean] True only for payments that are `paid`, have not been fully refunded, and were p
241
253
  #
242
254
  # @param refunded_amount [Float, nil] The payment refund amount(if applicable).
243
255
  #
244
256
  # @param refunded_at [Time, nil] When the payment was refunded (if applicable).
245
257
  #
246
- # @param retryable [Boolean] Whether the payment can be retried.
258
+ # @param retryable [Boolean] True when the payment status is `open` and its membership is in one of the retry
247
259
  #
248
260
  # @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt
249
261
  #
@@ -257,7 +269,7 @@ module WhopSDK
257
269
  #
258
270
  # @param user [WhopSDK::Models::PaymentListResponse::User, nil] The user that made this payment.
259
271
  #
260
- # @param voidable [Boolean] Whether the payment can be voided.
272
+ # @param voidable [Boolean] True when the payment is tied to a membership in `past_due`, the payment status
261
273
 
262
274
  # @see WhopSDK::Models::PaymentListResponse#billing_address
263
275
  class BillingAddress < WhopSDK::Internal::Type::BaseModel
@@ -466,7 +478,7 @@ module WhopSDK
466
478
  required :code, String, nil?: true
467
479
 
468
480
  # @!attribute number_of_intervals
469
- # The number of billing cycles the promo is applied for.
481
+ # The number of months the promo is applied for.
470
482
  #
471
483
  # @return [Integer, nil]
472
484
  required :number_of_intervals, Integer, nil?: true
@@ -488,7 +500,7 @@ module WhopSDK
488
500
  #
489
501
  # @param code [String, nil] The specific code used to apply the promo at checkout.
490
502
  #
491
- # @param number_of_intervals [Integer, nil] The number of billing cycles the promo is applied for.
503
+ # @param number_of_intervals [Integer, nil] The number of months the promo is applied for.
492
504
  #
493
505
  # @param promo_type [Symbol, WhopSDK::Models::PromoType] The type (% or flat amount) of the promo.
494
506
  end
@@ -0,0 +1,99 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The different types of payment methods that can be used.
6
+ module PaymentMethodTypes
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ ACSS_DEBIT = :acss_debit
10
+ AFFIRM = :affirm
11
+ AFTERPAY_CLEARPAY = :afterpay_clearpay
12
+ ALIPAY = :alipay
13
+ ALMA = :alma
14
+ AMAZON_PAY = :amazon_pay
15
+ APPLE_PAY = :apple_pay
16
+ AU_BECS_DEBIT = :au_becs_debit
17
+ BACS_DEBIT = :bacs_debit
18
+ BANCONTACT = :bancontact
19
+ BILLIE = :billie
20
+ BLIK = :blik
21
+ BOLETO = :boleto
22
+ CARD = :card
23
+ CASHAPP = :cashapp
24
+ CRYPTO = :crypto
25
+ EPS = :eps
26
+ FPX = :fpx
27
+ GIROPAY = :giropay
28
+ GOOGLE_PAY = :google_pay
29
+ GRABPAY = :grabpay
30
+ IDEAL = :ideal
31
+ KAKAO_PAY = :kakao_pay
32
+ KLARNA = :klarna
33
+ KONBINI = :konbini
34
+ KR_CARD = :kr_card
35
+ LINK = :link
36
+ MOBILEPAY = :mobilepay
37
+ MULTIBANCO = :multibanco
38
+ NAVER_PAY = :naver_pay
39
+ NZ_BANK_ACCOUNT = :nz_bank_account
40
+ OXXO = :oxxo
41
+ P24 = :p24
42
+ PAY_BY_BANK = :pay_by_bank
43
+ PAYCO = :payco
44
+ PAYNOW = :paynow
45
+ PIX = :pix
46
+ PROMPTPAY = :promptpay
47
+ REVOLUT_PAY = :revolut_pay
48
+ SAMSUNG_PAY = :samsung_pay
49
+ SATISPAY = :satispay
50
+ SEPA_DEBIT = :sepa_debit
51
+ SOFORT = :sofort
52
+ SWISH = :swish
53
+ TWINT = :twint
54
+ US_BANK_ACCOUNT = :us_bank_account
55
+ WECHAT_PAY = :wechat_pay
56
+ ZIP = :zip
57
+ BIZUM = :bizum
58
+ CAPCHASE_PAY = :capchase_pay
59
+ KRIYA = :kriya
60
+ MONDU = :mondu
61
+ NG_WALLET = :ng_wallet
62
+ PAYPAY = :paypay
63
+ SEQURA = :sequra
64
+ SCALAPAY = :scalapay
65
+ VIPPS = :vipps
66
+ CUSTOM = :custom
67
+ CUSTOMER_BALANCE = :customer_balance
68
+ GOPAY = :gopay
69
+ MB_WAY = :mb_way
70
+ NG_BANK = :ng_bank
71
+ NG_BANK_TRANSFER = :ng_bank_transfer
72
+ NG_CARD = :ng_card
73
+ NG_MARKET = :ng_market
74
+ NG_USSD = :ng_ussd
75
+ PAYPAL = :paypal
76
+ PAYTO = :payto
77
+ QRIS = :qris
78
+ RECHNUNG = :rechnung
79
+ SOUTH_KOREA_MARKET = :south_korea_market
80
+ KR_MARKET = :kr_market
81
+ SHOPEEPAY = :shopeepay
82
+ UPI = :upi
83
+ SUNBIT = :sunbit
84
+ NETBANKING = :netbanking
85
+ ID_BANK_TRANSFER = :id_bank_transfer
86
+ DEMO_PAY = :demo_pay
87
+ SHOP_PAY = :shop_pay
88
+ SEZZLE = :sezzle
89
+ COINBASE = :coinbase
90
+ SPLITIT = :splitit
91
+ PLATFORM_BALANCE = :platform_balance
92
+ APPLE = :apple
93
+ UNKNOWN = :unknown
94
+
95
+ # @!method self.values
96
+ # @return [Array<Symbol>]
97
+ end
98
+ end
99
+ end