whop_sdk 0.0.23 → 0.0.24

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 (176) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/models/app_build_create_params.rb +16 -55
  5. data/lib/whop_sdk/models/app_create_params.rb +22 -1
  6. data/lib/whop_sdk/models/app_list_params.rb +5 -0
  7. data/lib/whop_sdk/models/app_update_params.rb +14 -53
  8. data/lib/whop_sdk/models/card_brands.rb +16 -0
  9. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +32 -56
  10. data/lib/whop_sdk/models/company_create_params.rb +22 -1
  11. data/lib/whop_sdk/models/company_update_params.rb +28 -106
  12. data/lib/whop_sdk/models/course_create_params.rb +15 -62
  13. data/lib/whop_sdk/models/course_lesson_create_params.rb +14 -53
  14. data/lib/whop_sdk/models/course_lesson_update_params.rb +53 -214
  15. data/lib/whop_sdk/models/course_update_params.rb +14 -61
  16. data/lib/whop_sdk/models/dispute_update_evidence_params.rb +56 -212
  17. data/lib/whop_sdk/models/experience_create_params.rb +22 -1
  18. data/lib/whop_sdk/models/experience_update_params.rb +14 -53
  19. data/lib/whop_sdk/models/forum_post_create_params.rb +13 -52
  20. data/lib/whop_sdk/models/forum_post_update_params.rb +13 -52
  21. data/lib/whop_sdk/models/friendly_receipt_status.rb +23 -11
  22. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +1 -34
  23. data/lib/whop_sdk/models/member_list_response.rb +9 -1
  24. data/lib/whop_sdk/models/member_retrieve_response.rb +9 -1
  25. data/lib/whop_sdk/models/membership.rb +76 -2
  26. data/lib/whop_sdk/models/membership_list_response.rb +38 -2
  27. data/lib/whop_sdk/models/membership_uncancel_params.rb +14 -0
  28. data/lib/whop_sdk/models/message_create_params.rb +13 -52
  29. data/lib/whop_sdk/models/message_update_params.rb +14 -53
  30. data/lib/whop_sdk/models/payment.rb +17 -1
  31. data/lib/whop_sdk/models/payment_list_response.rb +17 -1
  32. data/lib/whop_sdk/models/payment_method_types.rb +58 -57
  33. data/lib/whop_sdk/models/payment_provider.rb +1 -0
  34. data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +26 -1
  35. data/lib/whop_sdk/models/payout_method_list_response.rb +26 -1
  36. data/lib/whop_sdk/models/payout_method_retrieve_response.rb +26 -1
  37. data/lib/whop_sdk/models/plan_create_params.rb +14 -53
  38. data/lib/whop_sdk/models/plan_update_params.rb +14 -53
  39. data/lib/whop_sdk/models/withdrawal_create_params.rb +21 -1
  40. data/lib/whop_sdk/models/withdrawal_create_response.rb +2 -9
  41. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +2 -9
  42. data/lib/whop_sdk/models/withdrawal_list_response.rb +1 -9
  43. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +2 -9
  44. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +2 -9
  45. data/lib/whop_sdk/models.rb +2 -2
  46. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  47. data/lib/whop_sdk/resources/apps.rb +4 -2
  48. data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
  49. data/lib/whop_sdk/resources/companies.rb +5 -3
  50. data/lib/whop_sdk/resources/course_lessons.rb +4 -4
  51. data/lib/whop_sdk/resources/courses.rb +4 -8
  52. data/lib/whop_sdk/resources/disputes.rb +4 -4
  53. data/lib/whop_sdk/resources/experiences.rb +4 -2
  54. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  55. data/lib/whop_sdk/resources/memberships.rb +32 -0
  56. data/lib/whop_sdk/resources/messages.rb +2 -2
  57. data/lib/whop_sdk/resources/notifications.rb +4 -0
  58. data/lib/whop_sdk/resources/plans.rb +2 -2
  59. data/lib/whop_sdk/resources/withdrawals.rb +8 -1
  60. data/lib/whop_sdk/version.rb +1 -1
  61. data/lib/whop_sdk.rb +1 -1
  62. data/rbi/whop_sdk/models/app_build_create_params.rbi +26 -89
  63. data/rbi/whop_sdk/models/app_create_params.rbi +36 -0
  64. data/rbi/whop_sdk/models/app_list_params.rbi +10 -0
  65. data/rbi/whop_sdk/models/app_update_params.rbi +21 -93
  66. data/rbi/whop_sdk/models/card_brands.rbi +17 -0
  67. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +45 -87
  68. data/rbi/whop_sdk/models/company_create_params.rbi +39 -0
  69. data/rbi/whop_sdk/models/company_update_params.rbi +47 -185
  70. data/rbi/whop_sdk/models/course_create_params.rbi +24 -101
  71. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +25 -92
  72. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +97 -359
  73. data/rbi/whop_sdk/models/course_update_params.rbi +24 -101
  74. data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +116 -340
  75. data/rbi/whop_sdk/models/experience_create_params.rbi +41 -0
  76. data/rbi/whop_sdk/models/experience_update_params.rbi +24 -93
  77. data/rbi/whop_sdk/models/forum_post_create_params.rbi +18 -94
  78. data/rbi/whop_sdk/models/forum_post_update_params.rbi +18 -94
  79. data/rbi/whop_sdk/models/friendly_receipt_status.rbi +62 -17
  80. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +0 -105
  81. data/rbi/whop_sdk/models/member_list_response.rbi +8 -0
  82. data/rbi/whop_sdk/models/member_retrieve_response.rbi +8 -0
  83. data/rbi/whop_sdk/models/membership.rbi +126 -4
  84. data/rbi/whop_sdk/models/membership_list_response.rbi +98 -4
  85. data/rbi/whop_sdk/models/membership_uncancel_params.rbi +27 -0
  86. data/rbi/whop_sdk/models/message_create_params.rbi +18 -94
  87. data/rbi/whop_sdk/models/message_update_params.rbi +18 -94
  88. data/rbi/whop_sdk/models/payment.rbi +16 -0
  89. data/rbi/whop_sdk/models/payment_list_response.rbi +16 -0
  90. data/rbi/whop_sdk/models/payment_method_types.rbi +66 -64
  91. data/rbi/whop_sdk/models/payment_provider.rbi +1 -0
  92. data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +26 -0
  93. data/rbi/whop_sdk/models/payout_method_list_response.rbi +26 -0
  94. data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +26 -0
  95. data/rbi/whop_sdk/models/plan_create_params.rbi +21 -93
  96. data/rbi/whop_sdk/models/plan_update_params.rbi +21 -93
  97. data/rbi/whop_sdk/models/withdrawal_create_params.rbi +18 -0
  98. data/rbi/whop_sdk/models/withdrawal_create_response.rbi +8 -11
  99. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +8 -11
  100. data/rbi/whop_sdk/models/withdrawal_list_response.rbi +3 -11
  101. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +8 -11
  102. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +8 -11
  103. data/rbi/whop_sdk/models.rbi +2 -2
  104. data/rbi/whop_sdk/resources/app_builds.rbi +1 -5
  105. data/rbi/whop_sdk/resources/apps.rbi +4 -7
  106. data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
  107. data/rbi/whop_sdk/resources/companies.rbi +5 -13
  108. data/rbi/whop_sdk/resources/course_lessons.rbi +4 -24
  109. data/rbi/whop_sdk/resources/courses.rbi +2 -20
  110. data/rbi/whop_sdk/resources/disputes.rbi +4 -16
  111. data/rbi/whop_sdk/resources/experiences.rbi +4 -7
  112. data/rbi/whop_sdk/resources/forum_posts.rbi +2 -12
  113. data/rbi/whop_sdk/resources/memberships.rbi +26 -0
  114. data/rbi/whop_sdk/resources/messages.rbi +2 -12
  115. data/rbi/whop_sdk/resources/notifications.rbi +4 -0
  116. data/rbi/whop_sdk/resources/plans.rbi +2 -14
  117. data/rbi/whop_sdk/resources/withdrawals.rbi +7 -0
  118. data/sig/whop_sdk/models/app_build_create_params.rbs +9 -30
  119. data/sig/whop_sdk/models/app_create_params.rbs +20 -1
  120. data/sig/whop_sdk/models/app_list_params.rbs +10 -0
  121. data/sig/whop_sdk/models/app_update_params.rbs +9 -30
  122. data/sig/whop_sdk/models/card_brands.rbs +32 -0
  123. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +19 -30
  124. data/sig/whop_sdk/models/company_create_params.rbs +15 -0
  125. data/sig/whop_sdk/models/company_update_params.rbs +18 -60
  126. data/sig/whop_sdk/models/course_create_params.rbs +9 -35
  127. data/sig/whop_sdk/models/course_lesson_create_params.rbs +9 -30
  128. data/sig/whop_sdk/models/course_lesson_update_params.rbs +36 -120
  129. data/sig/whop_sdk/models/course_update_params.rbs +9 -35
  130. data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +36 -120
  131. data/sig/whop_sdk/models/experience_create_params.rbs +15 -0
  132. data/sig/whop_sdk/models/experience_update_params.rbs +9 -30
  133. data/sig/whop_sdk/models/forum_post_create_params.rbs +9 -30
  134. data/sig/whop_sdk/models/forum_post_update_params.rbs +9 -30
  135. data/sig/whop_sdk/models/friendly_receipt_status.rbs +46 -22
  136. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +0 -38
  137. data/sig/whop_sdk/models/member_list_response.rbs +5 -0
  138. data/sig/whop_sdk/models/member_retrieve_response.rbs +5 -0
  139. data/sig/whop_sdk/models/membership.rbs +65 -4
  140. data/sig/whop_sdk/models/membership_list_response.rbs +45 -4
  141. data/sig/whop_sdk/models/membership_uncancel_params.rbs +15 -0
  142. data/sig/whop_sdk/models/message_create_params.rbs +9 -30
  143. data/sig/whop_sdk/models/message_update_params.rbs +9 -30
  144. data/sig/whop_sdk/models/payment.rbs +10 -0
  145. data/sig/whop_sdk/models/payment_list_response.rbs +10 -0
  146. data/sig/whop_sdk/models/payment_method_types.rbs +117 -115
  147. data/sig/whop_sdk/models/payment_provider.rbs +2 -0
  148. data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +15 -0
  149. data/sig/whop_sdk/models/payout_method_list_response.rbs +15 -0
  150. data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +15 -0
  151. data/sig/whop_sdk/models/plan_create_params.rbs +9 -30
  152. data/sig/whop_sdk/models/plan_update_params.rbs +9 -30
  153. data/sig/whop_sdk/models/withdrawal_create_params.rbs +11 -1
  154. data/sig/whop_sdk/models/withdrawal_create_response.rbs +5 -8
  155. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +5 -8
  156. data/sig/whop_sdk/models/withdrawal_list_response.rbs +3 -8
  157. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +5 -8
  158. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +5 -8
  159. data/sig/whop_sdk/models.rbs +2 -2
  160. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  161. data/sig/whop_sdk/resources/apps.rbs +2 -1
  162. data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
  163. data/sig/whop_sdk/resources/companies.rbs +3 -2
  164. data/sig/whop_sdk/resources/course_lessons.rbs +4 -4
  165. data/sig/whop_sdk/resources/courses.rbs +2 -4
  166. data/sig/whop_sdk/resources/disputes.rbs +4 -4
  167. data/sig/whop_sdk/resources/experiences.rbs +2 -1
  168. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  169. data/sig/whop_sdk/resources/memberships.rbs +5 -0
  170. data/sig/whop_sdk/resources/messages.rbs +2 -2
  171. data/sig/whop_sdk/resources/plans.rbs +2 -2
  172. data/sig/whop_sdk/resources/withdrawals.rbs +2 -0
  173. metadata +19 -5
  174. data/lib/whop_sdk/models/withdrawal_types.rb +0 -16
  175. data/rbi/whop_sdk/models/withdrawal_types.rbi +0 -20
  176. data/sig/whop_sdk/models/withdrawal_types.rbs +0 -14
