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
@@ -100,10 +100,12 @@ module WhopSDK
100
100
  T.let(:id_bank_transfer, WhopSDK::PaymentMethodTypes::TaggedSymbol)
101
101
  DEMO_PAY = T.let(:demo_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
102
102
  SHOP_PAY = T.let(:shop_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
103
- APPLE = T.let(:apple, WhopSDK::PaymentMethodTypes::TaggedSymbol)
104
103
  SEZZLE = T.let(:sezzle, WhopSDK::PaymentMethodTypes::TaggedSymbol)
105
104
  COINBASE = T.let(:coinbase, WhopSDK::PaymentMethodTypes::TaggedSymbol)
106
105
  SPLITIT = T.let(:splitit, WhopSDK::PaymentMethodTypes::TaggedSymbol)
106
+ PLATFORM_BALANCE =
107
+ T.let(:platform_balance, WhopSDK::PaymentMethodTypes::TaggedSymbol)
108
+ APPLE = T.let(:apple, WhopSDK::PaymentMethodTypes::TaggedSymbol)
107
109
  UNKNOWN = T.let(:unknown, WhopSDK::PaymentMethodTypes::TaggedSymbol)
108
110
 
109
111
  sig do
@@ -63,6 +63,18 @@ module WhopSDK
63
63
  sig { returns(T.nilable(Integer)) }
64
64
  attr_accessor :member_count
65
65
 
66
+ # The explicit payment method configuration for the plan, if any.
67
+ sig { returns(T.nilable(WhopSDK::Plan::PaymentMethodConfiguration)) }
68
+ attr_reader :payment_method_configuration
69
+
70
+ sig do
71
+ params(
72
+ payment_method_configuration:
73
+ T.nilable(WhopSDK::Plan::PaymentMethodConfiguration::OrHash)
74
+ ).void
75
+ end
76
+ attr_writer :payment_method_configuration
77
+
66
78
  # Indicates if the plan is a one time payment or recurring.
67
79
  sig { returns(WhopSDK::PlanType::TaggedSymbol) }
68
80
  attr_accessor :plan_type
@@ -130,6 +142,8 @@ module WhopSDK
130
142
  internal_notes: T.nilable(String),
131
143
  invoice: T.nilable(WhopSDK::Plan::Invoice::OrHash),
132
144
  member_count: T.nilable(Integer),
145
+ payment_method_configuration:
146
+ T.nilable(WhopSDK::Plan::PaymentMethodConfiguration::OrHash),
133
147
  plan_type: WhopSDK::PlanType::OrSymbol,
134
148
  product: T.nilable(WhopSDK::Plan::Product::OrHash),
135
149
  purchase_url: String,
@@ -171,6 +185,8 @@ module WhopSDK
171
185
  invoice:,
172
186
  # The number of members for the plan.
173
187
  member_count:,
188
+ # The explicit payment method configuration for the plan, if any.
189
+ payment_method_configuration:,
174
190
  # Indicates if the plan is a one time payment or recurring.
175
191
  plan_type:,
176
192
  # The access pass for the plan.
@@ -214,6 +230,8 @@ module WhopSDK
214
230
  internal_notes: T.nilable(String),
215
231
  invoice: T.nilable(WhopSDK::Plan::Invoice),
216
232
  member_count: T.nilable(Integer),
233
+ payment_method_configuration:
234
+ T.nilable(WhopSDK::Plan::PaymentMethodConfiguration),
217
235
  plan_type: WhopSDK::PlanType::TaggedSymbol,
218
236
  product: T.nilable(WhopSDK::Plan::Product),
219
237
  purchase_url: String,
@@ -357,6 +375,70 @@ module WhopSDK
357
375
  end
358
376
  end
359
377
 
378
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
379
+ OrHash =
380
+ T.type_alias do
381
+ T.any(
382
+ WhopSDK::Plan::PaymentMethodConfiguration,
383
+ WhopSDK::Internal::AnyHash
384
+ )
385
+ end
386
+
387
+ # An array of payment method identifiers that are explicitly disabled. Only
388
+ # applies if the include_platform_defaults is true.
389
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
390
+ attr_accessor :disabled
391
+
392
+ # An array of payment method identifiers that are explicitly enabled. This means
393
+ # these payment methods will be shown on checkout. Example use case is to only
394
+ # enable a specific payment method like cashapp, or extending the platform
395
+ # defaults with additional methods.
396
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
397
+ attr_accessor :enabled
398
+
399
+ # Whether Whop's platform default payment method enablement settings are included
400
+ # in this configuration. The full list of default payment methods can be found in
401
+ # the documentation at docs.whop.com/payments.
402
+ sig { returns(T::Boolean) }
403
+ attr_accessor :include_platform_defaults
404
+
405
+ # The explicit payment method configuration for the plan, if any.
406
+ sig do
407
+ params(
408
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
409
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
410
+ include_platform_defaults: T::Boolean
411
+ ).returns(T.attached_class)
412
+ end
413
+ def self.new(
414
+ # An array of payment method identifiers that are explicitly disabled. Only
415
+ # applies if the include_platform_defaults is true.
416
+ disabled:,
417
+ # An array of payment method identifiers that are explicitly enabled. This means
418
+ # these payment methods will be shown on checkout. Example use case is to only
419
+ # enable a specific payment method like cashapp, or extending the platform
420
+ # defaults with additional methods.
421
+ enabled:,
422
+ # Whether Whop's platform default payment method enablement settings are included
423
+ # in this configuration. The full list of default payment methods can be found in
424
+ # the documentation at docs.whop.com/payments.
425
+ include_platform_defaults:
426
+ )
427
+ end
428
+
429
+ sig do
430
+ override.returns(
431
+ {
432
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
433
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
434
+ include_platform_defaults: T::Boolean
435
+ }
436
+ )
437
+ end
438
+ def to_hash
439
+ end
440
+ end
441
+
360
442
  class Product < WhopSDK::Internal::Type::BaseModel
361
443
  OrHash =
362
444
  T.type_alias do
@@ -42,13 +42,17 @@ module WhopSDK
42
42
  attr_accessor :expiration_days
43
43
 
44
44
  # An image for the plan. This will be visible on the product page to customers.
45
- sig { returns(T.nilable(WhopSDK::PlanCreateParams::Image)) }
46
- attr_reader :image
47
-
48
45
  sig do
49
- params(image: T.nilable(WhopSDK::PlanCreateParams::Image::OrHash)).void
46
+ returns(
47
+ T.nilable(
48
+ T.any(
49
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
50
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
51
+ )
52
+ )
53
+ )
50
54
  end
51
- attr_writer :image
55
+ attr_accessor :image
52
56
 
53
57
  # An additional amount charged upon first purchase. Use only if a one time payment
54
58
  # OR you want to charge an additional amount on top of the renewal price. Provided
@@ -65,6 +69,25 @@ module WhopSDK
65
69
  sig { returns(T.nilable(WhopSDK::TaxType::OrSymbol)) }
66
70
  attr_accessor :override_tax_type
67
71
 
72
+ # The explicit payment method configuration for the plan. If not provided, the
73
+ # platform or company's defaults will apply.
74
+ sig do
75
+ returns(
76
+ T.nilable(WhopSDK::PlanCreateParams::PaymentMethodConfiguration)
77
+ )
78
+ end
79
+ attr_reader :payment_method_configuration
80
+
81
+ sig do
82
+ params(
83
+ payment_method_configuration:
84
+ T.nilable(
85
+ WhopSDK::PlanCreateParams::PaymentMethodConfiguration::OrHash
86
+ )
87
+ ).void
88
+ end
89
+ attr_writer :payment_method_configuration
90
+
68
91
  # The type of plan that can be attached to an access pass
69
92
  sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
70
93
  attr_accessor :plan_type
@@ -118,10 +141,20 @@ module WhopSDK
118
141
  T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField::OrHash]),
