whop_sdk 0.0.24 → 0.0.26

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 (283) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/README.md +3 -3
  4. data/lib/whop_sdk/client.rb +16 -0
  5. data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +1 -1
  6. data/lib/whop_sdk/models/ai_chat.rb +89 -0
  7. data/lib/whop_sdk/models/ai_chat_create_params.rb +22 -0
  8. data/lib/whop_sdk/models/ai_chat_delete_params.rb +14 -0
  9. data/lib/whop_sdk/models/ai_chat_delete_response.rb +8 -0
  10. data/lib/whop_sdk/models/ai_chat_list_params.rb +46 -0
  11. data/lib/whop_sdk/models/ai_chat_list_response.rb +89 -0
  12. data/lib/whop_sdk/models/ai_chat_retrieve_params.rb +14 -0
  13. data/lib/whop_sdk/models/ai_chat_update_params.rb +22 -0
  14. data/lib/whop_sdk/models/api_version.rb +17 -0
  15. data/lib/whop_sdk/models/app_list_params.rb +1 -0
  16. data/lib/whop_sdk/models/authorized_user_list_params.rb +9 -9
  17. data/lib/whop_sdk/models/authorized_user_list_response.rb +31 -1
  18. data/lib/whop_sdk/models/authorized_user_retrieve_response.rb +31 -1
  19. data/lib/whop_sdk/models/bot_token_transaction_types.rb +17 -0
  20. data/lib/whop_sdk/models/cancel_options.rb +22 -0
  21. data/lib/whop_sdk/models/company_token_transaction.rb +165 -0
  22. data/lib/whop_sdk/models/company_token_transaction_create_params.rb +69 -0
  23. data/lib/whop_sdk/models/company_token_transaction_list_params.rb +70 -0
  24. data/lib/whop_sdk/models/company_token_transaction_list_response.rb +165 -0
  25. data/lib/whop_sdk/models/company_token_transaction_retrieve_params.rb +14 -0
  26. data/lib/whop_sdk/models/dm_channel.rb +43 -0
  27. data/lib/whop_sdk/models/dm_channel_create_params.rb +38 -0
  28. data/lib/whop_sdk/models/dm_channel_delete_params.rb +14 -0
  29. data/lib/whop_sdk/models/dm_channel_delete_response.rb +8 -0
  30. data/lib/whop_sdk/models/dm_channel_list_params.rb +54 -0
  31. data/lib/whop_sdk/models/dm_channel_list_response.rb +43 -0
  32. data/lib/whop_sdk/models/dm_channel_retrieve_params.rb +14 -0
  33. data/lib/whop_sdk/models/dm_channel_update_params.rb +22 -0
  34. data/lib/whop_sdk/models/dm_feed_member_notification_preferences.rb +17 -0
  35. data/lib/whop_sdk/models/dm_feed_member_statuses.rb +19 -0
  36. data/lib/whop_sdk/models/dm_member.rb +63 -0
  37. data/lib/whop_sdk/models/dm_member_create_params.rb +30 -0
  38. data/lib/whop_sdk/models/dm_member_delete_params.rb +14 -0
  39. data/lib/whop_sdk/models/dm_member_delete_response.rb +8 -0
  40. data/lib/whop_sdk/models/dm_member_list_params.rb +54 -0
  41. data/lib/whop_sdk/models/dm_member_list_response.rb +55 -0
  42. data/lib/whop_sdk/models/dm_member_retrieve_params.rb +14 -0
  43. data/lib/whop_sdk/models/dm_member_update_params.rb +30 -0
  44. data/lib/whop_sdk/models/file_create_response.rb +3 -18
  45. data/lib/whop_sdk/models/file_retrieve_response.rb +3 -18
  46. data/lib/whop_sdk/models/{lead_create_response.rb → lead.rb} +13 -13
  47. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +6 -63
  48. data/lib/whop_sdk/models/member_list_params.rb +9 -9
  49. data/lib/whop_sdk/models/membership.rb +3 -22
  50. data/lib/whop_sdk/models/membership_list_params.rb +3 -20
  51. data/lib/whop_sdk/models/membership_list_response.rb +3 -22
  52. data/lib/whop_sdk/models/message_create_params.rb +9 -1
  53. data/lib/whop_sdk/models/message_delete_params.rb +14 -0
  54. data/lib/whop_sdk/models/message_delete_response.rb +8 -0
  55. data/lib/whop_sdk/models/payment.rb +63 -1
  56. data/lib/whop_sdk/models/payment_list_response.rb +63 -1
  57. data/lib/whop_sdk/models/payment_method_types.rb +1 -0
  58. data/lib/whop_sdk/models/payout_destination_category.rb +20 -0
  59. data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +3 -20
  60. data/lib/whop_sdk/models/payout_method_list_response.rb +3 -20
  61. data/lib/whop_sdk/models/payout_method_retrieve_response.rb +3 -20
  62. data/lib/whop_sdk/models/reaction_create_params.rb +10 -1
  63. data/lib/whop_sdk/models/reaction_delete_params.rb +22 -0
  64. data/lib/whop_sdk/models/reaction_delete_response.rb +8 -0
  65. data/lib/whop_sdk/models/upload_status.rb +18 -0
  66. data/lib/whop_sdk/models/verification_error_code.rb +33 -0
  67. data/lib/whop_sdk/models/verification_retrieve_response.rb +6 -62
  68. data/lib/whop_sdk/models/verification_status.rb +27 -0
  69. data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +6 -62
  70. data/lib/whop_sdk/models/webhook.rb +88 -0
  71. data/lib/whop_sdk/models/webhook_create_params.rb +6 -56
  72. data/lib/whop_sdk/models/webhook_create_response.rb +9 -97
  73. data/lib/whop_sdk/models/webhook_event.rb +41 -0
  74. data/lib/whop_sdk/models/webhook_list_response.rb +6 -57
  75. data/lib/whop_sdk/models/webhook_update_params.rb +6 -56
  76. data/lib/whop_sdk/models/{withdrawal_create_response.rb → withdrawal.rb} +15 -15
  77. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +3 -267
  78. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +3 -267
  79. data/lib/whop_sdk/models.rb +74 -0
  80. data/lib/whop_sdk/resources/ai_chats.rb +141 -0
  81. data/lib/whop_sdk/resources/authorized_users.rb +4 -4
  82. data/lib/whop_sdk/resources/company_token_transactions.rb +121 -0
  83. data/lib/whop_sdk/resources/dm_channels.rb +151 -0
  84. data/lib/whop_sdk/resources/dm_members.rb +155 -0
  85. data/lib/whop_sdk/resources/leads.rb +6 -12
  86. data/lib/whop_sdk/resources/members.rb +4 -4
  87. data/lib/whop_sdk/resources/memberships.rb +1 -1
  88. data/lib/whop_sdk/resources/messages.rb +27 -1
  89. data/lib/whop_sdk/resources/reactions.rb +34 -1
  90. data/lib/whop_sdk/resources/webhooks.rb +8 -8
  91. data/lib/whop_sdk/resources/withdrawals.rb +4 -4
  92. data/lib/whop_sdk/version.rb +1 -1
  93. data/lib/whop_sdk.rb +50 -7
  94. data/rbi/whop_sdk/client.rbi +12 -0
  95. data/rbi/whop_sdk/models/ai_chat.rbi +118 -0
  96. data/rbi/whop_sdk/models/ai_chat_create_params.rbi +40 -0
  97. data/rbi/whop_sdk/models/ai_chat_delete_params.rbi +27 -0
  98. data/rbi/whop_sdk/models/ai_chat_delete_response.rbi +7 -0
  99. data/rbi/whop_sdk/models/ai_chat_list_params.rbi +67 -0
  100. data/rbi/whop_sdk/models/ai_chat_list_response.rbi +125 -0
  101. data/rbi/whop_sdk/models/ai_chat_retrieve_params.rbi +27 -0
  102. data/rbi/whop_sdk/models/ai_chat_update_params.rbi +40 -0
  103. data/rbi/whop_sdk/models/api_version.rbi +21 -0
  104. data/rbi/whop_sdk/models/app_list_params.rbi +2 -0
  105. data/rbi/whop_sdk/models/authorized_user_list_params.rbi +8 -8
  106. data/rbi/whop_sdk/models/authorized_user_list_response.rbi +47 -0
  107. data/rbi/whop_sdk/models/authorized_user_retrieve_response.rbi +49 -0
  108. data/rbi/whop_sdk/models/bot_token_transaction_types.rbi +28 -0
  109. data/rbi/whop_sdk/models/cancel_options.rbi +30 -0
  110. data/rbi/whop_sdk/models/company_token_transaction.rbi +237 -0
  111. data/rbi/whop_sdk/models/company_token_transaction_create_params.rbi +92 -0
  112. data/rbi/whop_sdk/models/company_token_transaction_list_params.rbi +96 -0
  113. data/rbi/whop_sdk/models/company_token_transaction_list_response.rbi +262 -0
  114. data/rbi/whop_sdk/models/company_token_transaction_retrieve_params.rbi +30 -0
  115. data/rbi/whop_sdk/models/dm_channel.rbi +60 -0
  116. data/rbi/whop_sdk/models/dm_channel_create_params.rbi +59 -0
  117. data/rbi/whop_sdk/models/dm_channel_delete_params.rbi +27 -0
  118. data/rbi/whop_sdk/models/dm_channel_delete_response.rbi +8 -0
  119. data/rbi/whop_sdk/models/dm_channel_list_params.rbi +75 -0
  120. data/rbi/whop_sdk/models/dm_channel_list_response.rbi +65 -0
  121. data/rbi/whop_sdk/models/dm_channel_retrieve_params.rbi +27 -0
  122. data/rbi/whop_sdk/models/dm_channel_update_params.rbi +43 -0
  123. data/rbi/whop_sdk/models/dm_feed_member_notification_preferences.rbi +34 -0
  124. data/rbi/whop_sdk/models/dm_feed_member_statuses.rbi +26 -0
  125. data/rbi/whop_sdk/models/dm_member.rbi +82 -0
  126. data/rbi/whop_sdk/models/dm_member_create_params.rbi +51 -0
  127. data/rbi/whop_sdk/models/dm_member_delete_params.rbi +27 -0
  128. data/rbi/whop_sdk/models/dm_member_delete_response.rbi +8 -0
  129. data/rbi/whop_sdk/models/dm_member_list_params.rbi +75 -0
  130. data/rbi/whop_sdk/models/dm_member_list_response.rbi +75 -0
  131. data/rbi/whop_sdk/models/dm_member_retrieve_params.rbi +27 -0
  132. data/rbi/whop_sdk/models/dm_member_update_params.rbi +57 -0
  133. data/rbi/whop_sdk/models/file_create_response.rbi +3 -49
  134. data/rbi/whop_sdk/models/file_retrieve_response.rbi +3 -51
  135. data/rbi/whop_sdk/models/{lead_update_response.rbi → lead.rbi} +17 -42
  136. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +6 -230
  137. data/rbi/whop_sdk/models/member_list_params.rbi +8 -8
  138. data/rbi/whop_sdk/models/membership.rbi +3 -47
  139. data/rbi/whop_sdk/models/membership_list_params.rbi +3 -70
  140. data/rbi/whop_sdk/models/membership_list_response.rbi +3 -73
  141. data/rbi/whop_sdk/models/message_create_params.rbi +8 -0
  142. data/rbi/whop_sdk/models/message_delete_params.rbi +27 -0
  143. data/rbi/whop_sdk/models/message_delete_response.rbi +8 -0
  144. data/rbi/whop_sdk/models/payment.rbi +88 -0
  145. data/rbi/whop_sdk/models/payment_list_response.rbi +100 -0
  146. data/rbi/whop_sdk/models/payment_method_types.rbi +1 -0
  147. data/rbi/whop_sdk/models/payout_destination_category.rbi +33 -0
  148. data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +3 -64
  149. data/rbi/whop_sdk/models/payout_method_list_response.rbi +3 -64
  150. data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +3 -64
  151. data/rbi/whop_sdk/models/reaction_create_params.rbi +10 -0
  152. data/rbi/whop_sdk/models/reaction_delete_params.rbi +40 -0
  153. data/rbi/whop_sdk/models/reaction_delete_response.rbi +8 -0
  154. data/rbi/whop_sdk/models/upload_status.rbi +22 -0
  155. data/rbi/whop_sdk/models/verification_error_code.rbi +101 -0
  156. data/rbi/whop_sdk/models/verification_retrieve_response.rbi +6 -230
  157. data/rbi/whop_sdk/models/verification_status.rbi +38 -0
  158. data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +6 -232
  159. data/rbi/whop_sdk/models/webhook.rbi +104 -0
  160. data/rbi/whop_sdk/models/webhook_create_params.rbi +6 -194
  161. data/rbi/whop_sdk/models/webhook_create_response.rbi +9 -386
  162. data/rbi/whop_sdk/models/webhook_event.rbi +79 -0
  163. data/rbi/whop_sdk/models/webhook_list_response.rbi +6 -210
  164. data/rbi/whop_sdk/models/webhook_update_params.rbi +6 -194
  165. data/rbi/whop_sdk/models/{withdrawal_create_response.rbi → withdrawal.rbi} +63 -127
  166. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +4 -571
  167. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +4 -571
  168. data/rbi/whop_sdk/models.rbi +78 -0
  169. data/rbi/whop_sdk/resources/ai_chats.rbi +108 -0
  170. data/rbi/whop_sdk/resources/authorized_users.rbi +3 -3
  171. data/rbi/whop_sdk/resources/company_token_transactions.rbi +112 -0
  172. data/rbi/whop_sdk/resources/dm_channels.rbi +121 -0
  173. data/rbi/whop_sdk/resources/dm_members.rbi +126 -0
  174. data/rbi/whop_sdk/resources/leads.rbi +3 -3
  175. data/rbi/whop_sdk/resources/members.rbi +3 -3
  176. data/rbi/whop_sdk/resources/memberships.rbi +1 -4
  177. data/rbi/whop_sdk/resources/messages.rbi +21 -0
  178. data/rbi/whop_sdk/resources/reactions.rbi +26 -0
  179. data/rbi/whop_sdk/resources/webhooks.rbi +6 -10
  180. data/rbi/whop_sdk/resources/withdrawals.rbi +2 -2
  181. data/sig/whop_sdk/client.rbs +8 -0
  182. data/sig/whop_sdk/models/ai_chat.rbs +65 -0
  183. data/sig/whop_sdk/models/ai_chat_create_params.rbs +23 -0
  184. data/sig/whop_sdk/models/ai_chat_delete_params.rbs +15 -0
  185. data/sig/whop_sdk/models/ai_chat_delete_response.rbs +5 -0
  186. data/sig/whop_sdk/models/ai_chat_list_params.rbs +36 -0
  187. data/sig/whop_sdk/models/ai_chat_list_response.rbs +65 -0
  188. data/sig/whop_sdk/models/ai_chat_retrieve_params.rbs +15 -0
  189. data/sig/whop_sdk/models/ai_chat_update_params.rbs +23 -0
  190. data/sig/whop_sdk/models/api_version.rbs +15 -0
  191. data/sig/whop_sdk/models/app_list_params.rbs +3 -1
  192. data/sig/whop_sdk/models/authorized_user_list_params.rbs +5 -5
  193. data/sig/whop_sdk/models/authorized_user_list_response.rbs +17 -0
  194. data/sig/whop_sdk/models/authorized_user_retrieve_response.rbs +17 -0
  195. data/sig/whop_sdk/models/bot_token_transaction_types.rbs +15 -0
  196. data/sig/whop_sdk/models/cancel_options.rbs +26 -0
  197. data/sig/whop_sdk/models/company_token_transaction.rbs +103 -0
  198. data/sig/whop_sdk/models/company_token_transaction_create_params.rbs +56 -0
  199. data/sig/whop_sdk/models/company_token_transaction_list_params.rbs +56 -0
  200. data/sig/whop_sdk/models/company_token_transaction_list_response.rbs +103 -0
  201. data/sig/whop_sdk/models/company_token_transaction_retrieve_params.rbs +15 -0
  202. data/sig/whop_sdk/models/dm_channel.rbs +30 -0
  203. data/sig/whop_sdk/models/dm_channel_create_params.rbs +36 -0
  204. data/sig/whop_sdk/models/dm_channel_delete_params.rbs +15 -0
  205. data/sig/whop_sdk/models/dm_channel_delete_response.rbs +5 -0
  206. data/sig/whop_sdk/models/dm_channel_list_params.rbs +46 -0
  207. data/sig/whop_sdk/models/dm_channel_list_response.rbs +30 -0
  208. data/sig/whop_sdk/models/dm_channel_retrieve_params.rbs +15 -0
  209. data/sig/whop_sdk/models/dm_channel_update_params.rbs +23 -0
  210. data/sig/whop_sdk/models/dm_feed_member_notification_preferences.rbs +15 -0
  211. data/sig/whop_sdk/models/dm_feed_member_statuses.rbs +18 -0
  212. data/sig/whop_sdk/models/dm_member.rbs +45 -0
  213. data/sig/whop_sdk/models/dm_member_create_params.rbs +28 -0
  214. data/sig/whop_sdk/models/dm_member_delete_params.rbs +15 -0
  215. data/sig/whop_sdk/models/dm_member_delete_response.rbs +5 -0
  216. data/sig/whop_sdk/models/dm_member_list_params.rbs +46 -0
  217. data/sig/whop_sdk/models/dm_member_list_response.rbs +40 -0
  218. data/sig/whop_sdk/models/dm_member_retrieve_params.rbs +15 -0
  219. data/sig/whop_sdk/models/dm_member_update_params.rbs +31 -0
  220. data/sig/whop_sdk/models/file_create_response.rbs +4 -17
  221. data/sig/whop_sdk/models/file_retrieve_response.rbs +4 -17
  222. data/sig/whop_sdk/models/{lead_create_response.rbs → lead.rbs} +14 -14
  223. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +8 -90
  224. data/sig/whop_sdk/models/member_list_params.rbs +5 -5
  225. data/sig/whop_sdk/models/membership.rbs +4 -27
  226. data/sig/whop_sdk/models/membership_list_params.rbs +4 -27
  227. data/sig/whop_sdk/models/membership_list_response.rbs +4 -27
  228. data/sig/whop_sdk/models/message_create_params.rbs +6 -1
  229. data/sig/whop_sdk/models/message_delete_params.rbs +15 -0
  230. data/sig/whop_sdk/models/message_delete_response.rbs +5 -0
  231. data/sig/whop_sdk/models/payment.rbs +47 -0
  232. data/sig/whop_sdk/models/payment_list_response.rbs +47 -0
  233. data/sig/whop_sdk/models/payment_method_types.rbs +2 -0
  234. data/sig/whop_sdk/models/payout_destination_category.rbs +19 -0
  235. data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +4 -25
  236. data/sig/whop_sdk/models/payout_method_list_response.rbs +4 -25
  237. data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +4 -25
  238. data/sig/whop_sdk/models/reaction_create_params.rbs +5 -1
  239. data/sig/whop_sdk/models/reaction_delete_params.rbs +23 -0
  240. data/sig/whop_sdk/models/reaction_delete_response.rbs +5 -0
  241. data/sig/whop_sdk/models/upload_status.rbs +16 -0
  242. data/sig/whop_sdk/models/verification_error_code.rbs +50 -0
  243. data/sig/whop_sdk/models/verification_retrieve_response.rbs +8 -90
  244. data/sig/whop_sdk/models/verification_status.rbs +38 -0
  245. data/sig/whop_sdk/models/verification_succeeded_webhook_event.rbs +8 -90
  246. data/sig/whop_sdk/models/webhook.rbs +60 -0
  247. data/sig/whop_sdk/models/webhook_create_params.rbs +8 -83
  248. data/sig/whop_sdk/models/webhook_create_response.rbs +12 -150
  249. data/sig/whop_sdk/models/webhook_event.rbs +66 -0
  250. data/sig/whop_sdk/models/webhook_list_response.rbs +8 -83
  251. data/sig/whop_sdk/models/webhook_update_params.rbs +8 -83
  252. data/sig/whop_sdk/models/{withdrawal_create_response.rbs → withdrawal.rbs} +15 -15
  253. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +4 -241
  254. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +4 -241
  255. data/sig/whop_sdk/models.rbs +74 -0
  256. data/sig/whop_sdk/resources/ai_chats.rbs +33 -0
  257. data/sig/whop_sdk/resources/authorized_users.rbs +1 -1
  258. data/sig/whop_sdk/resources/company_token_transactions.rbs +34 -0
  259. data/sig/whop_sdk/resources/dm_channels.rbs +36 -0
  260. data/sig/whop_sdk/resources/dm_members.rbs +36 -0
  261. data/sig/whop_sdk/resources/leads.rbs +3 -3
  262. data/sig/whop_sdk/resources/members.rbs +1 -1
  263. data/sig/whop_sdk/resources/memberships.rbs +1 -1
  264. data/sig/whop_sdk/resources/messages.rbs +3 -0
  265. data/sig/whop_sdk/resources/reactions.rbs +7 -0
  266. data/sig/whop_sdk/resources/webhooks.rbs +6 -6
  267. data/sig/whop_sdk/resources/withdrawals.rbs +2 -2
  268. metadata +152 -23
  269. data/lib/whop_sdk/models/lead_retrieve_response.rb +0 -149
  270. data/lib/whop_sdk/models/lead_update_response.rb +0 -149
  271. data/lib/whop_sdk/models/webhook_retrieve_response.rb +0 -176
  272. data/lib/whop_sdk/models/webhook_update_response.rb +0 -176
  273. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +0 -268
  274. data/rbi/whop_sdk/models/lead_create_response.rbi +0 -234
  275. data/rbi/whop_sdk/models/lead_retrieve_response.rbi +0 -238
  276. data/rbi/whop_sdk/models/webhook_retrieve_response.rbi +0 -491
  277. data/rbi/whop_sdk/models/webhook_update_response.rbi +0 -486
  278. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +0 -568
  279. data/sig/whop_sdk/models/lead_retrieve_response.rbs +0 -104
  280. data/sig/whop_sdk/models/lead_update_response.rbs +0 -104
  281. data/sig/whop_sdk/models/webhook_retrieve_response.rbs +0 -198
  282. data/sig/whop_sdk/models/webhook_update_response.rbs +0 -198
  283. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +0 -240
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AIChatUpdateParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::AIChatUpdateParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # The new title for the AI chat
15
+ sig { returns(T.nilable(String)) }
16
+ attr_accessor :title
17
+
18
+ sig do
19
+ params(
20
+ title: T.nilable(String),
21
+ request_options: WhopSDK::RequestOptions::OrHash
22
+ ).returns(T.attached_class)
23
+ end
24
+ def self.new(
25
+ # The new title for the AI chat
26
+ title: nil,
27
+ request_options: {}
28
+ )
29
+ end
30
+
31
+ sig do
32
+ override.returns(
33
+ { title: T.nilable(String), request_options: WhopSDK::RequestOptions }
34
+ )
35
+ end
36
+ def to_hash
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,21 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The different API versions
6
+ module APIVersion
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::APIVersion) }
10
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11
+
12
+ V1 = T.let(:v1, WhopSDK::APIVersion::TaggedSymbol)
13
+ V2 = T.let(:v2, WhopSDK::APIVersion::TaggedSymbol)
14
+ V5 = T.let(:v5, WhopSDK::APIVersion::TaggedSymbol)
15
+
16
+ sig { override.returns(T::Array[WhopSDK::APIVersion::TaggedSymbol]) }
17
+ def self.values
18
+ end
19
+ end
20
+ end
21
+ end
@@ -129,6 +129,8 @@ module WhopSDK
129
129
  T.type_alias { T.all(Symbol, WhopSDK::AppListParams::Order) }
