whop_sdk 0.0.3 → 0.0.4

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 (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +4 -0
  5. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  6. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  7. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +115 -39
  8. data/lib/whop_sdk/models/company.rb +13 -1
  9. data/lib/whop_sdk/models/company_create_params.rb +46 -0
  10. data/lib/whop_sdk/models/company_list_params.rb +62 -0
  11. data/lib/whop_sdk/models/company_list_response.rb +175 -0
  12. data/lib/whop_sdk/models/course_create_params.rb +75 -30
  13. data/lib/whop_sdk/models/course_lesson_update_params.rb +204 -83
  14. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  15. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  16. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  17. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  18. data/lib/whop_sdk/models/course_update_params.rb +51 -27
  19. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  20. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  21. data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
  22. data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
  23. data/lib/whop_sdk/models/lesson.rb +16 -8
  24. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  25. data/lib/whop_sdk/models/message_update_params.rb +51 -27
  26. data/lib/whop_sdk/models/payment.rb +10 -1
  27. data/lib/whop_sdk/models/payment_list_response.rb +10 -1
  28. data/lib/whop_sdk/models/payment_method_types.rb +2 -1
  29. data/lib/whop_sdk/models/plan.rb +48 -1
  30. data/lib/whop_sdk/models/plan_create_params.rb +97 -22
  31. data/lib/whop_sdk/models/plan_list_response.rb +51 -1
  32. data/lib/whop_sdk/models/plan_update_params.rb +97 -22
  33. data/lib/whop_sdk/models/product_update_params.rb +53 -29
  34. data/lib/whop_sdk/models/transfer.rb +9 -1
  35. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  36. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  37. data/lib/whop_sdk/models.rb +8 -0
  38. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  39. data/lib/whop_sdk/resources/apps.rb +1 -1
  40. data/lib/whop_sdk/resources/checkout_configurations.rb +6 -6
  41. data/lib/whop_sdk/resources/companies.rb +70 -0
  42. data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
  43. data/lib/whop_sdk/resources/course_lessons.rb +7 -3
  44. data/lib/whop_sdk/resources/course_students.rb +76 -0
  45. data/lib/whop_sdk/resources/courses.rb +10 -3
  46. data/lib/whop_sdk/resources/experiences.rb +1 -1
  47. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  48. data/lib/whop_sdk/resources/invoices.rb +11 -11
  49. data/lib/whop_sdk/resources/messages.rb +2 -2
  50. data/lib/whop_sdk/resources/plans.rb +8 -4
  51. data/lib/whop_sdk/resources/products.rb +1 -1
  52. data/lib/whop_sdk/resources/transfers.rb +3 -1
  53. data/lib/whop_sdk/version.rb +1 -1
  54. data/lib/whop_sdk.rb +8 -1
  55. data/rbi/whop_sdk/client.rbi +3 -0
  56. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  57. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  58. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +192 -64
  59. data/rbi/whop_sdk/models/company.rbi +10 -0
  60. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  61. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  62. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  63. data/rbi/whop_sdk/models/course_create_params.rbi +104 -38
  64. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +326 -114
  65. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  66. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  67. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  68. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  69. data/rbi/whop_sdk/models/course_update_params.rbi +84 -38
  70. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  71. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  72. data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
  73. data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
  74. data/rbi/whop_sdk/models/lesson.rbi +14 -10
  75. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  76. data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
  77. data/rbi/whop_sdk/models/payment.rbi +10 -0
  78. data/rbi/whop_sdk/models/payment_list_response.rbi +10 -0
  79. data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
  80. data/rbi/whop_sdk/models/plan.rbi +82 -0
  81. data/rbi/whop_sdk/models/plan_create_params.rbi +174 -32
  82. data/rbi/whop_sdk/models/plan_list_response.rbi +94 -0
  83. data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
  84. data/rbi/whop_sdk/models/product_update_params.rbi +83 -39
  85. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  86. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  87. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  88. data/rbi/whop_sdk/models.rbi +8 -0
  89. data/rbi/whop_sdk/resources/app_builds.rbi +5 -1
  90. data/rbi/whop_sdk/resources/apps.rbi +7 -1
  91. data/rbi/whop_sdk/resources/checkout_configurations.rbi +6 -7
  92. data/rbi/whop_sdk/resources/companies.rbi +63 -0
  93. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
  94. data/rbi/whop_sdk/resources/course_lessons.rbi +21 -2
  95. data/rbi/whop_sdk/resources/course_students.rbi +65 -0
  96. data/rbi/whop_sdk/resources/courses.rbi +22 -2
  97. data/rbi/whop_sdk/resources/experiences.rbi +7 -1
  98. data/rbi/whop_sdk/resources/forum_posts.rbi +12 -2
  99. data/rbi/whop_sdk/resources/invoices.rbi +18 -18
  100. data/rbi/whop_sdk/resources/messages.rbi +12 -2
  101. data/rbi/whop_sdk/resources/plans.rbi +28 -2
  102. data/rbi/whop_sdk/resources/products.rbi +6 -1
  103. data/rbi/whop_sdk/resources/transfers.rbi +3 -0
  104. data/sig/whop_sdk/client.rbs +2 -0
  105. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  106. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  107. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
  108. data/sig/whop_sdk/models/company.rbs +5 -0
  109. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  110. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  111. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  112. data/sig/whop_sdk/models/course_create_params.rbs +39 -10
  113. data/sig/whop_sdk/models/course_lesson_update_params.rbs +116 -30
  114. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  115. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  116. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  117. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  118. data/sig/whop_sdk/models/course_update_params.rbs +29 -10
  119. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  120. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  121. data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
  122. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  123. data/sig/whop_sdk/models/lesson.rbs +8 -8
  124. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  125. data/sig/whop_sdk/models/message_update_params.rbs +29 -10
  126. data/sig/whop_sdk/models/payment.rbs +5 -0
  127. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  128. data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
  129. data/sig/whop_sdk/models/plan.rbs +32 -0
  130. data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
  131. data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
  132. data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
  133. data/sig/whop_sdk/models/product_update_params.rbs +29 -10
  134. data/sig/whop_sdk/models/transfer.rbs +5 -0
  135. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  136. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  137. data/sig/whop_sdk/models.rbs +8 -0
  138. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  139. data/sig/whop_sdk/resources/apps.rbs +1 -1
  140. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  141. data/sig/whop_sdk/resources/companies.rbs +18 -0
  142. data/sig/whop_sdk/resources/course_lessons.rbs +4 -2
  143. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  144. data/sig/whop_sdk/resources/courses.rbs +4 -2
  145. data/sig/whop_sdk/resources/experiences.rbs +1 -1
  146. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  147. data/sig/whop_sdk/resources/invoices.rbs +5 -5
  148. data/sig/whop_sdk/resources/messages.rbs +2 -2
  149. data/sig/whop_sdk/resources/plans.rbs +4 -2
  150. data/sig/whop_sdk/resources/products.rbs +1 -1
  151. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  152. metadata +26 -5
  153. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  154. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  155. data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
@@ -54,8 +54,8 @@ module WhopSDK
54
54
  # @!attribute image
55
55
  # An image for the plan. This will be visible on the product page to customers.
56
56
  #
57
- # @return [WhopSDK::Models::PlanCreateParams::Image, nil]
58
- optional :image, -> { WhopSDK::PlanCreateParams::Image }, nil?: true
57
+ # @return [WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID, nil]
58
+ optional :image, union: -> { WhopSDK::PlanCreateParams::Image }, nil?: true
59
59
 
60
60
  # @!attribute initial_price
61
61
  # An additional amount charged upon first purchase. Use only if a one time payment
@@ -78,6 +78,15 @@ module WhopSDK
78
78
  # @return [Symbol, WhopSDK::Models::TaxType, nil]
79
79
  optional :override_tax_type, enum: -> { WhopSDK::TaxType }, nil?: true
80
80
 
81
+ # @!attribute payment_method_configuration
82
+ # The explicit payment method configuration for the plan. If not provided, the
83
+ # platform or company's defaults will apply.
84
+ #
85
+ # @return [WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration, nil]
86
+ optional :payment_method_configuration,
87
+ -> { WhopSDK::PlanCreateParams::PaymentMethodConfiguration },
88
+ nil?: true
89
+
81
90
  # @!attribute plan_type
82
91
  # The type of plan that can be attached to an access pass
83
92
  #
@@ -141,7 +150,7 @@ module WhopSDK
141
150
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
142
151
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
143
152
 
144
- # @!method initialize(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
153
+ # @!method initialize(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
145
154
  # Some parameter documentations has been truncated, see
146
155
  # {WhopSDK::Models::PlanCreateParams} for more details.
147
156
  #
@@ -159,7 +168,7 @@ module WhopSDK
159
168
  #
160
169
  # @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans).
161
170
  #
162
- # @param image [WhopSDK::Models::PlanCreateParams::Image, nil] An image for the plan. This will be visible on the product page to customers.
171
+ # @param image [WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers.
163
172
  #
164
173
  # @param initial_price [Float, nil] An additional amount charged upon first purchase. Use only if a one time payment
165
174
  #
@@ -167,6 +176,8 @@ module WhopSDK
167
176
  #
168
177
  # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u
169
178
  #
179
+ # @param payment_method_configuration [WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration, nil] The explicit payment method configuration for the plan. If not provided, the pla
180
+ #
170
181
  # @param plan_type [Symbol, WhopSDK::Models::PlanType, nil] The type of plan that can be attached to an access pass
171
182
  #
172
183
  # @param release_method [Symbol, WhopSDK::Models::ReleaseMethod, nil] The methods of how a plan can be released.
@@ -240,32 +251,96 @@ module WhopSDK
240
251
  # @param field_type [Symbol, :text] The type of the custom field.
241
252
  end
242
253
 
243
- class Image < WhopSDK::Internal::Type::BaseModel
244
- # @!attribute id
245
- # The ID of an existing attachment object. Use this when updating a resource and
246
- # keeping a subset of the attachments. Don't use this unless you know what you're
247
- # doing.
254
+ # An image for the plan. This will be visible on the product page to customers.
255
+ module Image
256
+ extend WhopSDK::Internal::Type::Union
257
+
258
+ # Input for an attachment
259
+ variant -> { WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID }
260
+
261
+ # Input for an attachment
262
+ variant -> { WhopSDK::PlanCreateParams::Image::AttachmentInputWithID }
263
+
264
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
265
+ # @!attribute direct_upload_id
266
+ # This ID should be used the first time you upload an attachment. It is the ID of
267
+ # the direct upload that was created when uploading the file to S3 via the
268
+ # mediaDirectUpload mutation.
269
+ #
270
+ # @return [String]
271
+ required :direct_upload_id, String
272
+
273
+ # @!method initialize(direct_upload_id:)
274
+ # Some parameter documentations has been truncated, see
275
+ # {WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID}
276
+ # for more details.
277
+ #
278
+ # Input for an attachment
279
+ #
280
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
281
+ end
282
+
283
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
284
+ # @!attribute id
285
+ # The ID of an existing attachment object. Use this when updating a resource and
286
+ # keeping a subset of the attachments. Don't use this unless you know what you're
287
+ # doing.
288
+ #
289
+ # @return [String]
290
+ required :id, String
291
+
292
+ # @!method initialize(id:)
293
+ # Some parameter documentations has been truncated, see
294
+ # {WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID} for more
295
+ # details.
296
+ #
297
+ # Input for an attachment
298
+ #
299
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
300
+ end
301
+
302
+ # @!method self.variants
303
+ # @return [Array(WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID)]
304
+ end
305
+
306
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
307
+ # @!attribute disabled
308
+ # An array of payment method identifiers that are explicitly disabled. Only
309
+ # applies if the include_platform_defaults is true.
248
310
  #
249
- # @return [String, nil]
250
- optional :id, String, nil?: true
311
+ # @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
312
+ required :disabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
313
+
314
+ # @!attribute enabled
315
+ # An array of payment method identifiers that are explicitly enabled. This means
316
+ # these payment methods will be shown on checkout. Example use case is to only
317
+ # enable a specific payment method like cashapp, or extending the platform
318
+ # defaults with additional methods.
319
+ #
320
+ # @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
321
+ required :enabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
251
322
 
252
- # @!attribute direct_upload_id
253
- # This ID should be used the first time you upload an attachment. It is the ID of
254
- # the direct upload that was created when uploading the file to S3 via the
255
- # mediaDirectUpload mutation.
323
+ # @!attribute include_platform_defaults
324
+ # Whether Whop's platform default payment method enablement settings are included
325
+ # in this configuration. The full list of default payment methods can be found in
326
+ # the documentation at docs.whop.com/payments.
256
327
  #
257
- # @return [String, nil]
258
- optional :direct_upload_id, String, nil?: true
328
+ # @return [Boolean]
329
+ required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
259
330
 
260
- # @!method initialize(id: nil, direct_upload_id: nil)
331
+ # @!method initialize(disabled:, enabled:, include_platform_defaults:)
261
332
  # Some parameter documentations has been truncated, see
262
- # {WhopSDK::Models::PlanCreateParams::Image} for more details.
333
+ # {WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration} for more
334
+ # details.
335
+ #
336
+ # The explicit payment method configuration for the plan. If not provided, the
337
+ # platform or company's defaults will apply.
263
338
  #
264
- # An image for the plan. This will be visible on the product page to customers.
339
+ # @param disabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly disabled. Only applie
265
340
  #
266
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
341
+ # @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
267
342
  #
268
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
343
+ # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
269
344
  end
270
345
  end
271
346
  end
@@ -70,6 +70,14 @@ module WhopSDK
70
70
  # @return [Integer, nil]
71
71
  required :member_count, Integer, nil?: true
72
72
 
73
+ # @!attribute payment_method_configuration
74
+ # The explicit payment method configuration for the plan, if any.
75
+ #
76
+ # @return [WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration, nil]
77
+ required :payment_method_configuration,
78
+ -> { WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration },
79
+ nil?: true
80
+
73
81
  # @!attribute plan_type
74
82
  # Indicates if the plan is a one time payment or recurring.
75
83
  #
@@ -136,7 +144,7 @@ module WhopSDK
136
144
  # @return [Symbol, WhopSDK::Models::Visibility]
137
145
  required :visibility, enum: -> { WhopSDK::Visibility }
138
146
 
139
- # @!method initialize(id:, billing_period:, company:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, stock:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
147
+ # @!method initialize(id:, billing_period:, company:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, stock:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
140
148
  # An object representing a (sanitized) plan of an access pass.
141
149
  #
142
150
  # @param id [String] The internal ID of the plan.
@@ -161,6 +169,8 @@ module WhopSDK
161
169
  #
162
170
  # @param member_count [Integer, nil] The number of members for the plan.
163
171
  #
172
+ # @param payment_method_configuration [WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration, nil] The explicit payment method configuration for the plan, if any.
173
+ #
164
174
  # @param plan_type [Symbol, WhopSDK::Models::PlanType] Indicates if the plan is a one time payment or recurring.
165
175
  #
166
176
  # @param product [WhopSDK::Models::PlanListResponse::Product, nil] The access pass for the plan.
@@ -219,6 +229,46 @@ module WhopSDK
219
229
  # @param id [String] The ID of the invoice.
220
230
  end
221
231
 
232
+ # @see WhopSDK::Models::PlanListResponse#payment_method_configuration
233
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
234
+ # @!attribute disabled
235
+ # An array of payment method identifiers that are explicitly disabled. Only
236
+ # applies if the include_platform_defaults is true.
237
+ #
238
+ # @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
239
+ required :disabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
240
+
241
+ # @!attribute enabled
242
+ # An array of payment method identifiers that are explicitly enabled. This means
243
+ # these payment methods will be shown on checkout. Example use case is to only
244
+ # enable a specific payment method like cashapp, or extending the platform
245
+ # defaults with additional methods.
246
+ #
247
+ # @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
248
+ required :enabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
249
+
250
+ # @!attribute include_platform_defaults
251
+ # Whether Whop's platform default payment method enablement settings are included
252
+ # in this configuration. The full list of default payment methods can be found in
253
+ # the documentation at docs.whop.com/payments.
254
+ #
255
+ # @return [Boolean]
256
+ required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
257
+
258
+ # @!method initialize(disabled:, enabled:, include_platform_defaults:)
259
+ # Some parameter documentations has been truncated, see
260
+ # {WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration} for more
261
+ # details.
262
+ #
263
+ # The explicit payment method configuration for the plan, if any.
264
+ #
265
+ # @param disabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly disabled. Only applie
266
+ #
267
+ # @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
268
+ #
269
+ # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
270
+ end
271
+
222
272
  # @see WhopSDK::Models::PlanListResponse#product
223
273
  class Product < WhopSDK::Internal::Type::BaseModel
224
274
  # @!attribute id
@@ -42,8 +42,8 @@ module WhopSDK
42
42
  # @!attribute image
43
43
  # An image for the plan. This will be visible on the product page to customers.
44
44
  #
45
- # @return [WhopSDK::Models::PlanUpdateParams::Image, nil]
46
- optional :image, -> { WhopSDK::PlanUpdateParams::Image }, nil?: true
45
+ # @return [WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID, nil]
46
+ optional :image, union: -> { WhopSDK::PlanUpdateParams::Image }, nil?: true
47
47
 
48
48
  # @!attribute initial_price
49
49
  # An additional amount charged upon first purchase.
@@ -70,6 +70,15 @@ module WhopSDK
70
70
  # @return [Symbol, WhopSDK::Models::TaxType, nil]
71
71
  optional :override_tax_type, enum: -> { WhopSDK::TaxType }, nil?: true
72
72
 
73
+ # @!attribute payment_method_configuration
74
+ # The explicit payment method configuration for the plan. If sent as null, the
75
+ # custom configuration will be removed.
76
+ #
77
+ # @return [WhopSDK::Models::PlanUpdateParams::PaymentMethodConfiguration, nil]
78
+ optional :payment_method_configuration,
79
+ -> { WhopSDK::PlanUpdateParams::PaymentMethodConfiguration },
80
+ nil?: true
81
+
73
82
  # @!attribute renewal_price
74
83
  # The amount the customer is charged every billing period.
75
84
  #
@@ -120,7 +129,7 @@ module WhopSDK
120
129
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
121
130
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
122
131
 
123
- # @!method initialize(billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, offer_cancel_discount: nil, override_tax_type: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
132
+ # @!method initialize(billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, offer_cancel_discount: nil, override_tax_type: nil, payment_method_configuration: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
124
133
  # Some parameter documentations has been truncated, see
125
134
  # {WhopSDK::Models::PlanUpdateParams} for more details.
126
135
  #
@@ -134,7 +143,7 @@ module WhopSDK
134
143
  #
135
144
  # @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans).
136
145
  #
137
- # @param image [WhopSDK::Models::PlanUpdateParams::Image, nil] An image for the plan. This will be visible on the product page to customers.
146
+ # @param image [WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers.
138
147
  #
139
148
  # @param initial_price [Float, nil] An additional amount charged upon first purchase.
140
149
  #
@@ -144,6 +153,8 @@ module WhopSDK
144
153
  #
145
154
  # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u
146
155
  #
156
+ # @param payment_method_configuration [WhopSDK::Models::PlanUpdateParams::PaymentMethodConfiguration, nil] The explicit payment method configuration for the plan. If sent as null, the cus
157
+ #
147
158
  # @param renewal_price [Float, nil] The amount the customer is charged every billing period.
148
159
  #
149
160
  # @param stock [Integer, nil] The number of units available for purchase.
@@ -213,32 +224,96 @@ module WhopSDK
213
224
  # @param field_type [Symbol, :text] The type of the custom field.
214
225
  end
215
226
 
216
- class Image < WhopSDK::Internal::Type::BaseModel
217
- # @!attribute id
218
- # The ID of an existing attachment object. Use this when updating a resource and
219
- # keeping a subset of the attachments. Don't use this unless you know what you're
220
- # doing.
227
+ # An image for the plan. This will be visible on the product page to customers.
228
+ module Image
229
+ extend WhopSDK::Internal::Type::Union
230
+
231
+ # Input for an attachment
232
+ variant -> { WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID }
233
+
234
+ # Input for an attachment
235
+ variant -> { WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID }
236
+
237
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
238
+ # @!attribute direct_upload_id
239
+ # This ID should be used the first time you upload an attachment. It is the ID of
240
+ # the direct upload that was created when uploading the file to S3 via the
241
+ # mediaDirectUpload mutation.
242
+ #
243
+ # @return [String]
244
+ required :direct_upload_id, String
245
+
246
+ # @!method initialize(direct_upload_id:)
247
+ # Some parameter documentations has been truncated, see
248
+ # {WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID}
249
+ # for more details.
250
+ #
251
+ # Input for an attachment
252
+ #
253
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
254
+ end
255
+
256
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
257
+ # @!attribute id
258
+ # The ID of an existing attachment object. Use this when updating a resource and
259
+ # keeping a subset of the attachments. Don't use this unless you know what you're
260
+ # doing.
261
+ #
262
+ # @return [String]
263
+ required :id, String
264
+
265
+ # @!method initialize(id:)
266
+ # Some parameter documentations has been truncated, see
267
+ # {WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID} for more
268
+ # details.
269
+ #
270
+ # Input for an attachment
271
+ #
272
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
273
+ end
274
+
275
+ # @!method self.variants
276
+ # @return [Array(WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID)]
277
+ end
278
+
279
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
280
+ # @!attribute disabled
281
+ # An array of payment method identifiers that are explicitly disabled. Only
282
+ # applies if the include_platform_defaults is true.
221
283
  #
222
- # @return [String, nil]
223
- optional :id, String, nil?: true
284
+ # @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
285
+ required :disabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
224
286
 
225
- # @!attribute direct_upload_id
226
- # This ID should be used the first time you upload an attachment. It is the ID of
227
- # the direct upload that was created when uploading the file to S3 via the
228
- # mediaDirectUpload mutation.
287
+ # @!attribute enabled
288
+ # An array of payment method identifiers that are explicitly enabled. This means
289
+ # these payment methods will be shown on checkout. Example use case is to only
290
+ # enable a specific payment method like cashapp, or extending the platform
291
+ # defaults with additional methods.
229
292
  #
230
- # @return [String, nil]
231
- optional :direct_upload_id, String, nil?: true
293
+ # @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
294
+ required :enabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
232
295
 
233
- # @!method initialize(id: nil, direct_upload_id: nil)
296
+ # @!attribute include_platform_defaults
297
+ # Whether Whop's platform default payment method enablement settings are included
298
+ # in this configuration. The full list of default payment methods can be found in
299
+ # the documentation at docs.whop.com/payments.
300
+ #
301
+ # @return [Boolean]
302
+ required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
303
+
304
+ # @!method initialize(disabled:, enabled:, include_platform_defaults:)
234
305
  # Some parameter documentations has been truncated, see
235
- # {WhopSDK::Models::PlanUpdateParams::Image} for more details.
306
+ # {WhopSDK::Models::PlanUpdateParams::PaymentMethodConfiguration} for more
307
+ # details.
308
+ #
309
+ # The explicit payment method configuration for the plan. If sent as null, the
310
+ # custom configuration will be removed.
236
311
  #
237
- # An image for the plan. This will be visible on the product page to customers.
312
+ # @param disabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly disabled. Only applie
238
313
  #
239
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
314
+ # @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
240
315
  #
241
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
316
+ # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
242
317
  end
243
318
  end
244
319
  end
@@ -10,8 +10,8 @@ module WhopSDK
10
10
  # @!attribute banner_image
11
11
  # A banner image for the product in png, jpeg format
12
12
  #
13
- # @return [WhopSDK::Models::ProductUpdateParams::BannerImage, nil]
14
- optional :banner_image, -> { WhopSDK::ProductUpdateParams::BannerImage }, nil?: true
13
+ # @return [WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID, nil]
14
+ optional :banner_image, union: -> { WhopSDK::ProductUpdateParams::BannerImage }, nil?: true
15
15
 
16
16
  # @!attribute business_type
17
17
  # The different business types a company can be.
@@ -127,7 +127,7 @@ module WhopSDK
127
127
  # Some parameter documentations has been truncated, see
128
128
  # {WhopSDK::Models::ProductUpdateParams} for more details.
129
129
  #
130
- # @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage, nil] A banner image for the product in png, jpeg format
130
+ # @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID, nil] A banner image for the product in png, jpeg format
131
131
  #
132
132
  # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
133
133
  #
@@ -168,32 +168,56 @@ module WhopSDK
168
168
  #
169
169
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
170
170
 
171
- class BannerImage < WhopSDK::Internal::Type::BaseModel
172
- # @!attribute id
173
- # The ID of an existing attachment object. Use this when updating a resource and
174
- # keeping a subset of the attachments. Don't use this unless you know what you're
175
- # doing.
176
- #
177
- # @return [String, nil]
178
- optional :id, String, nil?: true
179
-
180
- # @!attribute direct_upload_id
181
- # This ID should be used the first time you upload an attachment. It is the ID of
182
- # the direct upload that was created when uploading the file to S3 via the
183
- # mediaDirectUpload mutation.
184
- #
185
- # @return [String, nil]
186
- optional :direct_upload_id, String, nil?: true
187
-
188
- # @!method initialize(id: nil, direct_upload_id: nil)
189
- # Some parameter documentations has been truncated, see
190
- # {WhopSDK::Models::ProductUpdateParams::BannerImage} for more details.
191
- #
192
- # A banner image for the product in png, jpeg format
193
- #
194
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
195
- #
196
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
171
+ # A banner image for the product in png, jpeg format
172
+ module BannerImage
173
+ extend WhopSDK::Internal::Type::Union
174
+
175
+ # Input for an attachment
176
+ variant -> { WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID }
177
+
178
+ # Input for an attachment
179
+ variant -> { WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithID }
180
+
181
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
182
+ # @!attribute direct_upload_id
183
+ # This ID should be used the first time you upload an attachment. It is the ID of
184
+ # the direct upload that was created when uploading the file to S3 via the
185
+ # mediaDirectUpload mutation.
186
+ #
187
+ # @return [String]
188
+ required :direct_upload_id, String
189
+
190
+ # @!method initialize(direct_upload_id:)
191
+ # Some parameter documentations has been truncated, see
192
+ # {WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID}
193
+ # for more details.
194
+ #
195
+ # Input for an attachment
196
+ #
197
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
198
+ end
199
+
200
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
201
+ # @!attribute id
202
+ # The ID of an existing attachment object. Use this when updating a resource and
203
+ # keeping a subset of the attachments. Don't use this unless you know what you're
204
+ # doing.
205
+ #
206
+ # @return [String]
207
+ required :id, String
208
+
209
+ # @!method initialize(id:)
210
+ # Some parameter documentations has been truncated, see
211
+ # {WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID} for
212
+ # more details.
213
+ #
214
+ # Input for an attachment
215
+ #
216
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
217
+ end
218
+
219
+ # @!method self.variants
220
+ # @return [Array(WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID)]
197
221
  end
198
222
 
199
223
  class StorePageConfig < WhopSDK::Internal::Type::BaseModel
@@ -45,6 +45,12 @@ module WhopSDK
45
45
  # @return [Float, nil]
46
46
  required :fee_amount, Float, nil?: true
47
47
 
48
+ # @!attribute metadata
49
+ # A hash of metadata attached to the transfer
50
+ #
51
+ # @return [Hash{Symbol=>Object}, nil]
52
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
53
+
48
54
  # @!attribute notes
49
55
  # The notes of the credit transaction transfer
50
56
  #
@@ -63,7 +69,7 @@ module WhopSDK
63
69
  # @return [String]
64
70
  required :origin_ledger_account_id, String
65
71
 
66
- # @!method initialize(id:, amount:, created_at:, currency:, destination:, destination_ledger_account_id:, fee_amount:, notes:, origin:, origin_ledger_account_id:)
72
+ # @!method initialize(id:, amount:, created_at:, currency:, destination:, destination_ledger_account_id:, fee_amount:, metadata:, notes:, origin:, origin_ledger_account_id:)
67
73
  # Credit Transaction Transfer
68
74
  #
69
75
  # @param id [String] The unique identifier of the credit transaction transfer
@@ -80,6 +86,8 @@ module WhopSDK
80
86
  #
81
87
  # @param fee_amount [Float, nil] The decimal fee of the credit transaction transfer
82
88
  #
89
+ # @param metadata [Hash{Symbol=>Object}, nil] A hash of metadata attached to the transfer
90
+ #
83
91
  # @param notes [String, nil] The notes of the credit transaction transfer
84
92
  #
85
93
  # @param origin [WhopSDK::Models::Transfer::Origin::User, WhopSDK::Models::Transfer::Origin::Company, nil] The sender of the credit transaction transfer
@@ -39,13 +39,19 @@ module WhopSDK
39
39
  # @return [String, nil]
40
40
  optional :idempotence_key, String, nil?: true
41
41
 
42
+ # @!attribute metadata
43
+ # A hash of metadata to attach to the transfer.
44
+ #
45
+ # @return [Hash{Symbol=>Object}, nil]
46
+ optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
47
+
42
48
  # @!attribute notes
43
49
  # Notes for the transfer. Maximum of 50 characters.
44
50
  #
45
51
  # @return [String, nil]
46
52
  optional :notes, String, nil?: true
47
53
 
48
- # @!method initialize(amount:, currency:, destination_id:, origin_id:, idempotence_key: nil, notes: nil, request_options: {})
54
+ # @!method initialize(amount:, currency:, destination_id:, origin_id:, idempotence_key: nil, metadata: nil, notes: nil, request_options: {})
49
55
  # Some parameter documentations has been truncated, see
50
56
  # {WhopSDK::Models::TransferCreateParams} for more details.
51
57
  #
@@ -59,6 +65,8 @@ module WhopSDK
59
65
  #
60
66
  # @param idempotence_key [String, nil] A unique key to ensure idempotence. Use a UUID or similar.
61
67
  #
68
+ # @param metadata [Hash{Symbol=>Object}, nil] A hash of metadata to attach to the transfer.
69
+ #
62
70
  # @param notes [String, nil] Notes for the transfer. Maximum of 50 characters.
63
71
  #
64
72
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
@@ -40,6 +40,12 @@ module WhopSDK
40
40
  # @return [Float, nil]
41
41
  required :fee_amount, Float, nil?: true
42
42
 
43
+ # @!attribute metadata
44
+ # A hash of metadata attached to the transfer
45
+ #
46
+ # @return [Hash{Symbol=>Object}, nil]
47
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
48
+
43
49
  # @!attribute notes
44
50
  # The notes of the credit transaction transfer
45
51
  #
@@ -52,7 +58,7 @@ module WhopSDK
52
58
  # @return [String]
53
59
  required :origin_ledger_account_id, String
54
60
 
55
- # @!method initialize(id:, amount:, created_at:, currency:, destination_ledger_account_id:, fee_amount:, notes:, origin_ledger_account_id:)
61
+ # @!method initialize(id:, amount:, created_at:, currency:, destination_ledger_account_id:, fee_amount:, metadata:, notes:, origin_ledger_account_id:)
56
62
  # Credit Transaction Transfer
57
63
  #
58
64
  # @param id [String] The unique identifier of the credit transaction transfer
@@ -67,6 +73,8 @@ module WhopSDK
67
73
  #
68
74
  # @param fee_amount [Float, nil] The decimal fee of the credit transaction transfer
69
75
  #
76
+ # @param metadata [Hash{Symbol=>Object}, nil] A hash of metadata attached to the transfer
77
+ #
70
78
  # @param notes [String, nil] The notes of the credit transaction transfer
71
79
  #
72
80
  # @param origin_ledger_account_id [String] The ID of the origin ledger account
@@ -105,6 +105,10 @@ module WhopSDK
105
105
 
106
106
  Company = WhopSDK::Models::Company
107
107
 
108
+ CompanyCreateParams = WhopSDK::Models::CompanyCreateParams
109
+
110
+ CompanyListParams = WhopSDK::Models::CompanyListParams
111
+
108
112
  CompanyRetrieveParams = WhopSDK::Models::CompanyRetrieveParams
109
113
 
110
114
  Course = WhopSDK::Models::Course
@@ -150,6 +154,10 @@ module WhopSDK
150
154
 
151
155
  CourseRetrieveParams = WhopSDK::Models::CourseRetrieveParams
152
156
 
157
+ CourseStudentListParams = WhopSDK::Models::CourseStudentListParams
158
+
159
+ CourseStudentRetrieveParams = WhopSDK::Models::CourseStudentRetrieveParams
160
+
153
161
  CourseUpdateParams = WhopSDK::Models::CourseUpdateParams
154
162
 
155
163
  Currency = WhopSDK::Models::Currency
@@ -14,7 +14,7 @@ module WhopSDK
14
14
  #
15
15
  # @overload create(attachment:, checksum:, platform:, app_id: nil, supported_app_view_types: nil, request_options: {})
16
16
  #
17
- # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment] Attachment input for the app build file. This should be an upload in .zip format
17
+ # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID] Attachment input for the app build file. This should be an upload in .zip format
18
18
  #
19
19
  # @param checksum [String] Checksum of the app build file. This is generated by the client and used to veri
20
20
  #