119
142
  description: T.nilable(String),
120
143
  expiration_days: T.nilable(Integer),
121
- image: T.nilable(WhopSDK::PlanCreateParams::Image::OrHash),
144
+ image:
145
+ T.nilable(
146
+ T.any(
147
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID::OrHash,
148
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithID::OrHash
149
+ )
150
+ ),
122
151
  initial_price: T.nilable(Float),
123
152
  internal_notes: T.nilable(String),
124
153
  override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
154
+ payment_method_configuration:
155
+ T.nilable(
156
+ WhopSDK::PlanCreateParams::PaymentMethodConfiguration::OrHash
157
+ ),
125
158
  plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
126
159
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
127
160
  renewal_price: T.nilable(Float),
@@ -161,6 +194,9 @@ module WhopSDK
161
194
  # Whether or not the tax is included in a plan's price (or if it hasn't been set
162
195
  # up)
163
196
  override_tax_type: nil,
197
+ # The explicit payment method configuration for the plan. If not provided, the
198
+ # platform or company's defaults will apply.
199
+ payment_method_configuration: nil,
164
200
  # The type of plan that can be attached to an access pass
165
201
  plan_type: nil,
166
202
  # The methods of how a plan can be released.
@@ -199,10 +235,18 @@ module WhopSDK
199
235
  T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField]),
