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
@@ -0,0 +1,245 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AdRetrieveResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(WhopSDK::Models::AdRetrieveResponse, WhopSDK::Internal::AnyHash)
9
+ end
10
+
11
+ # The unique identifier for this ad.
12
+ sig { returns(String) }
13
+ attr_accessor :id
14
+
15
+ # The ad campaign this ad belongs to.
16
+ sig { returns(WhopSDK::Models::AdRetrieveResponse::AdCampaign) }
17
+ attr_reader :ad_campaign
18
+
19
+ sig do
20
+ params(
21
+ ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign::OrHash
22
+ ).void
23
+ end
24
+ attr_writer :ad_campaign
25
+
26
+ # The parent ad group this ad belongs to.
27
+ sig { returns(WhopSDK::Models::AdRetrieveResponse::AdGroup) }
28
+ attr_reader :ad_group
29
+
30
+ sig do
31
+ params(
32
+ ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup::OrHash
33
+ ).void
34
+ end
35
+ attr_writer :ad_group
36
+
37
+ # When the ad was created.
38
+ sig { returns(Time) }
39
+ attr_accessor :created_at
40
+
41
+ # The external ad platform this ad is running on (e.g., meta, tiktok).
42
+ sig do
43
+ returns(WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol)
44
+ end
45
+ attr_accessor :platform
46
+
47
+ # Current delivery status of the ad.
48
+ sig { returns(WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol) }
49
+ attr_accessor :status
50
+
51
+ # The display title of the ad. Falls back to the creative set caption when unset.
52
+ sig { returns(T.nilable(String)) }
53
+ attr_accessor :title
54
+
55
+ # When the ad was last updated.
56
+ sig { returns(Time) }
57
+ attr_accessor :updated_at
58
+
59
+ # An ad belonging to an ad group.
60
+ sig do
61
+ params(
62
+ id: String,
63
+ ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign::OrHash,
64
+ ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup::OrHash,
65
+ created_at: Time,
66
+ platform: WhopSDK::Models::AdRetrieveResponse::Platform::OrSymbol,
67
+ status: WhopSDK::Models::AdRetrieveResponse::Status::OrSymbol,
68
+ title: T.nilable(String),
69
+ updated_at: Time
70
+ ).returns(T.attached_class)
71
+ end
72
+ def self.new(
73
+ # The unique identifier for this ad.
74
+ id:,
75
+ # The ad campaign this ad belongs to.
76
+ ad_campaign:,
77
+ # The parent ad group this ad belongs to.
78
+ ad_group:,
79
+ # When the ad was created.
80
+ created_at:,
81
+ # The external ad platform this ad is running on (e.g., meta, tiktok).
82
+ platform:,
83
+ # Current delivery status of the ad.
84
+ status:,
85
+ # The display title of the ad. Falls back to the creative set caption when unset.
86
+ title:,
87
+ # When the ad was last updated.
88
+ updated_at:
89
+ )
90
+ end
91
+
92
+ sig do
93
+ override.returns(
94
+ {
95
+ id: String,
96
+ ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign,
97
+ ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup,
98
+ created_at: Time,
99
+ platform:
100
+ WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol,
101
+ status: WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol,
102
+ title: T.nilable(String),
103
+ updated_at: Time
104
+ }
105
+ )
106
+ end
107
+ def to_hash
108
+ end
109
+
110
+ class AdCampaign < WhopSDK::Internal::Type::BaseModel
111
+ OrHash =
112
+ T.type_alias do
113
+ T.any(
114
+ WhopSDK::Models::AdRetrieveResponse::AdCampaign,
115
+ WhopSDK::Internal::AnyHash
116
+ )
117
+ end
118
+
119
+ # The unique identifier for this ad campaign.
120
+ sig { returns(String) }
121
+ attr_accessor :id
122
+
123
+ # The ad campaign this ad belongs to.
124
+ sig { params(id: String).returns(T.attached_class) }
125
+ def self.new(
126
+ # The unique identifier for this ad campaign.
127
+ id:
128
+ )
129
+ end
130
+
131
+ sig { override.returns({ id: String }) }
132
+ def to_hash
133
+ end
134
+ end
135
+
136
+ class AdGroup < WhopSDK::Internal::Type::BaseModel
137
+ OrHash =
138
+ T.type_alias do
139
+ T.any(
140
+ WhopSDK::Models::AdRetrieveResponse::AdGroup,
141
+ WhopSDK::Internal::AnyHash
142
+ )
143
+ end
144
+
145
+ # The unique identifier for this ad group.
146
+ sig { returns(String) }
147
+ attr_accessor :id
148
+
149
+ # The parent ad group this ad belongs to.
150
+ sig { params(id: String).returns(T.attached_class) }
151
+ def self.new(
152
+ # The unique identifier for this ad group.
153
+ id:
154
+ )
155
+ end
156
+
157
+ sig { override.returns({ id: String }) }
158
+ def to_hash
159
+ end
160
+ end
161
+
162
+ # The external ad platform this ad is running on (e.g., meta, tiktok).
163
+ module Platform
164
+ extend WhopSDK::Internal::Type::Enum
165
+
166
+ TaggedSymbol =
167
+ T.type_alias do
168
+ T.all(Symbol, WhopSDK::Models::AdRetrieveResponse::Platform)
169
+ end
170
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
171
+
172
+ META =
173
+ T.let(
174
+ :meta,
175
+ WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol
176
+ )
177
+ TIKTOK =
178
+ T.let(
179
+ :tiktok,
180
+ WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol
181
+ )
182
+
183
+ sig do
184
+ override.returns(
185
+ T::Array[
186
+ WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol
187
+ ]
188
+ )
189
+ end
190
+ def self.values
191
+ end
192
+ end
193
+
194
+ # Current delivery status of the ad.
195
+ module Status
196
+ extend WhopSDK::Internal::Type::Enum
197
+
198
+ TaggedSymbol =
199
+ T.type_alias do
200
+ T.all(Symbol, WhopSDK::Models::AdRetrieveResponse::Status)
201
+ end
202
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
203
+
204
+ ACTIVE =
205
+ T.let(
206
+ :active,
207
+ WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol
208
+ )
209
+ PAUSED =
210
+ T.let(
211
+ :paused,
212
+ WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol
213
+ )
214
+ INACTIVE =
215
+ T.let(
216
+ :inactive,
217
+ WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol
218
+ )
219
+ IN_REVIEW =
220
+ T.let(
221
+ :in_review,
222
+ WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol
223
+ )
224
+ REJECTED =
225
+ T.let(
226
+ :rejected,
227
+ WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol
228
+ )
229
+ FLAGGED =
230
+ T.let(
231
+ :flagged,
232
+ WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol
233
+ )
234
+
235
+ sig do
236
+ override.returns(
237
+ T::Array[WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol]
238
+ )
239
+ end
240
+ def self.values
241
+ end
242
+ end
243
+ end
244
+ end
245
+ end
@@ -15,6 +15,8 @@ module WhopSDK
15
15
  SALES_MANAGER =
