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
@@ -45,6 +45,13 @@ module WhopSDK
45
45
  # @return [String, nil]
46
46
  optional :affiliate_code, String, nil?: true
47
47
 
48
+ # @!attribute allow_promo_codes
49
+ # Whether the checkout should show the promo code input field and accept promo
50
+ # codes. Defaults to true.
51
+ #
52
+ # @return [Boolean, nil]
53
+ optional :allow_promo_codes, WhopSDK::Internal::Type::Boolean, nil?: true
54
+
48
55
  # @!attribute checkout_styling
49
56
  # Checkout styling overrides for this session. Overrides plan and company
50
57
  # defaults.
@@ -97,7 +104,7 @@ module WhopSDK
97
104
  # @return [String, nil]
98
105
  optional :source_url, String, nil?: true
99
106
 
100
- # @!method initialize(plan:, affiliate_code: nil, checkout_styling: nil, currency: nil, metadata: nil, mode: nil, payment_method_configuration: nil, redirect_url: nil, source_url: nil)
107
+ # @!method initialize(plan:, affiliate_code: nil, allow_promo_codes: nil, checkout_styling: nil, currency: nil, metadata: nil, mode: nil, payment_method_configuration: nil, redirect_url: nil, source_url: nil)
101
108
  # Some parameter documentations has been truncated, see
102
109
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan}
103
110
  # for more details.
@@ -108,6 +115,8 @@ module WhopSDK
108
115
  #
109
116
  # @param affiliate_code [String, nil] An affiliate tracking code to attribute the checkout to a specific affiliate.
110
117
  #
118
+ # @param allow_promo_codes [Boolean, nil] Whether the checkout should show the promo code input field and accept promo cod
119
+ #
111
120
  # @param checkout_styling [WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::CheckoutStyling, nil] Checkout styling overrides for this session. Overrides plan and company defaults
112
121
  #
113
122
  # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
@@ -136,6 +145,12 @@ module WhopSDK
136
145
  # @return [Symbol, WhopSDK::Models::Currency]
137
146
  required :currency, enum: -> { WhopSDK::Currency }
138
147
 
148
+ # @!attribute adaptive_pricing_enabled
149
+ # Whether this plan accepts local currency payments via adaptive pricing.
150
+ #
151
+ # @return [Boolean, nil]
152
+ optional :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean, nil?: true
153
+
139
154
  # @!attribute application_fee_amount
140
155
  # The application fee amount collected by the platform from this connected
141
156
  # account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less
@@ -291,7 +306,7 @@ module WhopSDK
291
306
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
292
307
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
293
308
 
294
- # @!method initialize(company_id:, currency:, application_fee_amount: nil, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, visibility: nil)
309
+ # @!method initialize(company_id:, currency:, adaptive_pricing_enabled: nil, application_fee_amount: nil, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, visibility: nil)
295
310
  # Some parameter documentations has been truncated, see
296
311
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan}
297
312
  # for more details.
@@ -302,6 +317,8 @@ module WhopSDK
302
317
  #
303
318
  # @param currency [Symbol, WhopSDK::Models::Currency] The respective currency identifier for the plan.
304
319
  #
320
+ # @param adaptive_pricing_enabled [Boolean, nil] Whether this plan accepts local currency payments via adaptive pricing.
321
+ #
305
322
  # @param application_fee_amount [Float, nil] The application fee amount collected by the platform from this connected account
306
323
  #
307
324
  # @param billing_period [Integer, nil] The interval in days at which the plan charges (renewal plans). For example, 30
@@ -432,10 +449,10 @@ module WhopSDK
432
449
  # in this configuration. The full list of default payment methods can be found in
433
450
  # the documentation at docs.whop.com/payments.
434
451
  #
435
- # @return [Boolean]
436
- required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
452
+ # @return [Boolean, nil]
453
+ optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true
437
454
 
438
- # @!method initialize(disabled:, enabled:, include_platform_defaults:)
455
+ # @!method initialize(disabled:, enabled:, include_platform_defaults: nil)
439
456
  # Some parameter documentations has been truncated, see