200
236
  description: T.nilable(String),
201
237
  expiration_days: T.nilable(Integer),
202
- image: T.nilable(WhopSDK::PlanCreateParams::Image),
238
+ image:
239
+ T.nilable(
240
+ T.any(
241
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
242
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
243
+ )
244
+ ),
203
245
  initial_price: T.nilable(Float),
204
246
  internal_notes: T.nilable(String),
205
247
  override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
248
+ payment_method_configuration:
249
+ T.nilable(WhopSDK::PlanCreateParams::PaymentMethodConfiguration),
206
250
  plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
207
251
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
208
252
  renewal_price: T.nilable(Float),
@@ -295,46 +339,144 @@ module WhopSDK
295
339
  end
296
340
  end
297
341
 
298
- class Image < WhopSDK::Internal::Type::BaseModel
299
- OrHash =
342
+ # An image for the plan. This will be visible on the product page to customers.
343
+ module Image
344
+ extend WhopSDK::Internal::Type::Union
345
+
346
+ Variants =
300
347
  T.type_alias do
301
- T.any(WhopSDK::PlanCreateParams::Image, WhopSDK::Internal::AnyHash)
348
+ T.any(
349
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
350
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
351
+ )
302
352
  end
303
353
 
304
- # The ID of an existing attachment object. Use this when updating a resource and
305
- # keeping a subset of the attachments. Don't use this unless you know what you're
306
- # doing.
307
- sig { returns(T.nilable(String)) }
308
- attr_accessor :id
354
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
355
+ OrHash =
356
+ T.type_alias do
357
+ T.any(
358
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
359
+ WhopSDK::Internal::AnyHash
360
+ )
361
+ end
309
362
 
310
- # This ID should be used the first time you upload an attachment. It is the ID of
311
- # the direct upload that was created when uploading the file to S3 via the
312
- # mediaDirectUpload mutation.
313
- sig { returns(T.nilable(String)) }
314
- attr_accessor :direct_upload_id
363
+ # This ID should be used the first time you upload an attachment. It is the ID of
364
+ # the direct upload that was created when uploading the file to S3 via the
365
+ # mediaDirectUpload mutation.
366
+ sig { returns(String) }
367
+ attr_accessor :direct_upload_id
368
+
369
+ # Input for an attachment
370
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
371
+ def self.new(
372
+ # This ID should be used the first time you upload an attachment. It is the ID of
373
+ # the direct upload that was created when uploading the file to S3 via the
374
+ # mediaDirectUpload mutation.
375
+ direct_upload_id:
376
+ )
377
+ end
378
+
379
+ sig { override.returns({ direct_upload_id: String }) }
380
+ def to_hash
381
+ end
382
+ end
383
+
384
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
385
+ OrHash =
386
+ T.type_alias do
387
+ T.any(
388
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithID,
389
+ WhopSDK::Internal::AnyHash
390
+ )
391
+ end
392
+
393
+ # The ID of an existing attachment object. Use this when updating a resource and
394
+ # keeping a subset of the attachments. Don't use this unless you know what you're
395
+ # doing.
396
+ sig { returns(String) }
397
+ attr_accessor :id
398
+
399
+ # Input for an attachment
400
+ sig { params(id: String).returns(T.attached_class) }
401
+ def self.new(
402
+ # The ID of an existing attachment object. Use this when updating a resource and
403
+ # keeping a subset of the attachments. Don't use this unless you know what you're
404
+ # doing.
405
+ id:
406
+ )
407
+ end
408
+
409
+ sig { override.returns({ id: String }) }
410
+ def to_hash
411
+ end
412
+ end
315
413
 
