whop_sdk 2.4.0 → 2.5.0

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 (289) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +3 -3
  3. data/.fern/replay.lock +313 -1
  4. data/lib/whop_sdk/access_tokens/client.rb +2 -3
  5. data/lib/whop_sdk/account_links/client.rb +2 -2
  6. data/lib/whop_sdk/accounts/client.rb +8 -19
  7. data/lib/whop_sdk/accounts/fees/client.rb +5 -6
  8. data/lib/whop_sdk/accounts/financing_applications/client.rb +18 -24
  9. data/lib/whop_sdk/accounts/financing_applications/types/update_financing_applications_request_answers_item_money.rb +1 -0
  10. data/lib/whop_sdk/accounts/preferences/client.rb +1 -0
  11. data/lib/whop_sdk/accounts/preferences/types/retrieve_preferences_response.rb +2 -0
  12. data/lib/whop_sdk/accounts/preferences/types/retrieve_preferences_response_feedback_options_item.rb +17 -0
  13. data/lib/whop_sdk/accounts/preferences/types/retrieve_preferences_response_feedback_options_item_category.rb +21 -0
  14. data/lib/whop_sdk/accounts/preferences/types/update_preferences_request.rb +2 -0
  15. data/lib/whop_sdk/accounts/preferences/types/update_preferences_request_feedback_options_item.rb +17 -0
  16. data/lib/whop_sdk/accounts/preferences/types/update_preferences_request_feedback_options_item_category.rb +21 -0
  17. data/lib/whop_sdk/accounts/preferences/types/update_preferences_response.rb +2 -0
  18. data/lib/whop_sdk/accounts/preferences/types/update_preferences_response_feedback_options_item.rb +17 -0
  19. data/lib/whop_sdk/accounts/preferences/types/update_preferences_response_feedback_options_item_category.rb +21 -0
  20. data/lib/whop_sdk/accounts/types/form_company_accounts_request.rb +0 -6
  21. data/lib/whop_sdk/accounts/types/post_account_financing_disabled_payload.rb +25 -0
  22. data/lib/whop_sdk/{partners/types/referred_users_partners_request_user_id.rb → accounts/types/post_account_financing_disabled_payload_api_version.rb} +3 -3
  23. data/lib/whop_sdk/accounts/types/post_account_financing_disabled_payload_type.rb +13 -0
  24. data/lib/whop_sdk/accounts/types/transfer_ownership_accounts_request.rb +2 -0
  25. data/lib/whop_sdk/accounts/types/update_accounts_request.rb +2 -6
  26. data/lib/whop_sdk/ad_campaigns/client.rb +4 -4
  27. data/lib/whop_sdk/ad_campaigns/types/post_ad_campaign_payment_failed_payload_data_delivery_status.rb +1 -0
  28. data/lib/whop_sdk/ad_campaigns/types/post_ad_campaign_updated_payload_data_delivery_status.rb +1 -0
  29. data/lib/whop_sdk/ad_conversion_value_rules/client.rb +11 -9
  30. data/lib/whop_sdk/ad_groups/client.rb +7 -11
  31. data/lib/whop_sdk/ads/client.rb +1 -2
  32. data/lib/whop_sdk/affiliates/client.rb +5 -5
  33. data/lib/whop_sdk/api_keys/client.rb +2 -2
  34. data/lib/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.rb +2 -0
  35. data/lib/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.rb +2 -0
  36. data/lib/whop_sdk/app_builds/client.rb +2 -2
  37. data/lib/whop_sdk/app_builds/types/create_app_builds_request_attachment.rb +2 -1
  38. data/lib/whop_sdk/apps/client.rb +2 -4
  39. data/lib/whop_sdk/audiences/client.rb +5 -5
  40. data/lib/whop_sdk/authorized_users/client.rb +3 -4
  41. data/lib/whop_sdk/bounty_submissions/client.rb +7 -10
  42. data/lib/whop_sdk/bounty_submissions/types/submit_bounty_submissions_request_deliverable.rb +3 -1
  43. data/lib/whop_sdk/card_transactions/client.rb +5 -6
  44. data/lib/whop_sdk/cards/client.rb +4 -4
  45. data/lib/whop_sdk/cashback_rules/client.rb +16 -20
  46. data/lib/whop_sdk/chat_channels/client.rb +2 -2
  47. data/lib/whop_sdk/checkout_configurations/client.rb +2 -1
  48. data/lib/whop_sdk/claim_links/client.rb +8 -8
  49. data/lib/whop_sdk/client.rb +1 -1
  50. data/lib/whop_sdk/company_token_transactions/client.rb +3 -4
  51. data/lib/whop_sdk/confirmation_tokens/client.rb +3 -3
  52. data/lib/whop_sdk/course_lesson_interactions/client.rb +2 -1
  53. data/lib/whop_sdk/courses/client.rb +4 -2
  54. data/lib/whop_sdk/deposits/client.rb +3 -2
  55. data/lib/whop_sdk/disputes/client.rb +5 -12
  56. data/lib/whop_sdk/dm_channels/client.rb +5 -6
  57. data/lib/whop_sdk/domains/client.rb +4 -0
  58. data/lib/whop_sdk/domains/types/create_domains_request.rb +4 -0
  59. data/lib/whop_sdk/domains/types/create_domains_request_apple_pay.rb +13 -0
  60. data/lib/whop_sdk/domains/types/create_domains_request_pixel.rb +12 -0
  61. data/lib/whop_sdk/domains/types/list_domains_request.rb +4 -0
  62. data/lib/whop_sdk/domains/types/list_domains_request_apple_pay.rb +17 -0
  63. data/lib/whop_sdk/domains/types/list_domains_request_order.rb +2 -0
  64. data/lib/whop_sdk/domains/types/list_domains_request_pixel.rb +17 -0
  65. data/lib/whop_sdk/domains/types/update_domains_request.rb +4 -0
  66. data/lib/whop_sdk/domains/types/update_domains_request_apple_pay.rb +13 -0
  67. data/lib/whop_sdk/domains/types/update_domains_request_pixel.rb +12 -0
  68. data/lib/whop_sdk/economic_intelligence/client.rb +6 -8
  69. data/lib/whop_sdk/events/client.rb +12 -16
  70. data/lib/whop_sdk/experiences/client.rb +15 -9
  71. data/lib/whop_sdk/experiments/client.rb +16 -29
  72. data/lib/whop_sdk/exports/client.rb +1 -1
  73. data/lib/whop_sdk/external_accounts/client.rb +3 -5
  74. data/lib/whop_sdk/fee_markups/client.rb +5 -6
  75. data/lib/whop_sdk/feedback_submissions/client.rb +0 -1
  76. data/lib/whop_sdk/files/client.rb +2 -2
  77. data/lib/whop_sdk/financial_reports/breakdown/client.rb +3 -1
  78. data/lib/whop_sdk/forum_posts/client.rb +1 -1
  79. data/lib/whop_sdk/forums/client.rb +1 -1
  80. data/lib/whop_sdk/identity_profiles/client.rb +4 -4
  81. data/lib/whop_sdk/internal/http/raw_client.rb +1 -1
  82. data/lib/whop_sdk/invoices/client.rb +1 -1
  83. data/lib/whop_sdk/leads/client.rb +3 -3
  84. data/lib/whop_sdk/members/client.rb +21 -1
  85. data/lib/whop_sdk/members/logs/client.rb +1 -1
  86. data/lib/whop_sdk/members/notes/client.rb +121 -0
  87. data/lib/whop_sdk/members/notes/types/create_notes_request.rb +15 -0
  88. data/lib/whop_sdk/members/notes/types/list_notes_request.rb +21 -0
  89. data/lib/whop_sdk/members/notes/types/list_notes_response.rb +15 -0
  90. data/lib/whop_sdk/members/notes/types/list_notes_response_page_info.rb +19 -0
  91. data/lib/whop_sdk/members/types/list_members_request.rb +10 -0
  92. data/lib/whop_sdk/members/types/list_members_request_membership_status.rb +14 -0
  93. data/lib/whop_sdk/members/types/list_members_request_most_recent_actions_item.rb +25 -0
  94. data/lib/whop_sdk/members/types/list_members_request_order.rb +1 -0
  95. data/lib/whop_sdk/memberships/client.rb +30 -28
  96. data/lib/whop_sdk/memberships/types/cancel_memberships_request.rb +2 -0
  97. data/lib/whop_sdk/memberships/types/list_memberships_request.rb +10 -0
  98. data/lib/whop_sdk/memberships/types/list_memberships_request_status.rb +4 -0
  99. data/lib/whop_sdk/memberships/types/list_memberships_request_statuses_item.rb +24 -0
  100. data/lib/whop_sdk/messages/client.rb +5 -7
  101. data/lib/whop_sdk/notifications/client.rb +6 -9
  102. data/lib/whop_sdk/partner_referral_requests/client.rb +3 -3
  103. data/lib/whop_sdk/partners/businesses/client.rb +99 -0
  104. data/lib/whop_sdk/partners/businesses/earnings/types/list_earnings_request_income_source_item.rb +1 -0
  105. data/lib/whop_sdk/partners/businesses/earnings/types/list_earnings_response_data_item_income_source.rb +1 -0
  106. data/lib/whop_sdk/partners/businesses/types/accept_commission_advance_businesses_request.rb +21 -0
  107. data/lib/whop_sdk/partners/businesses/types/accept_commission_advance_businesses_request_acknowledgments_item.rb +17 -0
  108. data/lib/whop_sdk/partners/businesses/types/accept_commission_advance_businesses_response.rb +15 -0
  109. data/lib/whop_sdk/partners/businesses/types/list_businesses_request.rb +2 -0
  110. data/lib/whop_sdk/partners/businesses/types/list_businesses_request_advance_status.rb +22 -0
  111. data/lib/whop_sdk/partners/businesses/types/list_businesses_response_data_item.rb +2 -0
  112. data/lib/whop_sdk/partners/businesses/types/retrieve_businesses_response.rb +2 -0
  113. data/lib/whop_sdk/partners/businesses/types/update_businesses_request.rb +17 -0
  114. data/lib/whop_sdk/partners/businesses/types/update_businesses_response.rb +15 -0
  115. data/lib/whop_sdk/partners/client.rb +6 -11
  116. data/lib/whop_sdk/partners/types/referred_users_partners_request.rb +0 -2
  117. data/lib/whop_sdk/payment_method_domains/client.rb +4 -5
  118. data/lib/whop_sdk/payment_methods/client.rb +4 -5
  119. data/lib/whop_sdk/payment_quotes/client.rb +8 -10
  120. data/lib/whop_sdk/payment_quotes/types/create_payment_quotes_request.rb +2 -2
  121. data/lib/whop_sdk/payment_quotes/types/create_payment_quotes_request_line_items_item.rb +13 -0
  122. data/lib/whop_sdk/payment_rules/client.rb +19 -8
  123. data/lib/whop_sdk/payments/client.rb +26 -24
  124. data/lib/whop_sdk/payments/direct/client.rb +5 -6
  125. data/lib/whop_sdk/payments/direct/types/create_direct_request.rb +2 -2
  126. data/lib/whop_sdk/payments/direct/types/create_direct_request_line_items_item.rb +15 -0
  127. data/lib/whop_sdk/payments/types/create_payments_request.rb +2 -2
  128. data/lib/whop_sdk/payments/types/create_payments_request_line_items_item.rb +13 -0
  129. data/lib/whop_sdk/payments/types/create_payments_request_line_items_item_plan.rb +46 -0
  130. data/lib/whop_sdk/payments/types/create_payments_request_line_items_item_plan_currency.rb +102 -0
  131. data/lib/whop_sdk/payments/types/create_payments_request_line_items_item_plan_override_tax_type.rb +15 -0
  132. data/lib/whop_sdk/payments/types/create_payments_request_line_items_item_plan_plan_type.rb +14 -0
  133. data/lib/whop_sdk/payments/types/create_payments_request_line_items_item_plan_product.rb +34 -0
  134. data/lib/whop_sdk/payments/types/create_payments_request_line_items_item_plan_product_global_affiliate_status.rb +14 -0
  135. data/lib/whop_sdk/payments/types/create_payments_request_line_items_item_plan_product_visibility.rb +16 -0
  136. data/lib/whop_sdk/payments/types/create_payments_request_line_items_item_plan_visibility.rb +16 -0
  137. data/lib/whop_sdk/payments/types/resume_payments_request.rb +2 -0
  138. data/lib/whop_sdk/payout_methods/client.rb +1 -1
  139. data/lib/whop_sdk/payouts/client.rb +15 -12
  140. data/lib/whop_sdk/payouts/methods/client.rb +2 -2
  141. data/lib/whop_sdk/payouts/methods/types/create_methods_request.rb +2 -0
  142. data/lib/whop_sdk/payouts/methods/types/list_methods_response_limits_standard_error_code.rb +1 -1
  143. data/lib/whop_sdk/payouts/paypal_link_sessions/client.rb +67 -0
  144. data/lib/whop_sdk/payouts/paypal_link_sessions/types/create_paypal_link_sessions_request.rb +21 -0
  145. data/lib/whop_sdk/payouts/paypal_link_sessions/types/create_paypal_link_sessions_response.rb +15 -0
  146. data/lib/whop_sdk/payouts/supported_methods/client.rb +2 -1
  147. data/lib/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item.rb +2 -0
  148. data/lib/whop_sdk/people/client.rb +3 -5
  149. data/lib/whop_sdk/plans/client.rb +1 -1
  150. data/lib/whop_sdk/products/client.rb +2 -2
  151. data/lib/whop_sdk/promo_codes/client.rb +1 -1
  152. data/lib/whop_sdk/refunds/client.rb +1 -2
  153. data/lib/whop_sdk/reviews/client.rb +59 -19
  154. data/lib/whop_sdk/reviews/types/delete_reviews_request.rb +11 -0
  155. data/lib/whop_sdk/reviews/types/delete_reviews_response.rb +13 -0
  156. data/lib/whop_sdk/reviews/types/list_reviews_request.rb +14 -8
  157. data/lib/whop_sdk/reviews/types/list_reviews_request_direction.rb +14 -0
  158. data/lib/whop_sdk/reviews/types/list_reviews_request_order.rb +14 -0
  159. data/lib/whop_sdk/reviews/types/list_reviews_response.rb +1 -2
  160. data/lib/whop_sdk/reviews/types/list_reviews_response_page_info.rb +17 -0
  161. data/lib/whop_sdk/setup_intents/client.rb +8 -10
  162. data/lib/whop_sdk/setup_intents/direct/client.rb +6 -7
  163. data/lib/whop_sdk/shipments/client.rb +2 -2
  164. data/lib/whop_sdk/stats/client.rb +2 -3
  165. data/lib/whop_sdk/stats/reports/client.rb +6 -10
  166. data/lib/whop_sdk/stats/time_series/client.rb +3 -8
  167. data/lib/whop_sdk/support_channels/client.rb +12 -4
  168. data/lib/whop_sdk/support_channels/types/list_support_channels_request.rb +8 -0
  169. data/lib/whop_sdk/swaps/client.rb +6 -6
  170. data/lib/whop_sdk/team_members/client.rb +7 -10
  171. data/lib/whop_sdk/topups/client.rb +2 -2
  172. data/lib/whop_sdk/trades/client.rb +6 -8
  173. data/lib/whop_sdk/trades/types/create_trades_request.rb +21 -1
  174. data/lib/whop_sdk/trades/types/create_trades_request_instrument_type.rb +14 -0
  175. data/lib/whop_sdk/trades/types/create_trades_request_order_type.rb +14 -0
  176. data/lib/whop_sdk/trades/types/create_trades_request_side.rb +14 -0
  177. data/lib/whop_sdk/trades/types/create_trades_request_type.rb +3 -1
  178. data/lib/whop_sdk/trades/types/list_trades_request_type.rb +3 -1
  179. data/lib/whop_sdk/transfers/client.rb +6 -3
  180. data/lib/whop_sdk/types/account.rb +2 -2
  181. data/lib/whop_sdk/types/account_level.rb +19 -0
  182. data/lib/whop_sdk/types/account_payment_controls_restricted_payment_methods_item.rb +39 -0
  183. data/lib/whop_sdk/types/account_preferences.rb +2 -0
  184. data/lib/whop_sdk/types/ad_campaign_delivery_status.rb +1 -0
  185. data/lib/whop_sdk/types/api_key_api_version_date.rb +2 -0
  186. data/lib/whop_sdk/types/cancel_options.rb +1 -0
  187. data/lib/whop_sdk/types/dispute_evidence_document.rb +12 -0
  188. data/lib/whop_sdk/types/domain.rb +6 -0
  189. data/lib/whop_sdk/types/domain_apple_pay.rb +9 -0
  190. data/lib/whop_sdk/types/domain_apple_pay_state.rb +14 -0
  191. data/lib/whop_sdk/types/domain_issue.rb +2 -0
  192. data/lib/whop_sdk/types/domain_issue_capability.rb +2 -0
  193. data/lib/whop_sdk/types/domain_issue_code.rb +6 -2
  194. data/lib/whop_sdk/types/domain_list_item.rb +6 -0
  195. data/lib/whop_sdk/types/domain_pixel.rb +9 -0
  196. data/lib/whop_sdk/types/domain_pixel_state.rb +13 -0
  197. data/lib/whop_sdk/types/domain_stats.rb +9 -0
  198. data/lib/whop_sdk/types/domain_website.rb +1 -1
  199. data/lib/whop_sdk/types/domain_website_app.rb +11 -0
  200. data/lib/whop_sdk/types/feedback_option.rb +13 -0
  201. data/lib/whop_sdk/types/feedback_option_category.rb +17 -0
  202. data/lib/whop_sdk/types/file.rb +12 -0
  203. data/lib/whop_sdk/types/financing_access_change.rb +19 -0
  204. data/lib/whop_sdk/types/financing_access_change_disabled_payment_methods_item.rb +33 -0
  205. data/lib/whop_sdk/types/financing_access_change_object.rb +11 -0
  206. data/lib/whop_sdk/types/financing_access_change_provider.rb +15 -0
  207. data/lib/whop_sdk/types/financing_access_change_reason.rb +11 -0
  208. data/lib/whop_sdk/types/member.rb +10 -0
  209. data/lib/whop_sdk/types/member_most_recent_action.rb +23 -0
  210. data/lib/whop_sdk/types/member_note.rb +19 -0
  211. data/lib/whop_sdk/types/membership.rb +24 -0
  212. data/lib/whop_sdk/types/membership_cancel_option.rb +18 -0
  213. data/lib/whop_sdk/types/membership_collection_method.rb +12 -0
  214. data/lib/whop_sdk/types/membership_feedback_option.rb +9 -0
  215. data/lib/whop_sdk/types/membership_legacy.rb +2 -0
  216. data/lib/whop_sdk/types/membership_legacy_feedback_option.rb +11 -0
  217. data/lib/whop_sdk/types/membership_list_item.rb +2 -0
  218. data/lib/whop_sdk/types/membership_list_item_feedback_option.rb +11 -0
  219. data/lib/whop_sdk/types/membership_most_recent_action.rb +21 -0
  220. data/lib/whop_sdk/types/membership_product.rb +13 -0
  221. data/lib/whop_sdk/types/owner_level.rb +17 -0
  222. data/lib/whop_sdk/types/owner_level_points.rb +13 -0
  223. data/lib/whop_sdk/types/partner_advance.rb +41 -0
  224. data/lib/whop_sdk/types/partner_advance_status.rb +17 -0
  225. data/lib/whop_sdk/types/payment.rb +2 -0
  226. data/lib/whop_sdk/types/payment_input.rb +1 -4
  227. data/lib/whop_sdk/types/payment_input_plan.rb +2 -0
  228. data/lib/whop_sdk/types/payment_method_types.rb +3 -0
  229. data/lib/whop_sdk/types/payment_rule_condition_value.rb +2 -2
  230. data/lib/whop_sdk/types/permission_action.rb +3 -0
  231. data/lib/whop_sdk/types/review.rb +2 -3
  232. data/lib/whop_sdk/types/{review_company.rb → review_account.rb} +1 -2
  233. data/lib/whop_sdk/types/{review_attachments_item.rb → review_attachment.rb} +1 -2
  234. data/lib/whop_sdk/types/review_list_item.rb +3 -4
  235. data/lib/whop_sdk/types/review_list_item_status.rb +11 -0
  236. data/lib/whop_sdk/types/review_product.rb +0 -1
  237. data/lib/whop_sdk/types/review_user.rb +0 -1
  238. data/lib/whop_sdk/types/support_channel.rb +8 -0
  239. data/lib/whop_sdk/types/support_channel_last_message.rb +23 -0
  240. data/lib/whop_sdk/types/{review_list_item_attachments_item.rb → support_channel_last_message_attachments_item.rb} +1 -5
  241. data/lib/whop_sdk/types/support_channel_last_message_gifs_item.rb +10 -0
  242. data/lib/whop_sdk/types/support_channel_last_message_poll.rb +10 -0
  243. data/lib/whop_sdk/types/support_channel_last_message_poll_options_item.rb +10 -0
  244. data/lib/whop_sdk/types/support_channel_list_item.rb +8 -0
  245. data/lib/whop_sdk/types/support_channel_list_item_last_message.rb +23 -0
  246. data/lib/whop_sdk/types/support_channel_list_item_last_message_attachments_item.rb +12 -0
  247. data/lib/whop_sdk/types/support_channel_list_item_last_message_gifs_item.rb +10 -0
  248. data/lib/whop_sdk/types/support_channel_list_item_last_message_poll.rb +10 -0
  249. data/lib/whop_sdk/types/support_channel_list_item_last_message_poll_options_item.rb +10 -0
  250. data/lib/whop_sdk/types/trade.rb +17 -1
  251. data/lib/whop_sdk/types/trade_failure_code.rb +1 -0
  252. data/lib/whop_sdk/types/trade_instrument_type.rb +12 -0
  253. data/lib/whop_sdk/types/trade_order_type.rb +12 -0
  254. data/lib/whop_sdk/types/trade_side.rb +12 -0
  255. data/lib/whop_sdk/types/trade_status_detail.rb +0 -3
  256. data/lib/whop_sdk/types/trade_type.rb +3 -1
  257. data/lib/whop_sdk/types/user.rb +7 -1
  258. data/lib/whop_sdk/types/user_social_link.rb +15 -0
  259. data/lib/whop_sdk/types/user_social_link_website.rb +18 -0
  260. data/lib/whop_sdk/types/webhook_event.rb +1 -0
  261. data/lib/whop_sdk/types/webhook_events_item.rb +1 -0
  262. data/lib/whop_sdk/types/webhook_list_item_events_item.rb +1 -0
  263. data/lib/whop_sdk/types/webhook_testable_events_item.rb +1 -0
  264. data/lib/whop_sdk/users/client.rb +13 -18
  265. data/lib/whop_sdk/users/oauth_grants/client.rb +9 -11
  266. data/lib/whop_sdk/users/passkeys/client.rb +3 -3
  267. data/lib/whop_sdk/users/preferences/client.rb +1 -2
  268. data/lib/whop_sdk/users/preferences/notifications/client.rb +4 -13
  269. data/lib/whop_sdk/users/preferences/notifications/topics/client.rb +2 -2
  270. data/lib/whop_sdk/users/preferences/notifications/types/set_notifications_request_preferences_item_scope.rb +3 -1
  271. data/lib/whop_sdk/variants/client.rb +10 -9
  272. data/lib/whop_sdk/verifications/client.rb +7 -9
  273. data/lib/whop_sdk/verifications/types/create_verifications_request_body_business.rb +6 -0
  274. data/lib/whop_sdk/verifications/types/create_verifications_request_body_business_documents.rb +18 -0
  275. data/lib/whop_sdk/verifications/types/create_verifications_response.rb +2 -0
  276. data/lib/whop_sdk/verifications/types/list_verifications_response_data_item.rb +2 -0
  277. data/lib/whop_sdk/verifications/types/retrieve_verifications_response.rb +2 -0
  278. data/lib/whop_sdk/verifications/types/update_verifications_response.rb +2 -0
  279. data/lib/whop_sdk/version.rb +1 -1
  280. data/lib/whop_sdk/waitlist_entries/client.rb +14 -14
  281. data/lib/whop_sdk/webhooks/client.rb +11 -12
  282. data/lib/whop_sdk/webhooks/types/create_webhooks_request_events_item.rb +1 -0
  283. data/lib/whop_sdk/webhooks/types/update_webhooks_request_events_item.rb +1 -0
  284. data/lib/whop_sdk.rb +99 -9
  285. data/reference.md +1431 -573
  286. metadata +99 -9
  287. data/lib/whop_sdk/types/payment_input_line_items_item.rb +0 -11
  288. data/lib/whop_sdk/types/review_list_item_user.rb +0 -14
  289. data/lib/whop_sdk/types/user_staff_access.rb +0 -15