@@ -15,6 +15,11 @@ module WhopSDK
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
18
+ # A reference to identify the payout destination, such as the last 4 digits of an
19
+ # account number or an email address.
20
+ sig { returns(T.nilable(String)) }
21
+ attr_accessor :account_reference
22
+
18
23
  # The company associated with the payout token
19
24
  sig do
20
25
  returns(
@@ -33,6 +38,10 @@ module WhopSDK
33
38
  end
34
39
  attr_writer :company
35
40
 
41
+ # The date and time the payout token was created
42
+ sig { returns(Time) }
43
+ attr_accessor :created_at
44
+
36
45
  # The currency code of the payout destination. This is the currency that payouts
37
46
  # will be made in for this token.
38
47
  sig { returns(String) }
@@ -56,6 +65,10 @@ module WhopSDK
56
65
  end
57
66
  attr_writer :destination
58
67
 
68
+ # The name of the bank or financial institution.
69
+ sig { returns(T.nilable(String)) }
70
+ attr_accessor :institution_name
71
+
59
72
  # Whether this payout token is the default for the payout account
60
73
  sig { returns(T::Boolean) }
61
74
  attr_accessor :is_default
@@ -69,15 +82,18 @@ module WhopSDK
69
82
  sig do
70
83
  params(
71
84
  id: String,
85
+ account_reference: T.nilable(String),
72
86
  company:
73
87
  T.nilable(
74
88
  WhopSDK::Models::PayoutMethodRetrieveResponse::Company::OrHash
75
89
  ),
90
+ created_at: Time,
76
91
  currency: String,
77
92
  destination:
78
93
  T.nilable(
79
94
  WhopSDK::Models::PayoutMethodRetrieveResponse::Destination::OrHash
80
95
  ),
96
+ institution_name: T.nilable(String),
81
97
  is_default: T::Boolean,
82
98
  nickname: T.nilable(String)
83
99
  ).returns(T.attached_class)
@@ -85,13 +101,20 @@ module WhopSDK
85
101
  def self.new(
86
102
  # The ID of the payout token
87
103
  id:,
104
+ # A reference to identify the payout destination, such as the last 4 digits of an
105
+ # account number or an email address.
106
+ account_reference:,
88
107
  # The company associated with the payout token
89
108
  company:,
109
+ # The date and time the payout token was created
110
+ created_at:,
90
111
  # The currency code of the payout destination. This is the currency that payouts
91
112
  # will be made in for this token.
92
113
  currency:,
93
114
  # The payout destination associated with the payout token
94
115
  destination:,
116
+ # The name of the bank or financial institution.
117
+ institution_name:,
95
118
  # Whether this payout token is the default for the payout account
96
119
  is_default:,
97
120
  # An optional nickname for the payout token to help the user identify it. This is
@@ -104,13 +127,16 @@ module WhopSDK
104
127
  override.returns(
105
128
  {
106
129
  id: String,
130
+ account_reference: T.nilable(String),
107
131
  company:
108
132
  T.nilable(WhopSDK::Models::PayoutMethodRetrieveResponse::Company),
133
+ created_at: Time,
109
134
  currency: String,
110
135
  destination:
111
136
  T.nilable(
112
137
  WhopSDK::Models::PayoutMethodRetrieveResponse::Destination
113
138
  ),
139
+ institution_name: T.nilable(String),
114
140
  is_default: T::Boolean,
115
141
  nickname: T.nilable(String)
116
142
  }
@@ -42,17 +42,13 @@ 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
+
45
48
  sig do
46
- returns(
47
- T.nilable(
48
- T.any(
49
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
50
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
51
- )
52
- )
53
- )
49
+ params(image: T.nilable(WhopSDK::PlanCreateParams::Image::OrHash)).void
54
50
  end
55
- attr_accessor :image
51
+ attr_writer :image
56
52
 
57
53
  # An additional amount charged upon first purchase. Use only if a one time payment
58
54
  # OR you want to charge an additional amount on top of the renewal price. Provided
@@ -139,13 +135,7 @@ module WhopSDK
139
135
  T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField::OrHash]),
140
136
  description: T.nilable(String),
141
137
  expiration_days: T.nilable(Integer),
142
- image:
143
- T.nilable(
144
- T.any(
145
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID::OrHash,
146
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithID::OrHash
147
- )
148
- ),
138
+ image: T.nilable(WhopSDK::PlanCreateParams::Image::OrHash),
149
139
  initial_price: T.nilable(Float),
150
140
  internal_notes: T.nilable(String),
151
141
  legacy_payment_method_controls: T.nilable(T::Boolean),
@@ -231,13 +221,7 @@ module WhopSDK
231
221
  T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField]),
