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
@@ -14,56 +14,52 @@ module WhopSDK
14
14
  )
15
15
  end
16
16
 
17
- # The affiliate code to use for the checkout configuration
18
- sig { returns(T.nilable(String)) }
19
- attr_accessor :affiliate_code
20
-
21
- # The metadata to use for the checkout configuration
22
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
23
- attr_accessor :metadata
24
-
25
17
  # Pass this object to create a new plan for this checkout configuration
26
- sig do
27
- returns(T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan))
28
- end
18
+ sig { returns(WhopSDK::CheckoutConfigurationCreateParams::Plan) }
29
19
  attr_reader :plan
30
20
 
31
21
  sig do
32
22
  params(
33
- plan:
34
- T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash)
23
+ plan: WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash
35
24
  ).void
36
25
  end
37
26
  attr_writer :plan
38
27
 
39
- # The ID of the plan to use for the checkout configuration
28
+ # The affiliate code to use for the checkout configuration
40
29
  sig { returns(T.nilable(String)) }
41
- attr_accessor :plan_id
30
+ attr_accessor :affiliate_code
31
+
32
+ # The metadata to use for the checkout configuration
33
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
34
+ attr_accessor :metadata
42
35
 
43
36
  # The URL to redirect the user to after the checkout configuration is created
44
37
  sig { returns(T.nilable(String)) }
45
38
  attr_accessor :redirect_url
46
39
 
40
+ # The ID of the plan to use for the checkout configuration
41
+ sig { returns(String) }
42
+ attr_accessor :plan_id
43
+
47
44
  sig do
48
45
  params(
46
+ plan: WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash,
47
+ plan_id: String,
49
48
  affiliate_code: T.nilable(String),
50
49
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
51
- plan:
52
- T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash),
53
- plan_id: T.nilable(String),
54
50
  redirect_url: T.nilable(String),
55
51
  request_options: WhopSDK::RequestOptions::OrHash
56
52
  ).returns(T.attached_class)
57
53
  end
58
54
  def self.new(
55
+ # Pass this object to create a new plan for this checkout configuration
56
+ plan:,
57
+ # The ID of the plan to use for the checkout configuration
58
+ plan_id:,
59
59
  # The affiliate code to use for the checkout configuration
60
60
  affiliate_code: nil,
61
61
  # The metadata to use for the checkout configuration
62
62
  metadata: nil,
63
- # Pass this object to create a new plan for this checkout configuration
64
- plan: nil,
65
- # The ID of the plan to use for the checkout configuration
66
- plan_id: nil,
67
63
  # The URL to redirect the user to after the checkout configuration is created
68
64
  redirect_url: nil,
69
65
  request_options: {}
@@ -73,11 +69,11 @@ module WhopSDK
73
69
  sig do
74
70
  override.returns(
75
71
  {
72
+ plan: WhopSDK::CheckoutConfigurationCreateParams::Plan,
76
73
  affiliate_code: T.nilable(String),
77
74
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
78
- plan: T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan),
79
- plan_id: T.nilable(String),
80
75
  redirect_url: T.nilable(String),
76
+ plan_id: String,
81
77
  request_options: WhopSDK::RequestOptions
82
78
  }
83
79
  )
@@ -134,20 +130,15 @@ module WhopSDK
134
130
  # An image for the plan. This will be visible on the product page to customers.
135
131
  sig do
136
132
  returns(
137
- T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::Image)
138
- )
139
- end
140
- attr_reader :image
141
-
142
- sig do
143
- params(
144
- image:
145
- T.nilable(
146
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::OrHash
133
+ T.nilable(
134
+ T.any(
135
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
136
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID
147
137
  )
148
- ).void
138
+ )
139
+ )
149
140
  end
150
- attr_writer :image
141
+ attr_accessor :image
151
142
 
152
143
  # An additional amount charged upon first purchase.
153
144
  sig { returns(T.nilable(Float)) }
@@ -162,6 +153,27 @@ module WhopSDK
162
153
  sig { returns(T.nilable(WhopSDK::TaxType::OrSymbol)) }
163
154
  attr_accessor :override_tax_type
164
155
 
156
+ # The explicit payment method configuration for the plan. If not provided, the
157
+ # platform or company's defaults will apply.
158
+ sig do
159
+ returns(
160
+ T.nilable(
161
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration
162
+ )
163
+ )
164
+ end
165
+ attr_reader :payment_method_configuration
166
+
167
+ sig do
168
+ params(
169
+ payment_method_configuration:
170
+ T.nilable(
171
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration::OrHash
172
+ )
173
+ ).void
174
+ end
175
+ attr_writer :payment_method_configuration
176
+
165
177
  # The type of plan that can be attached to an access pass
