whop_sdk 0.0.17 → 0.0.18

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.
@@ -11,7 +11,10 @@ module WhopSDK
11
11
  T.any(
12
12
  WhopSDK::Models::PaymentMethodRetrieveResponse::BasePaymentMethod,
13
13
  WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod,
14
- WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod
14
+ WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod,
15
+ WhopSDK::Models::PaymentMethodRetrieveResponse::CashappPaymentMethod,
16
+ WhopSDK::Models::PaymentMethodRetrieveResponse::IdealPaymentMethod,
17
+ WhopSDK::Models::PaymentMethodRetrieveResponse::SepaDebitPaymentMethod
15
18
  )
16
19
  end
17
20
 
@@ -347,6 +350,393 @@ module WhopSDK
347
350
  end
348
351
  end
349
352
 
353
+ class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel
354
+ OrHash =
355
+ T.type_alias do
356
+ T.any(
357
+ WhopSDK::Models::PaymentMethodRetrieveResponse::CashappPaymentMethod,
358
+ WhopSDK::Internal::AnyHash
359
+ )
360
+ end
361
+
362
+ # The ID of the payment method
363
+ sig { returns(String) }
364
+ attr_accessor :id
365
+
366
+ # The Cash App details associated with this payment method
367
+ sig do
368
+ returns(
369
+ WhopSDK::Models::PaymentMethodRetrieveResponse::CashappPaymentMethod::Cashapp
370
+ )
371
+ end
372
+ attr_reader :cashapp
373
+
374
+ sig do
375
+ params(
376
+ cashapp:
377
+ WhopSDK::Models::PaymentMethodRetrieveResponse::CashappPaymentMethod::Cashapp::OrHash
378
+ ).void
379
+ end
380
+ attr_writer :cashapp
381
+
382
+ # When the payment method was created
383
+ sig { returns(Time) }
384
+ attr_accessor :created_at
385
+
386
+ # The type of the payment method
387
+ sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
388
+ attr_accessor :payment_method_type
389
+
390
+ # The typename of this object
391
+ sig { returns(Symbol) }
392
+ attr_accessor :typename
393
+
394
+ # The Cash App details for the payment method
395
+ sig do
396
+ params(
397
+ id: String,
398
+ cashapp:
399
+ WhopSDK::Models::PaymentMethodRetrieveResponse::CashappPaymentMethod::Cashapp::OrHash,
400
+ created_at: Time,
401
+ payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol,
402
+ typename: Symbol
403
+ ).returns(T.attached_class)
404
+ end
405
+ def self.new(
406
+ # The ID of the payment method
407
+ id:,
408
+ # The Cash App details associated with this payment method
409
+ cashapp:,
410
+ # When the payment method was created
411
+ created_at:,
412
+ # The type of the payment method
413
+ payment_method_type:,
414
+ # The typename of this object
415
+ typename: :CashappPaymentMethod
416
+ )
417
+ end
418
+
419
+ sig do
420
+ override.returns(
421
+ {
422
+ id: String,
423
+ cashapp:
424
+ WhopSDK::Models::PaymentMethodRetrieveResponse::CashappPaymentMethod::Cashapp,
425
+ created_at: Time,
426
+ payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol,
427
+ typename: Symbol
428
+ }
429
+ )
430
+ end
431
+ def to_hash
432
+ end
433
+
434
+ class Cashapp < WhopSDK::Internal::Type::BaseModel
435
+ OrHash =
436
+ T.type_alias do
437
+ T.any(
438
+ WhopSDK::Models::PaymentMethodRetrieveResponse::CashappPaymentMethod::Cashapp,
439
+ WhopSDK::Internal::AnyHash
440
+ )
441
+ end
442
+
443
+ # A unique and immutable identifier assigned by Cash App to every buyer.
444
+ sig { returns(T.nilable(String)) }
445
+ attr_accessor :buyer_id
446
+
447
+ # A public identifier for buyers using Cash App.
448
+ sig { returns(T.nilable(String)) }
449
+ attr_accessor :cashtag
450
+
451
+ # The Cash App details associated with this payment method
452
+ sig do
453
+ params(
454
+ buyer_id: T.nilable(String),
455
+ cashtag: T.nilable(String)
456
+ ).returns(T.attached_class)
457
+ end
458
+ def self.new(
459
+ # A unique and immutable identifier assigned by Cash App to every buyer.
460
+ buyer_id:,
461
+ # A public identifier for buyers using Cash App.
462
+ cashtag:
463
+ )
464
+ end
465
+
466
+ sig do
467
+ override.returns(
468
+ { buyer_id: T.nilable(String), cashtag: T.nilable(String) }
469
+ )
470
+ end
471
+ def to_hash
472
+ end
473
+ end
474
+ end
475
+
476
+ class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel
477
+ OrHash =
478
+ T.type_alias do
479
+ T.any(
480
+ WhopSDK::Models::PaymentMethodRetrieveResponse::IdealPaymentMethod,
481
+ WhopSDK::Internal::AnyHash
482
+ )
483
+ end
484
+
485
+ # The ID of the payment method
486
+ sig { returns(String) }
487
+ attr_accessor :id
488
+
489
+ # When the payment method was created
490
+ sig { returns(Time) }
491
+ attr_accessor :created_at
492
+
493
+ # The iDEAL details associated with this payment method
494
+ sig do
495
+ returns(
496
+ WhopSDK::Models::PaymentMethodRetrieveResponse::IdealPaymentMethod::Ideal
497
+ )
498
+ end
499
+ attr_reader :ideal
500
+
501
+ sig do
502
+ params(
503
+ ideal:
504
+ WhopSDK::Models::PaymentMethodRetrieveResponse::IdealPaymentMethod::Ideal::OrHash
505
+ ).void
506
+ end
507
+ attr_writer :ideal
508
+
509
+ # The type of the payment method
510
+ sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
511
+ attr_accessor :payment_method_type
512
+
513
+ # The typename of this object
514
+ sig { returns(Symbol) }
515
+ attr_accessor :typename
516
+
517
+ # The iDEAL details for the payment method
518
+ sig do
519
+ params(
520
+ id: String,
521
+ created_at: Time,
522
+ ideal:
523
+ WhopSDK::Models::PaymentMethodRetrieveResponse::IdealPaymentMethod::Ideal::OrHash,
524
+ payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol,
525
+ typename: Symbol
526
+ ).returns(T.attached_class)
527
+ end
528
+ def self.new(
529
+ # The ID of the payment method
530
+ id:,
531
+ # When the payment method was created
532
+ created_at:,
533
+ # The iDEAL details associated with this payment method
534
+ ideal:,
535
+ # The type of the payment method
536
+ payment_method_type:,
537
+ # The typename of this object
538
+ typename: :IdealPaymentMethod
539
+ )
540
+ end
541
+
542
+ sig do
543
+ override.returns(
544
+ {
545
+ id: String,
546
+ created_at: Time,
547
+ ideal:
548
+ WhopSDK::Models::PaymentMethodRetrieveResponse::IdealPaymentMethod::Ideal,
549
+ payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol,
550
+ typename: Symbol
551
+ }
552
+ )
553
+ end
554
+ def to_hash
555
+ end
556
+
557
+ class Ideal < WhopSDK::Internal::Type::BaseModel
558
+ OrHash =
559
+ T.type_alias do
560
+ T.any(
561
+ WhopSDK::Models::PaymentMethodRetrieveResponse::IdealPaymentMethod::Ideal,
562
+ WhopSDK::Internal::AnyHash
563
+ )
564
+ end
565
+
566
+ # The customer's bank.
567
+ sig { returns(T.nilable(String)) }
568
+ attr_accessor :bank
569
+
570
+ # The Bank Identifier Code of the customer's bank.
571
+ sig { returns(T.nilable(String)) }
572
+ attr_accessor :bic
573
+
574
+ # The iDEAL details associated with this payment method
575
+ sig do
576
+ params(bank: T.nilable(String), bic: T.nilable(String)).returns(
577
+ T.attached_class
578
+ )
579
+ end
580
+ def self.new(
581
+ # The customer's bank.
582
+ bank:,
583
+ # The Bank Identifier Code of the customer's bank.
584
+ bic:
585
+ )
586
+ end
587
+
588
+ sig do
589
+ override.returns(
590
+ { bank: T.nilable(String), bic: T.nilable(String) }
591
+ )
592
+ end
593
+ def to_hash
594
+ end
595
+ end
596
+ end
597
+
598
+ class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel
599
+ OrHash =
600
+ T.type_alias do
601
+ T.any(
602
+ WhopSDK::Models::PaymentMethodRetrieveResponse::SepaDebitPaymentMethod,
603
+ WhopSDK::Internal::AnyHash
604
+ )
605
+ end
606
+
607
+ # The ID of the payment method
608
+ sig { returns(String) }
609
+ attr_accessor :id
610
+
611
+ # When the payment method was created
612
+ sig { returns(Time) }
613
+ attr_accessor :created_at
614
+
615
+ # The type of the payment method
616
+ sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
617
+ attr_accessor :payment_method_type
618
+
619
+ # The SEPA Direct Debit details associated with this payment method
620
+ sig do
621
+ returns(
622
+ WhopSDK::Models::PaymentMethodRetrieveResponse::SepaDebitPaymentMethod::SepaDebit
623
+ )
624
+ end
625
+ attr_reader :sepa_debit
626
+
627
+ sig do
628
+ params(
629
+ sepa_debit:
630
+ WhopSDK::Models::PaymentMethodRetrieveResponse::SepaDebitPaymentMethod::SepaDebit::OrHash
631
+ ).void
632
+ end
633
+ attr_writer :sepa_debit
634
+
635
+ # The typename of this object
636
+ sig { returns(Symbol) }
637
+ attr_accessor :typename
638
+
639
+ # The SEPA Direct Debit details for the payment method
640
+ sig do
641
+ params(
642
+ id: String,
643
+ created_at: Time,
644
+ payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol,
645
+ sepa_debit:
646
+ WhopSDK::Models::PaymentMethodRetrieveResponse::SepaDebitPaymentMethod::SepaDebit::OrHash,
647
+ typename: Symbol
648
+ ).returns(T.attached_class)
649
+ end
650
+ def self.new(
651
+ # The ID of the payment method
652
+ id:,
653
+ # When the payment method was created
654
+ created_at:,
655
+ # The type of the payment method
656
+ payment_method_type:,
657
+ # The SEPA Direct Debit details associated with this payment method
658
+ sepa_debit:,
659
+ # The typename of this object
660
+ typename: :SepaDebitPaymentMethod
661
+ )
662
+ end
663
+
664
+ sig do
665
+ override.returns(
666
+ {
667
+ id: String,
668
+ created_at: Time,
669
+ payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol,
670
+ sepa_debit:
671
+ WhopSDK::Models::PaymentMethodRetrieveResponse::SepaDebitPaymentMethod::SepaDebit,
672
+ typename: Symbol
673
+ }
674
+ )
675
+ end
676
+ def to_hash
677
+ end
678
+
679
+ class SepaDebit < WhopSDK::Internal::Type::BaseModel
680
+ OrHash =
681
+ T.type_alias do
682
+ T.any(
683
+ WhopSDK::Models::PaymentMethodRetrieveResponse::SepaDebitPaymentMethod::SepaDebit,
684
+ WhopSDK::Internal::AnyHash
685
+ )
686
+ end
687
+
688
+ # Bank code of the bank associated with the account.
689
+ sig { returns(T.nilable(String)) }
690
+ attr_accessor :bank_code
691
+
692
+ # Branch code of the bank associated with the account.
693
+ sig { returns(T.nilable(String)) }
694
+ attr_accessor :branch_code
695
+
696
+ # Two-letter ISO code representing the country the bank account is located in.
697
+ sig { returns(T.nilable(String)) }
698
+ attr_accessor :country
699
+
700
+ # Last four digits of the IBAN.
701
+ sig { returns(T.nilable(String)) }
702
+ attr_accessor :last4
703
+
704
+ # The SEPA Direct Debit details associated with this payment method
705
+ sig do
706
+ params(
707
+ bank_code: T.nilable(String),
708
+ branch_code: T.nilable(String),
709
+ country: T.nilable(String),
710
+ last4: T.nilable(String)
711
+ ).returns(T.attached_class)
712
+ end
713
+ def self.new(
714
+ # Bank code of the bank associated with the account.
715
+ bank_code:,
716
+ # Branch code of the bank associated with the account.
717
+ branch_code:,
718
+ # Two-letter ISO code representing the country the bank account is located in.
719
+ country:,
720
+ # Last four digits of the IBAN.
721
+ last4:
722
+ )
723
+ end
724
+
725
+ sig do
726
+ override.returns(
727
+ {
728
+ bank_code: T.nilable(String),
729
+ branch_code: T.nilable(String),
730
+ country: T.nilable(String),
731
+ last4: T.nilable(String)
732
+ }
733
+ )
734
+ end
735
+ def to_hash
736
+ end
737
+ end
738
+ end
739
+
350
740
  sig do