232
222
  description: T.nilable(String),
233
223
  expiration_days: T.nilable(Integer),
234
- image:
235
- T.nilable(
236
- T.any(
237
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
238
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
239
- )
240
- ),
224
+ image: T.nilable(WhopSDK::PlanCreateParams::Image),
241
225
  initial_price: T.nilable(Float),
242
226
  internal_notes: T.nilable(String),
243
227
  legacy_payment_method_controls: T.nilable(T::Boolean),
@@ -335,82 +319,26 @@ module WhopSDK
335
319
  end
336
320
  end
337
321
 
338
- # An image for the plan. This will be visible on the product page to customers.
339
- module Image
340
- extend WhopSDK::Internal::Type::Union
341
-
342
- Variants =
322
+ class Image < WhopSDK::Internal::Type::BaseModel
323
+ OrHash =
343
324
  T.type_alias do
344
- T.any(
345
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
346
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
347
- )
348
- end
349
-
350
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
351
- OrHash =
352
- T.type_alias do
353
- T.any(
354
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
355
- WhopSDK::Internal::AnyHash
356
- )
357
- end
358
-
359
- # This ID should be used the first time you upload an attachment. It is the ID of
360
- # the direct upload that was created when uploading the file to S3 via the
361
- # mediaDirectUpload mutation.
362
- sig { returns(String) }
363
- attr_accessor :direct_upload_id
364
-
365
- # Input for an attachment
366
- sig { params(direct_upload_id: String).returns(T.attached_class) }
367
- def self.new(
368
- # This ID should be used the first time you upload an attachment. It is the ID of
369
- # the direct upload that was created when uploading the file to S3 via the
370
- # mediaDirectUpload mutation.
371
- direct_upload_id:
372
- )
373
- end
374
-
375
- sig { override.returns({ direct_upload_id: String }) }
376
- def to_hash
325
+ T.any(WhopSDK::PlanCreateParams::Image, WhopSDK::Internal::AnyHash)
377
326
  end