@@ -27,9 +27,14 @@ module Whop_sdk
27
27
  # @option request_options [Integer] :timeout_in_seconds
28
28
  # @option params [String, nil] :account_id
29
29
  # @option params [String, nil] :user_id
30
+ # @option params [String, nil] :member_id
30
31
  # @option params [Whop_sdk::Memberships::Types::ListMembershipsRequestStatus, nil] :status
32
+ # @option params [Whop_sdk::Memberships::Types::ListMembershipsRequestStatusesItem, nil] :statuses
31
33
  # @option params [String, nil] :product_id
34
+ # @option params [String, nil] :product_ids
32
35
  # @option params [String, nil] :plan_id
36
+ # @option params [String, nil] :plan_ids
37
+ # @option params [String, nil] :promo_code_ids
33
38
  # @option params [String, nil] :created_after
34
39
  # @option params [String, nil] :created_before
35
40
  # @option params [Whop_sdk::Memberships::Types::ListMembershipsRequestOrder, nil] :order
@@ -40,7 +45,11 @@ module Whop_sdk
40
45
  # @option params [String, nil] :before
41
46
  #
42
47
  # @example
43
- # client.memberships.list
48
+ # client.memberships.list(
49
+ # product_ids: ["prod_xxxxxxxxxxxxx"],
50
+ # plan_ids: ["plan_xxxxxxxxxxxxx"],
51
+ # promo_code_ids: ["promo_xxxxxxxxxxxxxx"]
52
+ # )
44
53
  #