351
741
  override.returns(
352
742
  T::Array[WhopSDK::Models::PaymentMethodRetrieveResponse::Variants]
@@ -65,6 +65,13 @@ module WhopSDK
65
65
  sig do
66
66
  params(
67
67
  id: String,
68
+ banner_image:
69
+ T.nilable(
70
+ T.any(
71
+ WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID::OrHash,
72
+ WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID::OrHash
73
+ )
74
+ ),
68
75
  logo:
69
76
  T.nilable(
70
77
  T.any(
@@ -80,6 +87,8 @@ module WhopSDK
80
87
  def update(
81
88
  # The ID of the company to update
82
89
  id,
90
+ # The banner image for the company in png or jpeg format
91
+ banner_image: nil,
83
92
  # The logo for the company in png, jpeg, or gif format
84
93
  logo: nil,
85
94
  # Whether Whop sends transactional emails to customers on behalf of this company.
@@ -8,6 +8,7 @@ module WhopSDK
8
8
  # Required permissions:
9
9
  #
10
10
  # - `company:balance:read`
11
+ # - `payout:account:read`
11
12
  sig do
12
13
  params(
13
14
  id: String,
@@ -2,6 +2,7 @@ module WhopSDK
2
2
  module Models
3
3
  type company_update_params =
4
4
  {
5
+ banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
5
6
  logo: WhopSDK::Models::CompanyUpdateParams::logo?,
6
7
  send_customer_emails: bool?,
7
8
  title: String?
@@ -12,6 +13,8 @@ module WhopSDK
12
13
  extend WhopSDK::Internal::Type::RequestParameters::Converter
13
14
  include WhopSDK::Internal::Type::RequestParameters
14
15
 
16
+ attr_accessor banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?
17
+
15
18
  attr_accessor logo: WhopSDK::Models::CompanyUpdateParams::logo?
16
19
 
17
20
  attr_accessor send_customer_emails: bool?
@@ -19,6 +22,7 @@ module WhopSDK
19
22
  attr_accessor title: String?
20
23
 
21
24
  def initialize: (
25
+ ?banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
22
26
  ?logo: WhopSDK::Models::CompanyUpdateParams::logo?,
23
27
  ?send_customer_emails: bool?,
24
28
  ?title: String?,
@@ -26,12 +30,44 @@ module WhopSDK
26
30
  ) -> void
27
31
 
28
32
  def to_hash: -> {
33
+ banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
29
34
  logo: WhopSDK::Models::CompanyUpdateParams::logo?,
30
35
  send_customer_emails: bool?,
31
36
  title: String?,
32
37
  request_options: WhopSDK::RequestOptions
33
38
  }
34
39
 
40
+ type banner_image =
41
+ WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID
42
+ | WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID
43
+
44
+ module BannerImage
45
+ extend WhopSDK::Internal::Type::Union
46
+
47
+ type attachment_input_with_direct_upload_id =
48
+ { direct_upload_id: String }
49
+
50
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
51
+ attr_accessor direct_upload_id: String
52
+
53
+ def initialize: (direct_upload_id: String) -> void
54
+
55
+ def to_hash: -> { direct_upload_id: String }
56
+ end
57
+
58
+ type attachment_input_with_id = { id: String }
59
+
60
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
61
+ attr_accessor id: String
62
+
63
+ def initialize: (id: String) -> void
64
+
65
+ def to_hash: -> { id: String }
66
+ end
67
+
68
+ def self?.variants: -> ::Array[WhopSDK::Models::CompanyUpdateParams::banner_image]
69
+ end
70
+
35
71
  type logo =
36
72
  WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID
37
73
  | WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID
@@ -8,6 +8,7 @@ module WhopSDK
8
8
  ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_type,
9
9
  owner: WhopSDK::Models::LedgerAccountRetrieveResponse::owner?,
10
10
  payments_approval_status: WhopSDK::Models::LedgerAccountRetrieveResponse::payments_approval_status?,
11
+ payout_account_details: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails?,
11
12
  transfer_fee: Float?
12
13
  }
13
14
 
@@ -24,6 +25,8 @@ module WhopSDK
24
25
 
25
26
  attr_accessor payments_approval_status: WhopSDK::Models::LedgerAccountRetrieveResponse::payments_approval_status?
26
27
 
28
+ attr_accessor payout_account_details: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails?
29
+
27
30
  attr_accessor transfer_fee: Float?
28
31
 
29
32
  def initialize: (
@@ -33,6 +36,7 @@ module WhopSDK
33
36
  ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_type,
34
37
  owner: WhopSDK::Models::LedgerAccountRetrieveResponse::owner?,
35
38
  payments_approval_status: WhopSDK::Models::LedgerAccountRetrieveResponse::payments_approval_status?,
39
+ payout_account_details: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails?,
36
40
  transfer_fee: Float?
37
41
  ) -> void
38
42
 
@@ -43,6 +47,7 @@ module WhopSDK
43
47
  ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_type,
44
48
  owner: WhopSDK::Models::LedgerAccountRetrieveResponse::owner?,
45
49
  payments_approval_status: WhopSDK::Models::LedgerAccountRetrieveResponse::payments_approval_status?,
50
+ payout_account_details: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails?,
46
51
  transfer_fee: Float?
47
52
  }
48
53
 
@@ -199,6 +204,103 @@ module WhopSDK
199
204
 
200
205
  def self?.values: -> ::Array[WhopSDK::Models::LedgerAccountRetrieveResponse::payments_approval_status]
201
206
  end
207
+
208
+ type payout_account_details =
209
+ {
210
+ id: String,
211
+ address: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address?,
212
+ business_name: String?,
213
+ business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative?
214
+ }
215
+
216
+ class PayoutAccountDetails < WhopSDK::Internal::Type::BaseModel
217
+ attr_accessor id: String
218
+
219
+ attr_accessor address: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address?
220
+
221
+ attr_accessor business_name: String?
222
+
223
+ attr_accessor business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative?
224
+
225
+ def initialize: (
226
+ id: String,
227
+ address: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address?,
228
+ business_name: String?,
229
+ business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative?
230
+ ) -> void
231
+
232
+ def to_hash: -> {
233
+ id: String,
234
+ address: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address?,
235
+ business_name: String?,
236
+ business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative?
237
+ }
238
+
239
+ type address =
240
+ {
241
+ city: String?,
242
+ country: String?,
243
+ :line1 => String?,
244
+ :line2 => String?,
245
+ postal_code: String?,
246
+ state: String?
247
+ }
248
+
249
+ class Address < WhopSDK::Internal::Type::BaseModel
250
+ attr_accessor city: String?
251
+
252
+ attr_accessor country: String?
253
+
254
+ attr_accessor line1: String?
255
+
256
+ attr_accessor line2: String?
257
+
258
+ attr_accessor postal_code: String?
259
+
260
+ attr_accessor state: String?
261
+
262
+ def initialize: (
263
+ city: String?,
264
+ country: String?,
265
+ line1: String?,
266
+ line2: String?,
267
+ postal_code: String?,
268
+ state: String?
269
+ ) -> void
270
+
271
+ def to_hash: -> {
272
+ city: String?,
273
+ country: String?,
274
+ :line1 => String?,
275
+ :line2 => String?,
276
+ postal_code: String?,
277
+ state: String?
278
+ }
279
+ end
280
+
281
+ type business_representative =
282
+ { first_name: String?, last_name: String?, middle_name: String? }
283
+
284
+ class BusinessRepresentative < WhopSDK::Internal::Type::BaseModel
285
+ attr_accessor first_name: String?
286
+
287
+ attr_accessor last_name: String?
288
+
289
+ attr_accessor middle_name: String?
290
+
291
+ def initialize: (
292
+ first_name: String?,
293
+ last_name: String?,
294
+ middle_name: String?
295
+ ) -> void
296
+
297
+ def to_hash: -> {
298
+ first_name: String?,
299
+ last_name: String?,
300
+ middle_name: String?
301
+ }
302
+ end
303
+ end
202
304
  end
203
305
  end
204
306
  end