378
- end
379
327
 
380
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
381
- OrHash =
382
- T.type_alias do
383
- T.any(
384
- WhopSDK::PlanCreateParams::Image::AttachmentInputWithID,
385
- WhopSDK::Internal::AnyHash
386
- )
387
- end
388
-
389
- # The ID of an existing attachment object. Use this when updating a resource and
390
- # keeping a subset of the attachments. Don't use this unless you know what you're
391
- # doing.
392
- sig { returns(String) }
393
- attr_accessor :id
394
-
395
- # Input for an attachment
396
- sig { params(id: String).returns(T.attached_class) }
397
- def self.new(
398
- # The ID of an existing attachment object. Use this when updating a resource and
399
- # keeping a subset of the attachments. Don't use this unless you know what you're
400
- # doing.
401
- id:
402
- )
403
- end
328
+ # The ID of an existing file object.
329
+ sig { returns(String) }
330
+ attr_accessor :id
404
331
 
405
- sig { override.returns({ id: String }) }
406
- def to_hash
407
- end
332
+ # An image for the plan. This will be visible on the product page to customers.
333
+ sig { params(id: String).returns(T.attached_class) }
334
+ def self.new(
335
+ # The ID of an existing file object.
336
+ id:
337
+ )
408
338
  end
409
339
 