130
130
  OrSymbol = T.type_alias { T.any(Symbol, String) }
131
131
 
132
+ CREATED_AT =
133
+ T.let(:created_at, WhopSDK::AppListParams::Order::TaggedSymbol)
132
134
  DISCOVERABLE_AT =
133
135
  T.let(:discoverable_at, WhopSDK::AppListParams::Order::TaggedSymbol)
134
136
  TOTAL_INSTALLS_LAST_30_DAYS =
@@ -11,10 +11,6 @@ module WhopSDK
11
11
  T.any(WhopSDK::AuthorizedUserListParams, WhopSDK::Internal::AnyHash)
12
12
  end
13
13
 
14
- # The ID of the company to list authorized users for
15
- sig { returns(String) }
16
- attr_accessor :company_id
17
-
18
14
  # Returns the elements in the list that come after the specified cursor.
19
15
  sig { returns(T.nilable(String)) }
20
16
  attr_accessor :after
@@ -23,6 +19,10 @@ module WhopSDK
23
19
  sig { returns(T.nilable(String)) }
24
20
  attr_accessor :before
25
21
 
22
+ # The ID of the company to list authorized users for
23
+ sig { returns(T.nilable(String)) }
24
+ attr_accessor :company_id
25
+
26
26
  # The minimum creation date to filter by
