whop_sdk 0.0.11 → 0.0.12

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
  5. data/lib/whop_sdk/models/plan.rb +9 -1
  6. data/lib/whop_sdk/models/plan_create_params.rb +9 -1
  7. data/lib/whop_sdk/models/plan_list_response.rb +9 -1
  8. data/lib/whop_sdk/models/product_create_params.rb +2 -2
  9. data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
  10. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +309 -0
  11. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +111 -166
  12. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +309 -0
  13. data/lib/whop_sdk/models.rb +4 -0
  14. data/lib/whop_sdk/resources/plans.rb +3 -1
  15. data/lib/whop_sdk/resources/products.rb +1 -1
  16. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  17. data/lib/whop_sdk/version.rb +1 -1
  18. data/lib/whop_sdk.rb +2 -0
  19. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
  20. data/rbi/whop_sdk/models/plan.rbi +8 -0
  21. data/rbi/whop_sdk/models/plan_create_params.rbi +8 -0
  22. data/rbi/whop_sdk/models/plan_list_response.rbi +8 -0
  23. data/rbi/whop_sdk/models/product_create_params.rbi +2 -2
  24. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +2 -0
  25. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +633 -0
  26. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +326 -480
  27. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +633 -0
  28. data/rbi/whop_sdk/models.rbi +4 -0
  29. data/rbi/whop_sdk/resources/plans.rbi +3 -0
  30. data/rbi/whop_sdk/resources/products.rbi +1 -1
  31. data/rbi/whop_sdk/resources/webhooks.rbi +2 -0
  32. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
  33. data/sig/whop_sdk/models/plan.rbs +5 -0
  34. data/sig/whop_sdk/models/plan_create_params.rbs +5 -0
  35. data/sig/whop_sdk/models/plan_list_response.rbs +5 -0
  36. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  37. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +275 -0
  38. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +132 -191
  39. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +275 -0
  40. data/sig/whop_sdk/models.rbs +4 -0
  41. data/sig/whop_sdk/resources/plans.rbs +1 -0
  42. data/sig/whop_sdk/resources/webhooks.rbs +2 -0
  43. metadata +8 -2