440
457
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::PaymentMethodConfiguration}
441
458
  # for more details.
@@ -447,7 +464,7 @@ module WhopSDK
447
464
  #
448
465
  # @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
449
466
  #
450
- # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
467
+ # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included
451
468
  end
452
469
 
453
470
  # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan#product
@@ -565,6 +582,13 @@ module WhopSDK
565
582
 
566
583
  # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan#checkout_styling
567
584
  class CheckoutStyling < WhopSDK::Internal::Type::BaseModel
585
+ # @!attribute background_color
586
+ # A hex color code for the checkout page background, applied to the order summary
587
+ # panel (e.g. #F4F4F5).
588
+ #
589
+ # @return [String, nil]
590
+ optional :background_color, String, nil?: true
591
+
568
592
  # @!attribute border_style
569
593
  # The different border-radius styles available for checkout pages.
570
594
  #
@@ -583,10 +607,16 @@ module WhopSDK
583
607
  # @return [Symbol, WhopSDK::Models::CheckoutFont, nil]
584
608
  optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true
585
609
 
586
- # @!method initialize(border_style: nil, button_color: nil, font_family: nil)
610
+ # @!method initialize(background_color: nil, border_style: nil, button_color: nil, font_family: nil)
611
+ # Some parameter documentations has been truncated, see
612
+ # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::CheckoutStyling}
613
+ # for more details.
614
+ #
587
615
  # Checkout styling overrides for this session. Overrides plan and company
588
616
  # defaults.
589
617
  #
618
+ # @param background_color [String, nil] A hex color code for the checkout page background, applied to the order summary
619
+ #
590
620
  # @param border_style [Symbol, WhopSDK::Models::CheckoutShape, nil] The different border-radius styles available for checkout pages.
591
621
  #
592
622
  # @param button_color [String, nil] A hex color code for the button color (e.g. #FF5733).
@@ -627,10 +657,10 @@ module WhopSDK
627
657
  # in this configuration. The full list of default payment methods can be found in
628
658
  # the documentation at docs.whop.com/payments.
629
659
  #
630
- # @return [Boolean]
631
- required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
660
+ # @return [Boolean, nil]
661
+ optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true
632
662
 
633
- # @!method initialize(disabled:, enabled:, include_platform_defaults:)
663
+ # @!method initialize(disabled:, enabled:, include_platform_defaults: nil)
634
664
  # Some parameter documentations has been truncated, see
635
665
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::PaymentMethodConfiguration}
636
666
  # for more details.
@@ -642,7 +672,7 @@ module WhopSDK
642
672
  #
643
673
  # @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
644
674
  #
645
- # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
675
+ # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included
646
676
  end
647
677
  end
648
678
 
@@ -660,6 +690,13 @@ module WhopSDK
660
690
  # @return [String, nil]
661
691
  optional :affiliate_code, String, nil?: true
662
692
 
693
+ # @!attribute allow_promo_codes
694
+ # Whether the checkout should show the promo code input field and accept promo
695
+ # codes. Defaults to true.
696
+ #
697
+ # @return [Boolean, nil]
698
+ optional :allow_promo_codes, WhopSDK::Internal::Type::Boolean, nil?: true
699
+
663
700
  # @!attribute checkout_styling
664
701
  # Checkout styling overrides for this session. Overrides plan and company
665
702
  # defaults.
@@ -712,7 +749,7 @@ module WhopSDK
712
749
  # @return [String, nil]
713
750
  optional :source_url, String, nil?: true
714
751
 
715
- # @!method initialize(plan_id:, affiliate_code: nil, checkout_styling: nil, currency: nil, metadata: nil, mode: nil, payment_method_configuration: nil, redirect_url: nil, source_url: nil)
752
+ # @!method initialize(plan_id:, affiliate_code: nil, allow_promo_codes: nil, checkout_styling: nil, currency: nil, metadata: nil, mode: nil, payment_method_configuration: nil, redirect_url: nil, source_url: nil)
716
753
  # Some parameter documentations has been truncated, see