45
54
  # @return [Whop_sdk::Memberships::Types::ListMembershipsResponse]
46
55
  def list(request_options: {}, **params)
@@ -48,9 +57,14 @@ module Whop_sdk
48
57
  query_params = {}
49
58
  query_params["account_id"] = params[:account_id] if params.key?(:account_id)
50
59
  query_params["user_id"] = params[:user_id] if params.key?(:user_id)
60
+ query_params["member_id"] = params[:member_id] if params.key?(:member_id)
51
61
  query_params["status"] = params[:status] if params.key?(:status)
62
+ query_params["statuses"] = params[:statuses] if params.key?(:statuses)
52
63
  query_params["product_id"] = params[:product_id] if params.key?(:product_id)
64
+ query_params["product_ids"] = params[:product_ids] if params.key?(:product_ids)
53
65
  query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id)
66
+ query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids)
67
+ query_params["promo_code_ids"] = params[:promo_code_ids] if params.key?(:promo_code_ids)
54
68
  query_params["created_after"] = params[:created_after] if params.key?(:created_after)
55
69
  query_params["created_before"] = params[:created_before] if params.key?(:created_before)
56
70
  query_params["order"] = params[:order] if params.key?(:order)
@@ -89,10 +103,9 @@ module Whop_sdk
89
103
  end
