whop_sdk 0.0.3 → 0.0.5

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 (267) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +47 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +8 -0
  5. data/lib/whop_sdk/internal/transport/base_client.rb +7 -1
  6. data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +6 -2
  7. data/lib/whop_sdk/models/access_level.rb +1 -1
  8. data/lib/whop_sdk/models/access_pass_type.rb +2 -1
  9. data/lib/whop_sdk/models/access_token_create_params.rb +67 -0
  10. data/lib/whop_sdk/models/access_token_create_response.rb +27 -0
  11. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  12. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  13. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +119 -43
  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 +18 -1
  19. data/lib/whop_sdk/models/course_create_params.rb +94 -30
  20. data/lib/whop_sdk/models/course_lesson_create_params.rb +77 -1
  21. data/lib/whop_sdk/models/course_lesson_list_response.rb +43 -1
  22. data/lib/whop_sdk/models/course_lesson_update_params.rb +280 -83
  23. data/lib/whop_sdk/models/course_list_response.rb +18 -1
  24. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  25. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  26. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  27. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  28. data/lib/whop_sdk/models/course_update_params.rb +70 -28
  29. data/lib/whop_sdk/models/course_visibilities.rb +17 -0
  30. data/lib/whop_sdk/models/embed_type.rb +16 -0
  31. data/lib/whop_sdk/models/entry.rb +3 -3
  32. data/lib/whop_sdk/models/entry_list_response.rb +3 -3
  33. data/lib/whop_sdk/models/experience.rb +5 -6
  34. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  35. data/lib/whop_sdk/models/forum_post.rb +2 -2
  36. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  37. data/lib/whop_sdk/models/forum_post_list_response.rb +2 -2
  38. data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
  39. data/lib/whop_sdk/models/global_affiliate_status.rb +1 -1
  40. data/lib/whop_sdk/models/invoice_create_params.rb +50 -34
  41. data/lib/whop_sdk/models/invoice_list_params.rb +27 -40
  42. data/lib/whop_sdk/models/lesson.rb +59 -9
  43. data/lib/whop_sdk/models/member_list_params.rb +11 -11
  44. data/lib/whop_sdk/models/member_list_response.rb +3 -3
  45. data/lib/whop_sdk/models/member_retrieve_response.rb +3 -3
  46. data/lib/whop_sdk/models/membership_list_params.rb +9 -9
  47. data/lib/whop_sdk/models/message.rb +2 -2
  48. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  49. data/lib/whop_sdk/models/message_list_response.rb +2 -2
  50. data/lib/whop_sdk/models/message_update_params.rb +51 -27
  51. data/lib/whop_sdk/models/payment.rb +13 -4
  52. data/lib/whop_sdk/models/payment_list_response.rb +13 -4
  53. data/lib/whop_sdk/models/payment_method_types.rb +2 -1
  54. data/lib/whop_sdk/models/plan.rb +54 -5
  55. data/lib/whop_sdk/models/plan_create_params.rb +99 -24
  56. data/lib/whop_sdk/models/plan_list_response.rb +57 -5
  57. data/lib/whop_sdk/models/plan_type.rb +1 -1
  58. data/lib/whop_sdk/models/plan_update_params.rb +97 -22
  59. data/lib/whop_sdk/models/product.rb +1 -1
  60. data/lib/whop_sdk/models/product_create_params.rb +6 -6
  61. data/lib/whop_sdk/models/product_list_item.rb +1 -1
  62. data/lib/whop_sdk/models/product_update_params.rb +57 -33
  63. data/lib/whop_sdk/models/promo_code.rb +3 -3
  64. data/lib/whop_sdk/models/promo_code_list_response.rb +3 -3
  65. data/lib/whop_sdk/models/transfer.rb +9 -1
  66. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  67. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  68. data/lib/whop_sdk/models.rb +14 -0
  69. data/lib/whop_sdk/resources/access_tokens.rb +46 -0
  70. data/lib/whop_sdk/resources/app_builds.rb +5 -3
  71. data/lib/whop_sdk/resources/apps.rb +4 -3
  72. data/lib/whop_sdk/resources/authorized_users.rb +2 -1
  73. data/lib/whop_sdk/resources/chat_channels.rb +9 -2
  74. data/lib/whop_sdk/resources/checkout_configurations.rb +8 -7
  75. data/lib/whop_sdk/resources/companies.rb +72 -1
  76. data/lib/whop_sdk/resources/course_chapters.rb +5 -3
  77. data/lib/whop_sdk/resources/course_lesson_interactions.rb +4 -3
  78. data/lib/whop_sdk/resources/course_lessons.rb +25 -7
  79. data/lib/whop_sdk/resources/course_students.rb +77 -0
  80. data/lib/whop_sdk/resources/courses.rb +24 -7
  81. data/lib/whop_sdk/resources/entries.rb +6 -3
  82. data/lib/whop_sdk/resources/experiences.rb +9 -7
  83. data/lib/whop_sdk/resources/forum_posts.rb +5 -4
  84. data/lib/whop_sdk/resources/forums.rb +3 -2
  85. data/lib/whop_sdk/resources/invoices.rb +22 -16
  86. data/lib/whop_sdk/resources/ledger_accounts.rb +6 -2
  87. data/lib/whop_sdk/resources/members.rb +6 -5
  88. data/lib/whop_sdk/resources/memberships.rb +10 -8
  89. data/lib/whop_sdk/resources/messages.rb +5 -4
  90. data/lib/whop_sdk/resources/payments.rb +7 -4
  91. data/lib/whop_sdk/resources/plans.rb +14 -8
  92. data/lib/whop_sdk/resources/products.rb +10 -8
  93. data/lib/whop_sdk/resources/promo_codes.rb +4 -2
  94. data/lib/whop_sdk/resources/reactions.rb +2 -1
  95. data/lib/whop_sdk/resources/reviews.rb +2 -1
  96. data/lib/whop_sdk/resources/shipments.rb +2 -1
  97. data/lib/whop_sdk/resources/support_channels.rb +2 -1
  98. data/lib/whop_sdk/resources/transfers.rb +5 -2
  99. data/lib/whop_sdk/resources/users.rb +9 -3
  100. data/lib/whop_sdk/version.rb +1 -1
  101. data/lib/whop_sdk.rb +14 -1
  102. data/manifest.yaml +1 -0
  103. data/rbi/whop_sdk/client.rbi +6 -0
  104. data/rbi/whop_sdk/internal/transport/base_client.rbi +5 -0
  105. data/rbi/whop_sdk/internal/transport/pooled_net_requester.rbi +6 -2
  106. data/rbi/whop_sdk/internal/type/base_model.rbi +8 -4
  107. data/rbi/whop_sdk/models/access_level.rbi +1 -1
  108. data/rbi/whop_sdk/models/access_pass_type.rbi +2 -1
  109. data/rbi/whop_sdk/models/access_token_create_params.rbi +126 -0
  110. data/rbi/whop_sdk/models/access_token_create_response.rbi +37 -0
  111. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  112. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  113. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +196 -68
  114. data/rbi/whop_sdk/models/company.rbi +10 -0
  115. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  116. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  117. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  118. data/rbi/whop_sdk/models/course.rbi +21 -3
  119. data/rbi/whop_sdk/models/course_create_params.rbi +126 -38
  120. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +126 -0
  121. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +68 -0
  122. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +449 -111
  123. data/rbi/whop_sdk/models/course_list_response.rbi +21 -3
  124. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  125. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  126. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  127. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  128. data/rbi/whop_sdk/models/course_update_params.rbi +104 -38
  129. data/rbi/whop_sdk/models/course_visibilities.rbi +23 -0
  130. data/rbi/whop_sdk/models/embed_type.rbi +20 -0
  131. data/rbi/whop_sdk/models/entry.rbi +3 -3
  132. data/rbi/whop_sdk/models/entry_list_response.rbi +3 -3
  133. data/rbi/whop_sdk/models/experience.rbi +7 -9
  134. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  135. data/rbi/whop_sdk/models/forum_post.rbi +2 -2
  136. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  137. data/rbi/whop_sdk/models/forum_post_list_response.rbi +2 -2
  138. data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
  139. data/rbi/whop_sdk/models/global_affiliate_status.rbi +1 -1
  140. data/rbi/whop_sdk/models/invoice_create_params.rbi +60 -46
  141. data/rbi/whop_sdk/models/invoice_list_params.rbi +26 -71
  142. data/rbi/whop_sdk/models/lesson.rbi +68 -10
  143. data/rbi/whop_sdk/models/member_list_params.rbi +10 -10
  144. data/rbi/whop_sdk/models/member_list_response.rbi +6 -6
  145. data/rbi/whop_sdk/models/member_retrieve_response.rbi +6 -6
  146. data/rbi/whop_sdk/models/membership_list_params.rbi +8 -8
  147. data/rbi/whop_sdk/models/message.rbi +2 -2
  148. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  149. data/rbi/whop_sdk/models/message_list_response.rbi +2 -2
  150. data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
  151. data/rbi/whop_sdk/models/payment.rbi +13 -3
  152. data/rbi/whop_sdk/models/payment_list_response.rbi +13 -3
  153. data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
  154. data/rbi/whop_sdk/models/plan.rbi +88 -4
  155. data/rbi/whop_sdk/models/plan_create_params.rbi +176 -34
  156. data/rbi/whop_sdk/models/plan_list_response.rbi +100 -4
  157. data/rbi/whop_sdk/models/plan_type.rbi +1 -1
  158. data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
  159. data/rbi/whop_sdk/models/product.rbi +1 -1
  160. data/rbi/whop_sdk/models/product_create_params.rbi +6 -6
  161. data/rbi/whop_sdk/models/product_list_item.rbi +1 -1
  162. data/rbi/whop_sdk/models/product_update_params.rbi +87 -43
  163. data/rbi/whop_sdk/models/promo_code.rbi +3 -3
  164. data/rbi/whop_sdk/models/promo_code_list_response.rbi +3 -3
  165. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  166. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  167. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  168. data/rbi/whop_sdk/models.rbi +14 -0
  169. data/rbi/whop_sdk/resources/access_tokens.rbi +41 -0
  170. data/rbi/whop_sdk/resources/app_builds.rbi +15 -3
  171. data/rbi/whop_sdk/resources/apps.rbi +13 -2
  172. data/rbi/whop_sdk/resources/authorized_users.rbi +5 -1
  173. data/rbi/whop_sdk/resources/chat_channels.rbi +8 -1
  174. data/rbi/whop_sdk/resources/checkout_configurations.rbi +11 -8
  175. data/rbi/whop_sdk/resources/companies.rbi +68 -1
  176. data/rbi/whop_sdk/resources/course_chapters.rbi +11 -2
  177. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +7 -3
  178. data/rbi/whop_sdk/resources/course_lessons.rbi +62 -4
  179. data/rbi/whop_sdk/resources/course_students.rbi +69 -0
  180. data/rbi/whop_sdk/resources/courses.rbi +50 -4
  181. data/rbi/whop_sdk/resources/entries.rbi +15 -3
  182. data/rbi/whop_sdk/resources/experiences.rbi +21 -3
  183. data/rbi/whop_sdk/resources/forum_posts.rbi +18 -3
  184. data/rbi/whop_sdk/resources/forums.rbi +6 -1
  185. data/rbi/whop_sdk/resources/invoices.rbi +38 -23
  186. data/rbi/whop_sdk/resources/ledger_accounts.rbi +7 -2
  187. data/rbi/whop_sdk/resources/members.rbi +9 -5
  188. data/rbi/whop_sdk/resources/memberships.rbi +16 -5
  189. data/rbi/whop_sdk/resources/messages.rbi +18 -3
  190. data/rbi/whop_sdk/resources/payments.rbi +16 -3
  191. data/rbi/whop_sdk/resources/plans.rbi +40 -5
  192. data/rbi/whop_sdk/resources/products.rbi +21 -7
  193. data/rbi/whop_sdk/resources/promo_codes.rbi +10 -2
  194. data/rbi/whop_sdk/resources/reactions.rbi +5 -1
  195. data/rbi/whop_sdk/resources/reviews.rbi +5 -1
  196. data/rbi/whop_sdk/resources/shipments.rbi +5 -1
  197. data/rbi/whop_sdk/resources/support_channels.rbi +5 -1
  198. data/rbi/whop_sdk/resources/transfers.rbi +8 -1
  199. data/rbi/whop_sdk/resources/users.rbi +13 -2
  200. data/sig/whop_sdk/client.rbs +4 -0
  201. data/sig/whop_sdk/internal/transport/base_client.rbs +2 -0
  202. data/sig/whop_sdk/internal/transport/pooled_net_requester.rbs +4 -1
  203. data/sig/whop_sdk/models/access_token_create_params.rbs +56 -0
  204. data/sig/whop_sdk/models/access_token_create_response.rbs +15 -0
  205. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  206. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  207. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
  208. data/sig/whop_sdk/models/company.rbs +5 -0
  209. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  210. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  211. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  212. data/sig/whop_sdk/models/course.rbs +13 -3
  213. data/sig/whop_sdk/models/course_create_params.rbs +49 -10
  214. data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
  215. data/sig/whop_sdk/models/course_lesson_list_response.rbs +25 -0
  216. data/sig/whop_sdk/models/course_lesson_update_params.rbs +162 -30
  217. data/sig/whop_sdk/models/course_list_response.rbs +13 -3
  218. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  219. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  220. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  221. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  222. data/sig/whop_sdk/models/course_update_params.rbs +40 -11
  223. data/sig/whop_sdk/models/course_visibilities.rbs +14 -0
  224. data/sig/whop_sdk/models/embed_type.rbs +14 -0
  225. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  226. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  227. data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
  228. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  229. data/sig/whop_sdk/models/invoice_list_params.rbs +16 -33
  230. data/sig/whop_sdk/models/lesson.rbs +33 -8
  231. data/sig/whop_sdk/models/member_list_params.rbs +5 -5
  232. data/sig/whop_sdk/models/membership_list_params.rbs +5 -5
  233. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  234. data/sig/whop_sdk/models/message_update_params.rbs +29 -10
  235. data/sig/whop_sdk/models/payment.rbs +5 -0
  236. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  237. data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
  238. data/sig/whop_sdk/models/plan.rbs +32 -0
  239. data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
  240. data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
  241. data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
  242. data/sig/whop_sdk/models/product_update_params.rbs +29 -10
  243. data/sig/whop_sdk/models/transfer.rbs +5 -0
  244. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  245. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  246. data/sig/whop_sdk/models.rbs +14 -0
  247. data/sig/whop_sdk/resources/access_tokens.rbs +15 -0
  248. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  249. data/sig/whop_sdk/resources/apps.rbs +1 -1
  250. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  251. data/sig/whop_sdk/resources/companies.rbs +18 -0
  252. data/sig/whop_sdk/resources/course_lessons.rbs +10 -2
  253. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  254. data/sig/whop_sdk/resources/courses.rbs +8 -2
  255. data/sig/whop_sdk/resources/experiences.rbs +1 -1
  256. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  257. data/sig/whop_sdk/resources/invoices.rbs +8 -6
  258. data/sig/whop_sdk/resources/members.rbs +1 -1
  259. data/sig/whop_sdk/resources/memberships.rbs +1 -1
  260. data/sig/whop_sdk/resources/messages.rbs +2 -2
  261. data/sig/whop_sdk/resources/plans.rbs +4 -2
  262. data/sig/whop_sdk/resources/products.rbs +1 -1
  263. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  264. metadata +41 -5
  265. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  266. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  267. data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