316
- # An image for the plan. This will be visible on the product page to customers.
414
+ sig do
415
+ override.returns(T::Array[WhopSDK::PlanCreateParams::Image::Variants])
416
+ end
417
+ def self.variants
418
+ end
419
+ end
420
+
421
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
422
+ OrHash =
423
+ T.type_alias do
424
+ T.any(
425
+ WhopSDK::PlanCreateParams::PaymentMethodConfiguration,
426
+ WhopSDK::Internal::AnyHash
427
+ )
428
+ end
429
+
430
+ # An array of payment method identifiers that are explicitly disabled. Only
431
+ # applies if the include_platform_defaults is true.
432
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
433
+ attr_accessor :disabled
434
+
435
+ # An array of payment method identifiers that are explicitly enabled. This means
436
+ # these payment methods will be shown on checkout. Example use case is to only
437
+ # enable a specific payment method like cashapp, or extending the platform
438
+ # defaults with additional methods.
439
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
440
+ attr_accessor :enabled
441
+
442
+ # Whether Whop's platform default payment method enablement settings are included
443
+ # in this configuration. The full list of default payment methods can be found in
444
+ # the documentation at docs.whop.com/payments.
445
+ sig { returns(T::Boolean) }
446
+ attr_accessor :include_platform_defaults
447
+
448
+ # The explicit payment method configuration for the plan. If not provided, the
449
+ # platform or company's defaults will apply.
317
450
  sig do
318
451
  params(
319
- id: T.nilable(String),
320
- direct_upload_id: T.nilable(String)
452
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
453
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
454
+ include_platform_defaults: T::Boolean
321
455
  ).returns(T.attached_class)
322
456
  end
323
457
  def self.new(
324
- # The ID of an existing attachment object. Use this when updating a resource and
325
- # keeping a subset of the attachments. Don't use this unless you know what you're
326
- # doing.
327
- id: nil,
328
- # This ID should be used the first time you upload an attachment. It is the ID of
329
- # the direct upload that was created when uploading the file to S3 via the
330
- # mediaDirectUpload mutation.
331
- direct_upload_id: nil
458
+ # An array of payment method identifiers that are explicitly disabled. Only
459
+ # applies if the include_platform_defaults is true.
460
+ disabled:,
461
+ # An array of payment method identifiers that are explicitly enabled. This means
462
+ # these payment methods will be shown on checkout. Example use case is to only
463
+ # enable a specific payment method like cashapp, or extending the platform
464
+ # defaults with additional methods.
465
+ enabled:,
466
+ # Whether Whop's platform default payment method enablement settings are included
467
+ # in this configuration. The full list of default payment methods can be found in
468
+ # the documentation at docs.whop.com/payments.
469
+ include_platform_defaults:
332
470
  )
333
471
  end
334
472
 
335
473
  sig do
336
474
  override.returns(
337
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
475
+ {
476
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
477
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
478
+ include_platform_defaults: T::Boolean
479
+ }
338
480
  )
339
481
  end
340
482
  def to_hash
@@ -66,6 +66,26 @@ module WhopSDK
66
66
  sig { returns(T.nilable(Integer)) }
67
67
  attr_accessor :member_count
68
68
 
69
+ # The explicit payment method configuration for the plan, if any.
70
+ sig do
71
+ returns(
72
+ T.nilable(
73
+ WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration
74
+ )
75
+ )
76
+ end
77
+ attr_reader :payment_method_configuration
78
+
79
+ sig do
80
+ params(
81
+ payment_method_configuration:
82
+ T.nilable(
83
+ WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration::OrHash
84
+ )
85
+ ).void
86
+ end
87
+ attr_writer :payment_method_configuration
88
+
69
89
  # Indicates if the plan is a one time payment or recurring.