90
104
  end
91
105
 
92
- # Sends an email inviting one recipient to join the account through a free variant. Identify the recipient by
93
- # exactly one of `user_id` or `email`. The invitation is bound to that recipient; after signing in, accepting it
94
- # immediately grants the membership without checkout. This Experimental endpoint is available only to accounts
95
- # enabled for membership invitations.
106
+ # Emails one recipient an invitation to a free variant's membership. The invitation is bound to that recipient;
107
+ # after signing in, accepting it immediately grants the membership without checkout. This Experimental endpoint is
108
+ # available only to accounts enabled for membership invitations.
96
109
  #
97
110
  # @param request_options [Hash]
98
111
  # @param params [Whop_sdk::Memberships::Types::InviteMembershipsRequestBody]
@@ -169,12 +182,7 @@ module Whop_sdk
169
182
  end
170
183
  end
171
184
 
172
- # Updates a membership: merge metadata key-value pairs, toggle `cancel_at_period_end` — `true` schedules the
173
- # cancellation for the end of the current billing period, `false` reverses a pending one — or move future renewals
174
- # to another of the customer's saved payment methods with `payment_method_id`, or set `billing_period_days` to
175
- # change renewal cadence for an active, trialing, or past-due membership billed automatically by Whop. The current
176
- # period end moves to the current period start plus the requested number of days, and future renewals use the same
177
- # cadence. Invoice, externally billed, and canceling memberships are not supported.
185
+ # Updates a membership's metadata, scheduled cancellation, renewal payment method, or renewal cadence.
178
186
  #