717
754
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID}
718
755
  # for more details.
@@ -723,6 +760,8 @@ module WhopSDK
723
760
  #
724
761
  # @param affiliate_code [String, nil] An affiliate tracking code to attribute the checkout to a specific affiliate.
725
762
  #
763
+ # @param allow_promo_codes [Boolean, nil] Whether the checkout should show the promo code input field and accept promo cod
764
+ #
726
765
  # @param checkout_styling [WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID::CheckoutStyling, nil] Checkout styling overrides for this session. Overrides plan and company defaults
727
766
  #
728
767
  # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
@@ -739,6 +778,13 @@ module WhopSDK
739
778
 
740
779
  # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID#checkout_styling
741
780
  class CheckoutStyling < WhopSDK::Internal::Type::BaseModel
781
+ # @!attribute background_color
782
+ # A hex color code for the checkout page background, applied to the order summary
783
+ # panel (e.g. #F4F4F5).
784
+ #
785
+ # @return [String, nil]
786
+ optional :background_color, String, nil?: true
787
+
742
788
  # @!attribute border_style
743
789
  # The different border-radius styles available for checkout pages.
744
790
  #
@@ -757,10 +803,16 @@ module WhopSDK
757
803
  # @return [Symbol, WhopSDK::Models::CheckoutFont, nil]
758
804
  optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true
759
805
 
760
- # @!method initialize(border_style: nil, button_color: nil, font_family: nil)
806
+ # @!method initialize(background_color: nil, border_style: nil, button_color: nil, font_family: nil)
807
+ # Some parameter documentations has been truncated, see
808
+ # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID::CheckoutStyling}
809
+ # for more details.
810
+ #
761
811
  # Checkout styling overrides for this session. Overrides plan and company
762
812
  # defaults.
763
813
  #
814
+ # @param background_color [String, nil] A hex color code for the checkout page background, applied to the order summary
815
+ #
764
816
  # @param border_style [Symbol, WhopSDK::Models::CheckoutShape, nil] The different border-radius styles available for checkout pages.
765
817
  #
766
818
  # @param button_color [String, nil] A hex color code for the button color (e.g. #FF5733).
@@ -801,10 +853,10 @@ module WhopSDK
801
853
  # in this configuration. The full list of default payment methods can be found in
802
854
  # the documentation at docs.whop.com/payments.
803
855
  #
804
- # @return [Boolean]
805
- required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
856
+ # @return [Boolean, nil]
857
+ optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true
806
858
 
807
- # @!method initialize(disabled:, enabled:, include_platform_defaults:)
859
+ # @!method initialize(disabled:, enabled:, include_platform_defaults: nil)
808
860
  # Some parameter documentations has been truncated, see
809
861
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID::PaymentMethodConfiguration}
810
862
  # for more details.
@@ -816,7 +868,7 @@ module WhopSDK
816
868
  #
817
869
  # @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
818
870
  #
819
- # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
871
+ # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included
820
872
  end
821
873
  end
822
874
 
@@ -833,6 +885,13 @@ module WhopSDK
833
885
  # @return [Symbol, :setup]
834
886
  required :mode, const: :setup
835
887
 
888
+ # @!attribute allow_promo_codes
889
+ # Whether the checkout should show the promo code input field and accept promo
890
+ # codes. Defaults to true.
891
+ #
892
+ # @return [Boolean, nil]
893
+ optional :allow_promo_codes, WhopSDK::Internal::Type::Boolean, nil?: true
894
+
836
895
  # @!attribute checkout_styling
837
896
  # Checkout styling overrides for this session. Overrides plan and company
838
897
  # defaults.
@@ -879,7 +938,7 @@ module WhopSDK
879
938
  # @return [String, nil]
880
939
  optional :source_url, String, nil?: true
881
940
 
