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,165 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CompanyTokenTransactions#create
6
+ class CompanyTokenTransaction < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the transaction
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute amount
14
+ # The transaction amount (always positive)
15
+ #
16
+ # @return [Float]
17
+ required :amount, Float
18
+
19
+ # @!attribute company
20
+ # The company
21
+ #
22
+ # @return [WhopSDK::Models::CompanyTokenTransaction::Company]
23
+ required :company, -> { WhopSDK::CompanyTokenTransaction::Company }
24
+
25
+ # @!attribute created_at
26
+ # When the transaction was created
27
+ #
28
+ # @return [Time]
29
+ required :created_at, Time
30
+
31
+ # @!attribute description
32
+ # Optional description
33
+ #
34
+ # @return [String, nil]
35
+ required :description, String, nil?: true
36
+
37
+ # @!attribute idempotency_key
38
+ # Optional idempotency key to prevent duplicate transactions
39
+ #
40
+ # @return [String, nil]
41
+ required :idempotency_key, String, nil?: true
42
+
43
+ # @!attribute linked_transaction_id
44
+ # For transfers, the ID of the linked transaction
45
+ #
46
+ # @return [String, nil]
47
+ required :linked_transaction_id, String, nil?: true
48
+
49
+ # @!attribute member
50
+ # The member
51
+ #
52
+ # @return [WhopSDK::Models::CompanyTokenTransaction::Member]
53
+ required :member, -> { WhopSDK::CompanyTokenTransaction::Member }
54
+
55
+ # @!attribute transaction_type
56
+ # The type of transaction
57
+ #
58
+ # @return [Symbol, WhopSDK::Models::BotTokenTransactionTypes]
59
+ required :transaction_type, enum: -> { WhopSDK::BotTokenTransactionTypes }
60
+
61
+ # @!attribute user
62
+ # The user whose balance changed
63
+ #
64
+ # @return [WhopSDK::Models::CompanyTokenTransaction::User]
65
+ required :user, -> { WhopSDK::CompanyTokenTransaction::User }
66
+
67
+ # @!method initialize(id:, amount:, company:, created_at:, description:, idempotency_key:, linked_transaction_id:, member:, transaction_type:, user:)
68
+ # A token transaction within a company
69
+ #
70
+ # @param id [String] The ID of the transaction
71
+ #
72
+ # @param amount [Float] The transaction amount (always positive)
73
+ #
74
+ # @param company [WhopSDK::Models::CompanyTokenTransaction::Company] The company
75
+ #
76
+ # @param created_at [Time] When the transaction was created
77
+ #
78
+ # @param description [String, nil] Optional description
79
+ #
80
+ # @param idempotency_key [String, nil] Optional idempotency key to prevent duplicate transactions
81
+ #
82
+ # @param linked_transaction_id [String, nil] For transfers, the ID of the linked transaction
83
+ #
84
+ # @param member [WhopSDK::Models::CompanyTokenTransaction::Member] The member
85
+ #
86
+ # @param transaction_type [Symbol, WhopSDK::Models::BotTokenTransactionTypes] The type of transaction
87
+ #
88
+ # @param user [WhopSDK::Models::CompanyTokenTransaction::User] The user whose balance changed
89
+
90
+ # @see WhopSDK::Models::CompanyTokenTransaction#company
91
+ class Company < WhopSDK::Internal::Type::BaseModel
92
+ # @!attribute id
93
+ # The ID of the company
94
+ #
95
+ # @return [String]
96
+ required :id, String
97
+
98
+ # @!attribute route
99
+ # The slug/route of the company on the Whop site.
100
+ #
101
+ # @return [String]
102
+ required :route, String
103
+
104
+ # @!attribute title
105
+ # The written name of the company.
106
+ #
107
+ # @return [String]
108
+ required :title, String
109
+
110
+ # @!method initialize(id:, route:, title:)
111
+ # The company
112
+ #
113
+ # @param id [String] The ID of the company
114
+ #
115
+ # @param route [String] The slug/route of the company on the Whop site.
116
+ #
117
+ # @param title [String] The written name of the company.
118
+ end
119
+
120
+ # @see WhopSDK::Models::CompanyTokenTransaction#member
121
+ class Member < WhopSDK::Internal::Type::BaseModel
122
+ # @!attribute id
123
+ # The ID of the member
124
+ #
125
+ # @return [String]
126
+ required :id, String
127
+
128
+ # @!method initialize(id:)
129
+ # The member
130
+ #
131
+ # @param id [String] The ID of the member
132
+ end
133
+
134
+ # @see WhopSDK::Models::CompanyTokenTransaction#user
135
+ class User < WhopSDK::Internal::Type::BaseModel
136
+ # @!attribute id
137
+ # The internal ID of the user.
138
+ #
139
+ # @return [String]
140
+ required :id, String
141
+
142
+ # @!attribute name
143
+ # The name of the user from their Whop account.
144
+ #
145
+ # @return [String, nil]
146
+ required :name, String, nil?: true
147
+
148
+ # @!attribute username
149
+ # The username of the user from their Whop account.
150
+ #
151
+ # @return [String]
152
+ required :username, String
153
+
154
+ # @!method initialize(id:, name:, username:)
155
+ # The user whose balance changed
156
+ #
157
+ # @param id [String] The internal ID of the user.
158
+ #
159
+ # @param name [String, nil] The name of the user from their Whop account.
160
+ #
161
+ # @param username [String] The username of the user from their Whop account.
162
+ end
163
+ end
164
+ end
165
+ end
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CompanyTokenTransactions#create
6
+ class CompanyTokenTransactionCreateParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute amount
11
+ # The positive amount of tokens
12
+ #
13
+ # @return [Float]
14
+ required :amount, Float
15
+
16
+ # @!attribute company_id
17
+ # The company ID
18
+ #
19
+ # @return [String]
20
+ required :company_id, String
21
+
22
+ # @!attribute destination_user_id
23
+ # Required for transfers - the user to receive tokens
24
+ #
25
+ # @return [String]
26
+ required :destination_user_id, String
27
+
28
+ # @!attribute transaction_type
29
+ #
30
+ # @return [Symbol, :subtract]
31
+ required :transaction_type, const: :subtract
32
+
33
+ # @!attribute user_id
34
+ # The user ID whose balance will change
35
+ #
36
+ # @return [String]
37
+ required :user_id, String
38
+
39
+ # @!attribute description
40
+ # Optional description for the transaction
41
+ #
42
+ # @return [String, nil]
43
+ optional :description, String, nil?: true
44
+
45
+ # @!attribute idempotency_key
46
+ # Optional key to prevent duplicate transactions
47
+ #
48
+ # @return [String, nil]
49
+ optional :idempotency_key, String, nil?: true
50
+
51
+ # @!method initialize(amount:, company_id:, destination_user_id:, user_id:, description: nil, idempotency_key: nil, transaction_type: :subtract, request_options: {})
52
+ # @param amount [Float] The positive amount of tokens
53
+ #
54
+ # @param company_id [String] The company ID
55
+ #
56
+ # @param destination_user_id [String] Required for transfers - the user to receive tokens
57
+ #
58
+ # @param user_id [String] The user ID whose balance will change
59
+ #
60
+ # @param description [String, nil] Optional description for the transaction
61
+ #
62
+ # @param idempotency_key [String, nil] Optional key to prevent duplicate transactions
63
+ #
64
+ # @param transaction_type [Symbol, :subtract]
65
+ #
66
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CompanyTokenTransactions#list
6
+ class CompanyTokenTransactionListParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute company_id
11
+ # The ID of the company
12
+ #
13
+ # @return [String]
14
+ required :company_id, String
15
+
16
+ # @!attribute after
17
+ # Returns the elements in the list that come after the specified cursor.
18
+ #
19
+ # @return [String, nil]
20
+ optional :after, String, nil?: true
21
+
22
+ # @!attribute before
23
+ # Returns the elements in the list that come before the specified cursor.
24
+ #
25
+ # @return [String, nil]
26
+ optional :before, String, nil?: true
27
+
28
+ # @!attribute first
29
+ # Returns the first _n_ elements from the list.
30
+ #
31
+ # @return [Integer, nil]
32
+ optional :first, Integer, nil?: true
33
+
34
+ # @!attribute last
35
+ # Returns the last _n_ elements from the list.
36
+ #
37
+ # @return [Integer, nil]
38
+ optional :last, Integer, nil?: true
39
+
40
+ # @!attribute transaction_type
41
+ # The type of token transaction
42
+ #
43
+ # @return [Symbol, WhopSDK::Models::BotTokenTransactionTypes, nil]
44
+ optional :transaction_type, enum: -> { WhopSDK::BotTokenTransactionTypes }, nil?: true
45
+
46
+ # @!attribute user_id
47
+ # Filter by user ID
48
+ #
49
+ # @return [String, nil]
50
+ optional :user_id, String, nil?: true
51
+
52
+ # @!method initialize(company_id:, after: nil, before: nil, first: nil, last: nil, transaction_type: nil, user_id: nil, request_options: {})
53
+ # @param company_id [String] The ID of the company
54
+ #
55
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
56
+ #
57
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
58
+ #
59
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
60
+ #
61
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
62
+ #
63
+ # @param transaction_type [Symbol, WhopSDK::Models::BotTokenTransactionTypes, nil] The type of token transaction
64
+ #
65
+ # @param user_id [String, nil] Filter by user ID
66
+ #
67
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,165 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CompanyTokenTransactions#list
6
+ class CompanyTokenTransactionListResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the transaction
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute amount
14
+ # The transaction amount (always positive)
15
+ #
16
+ # @return [Float]
17
+ required :amount, Float
18
+
19
+ # @!attribute company
20
+ # The company
21
+ #
22
+ # @return [WhopSDK::Models::CompanyTokenTransactionListResponse::Company]
23
+ required :company, -> { WhopSDK::Models::CompanyTokenTransactionListResponse::Company }
24
+
25
+ # @!attribute created_at
26
+ # When the transaction was created
27
+ #
28
+ # @return [Time]
29
+ required :created_at, Time
30
+
31
+ # @!attribute description
32
+ # Optional description
33
+ #
34
+ # @return [String, nil]
35
+ required :description, String, nil?: true
36
+
37
+ # @!attribute idempotency_key
38
+ # Optional idempotency key to prevent duplicate transactions
39
+ #
40
+ # @return [String, nil]
41
+ required :idempotency_key, String, nil?: true
42
+
43
+ # @!attribute linked_transaction_id
44
+ # For transfers, the ID of the linked transaction
45
+ #
46
+ # @return [String, nil]
47
+ required :linked_transaction_id, String, nil?: true
48
+
49
+ # @!attribute member
50
+ # The member
51
+ #
52
+ # @return [WhopSDK::Models::CompanyTokenTransactionListResponse::Member]
53
+ required :member, -> { WhopSDK::Models::CompanyTokenTransactionListResponse::Member }
54
+
55
+ # @!attribute transaction_type
56
+ # The type of transaction
57
+ #
58
+ # @return [Symbol, WhopSDK::Models::BotTokenTransactionTypes]
59
+ required :transaction_type, enum: -> { WhopSDK::BotTokenTransactionTypes }
60
+
61
+ # @!attribute user
62
+ # The user whose balance changed
63
+ #
64
+ # @return [WhopSDK::Models::CompanyTokenTransactionListResponse::User]
65
+ required :user, -> { WhopSDK::Models::CompanyTokenTransactionListResponse::User }
66
+
67
+ # @!method initialize(id:, amount:, company:, created_at:, description:, idempotency_key:, linked_transaction_id:, member:, transaction_type:, user:)
68
+ # A token transaction within a company
69
+ #
70
+ # @param id [String] The ID of the transaction
71
+ #
72
+ # @param amount [Float] The transaction amount (always positive)
73
+ #
74
+ # @param company [WhopSDK::Models::CompanyTokenTransactionListResponse::Company] The company
75
+ #
76
+ # @param created_at [Time] When the transaction was created
77
+ #
78
+ # @param description [String, nil] Optional description
79
+ #
80
+ # @param idempotency_key [String, nil] Optional idempotency key to prevent duplicate transactions
81
+ #
82
+ # @param linked_transaction_id [String, nil] For transfers, the ID of the linked transaction
83
+ #
84
+ # @param member [WhopSDK::Models::CompanyTokenTransactionListResponse::Member] The member
85
+ #
86
+ # @param transaction_type [Symbol, WhopSDK::Models::BotTokenTransactionTypes] The type of transaction
87
+ #
88
+ # @param user [WhopSDK::Models::CompanyTokenTransactionListResponse::User] The user whose balance changed
89
+
90
+ # @see WhopSDK::Models::CompanyTokenTransactionListResponse#company
91
+ class Company < WhopSDK::Internal::Type::BaseModel
92
+ # @!attribute id
93
+ # The ID of the company
94
+ #
95
+ # @return [String]
96
+ required :id, String
97
+
98
+ # @!attribute route
99
+ # The slug/route of the company on the Whop site.
100
+ #
101
+ # @return [String]
102
+ required :route, String
103
+
104
+ # @!attribute title
105
+ # The written name of the company.
106
+ #
107
+ # @return [String]
108
+ required :title, String
109
+
110
+ # @!method initialize(id:, route:, title:)
111
+ # The company
112
+ #
113
+ # @param id [String] The ID of the company
114
+ #
115
+ # @param route [String] The slug/route of the company on the Whop site.
116
+ #
117
+ # @param title [String] The written name of the company.
118
+ end
119
+
120
+ # @see WhopSDK::Models::CompanyTokenTransactionListResponse#member
121
+ class Member < WhopSDK::Internal::Type::BaseModel
122
+ # @!attribute id
123
+ # The ID of the member
124
+ #
125
+ # @return [String]
126
+ required :id, String
127
+
128
+ # @!method initialize(id:)
129
+ # The member
130
+ #
131
+ # @param id [String] The ID of the member
132
+ end
133
+
134
+ # @see WhopSDK::Models::CompanyTokenTransactionListResponse#user
135
+ class User < WhopSDK::Internal::Type::BaseModel
136
+ # @!attribute id
137
+ # The internal ID of the user.
138
+ #
139
+ # @return [String]
140
+ required :id, String
141
+
142
+ # @!attribute name
143
+ # The name of the user from their Whop account.
144
+ #
145
+ # @return [String, nil]
146
+ required :name, String, nil?: true
147
+
148
+ # @!attribute username
149
+ # The username of the user from their Whop account.
150
+ #
151
+ # @return [String]
152
+ required :username, String
153
+
154
+ # @!method initialize(id:, name:, username:)
155
+ # The user whose balance changed
156
+ #
157
+ # @param id [String] The internal ID of the user.
158
+ #
159
+ # @param name [String, nil] The name of the user from their Whop account.
160
+ #
161
+ # @param username [String] The username of the user from their Whop account.
162
+ end
163
+ end
164
+ end
165
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CompanyTokenTransactions#retrieve
6
+ class CompanyTokenTransactionRetrieveParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::DmChannels#create
6
+ class DmChannel < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The unique identifier for the entity
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # The time the entity was created (in milliseconds since Unix epoch)
15
+ #
16
+ # @return [String]
17
+ required :created_at, String
18
+
19
+ # @!attribute last_message_at
20
+ # When the last message was sent
21
+ #
22
+ # @return [Time, nil]
23
+ required :last_message_at, Time, nil?: true
24
+
25
+ # @!attribute name
26
+ # The custom name of the DM channel, if any
27
+ #
28
+ # @return [String, nil]
29
+ required :name, String, nil?: true
30
+
31
+ # @!method initialize(id:, created_at:, last_message_at:, name:)
32
+ # Represents a DM channel
33
+ #
34
+ # @param id [String] The unique identifier for the entity
35
+ #
36
+ # @param created_at [String] The time the entity was created (in milliseconds since Unix epoch)
37
+ #
38
+ # @param last_message_at [Time, nil] When the last message was sent
39
+ #
40
+ # @param name [String, nil] The custom name of the DM channel, if any
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::DmChannels#create
6
+ class DmChannelCreateParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute with_user_ids
11
+ # The user ids to create a DM with. Can be email, username or user_id (tag)
12
+ #
13
+ # @return [Array<String>]
14
+ required :with_user_ids, WhopSDK::Internal::Type::ArrayOf[String]
15
+
16
+ # @!attribute company_id
17
+ # The ID of the company to scope this DM channel to.
18
+ #
19
+ # @return [String, nil]
20
+ optional :company_id, String, nil?: true
21
+
22
+ # @!attribute custom_name
23
+ # The custom name for the DM channel
24
+ #
25
+ # @return [String, nil]
26
+ optional :custom_name, String, nil?: true
27
+
28
+ # @!method initialize(with_user_ids:, company_id: nil, custom_name: nil, request_options: {})
29
+ # @param with_user_ids [Array<String>] The user ids to create a DM with. Can be email, username or user_id (tag)
30
+ #
31
+ # @param company_id [String, nil] The ID of the company to scope this DM channel to.
32
+ #
33
+ # @param custom_name [String, nil] The custom name for the DM channel
34
+ #
35
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::DmChannels#delete
6
+ class DmChannelDeleteParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @type [WhopSDK::Internal::Type::Converter]
6
+ DmChannelDeleteResponse = WhopSDK::Internal::Type::Boolean
7
+ end
8
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::DmChannels#list
6
+ class DmChannelListParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute after
11
+ # Returns the elements in the list that come after the specified cursor.
12
+ #
13
+ # @return [String, nil]
14
+ optional :after, String, nil?: true
15
+
16
+ # @!attribute before
17
+ # Returns the elements in the list that come before the specified cursor.
18
+ #
19
+ # @return [String, nil]
20
+ optional :before, String, nil?: true
21
+
22
+ # @!attribute company_id
23
+ # Filter DM channels scoped to a specific company
24
+ #
25
+ # @return [String, nil]
26
+ optional :company_id, String, nil?: true
27
+
28
+ # @!attribute first
29
+ # Returns the first _n_ elements from the list.
30
+ #
31
+ # @return [Integer, nil]
32
+ optional :first, Integer, nil?: true
33
+
34
+ # @!attribute last
35
+ # Returns the last _n_ elements from the list.
36
+ #
37
+ # @return [Integer, nil]
38
+ optional :last, Integer, nil?: true
39
+
40
+ # @!method initialize(after: nil, before: nil, company_id: nil, first: nil, last: nil, request_options: {})
41
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
42
+ #
43
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
44
+ #
45
+ # @param company_id [String, nil] Filter DM channels scoped to a specific company
46
+ #
47
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
48
+ #
49
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
50
+ #
51
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::DmChannels#list
6
+ class DmChannelListResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The unique identifier for the entity
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # The time the entity was created (in milliseconds since Unix epoch)
15
+ #
16
+ # @return [String]
17
+ required :created_at, String
18
+
19
+ # @!attribute last_message_at
20
+ # When the last message was sent
21
+ #
22
+ # @return [Time, nil]
23
+ required :last_message_at, Time, nil?: true
24
+
25
+ # @!attribute name
26
+ # The custom name of the DM channel, if any
27
+ #
28
+ # @return [String, nil]
29
+ required :name, String, nil?: true
30
+
31
+ # @!method initialize(id:, created_at:, last_message_at:, name:)
32
+ # Represents a DM channel
33
+ #
34
+ # @param id [String] The unique identifier for the entity
35
+ #
36
+ # @param created_at [String] The time the entity was created (in milliseconds since Unix epoch)
37
+ #
38
+ # @param last_message_at [Time, nil] When the last message was sent
39
+ #
40
+ # @param name [String, nil] The custom name of the DM channel, if any
41
+ end
42
+ end
43
+ end