166
178
  sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
167
179
  attr_accessor :plan_type
@@ -226,11 +238,18 @@ module WhopSDK
226
238
  force_create_new_plan: T.nilable(T::Boolean),
227
239
  image:
228
240
  T.nilable(
229
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::OrHash
241
+ T.any(
242
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID::OrHash,
243
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID::OrHash
244
+ )
230
245
  ),
231
246
  initial_price: T.nilable(Float),
232
247
  internal_notes: T.nilable(String),
233
248
  override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
249
+ payment_method_configuration:
250
+ T.nilable(
251
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration::OrHash
252
+ ),
234
253
  plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
235
254
  product:
236
255
  T.nilable(
@@ -269,6 +288,9 @@ module WhopSDK
269
288
  # Whether or not the tax is included in a plan's price (or if it hasn't been set
270
289
  # up)
271
290
  override_tax_type: nil,
291
+ # The explicit payment method configuration for the plan. If not provided, the
292
+ # platform or company's defaults will apply.
293
+ payment_method_configuration: nil,
272
294
  # The type of plan that can be attached to an access pass
273
295
  plan_type: nil,
274
296
  # Pass this object to create a new product for this plan. We will use the product
@@ -306,11 +328,18 @@ module WhopSDK
306
328
  force_create_new_plan: T.nilable(T::Boolean),
307
329
  image:
308
330
  T.nilable(
309
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image
331
+ T.any(
332
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
333
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID
334
+ )
310
335
  ),
311
336
  initial_price: T.nilable(Float),
312
337
  internal_notes: T.nilable(String),
313
338
  override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
339
+ payment_method_configuration:
340
+ T.nilable(
341
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration
342
+ ),
314
343
  plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
315
344
  product:
316
345
  T.nilable(
@@ -403,49 +432,148 @@ module WhopSDK
403
432
  end
404
433
  end
405
434
 
406
- class Image < WhopSDK::Internal::Type::BaseModel
407
- OrHash =
435
+ # An image for the plan. This will be visible on the product page to customers.
436
+ module Image
437
+ extend WhopSDK::Internal::Type::Union
438
+
439
+ Variants =
408
440
  T.type_alias do
409
441
  T.any(
410
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image,
411
- WhopSDK::Internal::AnyHash
442
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
443
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID
412
444
  )
413
445
  end
414
446
 
415
- # The ID of an existing attachment object. Use this when updating a resource and
416
- # keeping a subset of the attachments. Don't use this unless you know what you're
417
- # doing.
418
- sig { returns(T.nilable(String)) }
419
- attr_accessor :id
447
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
448
+ OrHash =
449
+ T.type_alias do
450
+ T.any(
451
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
452
+ WhopSDK::Internal::AnyHash
453
+ )
454
+ end
420
455
 
421
- # This ID should be used the first time you upload an attachment. It is the ID of
422
- # the direct upload that was created when uploading the file to S3 via the
423
- # mediaDirectUpload mutation.
424
- sig { returns(T.nilable(String)) }
425
- attr_accessor :direct_upload_id
456
+ # This ID should be used the first time you upload an attachment. It is the ID of
457
+ # the direct upload that was created when uploading the file to S3 via the
458
+ # mediaDirectUpload mutation.
459
+ sig { returns(String) }
460
+ attr_accessor :direct_upload_id
461
+
462
+ # Input for an attachment
463
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
464
+ def self.new(
465
+ # This ID should be used the first time you upload an attachment. It is the ID of
466
+ # the direct upload that was created when uploading the file to S3 via the
467
+ # mediaDirectUpload mutation.
468
+ direct_upload_id:
469
+ )
470
+ end
471
+
472
+ sig { override.returns({ direct_upload_id: String }) }
473
+ def to_hash
474
+ end
475
+ end
476
+
477
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
478
+ OrHash =
479
+ T.type_alias do
480
+ T.any(
481
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID,
482
+ WhopSDK::Internal::AnyHash
483
+ )
484
+ end
485
+
486
+ # The ID of an existing attachment object. Use this when updating a resource and
487
+ # keeping a subset of the attachments. Don't use this unless you know what you're
488
+ # doing.
489
+ sig { returns(String) }
490
+ attr_accessor :id
491
+
492
+ # Input for an attachment
493
+ sig { params(id: String).returns(T.attached_class) }
494
+ def self.new(
495
+ # The ID of an existing attachment object. Use this when updating a resource and
496
+ # keeping a subset of the attachments. Don't use this unless you know what you're
497
+ # doing.
498
+ id:
499
+ )
500
+ end
501
+
502
+ sig { override.returns({ id: String }) }
503
+ def to_hash
504
+ end
505
+ end
426
506
 
427
- # An image for the plan. This will be visible on the product page to customers.
507
+ sig do
508
+ override.returns(
509
+ T::Array[
510
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::Variants
511
+ ]
512
+ )
513
+ end
514
+ def self.variants
515
+ end
516
+ end
517
+
518
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
519
+ OrHash =
520
+ T.type_alias do
521
+ T.any(
522
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration,
523
+ WhopSDK::Internal::AnyHash
524
+ )
525
+ end
526
+
527
+ # An array of payment method identifiers that are explicitly disabled. Only
528
+ # applies if the include_platform_defaults is true.
529
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
530
+ attr_accessor :disabled
531
+
532
+ # An array of payment method identifiers that are explicitly enabled. This means
533
+ # these payment methods will be shown on checkout. Example use case is to only
534
+ # enable a specific payment method like cashapp, or extending the platform
535
+ # defaults with additional methods.
536
+ sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
537
+ attr_accessor :enabled
538
+
539
+ # Whether Whop's platform default payment method enablement settings are included
540
+ # in this configuration. The full list of default payment methods can be found in
541
+ # the documentation at docs.whop.com/payments.
542
+ sig { returns(T::Boolean) }
543
+ attr_accessor :include_platform_defaults
544
+
545
+ # The explicit payment method configuration for the plan. If not provided, the
546
+ # platform or company's defaults will apply.
428
547
  sig do
429
548
  params(
430
- id: T.nilable(String),
431
- direct_upload_id: T.nilable(String)
549
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
550
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
551
+ include_platform_defaults: T::Boolean
432
552
  ).returns(T.attached_class)
433
553
  end
434
554
  def self.new(
435
- # The ID of an existing attachment object. Use this when updating a resource and
436
- # keeping a subset of the attachments. Don't use this unless you know what you're
437
- # doing.
438
- id: nil,
439
- # This ID should be used the first time you upload an attachment. It is the ID of
440
- # the direct upload that was created when uploading the file to S3 via the
441
- # mediaDirectUpload mutation.
442
- direct_upload_id: nil
555
+ # An array of payment method identifiers that are explicitly disabled. Only
556
+ # applies if the include_platform_defaults is true.
557
+ disabled:,
558
+ # An array of payment method identifiers that are explicitly enabled. This means
559
+ # these payment methods will be shown on checkout. Example use case is to only
560
+ # enable a specific payment method like cashapp, or extending the platform
561
+ # defaults with additional methods.
562
+ enabled:,
563
+ # Whether Whop's platform default payment method enablement settings are included
564
+ # in this configuration. The full list of default payment methods can be found in
565
+ # the documentation at docs.whop.com/payments.
566
+ include_platform_defaults:
443
567
  )
444
568
  end
445
569
 
446
570
  sig do
447
571
  override.returns(
448
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
572
+ {
573
+ disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
574
+ enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
575
+ include_platform_defaults: T::Boolean
576
+ }
449
577
  )
450
578
  end
451
579
  def to_hash
@@ -37,6 +37,11 @@ module WhopSDK
37
37
  sig { returns(Integer) }
38
38
  attr_accessor :member_count
39
39
 
40
+ # A key-value store of data for the account, created/updated by the platform that
41
+ # made the account.
42
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
43
+ attr_accessor :metadata
44
+
40
45
  # The user who owns this company
41
46
  sig { returns(WhopSDK::Company::OwnerUser) }
42
47
  attr_reader :owner_user
@@ -78,6 +83,7 @@ module WhopSDK
78
83
  industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
79
84
  logo: T.nilable(WhopSDK::Company::Logo::OrHash),
80
85
  member_count: Integer,
86
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
81
87
  owner_user: WhopSDK::Company::OwnerUser::OrHash,
82
88
  published_reviews_count: Integer,
83
89
  route: String,
@@ -102,6 +108,9 @@ module WhopSDK
102
108
  logo:,
103
109
  # The number of members in the company.
104
110
  member_count:,
111
+ # A key-value store of data for the account, created/updated by the platform that
112
+ # made the account.
113
+ metadata:,
105
114
  # The user who owns this company
106
115
  owner_user:,
107
116
  # The number of reviews that have been published for the company.
@@ -129,6 +138,7 @@ module WhopSDK
129
138
  industry_type: T.nilable(WhopSDK::IndustryTypes::TaggedSymbol),
130
139
  logo: T.nilable(WhopSDK::Company::Logo),
131
140
  member_count: Integer,
141
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
132
142
  owner_user: WhopSDK::Company::OwnerUser,
133
143
  published_reviews_count: Integer,
134
144
  route: String,
@@ -0,0 +1,67 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class CompanyCreateParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::CompanyCreateParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # The email of the user who the company will belong to.
15
+ sig { returns(String) }
16
+ attr_accessor :email
17
+
18
+ # The company ID of the platform creating this company.
19
+ sig { returns(String) }
20
+ attr_accessor :parent_company_id
21
+
22
+ # The name of the company being created.
23
+ sig { returns(String) }
24
+ attr_accessor :title
25
+
26
+ # Additional metadata for the account
27
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
28
+ attr_accessor :metadata
29
+
30
+ sig do
31
+ params(
32
+ email: String,
33
+ parent_company_id: String,
34
+ title: String,
35
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
36
+ request_options: WhopSDK::RequestOptions::OrHash
37
+ ).returns(T.attached_class)
38
+ end
39
+ def self.new(
40
+ # The email of the user who the company will belong to.
41
+ email:,
42
+ # The company ID of the platform creating this company.
43
+ parent_company_id:,
44
+ # The name of the company being created.
45
+ title:,
46
+ # Additional metadata for the account
47
+ metadata: nil,
48
+ request_options: {}
49
+ )
50
+ end
51
+
52
+ sig do
53
+ override.returns(
54
+ {
55
+ email: String,
56
+ parent_company_id: String,
57
+ title: String,
58
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
59
+ request_options: WhopSDK::RequestOptions
60
+ }
61
+ )
62
+ end
63
+ def to_hash
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,83 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class CompanyListParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::CompanyListParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # The ID of the parent company to list sub companies for
15
+ sig { returns(String) }
16
+ attr_accessor :parent_company_id
17
+
18
+ # Returns the elements in the list that come after the specified cursor.
19
+ sig { returns(T.nilable(String)) }
20
+ attr_accessor :after
21
+
22
+ # Returns the elements in the list that come before the specified cursor.
23
+ sig { returns(T.nilable(String)) }
24
+ attr_accessor :before
25
+
26
+ # The direction of the sort.
27
+ sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) }
28
+ attr_accessor :direction
29
+
30
+ # Returns the first _n_ elements from the list.
31
+ sig { returns(T.nilable(Integer)) }
32
+ attr_accessor :first
33
+
34
+ # Returns the last _n_ elements from the list.
35
+ sig { returns(T.nilable(Integer)) }
36
+ attr_accessor :last
37
+
38
+ sig do
39
+ params(
40
+ parent_company_id: String,
41
+ after: T.nilable(String),
42
+ before: T.nilable(String),
43
+ direction: T.nilable(WhopSDK::Direction::OrSymbol),
44
+ first: T.nilable(Integer),
45
+ last: T.nilable(Integer),
46
+ request_options: WhopSDK::RequestOptions::OrHash
47
+ ).returns(T.attached_class)
48
+ end
49
+ def self.new(
50
+ # The ID of the parent company to list sub companies for
51
+ parent_company_id:,
52
+ # Returns the elements in the list that come after the specified cursor.
53
+ after: nil,
54
+ # Returns the elements in the list that come before the specified cursor.
55
+ before: nil,
56
+ # The direction of the sort.
57
+ direction: nil,
58
+ # Returns the first _n_ elements from the list.
59
+ first: nil,
60
+ # Returns the last _n_ elements from the list.
61
+ last: nil,
62
+ request_options: {}
63
+ )
64
+ end
65
+
66
+ sig do
67
+ override.returns(
68
+ {
69
+ parent_company_id: String,
70
+ after: T.nilable(String),
71
+ before: T.nilable(String),
72
+ direction: T.nilable(WhopSDK::Direction::OrSymbol),
73
+ first: T.nilable(Integer),
74
+ last: T.nilable(Integer),
75
+ request_options: WhopSDK::RequestOptions
76
+ }
77
+ )
78
+ end
79
+ def to_hash
80
+ end
81
+ end
82
+ end
83
+ end