@@ -10,8 +10,8 @@ module WhopSDK
10
10
  # @!attribute banner_image
11
11
  # A banner image for the product in png, jpeg format
12
12
  #
13
- # @return [WhopSDK::Models::ProductUpdateParams::BannerImage, nil]
14
- optional :banner_image, -> { WhopSDK::ProductUpdateParams::BannerImage }, nil?: true
13
+ # @return [WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID, nil]
14
+ optional :banner_image, union: -> { WhopSDK::ProductUpdateParams::BannerImage }, nil?: true
15
15
 
16
16
  # @!attribute business_type
17
17
  # The different business types a company can be.
@@ -58,7 +58,7 @@ module WhopSDK
58
58
  optional :global_affiliate_percentage, Float, nil?: true
59
59
 
60
60
  # @!attribute global_affiliate_status
61
- # The different statuses of the global affiliate program for an access pass.
61
+ # The different statuses of the global affiliate program for a product.
62
62
  #
63
63
  # @return [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil]
64
64
  optional :global_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus }, nil?: true
@@ -82,7 +82,7 @@ module WhopSDK
82
82
  optional :member_affiliate_percentage, Float, nil?: true
83
83
 
84
84
  # @!attribute member_affiliate_status
85
- # The different statuses of the global affiliate program for an access pass.
85
+ # The different statuses of the global affiliate program for a product.
86
86
  #