@@ -0,0 +1,633 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class WithdrawalUpdatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::WithdrawalUpdatedWebhookEvent,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # A unique ID for every single webhook request
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # The API version for this webhook
19
+ sig { returns(Symbol) }
20
+ attr_accessor :api_version
21
+
22
+ # A withdrawal request.
23
+ sig { returns(WhopSDK::WithdrawalUpdatedWebhookEvent::Data) }
24
+ attr_reader :data
25
+
26
+ sig do
27
+ params(data: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::OrHash).void
28
+ end
29
+ attr_writer :data
30
+
31
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
32
+ sig { returns(Time) }
33
+ attr_accessor :timestamp
34
+
35
+ # The webhook event type
36
+ sig { returns(Symbol) }
37
+ attr_accessor :type
38
+
39
+ sig do
40
+ params(
41
+ id: String,
42
+ data: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::OrHash,
43
+ timestamp: Time,
44
+ api_version: Symbol,
45
+ type: Symbol
46
+ ).returns(T.attached_class)
47
+ end
48
+ def self.new(
49
+ # A unique ID for every single webhook request
50
+ id:,
51
+ # A withdrawal request.
52
+ data:,
53
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
54
+ timestamp:,
55
+ # The API version for this webhook
56
+ api_version: :v1,
57
+ # The webhook event type
58
+ type: :"withdrawal.updated"
59
+ )
60
+ end
61
+
62
+ sig do
63
+ override.returns(
64
+ {
65
+ id: String,
66
+ api_version: Symbol,
67
+ data: WhopSDK::WithdrawalUpdatedWebhookEvent::Data,
68
+ timestamp: Time,
69
+ type: Symbol
70
+ }
71
+ )
72
+ end
73
+ def to_hash
74
+ end
75
+
76
+ class Data < WhopSDK::Internal::Type::BaseModel
77
+ OrHash =
78
+ T.type_alias do
79
+ T.any(
80
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data,
81
+ WhopSDK::Internal::AnyHash
82
+ )
83
+ end
84
+
85
+ # Internal ID of the withdrawal request.
86
+ sig { returns(String) }
87
+ attr_accessor :id
88
+
89
+ # How much money was attempted to be withdrawn, in a float type.
90
+ sig { returns(Float) }
91
+ attr_accessor :amount
92
+
93
+ # When the withdrawal request was created.
94
+ sig { returns(Time) }
95
+ attr_accessor :created_at
96
+
97
+ # The currency of the withdrawal request.
98
+ sig { returns(WhopSDK::Currency::TaggedSymbol) }
99
+ attr_accessor :currency
100
+
101
+ # The different error codes a payout can be in.
102
+ sig do
103
+ returns(
104
+ T.nilable(
105
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
106
+ )
107
+ )
108
+ end
109
+ attr_accessor :error_code
110
+
111
+ # The error message for the withdrawal, if any.
112
+ sig { returns(T.nilable(String)) }
113
+ attr_accessor :error_message
114
+
115
+ # The estimated availability date for the withdrawal, if any.
116
+ sig { returns(T.nilable(Time)) }
117
+ attr_accessor :estimated_availability
118
+
119
+ # The fee amount that was charged for the withdrawal. This is in the same currency
120
+ # as the withdrawal amount.
121
+ sig { returns(Float) }
122
+ attr_accessor :fee_amount
123
+
124
+ # The different fee types for a withdrawal.
125
+ sig { returns(T.nilable(WhopSDK::WithdrawalFeeTypes::TaggedSymbol)) }
126
+ attr_accessor :fee_type
127
+
128
+ # The ledger account associated with the withdrawal.
129
+ sig do
130
+ returns(WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount)
131
+ end
132
+ attr_reader :ledger_account
133
+
134
+ sig do
135
+ params(
136
+ ledger_account:
137
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount::OrHash
138
+ ).void
139
+ end
140
+ attr_writer :ledger_account
141
+
142
+ # The payout token used for the withdrawal, if applicable.
143
+ sig do
144
+ returns(
145
+ T.nilable(WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken)
146
+ )
147
+ end
148
+ attr_reader :payout_token
149
+
150
+ sig do
151
+ params(
152
+ payout_token:
153
+ T.nilable(
154
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken::OrHash
155
+ )
156
+ ).void
157
+ end
158
+ attr_writer :payout_token
159
+
160
+ # The speed of the withdrawal.
161
+ sig { returns(WhopSDK::WithdrawalSpeeds::TaggedSymbol) }
162
+ attr_accessor :speed
163
+
164
+ # Status of the withdrawal.
165
+ sig { returns(WhopSDK::WithdrawalStatus::TaggedSymbol) }
166
+ attr_accessor :status
167
+
168
+ # The trace code for the payout, if applicable. Provided on ACH transactions when
169
+ # available.
170
+ sig { returns(T.nilable(String)) }
171
+ attr_accessor :trace_code
172
+
173
+ # The type of withdrawal.
174
+ sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) }
175
+ attr_accessor :withdrawal_type
176
+
177
+ # A withdrawal request.
178
+ sig do
179
+ params(
180
+ id: String,
181
+ amount: Float,
182
+ created_at: Time,
183
+ currency: WhopSDK::Currency::OrSymbol,
184
+ error_code:
185
+ T.nilable(
186
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::OrSymbol
187
+ ),
188
+ error_message: T.nilable(String),
189
+ estimated_availability: T.nilable(Time),
190
+ fee_amount: Float,
191
+ fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::OrSymbol),
192
+ ledger_account:
193
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount::OrHash,
194
+ payout_token:
195
+ T.nilable(
196
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken::OrHash
197
+ ),
198
+ speed: WhopSDK::WithdrawalSpeeds::OrSymbol,
199
+ status: WhopSDK::WithdrawalStatus::OrSymbol,
200
+ trace_code: T.nilable(String),
201
+ withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol
202
+ ).returns(T.attached_class)
203
+ end
204
+ def self.new(
205
+ # Internal ID of the withdrawal request.
206
+ id:,
207
+ # How much money was attempted to be withdrawn, in a float type.
208
+ amount:,
209
+ # When the withdrawal request was created.
210
+ created_at:,
211
+ # The currency of the withdrawal request.
212
+ currency:,
213
+ # The different error codes a payout can be in.
214
+ error_code:,
215
+ # The error message for the withdrawal, if any.
216
+ error_message:,
217
+ # The estimated availability date for the withdrawal, if any.
218
+ estimated_availability:,
219
+ # The fee amount that was charged for the withdrawal. This is in the same currency
220
+ # as the withdrawal amount.
221
+ fee_amount:,
222
+ # The different fee types for a withdrawal.
223
+ fee_type:,
224
+ # The ledger account associated with the withdrawal.
225
+ ledger_account:,
226
+ # The payout token used for the withdrawal, if applicable.
227
+ payout_token:,
228
+ # The speed of the withdrawal.
229
+ speed:,
230
+ # Status of the withdrawal.
231
+ status:,
232
+ # The trace code for the payout, if applicable. Provided on ACH transactions when
233
+ # available.
234
+ trace_code:,
235
+ # The type of withdrawal.
236
+ withdrawal_type:
237
+ )
238
+ end
239
+
240
+ sig do
241
+ override.returns(
242
+ {
243
+ id: String,
244
+ amount: Float,
245
+ created_at: Time,
246
+ currency: WhopSDK::Currency::TaggedSymbol,
247
+ error_code:
248
+ T.nilable(
249
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
250
+ ),
251
+ error_message: T.nilable(String),
252
+ estimated_availability: T.nilable(Time),
253
+ fee_amount: Float,
254
+ fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::TaggedSymbol),
255
+ ledger_account:
256
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount,
257
+ payout_token:
258
+ T.nilable(
259
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken
260
+ ),
261
+ speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol,
262
+ status: WhopSDK::WithdrawalStatus::TaggedSymbol,
263
+ trace_code: T.nilable(String),
264
+ withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol
265
+ }
266
+ )
267
+ end
268
+ def to_hash
269
+ end
270
+
271
+ # The different error codes a payout can be in.
272
+ module ErrorCode
273
+ extend WhopSDK::Internal::Type::Enum
274
+
275
+ TaggedSymbol =
276
+ T.type_alias do
277
+ T.all(
278
+ Symbol,
279
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode
280
+ )
281
+ end
282
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
283
+
284
+ ACCOUNT_CLOSED =
285
+ T.let(
286
+ :account_closed,
287
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
288
+ )
289
+ ACCOUNT_DOES_NOT_EXIST =
290
+ T.let(
291
+ :account_does_not_exist,
292
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
293
+ )
294
+ ACCOUNT_INFORMATION_INVALID =
295
+ T.let(
296
+ :account_information_invalid,
297
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
298
+ )
299
+ ACCOUNT_NUMBER_INVALID_REGION =
300
+ T.let(
301
+ :account_number_invalid_region,
302
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
303
+ )
304
+ ACCOUNT_FROZEN =
305
+ T.let(
306
+ :account_frozen,
307
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
308
+ )
309
+ ACCOUNT_LOOKUP_FAILED =
310
+ T.let(
311
+ :account_lookup_failed,
312
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
313
+ )
314
+ ACCOUNT_NOT_FOUND =
315
+ T.let(
316
+ :account_not_found,
317
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
318
+ )
319
+ AMOUNT_OUT_OF_BOUNDS =
320
+ T.let(
321
+ :amount_out_of_bounds,
322
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
323
+ )
324
+ ATTRIBUTES_NOT_VALIDATED =
325
+ T.let(
326
+ :attributes_not_validated,
327
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
328
+ )
329
+ B2B_PAYMENTS_PROHIBITED =
330
+ T.let(
331
+ :b2b_payments_prohibited,
332
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
333
+ )
334
+ BANK_STATEMENT_REQUIRED =
335
+ T.let(
336
+ :bank_statement_required,
337
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
338
+ )
339
+ COMPLIANCE_REVIEW =
340
+ T.let(
341
+ :compliance_review,
342
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
343
+ )
344
+ CURRENCY_NOT_SUPPORTED =
345
+ T.let(
346
+ :currency_not_supported,
347
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
348
+ )
349
+ DEPOSIT_CANCELED =
350
+ T.let(
351
+ :deposit_canceled,
352
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
353
+ )
354
+ DEPOSIT_FAILED =
355
+ T.let(
356
+ :deposit_failed,
357
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
358
+ )
359
+ DEPOSIT_REJECTED =
360
+ T.let(
361
+ :deposit_rejected,
362
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
363
+ )
364
+ DESTINATION_UNAVAILABLE =
365
+ T.let(
366
+ :destination_unavailable,
367
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
368
+ )
369
+ EXCEEDED_ACCOUNT_LIMIT =
370
+ T.let(
371
+ :exceeded_account_limit,
372
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
373
+ )
374
+ EXPIRED_QUOTE =
375
+ T.let(
376
+ :expired_quote,
377
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
378
+ )
379
+ GENERIC_PAYOUT_ERROR =
380
+ T.let(
381
+ :generic_payout_error,
382
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
383
+ )
384
+ TECHNICAL_PROBLEM =
385
+ T.let(
386
+ :technical_problem,
387
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
388
+ )
389
+ IDENTIFICATION_NUMBER_INVALID =
390
+ T.let(
391
+ :identification_number_invalid,
392
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
393
+ )
394
+ INVALID_ACCOUNT_NUMBER =
395
+ T.let(
396
+ :invalid_account_number,
397
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
398
+ )
399
+ INVALID_BANK_CODE =
400
+ T.let(
401
+ :invalid_bank_code,
402
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
403
+ )
404
+ INVALID_BENEFICIARY =
405
+ T.let(
406
+ :invalid_beneficiary,
407
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
408
+ )
409
+ INVALID_BRANCH_NUMBER =
410
+ T.let(
411
+ :invalid_branch_number,
412
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
413
+ )
414
+ INVALID_BRANCH_CODE =
415
+ T.let(
416
+ :invalid_branch_code,
417
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
418
+ )
419
+ INVALID_PHONE_NUMBER =
420
+ T.let(
421
+ :invalid_phone_number,
422
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
423
+ )
424
+ INVALID_ROUTING_NUMBER =
425
+ T.let(
426
+ :invalid_routing_number,
427
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
428
+ )
429
+ INVALID_SWIFT_CODE =
430
+ T.let(
431
+ :invalid_swift_code,
432
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
433
+ )
434
+ INVALID_COMPANY_DETAILS =
435
+ T.let(
436
+ :invalid_company_details,
437
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
438
+ )
439
+ MANUAL_CANCELATION =
440
+ T.let(
441
+ :manual_cancelation,
442
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
443
+ )
444
+ MISC_ERROR =
445
+ T.let(
446
+ :misc_error,
447
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
448
+ )
449
+ MISSING_CITY_AND_COUNTRY =
450
+ T.let(
451
+ :missing_city_and_country,
452
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
453
+ )
454
+ MISSING_PHONE_NUMBER =
455
+ T.let(
456
+ :missing_phone_number,
457
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
458
+ )
459
+ MISSING_REMITTANCE_INFO =
460
+ T.let(
461
+ :missing_remittance_info,
462
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
463
+ )
464
+ PAYEE_NAME_INVALID =
465
+ T.let(
466
+ :payee_name_invalid,
467
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
468
+ )
469
+ RECEIVING_ACCOUNT_LOCKED =
470
+ T.let(
471
+ :receiving_account_locked,
472
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
473
+ )
474
+ REJECTED_BY_COMPLIANCE =
475
+ T.let(
476
+ :rejected_by_compliance,
477
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
478
+ )
479
+ RTP_NOT_SUPPORTED =
480
+ T.let(
481
+ :rtp_not_supported,
482
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
483
+ )
484
+ NON_TRANSACTION_ACCOUNT =
485
+ T.let(
486
+ :non_transaction_account,
487
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
488
+ )
489
+ SOURCE_TOKEN_INSUFFICIENT_FUNDS =
490
+ T.let(
491
+ :source_token_insufficient_funds,
492
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
493
+ )
494
+ SSN_INVALID =
495
+ T.let(
496
+ :ssn_invalid,
497
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
498
+ )
499
+ WALLET_SCREENSHOT_REQUIRED =
500
+ T.let(
501
+ :wallet_screenshot_required,
502
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
503
+ )
504
+ UNSUPPORTED_REGION =
505
+ T.let(
506
+ :unsupported_region,
507
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
508
+ )
509
+
510
+ sig do
511
+ override.returns(
512
+ T::Array[
513
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol
514
+ ]
515
+ )
516
+ end
517
+ def self.values
518
+ end
519
+ end
520
+
521
+ class LedgerAccount < WhopSDK::Internal::Type::BaseModel
522
+ OrHash =
523
+ T.type_alias do
524
+ T.any(
525
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount,
526
+ WhopSDK::Internal::AnyHash
527
+ )
528
+ end
529
+
530
+ # The ID of the LedgerAccount.
531
+ sig { returns(String) }
532
+ attr_accessor :id
533
+
534
+ # The ID of the company associated with this ledger account.
535
+ sig { returns(T.nilable(String)) }
536
+ attr_accessor :company_id
537
+
538
+ # The ledger account associated with the withdrawal.
539
+ sig do
540
+ params(id: String, company_id: T.nilable(String)).returns(
541
+ T.attached_class
542
+ )
543
+ end
544
+ def self.new(
545
+ # The ID of the LedgerAccount.
546
+ id:,
547
+ # The ID of the company associated with this ledger account.
548
+ company_id:
549
+ )
550
+ end
551
+
552
+ sig do
553
+ override.returns({ id: String, company_id: T.nilable(String) })
554
+ end
555
+ def to_hash
556
+ end
557
+ end
558
+
559
+ class PayoutToken < WhopSDK::Internal::Type::BaseModel
560
+ OrHash =
561
+ T.type_alias do
562
+ T.any(
563
+ WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken,
564
+ WhopSDK::Internal::AnyHash
565
+ )
566
+ end
567
+
568
+ # The ID of the payout token
569
+ sig { returns(String) }
570
+ attr_accessor :id
571
+
572
+ # The date and time the payout token was created
573
+ sig { returns(Time) }
574
+ attr_accessor :created_at
575
+
576
+ # The currency code of the payout destination. This is the currency that payouts
577
+ # will be made in for this token.
578
+ sig { returns(String) }
579
+ attr_accessor :destination_currency_code
580
+
581
+ # An optional nickname for the payout token to help the user identify it. This is
582
+ # not used by the provider and is only for the user's reference.
583
+ sig { returns(T.nilable(String)) }
584
+ attr_accessor :nickname
585
+
586
+ # The name of the payer associated with the payout token.
587
+ sig { returns(T.nilable(String)) }
588
+ attr_accessor :payer_name
589
+
590
+ # The payout token used for the withdrawal, if applicable.
591
+ sig do
592
+ params(
593
+ id: String,
594
+ created_at: Time,
595
+ destination_currency_code: String,
596
+ nickname: T.nilable(String),
597
+ payer_name: T.nilable(String)
598
+ ).returns(T.attached_class)
599
+ end
600
+ def self.new(
601
+ # The ID of the payout token
602
+ id:,
603
+ # The date and time the payout token was created
604
+ created_at:,
605
+ # The currency code of the payout destination. This is the currency that payouts
606
+ # will be made in for this token.
607
+ destination_currency_code:,
608
+ # An optional nickname for the payout token to help the user identify it. This is
609
+ # not used by the provider and is only for the user's reference.
610
+ nickname:,
611
+ # The name of the payer associated with the payout token.
612
+ payer_name:
613
+ )
614
+ end
615
+
616
+ sig do
617
+ override.returns(
618
+ {
619
+ id: String,
620
+ created_at: Time,
621
+ destination_currency_code: String,
622
+ nickname: T.nilable(String),
623
+ payer_name: T.nilable(String)
624
+ }
625
+ )
626
+ end
627
+ def to_hash
628
+ end
629
+ end
630
+ end
631
+ end
632
+ end
633
+ end
@@ -487,6 +487,8 @@ module WhopSDK
487
487
 