179
187
  # @param request_options [Hash]
180
188
  # @param params [Whop_sdk::Memberships::Types::UpdateMembershipsRequest]
@@ -220,10 +228,8 @@ module Whop_sdk
220
228
  end
221
229
 
222
230
  # Applies a promo code to an `active` or `trialing` membership that does not already have one and has exactly one
223
- # recurring item. The discount lands on the next invoice and follows the code's duration (`once`, `repeating`, or
224
- # `forever`). Works for Stripe-billed memberships and memberships billed by Whop's billing engine, including
225
- # payment-element and multi-PSP renewals. Stock, plan eligibility, and expiry are still checked. Memberships with
226
- # multiple recurring items are rejected.
231
+ # recurring item, for Stripe-billed memberships and memberships billed by Whop's billing engine. The discount
232
+ # lands on the next invoice and follows the code's duration (`once`, `repeating`, or `forever`).
227
233
  #
228
234
  # @param request_options [Hash]
229
235
  # @param params [Whop_sdk::Memberships::Types::ApplyPromoCodeMembershipsRequest]
@@ -268,14 +274,12 @@ module Whop_sdk
268
274
  end
269
275
  end
270
276
 
271
- # Assigns an affiliate to a membership and pays them the commission you set on its future payments. Name the user
272
- # with exactly one of `user_id`, `email`, or `username`. A user who is not yet an affiliate of your account
273
- # becomes one, which also requires `affiliate:create`. Send a new `commission_type` or `commission_value` for the
274
- # membership's current affiliate to change their commission; a membership that already has a different affiliate
275
- # returns a conflict. Works for active or trialing memberships with one recurring plan that bill through Stripe or
276
- # Whop's billing engine, and not for marketplace memberships, paused payments, or a scheduled cancellation. The
277
- # payout cannot exceed 90% of the next renewal amount, and no past payments are recalculated. You cannot assign
278
- # yourself.
277
+ # Assigns an affiliate to a membership and pays them the commission you set on its future payments; past payments
278
+ # are not recalculated. A user who is not yet an affiliate of your account becomes one, which also requires
279
+ # `affiliate:create`. Send a new `commission_type` or `commission_value` for the membership's current affiliate to
280
+ # change their commission; a membership that already has a different affiliate returns a conflict. Works for
281
+ # active or trialing memberships with one recurring variant that bill through Stripe or Whop's billing engine, and
282
+ # not for marketplace memberships, paused payments, or a scheduled cancellation. You cannot assign yourself.
279
283
  #
280
284
  # @param request_options [Hash]
281
285
  # @param params [Whop_sdk::Memberships::Types::AssignAffiliateMembershipsRequest]
@@ -322,8 +326,7 @@ module Whop_sdk
322
326
  end
323
327
  end
324
328
 
325
- # Cancels a membership. Pass `cancel_at_period_end: true` to stop auto-renewal and keep access until the current
326
- # billing period ends. Omit it (or pass `false`) to revoke access immediately. Buyers cannot cancel
329
+ # Cancels a membership, either immediately or at the end of the current billing period. Buyers cannot cancel
327
330
  # buy-now-pay-later (`splitit`, `sezzle`) or non-trial split-pay memberships.
328
331
  #
329
332
  # @param request_options [Hash]
@@ -456,9 +459,8 @@ module Whop_sdk
456
459
  end
457
460
 
458
461
  # Restores access to a `canceled` or `expired` membership that contains only one-time purchases and sets its
459
- # `status` to `completed`. Lifetime memberships regain lifetime access. For memberships with an expiration, `days`
460
- # sets `current_period_end` that many days from now; without it the original `current_period_end` is kept, so
461
- # `days` is required once that has passed. Active and recurring memberships cannot be reactivated.
462
+ # `status` to `completed`. Lifetime memberships regain lifetime access; for memberships with an expiration, `days`
463
+ # sets the new `current_period_end`. Active and recurring memberships cannot be reactivated.
462
464
  #
463
465
  # @param request_options [Hash]
464
466
  # @param params [Whop_sdk::Memberships::Types::ReactivateMembershipsRequest]
@@ -8,6 +8,8 @@ module Whop_sdk
8
8
 
9
9
  field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: true, nullable: false
10
10
 
11
+ field :feedback_option_id, -> { String }, optional: true, nullable: false
12
+
11
13
  field :reason, -> { String }, optional: true, nullable: false
12
14
  end
13
15
  end
@@ -8,12 +8,22 @@ module Whop_sdk
8
8
 
9
9
  field :user_id, -> { String }, optional: true, nullable: false
10
10
 
11
+ field :member_id, -> { String }, optional: true, nullable: false
12
+
11
13
  field :status, -> { Whop_sdk::Memberships::Types::ListMembershipsRequestStatus }, optional: true, nullable: false
12
14
 
15
+ field :statuses, -> { Whop_sdk::Memberships::Types::ListMembershipsRequestStatusesItem }, optional: true, nullable: false
16
+
13
17
  field :product_id, -> { String }, optional: true, nullable: false
14
18
 
19
+ field :product_ids, -> { String }, optional: true, nullable: false
20
+
15
21
  field :plan_id, -> { String }, optional: true, nullable: false
16
22
 
23
+ field :plan_ids, -> { String }, optional: true, nullable: false
24
+
25
+ field :promo_code_ids, -> { String }, optional: true, nullable: false
26
+
17
27
  field :created_after, -> { String }, optional: true, nullable: false
18
28
 