87
87
  # @return [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil]
88
88
  optional :member_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus }, nil?: true
@@ -127,7 +127,7 @@ module WhopSDK
127
127
  # Some parameter documentations has been truncated, see
128
128
  # {WhopSDK::Models::ProductUpdateParams} for more details.
129
129
  #
130
- # @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage, nil] A banner image for the product in png, jpeg format
130
+ # @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID, nil] A banner image for the product in png, jpeg format
131
131
  #
132
132
  # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
133
133
  #
@@ -144,7 +144,7 @@ module WhopSDK
144
144
  #
145
145
  # @param global_affiliate_percentage [Float, nil] The percentage of the revenue that goes to the global affiliate program.
146
146
  #
147
- # @param global_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for an access pass.
147
+ # @param global_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product.
148
148
  #
149
149
  # @param headline [String, nil] The headline of the product.
150
150
  #
@@ -152,7 +152,7 @@ module WhopSDK
152
152
  #
153
153
  # @param member_affiliate_percentage [Float, nil] The percentage of the revenue that goes to the member affiliate program.
154
154
  #
155
- # @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for an access pass.
155
+ # @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product.
156
156
  #
157
157
  # @param product_tax_code_id [String, nil] The ID of the product tax code to apply to this product.
158
158
  #
@@ -168,32 +168,56 @@ module WhopSDK
168
168
  #