27
27
  sig { returns(T.nilable(Time)) }
28
28
  attr_accessor :created_after
@@ -49,9 +49,9 @@ module WhopSDK
49
49
 
50
50
  sig do
51
51
  params(
52
- company_id: String,
53
52
  after: T.nilable(String),
54
53
  before: T.nilable(String),
54
+ company_id: T.nilable(String),
55
55
  created_after: T.nilable(Time),
56
56
  created_before: T.nilable(Time),
57
57
  first: T.nilable(Integer),
@@ -62,12 +62,12 @@ module WhopSDK
62
62
  ).returns(T.attached_class)
63
63
  end
64
64
  def self.new(
65
- # The ID of the company to list authorized users for
66
- company_id:,
67
65
  # Returns the elements in the list that come after the specified cursor.
68
66
  after: nil,
69
67
  # Returns the elements in the list that come before the specified cursor.
70
68
  before: nil,
69
+ # The ID of the company to list authorized users for
70
+ company_id: nil,
71
71
  # The minimum creation date to filter by
72
72
  created_after: nil,
73
73
  # The maximum creation date to filter by
@@ -87,9 +87,9 @@ module WhopSDK
87
87
  sig do
88
88
  override.returns(
89
89
  {
90
- company_id: String,
91
90
  after: T.nilable(String),
92
91
  before: T.nilable(String),
92
+ company_id: T.nilable(String),
93
93
  created_after: T.nilable(Time),
94
94
  created_before: T.nilable(Time),
95
95
  first: T.nilable(Integer),
@@ -15,6 +15,17 @@ module WhopSDK
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
18
+ # The company associated with the authorized user.
19
+ sig { returns(WhopSDK::Models::AuthorizedUserListResponse::Company) }
20
+ attr_reader :company
21
+
22
+ sig do
23
+ params(
24
+ company: WhopSDK::Models::AuthorizedUserListResponse::Company::OrHash
25
+ ).void
26
+ end
27
+ attr_writer :company
28
+
18
29
  # The role of the authorized user in the company.
19
30
  sig { returns(WhopSDK::AuthorizedUserRoles::TaggedSymbol) }
20
31
  attr_accessor :role
@@ -34,6 +45,7 @@ module WhopSDK
34
45
  sig do
35
46
  params(
36
47
  id: String,
48
+ company: WhopSDK::Models::AuthorizedUserListResponse::Company::OrHash,
37
49
  role: WhopSDK::AuthorizedUserRoles::OrSymbol,
38
50
  user: WhopSDK::Models::AuthorizedUserListResponse::User::OrHash
39
51
  ).returns(T.attached_class)
@@ -41,6 +53,8 @@ module WhopSDK
41
53
  def self.new(
42
54
  # A unique ID representing the authorized user object.
43
55
  id:,
56
+ # The company associated with the authorized user.
57
+ company:,
44
58
  # The role of the authorized user in the company.
45
59
  role:,
46
60
  # The user associated with the authorized user.
@@ -52,6 +66,7 @@ module WhopSDK
52
66
  override.returns(
53
67
  {
54
68
  id: String,
69
+ company: WhopSDK::Models::AuthorizedUserListResponse::Company,
55
70
  role: WhopSDK::AuthorizedUserRoles::TaggedSymbol,
56
71
  user: WhopSDK::Models::AuthorizedUserListResponse::User
57
72
  }
@@ -60,6 +75,38 @@ module WhopSDK
60
75
  def to_hash
61
76
  end
62
77
 
78
+ class Company < WhopSDK::Internal::Type::BaseModel
79
+ OrHash =
80
+ T.type_alias do
81
+ T.any(
82
+ WhopSDK::Models::AuthorizedUserListResponse::Company,
83
+ WhopSDK::Internal::AnyHash
84
+ )
85
+ end
86
+
87
+ # The ID (tag) of the company.
88
+ sig { returns(String) }
89
+ attr_accessor :id
90
+
91
+ # The title of the company.
92
+ sig { returns(String) }
93
+ attr_accessor :title
94
+
95
+ # The company associated with the authorized user.
96
+ sig { params(id: String, title: String).returns(T.attached_class) }
97
+ def self.new(
98
+ # The ID (tag) of the company.
99
+ id:,
100
+ # The title of the company.
101
+ title:
102
+ )
103
+ end
104
+
105
+ sig { override.returns({ id: String, title: String }) }
106
+ def to_hash
107
+ end
108
+ end
109
+
63
110
  class User < WhopSDK::Internal::Type::BaseModel
64
111
  OrHash =
65
112
  T.type_alias do
@@ -15,6 +15,18 @@ module WhopSDK
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
18
+ # The company associated with the authorized user.
19
+ sig { returns(WhopSDK::Models::AuthorizedUserRetrieveResponse::Company) }
20
+ attr_reader :company
21
+
22
+ sig do
23
+ params(
24
+ company:
25
+ WhopSDK::Models::AuthorizedUserRetrieveResponse::Company::OrHash
26
+ ).void
27
+ end
28
+ attr_writer :company
29
+
18
30
  # The role of the authorized user in the company.
19
31
  sig { returns(WhopSDK::AuthorizedUserRoles::TaggedSymbol) }
20
32
  attr_accessor :role
@@ -34,6 +46,8 @@ module WhopSDK
34
46
  sig do
35
47
  params(
36
48
  id: String,
49
+ company:
50
+ WhopSDK::Models::AuthorizedUserRetrieveResponse::Company::OrHash,
37
51
  role: WhopSDK::AuthorizedUserRoles::OrSymbol,
38
52
  user: WhopSDK::Models::AuthorizedUserRetrieveResponse::User::OrHash
39
53
  ).returns(T.attached_class)
@@ -41,6 +55,8 @@ module WhopSDK
41
55
  def self.new(
42
56
  # A unique ID representing the authorized user object.
43
57
  id:,
58
+ # The company associated with the authorized user.
59
+ company:,
44
60
  # The role of the authorized user in the company.
45
61
  role:,
46
62
  # The user associated with the authorized user.
@@ -52,6 +68,7 @@ module WhopSDK
52
68
  override.returns(
53
69
  {
54
70
  id: String,
71
+ company: WhopSDK::Models::AuthorizedUserRetrieveResponse::Company,
55
72
  role: WhopSDK::AuthorizedUserRoles::TaggedSymbol,
56
73
  user: WhopSDK::Models::AuthorizedUserRetrieveResponse::User
57
74
  }
@@ -60,6 +77,38 @@ module WhopSDK
60
77
  def to_hash
61
78
  end
62
79
 
80
+ class Company < WhopSDK::Internal::Type::BaseModel
81
+ OrHash =
82
+ T.type_alias do
83
+ T.any(
84
+ WhopSDK::Models::AuthorizedUserRetrieveResponse::Company,
85
+ WhopSDK::Internal::AnyHash
86
+ )
87
+ end
88
+
89
+ # The ID (tag) of the company.
90
+ sig { returns(String) }
91
+ attr_accessor :id
92
+
93
+ # The title of the company.
94
+ sig { returns(String) }
95
+ attr_accessor :title
96
+
97
+ # The company associated with the authorized user.
98
+ sig { params(id: String, title: String).returns(T.attached_class) }
99
+ def self.new(
100
+ # The ID (tag) of the company.
101
+ id:,
102
+ # The title of the company.
103
+ title:
104
+ )
105
+ end
106
+
107
+ sig { override.returns({ id: String, title: String }) }
108
+ def to_hash
109
+ end
110
+ end
111
+
63
112
  class User < WhopSDK::Internal::Type::BaseModel
64
113
  OrHash =
65
114
  T.type_alias do
@@ -0,0 +1,28 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The type of token transaction
6
+ module BotTokenTransactionTypes
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ TaggedSymbol =
10
+ T.type_alias { T.all(Symbol, WhopSDK::BotTokenTransactionTypes) }
11
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
12
+
13
+ ADD = T.let(:add, WhopSDK::BotTokenTransactionTypes::TaggedSymbol)
14
+ SUBTRACT =
15
+ T.let(:subtract, WhopSDK::BotTokenTransactionTypes::TaggedSymbol)
16
+ TRANSFER =
17
+ T.let(:transfer, WhopSDK::BotTokenTransactionTypes::TaggedSymbol)
18
+
19
+ sig do
20
+ override.returns(
21
+ T::Array[WhopSDK::BotTokenTransactionTypes::TaggedSymbol]
22
+ )
23
+ end
24
+ def self.values
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,30 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The different reasons a user can choose for why they are canceling their
6
+ # membership.
7
+ module CancelOptions
8
+ extend WhopSDK::Internal::Type::Enum
9
+
10
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::CancelOptions) }
11
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
12
+
13
+ TOO_EXPENSIVE =
14
+ T.let(:too_expensive, WhopSDK::CancelOptions::TaggedSymbol)
15
+ SWITCHING = T.let(:switching, WhopSDK::CancelOptions::TaggedSymbol)
16
+ MISSING_FEATURES =
17
+ T.let(:missing_features, WhopSDK::CancelOptions::TaggedSymbol)
18
+ TECHNICAL_ISSUES =
19
+ T.let(:technical_issues, WhopSDK::CancelOptions::TaggedSymbol)
20
+ BAD_EXPERIENCE =
21
+ T.let(:bad_experience, WhopSDK::CancelOptions::TaggedSymbol)
22
+ OTHER = T.let(:other, WhopSDK::CancelOptions::TaggedSymbol)
23
+ TESTING = T.let(:testing, WhopSDK::CancelOptions::TaggedSymbol)
24
+
25
+ sig { override.returns(T::Array[WhopSDK::CancelOptions::TaggedSymbol]) }
26
+ def self.values
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,237 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class CompanyTokenTransaction < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(WhopSDK::CompanyTokenTransaction, WhopSDK::Internal::AnyHash)
9
+ end
10
+
11
+ # The ID of the transaction
12
+ sig { returns(String) }
13
+ attr_accessor :id
14
+
15
+ # The transaction amount (always positive)
16
+ sig { returns(Float) }
17
+ attr_accessor :amount
18
+
19
+ # The company
20
+ sig { returns(WhopSDK::CompanyTokenTransaction::Company) }
21
+ attr_reader :company
22
+
23
+ sig do
24
+ params(company: WhopSDK::CompanyTokenTransaction::Company::OrHash).void
25
+ end
26
+ attr_writer :company
27
+
28
+ # When the transaction was created
29
+ sig { returns(Time) }
30
+ attr_accessor :created_at
31
+
32
+ # Optional description
33
+ sig { returns(T.nilable(String)) }
34
+ attr_accessor :description
35
+
36
+ # Optional idempotency key to prevent duplicate transactions
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :idempotency_key
39
+
40
+ # For transfers, the ID of the linked transaction
41
+ sig { returns(T.nilable(String)) }
42
+ attr_accessor :linked_transaction_id
43
+
44
+ # The member
45
+ sig { returns(WhopSDK::CompanyTokenTransaction::Member) }
46
+ attr_reader :member
47
+
48
+ sig do
49
+ params(member: WhopSDK::CompanyTokenTransaction::Member::OrHash).void
50
+ end
51
+ attr_writer :member
52
+
53
+ # The type of transaction
54
+ sig { returns(WhopSDK::BotTokenTransactionTypes::TaggedSymbol) }
55
+ attr_accessor :transaction_type
56
+
57
+ # The user whose balance changed
58
+ sig { returns(WhopSDK::CompanyTokenTransaction::User) }
59
+ attr_reader :user
60
+
61
+ sig { params(user: WhopSDK::CompanyTokenTransaction::User::OrHash).void }
62
+ attr_writer :user
63
+
64
+ # A token transaction within a company
65
+ sig do
66
+ params(
67
+ id: String,
68
+ amount: Float,
69
+ company: WhopSDK::CompanyTokenTransaction::Company::OrHash,
70
+ created_at: Time,
71
+ description: T.nilable(String),
72
+ idempotency_key: T.nilable(String),
73
+ linked_transaction_id: T.nilable(String),
74
+ member: WhopSDK::CompanyTokenTransaction::Member::OrHash,
75
+ transaction_type: WhopSDK::BotTokenTransactionTypes::OrSymbol,
76
+ user: WhopSDK::CompanyTokenTransaction::User::OrHash
77
+ ).returns(T.attached_class)
78
+ end
79
+ def self.new(
80
+ # The ID of the transaction
81
+ id:,
82
+ # The transaction amount (always positive)
83
+ amount:,
84
+ # The company
85
+ company:,
86
+ # When the transaction was created
87
+ created_at:,
88
+ # Optional description
89
+ description:,
90
+ # Optional idempotency key to prevent duplicate transactions
91
+ idempotency_key:,
92
+ # For transfers, the ID of the linked transaction
93
+ linked_transaction_id:,
94
+ # The member
95
+ member:,
96
+ # The type of transaction
97
+ transaction_type:,
98
+ # The user whose balance changed
99
+ user:
100
+ )
101
+ end
102
+
103
+ sig do
104
+ override.returns(
105
+ {
106
+ id: String,
107
+ amount: Float,
108
+ company: WhopSDK::CompanyTokenTransaction::Company,
109
+ created_at: Time,
110
+ description: T.nilable(String),
111
+ idempotency_key: T.nilable(String),
112
+ linked_transaction_id: T.nilable(String),
113
+ member: WhopSDK::CompanyTokenTransaction::Member,
114
+ transaction_type: WhopSDK::BotTokenTransactionTypes::TaggedSymbol,
115
+ user: WhopSDK::CompanyTokenTransaction::User
116
+ }
117
+ )
118
+ end
119
+ def to_hash
120
+ end
121
+
122
+ class Company < WhopSDK::Internal::Type::BaseModel
123
+ OrHash =
124
+ T.type_alias do
125
+ T.any(
126
+ WhopSDK::CompanyTokenTransaction::Company,
127
+ WhopSDK::Internal::AnyHash
128
+ )
129
+ end
130
+
131
+ # The ID of the company
132
+ sig { returns(String) }
133
+ attr_accessor :id
134
+
135
+ # The slug/route of the company on the Whop site.
136
+ sig { returns(String) }
137
+ attr_accessor :route
138
+
139
+ # The written name of the company.
140
+ sig { returns(String) }
141
+ attr_accessor :title
142
+
143
+ # The company
144
+ sig do
145
+ params(id: String, route: String, title: String).returns(
146
+ T.attached_class
147
+ )
148
+ end
149
+ def self.new(
150
+ # The ID of the company
151
+ id:,
152
+ # The slug/route of the company on the Whop site.
153
+ route:,
154
+ # The written name of the company.
155
+ title:
156
+ )
157
+ end
158
+
159
+ sig { override.returns({ id: String, route: String, title: String }) }
160
+ def to_hash
161
+ end
162
+ end
163
+
164
+ class Member < WhopSDK::Internal::Type::BaseModel
165
+ OrHash =
166
+ T.type_alias do
167
+ T.any(
168
+ WhopSDK::CompanyTokenTransaction::Member,
169
+ WhopSDK::Internal::AnyHash
170
+ )
171
+ end
172
+
173
+ # The ID of the member
174
+ sig { returns(String) }
175
+ attr_accessor :id
176
+
177
+ # The member
178
+ sig { params(id: String).returns(T.attached_class) }
179
+ def self.new(
180
+ # The ID of the member
181
+ id:
182
+ )
183
+ end
184
+
185
+ sig { override.returns({ id: String }) }
186
+ def to_hash
187
+ end
188
+ end
189
+
190
+ class User < WhopSDK::Internal::Type::BaseModel
191
+ OrHash =
192
+ T.type_alias do
193
+ T.any(
194
+ WhopSDK::CompanyTokenTransaction::User,
195
+ WhopSDK::Internal::AnyHash
196
+ )
197
+ end
198
+
199
+ # The internal ID of the user.
200
+ sig { returns(String) }
201
+ attr_accessor :id
202
+
203
+ # The name of the user from their Whop account.
204
+ sig { returns(T.nilable(String)) }
205
+ attr_accessor :name
206
+
207
+ # The username of the user from their Whop account.
208
+ sig { returns(String) }
209
+ attr_accessor :username
210
+
211
+ # The user whose balance changed
212
+ sig do
213
+ params(id: String, name: T.nilable(String), username: String).returns(
214
+ T.attached_class
215
+ )
216
+ end
217
+ def self.new(
218
+ # The internal ID of the user.
219
+ id:,
220
+ # The name of the user from their Whop account.
221
+ name:,
222
+ # The username of the user from their Whop account.
223
+ username:
224
+ )
225
+ end
226
+
227
+ sig do
228
+ override.returns(
229
+ { id: String, name: T.nilable(String), username: String }
230
+ )
231
+ end
232
+ def to_hash
233
+ end
234
+ end
235
+ end
236
+ end
237
+ end
@@ -0,0 +1,92 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class CompanyTokenTransactionCreateParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ WhopSDK::CompanyTokenTransactionCreateParams,
13
+ WhopSDK::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The positive amount of tokens
18
+ sig { returns(Float) }
19
+ attr_accessor :amount
20
+
21
+ # The company ID
22
+ sig { returns(String) }
23
+ attr_accessor :company_id
24
+
25
+ # Required for transfers - the user to receive tokens
26
+ sig { returns(String) }
27
+ attr_accessor :destination_user_id
28
+
29
+ sig { returns(Symbol) }
30
+ attr_accessor :transaction_type
31
+
32
+ # The user ID whose balance will change
33
+ sig { returns(String) }
34
+ attr_accessor :user_id
35
+
36
+ # Optional description for the transaction
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :description
39
+
40
+ # Optional key to prevent duplicate transactions
41
+ sig { returns(T.nilable(String)) }
42
+ attr_accessor :idempotency_key
43
+
44
+ sig do
45
+ params(
46
+ amount: Float,
47
+ company_id: String,
48
+ destination_user_id: String,
49
+ user_id: String,
50
+ description: T.nilable(String),
51
+ idempotency_key: T.nilable(String),
52
+ transaction_type: Symbol,
53
+ request_options: WhopSDK::RequestOptions::OrHash
54
+ ).returns(T.attached_class)
55
+ end
56
+ def self.new(
57
+ # The positive amount of tokens
58
+ amount:,
59
+ # The company ID
60
+ company_id:,
61
+ # Required for transfers - the user to receive tokens
62
+ destination_user_id:,
63
+ # The user ID whose balance will change
64
+ user_id:,
65
+ # Optional description for the transaction
66
+ description: nil,
67
+ # Optional key to prevent duplicate transactions
68
+ idempotency_key: nil,
69
+ transaction_type: :subtract,
70
+ request_options: {}
71
+ )
72
+ end
73
+
74
+ sig do
75
+ override.returns(
76
+ {
77
+ amount: Float,
78
+ company_id: String,
79
+ destination_user_id: String,
80
+ transaction_type: Symbol,
81
+ user_id: String,
82
+ description: T.nilable(String),
83
+ idempotency_key: T.nilable(String),
84
+ request_options: WhopSDK::RequestOptions
85
+ }
86
+ )
87
+ end
88
+ def to_hash
89
+ end
90
+ end
91
+ end
92
+ end