19
29
  field :created_before, -> { String }, optional: true, nullable: false
@@ -14,6 +14,10 @@ module Whop_sdk
14
14
  EXPIRED = "expired"
15
15
  CANCELING = "canceling"
16
16
  PAUSED = "paused"
17
+ EXPIRING = "expiring"
18
+ ONE_TIME = "one_time"
19
+ UNCLAIMED = "unclaimed"
20
+ BANNED = "banned"
17
21
  end
18
22
  end
19
23
  end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Whop_sdk
4
+ module Memberships
5
+ module Types
6
+ module ListMembershipsRequestStatusesItem
7
+ extend Whop_sdk::Internal::Types::Enum
8
+
9
+ ACTIVE = "active"
10
+ TRIALING = "trialing"
11
+ PAST_DUE = "past_due"
12
+ COMPLETED = "completed"
13
+ CANCELED = "canceled"
14
+ EXPIRED = "expired"
15
+ CANCELING = "canceling"
16
+ PAUSED = "paused"
17
+ EXPIRING = "expiring"
18
+ ONE_TIME = "one_time"
19
+ UNCLAIMED = "unclaimed"
20
+ BANNED = "banned"
21
+ end
22
+ end
23
+ end
24
+ end
@@ -14,8 +14,7 @@ module Whop_sdk
14
14
  @environment = environment
15
15
  end
16
16
 
17
- # Returns a paginated list of messages within a specific experience chat, DM, or group chat channel, sorted by
18
- # creation time.
17
+ # Lists messages in an experience chat, DM, or group chat channel, sorted by creation time.
19
18
  #
20
19
  # Required permissions (one of):
21
20
  # - `chat:read`
@@ -83,8 +82,8 @@ module Whop_sdk
83
82
  end
84
83
  end
85
84
 
86
- # Send a new message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls,
87
- # and replies.
85
+ # Sends a message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and
86
+ # replies.
88
87
  #
89
88
  # Required permissions (one of):
90
89
  # - `chat:message:create`
@@ -173,7 +172,7 @@ module Whop_sdk
173
172
  end
174
173
  end
175
174
 
176
- # Permanently delete a message from an experience chat, DM, or group chat channel. Only the message author or a
175
+ # Permanently deletes a message from an experience chat, DM, or group chat channel. Only the message author or a
177
176
  # channel admin can delete a message.
178
177
  #
179
178
  # Required permissions (one of):
@@ -217,8 +216,7 @@ module Whop_sdk
217
216
  end
218
217
  end
219
218
 
220
- # Edit the content, attachments, or pinned status of an existing message in an experience chat, DM, or group chat
221
- # channel.
219
+ # Edits the content, attachments, or pinned status of a message in an experience chat, DM, or group chat channel.
222
220
  #
223
221
  # Required permissions (one of):
224
222
  # - `chat:message:create`
@@ -14,10 +14,9 @@ module Whop_sdk
14
14
  @environment = environment
15
15
  end
16
16
 
17
- # Lists the authenticated user's notifications, newest first. Requires a user credential — an account API key has
18
- # no notification feed. Without filters the feed spans every experience the user belongs to plus the teams they
19
- # are a member of. The `after` cursor is a notification `id` from a previous response; subsequent pages contain
20
- # older notifications.
17
+ # Lists the authenticated user's notifications, newest first. Without filters the feed spans every experience the
18
+ # user belongs to plus the teams they are a member of. Requires a user credential — an account API key has no
19
+ # notification feed.
21
20
  #
22
21
  # @param request_options [Hash]
23
22
  # @param params [Hash]
@@ -162,9 +161,8 @@ module Whop_sdk
162
161
  end
163
162
  end
164
163
 
165
- # Marks the authenticated user's notifications as read: one experience's (`experience_id`) or everything (`all:
166
- # true`) — exactly one of the two. Requires a user credential. Responds with the refreshed badge rows for the
167
- # affected scope.
164
+ # Marks the authenticated user's notifications as read, for one experience or all of them, and returns the
165
+ # refreshed badge rows for that scope. Requires a user credential.
168
166
  #
169
167
  # @param request_options [Hash]
170
168
  # @param params [Whop_sdk::Notifications::Types::MarkReadNotificationsRequest]
@@ -201,8 +199,7 @@ module Whop_sdk
201
199
  end
202
200
  end
203
201
 
204
- # Retrieves a single notification by id — either an `id` returned by List Notifications, or the ephemeral id
205
- # delivered with a push/websocket event. Requires a user credential.
202
+ # Retrieves a single notification, from the feed or from a push or websocket event. Requires a user credential.
206
203
  #
207
204
  # @param request_options [Hash]
208
205
  # @param params [Hash]
@@ -84,9 +84,9 @@ module Whop_sdk
84
84
  end
85
85
  end
86
86
 
87
- # Creates a referral link or sends a verified partner's attribution request to an existing business or user for
88
- # approval. Whop sessions creating a link with their own active `authorized_user_id` enroll automatically. Manual
89
- # requests always require a verified partner. Recipients do not need to join the partner program.
87
+ # Creates a referral link, or sends an attribution request to an existing business or user for approval. Links
88
+ # require an enrolled partner who is not suspended; attribution requests require an enrolled, verified partner.
89
+ # Recipients do not need to join the partner program.
90
90
  #
91
91
  # @param request_options [Hash]
92
92
  # @param params [Whop_sdk::PartnerReferralRequests::Types::CreatePartnerReferralRequestsRequestBody]
@@ -25,6 +25,7 @@ module Whop_sdk
25
25
  # @option request_options [Hash{String => Object}] :additional_body_parameters
26
26
  # @option request_options [Integer] :timeout_in_seconds
27
27
  # @option params [String, nil] :referring_account_id
28
+ # @option params [Whop_sdk::Partners::Businesses::Types::ListBusinessesRequestAdvanceStatus, nil] :advance_status
28
29
  # @option params [Whop_sdk::Partners::Businesses::Types::ListBusinessesRequestStatus, nil] :status
29
30
  # @option params [Boolean, nil] :has_earnings
30
31
  # @option params [Integer, nil] :first
@@ -48,6 +49,7 @@ module Whop_sdk
48
49
  params = Whop_sdk::Internal::Types::Utils.normalize_keys(params)
49
50
  query_params = {}
50
51
  query_params["referring_account_id"] = params[:referring_account_id] if params.key?(:referring_account_id)
52
+ query_params["advance_status"] = params[:advance_status] if params.key?(:advance_status)
51
53
  query_params["status"] = params[:status] if params.key?(:status)
52
54
  query_params["has_earnings"] = params[:has_earnings] if params.key?(:has_earnings)
53
55
  query_params["first"] = params[:first] if params.key?(:first)
@@ -129,6 +131,103 @@ module Whop_sdk
129
131
  end
130
132
  end
131
133
 