169
169
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
170
170
 
171
- class BannerImage < WhopSDK::Internal::Type::BaseModel
172
- # @!attribute id
173
- # The ID of an existing attachment object. Use this when updating a resource and
174
- # keeping a subset of the attachments. Don't use this unless you know what you're
175
- # doing.
176
- #
177
- # @return [String, nil]
178
- optional :id, String, nil?: true
179
-
180
- # @!attribute direct_upload_id
181
- # This ID should be used the first time you upload an attachment. It is the ID of
182
- # the direct upload that was created when uploading the file to S3 via the
183
- # mediaDirectUpload mutation.
184
- #
185
- # @return [String, nil]
186
- optional :direct_upload_id, String, nil?: true
187
-
188
- # @!method initialize(id: nil, direct_upload_id: nil)
189
- # Some parameter documentations has been truncated, see
190
- # {WhopSDK::Models::ProductUpdateParams::BannerImage} for more details.
191
- #
192
- # A banner image for the product in png, jpeg format
193
- #
194
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
195
- #
196
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
171
+ # A banner image for the product in png, jpeg format
172
+ module BannerImage
173
+ extend WhopSDK::Internal::Type::Union
174
+
175
+ # Input for an attachment
176
+ variant -> { WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID }
177
+
178
+ # Input for an attachment
179
+ variant -> { WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithID }
180
+
181
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
182
+ # @!attribute direct_upload_id
183
+ # This ID should be used the first time you upload an attachment. It is the ID of
184
+ # the direct upload that was created when uploading the file to S3 via the
185
+ # mediaDirectUpload mutation.
186
+ #
187
+ # @return [String]
188
+ required :direct_upload_id, String
189
+
190
+ # @!method initialize(direct_upload_id:)
191
+ # Some parameter documentations has been truncated, see
192
+ # {WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID}
193
+ # for more details.
194
+ #
195
+ # Input for an attachment
196
+ #
197
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
198
+ end
199
+
200
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
201
+ # @!attribute id
202
+ # The ID of an existing attachment object. Use this when updating a resource and
203
+ # keeping a subset of the attachments. Don't use this unless you know what you're
204
+ # doing.
205
+ #
206
+ # @return [String]
207
+ required :id, String
208
+
209
+ # @!method initialize(id:)
210
+ # Some parameter documentations has been truncated, see
211
+ # {WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID} for
212
+ # more details.
213
+ #
214
+ # Input for an attachment
215
+ #
216
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
217
+ end
218
+
219
+ # @!method self.variants
220
+ # @return [Array(WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID)]
197
221
  end
198
222
 
199
223
  class StorePageConfig < WhopSDK::Internal::Type::BaseModel
@@ -78,7 +78,7 @@ module WhopSDK
78
78
  required :one_per_customer, WhopSDK::Internal::Type::Boolean
79
79
 
80
80
  # @!attribute product