488
488
  WhoCanReact = WhopSDK::Models::WhoCanReact
489
489
 
490
+ WithdrawalCreatedWebhookEvent = WhopSDK::Models::WithdrawalCreatedWebhookEvent
491
+
490
492
  WithdrawalFeeTypes = WhopSDK::Models::WithdrawalFeeTypes
491
493
 
492
494
  WithdrawalListParams = WhopSDK::Models::WithdrawalListParams
@@ -498,4 +500,6 @@ module WhopSDK
498
500
  WithdrawalStatus = WhopSDK::Models::WithdrawalStatus
499
501
 
500
502
  WithdrawalTypes = WhopSDK::Models::WithdrawalTypes
503
+
504
+ WithdrawalUpdatedWebhookEvent = WhopSDK::Models::WithdrawalUpdatedWebhookEvent
501
505
  end
@@ -37,6 +37,7 @@ module WhopSDK
37
37
  plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
38
38
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
39
39
  renewal_price: T.nilable(Float),
40
+ split_pay_required_payments: T.nilable(Integer),
40
41
  stock: T.nilable(Integer),
41
42
  title: T.nilable(String),
42
43
  trial_period_days: T.nilable(Integer),
@@ -81,6 +82,8 @@ module WhopSDK
81
82
  # The amount the customer is charged every billing period. Use only if a recurring