410
- sig do
411
- override.returns(T::Array[WhopSDK::PlanCreateParams::Image::Variants])
412
- end
413
- def self.variants
340
+ sig { override.returns({ id: String }) }
341
+ def to_hash
414
342
  end
415
343
  end
416
344
 
@@ -34,17 +34,13 @@ module WhopSDK
34
34
  attr_accessor :expiration_days
35
35
 
36
36
  # An image for the plan. This will be visible on the product page to customers.
37
+ sig { returns(T.nilable(WhopSDK::PlanUpdateParams::Image)) }
38
+ attr_reader :image
39
+
37
40
  sig do
38
- returns(
39
- T.nilable(
40
- T.any(
41
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID,
42
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID
43
- )
44
- )
45
- )
41
+ params(image: T.nilable(WhopSDK::PlanUpdateParams::Image::OrHash)).void
46
42
  end
47
- attr_accessor :image
43
+ attr_writer :image
48
44
 
49
45
  # An additional amount charged upon first purchase.
50
46
  sig { returns(T.nilable(Float)) }
@@ -128,13 +124,7 @@ module WhopSDK
128
124
  T.nilable(T::Array[WhopSDK::PlanUpdateParams::CustomField::OrHash]),
129
125
  description: T.nilable(String),
130
126
  expiration_days: T.nilable(Integer),
131
- image:
132
- T.nilable(
133
- T.any(
134
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID::OrHash,
135
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID::OrHash
136
- )
137
- ),
127
+ image: T.nilable(WhopSDK::PlanUpdateParams::Image::OrHash),
138
128
  initial_price: T.nilable(Float),
139
129
  internal_notes: T.nilable(String),
140
130
  legacy_payment_method_controls: T.nilable(T::Boolean),
@@ -213,13 +203,7 @@ module WhopSDK
213
203
  T.nilable(T::Array[WhopSDK::PlanUpdateParams::CustomField]),
214
204
  description: T.nilable(String),
215
205
  expiration_days: T.nilable(Integer),
216
- image:
217
- T.nilable(
218
- T.any(
219
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID,
220
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID
221
- )
222
- ),
206
+ image: T.nilable(WhopSDK::PlanUpdateParams::Image),
223
207
  initial_price: T.nilable(Float),
224
208
  internal_notes: T.nilable(String),
225
209
  legacy_payment_method_controls: T.nilable(T::Boolean),
@@ -317,82 +301,26 @@ module WhopSDK
317
301
  end
318
302
  end
319
303
 
320
- # An image for the plan. This will be visible on the product page to customers.
321
- module Image
322
- extend WhopSDK::Internal::Type::Union
323
-
324
- Variants =
304
+ class Image < WhopSDK::Internal::Type::BaseModel
305
+ OrHash =
325
306
  T.type_alias do