81
- # The access pass associated with the promo code.
81
+ # The product this promo code applies to
82
82
  #
83
83
  # @return [WhopSDK::Models::PromoCode::Product, nil]
84
84
  required :product, -> { WhopSDK::PromoCode::Product }, nil?: true
@@ -149,7 +149,7 @@ module WhopSDK
149
149
  #
150
150
  # @param one_per_customer [Boolean] Restricts promo use to only be applied once per customer.
151
151
  #
152
- # @param product [WhopSDK::Models::PromoCode::Product, nil] The access pass associated with the promo code.
152
+ # @param product [WhopSDK::Models::PromoCode::Product, nil] The product this promo code applies to
153
153
  #
154
154
  # @param promo_duration_months [Integer, nil] The number of months the promo is applied for.
155
155
  #
@@ -200,7 +200,7 @@ module WhopSDK
200
200
  required :title, String
201
201
 
202
202
  # @!method initialize(id:, title:)
203
- # The access pass associated with the promo code.
203
+ # The product this promo code applies to
204
204
  #
205
205
  # @param id [String] The internal ID of the public product.
206
206
  #
@@ -72,7 +72,7 @@ module WhopSDK
72
72
  required :one_per_customer, WhopSDK::Internal::Type::Boolean
73
73
 
74
74
  # @!attribute product
75
- # The access pass associated with the promo code.
75
+ # The product this promo code applies to
76
76
  #
77
77
  # @return [WhopSDK::Models::PromoCodeListResponse::Product, nil]
78
78
  required :product, -> { WhopSDK::Models::PromoCodeListResponse::Product }, nil?: true
@@ -141,7 +141,7 @@ module WhopSDK
141
141
  #
142
142
  # @param one_per_customer [Boolean] Restricts promo use to only be applied once per customer.
143
143
  #
144
- # @param product [WhopSDK::Models::PromoCodeListResponse::Product, nil] The access pass associated with the promo code.
144
+ # @param product [WhopSDK::Models::PromoCodeListResponse::Product, nil] The product this promo code applies to
145
145
  #
146
146
  # @param promo_duration_months [Integer, nil] The number of months the promo is applied for.
147
147
  #
@@ -170,7 +170,7 @@ module WhopSDK
170
170
  required :title, String
171
171
 
172
172
  # @!method initialize(id:, title:)
173
- # The access pass associated with the promo code.
173
+ # The product this promo code applies to
174
174
  #
175
175
  # @param id [String] The internal ID of the public product.
176
176
  #
@@ -45,6 +45,12 @@ module WhopSDK
45
45
  # @return [Float, nil]
46
46
  required :fee_amount, Float, nil?: true
47
47
 
48
+ # @!attribute metadata
49
+ # A hash of metadata attached to the transfer
50
+ #
51
+ # @return [Hash{Symbol=>Object}, nil]
52
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
53
+
48
54
  # @!attribute notes
49
55
  # The notes of the credit transaction transfer
50
56
  #
@@ -63,7 +69,7 @@ module WhopSDK
63
69
  # @return [String]
64
70
  required :origin_ledger_account_id, String
65
71
 
66
- # @!method initialize(id:, amount:, created_at:, currency:, destination:, destination_ledger_account_id:, fee_amount:, notes:, origin:, origin_ledger_account_id:)
72
+ # @!method initialize(id:, amount:, created_at:, currency:, destination:, destination_ledger_account_id:, fee_amount:, metadata:, notes:, origin:, origin_ledger_account_id:)
67
73
  # Credit Transaction Transfer
68
74
  #
69
75
  # @param id [String] The unique identifier of the credit transaction transfer
@@ -80,6 +86,8 @@ module WhopSDK
80
86
  #
81
87
  # @param fee_amount [Float, nil] The decimal fee of the credit transaction transfer
82
88
  #
89
+ # @param metadata [Hash{Symbol=>Object}, nil] A hash of metadata attached to the transfer
90
+ #
83
91
  # @param notes [String, nil] The notes of the credit transaction transfer
84
92
  #
85
93
  # @param origin [WhopSDK::Models::Transfer::Origin::User, WhopSDK::Models::Transfer::Origin::Company, nil] The sender of the credit transaction transfer
@@ -39,13 +39,19 @@ module WhopSDK
39
39
  # @return [String, nil]
40
40
  optional :idempotence_key, String, nil?: true
41
41
 
42
+ # @!attribute metadata
43
+ # A hash of metadata to attach to the transfer.
44
+ #
45
+ # @return [Hash{Symbol=>Object}, nil]
46
+ optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
47
+
42
48
  # @!attribute notes
43
49
  # Notes for the transfer. Maximum of 50 characters.
44
50
  #
45
51
  # @return [String, nil]
46
52
  optional :notes, String, nil?: true
47
53
 
48
- # @!method initialize(amount:, currency:, destination_id:, origin_id:, idempotence_key: nil, notes: nil, request_options: {})
54
+ # @!method initialize(amount:, currency:, destination_id:, origin_id:, idempotence_key: nil, metadata: nil, notes: nil, request_options: {})
49
55
  # Some parameter documentations has been truncated, see
50
56
  # {WhopSDK::Models::TransferCreateParams} for more details.
51
57
  #
@@ -59,6 +65,8 @@ module WhopSDK
59
65
  #
60
66
  # @param idempotence_key [String, nil] A unique key to ensure idempotence. Use a UUID or similar.