134
+ # Save annual projections for a business referred by the authenticated partner. Projections cannot be changed
135
+ # after saving; repeating the same values is allowed. Public API access requires a partner OAuth token; business
136
+ # API keys are not supported.
137
+ #
138
+ # @param request_options [Hash]
139
+ # @param params [Whop_sdk::Partners::Businesses::Types::UpdateBusinessesRequest]
140
+ # @option request_options [String] :base_url
141
+ # @option request_options [Hash{String => Object}] :additional_headers
142
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
143
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
144
+ # @option request_options [Integer] :timeout_in_seconds
145
+ # @option params [String] :id
146
+ #
147
+ # @example
148
+ # client.partners.businesses.update(
149
+ # id: "id",
150
+ # annual_ads_usd: "120000",
151
+ # annual_processing_usd: "1200000"
152
+ # )
153
+ #
154
+ # @return [Whop_sdk::Partners::Businesses::Types::UpdateBusinessesResponse]
155
+ def update(request_options: {}, **params)
156
+ params = Whop_sdk::Internal::Types::Utils.normalize_keys(params)
157
+ request_data = Whop_sdk::Partners::Businesses::Types::UpdateBusinessesRequest.new(params).to_h
158
+ non_body_param_names = %w[id]
159
+ body = request_data.except(*non_body_param_names)
160
+
161
+ request = Whop_sdk::Internal::JSON::Request.new(
162
+ base_url: request_options[:base_url] || @base_url || @environment&.dig(:api),
163
+ method: "PATCH",
164
+ path: "partners/businesses/#{URI.encode_uri_component(params[:id].to_s)}",
165
+ body: body,
166
+ request_options: request_options
167
+ )
168
+ begin
169
+ response = @client.send(request)
170
+ rescue Net::HTTPRequestTimeout
171
+ raise Whop_sdk::Errors::TimeoutError
172
+ end
173
+ code = response.code.to_i
174
+ if code.between?(200, 299)
175
+ (response.body.to_s.empty? ? nil : Whop_sdk::Partners::Businesses::Types::UpdateBusinessesResponse.load(response.body))
176
+ else
177
+ error_class = Whop_sdk::Errors::ResponseError.subclass_for_code(code)
178
+ raise error_class.new(response.body, code: code)
179
+ end
180
+ end
181
+
182
+ # Accept the authenticated partner's CPA offer with the reviewed terms and signed offer token. Public API access
183
+ # requires a partner OAuth token; business API keys are not supported.
184
+ #
185
+ # @param request_options [Hash]
186
+ # @param params [Whop_sdk::Partners::Businesses::Types::AcceptCommissionAdvanceBusinessesRequest]
187
+ # @option request_options [String] :base_url
188
+ # @option request_options [Hash{String => Object}] :additional_headers
189
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
190
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
191
+ # @option request_options [Integer] :timeout_in_seconds
192
+ # @option params [String] :id
193
+ #
194
+ # @example
195
+ # client.partners.businesses.accept_commission_advance(
196
+ # id: "id",
197
+ # acknowledgments: %w[commission_replacement clawback term],
198
+ # expected_amount_usd: "1439.99",
199
+ # offer_token: "eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
200
+ # terms_version: "2026-01-01"
201
+ # )
202
+ #
203
+ # @return [Whop_sdk::Partners::Businesses::Types::AcceptCommissionAdvanceBusinessesResponse]
204
+ def accept_commission_advance(request_options: {}, **params)
205
+ params = Whop_sdk::Internal::Types::Utils.normalize_keys(params)
206
+ request_data = Whop_sdk::Partners::Businesses::Types::AcceptCommissionAdvanceBusinessesRequest.new(params).to_h
207
+ non_body_param_names = %w[id]
208
+ body = request_data.except(*non_body_param_names)
209
+
210
+ request = Whop_sdk::Internal::JSON::Request.new(
211
+ base_url: request_options[:base_url] || @base_url || @environment&.dig(:api),
212
+ method: "POST",
213
+ path: "partners/businesses/#{URI.encode_uri_component(params[:id].to_s)}/accept_commission_advance",
214
+ body: body,
215
+ request_options: request_options
216
+ )
217
+ begin
218
+ response = @client.send(request)
219
+ rescue Net::HTTPRequestTimeout
220
+ raise Whop_sdk::Errors::TimeoutError
221
+ end
222
+ code = response.code.to_i
223
+ if code.between?(200, 299)
224
+ (response.body.to_s.empty? ? nil : Whop_sdk::Partners::Businesses::Types::AcceptCommissionAdvanceBusinessesResponse.load(response.body))
225
+ else
226
+ error_class = Whop_sdk::Errors::ResponseError.subclass_for_code(code)
227
+ raise error_class.new(response.body, code: code)
228
+ end
229
+ end
230
+
132
231
  # @return [Whop_sdk::Earnings::Client]
133
232
  def earnings
134
233
  @earnings ||= Whop_sdk::Partners::Businesses::Earnings::Client.new(client: @client, base_url: @base_url, environment: @environment)
@@ -16,6 +16,7 @@ module Whop_sdk
16
16
  ONBOARDING_REWARD = "onboarding_reward"
17
17
  PARTNER_REWARD = "partner_reward"
18
18
  VERIFIED_PARTNER_REFERRAL_PAYBACK = "verified_partner_referral_payback"
19
+ COMMISSION_ADVANCE = "commission_advance"
19
20
  end
20
21
  end
21
22
  end
@@ -16,6 +16,7 @@ module Whop_sdk
16
16
  ONBOARDING_REWARD = "onboarding_reward"
17
17
  PARTNER_REWARD = "partner_reward"
18
18
  VERIFIED_PARTNER_REFERRAL_PAYBACK = "verified_partner_referral_payback"
19
+ COMMISSION_ADVANCE = "commission_advance"
19
20
  end
20
21
  end
21
22
  end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Whop_sdk
4
+ module Partners
5
+ module Businesses
6
+ module Types
7
+ class AcceptCommissionAdvanceBusinessesRequest < Internal::Types::Model
8
+ field :id, -> { String }, optional: false, nullable: false
9
+
10
+ field :acknowledgments, -> { Internal::Types::Array[Whop_sdk::Partners::Businesses::Types::AcceptCommissionAdvanceBusinessesRequestAcknowledgmentsItem] }, optional: false, nullable: false
11
+
12
+ field :expected_amount_usd, -> { String }, optional: false, nullable: false
13
+
14
+ field :offer_token, -> { String }, optional: false, nullable: false
15
+
16
+ field :terms_version, -> { String }, optional: false, nullable: false
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Whop_sdk
4
+ module Partners
5
+ module Businesses
6
+ module Types
7
+ module AcceptCommissionAdvanceBusinessesRequestAcknowledgmentsItem
8
+ extend Whop_sdk::Internal::Types::Enum
9
+
10
+ COMMISSION_REPLACEMENT = "commission_replacement"
11
+ CLAWBACK = "clawback"
12
+ TERM = "term"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Whop_sdk
4
+ module Partners
5
+ module Businesses
6
+ module Types
7
+ class AcceptCommissionAdvanceBusinessesResponse < Internal::Types::Model
8
+ field :commission_advance, -> { Whop_sdk::Types::PartnerAdvance }, optional: false, nullable: false
9
+
10
+ field :id, -> { String }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -7,6 +7,8 @@ module Whop_sdk
7
7
  class ListBusinessesRequest < Internal::Types::Model
