whop_sdk 0.0.37 → 0.0.39

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 (248) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +61 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +76 -10
  5. data/lib/whop_sdk/helpers/verify_user_token.rb +166 -34
  6. data/lib/whop_sdk/models/ad_campaign_list_params.rb +101 -0
  7. data/lib/whop_sdk/models/ad_campaign_list_response.rb +126 -0
  8. data/lib/whop_sdk/models/ad_campaign_pause_params.rb +20 -0
  9. data/lib/whop_sdk/models/ad_campaign_pause_response.rb +328 -0
  10. data/lib/whop_sdk/models/ad_campaign_retrieve_params.rb +20 -0
  11. data/lib/whop_sdk/models/ad_campaign_retrieve_response.rb +328 -0
  12. data/lib/whop_sdk/models/ad_campaign_unpause_params.rb +20 -0
  13. data/lib/whop_sdk/models/ad_campaign_unpause_response.rb +328 -0
  14. data/lib/whop_sdk/models/ad_campaign_update_params.rb +33 -0
  15. data/lib/whop_sdk/models/ad_campaign_update_response.rb +328 -0
  16. data/lib/whop_sdk/models/ad_group_delete_params.rb +20 -0
  17. data/lib/whop_sdk/models/ad_group_delete_response.rb +8 -0
  18. data/lib/whop_sdk/models/ad_group_list_params.rb +109 -0
  19. data/lib/whop_sdk/models/ad_group_list_response.rb +118 -0
  20. data/lib/whop_sdk/models/ad_group_retrieve_params.rb +20 -0
  21. data/lib/whop_sdk/models/ad_group_retrieve_response.rb +140 -0
  22. data/lib/whop_sdk/models/ad_group_update_params.rb +3207 -0
  23. data/lib/whop_sdk/models/ad_group_update_response.rb +140 -0
  24. data/lib/whop_sdk/models/ad_list_params.rb +115 -0
  25. data/lib/whop_sdk/models/ad_list_response.rb +89 -0
  26. data/lib/whop_sdk/models/ad_report_retrieve_params.rb +77 -0
  27. data/lib/whop_sdk/models/ad_report_retrieve_response.rb +312 -0
  28. data/lib/whop_sdk/models/ad_retrieve_params.rb +20 -0
  29. data/lib/whop_sdk/models/ad_retrieve_response.rb +133 -0
  30. data/lib/whop_sdk/models/authorized_user_roles.rb +1 -0
  31. data/lib/whop_sdk/models/bounty_create_params.rb +105 -0
  32. data/lib/whop_sdk/models/bounty_create_response.rb +126 -0
  33. data/lib/whop_sdk/models/bounty_list_params.rb +85 -0
  34. data/lib/whop_sdk/models/bounty_list_response.rb +126 -0
  35. data/lib/whop_sdk/models/bounty_retrieve_params.rb +20 -0
  36. data/lib/whop_sdk/models/bounty_retrieve_response.rb +126 -0
  37. data/lib/whop_sdk/models/checkout_configuration.rb +20 -2
  38. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +97 -23
  39. data/lib/whop_sdk/models/checkout_configuration_list_response.rb +20 -2
  40. data/lib/whop_sdk/models/company_create_api_key_params.rb +109 -0
  41. data/lib/whop_sdk/models/company_create_api_key_response.rb +35 -0
  42. data/lib/whop_sdk/models/conversion_create_params.rb +462 -0
  43. data/lib/whop_sdk/models/conversion_create_response.rb +19 -0
  44. data/lib/whop_sdk/models/currency.rb +1 -0
  45. data/lib/whop_sdk/models/file_create_params.rb +22 -1
  46. data/lib/whop_sdk/models/file_create_response.rb +26 -3
  47. data/lib/whop_sdk/models/file_retrieve_response.rb +26 -3
  48. data/lib/whop_sdk/models/forum_post_list_params.rb +9 -1
  49. data/lib/whop_sdk/models/forum_update_params.rb +10 -1
  50. data/lib/whop_sdk/models/invoice_create_params.rb +36 -18
  51. data/lib/whop_sdk/models/invoice_update_params.rb +29 -7
  52. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +2 -2
  53. data/lib/whop_sdk/models/membership.rb +11 -1
  54. data/lib/whop_sdk/models/membership_list_response.rb +11 -1
  55. data/lib/whop_sdk/models/payment.rb +47 -2
  56. data/lib/whop_sdk/models/payment_list_response.rb +29 -2
  57. data/lib/whop_sdk/models/payment_method_types.rb +16 -0
  58. data/lib/whop_sdk/models/payment_refund_params.rb +4 -3
  59. data/lib/whop_sdk/models/payout_account_retrieve_response.rb +2 -2
  60. data/lib/whop_sdk/models/payout_account_status_updated_webhook_event.rb +2 -2
  61. data/lib/whop_sdk/models/plan.rb +12 -3
  62. data/lib/whop_sdk/models/plan_create_params.rb +26 -6
  63. data/lib/whop_sdk/models/plan_list_response.rb +12 -3
  64. data/lib/whop_sdk/models/plan_update_params.rb +26 -6
  65. data/lib/whop_sdk/models/support_channel_list_params.rb +31 -9
  66. data/lib/whop_sdk/models/user_retrieve_params.rb +14 -1
  67. data/lib/whop_sdk/models/{user_update_profile_params.rb → user_update_params.rb} +24 -7
  68. data/lib/whop_sdk/models/verification_list_response.rb +2 -2
  69. data/lib/whop_sdk/models/verification_retrieve_response.rb +2 -2
  70. data/lib/whop_sdk/models/verification_status.rb +1 -0
  71. data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +2 -2
  72. data/lib/whop_sdk/models.rb +35 -1
  73. data/lib/whop_sdk/resources/ad_campaigns.rb +163 -0
  74. data/lib/whop_sdk/resources/ad_groups.rb +151 -0
  75. data/lib/whop_sdk/resources/ad_reports.rb +59 -0
  76. data/lib/whop_sdk/resources/ads.rb +88 -0
  77. data/lib/whop_sdk/resources/bounties.rb +124 -0
  78. data/lib/whop_sdk/resources/companies.rb +34 -0
  79. data/lib/whop_sdk/resources/conversions.rb +67 -0
  80. data/lib/whop_sdk/resources/files.rb +3 -1
  81. data/lib/whop_sdk/resources/forum_posts.rb +3 -1
  82. data/lib/whop_sdk/resources/forums.rb +3 -1
  83. data/lib/whop_sdk/resources/invoices.rb +9 -2
  84. data/lib/whop_sdk/resources/payments.rb +1 -1
  85. data/lib/whop_sdk/resources/plans.rb +6 -2
  86. data/lib/whop_sdk/resources/support_channels.rb +6 -4
  87. data/lib/whop_sdk/resources/users.rb +49 -37
  88. data/lib/whop_sdk/version.rb +1 -1
  89. data/lib/whop_sdk.rb +41 -1
  90. data/rbi/whop_sdk/client.rbi +24 -0
  91. data/rbi/whop_sdk/models/ad_campaign_list_params.rbi +142 -0
  92. data/rbi/whop_sdk/models/ad_campaign_list_response.rbi +239 -0
  93. data/rbi/whop_sdk/models/ad_campaign_pause_params.rbi +35 -0
  94. data/rbi/whop_sdk/models/ad_campaign_pause_response.rbi +668 -0
  95. data/rbi/whop_sdk/models/ad_campaign_retrieve_params.rbi +35 -0
  96. data/rbi/whop_sdk/models/ad_campaign_retrieve_response.rbi +679 -0
  97. data/rbi/whop_sdk/models/ad_campaign_unpause_params.rbi +35 -0
  98. data/rbi/whop_sdk/models/ad_campaign_unpause_response.rbi +675 -0
  99. data/rbi/whop_sdk/models/ad_campaign_update_params.rbi +51 -0
  100. data/rbi/whop_sdk/models/ad_campaign_update_response.rbi +670 -0
  101. data/rbi/whop_sdk/models/ad_group_delete_params.rbi +35 -0
  102. data/rbi/whop_sdk/models/ad_group_delete_response.rbi +8 -0
  103. data/rbi/whop_sdk/models/ad_group_list_params.rbi +145 -0
  104. data/rbi/whop_sdk/models/ad_group_list_response.rbi +228 -0
  105. data/rbi/whop_sdk/models/ad_group_retrieve_params.rbi +35 -0
  106. data/rbi/whop_sdk/models/ad_group_retrieve_response.rbi +277 -0
  107. data/rbi/whop_sdk/models/ad_group_update_params.rbi +6133 -0
  108. data/rbi/whop_sdk/models/ad_group_update_response.rbi +274 -0
  109. data/rbi/whop_sdk/models/ad_list_params.rbi +146 -0
  110. data/rbi/whop_sdk/models/ad_list_response.rbi +146 -0
  111. data/rbi/whop_sdk/models/ad_report_retrieve_params.rbi +99 -0
  112. data/rbi/whop_sdk/models/ad_report_retrieve_response.rbi +629 -0
  113. data/rbi/whop_sdk/models/ad_retrieve_params.rbi +35 -0
  114. data/rbi/whop_sdk/models/ad_retrieve_response.rbi +245 -0
  115. data/rbi/whop_sdk/models/authorized_user_roles.rbi +2 -0
  116. data/rbi/whop_sdk/models/bounty_create_params.rbi +129 -0
  117. data/rbi/whop_sdk/models/bounty_create_response.rbi +196 -0
  118. data/rbi/whop_sdk/models/bounty_list_params.rbi +115 -0
  119. data/rbi/whop_sdk/models/bounty_list_response.rbi +189 -0
  120. data/rbi/whop_sdk/models/bounty_retrieve_params.rbi +35 -0
  121. data/rbi/whop_sdk/models/bounty_retrieve_response.rbi +199 -0
  122. data/rbi/whop_sdk/models/checkout_configuration.rbi +20 -0
  123. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +84 -16
  124. data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +20 -0
  125. data/rbi/whop_sdk/models/company_create_api_key_params.rbi +184 -0
  126. data/rbi/whop_sdk/models/company_create_api_key_response.rbi +51 -0
  127. data/rbi/whop_sdk/models/conversion_create_params.rbi +661 -0
  128. data/rbi/whop_sdk/models/conversion_create_response.rbi +31 -0
  129. data/rbi/whop_sdk/models/currency.rbi +1 -0
  130. data/rbi/whop_sdk/models/file_create_params.rbi +41 -1
  131. data/rbi/whop_sdk/models/file_create_response.rbi +52 -5
  132. data/rbi/whop_sdk/models/file_retrieve_response.rbi +53 -5
  133. data/rbi/whop_sdk/models/forum_post_list_params.rbi +8 -0
  134. data/rbi/whop_sdk/models/forum_update_params.rbi +10 -0
  135. data/rbi/whop_sdk/models/invoice_create_params.rbi +46 -26
  136. data/rbi/whop_sdk/models/invoice_update_params.rbi +28 -6
  137. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +2 -2
  138. data/rbi/whop_sdk/models/membership.rbi +12 -0
  139. data/rbi/whop_sdk/models/membership_list_response.rbi +12 -0
  140. data/rbi/whop_sdk/models/payment.rbi +57 -3
  141. data/rbi/whop_sdk/models/payment_list_response.rbi +37 -3
  142. data/rbi/whop_sdk/models/payment_method_types.rbi +31 -0
  143. data/rbi/whop_sdk/models/payment_refund_params.rbi +6 -4
  144. data/rbi/whop_sdk/models/payout_account_retrieve_response.rbi +2 -2
  145. data/rbi/whop_sdk/models/payout_account_status_updated_webhook_event.rbi +2 -2
  146. data/rbi/whop_sdk/models/plan.rbi +12 -2
  147. data/rbi/whop_sdk/models/plan_create_params.rbi +22 -4
  148. data/rbi/whop_sdk/models/plan_list_response.rbi +12 -2
  149. data/rbi/whop_sdk/models/plan_update_params.rbi +22 -4
  150. data/rbi/whop_sdk/models/support_channel_list_params.rbi +50 -8
  151. data/rbi/whop_sdk/models/user_retrieve_params.rbi +18 -2
  152. data/rbi/whop_sdk/models/{user_update_profile_params.rbi → user_update_params.rbi} +25 -9
  153. data/rbi/whop_sdk/models/verification_list_response.rbi +2 -2
  154. data/rbi/whop_sdk/models/verification_retrieve_response.rbi +2 -2
  155. data/rbi/whop_sdk/models/verification_status.rbi +2 -0
  156. data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +2 -2
  157. data/rbi/whop_sdk/models.rbi +35 -1
  158. data/rbi/whop_sdk/resources/ad_campaigns.rbi +134 -0
  159. data/rbi/whop_sdk/resources/ad_groups.rbi +139 -0
  160. data/rbi/whop_sdk/resources/ad_reports.rbi +55 -0
  161. data/rbi/whop_sdk/resources/ads.rbi +81 -0
  162. data/rbi/whop_sdk/resources/bounties.rbi +116 -0
  163. data/rbi/whop_sdk/resources/companies.rbi +32 -0
  164. data/rbi/whop_sdk/resources/conversions.rbi +71 -0
  165. data/rbi/whop_sdk/resources/files.rbi +5 -0
  166. data/rbi/whop_sdk/resources/forum_posts.rbi +3 -0
  167. data/rbi/whop_sdk/resources/forums.rbi +4 -0
  168. data/rbi/whop_sdk/resources/invoices.rbi +10 -1
  169. data/rbi/whop_sdk/resources/payments.rbi +3 -2
  170. data/rbi/whop_sdk/resources/plans.rbi +6 -0
  171. data/rbi/whop_sdk/resources/support_channels.rbi +8 -3
  172. data/rbi/whop_sdk/resources/users.rbi +42 -29
  173. data/sig/whop_sdk/client.rbs +12 -0
  174. data/sig/whop_sdk/models/ad_campaign_list_params.rbs +82 -0
  175. data/sig/whop_sdk/models/ad_campaign_list_response.rbs +98 -0
  176. data/sig/whop_sdk/models/ad_campaign_pause_params.rbs +20 -0
  177. data/sig/whop_sdk/models/ad_campaign_pause_response.rbs +232 -0
  178. data/sig/whop_sdk/models/ad_campaign_retrieve_params.rbs +20 -0
  179. data/sig/whop_sdk/models/ad_campaign_retrieve_response.rbs +232 -0
  180. data/sig/whop_sdk/models/ad_campaign_unpause_params.rbs +20 -0
  181. data/sig/whop_sdk/models/ad_campaign_unpause_response.rbs +232 -0
  182. data/sig/whop_sdk/models/ad_campaign_update_params.rbs +28 -0
  183. data/sig/whop_sdk/models/ad_campaign_update_response.rbs +232 -0
  184. data/sig/whop_sdk/models/ad_group_delete_params.rbs +20 -0
  185. data/sig/whop_sdk/models/ad_group_delete_response.rbs +5 -0
  186. data/sig/whop_sdk/models/ad_group_list_params.rbs +87 -0
  187. data/sig/whop_sdk/models/ad_group_list_response.rbs +93 -0
  188. data/sig/whop_sdk/models/ad_group_retrieve_params.rbs +20 -0
  189. data/sig/whop_sdk/models/ad_group_retrieve_response.rbs +108 -0
  190. data/sig/whop_sdk/models/ad_group_update_params.rbs +2439 -0
  191. data/sig/whop_sdk/models/ad_group_update_response.rbs +108 -0
  192. data/sig/whop_sdk/models/ad_list_params.rbs +87 -0
  193. data/sig/whop_sdk/models/ad_list_response.rbs +72 -0
  194. data/sig/whop_sdk/models/ad_report_retrieve_params.rbs +56 -0
  195. data/sig/whop_sdk/models/ad_report_retrieve_response.rbs +278 -0
  196. data/sig/whop_sdk/models/ad_retrieve_params.rbs +20 -0
  197. data/sig/whop_sdk/models/ad_retrieve_response.rbs +102 -0
  198. data/sig/whop_sdk/models/authorized_user_roles.rbs +2 -0
  199. data/sig/whop_sdk/models/bounty_create_params.rbs +71 -0
  200. data/sig/whop_sdk/models/bounty_create_response.rbs +93 -0
  201. data/sig/whop_sdk/models/bounty_list_params.rbs +67 -0
  202. data/sig/whop_sdk/models/bounty_list_response.rbs +93 -0
  203. data/sig/whop_sdk/models/bounty_retrieve_params.rbs +20 -0
  204. data/sig/whop_sdk/models/bounty_retrieve_response.rbs +93 -0
  205. data/sig/whop_sdk/models/checkout_configuration.rbs +10 -0
  206. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +51 -16
  207. data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +10 -0
  208. data/sig/whop_sdk/models/company_create_api_key_params.rbs +83 -0
  209. data/sig/whop_sdk/models/company_create_api_key_response.rbs +18 -0
  210. data/sig/whop_sdk/models/conversion_create_params.rbs +349 -0
  211. data/sig/whop_sdk/models/conversion_create_response.rbs +13 -0
  212. data/sig/whop_sdk/models/currency.rbs +2 -0
  213. data/sig/whop_sdk/models/file_create_params.rbs +20 -1
  214. data/sig/whop_sdk/models/file_create_response.rbs +19 -3
  215. data/sig/whop_sdk/models/file_retrieve_response.rbs +19 -3
  216. data/sig/whop_sdk/models/forum_post_list_params.rbs +5 -0
  217. data/sig/whop_sdk/models/forum_update_params.rbs +5 -0
  218. data/sig/whop_sdk/models/invoice_create_params.rbs +24 -14
  219. data/sig/whop_sdk/models/invoice_update_params.rbs +15 -5
  220. data/sig/whop_sdk/models/membership.rbs +5 -0
  221. data/sig/whop_sdk/models/membership_list_response.rbs +5 -0
  222. data/sig/whop_sdk/models/payment.rbs +25 -3
  223. data/sig/whop_sdk/models/payment_list_response.rbs +15 -3
  224. data/sig/whop_sdk/models/payment_method_types.rbs +32 -0
  225. data/sig/whop_sdk/models/plan.rbs +5 -0
  226. data/sig/whop_sdk/models/plan_create_params.rbs +14 -4
  227. data/sig/whop_sdk/models/plan_list_response.rbs +5 -0
  228. data/sig/whop_sdk/models/plan_update_params.rbs +14 -4
  229. data/sig/whop_sdk/models/support_channel_list_params.rbs +23 -6
  230. data/sig/whop_sdk/models/user_retrieve_params.rbs +10 -2
  231. data/sig/whop_sdk/models/{user_update_profile_params.rbs → user_update_params.rbs} +16 -6
  232. data/sig/whop_sdk/models/verification_status.rbs +2 -0
  233. data/sig/whop_sdk/models.rbs +35 -1
  234. data/sig/whop_sdk/resources/ad_campaigns.rbs +41 -0
  235. data/sig/whop_sdk/resources/ad_groups.rbs +40 -0
  236. data/sig/whop_sdk/resources/ad_reports.rbs +18 -0
  237. data/sig/whop_sdk/resources/ads.rbs +26 -0
  238. data/sig/whop_sdk/resources/bounties.rbs +37 -0
  239. data/sig/whop_sdk/resources/companies.rbs +9 -0
  240. data/sig/whop_sdk/resources/conversions.rbs +25 -0
  241. data/sig/whop_sdk/resources/files.rbs +1 -0
  242. data/sig/whop_sdk/resources/forum_posts.rbs +1 -0
  243. data/sig/whop_sdk/resources/forums.rbs +1 -0
  244. data/sig/whop_sdk/resources/invoices.rbs +2 -0
  245. data/sig/whop_sdk/resources/plans.rbs +2 -0
  246. data/sig/whop_sdk/resources/support_channels.rbs +2 -1
  247. data/sig/whop_sdk/resources/users.rbs +11 -8
  248. metadata +125 -5