61
67
  #
68
+ # @param metadata [Hash{Symbol=>Object}, nil] A hash of metadata to attach to the transfer.
69
+ #
62
70
  # @param notes [String, nil] Notes for the transfer. Maximum of 50 characters.
63
71
  #
64
72
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
@@ -40,6 +40,12 @@ module WhopSDK
40
40
  # @return [Float, nil]
41
41
  required :fee_amount, Float, nil?: true
42
42
 
43
+ # @!attribute metadata
44
+ # A hash of metadata attached to the transfer
45
+ #
46
+ # @return [Hash{Symbol=>Object}, nil]
47
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
48
+
43
49
  # @!attribute notes
44
50
  # The notes of the credit transaction transfer
45
51
  #
@@ -52,7 +58,7 @@ module WhopSDK
52
58
  # @return [String]
53
59
  required :origin_ledger_account_id, String
54
60
 
55
- # @!method initialize(id:, amount:, created_at:, currency:, destination_ledger_account_id:, fee_amount:, notes:, origin_ledger_account_id:)
61
+ # @!method initialize(id:, amount:, created_at:, currency:, destination_ledger_account_id:, fee_amount:, metadata:, notes:, origin_ledger_account_id:)
56
62
  # Credit Transaction Transfer
57
63
  #
58
64
  # @param id [String] The unique identifier of the credit transaction transfer
@@ -67,6 +73,8 @@ module WhopSDK
67
73
  #
68
74
  # @param fee_amount [Float, nil] The decimal fee of the credit transaction transfer
69
75
  #
76
+ # @param metadata [Hash{Symbol=>Object}, nil] A hash of metadata attached to the transfer
77
+ #
70
78
  # @param notes [String, nil] The notes of the credit transaction transfer
71
79
  #
72
80
  # @param origin_ledger_account_id [String] The ID of the origin ledger account
@@ -43,6 +43,8 @@ module WhopSDK
43
43
 
44
44
  AccessPassType = WhopSDK::Models::AccessPassType
45
45
 
46
+ AccessTokenCreateParams = WhopSDK::Models::AccessTokenCreateParams
47
+
46
48
  App = WhopSDK::Models::App
47
49
 
48
50
  AppBuild = WhopSDK::Models::AppBuild
@@ -105,6 +107,10 @@ module WhopSDK
105
107
 
106
108
  Company = WhopSDK::Models::Company
107
109
 
110
+ CompanyCreateParams = WhopSDK::Models::CompanyCreateParams
111
+
112
+ CompanyListParams = WhopSDK::Models::CompanyListParams
113
+
108
114
  CompanyRetrieveParams = WhopSDK::Models::CompanyRetrieveParams
109
115
 
110
116
  Course = WhopSDK::Models::Course
@@ -150,8 +156,14 @@ module WhopSDK
150
156
 
151
157
  CourseRetrieveParams = WhopSDK::Models::CourseRetrieveParams
152
158
 
159
+ CourseStudentListParams = WhopSDK::Models::CourseStudentListParams
160
+
161
+ CourseStudentRetrieveParams = WhopSDK::Models::CourseStudentRetrieveParams
162
+
153
163
  CourseUpdateParams = WhopSDK::Models::CourseUpdateParams
154
164
 
165
+ CourseVisibilities = WhopSDK::Models::CourseVisibilities
166
+
155
167
  Currency = WhopSDK::Models::Currency
156
168
 
157
169
  CustomCta = WhopSDK::Models::CustomCta
@@ -162,6 +174,8 @@ module WhopSDK
162
174
 
163
175
  EmailNotificationPreferences = WhopSDK::Models::EmailNotificationPreferences
164
176
 
177
+ EmbedType = WhopSDK::Models::EmbedType
178
+
165
179
  Entry = WhopSDK::Models::Entry
166
180
 
167
181
  EntryApprovedWebhookEvent = WhopSDK::Models::EntryApprovedWebhookEvent
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class AccessTokens
6
+ # Some parameter documentations has been truncated, see
7
+ # {WhopSDK::Models::AccessTokenCreateParams} for more details.
8
+ #
9
+ # Creates an access token for a user to access a specific resource. These access
10
+ # tokens are designed to be used with Whop's embedded components.
11
+ #
12
+ # @overload create(scoped_actions:, target_resource_id:, target_resource_type:, expires_at: nil, request_options: {})
13
+ #
14
+ # @param scoped_actions [Array<String>] Array of desired scoped actions for the access token. This list must be a subset
15
+ #
16
+ # @param target_resource_id [String] The ID of the target resource (Company, User, etc.) for which the access token i
17
+ #
18
+ # @param target_resource_type [Symbol, WhopSDK::Models::AccessTokenCreateParams::TargetResourceType] The type of the target resource (company, user, product, experience, etc.).
19
+ #
20
+ # @param expires_at [Time, nil] The expiration timestamp for the access token. If not provided, a default expira
21
+ #
22
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
23
+ #
24
+ # @return [WhopSDK::Models::AccessTokenCreateResponse]
25
+ #
26
+ # @see WhopSDK::Models::AccessTokenCreateParams
27
+ def create(params)
28
+ parsed, options = WhopSDK::AccessTokenCreateParams.dump_request(params)
29
+ @client.request(
30
+ method: :post,
31
+ path: "access_tokens",
32
+ body: parsed,
33
+ model: WhopSDK::Models::AccessTokenCreateResponse,
34
+ options: options
35
+ )
36
+ end
37
+
38
+ # @api private
39
+ #
40
+ # @param client [WhopSDK::Client]
41
+ def initialize(client:)
42
+ @client = client
43
+ end
44
+ end
45
+ end
46
+ end
@@ -14,7 +14,7 @@ module WhopSDK
14
14
  #