326
- T.any(
327
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID,
328
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID
329
- )
330
- end
331
-
332
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
333
- OrHash =
334
- T.type_alias do
335
- T.any(
336
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID,
337
- WhopSDK::Internal::AnyHash
338
- )
339
- end
340
-
341
- # This ID should be used the first time you upload an attachment. It is the ID of
342
- # the direct upload that was created when uploading the file to S3 via the
343
- # mediaDirectUpload mutation.
344
- sig { returns(String) }
345
- attr_accessor :direct_upload_id
346
-
347
- # Input for an attachment
348
- sig { params(direct_upload_id: String).returns(T.attached_class) }
349
- def self.new(
350
- # This ID should be used the first time you upload an attachment. It is the ID of
351
- # the direct upload that was created when uploading the file to S3 via the
352
- # mediaDirectUpload mutation.
353
- direct_upload_id:
354
- )
355
- end
356
-
357
- sig { override.returns({ direct_upload_id: String }) }
358
- def to_hash
307
+ T.any(WhopSDK::PlanUpdateParams::Image, WhopSDK::Internal::AnyHash)
359
308
  end
360
- end
361
309
 
362
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
363
- OrHash =
364
- T.type_alias do
365
- T.any(
366
- WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID,
367
- WhopSDK::Internal::AnyHash
368
- )
369
- end
370
-
371
- # The ID of an existing attachment object. Use this when updating a resource and
372
- # keeping a subset of the attachments. Don't use this unless you know what you're
373
- # doing.
374
- sig { returns(String) }
375
- attr_accessor :id
376
-
377
- # Input for an attachment
378
- sig { params(id: String).returns(T.attached_class) }
379
- def self.new(
380
- # The ID of an existing attachment object. Use this when updating a resource and
381
- # keeping a subset of the attachments. Don't use this unless you know what you're
382
- # doing.
383
- id:
384
- )
385
- end
310
+ # The ID of an existing file object.
311
+ sig { returns(String) }
312
+ attr_accessor :id
386
313
 
387
- sig { override.returns({ id: String }) }
388
- def to_hash
389
- end
314
+ # An image for the plan. This will be visible on the product page to customers.
315
+ sig { params(id: String).returns(T.attached_class) }
316
+ def self.new(
317
+ # The ID of an existing file object.
318
+ id:
319
+ )
390
320
  end
391
321
 
392
- sig do
393
- override.returns(T::Array[WhopSDK::PlanUpdateParams::Image::Variants])
394
- end
395
- def self.variants
322
+ sig { override.returns({ id: String }) }
323
+ def to_hash
396
324
  end
397
325
  end
398
326
 
@@ -27,12 +27,23 @@ module WhopSDK
27
27
  sig { returns(T.nilable(String)) }
28
28
  attr_accessor :payout_method_id
29
29
 
30
+ # Whether the platform covers the payout fees instead of the connected account.
31
+ sig { returns(T.nilable(T::Boolean)) }
32
+ attr_accessor :platform_covers_fees
33
+
34
+ # Custom statement descriptor for the withdrawal. Must be between 5 and 22
35
+ # characters and contain only alphanumeric characters.
36
+ sig { returns(T.nilable(String)) }
37
+ attr_accessor :statement_descriptor
38
+
30
39
  sig do
31
40
  params(
32
41
  amount: Float,
33
42
  company_id: String,
34
43
  currency: WhopSDK::Currency::OrSymbol,
35
44
  payout_method_id: T.nilable(String),
45
+ platform_covers_fees: T.nilable(T::Boolean),
46
+ statement_descriptor: T.nilable(String),
36
47
  request_options: WhopSDK::RequestOptions::OrHash
37
48
  ).returns(T.attached_class)
38
49
  end
@@ -45,6 +56,11 @@ module WhopSDK
45
56
  currency:,
46
57
  # The ID of the payout method to use for the withdrawal.
47
58
  payout_method_id: nil,
59
+ # Whether the platform covers the payout fees instead of the connected account.
60
+ platform_covers_fees: nil,
61
+ # Custom statement descriptor for the withdrawal. Must be between 5 and 22
62
+ # characters and contain only alphanumeric characters.
63
+ statement_descriptor: nil,
48
64
  request_options: {}
49
65
  )
50
66
  end
@@ -56,6 +72,8 @@ module WhopSDK
56
72
  company_id: String,
57
73
  currency: WhopSDK::Currency::OrSymbol,
58
74
  payout_method_id: T.nilable(String),
75
+ platform_covers_fees: T.nilable(T::Boolean),
76
+ statement_descriptor: T.nilable(String),
59
77
  request_options: WhopSDK::RequestOptions
60
78
  }
61
79
  )
@@ -103,10 +103,6 @@ module WhopSDK
103
103
  sig { returns(T.nilable(String)) }
104
104
  attr_accessor :trace_code
105
105
 
106
- # The type of withdrawal.
107
- sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) }
108
- attr_accessor :withdrawal_type
109
-
110
106
  # A withdrawal request.
111
107
  sig do
112
108
  params(
@@ -131,8 +127,7 @@ module WhopSDK
131
127
  ),
