whop_sdk 0.0.17 → 0.0.19
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/README.md +1 -1
- data/lib/whop_sdk/models/company_update_params.rb +61 -1
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +145 -1
- data/lib/whop_sdk/models/payment_created_webhook_event.rb +48 -0
- data/lib/whop_sdk/models/payment_method_list_response.rb +227 -1
- data/lib/whop_sdk/models/payment_method_retrieve_response.rb +229 -1
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +3 -1
- data/lib/whop_sdk/models.rb +2 -0
- data/lib/whop_sdk/resources/companies.rb +3 -1
- data/lib/whop_sdk/resources/ledger_accounts.rb +1 -0
- data/lib/whop_sdk/resources/payment_methods.rb +2 -2
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +1 -0
- data/rbi/whop_sdk/models/company_update_params.rbi +110 -0
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +270 -0
- data/rbi/whop_sdk/models/payment_created_webhook_event.rbi +72 -0
- data/rbi/whop_sdk/models/payment_method_list_response.rbi +391 -1
- data/rbi/whop_sdk/models/payment_method_retrieve_response.rbi +391 -1
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +1 -0
- data/rbi/whop_sdk/models.rbi +2 -0
- data/rbi/whop_sdk/resources/companies.rbi +9 -0
- data/rbi/whop_sdk/resources/ledger_accounts.rbi +1 -0
- data/rbi/whop_sdk/resources/webhooks.rbi +1 -0
- data/sig/whop_sdk/models/company_update_params.rbs +36 -0
- data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +107 -0
- data/sig/whop_sdk/models/payment_created_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/payment_method_list_response.rbs +170 -0
- data/sig/whop_sdk/models/payment_method_retrieve_response.rbs +170 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +1 -0
- data/sig/whop_sdk/models.rbs +2 -0
- data/sig/whop_sdk/resources/companies.rbs +1 -0
- data/sig/whop_sdk/resources/webhooks.rbs +1 -0
- metadata +5 -2
|
@@ -61,6 +61,26 @@ module WhopSDK
|
|
|
61
61
|
end
|
|
62
62
|
attr_accessor :payments_approval_status
|
|
63
63
|
|
|
64
|
+
# The payout account associated with the LedgerAccount, if any.
|
|
65
|
+
sig do
|
|
66
|
+
returns(
|
|
67
|
+
T.nilable(
|
|
68
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
attr_reader :payout_account_details
|
|
73
|
+
|
|
74
|
+
sig do
|
|
75
|
+
params(
|
|
76
|
+
payout_account_details:
|
|
77
|
+
T.nilable(
|
|
78
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::OrHash
|
|
79
|
+
)
|
|
80
|
+
).void
|
|
81
|
+
end
|
|
82
|
+
attr_writer :payout_account_details
|
|
83
|
+
|
|
64
84
|
# The fee for transfers, if applicable.
|
|
65
85
|
sig { returns(T.nilable(Float)) }
|
|
66
86
|
attr_accessor :transfer_fee
|
|
@@ -90,6 +110,10 @@ module WhopSDK
|
|
|
90
110
|
T.nilable(
|
|
91
111
|
WhopSDK::Models::LedgerAccountRetrieveResponse::PaymentsApprovalStatus::OrSymbol
|
|
92
112
|
),
|
|
113
|
+
payout_account_details:
|
|
114
|
+
T.nilable(
|
|
115
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::OrHash
|
|
116
|
+
),
|
|
93
117
|
transfer_fee: T.nilable(Float)
|
|
94
118
|
).returns(T.attached_class)
|
|
95
119
|
end
|
|
@@ -106,6 +130,8 @@ module WhopSDK
|
|
|
106
130
|
owner:,
|
|
107
131
|
# The different approval statuses an account can have.
|
|
108
132
|
payments_approval_status:,
|
|
133
|
+
# The payout account associated with the LedgerAccount, if any.
|
|
134
|
+
payout_account_details:,
|
|
109
135
|
# The fee for transfers, if applicable.
|
|
110
136
|
transfer_fee:
|
|
111
137
|
)
|
|
@@ -131,6 +157,10 @@ module WhopSDK
|
|
|
131
157
|
T.nilable(
|
|
132
158
|
WhopSDK::Models::LedgerAccountRetrieveResponse::PaymentsApprovalStatus::TaggedSymbol
|
|
133
159
|
),
|
|
160
|
+
payout_account_details:
|
|
161
|
+
T.nilable(
|
|
162
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails
|
|
163
|
+
),
|
|
134
164
|
transfer_fee: T.nilable(Float)
|
|
135
165
|
}
|
|
136
166
|
)
|
|
@@ -502,6 +532,246 @@ module WhopSDK
|
|
|
502
532
|
def self.values
|
|
503
533
|
end
|
|
504
534
|
end
|
|
535
|
+
|
|
536
|
+
class PayoutAccountDetails < WhopSDK::Internal::Type::BaseModel
|
|
537
|
+
OrHash =
|
|
538
|
+
T.type_alias do
|
|
539
|
+
T.any(
|
|
540
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails,
|
|
541
|
+
WhopSDK::Internal::AnyHash
|
|
542
|
+
)
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
# Unique identifier for the object
|
|
546
|
+
sig { returns(String) }
|
|
547
|
+
attr_accessor :id
|
|
548
|
+
|
|
549
|
+
# The physical address associated with this payout account
|
|
550
|
+
sig do
|
|
551
|
+
returns(
|
|
552
|
+
T.nilable(
|
|
553
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address
|
|
554
|
+
)
|
|
555
|
+
)
|
|
556
|
+
end
|
|
557
|
+
attr_reader :address
|
|
558
|
+
|
|
559
|
+
sig do
|
|
560
|
+
params(
|
|
561
|
+
address:
|
|
562
|
+
T.nilable(
|
|
563
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address::OrHash
|
|
564
|
+
)
|
|
565
|
+
).void
|
|
566
|
+
end
|
|
567
|
+
attr_writer :address
|
|
568
|
+
|
|
569
|
+
# The company's legal name
|
|
570
|
+
sig { returns(T.nilable(String)) }
|
|
571
|
+
attr_accessor :business_name
|
|
572
|
+
|
|
573
|
+
# The business representative for this payout account
|
|
574
|
+
sig do
|
|
575
|
+
returns(
|
|
576
|
+
T.nilable(
|
|
577
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative
|
|
578
|
+
)
|
|
579
|
+
)
|
|
580
|
+
end
|
|
581
|
+
attr_reader :business_representative
|
|
582
|
+
|
|
583
|
+
sig do
|
|
584
|
+
params(
|
|
585
|
+
business_representative:
|
|
586
|
+
T.nilable(
|
|
587
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative::OrHash
|
|
588
|
+
)
|
|
589
|
+
).void
|
|
590
|
+
end
|
|
591
|
+
attr_writer :business_representative
|
|
592
|
+
|
|
593
|
+
# The business representative's phone
|
|
594
|
+
sig { returns(T.nilable(String)) }
|
|
595
|
+
attr_accessor :phone
|
|
596
|
+
|
|
597
|
+
# The payout account associated with the LedgerAccount, if any.
|
|
598
|
+
sig do
|
|
599
|
+
params(
|
|
600
|
+
id: String,
|
|
601
|
+
address:
|
|
602
|
+
T.nilable(
|
|
603
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address::OrHash
|
|
604
|
+
),
|
|
605
|
+
business_name: T.nilable(String),
|
|
606
|
+
business_representative:
|
|
607
|
+
T.nilable(
|
|
608
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative::OrHash
|
|
609
|
+
),
|
|
610
|
+
phone: T.nilable(String)
|
|
611
|
+
).returns(T.attached_class)
|
|
612
|
+
end
|
|
613
|
+
def self.new(
|
|
614
|
+
# Unique identifier for the object
|
|
615
|
+
id:,
|
|
616
|
+
# The physical address associated with this payout account
|
|
617
|
+
address:,
|
|
618
|
+
# The company's legal name
|
|
619
|
+
business_name:,
|
|
620
|
+
# The business representative for this payout account
|
|
621
|
+
business_representative:,
|
|
622
|
+
# The business representative's phone
|
|
623
|
+
phone:
|
|
624
|
+
)
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
sig do
|
|
628
|
+
override.returns(
|
|
629
|
+
{
|
|
630
|
+
id: String,
|
|
631
|
+
address:
|
|
632
|
+
T.nilable(
|
|
633
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address
|
|
634
|
+
),
|
|
635
|
+
business_name: T.nilable(String),
|
|
636
|
+
business_representative:
|
|
637
|
+
T.nilable(
|
|
638
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative
|
|
639
|
+
),
|
|
640
|
+
phone: T.nilable(String)
|
|
641
|
+
}
|
|
642
|
+
)
|
|
643
|
+
end
|
|
644
|
+
def to_hash
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
class Address < WhopSDK::Internal::Type::BaseModel
|
|
648
|
+
OrHash =
|
|
649
|
+
T.type_alias do
|
|
650
|
+
T.any(
|
|
651
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address,
|
|
652
|
+
WhopSDK::Internal::AnyHash
|
|
653
|
+
)
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
# The city of the address.
|
|
657
|
+
sig { returns(T.nilable(String)) }
|
|
658
|
+
attr_accessor :city
|
|
659
|
+
|
|
660
|
+
# The country of the address.
|
|
661
|
+
sig { returns(T.nilable(String)) }
|
|
662
|
+
attr_accessor :country
|
|
663
|
+
|
|
664
|
+
# The line 1 of the address.
|
|
665
|
+
sig { returns(T.nilable(String)) }
|
|
666
|
+
attr_accessor :line1
|
|
667
|
+
|
|
668
|
+
# The line 2 of the address.
|
|
669
|
+
sig { returns(T.nilable(String)) }
|
|
670
|
+
attr_accessor :line2
|
|
671
|
+
|
|
672
|
+
# The postal code of the address.
|
|
673
|
+
sig { returns(T.nilable(String)) }
|
|
674
|
+
attr_accessor :postal_code
|
|
675
|
+
|
|
676
|
+
# The state of the address.
|
|
677
|
+
sig { returns(T.nilable(String)) }
|
|
678
|
+
attr_accessor :state
|
|
679
|
+
|
|
680
|
+
# The physical address associated with this payout account
|
|
681
|
+
sig do
|
|
682
|
+
params(
|
|
683
|
+
city: T.nilable(String),
|
|
684
|
+
country: T.nilable(String),
|
|
685
|
+
line1: T.nilable(String),
|
|
686
|
+
line2: T.nilable(String),
|
|
687
|
+
postal_code: T.nilable(String),
|
|
688
|
+
state: T.nilable(String)
|
|
689
|
+
).returns(T.attached_class)
|
|
690
|
+
end
|
|
691
|
+
def self.new(
|
|
692
|
+
# The city of the address.
|
|
693
|
+
city:,
|
|
694
|
+
# The country of the address.
|
|
695
|
+
country:,
|
|
696
|
+
# The line 1 of the address.
|
|
697
|
+
line1:,
|
|
698
|
+
# The line 2 of the address.
|
|
699
|
+
line2:,
|
|
700
|
+
# The postal code of the address.
|
|
701
|
+
postal_code:,
|
|
702
|
+
# The state of the address.
|
|
703
|
+
state:
|
|
704
|
+
)
|
|
705
|
+
end
|
|
706
|
+
|
|
707
|
+
sig do
|
|
708
|
+
override.returns(
|
|
709
|
+
{
|
|
710
|
+
city: T.nilable(String),
|
|
711
|
+
country: T.nilable(String),
|
|
712
|
+
line1: T.nilable(String),
|
|
713
|
+
line2: T.nilable(String),
|
|
714
|
+
postal_code: T.nilable(String),
|
|
715
|
+
state: T.nilable(String)
|
|
716
|
+
}
|
|
717
|
+
)
|
|
718
|
+
end
|
|
719
|
+
def to_hash
|
|
720
|
+
end
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
class BusinessRepresentative < WhopSDK::Internal::Type::BaseModel
|
|
724
|
+
OrHash =
|
|
725
|
+
T.type_alias do
|
|
726
|
+
T.any(
|
|
727
|
+
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative,
|
|
728
|
+
WhopSDK::Internal::AnyHash
|
|
729
|
+
)
|
|
730
|
+
end
|
|
731
|
+
|
|
732
|
+
# The first name of the business representative.
|
|
733
|
+
sig { returns(T.nilable(String)) }
|
|
734
|
+
attr_accessor :first_name
|
|
735
|
+
|
|
736
|
+
# The last name of the business representative.
|
|
737
|
+
sig { returns(T.nilable(String)) }
|
|
738
|
+
attr_accessor :last_name
|
|
739
|
+
|
|
740
|
+
# The middle name of the business representative.
|
|
741
|
+
sig { returns(T.nilable(String)) }
|
|
742
|
+
attr_accessor :middle_name
|
|
743
|
+
|
|
744
|
+
# The business representative for this payout account
|
|
745
|
+
sig do
|
|
746
|
+
params(
|
|
747
|
+
first_name: T.nilable(String),
|
|
748
|
+
last_name: T.nilable(String),
|
|
749
|
+
middle_name: T.nilable(String)
|
|
750
|
+
).returns(T.attached_class)
|
|
751
|
+
end
|
|
752
|
+
def self.new(
|
|
753
|
+
# The first name of the business representative.
|
|
754
|
+
first_name:,
|
|
755
|
+
# The last name of the business representative.
|
|
756
|
+
last_name:,
|
|
757
|
+
# The middle name of the business representative.
|
|
758
|
+
middle_name:
|
|
759
|
+
)
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
sig do
|
|
763
|
+
override.returns(
|
|
764
|
+
{
|
|
765
|
+
first_name: T.nilable(String),
|
|
766
|
+
last_name: T.nilable(String),
|
|
767
|
+
middle_name: T.nilable(String)
|
|
768
|
+
}
|
|
769
|
+
)
|
|
770
|
+
end
|
|
771
|
+
def to_hash
|
|
772
|
+
end
|
|
773
|
+
end
|
|
774
|
+
end
|
|
505
775
|
end
|
|
506
776
|
end
|
|
507
777
|
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class PaymentCreatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(WhopSDK::PaymentCreatedWebhookEvent, WhopSDK::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# A unique ID for every single webhook request
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :id
|
|
14
|
+
|
|
15
|
+
# The API version for this webhook
|
|
16
|
+
sig { returns(Symbol) }
|
|
17
|
+
attr_accessor :api_version
|
|
18
|
+
|
|
19
|
+
# An object representing a receipt for a membership.
|
|
20
|
+
sig { returns(WhopSDK::Payment) }
|
|
21
|
+
attr_reader :data
|
|
22
|
+
|
|
23
|
+
sig { params(data: WhopSDK::Payment::OrHash).void }
|
|
24
|
+
attr_writer :data
|
|
25
|
+
|
|
26
|
+
# The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
27
|
+
sig { returns(Time) }
|
|
28
|
+
attr_accessor :timestamp
|
|
29
|
+
|
|
30
|
+
# The webhook event type
|
|
31
|
+
sig { returns(Symbol) }
|
|
32
|
+
attr_accessor :type
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
id: String,
|
|
37
|
+
data: WhopSDK::Payment::OrHash,
|
|
38
|
+
timestamp: Time,
|
|
39
|
+
api_version: Symbol,
|
|
40
|
+
type: Symbol
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
# A unique ID for every single webhook request
|
|
45
|
+
id:,
|
|
46
|
+
# An object representing a receipt for a membership.
|
|
47
|
+
data:,
|
|
48
|
+
# The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
49
|
+
timestamp:,
|
|
50
|
+
# The API version for this webhook
|
|
51
|
+
api_version: :v1,
|
|
52
|
+
# The webhook event type
|
|
53
|
+
type: :"payment.created"
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
{
|
|
60
|
+
id: String,
|
|
61
|
+
api_version: Symbol,
|
|
62
|
+
data: WhopSDK::Payment,
|
|
63
|
+
timestamp: Time,
|
|
64
|
+
type: Symbol
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
def to_hash
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|