15
15
  # @overload create(attachment:, checksum:, platform:, app_id: nil, supported_app_view_types: nil, request_options: {})
16
16
  #
17
- # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment] Attachment input for the app build file. This should be an upload in .zip format
17
+ # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID] Attachment input for the app build file. This should be an upload in .zip format
18
18
  #
19
19
  # @param checksum [String] Checksum of the app build file. This is generated by the client and used to veri
20
20
  #
@@ -48,7 +48,8 @@ module WhopSDK
48
48
  #
49
49
  # @overload retrieve(id, request_options: {})
50
50
  #
51
- # @param id [String]
51
+ # @param id [String] The ID of the app build
52
+ #
52
53
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
53
54
  #
54
55
  # @return [WhopSDK::Models::AppBuild]
@@ -110,7 +111,8 @@ module WhopSDK
110
111
  #
111
112
  # @overload promote(id, request_options: {})
112
113
  #
113
- # @param id [String]
114
+ # @param id [String] The ID of the app build to promote.
115
+ #
114
116
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
115
117
  #
116
118
  # @return [WhopSDK::Models::AppBuild]
@@ -36,7 +36,8 @@ module WhopSDK
36
36
  #
37
37
  # @overload retrieve(id, request_options: {})
38
38
  #
39
- # @param id [String]
39
+ # @param id [String] The ID of the app
40
+ #
40
41
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
41
42
  #
42
43
  # @return [WhopSDK::Models::App]
@@ -60,7 +61,7 @@ module WhopSDK
60
61
  #
61
62
  # @overload update(id, app_store_description: nil, base_url: nil, dashboard_path: nil, description: nil, discover_path: nil, experience_path: nil, icon: nil, name: nil, required_scopes: nil, status: nil, request_options: {})
62
63
  #
63
- # @param id [String]
64
+ # @param id [String] The ID of the app
64
65
  #
65
66
  # @param app_store_description [String, nil] The description of the app for the app store in-depth app view.
66
67
  #
@@ -74,7 +75,7 @@ module WhopSDK
74
75
  #
75
76
  # @param experience_path [String, nil] The path for the hub view of the app
76
77
  #
77
- # @param icon [WhopSDK::Models::AppUpdateParams::Icon, nil] The icon for the app
78
+ # @param icon [WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID, nil] The icon for the app
78
79
  #
79
80
  # @param name [String, nil] The name of the app
80
81
  #
@@ -12,7 +12,8 @@ module WhopSDK
12
12
  #
13
13
  # @overload retrieve(id, request_options: {})
14
14
  #
15
- # @param id [String]
15
+ # @param id [String] The ID of the authorized user
16
+ #
16
17
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
17
18
  #
18
19
  # @return [WhopSDK::Models::AuthorizedUserRetrieveResponse]
@@ -3,6 +3,9 @@
3
3
  module WhopSDK
4
4
  module Resources
5
5
  class ChatChannels
6
+ # Some parameter documentations has been truncated, see
7
+ # {WhopSDK::Models::ChatChannelRetrieveParams} for more details.
8
+ #
6
9
  # Retrieves a chat channel
7
10
  #
8
11
  # Required permissions:
@@ -11,7 +14,8 @@ module WhopSDK
11
14
  #
12
15
  # @overload retrieve(id, request_options: {})
13
16
  #
14
- # @param id [String]
17
+ # @param id [String] The ID of the chat channel to fetch, it can be an experience ID or a chat channe
18
+ #
15
19
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
16
20
  #
17
21
  # @return [WhopSDK::Models::ChatChannel]
@@ -26,6 +30,9 @@ module WhopSDK
26
30
  )
27
31
  end
28
32
 
33
+ # Some parameter documentations has been truncated, see
34
+ # {WhopSDK::Models::ChatChannelUpdateParams} for more details.
35
+ #
29
36
  # Updates a chat channel
30
37
  #
31
38
  # Required permissions:
@@ -34,7 +41,7 @@ module WhopSDK
34
41
  #
35
42
  # @overload update(id, ban_media: nil, ban_urls: nil, banned_words: nil, user_posts_cooldown_seconds: nil, who_can_post: nil, who_can_react: nil, request_options: {})
36
43
  #
37
- # @param id [String]
44
+ # @param id [String] The ID of the chat channel to update. Can be an experience ID or a chat feed ext
38
45
  #
39
46
  # @param ban_media [Boolean, nil] Whether media uploads are banned in this chat
40
47
  #
@@ -12,15 +12,15 @@ module WhopSDK
12
12
  # - `access_pass:create`
13
13
  # - `access_pass:update`
14
14
  #
15
- # @overload create(affiliate_code: nil, metadata: nil, plan: nil, plan_id: nil, redirect_url: nil, request_options: {})
15
+ # @overload create(plan:, plan_id:, affiliate_code: nil, metadata: nil, redirect_url: nil, request_options: {})
16
16
  #
17
- # @param affiliate_code [String, nil] The affiliate code to use for the checkout configuration
17
+ # @param plan [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan] Pass this object to create a new plan for this checkout configuration
18
18
  #