8
8
  field :referring_account_id, -> { String }, optional: true, nullable: false
9
9
 
10
+ field :advance_status, -> { Whop_sdk::Partners::Businesses::Types::ListBusinessesRequestAdvanceStatus }, optional: true, nullable: false
11
+
10
12
  field :status, -> { Whop_sdk::Partners::Businesses::Types::ListBusinessesRequestStatus }, optional: true, nullable: false
11
13
 
12
14
  field :has_earnings, -> { Internal::Types::Boolean }, optional: true, nullable: false
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Whop_sdk
4
+ module Partners
5
+ module Businesses
6
+ module Types
7
+ module ListBusinessesRequestAdvanceStatus
8
+ extend Whop_sdk::Internal::Types::Enum
9
+
10
+ PROJECTED = "projected"
11
+ AVAILABLE = "available"
12
+ ACCEPTED = "accepted"
13
+ FUNDED = "funded"
14
+ CLAWED_BACK = "clawed_back"
15
+ COMPLETED = "completed"
16
+ EXPIRED = "expired"
17
+ OFFERED = "offered"
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -9,6 +9,8 @@ module Whop_sdk
9
9
 
10
10
  field :blueprint_partner, -> { Whop_sdk::Partners::Businesses::Types::ListBusinessesResponseDataItemBlueprintPartner }, optional: false, nullable: true
11
11
 
12
+ field :commission_advance, -> { Whop_sdk::Types::PartnerAdvance }, optional: true, nullable: false
13
+
12
14
  field :created_at, -> { String }, optional: false, nullable: false
13
15
 
14
16
  field :earnings_usd, -> { Whop_sdk::Partners::Businesses::Types::ListBusinessesResponseDataItemEarningsUsd }, optional: false, nullable: false
@@ -9,6 +9,8 @@ module Whop_sdk
9
9
 
10
10
  field :blueprint_partner, -> { Whop_sdk::Partners::Businesses::Types::RetrieveBusinessesResponseBlueprintPartner }, optional: false, nullable: true
11
11
 
12
+ field :commission_advance, -> { Whop_sdk::Types::PartnerAdvance }, optional: true, nullable: false
13
+
12
14
  field :created_at, -> { String }, optional: false, nullable: false
13
15
 
14
16
  field :earnings_usd, -> { Whop_sdk::Partners::Businesses::Types::RetrieveBusinessesResponseEarningsUsd }, optional: false, nullable: false
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Whop_sdk
4
+ module Partners
5
+ module Businesses
6
+ module Types
7
+ class UpdateBusinessesRequest < Internal::Types::Model
8
+ field :id, -> { String }, optional: false, nullable: false
9
+
10
+ field :annual_ads_usd, -> { String }, optional: false, nullable: false
11
+
12
+ field :annual_processing_usd, -> { String }, optional: false, nullable: false
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Whop_sdk
4
+ module Partners
5
+ module Businesses
6
+ module Types
7
+ class UpdateBusinessesResponse < Internal::Types::Model
8
+ field :commission_advance, -> { Whop_sdk::Types::PartnerAdvance }, optional: false, nullable: false
9
+
10
+ field :id, -> { String }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -50,9 +50,8 @@ module Whop_sdk
50
50
  end
51
51
  end
52
52
 
53
- # Ranks referrers by partner business earnings — all-time by default, or over the current day, month, year, or
54
- # trailing 30 days. Authentication is optional: authenticated callers also get their own standing, anonymous
55
- # callers get the rankings alone.
53
+ # Ranks referrers by partner business earnings over the chosen `period`, all-time by default. Authentication is
54
+ # optional: authenticated callers also get their own standing, anonymous callers get the rankings alone.
56
55
  #
57
56
  # @param request_options [Hash]
58
57
  # @param params [Hash]
@@ -94,8 +93,7 @@ module Whop_sdk
94
93
  end
95
94
 
96
95
  # Lists the users the caller referred onto Whop, newest first by default, each with the caller's total affiliate
97
- # earnings from that user across all tiers. Earnings sorting uses cached totals. Authorized staff can set
98
- # user_id=global to list referrals across partners, with earnings for each user's current primary referrer.
96
+ # earnings from that user across all tiers.
99
97
  #
100
98
  # @param request_options [Hash]
101
99
  # @param params [Hash]
@@ -104,7 +102,6 @@ module Whop_sdk
104
102
  # @option request_options [Hash{String => Object}] :additional_query_parameters
105
103
  # @option request_options [Hash{String => Object}] :additional_body_parameters
106
104
  # @option request_options [Integer] :timeout_in_seconds
107
- # @option params [Whop_sdk::Partners::Types::ReferredUsersPartnersRequestUserID, nil] :user_id
108
105
  # @option params [String, nil] :earning_partner_id
109
106
  # @option params [String, nil] :earning_partner_username
110
107
  # @option params [String, nil] :referring_account_id
@@ -125,7 +122,6 @@ module Whop_sdk
125
122
  def referred_users(request_options: {}, **params)
126
123
  params = Whop_sdk::Internal::Types::Utils.normalize_keys(params)
127
124
  query_params = {}
128
- query_params["user_id"] = params[:user_id] if params.key?(:user_id)
129
125
  query_params["earning_partner_id"] = params[:earning_partner_id] if params.key?(:earning_partner_id)
130
126
  query_params["earning_partner_username"] = params[:earning_partner_username] if params.key?(:earning_partner_username)
131
127
  query_params["referring_account_id"] = params[:referring_account_id] if params.key?(:referring_account_id)
@@ -168,10 +164,9 @@ module Whop_sdk
168
164
  end
169
165
  end
170
166
 
171
- # Retrieves the authenticated user's public profile, enrollment date, partner verification timestamp, verification
172
- # waitlist status, partner certification completion, active direct business referral count, and default payout
173
- # rates. Use me or the authenticated user's own user ID; other users are not accessible. Users who have not
174
- # enrolled have a null joined_at. Create and manage referral links through /partner_referral_requests.
167
+ # Retrieves the authenticated user's partner profile: enrollment and verification status, certification
168
+ # completion, active direct business referral count, and default payout rates. Other users' profiles are not
169
+ # accessible. To create and manage referral links, use `/partner_referral_requests`.
175
170
  #
176
171
  # @param request_options [Hash]
177
172
  # @param params [Hash]
@@ -4,8 +4,6 @@ module Whop_sdk
4
4
  module Partners
5
5
  module Types
6
6
  class ReferredUsersPartnersRequest < Internal::Types::Model
7
- field :user_id, -> { Whop_sdk::Partners::Types::ReferredUsersPartnersRequestUserID }, optional: true, nullable: false
8
-
9
7
  field :earning_partner_id, -> { String }, optional: true, nullable: false
10
8
 
11
9
  field :earning_partner_username, -> { String }, optional: true, nullable: false