132
128
  speed: WhopSDK::WithdrawalSpeeds::OrSymbol,
133
129
  status: WhopSDK::WithdrawalStatus::OrSymbol,
134
- trace_code: T.nilable(String),
135
- withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol
130
+ trace_code: T.nilable(String)
136
131
  ).returns(T.attached_class)
137
132
  end
138
133
  def self.new(
@@ -169,9 +164,7 @@ module WhopSDK
169
164
  status:,
170
165
  # The trace code for the payout, if applicable. Provided on ACH transactions when
171
166
  # available.
172
- trace_code:,
173
- # The type of withdrawal.
174
- withdrawal_type:
167
+ trace_code:
175
168
  )
176
169
  end
177
170
 
@@ -197,8 +190,7 @@ module WhopSDK
197
190
  T.nilable(WhopSDK::Models::WithdrawalCreateResponse::PayoutToken),
198
191
  speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol,
199
192
  status: WhopSDK::WithdrawalStatus::TaggedSymbol,
200
- trace_code: T.nilable(String),
201
- withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol
193
+ trace_code: T.nilable(String)
202
194
  }
203
195
  )
204
196
  end
@@ -340,6 +332,11 @@ module WhopSDK
340
332
  :invalid_beneficiary,
341
333
  WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
342
334
  )
335
+ INVALID_MAILING_ADDRESS =
336
+ T.let(
337
+ :invalid_mailing_address,
338
+ WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
339
+ )
343
340
  INVALID_BRANCH_NUMBER =
344
341
  T.let(
345
342
  :invalid_branch_number,
@@ -184,10 +184,6 @@ module WhopSDK
184
184
  sig { returns(T.nilable(String)) }
185
185
  attr_accessor :trace_code
186
186
 
187
- # The type of withdrawal.
188
- sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) }
189
- attr_accessor :withdrawal_type
190
-
191
187
  # A withdrawal request.
192
188
  sig do
193
189
  params(
@@ -212,8 +208,7 @@ module WhopSDK
212
208
  ),
213
209
  speed: WhopSDK::WithdrawalSpeeds::OrSymbol,
214
210
  status: WhopSDK::WithdrawalStatus::OrSymbol,
215
- trace_code: T.nilable(String),
216
- withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol
211
+ trace_code: T.nilable(String)
217
212
  ).returns(T.attached_class)
218
213
  end
219
214
  def self.new(
@@ -250,9 +245,7 @@ module WhopSDK
250
245
  status:,
251
246
  # The trace code for the payout, if applicable. Provided on ACH transactions when
252
247
  # available.
253
- trace_code:,
254
- # The type of withdrawal.
255
- withdrawal_type:
248
+ trace_code:
256
249
  )
257
250
  end
258
251
 
@@ -280,8 +273,7 @@ module WhopSDK
280
273
  ),
281
274
  speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol,
282
275
  status: WhopSDK::WithdrawalStatus::TaggedSymbol,
283
- trace_code: T.nilable(String),
284
- withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol
276
+ trace_code: T.nilable(String)
285
277
  }
286
278
  )
287
279
  end
@@ -426,6 +418,11 @@ module WhopSDK
426
418
  :invalid_beneficiary,
427
419
  WhopSDK::WithdrawalCreatedWebhookEvent::Data::ErrorCode::TaggedSymbol
428
420
  )
421
+ INVALID_MAILING_ADDRESS =
422
+ T.let(
423
+ :invalid_mailing_address,
424
+ WhopSDK::WithdrawalCreatedWebhookEvent::Data::ErrorCode::TaggedSymbol
425
+ )
429
426
  INVALID_BRANCH_NUMBER =
430
427
  T.let(
431
428
  :invalid_branch_number,
@@ -50,10 +50,6 @@ module WhopSDK
50
50
  sig { returns(WhopSDK::WithdrawalStatus::TaggedSymbol) }
51
51
  attr_accessor :status
52
52
 
53
- # The type of withdrawal.
54
- sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) }
55
- attr_accessor :withdrawal_type
56
-
57
53
  # A withdrawal request.
58
54
  sig do
59
55
  params(
@@ -65,8 +61,7 @@ module WhopSDK
65
61
  fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::OrSymbol),
66
62
  markup_fee: Float,
67
63
  speed: WhopSDK::WithdrawalSpeeds::OrSymbol,
68
- status: WhopSDK::WithdrawalStatus::OrSymbol,
69
- withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol
64
+ status: WhopSDK::WithdrawalStatus::OrSymbol
70
65
  ).returns(T.attached_class)
71
66
  end