882
- # @!method initialize(company_id:, checkout_styling: nil, currency: nil, metadata: nil, payment_method_configuration: nil, redirect_url: nil, source_url: nil, mode: :setup)
941
+ # @!method initialize(company_id:, allow_promo_codes: nil, checkout_styling: nil, currency: nil, metadata: nil, payment_method_configuration: nil, redirect_url: nil, source_url: nil, mode: :setup)
883
942
  # Some parameter documentations has been truncated, see
884
943
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModeSetup}
885
944
  # for more details.
@@ -888,6 +947,8 @@ module WhopSDK
888
947
  #
889
948
  # @param company_id [String] The unique identifier of the company to create the checkout configuration for. O
890
949
  #
950
+ # @param allow_promo_codes [Boolean, nil] Whether the checkout should show the promo code input field and accept promo cod
951
+ #
891
952
  # @param checkout_styling [WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModeSetup::CheckoutStyling, nil] Checkout styling overrides for this session. Overrides plan and company defaults
892
953
  #
893
954
  # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
@@ -904,6 +965,13 @@ module WhopSDK
904
965
 
905
966
  # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModeSetup#checkout_styling
906
967
  class CheckoutStyling < WhopSDK::Internal::Type::BaseModel
968
+ # @!attribute background_color
969
+ # A hex color code for the checkout page background, applied to the order summary
970
+ # panel (e.g. #F4F4F5).
971
+ #
972
+ # @return [String, nil]
973
+ optional :background_color, String, nil?: true
974
+
907
975
  # @!attribute border_style
908
976
  # The different border-radius styles available for checkout pages.
909
977
  #
@@ -922,10 +990,16 @@ module WhopSDK
922
990
  # @return [Symbol, WhopSDK::Models::CheckoutFont, nil]
923
991
  optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true
924
992
 
925
- # @!method initialize(border_style: nil, button_color: nil, font_family: nil)
993
+ # @!method initialize(background_color: nil, border_style: nil, button_color: nil, font_family: nil)
994
+ # Some parameter documentations has been truncated, see
995
+ # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModeSetup::CheckoutStyling}
996
+ # for more details.
997
+ #
926
998
  # Checkout styling overrides for this session. Overrides plan and company
927
999
  # defaults.
928
1000
  #
1001
+ # @param background_color [String, nil] A hex color code for the checkout page background, applied to the order summary
1002
+ #
929
1003
  # @param border_style [Symbol, WhopSDK::Models::CheckoutShape, nil] The different border-radius styles available for checkout pages.
930
1004
  #
931
1005
  # @param button_color [String, nil] A hex color code for the button color (e.g. #FF5733).
@@ -956,10 +1030,10 @@ module WhopSDK
956
1030
  # in this configuration. The full list of default payment methods can be found in
957
1031
  # the documentation at docs.whop.com/payments.
958
1032
  #
959
- # @return [Boolean]
960
- required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
1033
+ # @return [Boolean, nil]
1034
+ optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true
961
1035
 
962
- # @!method initialize(disabled:, enabled:, include_platform_defaults:)
1036
+ # @!method initialize(disabled:, enabled:, include_platform_defaults: nil)
963
1037
  # Some parameter documentations has been truncated, see
964
1038
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModeSetup::PaymentMethodConfiguration}
965
1039
  # for more details.
@@ -971,7 +1045,7 @@ module WhopSDK
971
1045
  #
972
1046
  # @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
973
1047
  #
974
- # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
1048
+ # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included
975
1049
  end
976
1050
  end
977
1051
 
@@ -16,6 +16,13 @@ module WhopSDK
16
16
  # @return [String, nil]
17
17
  required :affiliate_code, String, nil?: true
18
18
 
19
+ # @!attribute allow_promo_codes
20
+ # Whether the checkout configuration allows promo codes. When false, the promo
21
+ # code input is hidden and promo codes are rejected.
22
+ #
23
+ # @return [Boolean]
24
+ required :allow_promo_codes, WhopSDK::Internal::Type::Boolean
25
+
19
26
  # @!attribute company_id
20
27
  # The ID of the company to use for the checkout configuration
21
28
  #
@@ -69,7 +76,7 @@ module WhopSDK
69
76
  # @return [String, nil]