70
90
  sig { returns(WhopSDK::PlanType::TaggedSymbol) }
71
91
  attr_accessor :plan_type
@@ -133,6 +153,10 @@ module WhopSDK
133
153
  invoice:
134
154
  T.nilable(WhopSDK::Models::PlanListResponse::Invoice::OrHash),
135
155
  member_count: T.nilable(Integer),
156
+ payment_method_configuration:
157
+ T.nilable(
158
+ WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration::OrHash
159
+ ),
136
160
  plan_type: WhopSDK::PlanType::OrSymbol,
137
161
  product:
138
162
  T.nilable(WhopSDK::Models::PlanListResponse::Product::OrHash),
@@ -170,6 +194,8 @@ module WhopSDK
170
194
  invoice:,
171
195
  # The number of members for the plan.
172
196
  member_count:,
197
+ # The explicit payment method configuration for the plan, if any.
198
+ payment_method_configuration:,
173
199
  # Indicates if the plan is a one time payment or recurring.
174
200
  plan_type:,
175
201
  # The access pass for the plan.
@@ -209,6 +235,10 @@ module WhopSDK
209
235
  internal_notes: T.nilable(String),
210
236
  invoice: T.nilable(WhopSDK::Models::PlanListResponse::Invoice),
211
237
  member_count: T.nilable(Integer),
238
+ payment_method_configuration:
239
+ T.nilable(
240
+ WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration
241
+ ),
212
242
  plan_type: WhopSDK::PlanType::TaggedSymbol,
213
243
  product: T.nilable(WhopSDK::Models::PlanListResponse::Product),
214
244
  purchase_url: String,
@@ -284,6 +314,70 @@ module WhopSDK
284
314
  end
285
315
  end
286
316
 
317
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
318
+ OrHash =
319
+ T.type_alias do
320
+ T.any(
321
+ WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration,
322
+ WhopSDK::Internal::AnyHash
323
+ )
324
+ end
325
+
326
+ # An array of payment method identifiers that are explicitly disabled. Only
327
+ # applies if the include_platform_defaults is true.
328
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
329
+ attr_accessor :disabled
330
+
331
+ # An array of payment method identifiers that are explicitly enabled. This means
332
+ # these payment methods will be shown on checkout. Example use case is to only
333
+ # enable a specific payment method like cashapp, or extending the platform
334
+ # defaults with additional methods.
335
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
336
+ attr_accessor :enabled
337
+
338
+ # Whether Whop's platform default payment method enablement settings are included
339
+ # in this configuration. The full list of default payment methods can be found in
340
+ # the documentation at docs.whop.com/payments.
341
+ sig { returns(T::Boolean) }
342
+ attr_accessor :include_platform_defaults
343
+
344
+ # The explicit payment method configuration for the plan, if any.
345
+ sig do
346
+ params(
347
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
348
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
349
+ include_platform_defaults: T::Boolean
350
+ ).returns(T.attached_class)
351
+ end
352
+ def self.new(
353
+ # An array of payment method identifiers that are explicitly disabled. Only
354
+ # applies if the include_platform_defaults is true.
355
+ disabled:,
356
+ # An array of payment method identifiers that are explicitly enabled. This means
357
+ # these payment methods will be shown on checkout. Example use case is to only
358
+ # enable a specific payment method like cashapp, or extending the platform
359
+ # defaults with additional methods.
360
+ enabled:,
361
+ # Whether Whop's platform default payment method enablement settings are included
362
+ # in this configuration. The full list of default payment methods can be found in
363
+ # the documentation at docs.whop.com/payments.
364
+ include_platform_defaults:
365
+ )
366
+ end
367
+
368
+ sig do
369
+ override.returns(
370
+ {
371
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
372
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
373
+ include_platform_defaults: T::Boolean
374
+ }
375
+ )
376
+ end
377
+ def to_hash
378
+ end
379
+ end
380
+
287
381
  class Product < WhopSDK::Internal::Type::BaseModel
288
382
  OrHash =
289
383
  T.type_alias do