82
83
  # payment. Provided as a number in dollars. Eg: 10.43 for $10.43
83
84
  renewal_price: nil,
85
+ # The number of payments required before pausing the subscription.
86
+ split_pay_required_payments: nil,
84
87
  # The number of units available for purchase.
85
88
  stock: nil,
86
89
  # The title of the plan. This will be visible on the product page to customers.
@@ -44,7 +44,7 @@ module WhopSDK
44
44
  def create(
45
45
  # The ID of the company to create the product for.
46
46
  company_id:,
47
- # The title of the product.
47
+ # The title of the product. It must be max 40 characters.
48
48
  title:,
49
49
  # The different business types a company can be.
50
50
  business_type: nil,
@@ -19,6 +19,8 @@ module WhopSDK
19
19
  WhopSDK::SetupIntentRequiresActionWebhookEvent,
20
20
  WhopSDK::SetupIntentSucceededWebhookEvent,
21
21
  WhopSDK::SetupIntentCanceledWebhookEvent,
22
+ WhopSDK::WithdrawalCreatedWebhookEvent,
23
+ WhopSDK::WithdrawalUpdatedWebhookEvent,
22
24
  WhopSDK::CourseLessonInteractionCompletedWebhookEvent,
23
25
  WhopSDK::PaymentSucceededWebhookEvent,
24
26
  WhopSDK::PaymentFailedWebhookEvent,