72
67
  def self.new(
@@ -90,9 +85,7 @@ module WhopSDK
90
85
  # The speed of the withdrawal.
91
86
  speed:,
92
87
  # Status of the withdrawal.
93
- status:,
94
- # The type of withdrawal.
95
- withdrawal_type:
88
+ status:
96
89
  )
97
90
  end
98
91
 
@@ -107,8 +100,7 @@ module WhopSDK
107
100
  fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::TaggedSymbol),
108
101
  markup_fee: Float,
109
102
  speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol,
110
- status: WhopSDK::WithdrawalStatus::TaggedSymbol,
111
- withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol
103
+ status: WhopSDK::WithdrawalStatus::TaggedSymbol
112
104
  }
113
105
  )
114
106
  end
@@ -105,10 +105,6 @@ module WhopSDK
105
105
  sig { returns(T.nilable(String)) }
106
106
  attr_accessor :trace_code
107
107
 
108
- # The type of withdrawal.
109
- sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) }
110
- attr_accessor :withdrawal_type
111
-
112
108
  # A withdrawal request.
113
109
  sig do
114
110
  params(
@@ -133,8 +129,7 @@ module WhopSDK
133
129
  ),
134
130
  speed: WhopSDK::WithdrawalSpeeds::OrSymbol,
135
131
  status: WhopSDK::WithdrawalStatus::OrSymbol,
136
- trace_code: T.nilable(String),
137
- withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol
132
+ trace_code: T.nilable(String)
138
133
  ).returns(T.attached_class)
139
134
  end
140
135
  def self.new(
@@ -171,9 +166,7 @@ module WhopSDK
171
166
  status:,
172
167
  # The trace code for the payout, if applicable. Provided on ACH transactions when
173
168
  # available.
174
- trace_code:,
175
- # The type of withdrawal.
176
- withdrawal_type:
169
+ trace_code:
177
170
  )
178
171
  end
179
172
 
@@ -201,8 +194,7 @@ module WhopSDK
201
194
  ),
202
195
  speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol,
203
196
  status: WhopSDK::WithdrawalStatus::TaggedSymbol,
204
- trace_code: T.nilable(String),
205
- withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol
197
+ trace_code: T.nilable(String)
206
198
  }
207
199
  )
208
200
  end
@@ -347,6 +339,11 @@ module WhopSDK
347
339
  :invalid_beneficiary,
348
340
  WhopSDK::Models::WithdrawalRetrieveResponse::ErrorCode::TaggedSymbol
349
341
  )
342
+ INVALID_MAILING_ADDRESS =
343
+ T.let(
344
+ :invalid_mailing_address,
345
+ WhopSDK::Models::WithdrawalRetrieveResponse::ErrorCode::TaggedSymbol
346
+ )
350
347
  INVALID_BRANCH_NUMBER =
351
348
  T.let(
352
349
  :invalid_branch_number,
@@ -184,10 +184,6 @@ module WhopSDK
184
184
  sig { returns(T.nilable(String)) }
185
185
  attr_accessor :trace_code
186
186
 
187
- # The type of withdrawal.
188
- sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) }
189
- attr_accessor :withdrawal_type
190
-
191
187
  # A withdrawal request.
192
188
  sig do
193
189
  params(
@@ -212,8 +208,7 @@ module WhopSDK
212
208
  ),
213
209
  speed: WhopSDK::WithdrawalSpeeds::OrSymbol,
214
210
  status: WhopSDK::WithdrawalStatus::OrSymbol,
215
- trace_code: T.nilable(String),
216
- withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol
211
+ trace_code: T.nilable(String)
217
212
  ).returns(T.attached_class)
218
213
  end
219
214
  def self.new(
@@ -250,9 +245,7 @@ module WhopSDK
250
245
  status:,
251
246
  # The trace code for the payout, if applicable. Provided on ACH transactions when
252
247
  # available.
253
- trace_code:,
254
- # The type of withdrawal.
255
- withdrawal_type:
248
+ trace_code:
256
249
  )
257
250
  end
258
251
 
@@ -280,8 +273,7 @@ module WhopSDK
280
273
  ),
281
274
  speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol,
282
275
  status: WhopSDK::WithdrawalStatus::TaggedSymbol,
283
- trace_code: T.nilable(String),
284
- withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol
276
+ trace_code: T.nilable(String)
285
277
  }
286
278
  )
287
279
  end
@@ -426,6 +418,11 @@ module WhopSDK
426
418
  :invalid_beneficiary,
427
419
  WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
428
420
  )
421
+ INVALID_MAILING_ADDRESS =
422
+ T.let(
423
+ :invalid_mailing_address,
424
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
425
+ )
429
426
  INVALID_BRANCH_NUMBER =
430
427
  T.let(
431
428
  :invalid_branch_number,