@@ -12,6 +12,11 @@ module WhopSDK
12
12
  sig { returns(String) }
13
13
  attr_accessor :id
14
14
 
15
+ # Whether the creator has turned on adaptive pricing for this plan. Raw setting —
16
+ # does not check processor compatibility or feature flags.
17
+ sig { returns(T::Boolean) }
18
+ attr_accessor :adaptive_pricing_enabled
19
+
15
20
  # The number of days between each recurring charge. Null for one-time plans. For
16
21
  # example, 30 for monthly or 365 for annual billing.
17
22
  sig { returns(T.nilable(Integer)) }
@@ -38,7 +43,7 @@ module WhopSDK
38
43
  sig { returns(WhopSDK::Currency::TaggedSymbol) }
39
44
  attr_accessor :currency
40
45
 
41
- # A text description of the plan visible to customers. Maximum 500 characters.
46
+ # A text description of the plan visible to customers. Maximum 1000 characters.
42
47
  # Null if no description is set.
43
48
  sig { returns(T.nilable(String)) }
44
49
  attr_accessor :description
@@ -170,6 +175,7 @@ module WhopSDK
170
175
  sig do
171
176
  params(
172
177
  id: String,
178
+ adaptive_pricing_enabled: T::Boolean,
173
179
  billing_period: T.nilable(Integer),
174
180
  company:
175
181
  T.nilable(WhopSDK::Models::PlanListResponse::Company::OrHash),
@@ -204,6 +210,9 @@ module WhopSDK
204
210
  def self.new(
205
211
  # The unique identifier for the plan.
206
212
  id:,
213
+ # Whether the creator has turned on adaptive pricing for this plan. Raw setting —
214
+ # does not check processor compatibility or feature flags.
215
+ adaptive_pricing_enabled:,
207
216
  # The number of days between each recurring charge. Null for one-time plans. For
208
217
  # example, 30 for monthly or 365 for annual billing.
209
218
  billing_period:,
@@ -215,7 +224,7 @@ module WhopSDK
215
224
  # The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary
216
225
  # amounts on the plan are denominated in this currency.
217
226
  currency:,
218
- # A text description of the plan visible to customers. Maximum 500 characters.
227
+ # A text description of the plan visible to customers. Maximum 1000 characters.
219
228
  # Null if no description is set.
220
229
  description:,
221
230
  # The number of days until the membership expires (for expiration-based plans).
@@ -280,6 +289,7 @@ module WhopSDK
280
289
  override.returns(
281
290
  {
282
291
  id: String,
292
+ adaptive_pricing_enabled: T::Boolean,
283
293
  billing_period: T.nilable(Integer),
284
294
  company: T.nilable(WhopSDK::Models::PlanListResponse::Company),
285
295
  created_at: Time,
@@ -14,6 +14,10 @@ module WhopSDK
14
14
  sig { returns(String) }
15
15
  attr_accessor :id
16
16
 
17
+ # Whether this plan accepts local currency payments via adaptive pricing.
18
+ sig { returns(T.nilable(T::Boolean)) }
19
+ attr_accessor :adaptive_pricing_enabled
20
+
17
21
  # The number of days between recurring charges. For example, 30 for monthly or 365
18
22
  # for yearly.
19
23
  sig { returns(T.nilable(Integer)) }
@@ -140,6 +144,7 @@ module WhopSDK
140
144
  sig do
141
145
  params(
142
146
  id: String,
147
+ adaptive_pricing_enabled: T.nilable(T::Boolean),
143
148
  billing_period: T.nilable(Integer),
144
149
  checkout_styling:
145
150
  T.nilable(WhopSDK::PlanUpdateParams::CheckoutStyling::OrHash),
@@ -171,6 +176,8 @@ module WhopSDK
171
176
  end
172
177
  def self.new(
173
178
  id:,
179
+ # Whether this plan accepts local currency payments via adaptive pricing.
180
+ adaptive_pricing_enabled: nil,
174
181
  # The number of days between recurring charges. For example, 30 for monthly or 365
175
182
  # for yearly.
176
183
  billing_period: nil,
@@ -231,6 +238,7 @@ module WhopSDK
231
238
  override.returns(
232
239
  {
233
240
  id: String,
241
+ adaptive_pricing_enabled: T.nilable(T::Boolean),
234
242
  billing_period: T.nilable(Integer),
235
243
  checkout_styling:
236
244
  T.nilable(WhopSDK::PlanUpdateParams::CheckoutStyling),
@@ -271,6 +279,11 @@ module WhopSDK
271
279
  )
272
280
  end
273
281
 
282
+ # A hex color code for the checkout page background, applied to the order summary
283
+ # panel (e.g. #F4F4F5).
284
+ sig { returns(T.nilable(String)) }
285
+ attr_accessor :background_color
286
+
274
287
  # The different border-radius styles available for checkout pages.
275
288
  sig { returns(T.nilable(WhopSDK::CheckoutShape::OrSymbol)) }
276
289
  attr_accessor :border_style
@@ -287,12 +300,16 @@ module WhopSDK
287
300
  # inherit from the company default.
288
301
  sig do
289
302
  params(
303
+ background_color: T.nilable(String),
290
304
  border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol),
291
305
  button_color: T.nilable(String),
292
306
  font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol)
293
307
  ).returns(T.attached_class)
294
308
  end
295
309
  def self.new(
310
+ # A hex color code for the checkout page background, applied to the order summary
311
+ # panel (e.g. #F4F4F5).
312
+ background_color: nil,
296
313
  # The different border-radius styles available for checkout pages.
297
314
  border_style: nil,
298
315
  # A hex color code for the button color (e.g. #FF5733).
@@ -305,6 +322,7 @@ module WhopSDK
305
322
  sig do
306
323
  override.returns(
307
324
  {
325
+ background_color: T.nilable(String),
308
326
  border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol),
309
327
  button_color: T.nilable(String),
310
328
  font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol)
@@ -437,7 +455,7 @@ module WhopSDK
437
455
  # Whether Whop's platform default payment method enablement settings are included
438
456
  # in this configuration. The full list of default payment methods can be found in
439
457
  # the documentation at docs.whop.com/payments.
440
- sig { returns(T::Boolean) }
458
+ sig { returns(T.nilable(T::Boolean)) }
441
459
  attr_accessor :include_platform_defaults
442
460
 
443
461
  # Explicit payment method configuration for the plan. Sending null removes any
@@ -446,7 +464,7 @@ module WhopSDK
446
464
  params(
447
465
  disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
448
466
  enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
449
- include_platform_defaults: T::Boolean
467
+ include_platform_defaults: T.nilable(T::Boolean)
450
468
  ).returns(T.attached_class)
451
469
  end
452
470
  def self.new(
@@ -461,7 +479,7 @@ module WhopSDK
461
479
  # Whether Whop's platform default payment method enablement settings are included
462
480
  # in this configuration. The full list of default payment methods can be found in
463
481
  # the documentation at docs.whop.com/payments.
464
- include_platform_defaults:
482
+ include_platform_defaults: nil
465
483
  )
466
484
  end
467
485
 
@@ -470,7 +488,7 @@ module WhopSDK
470
488
  {
471
489
  disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
472
490
  enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
473
- include_platform_defaults: T::Boolean
491
+ include_platform_defaults: T.nilable(T::Boolean)
474
492
  }
475
493
  )
476
494
  end
@@ -11,10 +11,6 @@ module WhopSDK
11
11
  T.any(WhopSDK::SupportChannelListParams, WhopSDK::Internal::AnyHash)
12
12
  end
13
13
 
14
- # The unique identifier of the company to list support channels 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,12 @@ module WhopSDK
23
19
  sig { returns(T.nilable(String)) }
24
20
  attr_accessor :before
25
21
 
22
+ # The unique identifier of the company to list support channels for. Includes
23
+ # channels of child companies. When omitted, returns support channels across all
24
+ # companies the user has access to.
25
+ sig { returns(T.nilable(String)) }
26
+ attr_accessor :company_id
27
+
26
28
  # The direction of the sort.
27
29
  sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) }
28
30
  attr_accessor :direction
@@ -46,26 +48,35 @@ module WhopSDK
46
48
  end
47
49
  attr_accessor :order
48
50
 
51
+ # The perspective to filter support channels by.
52
+ sig do
53
+ returns(T.nilable(WhopSDK::SupportChannelListParams::View::OrSymbol))
54
+ end
55
+ attr_accessor :view
56
+
49
57
  sig do
50
58
  params(
51
- company_id: String,
52
59
  after: T.nilable(String),
53
60
  before: T.nilable(String),
61
+ company_id: T.nilable(String),
54
62
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
55
63
  first: T.nilable(Integer),
56
64
  last: T.nilable(Integer),
57
65
  open_: T.nilable(T::Boolean),
58
66
  order: T.nilable(WhopSDK::SupportChannelListParams::Order::OrSymbol),
67
+ view: T.nilable(WhopSDK::SupportChannelListParams::View::OrSymbol),
59
68
  request_options: WhopSDK::RequestOptions::OrHash
60
69
  ).returns(T.attached_class)
61
70
  end
62
71
  def self.new(
63
- # The unique identifier of the company to list support channels for.
64
- company_id:,
65
72
  # Returns the elements in the list that come after the specified cursor.
66
73
  after: nil,
67
74
  # Returns the elements in the list that come before the specified cursor.
68
75
  before: nil,
76
+ # The unique identifier of the company to list support channels for. Includes
77
+ # channels of child companies. When omitted, returns support channels across all
78
+ # companies the user has access to.
79
+ company_id: nil,
69
80
  # The direction of the sort.
70
81
  direction: nil,
71
82
  # Returns the first _n_ elements from the list.
@@ -77,6 +88,8 @@ module WhopSDK
77
88
  open_: nil,
78
89
  # Sort options for message channels
79
90
  order: nil,
91
+ # The perspective to filter support channels by.
92
+ view: nil,
80
93
  request_options: {}
81
94
  )
82
95
  end
@@ -84,15 +97,16 @@ module WhopSDK
84
97
  sig do
85
98
  override.returns(
86
99
  {
87
- company_id: String,
88
100
  after: T.nilable(String),
89
101
  before: T.nilable(String),
102
+ company_id: T.nilable(String),
90
103
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
91
104
  first: T.nilable(Integer),
92
105
  last: T.nilable(Integer),
93
106
  open_: T.nilable(T::Boolean),
94
107
  order:
95
108
  T.nilable(WhopSDK::SupportChannelListParams::Order::OrSymbol),
109
+ view: T.nilable(WhopSDK::SupportChannelListParams::View::OrSymbol),
96
110
  request_options: WhopSDK::RequestOptions
97
111
  }
98
112
  )
@@ -129,6 +143,34 @@ module WhopSDK
129
143
  def self.values
130
144
  end
131
145
  end
146
+
147
+ # The perspective to filter support channels by.
148
+ module View
149
+ extend WhopSDK::Internal::Type::Enum
150
+
151
+ TaggedSymbol =
152
+ T.type_alias do
153
+ T.all(Symbol, WhopSDK::SupportChannelListParams::View)
154
+ end
155
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
156
+
157
+ ALL = T.let(:all, WhopSDK::SupportChannelListParams::View::TaggedSymbol)
158
+ ADMIN =
159
+ T.let(:admin, WhopSDK::SupportChannelListParams::View::TaggedSymbol)
160
+ CUSTOMER =
161
+ T.let(
162
+ :customer,
163
+ WhopSDK::SupportChannelListParams::View::TaggedSymbol
164
+ )
165
+
166
+ sig do
167
+ override.returns(
168
+ T::Array[WhopSDK::SupportChannelListParams::View::TaggedSymbol]
169
+ )
170
+ end
171
+ def self.values
172
+ end
173
+ end
132
174
  end
133
175
  end
134
176
  end
@@ -14,18 +14,34 @@ module WhopSDK
14
14
  sig { returns(String) }
15
15
  attr_accessor :id
16
16
 
17
+ # When provided, returns the user's company-specific profile overrides (name,
18
+ # profile picture) instead of their global profile.
19
+ sig { returns(T.nilable(String)) }
20
+ attr_accessor :company_id
21
+
17
22
  sig do
18
23
  params(
19
24
  id: String,
25
+ company_id: T.nilable(String),
20
26
  request_options: WhopSDK::RequestOptions::OrHash
21
27
  ).returns(T.attached_class)
22
28
  end
23
- def self.new(id:, request_options: {})
29
+ def self.new(
30
+ id:,
31
+ # When provided, returns the user's company-specific profile overrides (name,
32
+ # profile picture) instead of their global profile.
33
+ company_id: nil,
34
+ request_options: {}
35
+ )
24
36
  end
25
37
 
26
38
  sig do
27
39
  override.returns(
28
- { id: String, request_options: WhopSDK::RequestOptions }
40
+ {
41
+ id: String,
42
+ company_id: T.nilable(String),
43
+ request_options: WhopSDK::RequestOptions
44
+ }
29
45
  )
30
46
  end
31
47
  def to_hash
@@ -2,33 +2,40 @@
2
2
 
3
3
  module WhopSDK
4
4
  module Models
5
- class UserUpdateProfileParams < WhopSDK::Internal::Type::BaseModel
5
+ class UserUpdateParams < WhopSDK::Internal::Type::BaseModel
6
6
  extend WhopSDK::Internal::Type::RequestParameters::Converter
7
7
  include WhopSDK::Internal::Type::RequestParameters
8
8
 
9
9
  OrHash =
10
10
  T.type_alias do
11
- T.any(WhopSDK::UserUpdateProfileParams, WhopSDK::Internal::AnyHash)
11
+ T.any(WhopSDK::UserUpdateParams, WhopSDK::Internal::AnyHash)
12
12
  end
13
13
 
14
+ sig { returns(String) }
15
+ attr_accessor :id
16
+
14
17
  # A short biography displayed on the user's public profile.
15
18
  sig { returns(T.nilable(String)) }
16
19
  attr_accessor :bio
17
20
 
21
+ # When provided, updates the user's profile overrides for this company instead of
22
+ # the global profile. Pass name and profile_picture to set overrides, or null to
23
+ # clear them.
24
+ sig { returns(T.nilable(String)) }
25
+ attr_accessor :company_id
26
+
18
27
  # The user's display name shown on their public profile. Maximum 100 characters.
19
28
  sig { returns(T.nilable(String)) }
20
29
  attr_accessor :name
21
30
 
22
31
  # The user's profile picture image attachment.
23
- sig do
24
- returns(T.nilable(WhopSDK::UserUpdateProfileParams::ProfilePicture))
25
- end
32
+ sig { returns(T.nilable(WhopSDK::UserUpdateParams::ProfilePicture)) }
26
33
  attr_reader :profile_picture
27
34
 
28
35
  sig do
29
36
  params(
30
37
  profile_picture:
31
- T.nilable(WhopSDK::UserUpdateProfileParams::ProfilePicture::OrHash)
38
+ T.nilable(WhopSDK::UserUpdateParams::ProfilePicture::OrHash)
32
39
  ).void
33
40
  end
34
41
  attr_writer :profile_picture
@@ -40,17 +47,24 @@ module WhopSDK
40
47
 
41
48
  sig do
42
49
  params(
50
+ id: String,
43
51
  bio: T.nilable(String),
52
+ company_id: T.nilable(String),
44
53
  name: T.nilable(String),
45
54
  profile_picture:
46
- T.nilable(WhopSDK::UserUpdateProfileParams::ProfilePicture::OrHash),
55
+ T.nilable(WhopSDK::UserUpdateParams::ProfilePicture::OrHash),
47
56
  username: T.nilable(String),
48
57
  request_options: WhopSDK::RequestOptions::OrHash
49
58
  ).returns(T.attached_class)
50
59
  end
51
60
  def self.new(
61
+ id:,
52
62
  # A short biography displayed on the user's public profile.
53
63
  bio: nil,
64
+ # When provided, updates the user's profile overrides for this company instead of
65
+ # the global profile. Pass name and profile_picture to set overrides, or null to
66
+ # clear them.
67
+ company_id: nil,
54
68
  # The user's display name shown on their public profile. Maximum 100 characters.
55
69
  name: nil,
56
70
  # The user's profile picture image attachment.
@@ -65,10 +79,12 @@ module WhopSDK
65
79
  sig do
66
80
  override.returns(
67
81
  {
82
+ id: String,
68
83
  bio: T.nilable(String),
84
+ company_id: T.nilable(String),
69
85
  name: T.nilable(String),
70
86
  profile_picture:
71
- T.nilable(WhopSDK::UserUpdateProfileParams::ProfilePicture),
87
+ T.nilable(WhopSDK::UserUpdateParams::ProfilePicture),
72
88
  username: T.nilable(String),
73
89
  request_options: WhopSDK::RequestOptions
74
90
  }
@@ -81,7 +97,7 @@ module WhopSDK
81
97
  OrHash =
82
98
  T.type_alias do
83
99
  T.any(
84
- WhopSDK::UserUpdateProfileParams::ProfilePicture,
100
+ WhopSDK::UserUpdateParams::ProfilePicture,
85
101
  WhopSDK::Internal::AnyHash
86
102
  )
87
103
  end
@@ -11,7 +11,7 @@ module WhopSDK
11
11
  )
12
12
  end
13
13
 
14
- # The unique identifier for the verification.
14
+ # The numeric id of the verification record.
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
@@ -39,7 +39,7 @@ module WhopSDK
39
39
  ).returns(T.attached_class)
40
40
  end
41
41
  def self.new(
42
- # The unique identifier for the verification.
42
+ # The numeric id of the verification record.
43
43
  id:,
44
44
  # An error code for a verification attempt.
45
45
  last_error_code:,
@@ -11,7 +11,7 @@ module WhopSDK
11
11
  )
12
12
  end
13
13
 
14
- # The unique identifier for the verification.
14
+ # The numeric id of the verification record.
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
@@ -39,7 +39,7 @@ module WhopSDK
39
39
  ).returns(T.attached_class)
40
40
  end
41
41
  def self.new(
42
- # The unique identifier for the verification.
42
+ # The numeric id of the verification record.
43
43
  id:,
44
44
  # An error code for a verification attempt.
45
45
  last_error_code:,
@@ -27,6 +27,8 @@ module WhopSDK
27
27
  EXPIRED = T.let(:expired, WhopSDK::VerificationStatus::TaggedSymbol)
28
28
  ABANDONED = T.let(:abandoned, WhopSDK::VerificationStatus::TaggedSymbol)
29
29
  REVIEW = T.let(:review, WhopSDK::VerificationStatus::TaggedSymbol)
30
+ ACTION_REQUIRED =
31
+ T.let(:action_required, WhopSDK::VerificationStatus::TaggedSymbol)
30
32
 
31
33
  sig do
32
34
  override.returns(T::Array[WhopSDK::VerificationStatus::TaggedSymbol])
@@ -94,7 +94,7 @@ module WhopSDK
94
94
  )
95
95
  end
96
96
 
97
- # The unique identifier for the verification.
97
+ # The numeric id of the verification record.
98
98
  sig { returns(String) }
99
99
  attr_accessor :id
100
100
 
@@ -123,7 +123,7 @@ module WhopSDK
123
123
  ).returns(T.attached_class)
124
124
  end
125
125
  def self.new(
126
- # The unique identifier for the verification.
126
+ # The numeric id of the verification record.
127
127
  id:,
128
128
  # An error code for a verification attempt.
129
129
  last_error_code:,
@@ -9,6 +9,30 @@ module WhopSDK
9
9
 
10
10
  AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams
11
11
 
12
+ AdCampaignListParams = WhopSDK::Models::AdCampaignListParams
13
+
14
+ AdCampaignPauseParams = WhopSDK::Models::AdCampaignPauseParams
15
+
16
+ AdCampaignRetrieveParams = WhopSDK::Models::AdCampaignRetrieveParams
17
+
18
+ AdCampaignUnpauseParams = WhopSDK::Models::AdCampaignUnpauseParams
19
+
20
+ AdCampaignUpdateParams = WhopSDK::Models::AdCampaignUpdateParams
21
+
22
+ AdGroupDeleteParams = WhopSDK::Models::AdGroupDeleteParams
23
+
24
+ AdGroupListParams = WhopSDK::Models::AdGroupListParams
25
+
26
+ AdGroupRetrieveParams = WhopSDK::Models::AdGroupRetrieveParams
27
+
28
+ AdGroupUpdateParams = WhopSDK::Models::AdGroupUpdateParams
29
+
30
+ AdListParams = WhopSDK::Models::AdListParams
31
+
32
+ AdReportRetrieveParams = WhopSDK::Models::AdReportRetrieveParams
33
+
34
+ AdRetrieveParams = WhopSDK::Models::AdRetrieveParams
35
+
12
36
  Affiliate = WhopSDK::Models::Affiliate
13
37
 
14
38
  AffiliateArchiveParams = WhopSDK::Models::AffiliateArchiveParams
@@ -83,6 +107,12 @@ module WhopSDK
83
107
 
84
108
  BillingReasons = WhopSDK::Models::BillingReasons
85
109
 
110
+ BountyCreateParams = WhopSDK::Models::BountyCreateParams
111
+
112
+ BountyListParams = WhopSDK::Models::BountyListParams
113
+
114
+ BountyRetrieveParams = WhopSDK::Models::BountyRetrieveParams
115
+
86
116
  CancelOptions = WhopSDK::Models::CancelOptions
87
117
 
88
118
  CardBrands = WhopSDK::Models::CardBrands
@@ -116,6 +146,8 @@ module WhopSDK
116
146
 
117
147
  Company = WhopSDK::Models::Company
118
148
 
149
+ CompanyCreateAPIKeyParams = WhopSDK::Models::CompanyCreateAPIKeyParams
150
+
119
151
  CompanyCreateParams = WhopSDK::Models::CompanyCreateParams
120
152
 
121
153
  CompanyListParams = WhopSDK::Models::CompanyListParams
@@ -137,6 +169,8 @@ module WhopSDK
137
169
 
138
170
  CompanyUpdateParams = WhopSDK::Models::CompanyUpdateParams
139
171
 
172
+ ConversionCreateParams = WhopSDK::Models::ConversionCreateParams
173
+
140
174
  Course = WhopSDK::Models::Course
141
175
 
142
176
  CourseChapter = WhopSDK::Models::CourseChapter
@@ -674,7 +708,7 @@ module WhopSDK
674
708
 
675
709
  UserRetrieveParams = WhopSDK::Models::UserRetrieveParams
676
710
 
677
- UserUpdateProfileParams = WhopSDK::Models::UserUpdateProfileParams
711
+ UserUpdateParams = WhopSDK::Models::UserUpdateParams
678
712
 
679
713
  VerificationErrorCode = WhopSDK::Models::VerificationErrorCode
680
714
 
@@ -0,0 +1,134 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ # Ad campaigns
6
+ class AdCampaigns
7
+ # Retrieves a single ad campaign by its unique identifier.
8
+ #
9
+ # Required permissions:
10
+ #
11
+ # - `ad_campaign:basic:read`
12
+ sig do
13
+ params(
14
+ id: String,
15
+ request_options: WhopSDK::RequestOptions::OrHash
16
+ ).returns(WhopSDK::Models::AdCampaignRetrieveResponse)
17
+ end
18
+ def retrieve(
19
+ # The unique identifier of the ad campaign.
20
+ id,
21
+ request_options: {}
22
+ )
23
+ end
24
+
25
+ # Updates an ad campaign synchronously.
26
+ #
27
+ # Required permissions:
28
+ #
29
+ # - `ad_campaign:update`
30
+ sig do
31
+ params(
32
+ id: String,
33
+ budget: T.nilable(Float),
34
+ request_options: WhopSDK::RequestOptions::OrHash
35
+ ).returns(WhopSDK::Models::AdCampaignUpdateResponse)
36
+ end
37
+ def update(
38
+ # The unique identifier of the ad campaign to update.
39
+ id,
40
+ # The campaign budget in dollars. The interpretation (daily or lifetime) follows
41
+ # the campaign's existing budget type.
42
+ budget: nil,
43
+ request_options: {}
44
+ )
45
+ end
46
+
47
+ # Returns a paginated list of ad campaigns for a company, with optional filtering
48
+ # by status, and creation date.
49
+ #
50
+ # Required permissions:
51
+ #
52
+ # - `ad_campaign:basic:read`
53
+ sig do
54
+ params(
55
+ company_id: String,
56
+ after: T.nilable(String),
57
+ before: T.nilable(String),
58
+ created_after: T.nilable(Time),
59
+ created_before: T.nilable(Time),
60
+ first: T.nilable(Integer),
61
+ last: T.nilable(Integer),
62
+ query: T.nilable(String),
63
+ status: T.nilable(WhopSDK::AdCampaignListParams::Status::OrSymbol),
64
+ request_options: WhopSDK::RequestOptions::OrHash
65
+ ).returns(
66
+ WhopSDK::Internal::CursorPage[WhopSDK::Models::AdCampaignListResponse]
67
+ )
68
+ end
69
+ def list(
70
+ # The unique identifier of the company to list ad campaigns for.
71
+ company_id:,
72
+ # Returns the elements in the list that come after the specified cursor.
73
+ after: nil,
74
+ # Returns the elements in the list that come before the specified cursor.
75
+ before: nil,
76
+ # Only return ad campaigns created after this timestamp.
77
+ created_after: nil,
78
+ # Only return ad campaigns created before this timestamp.
79
+ created_before: nil,
80
+ # Returns the first _n_ elements from the list.
81
+ first: nil,
82
+ # Returns the last _n_ elements from the list.
83
+ last: nil,
84
+ # Case-insensitive substring match against the campaign title.
85
+ query: nil,
86
+ # The status of an ad campaign.
87
+ status: nil,
88
+ request_options: {}
89
+ )
90
+ end
91
+
92
+ # Pauses an ad campaign, optionally until a specific date.
93
+ #
94
+ # Required permissions:
95
+ #
96
+ # - `ad_campaign:update`
97
+ sig do
98
+ params(
99
+ id: String,
100
+ request_options: WhopSDK::RequestOptions::OrHash
101
+ ).returns(WhopSDK::Models::AdCampaignPauseResponse)
102
+ end
103
+ def pause(
104
+ # The unique identifier of the ad campaign to pause.
105
+ id,
106
+ request_options: {}
107
+ )
108
+ end
109
+
110
+ # Resumes a paused ad campaign.
111
+ #
112
+ # Required permissions:
113
+ #
114
+ # - `ad_campaign:update`
115
+ sig do
116
+ params(
117
+ id: String,
118
+ request_options: WhopSDK::RequestOptions::OrHash
119
+ ).returns(WhopSDK::Models::AdCampaignUnpauseResponse)
120
+ end
121
+ def unpause(
122
+ # The unique identifier of the ad campaign to unpause.
123
+ id,
124
+ request_options: {}
125
+ )
126
+ end
127
+
128
+ # @api private
129
+ sig { params(client: WhopSDK::Client).returns(T.attached_class) }
130
+ def self.new(client:)
131
+ end
132
+ end
133
+ end
134
+ end