70
77
  required :redirect_url, String, nil?: true
71
78
 
72
- # @!method initialize(id:, affiliate_code:, company_id:, currency:, metadata:, mode:, payment_method_configuration:, plan:, purchase_url:, redirect_url:)
79
+ # @!method initialize(id:, affiliate_code:, allow_promo_codes:, company_id:, currency:, metadata:, mode:, payment_method_configuration:, plan:, purchase_url:, redirect_url:)
73
80
  # Some parameter documentations has been truncated, see
74
81
  # {WhopSDK::Models::CheckoutConfigurationListResponse} for more details.
75
82
  #
@@ -81,6 +88,8 @@ module WhopSDK
81
88
  #
82
89
  # @param affiliate_code [String, nil] The affiliate code to use for the checkout configuration
83
90
  #
91
+ # @param allow_promo_codes [Boolean] Whether the checkout configuration allows promo codes. When false, the promo cod
92
+ #
84
93
  # @param company_id [String] The ID of the company to use for the checkout configuration
85
94
  #
86
95
  # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
@@ -147,6 +156,13 @@ module WhopSDK
147
156
  # @return [String]
148
157
  required :id, String
149
158
 
159
+ # @!attribute adaptive_pricing_enabled
160
+ # Whether the creator has turned on adaptive pricing for this plan. Raw setting —
161
+ # does not check processor compatibility or feature flags.
162
+ #
163
+ # @return [Boolean]
164
+ required :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean
165
+
150
166
  # @!attribute billing_period
151
167
  # The number of days between each recurring charge. Null for one-time plans. For
152
168
  # example, 30 for monthly or 365 for annual billing.
@@ -212,7 +228,7 @@ module WhopSDK
212
228
  # @return [Symbol, WhopSDK::Models::Visibility]
213
229
  required :visibility, enum: -> { WhopSDK::Visibility }
214
230
 
215
- # @!method initialize(id:, billing_period:, currency:, expiration_days:, initial_price:, plan_type:, release_method:, renewal_price:, trial_period_days:, visibility:)
231
+ # @!method initialize(id:, adaptive_pricing_enabled:, billing_period:, currency:, expiration_days:, initial_price:, plan_type:, release_method:, renewal_price:, trial_period_days:, visibility:)
216
232
  # Some parameter documentations has been truncated, see
217
233
  # {WhopSDK::Models::CheckoutConfigurationListResponse::Plan} for more details.
218
234
  #
@@ -220,6 +236,8 @@ module WhopSDK
220
236
  #
221
237
  # @param id [String] The unique identifier for the plan.
222
238
  #
239
+ # @param adaptive_pricing_enabled [Boolean] Whether the creator has turned on adaptive pricing for this plan. Raw setting —
240
+ #
223
241
  # @param billing_period [Integer, nil] The number of days between each recurring charge. Null for one-time plans. For e
224
242
  #
225
243
  # @param currency [Symbol, WhopSDK::Models::Currency] The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary
