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,189 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class BountyListResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(WhopSDK::Models::BountyListResponse, WhopSDK::Internal::AnyHash)
9
+ end
10
+
11
+ # The unique identifier for the bounty.
12
+ sig { returns(String) }
13
+ attr_accessor :id
14
+
15
+ # The underlying bounty implementation type.
16
+ sig do
17
+ returns(WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol)
18
+ end
19
+ attr_accessor :bounty_type
20
+
21
+ # The datetime the bounty was created.
22
+ sig { returns(Time) }
23
+ attr_accessor :created_at
24
+
25
+ # The currency used for the bounty funds.
26
+ sig { returns(WhopSDK::Currency::TaggedSymbol) }
27
+ attr_accessor :currency
28
+
29
+ # The description of the bounty.
30
+ sig { returns(String) }
31
+ attr_accessor :description
32
+
33
+ # The current lifecycle status of the bounty.
34
+ sig { returns(WhopSDK::Models::BountyListResponse::Status::TaggedSymbol) }
35
+ attr_accessor :status
36
+
37
+ # The title of the bounty.
38
+ sig { returns(String) }
39
+ attr_accessor :title
40
+
41
+ # The total amount currently funded in the bounty pool for payout.
42
+ sig { returns(Float) }
43
+ attr_accessor :total_available
44
+
45
+ # The total amount paid out for this bounty.
46
+ sig { returns(Float) }
47
+ attr_accessor :total_paid
48
+
49
+ # The datetime the bounty was last updated.
50
+ sig { returns(Time) }
51
+ attr_accessor :updated_at
52
+
53
+ # The number of watcher votes required before the submission can resolve.
54
+ sig { returns(Integer) }
55
+ attr_accessor :vote_threshold
56
+
57
+ # A privately accessible bounty.
58
+ sig do
59
+ params(
60
+ id: String,
61
+ bounty_type:
62
+ WhopSDK::Models::BountyListResponse::BountyType::OrSymbol,
63
+ created_at: Time,
64
+ currency: WhopSDK::Currency::OrSymbol,
65
+ description: String,
66
+ status: WhopSDK::Models::BountyListResponse::Status::OrSymbol,
67
+ title: String,
68
+ total_available: Float,
69
+ total_paid: Float,
70
+ updated_at: Time,
71
+ vote_threshold: Integer
72
+ ).returns(T.attached_class)
73
+ end
74
+ def self.new(
75
+ # The unique identifier for the bounty.
76
+ id:,
77
+ # The underlying bounty implementation type.
78
+ bounty_type:,
79
+ # The datetime the bounty was created.
80
+ created_at:,
81
+ # The currency used for the bounty funds.
82
+ currency:,
83
+ # The description of the bounty.
84
+ description:,
85
+ # The current lifecycle status of the bounty.
86
+ status:,
87
+ # The title of the bounty.
88
+ title:,
89
+ # The total amount currently funded in the bounty pool for payout.
90
+ total_available:,
91
+ # The total amount paid out for this bounty.
92
+ total_paid:,
93
+ # The datetime the bounty was last updated.
94
+ updated_at:,
95
+ # The number of watcher votes required before the submission can resolve.
96
+ vote_threshold:
97
+ )
98
+ end
99
+
100
+ sig do
101
+ override.returns(
102
+ {
103
+ id: String,
104
+ bounty_type:
105
+ WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol,
106
+ created_at: Time,
107
+ currency: WhopSDK::Currency::TaggedSymbol,
108
+ description: String,
109
+ status: WhopSDK::Models::BountyListResponse::Status::TaggedSymbol,
110
+ title: String,
111
+ total_available: Float,
112
+ total_paid: Float,
113
+ updated_at: Time,
114
+ vote_threshold: Integer
115
+ }
116
+ )
117
+ end
118
+ def to_hash
119
+ end
120
+
121
+ # The underlying bounty implementation type.
122
+ module BountyType
123
+ extend WhopSDK::Internal::Type::Enum
124
+
125
+ TaggedSymbol =
126
+ T.type_alias do
127
+ T.all(Symbol, WhopSDK::Models::BountyListResponse::BountyType)
128
+ end
129
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
130
+
131
+ CLASSIC =
132
+ T.let(
133
+ :classic,
134
+ WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol
135
+ )
136
+ USER_FUNDED =
137
+ T.let(
138
+ :user_funded,
139
+ WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol
140
+ )
141
+ WORKFORCE =
142
+ T.let(
143
+ :workforce,
144
+ WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol
145
+ )
146
+
147
+ sig do
148
+ override.returns(
149
+ T::Array[
150
+ WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol
151
+ ]
152
+ )
153
+ end
154
+ def self.values
155
+ end
156
+ end
157
+
158
+ # The current lifecycle status of the bounty.
159
+ module Status
160
+ extend WhopSDK::Internal::Type::Enum
161
+
162
+ TaggedSymbol =
163
+ T.type_alias do
164
+ T.all(Symbol, WhopSDK::Models::BountyListResponse::Status)
165
+ end
166
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
167
+
168
+ PUBLISHED =
169
+ T.let(
170
+ :published,
171
+ WhopSDK::Models::BountyListResponse::Status::TaggedSymbol
172
+ )
173
+ ARCHIVED =
174
+ T.let(
175
+ :archived,
176
+ WhopSDK::Models::BountyListResponse::Status::TaggedSymbol
177
+ )
178
+
179
+ sig do
180
+ override.returns(
181
+ T::Array[WhopSDK::Models::BountyListResponse::Status::TaggedSymbol]
182
+ )
183
+ end
184
+ def self.values
185
+ end
186
+ end
187
+ end
188
+ end
189
+ end
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class BountyRetrieveParams < 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::BountyRetrieveParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :id
16
+
17
+ sig do
18
+ params(
19
+ id: String,
20
+ request_options: WhopSDK::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { id: String, request_options: WhopSDK::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,199 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class BountyRetrieveResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::Models::BountyRetrieveResponse,
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(
21
+ WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol
22
+ )
23
+ end
24
+ attr_accessor :bounty_type
25
+
26
+ # The datetime the bounty was created.
27
+ sig { returns(Time) }
28
+ attr_accessor :created_at
29
+
30
+ # The currency used for the bounty funds.
31
+ sig { returns(WhopSDK::Currency::TaggedSymbol) }
32
+ attr_accessor :currency
33
+
34
+ # The description of the bounty.
35
+ sig { returns(String) }
36
+ attr_accessor :description
37
+
38
+ # The current lifecycle status of the bounty.
39
+ sig do
40
+ returns(WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol)
41
+ end
42
+ attr_accessor :status
43
+
44
+ # The title of the bounty.
45
+ sig { returns(String) }
46
+ attr_accessor :title
47
+
48
+ # The total amount currently funded in the bounty pool for payout.
49
+ sig { returns(Float) }
50
+ attr_accessor :total_available
51
+
52
+ # The total amount paid out for this bounty.
53
+ sig { returns(Float) }
54
+ attr_accessor :total_paid
55
+
56
+ # The datetime the bounty was last updated.
57
+ sig { returns(Time) }
58
+ attr_accessor :updated_at
59
+
60
+ # The number of watcher votes required before the submission can resolve.
61
+ sig { returns(Integer) }
62
+ attr_accessor :vote_threshold
63
+
64
+ # A privately accessible bounty.
65
+ sig do
66
+ params(
67
+ id: String,
68
+ bounty_type:
69
+ WhopSDK::Models::BountyRetrieveResponse::BountyType::OrSymbol,
70
+ created_at: Time,
71
+ currency: WhopSDK::Currency::OrSymbol,
72
+ description: String,
73
+ status: WhopSDK::Models::BountyRetrieveResponse::Status::OrSymbol,
74
+ title: String,
75
+ total_available: Float,
76
+ total_paid: Float,
77
+ updated_at: Time,
78
+ vote_threshold: Integer
79
+ ).returns(T.attached_class)
80
+ end
81
+ def self.new(
82
+ # The unique identifier for the bounty.
83
+ id:,
84
+ # The underlying bounty implementation type.
85
+ bounty_type:,
86
+ # The datetime the bounty was created.
87
+ created_at:,
88
+ # The currency used for the bounty funds.
89
+ currency:,
90
+ # The description of the bounty.
91
+ description:,
92
+ # The current lifecycle status of the bounty.
93
+ status:,
94
+ # The title of the bounty.
95
+ title:,
96
+ # The total amount currently funded in the bounty pool for payout.
97
+ total_available:,
98
+ # The total amount paid out for this bounty.
99
+ total_paid:,
100
+ # The datetime the bounty was last updated.
101
+ updated_at:,
102
+ # The number of watcher votes required before the submission can resolve.
103
+ vote_threshold:
104
+ )
105
+ end
106
+
107
+ sig do
108
+ override.returns(
109
+ {
110
+ id: String,
111
+ bounty_type:
112
+ WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol,
113
+ created_at: Time,
114
+ currency: WhopSDK::Currency::TaggedSymbol,
115
+ description: String,
116
+ status:
117
+ WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol,
118
+ title: String,
119
+ total_available: Float,
120
+ total_paid: Float,
121
+ updated_at: Time,
122
+ vote_threshold: Integer
123
+ }
124
+ )
125
+ end
126
+ def to_hash
127
+ end
128
+
129
+ # The underlying bounty implementation type.
130
+ module BountyType
131
+ extend WhopSDK::Internal::Type::Enum
132
+
133
+ TaggedSymbol =
134
+ T.type_alias do
135
+ T.all(Symbol, WhopSDK::Models::BountyRetrieveResponse::BountyType)
136
+ end
137
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
138
+
139
+ CLASSIC =
140
+ T.let(
141
+ :classic,
142
+ WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol
143
+ )
144
+ USER_FUNDED =
145
+ T.let(
146
+ :user_funded,
147
+ WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol
148
+ )
149
+ WORKFORCE =
150
+ T.let(
151
+ :workforce,
152
+ WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol
153
+ )
154
+
155
+ sig do
156
+ override.returns(
157
+ T::Array[
158
+ WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol
159
+ ]
160
+ )
161
+ end
162
+ def self.values
163
+ end
164
+ end
165
+
166
+ # The current lifecycle status of the bounty.
167
+ module Status
168
+ extend WhopSDK::Internal::Type::Enum
169
+
170
+ TaggedSymbol =
171
+ T.type_alias do
172
+ T.all(Symbol, WhopSDK::Models::BountyRetrieveResponse::Status)
173
+ end
174
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
175
+
176
+ PUBLISHED =
177
+ T.let(
178
+ :published,
179
+ WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol
180
+ )
181
+ ARCHIVED =
182
+ T.let(
183
+ :archived,
184
+ WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol
185
+ )
186
+
187
+ sig do
188
+ override.returns(
189
+ T::Array[
190
+ WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol
191
+ ]
192
+ )
193
+ end
194
+ def self.values
195
+ end
196
+ end
197
+ end
198
+ end
199
+ end
@@ -16,6 +16,11 @@ module WhopSDK
16
16
  sig { returns(T.nilable(String)) }
17
17
  attr_accessor :affiliate_code
18
18
 
19
+ # Whether the checkout configuration allows promo codes. When false, the promo
20
+ # code input is hidden and promo codes are rejected.
21
+ sig { returns(T::Boolean) }
22
+ attr_accessor :allow_promo_codes
23
+
19
24
  # The ID of the company to use for the checkout configuration
20
25
  sig { returns(String) }
21
26
  attr_accessor :company_id
@@ -79,6 +84,7 @@ module WhopSDK
79
84
  params(
80
85
  id: String,
81
86
  affiliate_code: T.nilable(String),
87
+ allow_promo_codes: T::Boolean,
82
88
  company_id: String,
83
89
  currency: T.nilable(WhopSDK::Currency::OrSymbol),
84
90
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
@@ -97,6 +103,9 @@ module WhopSDK
97
103
  id:,
98
104
  # The affiliate code to use for the checkout configuration
99
105
  affiliate_code:,
106
+ # Whether the checkout configuration allows promo codes. When false, the promo
107
+ # code input is hidden and promo codes are rejected.
108
+ allow_promo_codes:,
100
109
  # The ID of the company to use for the checkout configuration
101
110
  company_id:,
102
111
  # The available currencies on the platform
@@ -124,6 +133,7 @@ module WhopSDK
124
133
  {
125
134
  id: String,
126
135
  affiliate_code: T.nilable(String),
136
+ allow_promo_codes: T::Boolean,
127
137
  company_id: String,
128
138
  currency: T.nilable(WhopSDK::Currency::TaggedSymbol),
129
139
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
@@ -220,6 +230,11 @@ module WhopSDK
220
230
  sig { returns(String) }
221
231
  attr_accessor :id
222
232
 
233
+ # Whether the creator has turned on adaptive pricing for this plan. Raw setting —
234
+ # does not check processor compatibility or feature flags.
235
+ sig { returns(T::Boolean) }
236
+ attr_accessor :adaptive_pricing_enabled
237
+
223
238
  # The number of days between each recurring charge. Null for one-time plans. For
224
239
  # example, 30 for monthly or 365 for annual billing.
225
240
  sig { returns(T.nilable(Integer)) }
@@ -271,6 +286,7 @@ module WhopSDK
271
286
  sig do
272
287
  params(
273
288
  id: String,
289
+ adaptive_pricing_enabled: T::Boolean,
274
290
  billing_period: T.nilable(Integer),
275
291
  currency: WhopSDK::Currency::OrSymbol,
276
292
  expiration_days: T.nilable(Integer),
@@ -285,6 +301,9 @@ module WhopSDK
285
301
  def self.new(
286
302
  # The unique identifier for the plan.
287
303
  id:,
304
+ # Whether the creator has turned on adaptive pricing for this plan. Raw setting —
305
+ # does not check processor compatibility or feature flags.
306
+ adaptive_pricing_enabled:,
288
307
  # The number of days between each recurring charge. Null for one-time plans. For
289
308
  # example, 30 for monthly or 365 for annual billing.
290
309
  billing_period:,
@@ -321,6 +340,7 @@ module WhopSDK
321
340
  override.returns(
322
341
  {
323
342
  id: String,
343
+ adaptive_pricing_enabled: T::Boolean,
324
344
  billing_period: T.nilable(Integer),
325
345
  currency: WhopSDK::Currency::TaggedSymbol,
326
346
  expiration_days: T.nilable(Integer),