16
16
  T.let(:sales_manager, WhopSDK::AuthorizedUserRoles::TaggedSymbol)
17
17
  MODERATOR = T.let(:moderator, WhopSDK::AuthorizedUserRoles::TaggedSymbol)
18
+ ADVERTISER =
19
+ T.let(:advertiser, WhopSDK::AuthorizedUserRoles::TaggedSymbol)
18
20
  APP_MANAGER =
19
21
  T.let(:app_manager, WhopSDK::AuthorizedUserRoles::TaggedSymbol)
20
22
  SUPPORT = T.let(:support, WhopSDK::AuthorizedUserRoles::TaggedSymbol)
@@ -0,0 +1,129 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class BountyCreateParams < 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::BountyCreateParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # The amount paid to each approved submission. The total bounty pool funded is
15
+ # this amount times accepted_submissions_limit.
16
+ sig { returns(Float) }
17
+ attr_accessor :base_unit_amount
18
+
19
+ # The currency for the bounty pool funding amount.
20
+ sig { returns(WhopSDK::Currency::OrSymbol) }
21
+ attr_accessor :currency
22
+
23
+ # The description of the bounty.
24
+ sig { returns(String) }
25
+ attr_accessor :description
26
+
27
+ # The title of the bounty.
28
+ sig { returns(String) }
29
+ attr_accessor :title
30
+
31
+ # The number of submissions that can be approved before the bounty closes.
32
+ # Defaults to 1.
33
+ sig { returns(T.nilable(Integer)) }
34
+ attr_accessor :accepted_submissions_limit
35
+
36
+ # The ISO3166 country codes where this bounty should be visible. Empty means
37
+ # globally visible.
38
+ sig { returns(T.nilable(T::Array[String])) }
39
+ attr_accessor :allowed_country_codes
40
+
41
+ # An optional experience to scope the bounty to.
42
+ sig { returns(T.nilable(String)) }
43
+ attr_accessor :experience_id
44
+
45
+ # The user (user*\*) or company (biz*\*) tag whose balance funds this bounty pool.
46
+ # Defaults to the requester's personal balance when omitted. The requester must be
47
+ # the user themself or an owner/admin of the company.
48
+ sig { returns(T.nilable(String)) }
49
+ attr_accessor :origin_account_id
50
+
51
+ # Optional markdown body for the anchor forum post. Falls back to the bounty
52
+ # description when omitted.
53
+ sig { returns(T.nilable(String)) }
54
+ attr_accessor :post_markdown_content
55
+
56
+ # Optional title for the anchor forum post. Falls back to the bounty title when
57
+ # omitted.
58
+ sig { returns(T.nilable(String)) }
59
+ attr_accessor :post_title
60
+
61
+ sig do
62
+ params(
63
+ base_unit_amount: Float,
64
+ currency: WhopSDK::Currency::OrSymbol,
65
+ description: String,
66
+ title: String,
67
+ accepted_submissions_limit: T.nilable(Integer),
68
+ allowed_country_codes: T.nilable(T::Array[String]),
69
+ experience_id: T.nilable(String),
70
+ origin_account_id: T.nilable(String),
71
+ post_markdown_content: T.nilable(String),
72
+ post_title: T.nilable(String),
73
+ request_options: WhopSDK::RequestOptions::OrHash
74
+ ).returns(T.attached_class)
75
+ end
76
+ def self.new(
77
+ # The amount paid to each approved submission. The total bounty pool funded is
78
+ # this amount times accepted_submissions_limit.
79
+ base_unit_amount:,
80
+ # The currency for the bounty pool funding amount.
81
+ currency:,
82
+ # The description of the bounty.
83
+ description:,
84
+ # The title of the bounty.
85
+ title:,
86
+ # The number of submissions that can be approved before the bounty closes.
87
+ # Defaults to 1.
88
+ accepted_submissions_limit: nil,
89
+ # The ISO3166 country codes where this bounty should be visible. Empty means
90
+ # globally visible.
91
+ allowed_country_codes: nil,
92
+ # An optional experience to scope the bounty to.
93
+ experience_id: nil,
94
+ # The user (user*\*) or company (biz*\*) tag whose balance funds this bounty pool.
95
+ # Defaults to the requester's personal balance when omitted. The requester must be
96
+ # the user themself or an owner/admin of the company.
97
+ origin_account_id: nil,
98
+ # Optional markdown body for the anchor forum post. Falls back to the bounty
99
+ # description when omitted.
100
+ post_markdown_content: nil,
101
+ # Optional title for the anchor forum post. Falls back to the bounty title when
102
+ # omitted.
103
+ post_title: nil,
104
+ request_options: {}
105
+ )
106
+ end
107
+
108
+ sig do
109
+ override.returns(
110
+ {
111
+ base_unit_amount: Float,
112
+ currency: WhopSDK::Currency::OrSymbol,
113
+ description: String,
114
+ title: String,
115
+ accepted_submissions_limit: T.nilable(Integer),
116
+ allowed_country_codes: T.nilable(T::Array[String]),
117
+ experience_id: T.nilable(String),
118
+ origin_account_id: T.nilable(String),
119
+ post_markdown_content: T.nilable(String),
120
+ post_title: T.nilable(String),
121
+ request_options: WhopSDK::RequestOptions
122
+ }
123
+ )
124
+ end
125
+ def to_hash
126
+ end
127
+ end
128
+ end
129
+ end
@@ -0,0 +1,196 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class BountyCreateResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::Models::BountyCreateResponse,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier for the bounty.
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # The underlying bounty implementation type.
19
+ sig do
20
+ returns(WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol)
21
+ end
22
+ attr_accessor :bounty_type
23
+
24
+ # The datetime the bounty was created.
25
+ sig { returns(Time) }
26
+ attr_accessor :created_at
27
+
28
+ # The currency used for the bounty funds.
29
+ sig { returns(WhopSDK::Currency::TaggedSymbol) }
30
+ attr_accessor :currency
31
+
32
+ # The description of the bounty.
33
+ sig { returns(String) }
34
+ attr_accessor :description
35
+
36
+ # The current lifecycle status of the bounty.
37
+ sig do
38
+ returns(WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol)
39
+ end
40
+ attr_accessor :status
41
+
42
+ # The title of the bounty.
43
+ sig { returns(String) }
44
+ attr_accessor :title
45
+
46
+ # The total amount currently funded in the bounty pool for payout.
47
+ sig { returns(Float) }
48
+ attr_accessor :total_available
49
+
50
+ # The total amount paid out for this bounty.
51
+ sig { returns(Float) }
52
+ attr_accessor :total_paid
53
+
54
+ # The datetime the bounty was last updated.
55
+ sig { returns(Time) }
56
+ attr_accessor :updated_at
57
+
58
+ # The number of watcher votes required before the submission can resolve.
59
+ sig { returns(Integer) }
60
+ attr_accessor :vote_threshold
61
+
62
+ # A privately accessible bounty.
63
+ sig do
64
+ params(
65
+ id: String,
66
+ bounty_type:
67
+ WhopSDK::Models::BountyCreateResponse::BountyType::OrSymbol,
68
+ created_at: Time,
69
+ currency: WhopSDK::Currency::OrSymbol,
70
+ description: String,
71
+ status: WhopSDK::Models::BountyCreateResponse::Status::OrSymbol,
72
+ title: String,
73
+ total_available: Float,
74
+ total_paid: Float,
75
+ updated_at: Time,
76
+ vote_threshold: Integer
77
+ ).returns(T.attached_class)
78
+ end
79
+ def self.new(
80
+ # The unique identifier for the bounty.
81
+ id:,
82
+ # The underlying bounty implementation type.
83
+ bounty_type:,
84
+ # The datetime the bounty was created.
85
+ created_at:,
86
+ # The currency used for the bounty funds.
87
+ currency:,
88
+ # The description of the bounty.
89
+ description:,
90
+ # The current lifecycle status of the bounty.
91
+ status:,
92
+ # The title of the bounty.
93
+ title:,
94
+ # The total amount currently funded in the bounty pool for payout.
95
+ total_available:,
96
+ # The total amount paid out for this bounty.
97
+ total_paid:,
98
+ # The datetime the bounty was last updated.
99
+ updated_at:,
100
+ # The number of watcher votes required before the submission can resolve.
101
+ vote_threshold:
102
+ )
103
+ end
104
+
105
+ sig do
106
+ override.returns(
107
+ {
108
+ id: String,
109
+ bounty_type:
110
+ WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol,
111
+ created_at: Time,
112
+ currency: WhopSDK::Currency::TaggedSymbol,
113
+ description: String,
114
+ status: WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol,
115
+ title: String,
116
+ total_available: Float,
117
+ total_paid: Float,
118
+ updated_at: Time,
119
+ vote_threshold: Integer
120
+ }
121
+ )
122
+ end
123
+ def to_hash
124
+ end
125
+
126
+ # The underlying bounty implementation type.
127
+ module BountyType
128
+ extend WhopSDK::Internal::Type::Enum
129
+
130
+ TaggedSymbol =
131
+ T.type_alias do
132
+ T.all(Symbol, WhopSDK::Models::BountyCreateResponse::BountyType)
133
+ end
134
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
135
+
136
+ CLASSIC =
137
+ T.let(
138
+ :classic,
139
+ WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol
140
+ )
141
+ USER_FUNDED =
142
+ T.let(
143
+ :user_funded,
144
+ WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol
145
+ )
146
+ WORKFORCE =
147
+ T.let(
148
+ :workforce,
149
+ WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol
150
+ )
151
+
152
+ sig do
153
+ override.returns(
154
+ T::Array[
155
+ WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol
156
+ ]
157
+ )
158
+ end
159
+ def self.values
160
+ end
161
+ end
162
+
163
+ # The current lifecycle status of the bounty.
164
+ module Status
165
+ extend WhopSDK::Internal::Type::Enum
166
+
167
+ TaggedSymbol =
168
+ T.type_alias do
169
+ T.all(Symbol, WhopSDK::Models::BountyCreateResponse::Status)
170
+ end
171
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
172
+
173
+ PUBLISHED =
174
+ T.let(
175
+ :published,
176
+ WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol
177
+ )
178
+ ARCHIVED =
179
+ T.let(
180
+ :archived,
181
+ WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol
182
+ )
183
+
184
+ sig do
185
+ override.returns(
186
+ T::Array[
187
+ WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol
188
+ ]
189
+ )
190
+ end
191
+ def self.values
192
+ end
193
+ end
194
+ end
195
+ end
196
+ end
@@ -0,0 +1,115 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class BountyListParams < 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::BountyListParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # Returns the elements in the list that come after the specified cursor.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_accessor :after
17
+
18
+ # Returns the elements in the list that come before the specified cursor.
19
+ sig { returns(T.nilable(String)) }
20
+ attr_accessor :before
21
+
22
+ # The direction of the sort.
23
+ sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) }
24
+ attr_accessor :direction
25
+
26
+ # The experience to list bounties for. When omitted, returns bounties with no
27
+ # experience.
28
+ sig { returns(T.nilable(String)) }
29
+ attr_accessor :experience_id
30
+
31
+ # Returns the first _n_ elements from the list.
32
+ sig { returns(T.nilable(Integer)) }
33
+ attr_accessor :first
34
+
35
+ # Returns the last _n_ elements from the list.
36
+ sig { returns(T.nilable(Integer)) }
37
+ attr_accessor :last
38
+
39
+ # The available bounty statuses to choose from.
40
+ sig { returns(T.nilable(WhopSDK::BountyListParams::Status::OrSymbol)) }
41
+ attr_accessor :status
42
+
43
+ sig do
44
+ params(
45
+ after: T.nilable(String),
46
+ before: T.nilable(String),
47
+ direction: T.nilable(WhopSDK::Direction::OrSymbol),
48
+ experience_id: T.nilable(String),
49
+ first: T.nilable(Integer),
50
+ last: T.nilable(Integer),
51
+ status: T.nilable(WhopSDK::BountyListParams::Status::OrSymbol),
52
+ request_options: WhopSDK::RequestOptions::OrHash
53
+ ).returns(T.attached_class)
54
+ end
55
+ def self.new(
56
+ # Returns the elements in the list that come after the specified cursor.
57
+ after: nil,
58
+ # Returns the elements in the list that come before the specified cursor.
59
+ before: nil,
60
+ # The direction of the sort.
61
+ direction: nil,
62
+ # The experience to list bounties for. When omitted, returns bounties with no
63
+ # experience.
64
+ experience_id: nil,
65
+ # Returns the first _n_ elements from the list.
66
+ first: nil,
67
+ # Returns the last _n_ elements from the list.
68
+ last: nil,
69
+ # The available bounty statuses to choose from.
70
+ status: nil,
71
+ request_options: {}
72
+ )
73
+ end
74
+
75
+ sig do
76
+ override.returns(
77
+ {
78
+ after: T.nilable(String),
79
+ before: T.nilable(String),
80
+ direction: T.nilable(WhopSDK::Direction::OrSymbol),
81
+ experience_id: T.nilable(String),
82
+ first: T.nilable(Integer),
83
+ last: T.nilable(Integer),
84
+ status: T.nilable(WhopSDK::BountyListParams::Status::OrSymbol),
85
+ request_options: WhopSDK::RequestOptions
86
+ }
87
+ )
88
+ end
89
+ def to_hash
90
+ end
91
+
92
+ # The available bounty statuses to choose from.
93
+ module Status
94
+ extend WhopSDK::Internal::Type::Enum
95
+
96
+ TaggedSymbol =
97
+ T.type_alias { T.all(Symbol, WhopSDK::BountyListParams::Status) }
98
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
99
+
100
+ PUBLISHED =
101
+ T.let(:published, WhopSDK::BountyListParams::Status::TaggedSymbol)
102
+ ARCHIVED =
103
+ T.let(:archived, WhopSDK::BountyListParams::Status::TaggedSymbol)
104
+
105
+ sig do
106
+ override.returns(
107
+ T::Array[WhopSDK::BountyListParams::Status::TaggedSymbol]
108
+ )
109
+ end
110
+ def self.values
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end