@@ -0,0 +1,109 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Companies#create_api_key
6
+ class CompanyCreateAPIKeyParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute parent_company_id
11
+ #
12
+ # @return [String]
13
+ required :parent_company_id, String
14
+
15
+ # @!attribute child_company_id
16
+ # The unique identifier of the connected account to create the API key for (e.g.
17
+ # 'biz_xxx').
18
+ #
19
+ # @return [String]
20
+ required :child_company_id, String
21
+
22
+ # @!attribute name
23
+ # A human-readable name for the API key, such as 'Production API Key'.
24
+ #
25
+ # @return [String, nil]
26
+ optional :name, String, nil?: true
27
+
28
+ # @!attribute permissions
29
+ # Granular permission statements defining which actions this API key can perform.
30
+ # Either permissions or role must be provided.
31
+ #
32
+ # @return [Array<WhopSDK::Models::CompanyCreateAPIKeyParams::Permission>, nil]
33
+ optional :permissions,
34
+ -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CompanyCreateAPIKeyParams::Permission] },
35
+ nil?: true
36
+
37
+ # @!attribute role
38
+ # The different system roles that can be assigned.
39
+ #
40
+ # @return [Symbol, WhopSDK::Models::CompanyCreateAPIKeyParams::Role, nil]
41
+ optional :role, enum: -> { WhopSDK::CompanyCreateAPIKeyParams::Role }, nil?: true
42
+
43
+ # @!method initialize(parent_company_id:, child_company_id:, name: nil, permissions: nil, role: nil, request_options: {})
44
+ # Some parameter documentations has been truncated, see
45
+ # {WhopSDK::Models::CompanyCreateAPIKeyParams} for more details.
46
+ #
47
+ # @param parent_company_id [String]
48
+ #
49
+ # @param child_company_id [String] The unique identifier of the connected account to create the API key for (e.g. '
50
+ #
51
+ # @param name [String, nil] A human-readable name for the API key, such as 'Production API Key'.
52
+ #
53
+ # @param permissions [Array<WhopSDK::Models::CompanyCreateAPIKeyParams::Permission>, nil] Granular permission statements defining which actions this API key can perform.
54
+ #
55
+ # @param role [Symbol, WhopSDK::Models::CompanyCreateAPIKeyParams::Role, nil] The different system roles that can be assigned.
56
+ #
57
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
58
+
59
+ class Permission < WhopSDK::Internal::Type::BaseModel
60
+ # @!attribute actions
61
+ # Actions covered by this statement
62
+ #
63
+ # @return [Array<String>]
64
+ required :actions, WhopSDK::Internal::Type::ArrayOf[String]
65
+
66
+ # @!attribute grant
67
+ # Whether the actions are granted or denied
68
+ #
69
+ # @return [Boolean]
70
+ required :grant, WhopSDK::Internal::Type::Boolean
71
+
72
+ # @!attribute resources
73
+ # Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*_|exp*xxx' or
74
+ # 'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or
75
+ # 'biz_xxx|pass*_'
76
+ #
77
+ # @return [Array<String>]
78
+ required :resources, WhopSDK::Internal::Type::ArrayOf[String]
79
+
80
+ # @!method initialize(actions:, grant:, resources:)
81
+ # Some parameter documentations has been truncated, see
82
+ # {WhopSDK::Models::CompanyCreateAPIKeyParams::Permission} for more details.
83
+ #
84
+ # Input for a single permissions statement
85
+ #
86
+ # @param actions [Array<String>] Actions covered by this statement
87
+ #
88
+ # @param grant [Boolean] Whether the actions are granted or denied
89
+ #
90
+ # @param resources [Array<String>] Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*\*|exp_xxx' or
91
+ # 'b
92
+ end
93
+
94
+ # The different system roles that can be assigned.
95
+ module Role
96
+ extend WhopSDK::Internal::Type::Enum
97
+
98
+ OWNER = :owner
99
+ ADMIN = :admin
100
+ MODERATOR = :moderator
101
+ SALES_MANAGER = :sales_manager
102
+ ADVERTISER = :advertiser
103
+
104
+ # @!method self.values
105
+ # @return [Array<Symbol>]
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Companies#create_api_key
6
+ class CompanyCreateAPIKeyResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The unique identifier for the authorized api key.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute name
14
+ # A user set name to identify an API key
15
+ #
16
+ # @return [String, nil]
17
+ required :name, String, nil?: true
18
+
19
+ # @!attribute secret_key
20
+ # The secret key used to authenticate requests. Only returned at creation time.
21
+ #
22
+ # @return [String]
23
+ required :secret_key, String
24
+
25
+ # @!method initialize(id:, name:, secret_key:)
26
+ # An API key created for a child company, including the one-time secret key.
27
+ #
28
+ # @param id [String] The unique identifier for the authorized api key.
29
+ #
30
+ # @param name [String, nil] A user set name to identify an API key
31
+ #
32
+ # @param secret_key [String] The secret key used to authenticate requests. Only returned at creation time.
33
+ end
34
+ end
35
+ end