19
- # @param metadata [Hash{Symbol=>Object}, nil] The metadata to use for the checkout configuration
19
+ # @param plan_id [String] The ID of the plan to use for the checkout configuration
20
20
  #
21
- # @param plan [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan, nil] Pass this object to create a new plan for this checkout configuration
21
+ # @param affiliate_code [String, nil] The affiliate code to use for the checkout configuration
22
22
  #
23
- # @param plan_id [String, nil] The ID of the plan to use for the checkout configuration
23
+ # @param metadata [Hash{Symbol=>Object}, nil] The metadata to use for the checkout configuration
24
24
  #
25
25
  # @param redirect_url [String, nil] The URL to redirect the user to after the checkout configuration is created
26
26
  #
@@ -29,7 +29,7 @@ module WhopSDK
29
29
  # @return [WhopSDK::Models::CheckoutConfiguration]
30
30
  #
31
31
  # @see WhopSDK::Models::CheckoutConfigurationCreateParams
32
- def create(params = {})
32
+ def create(params)
33
33
  parsed, options = WhopSDK::CheckoutConfigurationCreateParams.dump_request(params)
34
34
  @client.request(
35
35
  method: :post,
@@ -48,7 +48,8 @@ module WhopSDK
48
48
  #
49
49
  # @overload retrieve(id, request_options: {})
50
50
  #
51
- # @param id [String]
51
+ # @param id [String] The ID of the checkout configuration
52
+ #
52
53
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
53
54
  #
54
55
  # @return [WhopSDK::Models::CheckoutConfiguration]
@@ -3,6 +3,39 @@
3
3
  module WhopSDK
4
4
  module Resources
5
5
  class Companies
6
+ # Create a new sub company for your platform
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `company:create_child`
11
+ # - `company:basic:read`
12
+ #
13
+ # @overload create(email:, parent_company_id:, title:, metadata: nil, request_options: {})
14
+ #
15
+ # @param email [String] The email of the user who the company will belong to.
16
+ #
17
+ # @param parent_company_id [String] The company ID of the platform creating this company.
18
+ #
19
+ # @param title [String] The name of the company being created.
20
+ #
21
+ # @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account
22
+ #
23
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
24
+ #
25
+ # @return [WhopSDK::Models::Company]
26
+ #
27
+ # @see WhopSDK::Models::CompanyCreateParams
28
+ def create(params)
29
+ parsed, options = WhopSDK::CompanyCreateParams.dump_request(params)
30
+ @client.request(
31
+ method: :post,
32
+ path: "companies",
33
+ body: parsed,
34
+ model: WhopSDK::Company,
35
+ options: options
36
+ )
37
+ end
38
+
6
39
  # Retrieves an company by ID or its url route
7
40
  #
8
41
  # Required permissions:
@@ -11,7 +44,8 @@ module WhopSDK
11
44
  #
12
45
  # @overload retrieve(id, request_options: {})
13
46
  #
14
- # @param id [String]
47
+ # @param id [String] The ID or route of the company
48
+ #
15
49
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
16
50
  #
17
51
  # @return [WhopSDK::Models::Company]
@@ -26,6 +60,43 @@ module WhopSDK
26
60
  )
27
61
  end
28
62
 
63
+ # Lists companies the current user has access to
64
+ #
65
+ # Required permissions:
66
+ #
67
+ # - `company:basic:read`
68
+ #
69
+ # @overload list(parent_company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, request_options: {})
70
+ #
71
+ # @param parent_company_id [String] The ID of the parent company to list sub companies for
72
+ #
73
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
74
+ #
75
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
76
+ #
77
+ # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
78
+ #
79
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
80
+ #
81
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
82
+ #
83
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
84
+ #
85
+ # @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::CompanyListResponse>]
86
+ #
87
+ # @see WhopSDK::Models::CompanyListParams
88
+ def list(params)
89
+ parsed, options = WhopSDK::CompanyListParams.dump_request(params)
90
+ @client.request(
91
+ method: :get,
92
+ path: "companies",
93
+ query: parsed,
94
+ page: WhopSDK::Internal::CursorPage,
95
+ model: WhopSDK::Models::CompanyListResponse,
96
+ options: options
97
+ )
98
+ end
99
+
29
100
  # @api private
30
101
  #
31
102
  # @param client [WhopSDK::Client]
@@ -39,7 +39,8 @@ module WhopSDK
39
39
  #
40
40
  # @overload retrieve(id, request_options: {})
41
41
  #
42
- # @param id [String]
42
+ # @param id [String] The ID of the chapter
43
+ #
43
44
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
44
45
  #
45
46
  # @return [WhopSDK::Models::CourseChapter]
@@ -62,7 +63,7 @@ module WhopSDK
62
63
  #
63
64
  # @overload update(id, title:, request_options: {})
64
65
  #
65
- # @param id [String]
66
+ # @param id [String] The ID of the chapter to update
66
67
  #
67
68
  # @param title [String] The title of the chapter
68
69
  #
@@ -125,7 +126,8 @@ module WhopSDK
125
126
  #
126
127
  # @overload delete(id, request_options: {})
127
128
  #
128
- # @param id [String]
129
+ # @param id [String] The ID of the chapter to delete
130
+ #
129
131
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
130
132
  #
131
133
  # @return [Boolean]