whop_sdk 0.0.19 → 0.0.22
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 +41 -0
- data/README.md +10 -1
- data/lib/whop_sdk/client.rb +12 -0
- data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +12 -10
- data/lib/whop_sdk/internal/util.rb +7 -2
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +11 -1
- data/lib/whop_sdk/models/company_create_params.rb +17 -1
- data/lib/whop_sdk/models/company_update_params.rb +17 -1
- data/lib/whop_sdk/models/lead_create_params.rb +58 -0
- data/lib/whop_sdk/models/lead_create_response.rb +149 -0
- data/lib/whop_sdk/models/lead_list_params.rb +78 -0
- data/lib/whop_sdk/models/lead_list_response.rb +149 -0
- data/lib/whop_sdk/models/lead_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/lead_retrieve_response.rb +149 -0
- data/lib/whop_sdk/models/lead_update_params.rb +30 -0
- data/lib/whop_sdk/models/lead_update_response.rb +149 -0
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +128 -2
- data/lib/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rb +53 -0
- data/lib/whop_sdk/models/membership_status.rb +1 -0
- data/lib/whop_sdk/models/payment.rb +3 -3
- data/lib/whop_sdk/models/payment_create_params.rb +9 -1
- data/lib/whop_sdk/models/payment_list_fees_response.rb +1 -0
- data/lib/whop_sdk/models/payment_list_response.rb +3 -3
- data/lib/whop_sdk/models/payment_method_list_params.rb +16 -8
- data/lib/whop_sdk/models/payment_method_retrieve_params.rb +13 -5
- data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +168 -0
- data/lib/whop_sdk/models/payout_method_list_response.rb +31 -1
- data/lib/whop_sdk/models/payout_method_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/payout_method_retrieve_response.rb +125 -0
- data/lib/whop_sdk/models/support_channel_create_params.rb +2 -2
- data/lib/whop_sdk/models/topup_create_params.rb +46 -0
- data/lib/whop_sdk/models/topup_create_response.rb +67 -0
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +8 -1
- data/lib/whop_sdk/models/verification_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/verification_retrieve_response.rb +99 -0
- data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +142 -0
- data/lib/whop_sdk/models.rb +21 -0
- data/lib/whop_sdk/resources/companies.rb +10 -2
- data/lib/whop_sdk/resources/leads.rb +158 -0
- data/lib/whop_sdk/resources/payment_methods.rb +12 -8
- data/lib/whop_sdk/resources/payments.rb +3 -1
- data/lib/whop_sdk/resources/payout_methods.rb +24 -0
- data/lib/whop_sdk/resources/support_channels.rb +1 -1
- data/lib/whop_sdk/resources/topups.rb +46 -0
- data/lib/whop_sdk/resources/verifications.rb +38 -0
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +20 -0
- data/rbi/whop_sdk/client.rbi +9 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +12 -0
- data/rbi/whop_sdk/models/company_create_params.rbi +16 -0
- data/rbi/whop_sdk/models/company_update_params.rbi +16 -0
- data/rbi/whop_sdk/models/lead_create_params.rbi +77 -0
- data/rbi/whop_sdk/models/lead_create_response.rbi +234 -0
- data/rbi/whop_sdk/models/lead_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/lead_list_response.rbi +230 -0
- data/rbi/whop_sdk/models/lead_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/lead_retrieve_response.rbi +238 -0
- data/rbi/whop_sdk/models/lead_update_params.rbi +51 -0
- data/rbi/whop_sdk/models/lead_update_response.rbi +234 -0
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +336 -0
- data/rbi/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbi +77 -0
- data/rbi/whop_sdk/models/membership_status.rbi +1 -0
- data/rbi/whop_sdk/models/payment.rbi +4 -4
- data/rbi/whop_sdk/models/payment_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/payment_list_fees_response.rbi +5 -0
- data/rbi/whop_sdk/models/payment_list_response.rbi +4 -4
- data/rbi/whop_sdk/models/payment_method_list_params.rbi +16 -8
- data/rbi/whop_sdk/models/payment_method_retrieve_params.rbi +17 -6
- data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +340 -0
- data/rbi/whop_sdk/models/payout_method_list_response.rbi +58 -0
- data/rbi/whop_sdk/models/payout_method_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +262 -0
- data/rbi/whop_sdk/models/support_channel_create_params.rbi +2 -2
- data/rbi/whop_sdk/models/topup_create_params.rbi +67 -0
- data/rbi/whop_sdk/models/topup_create_response.rbi +89 -0
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +4 -1
- data/rbi/whop_sdk/models/verification_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/verification_retrieve_response.rbi +290 -0
- data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +367 -0
- data/rbi/whop_sdk/models.rbi +23 -0
- data/rbi/whop_sdk/resources/companies.rbi +12 -0
- data/rbi/whop_sdk/resources/leads.rbi +138 -0
- data/rbi/whop_sdk/resources/payment_methods.rbi +13 -7
- data/rbi/whop_sdk/resources/payments.rbi +3 -0
- data/rbi/whop_sdk/resources/payout_methods.rbi +18 -0
- data/rbi/whop_sdk/resources/support_channels.rbi +1 -1
- data/rbi/whop_sdk/resources/topups.rbi +39 -0
- data/rbi/whop_sdk/resources/verifications.rbi +30 -0
- data/rbi/whop_sdk/resources/webhooks.rbi +4 -1
- data/sig/whop_sdk/client.rbs +6 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
- data/sig/whop_sdk/models/company_create_params.rbs +10 -0
- data/sig/whop_sdk/models/company_update_params.rbs +10 -0
- data/sig/whop_sdk/models/lead_create_params.rbs +46 -0
- data/sig/whop_sdk/models/lead_create_response.rbs +104 -0
- data/sig/whop_sdk/models/lead_list_params.rbs +61 -0
- data/sig/whop_sdk/models/lead_list_response.rbs +104 -0
- data/sig/whop_sdk/models/lead_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/lead_retrieve_response.rbs +104 -0
- data/sig/whop_sdk/models/lead_update_params.rbs +28 -0
- data/sig/whop_sdk/models/lead_update_response.rbs +104 -0
- data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +134 -1
- data/sig/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/membership_status.rbs +2 -0
- data/sig/whop_sdk/models/payment_create_params.rbs +5 -0
- data/sig/whop_sdk/models/payment_list_fees_response.rbs +2 -0
- data/sig/whop_sdk/models/payment_method_list_params.rbs +11 -6
- data/sig/whop_sdk/models/payment_method_retrieve_params.rbs +9 -4
- data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +140 -0
- data/sig/whop_sdk/models/payout_method_list_response.rbs +20 -0
- data/sig/whop_sdk/models/payout_method_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +103 -0
- data/sig/whop_sdk/models/topup_create_params.rbs +41 -0
- data/sig/whop_sdk/models/topup_create_response.rbs +50 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +3 -0
- data/sig/whop_sdk/models/verification_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/verification_retrieve_response.rbs +117 -0
- data/sig/whop_sdk/models/verification_succeeded_webhook_event.rbs +154 -0
- data/sig/whop_sdk/models.rbs +20 -0
- data/sig/whop_sdk/resources/companies.rbs +4 -0
- data/sig/whop_sdk/resources/leads.rbs +40 -0
- data/sig/whop_sdk/resources/payment_methods.rbs +4 -2
- data/sig/whop_sdk/resources/payments.rbs +1 -0
- data/sig/whop_sdk/resources/payout_methods.rbs +5 -0
- data/sig/whop_sdk/resources/topups.rbs +15 -0
- data/sig/whop_sdk/resources/verifications.rbs +12 -0
- data/sig/whop_sdk/resources/webhooks.rbs +4 -1
- metadata +62 -2
|
@@ -14,6 +14,8 @@ module WhopSDK
|
|
|
14
14
|
email: String,
|
|
15
15
|
parent_company_id: String,
|
|
16
16
|
title: String,
|
|
17
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
18
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
|
|
17
19
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
18
20
|
send_customer_emails: T.nilable(T::Boolean),
|
|
19
21
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
@@ -26,6 +28,10 @@ module WhopSDK
|
|
|
26
28
|
parent_company_id:,
|
|
27
29
|
# The name of the company being created.
|
|
28
30
|
title:,
|
|
31
|
+
# The different business types a company can be.
|
|
32
|
+
business_type: nil,
|
|
33
|
+
# The different industry types a company can be in.
|
|
34
|
+
industry_type: nil,
|
|
29
35
|
# Additional metadata for the account
|
|
30
36
|
metadata: nil,
|
|
31
37
|
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -72,6 +78,8 @@ module WhopSDK
|
|
|
72
78
|
WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID::OrHash
|
|
73
79
|
)
|
|
74
80
|
),
|
|
81
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
82
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
|
|
75
83
|
logo:
|
|
76
84
|
T.nilable(
|
|
77
85
|
T.any(
|
|
@@ -89,6 +97,10 @@ module WhopSDK
|
|
|
89
97
|
id,
|
|
90
98
|
# The banner image for the company in png or jpeg format
|
|
91
99
|
banner_image: nil,
|
|
100
|
+
# The different business types a company can be.
|
|
101
|
+
business_type: nil,
|
|
102
|
+
# The different industry types a company can be in.
|
|
103
|
+
industry_type: nil,
|
|
92
104
|
# The logo for the company in png, jpeg, or gif format
|
|
93
105
|
logo: nil,
|
|
94
106
|
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class Leads
|
|
6
|
+
# Creates a new lead
|
|
7
|
+
#
|
|
8
|
+
# Required permissions:
|
|
9
|
+
#
|
|
10
|
+
# - `lead:manage`
|
|
11
|
+
# - `member:email:read`
|
|
12
|
+
# - `access_pass:basic:read`
|
|
13
|
+
# - `member:basic:read`
|
|
14
|
+
sig do
|
|
15
|
+
params(
|
|
16
|
+
company_id: String,
|
|
17
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
18
|
+
product_id: T.nilable(String),
|
|
19
|
+
referrer: T.nilable(String),
|
|
20
|
+
user_id: T.nilable(String),
|
|
21
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
22
|
+
).returns(WhopSDK::Models::LeadCreateResponse)
|
|
23
|
+
end
|
|
24
|
+
def create(
|
|
25
|
+
# The ID of the company to create a lead for.
|
|
26
|
+
company_id:,
|
|
27
|
+
# Custom metadata for the lead.
|
|
28
|
+
metadata: nil,
|
|
29
|
+
# The ID of the product the lead is interested in.
|
|
30
|
+
product_id: nil,
|
|
31
|
+
# The url referrer of the lead, if any.
|
|
32
|
+
referrer: nil,
|
|
33
|
+
# The ID of the user to create a lead for. If the request is made by a user, that
|
|
34
|
+
# user will be used.
|
|
35
|
+
user_id: nil,
|
|
36
|
+
request_options: {}
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Retrieves a lead by ID
|
|
41
|
+
#
|
|
42
|
+
# Required permissions:
|
|
43
|
+
#
|
|
44
|
+
# - `lead:basic:read`
|
|
45
|
+
# - `member:email:read`
|
|
46
|
+
# - `access_pass:basic:read`
|
|
47
|
+
# - `member:basic:read`
|
|
48
|
+
sig do
|
|
49
|
+
params(
|
|
50
|
+
id: String,
|
|
51
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
52
|
+
).returns(WhopSDK::Models::LeadRetrieveResponse)
|
|
53
|
+
end
|
|
54
|
+
def retrieve(
|
|
55
|
+
# The ID of the lead
|
|
56
|
+
id,
|
|
57
|
+
request_options: {}
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Updates a lead
|
|
62
|
+
#
|
|
63
|
+
# Required permissions:
|
|
64
|
+
#
|
|
65
|
+
# - `lead:manage`
|
|
66
|
+
# - `member:email:read`
|
|
67
|
+
# - `access_pass:basic:read`
|
|
68
|
+
# - `member:basic:read`
|
|
69
|
+
sig do
|
|
70
|
+
params(
|
|
71
|
+
id: String,
|
|
72
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
73
|
+
referrer: T.nilable(String),
|
|
74
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
75
|
+
).returns(WhopSDK::Models::LeadUpdateResponse)
|
|
76
|
+
end
|
|
77
|
+
def update(
|
|
78
|
+
# The ID of the lead to update.
|
|
79
|
+
id,
|
|
80
|
+
# Custom metadata for the lead.
|
|
81
|
+
metadata: nil,
|
|
82
|
+
# The url referrer of the lead.
|
|
83
|
+
referrer: nil,
|
|
84
|
+
request_options: {}
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Lists leads for a company
|
|
89
|
+
#
|
|
90
|
+
# Required permissions:
|
|
91
|
+
#
|
|
92
|
+
# - `lead:basic:read`
|
|
93
|
+
# - `member:email:read`
|
|
94
|
+
# - `access_pass:basic:read`
|
|
95
|
+
# - `member:basic:read`
|
|
96
|
+
sig do
|
|
97
|
+
params(
|
|
98
|
+
company_id: String,
|
|
99
|
+
after: T.nilable(String),
|
|
100
|
+
before: T.nilable(String),
|
|
101
|
+
created_after: T.nilable(Time),
|
|
102
|
+
created_before: T.nilable(Time),
|
|
103
|
+
first: T.nilable(Integer),
|
|
104
|
+
last: T.nilable(Integer),
|
|
105
|
+
product_ids: T.nilable(T::Array[String]),
|
|
106
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
107
|
+
).returns(
|
|
108
|
+
WhopSDK::Internal::CursorPage[WhopSDK::Models::LeadListResponse]
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
def list(
|
|
112
|
+
# The ID of the company to list leads for
|
|
113
|
+
company_id:,
|
|
114
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
115
|
+
after: nil,
|
|
116
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
117
|
+
before: nil,
|
|
118
|
+
# The minimum creation date to filter by
|
|
119
|
+
created_after: nil,
|
|
120
|
+
# The maximum creation date to filter by
|
|
121
|
+
created_before: nil,
|
|
122
|
+
# Returns the first _n_ elements from the list.
|
|
123
|
+
first: nil,
|
|
124
|
+
# Returns the last _n_ elements from the list.
|
|
125
|
+
last: nil,
|
|
126
|
+
# The product IDs to filter the leads by
|
|
127
|
+
product_ids: nil,
|
|
128
|
+
request_options: {}
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# @api private
|
|
133
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
134
|
+
def self.new(client:)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
@@ -7,7 +7,7 @@ module WhopSDK
|
|
|
7
7
|
# such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
8
8
|
# details and can be attached to a member for future one-time or recurring
|
|
9
9
|
# charges. This lets you reuse the same payment credentials across multiple
|
|
10
|
-
# payments.
|
|
10
|
+
# payments. You must provide exactly one of company_id or member_id.
|
|
11
11
|
#
|
|
12
12
|
# Required permissions:
|
|
13
13
|
#
|
|
@@ -15,15 +15,18 @@ module WhopSDK
|
|
|
15
15
|
sig do
|
|
16
16
|
params(
|
|
17
17
|
id: String,
|
|
18
|
-
|
|
18
|
+
company_id: T.nilable(String),
|
|
19
|
+
member_id: T.nilable(String),
|
|
19
20
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
20
21
|
).returns(WhopSDK::Models::PaymentMethodRetrieveResponse::Variants)
|
|
21
22
|
end
|
|
22
23
|
def retrieve(
|
|
23
24
|
# The ID of the PaymentMethod
|
|
24
25
|
id,
|
|
25
|
-
# The ID of the
|
|
26
|
-
|
|
26
|
+
# The ID of the Company. Provide either this or member_id (not both).
|
|
27
|
+
company_id: nil,
|
|
28
|
+
# The ID of the Member. Provide either this or company_id (not both).
|
|
29
|
+
member_id: nil,
|
|
27
30
|
request_options: {}
|
|
28
31
|
)
|
|
29
32
|
end
|
|
@@ -39,14 +42,15 @@ module WhopSDK
|
|
|
39
42
|
# - `member:payment_methods:read`
|
|
40
43
|
sig do
|
|
41
44
|
params(
|
|
42
|
-
member_id: String,
|
|
43
45
|
after: T.nilable(String),
|
|
44
46
|
before: T.nilable(String),
|
|
47
|
+
company_id: T.nilable(String),
|
|
45
48
|
created_after: T.nilable(Time),
|
|
46
49
|
created_before: T.nilable(Time),
|
|
47
50
|
direction: T.nilable(WhopSDK::Direction::OrSymbol),
|
|
48
51
|
first: T.nilable(Integer),
|
|
49
52
|
last: T.nilable(Integer),
|
|
53
|
+
member_id: T.nilable(String),
|
|
50
54
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
51
55
|
).returns(
|
|
52
56
|
WhopSDK::Internal::CursorPage[
|
|
@@ -55,12 +59,12 @@ module WhopSDK
|
|
|
55
59
|
)
|
|
56
60
|
end
|
|
57
61
|
def list(
|
|
58
|
-
# The ID of the Member to list payment methods for
|
|
59
|
-
member_id:,
|
|
60
62
|
# Returns the elements in the list that come after the specified cursor.
|
|
61
63
|
after: nil,
|
|
62
64
|
# Returns the elements in the list that come before the specified cursor.
|
|
63
65
|
before: nil,
|
|
66
|
+
# The ID of the Company. Provide either this or member_id (not both).
|
|
67
|
+
company_id: nil,
|
|
64
68
|
# The minimum creation date to filter by
|
|
65
69
|
created_after: nil,
|
|
66
70
|
# The maximum creation date to filter by
|
|
@@ -71,6 +75,8 @@ module WhopSDK
|
|
|
71
75
|
first: nil,
|
|
72
76
|
# Returns the last _n_ elements from the list.
|
|
73
77
|
last: nil,
|
|
78
|
+
# The ID of the Member to list payment methods for
|
|
79
|
+
member_id: nil,
|
|
74
80
|
request_options: {}
|
|
75
81
|
)
|
|
76
82
|
end
|
|
@@ -28,6 +28,7 @@ module WhopSDK
|
|
|
28
28
|
payment_method_id: String,
|
|
29
29
|
plan: WhopSDK::PaymentCreateParams::Plan::OrHash,
|
|
30
30
|
plan_id: String,
|
|
31
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
31
32
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
32
33
|
).returns(WhopSDK::Payment)
|
|
33
34
|
end
|
|
@@ -43,6 +44,8 @@ module WhopSDK
|
|
|
43
44
|
plan:,
|
|
44
45
|
# An ID of an existing plan to use for the payment.
|
|
45
46
|
plan_id:,
|
|
47
|
+
# Custom metadata to attach to the payment.
|
|
48
|
+
metadata: nil,
|
|
46
49
|
request_options: {}
|
|
47
50
|
)
|
|
48
51
|
end
|
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Resources
|
|
5
5
|
class PayoutMethods
|
|
6
|
+
# Retrieves a payout method by ID
|
|
7
|
+
#
|
|
8
|
+
# Required permissions:
|
|
9
|
+
#
|
|
10
|
+
# - `payout:destination:read`
|
|
11
|
+
sig do
|
|
12
|
+
params(
|
|
13
|
+
id: String,
|
|
14
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
15
|
+
).returns(WhopSDK::Models::PayoutMethodRetrieveResponse)
|
|
16
|
+
end
|
|
17
|
+
def retrieve(
|
|
18
|
+
# The ID of the payout method
|
|
19
|
+
id,
|
|
20
|
+
request_options: {}
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
6
24
|
# Lists payout destinations for a company
|
|
7
25
|
#
|
|
8
26
|
# Required permissions:
|
|
@@ -19,7 +19,7 @@ module WhopSDK
|
|
|
19
19
|
def create(
|
|
20
20
|
# The ID of the company to create the support chat in
|
|
21
21
|
company_id:,
|
|
22
|
-
# The ID of the user to create the support chat for
|
|
22
|
+
# The ID (user_xxx) or username of the user to create the support chat for
|
|
23
23
|
user_id:,
|
|
24
24
|
request_options: {}
|
|
25
25
|
)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class Topups
|
|
6
|
+
# Add funds to your platform balance by charging a stored payment method.
|
|
7
|
+
#
|
|
8
|
+
# Required permissions:
|
|
9
|
+
#
|
|
10
|
+
# - `payment:charge`
|
|
11
|
+
sig do
|
|
12
|
+
params(
|
|
13
|
+
amount: Float,
|
|
14
|
+
company_id: String,
|
|
15
|
+
currency: WhopSDK::Currency::OrSymbol,
|
|
16
|
+
payment_method_id: String,
|
|
17
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
18
|
+
).returns(WhopSDK::Models::TopupCreateResponse)
|
|
19
|
+
end
|
|
20
|
+
def create(
|
|
21
|
+
# The amount to add to the balance.
|
|
22
|
+
amount:,
|
|
23
|
+
# The ID of the company to add funds to.
|
|
24
|
+
company_id:,
|
|
25
|
+
# The currency of the top-up.
|
|
26
|
+
currency:,
|
|
27
|
+
# The ID of the payment method to charge for the top-up.
|
|
28
|
+
payment_method_id:,
|
|
29
|
+
request_options: {}
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @api private
|
|
34
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
35
|
+
def self.new(client:)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class Verifications
|
|
6
|
+
# Retrieves a verification by ID
|
|
7
|
+
#
|
|
8
|
+
# Required permissions:
|
|
9
|
+
#
|
|
10
|
+
# - `payout:account:read`
|
|
11
|
+
sig do
|
|
12
|
+
params(
|
|
13
|
+
id: String,
|
|
14
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
15
|
+
).returns(WhopSDK::Models::VerificationRetrieveResponse)
|
|
16
|
+
end
|
|
17
|
+
def retrieve(
|
|
18
|
+
# The ID of the verification
|
|
19
|
+
id,
|
|
20
|
+
request_options: {}
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# @api private
|
|
25
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
26
|
+
def self.new(client:)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -22,6 +22,8 @@ module WhopSDK
|
|
|
22
22
|
WhopSDK::WithdrawalCreatedWebhookEvent,
|
|
23
23
|
WhopSDK::WithdrawalUpdatedWebhookEvent,
|
|
24
24
|
WhopSDK::CourseLessonInteractionCompletedWebhookEvent,
|
|
25
|
+
WhopSDK::PayoutMethodCreatedWebhookEvent,
|
|
26
|
+
WhopSDK::VerificationSucceededWebhookEvent,
|
|
25
27
|
WhopSDK::PaymentCreatedWebhookEvent,
|
|
26
28
|
WhopSDK::PaymentSucceededWebhookEvent,
|
|
27
29
|
WhopSDK::PaymentFailedWebhookEvent,
|
|
@@ -29,7 +31,8 @@ module WhopSDK
|
|
|
29
31
|
WhopSDK::DisputeCreatedWebhookEvent,
|
|
30
32
|
WhopSDK::DisputeUpdatedWebhookEvent,
|
|
31
33
|
WhopSDK::RefundCreatedWebhookEvent,
|
|
32
|
-
WhopSDK::RefundUpdatedWebhookEvent
|
|
34
|
+
WhopSDK::RefundUpdatedWebhookEvent,
|
|
35
|
+
WhopSDK::MembershipCancelAtPeriodEndChangedWebhookEvent
|
|
33
36
|
)
|
|
34
37
|
)
|
|
35
38
|
end
|
data/sig/whop_sdk/client.rbs
CHANGED
|
@@ -94,6 +94,12 @@ module WhopSDK
|
|
|
94
94
|
|
|
95
95
|
attr_reader payout_methods: WhopSDK::Resources::PayoutMethods
|
|
96
96
|
|
|
97
|
+
attr_reader verifications: WhopSDK::Resources::Verifications
|
|
98
|
+
|
|
99
|
+
attr_reader leads: WhopSDK::Resources::Leads
|
|
100
|
+
|
|
101
|
+
attr_reader topups: WhopSDK::Resources::Topups
|
|
102
|
+
|
|
97
103
|
private def auth_headers: -> ::Hash[String, String]
|
|
98
104
|
|
|
99
105
|
def initialize: (
|
|
@@ -66,6 +66,7 @@ module WhopSDK
|
|
|
66
66
|
{
|
|
67
67
|
company_id: String,
|
|
68
68
|
currency: WhopSDK::Models::currency,
|
|
69
|
+
application_fee_amount: Float?,
|
|
69
70
|
billing_period: Integer?,
|
|
70
71
|
custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?,
|
|
71
72
|
description: String?,
|
|
@@ -92,6 +93,8 @@ module WhopSDK
|
|
|
92
93
|
|
|
93
94
|
attr_accessor currency: WhopSDK::Models::currency
|
|
94
95
|
|
|
96
|
+
attr_accessor application_fee_amount: Float?
|
|
97
|
+
|
|
95
98
|
attr_accessor billing_period: Integer?
|
|
96
99
|
|
|
97
100
|
attr_accessor custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?
|
|
@@ -133,6 +136,7 @@ module WhopSDK
|
|
|
133
136
|
def initialize: (
|
|
134
137
|
company_id: String,
|
|
135
138
|
currency: WhopSDK::Models::currency,
|
|
139
|
+
?application_fee_amount: Float?,
|
|
136
140
|
?billing_period: Integer?,
|
|
137
141
|
?custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?,
|
|
138
142
|
?description: String?,
|
|
@@ -157,6 +161,7 @@ module WhopSDK
|
|
|
157
161
|
def to_hash: -> {
|
|
158
162
|
company_id: String,
|
|
159
163
|
currency: WhopSDK::Models::currency,
|
|
164
|
+
application_fee_amount: Float?,
|
|
160
165
|
billing_period: Integer?,
|
|
161
166
|
custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?,
|
|
162
167
|
description: String?,
|
|
@@ -5,6 +5,8 @@ module WhopSDK
|
|
|
5
5
|
email: String,
|
|
6
6
|
parent_company_id: String,
|
|
7
7
|
title: String,
|
|
8
|
+
business_type: WhopSDK::Models::business_types?,
|
|
9
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
8
10
|
metadata: ::Hash[Symbol, top]?,
|
|
9
11
|
send_customer_emails: bool?
|
|
10
12
|
}
|
|
@@ -20,6 +22,10 @@ module WhopSDK
|
|
|
20
22
|
|
|
21
23
|
attr_accessor title: String
|
|
22
24
|
|
|
25
|
+
attr_accessor business_type: WhopSDK::Models::business_types?
|
|
26
|
+
|
|
27
|
+
attr_accessor industry_type: WhopSDK::Models::industry_types?
|
|
28
|
+
|
|
23
29
|
attr_accessor metadata: ::Hash[Symbol, top]?
|
|
24
30
|
|
|
25
31
|
attr_accessor send_customer_emails: bool?
|
|
@@ -28,6 +34,8 @@ module WhopSDK
|
|
|
28
34
|
email: String,
|
|
29
35
|
parent_company_id: String,
|
|
30
36
|
title: String,
|
|
37
|
+
?business_type: WhopSDK::Models::business_types?,
|
|
38
|
+
?industry_type: WhopSDK::Models::industry_types?,
|
|
31
39
|
?metadata: ::Hash[Symbol, top]?,
|
|
32
40
|
?send_customer_emails: bool?,
|
|
33
41
|
?request_options: WhopSDK::request_opts
|
|
@@ -37,6 +45,8 @@ module WhopSDK
|
|
|
37
45
|
email: String,
|
|
38
46
|
parent_company_id: String,
|
|
39
47
|
title: String,
|
|
48
|
+
business_type: WhopSDK::Models::business_types?,
|
|
49
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
40
50
|
metadata: ::Hash[Symbol, top]?,
|
|
41
51
|
send_customer_emails: bool?,
|
|
42
52
|
request_options: WhopSDK::RequestOptions
|
|
@@ -3,6 +3,8 @@ module WhopSDK
|
|
|
3
3
|
type company_update_params =
|
|
4
4
|
{
|
|
5
5
|
banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
|
|
6
|
+
business_type: WhopSDK::Models::business_types?,
|
|
7
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
6
8
|
logo: WhopSDK::Models::CompanyUpdateParams::logo?,
|
|
7
9
|
send_customer_emails: bool?,
|
|
8
10
|
title: String?
|
|
@@ -15,6 +17,10 @@ module WhopSDK
|
|
|
15
17
|
|
|
16
18
|
attr_accessor banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?
|
|
17
19
|
|
|
20
|
+
attr_accessor business_type: WhopSDK::Models::business_types?
|
|
21
|
+
|
|
22
|
+
attr_accessor industry_type: WhopSDK::Models::industry_types?
|
|
23
|
+
|
|
18
24
|
attr_accessor logo: WhopSDK::Models::CompanyUpdateParams::logo?
|
|
19
25
|
|
|
20
26
|
attr_accessor send_customer_emails: bool?
|
|
@@ -23,6 +29,8 @@ module WhopSDK
|
|
|
23
29
|
|
|
24
30
|
def initialize: (
|
|
25
31
|
?banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
|
|
32
|
+
?business_type: WhopSDK::Models::business_types?,
|
|
33
|
+
?industry_type: WhopSDK::Models::industry_types?,
|
|
26
34
|
?logo: WhopSDK::Models::CompanyUpdateParams::logo?,
|
|
27
35
|
?send_customer_emails: bool?,
|
|
28
36
|
?title: String?,
|
|
@@ -31,6 +39,8 @@ module WhopSDK
|
|
|
31
39
|
|
|
32
40
|
def to_hash: -> {
|
|
33
41
|
banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
|
|
42
|
+
business_type: WhopSDK::Models::business_types?,
|
|
43
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
34
44
|
logo: WhopSDK::Models::CompanyUpdateParams::logo?,
|
|
35
45
|
send_customer_emails: bool?,
|
|
36
46
|
title: String?,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type lead_create_params =
|
|
4
|
+
{
|
|
5
|
+
company_id: String,
|
|
6
|
+
metadata: ::Hash[Symbol, top]?,
|
|
7
|
+
product_id: String?,
|
|
8
|
+
referrer: String?,
|
|
9
|
+
user_id: String?
|
|
10
|
+
}
|
|
11
|
+
& WhopSDK::Internal::Type::request_parameters
|
|
12
|
+
|
|
13
|
+
class LeadCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
14
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
attr_accessor company_id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor metadata: ::Hash[Symbol, top]?
|
|
20
|
+
|
|
21
|
+
attr_accessor product_id: String?
|
|
22
|
+
|
|
23
|
+
attr_accessor referrer: String?
|
|
24
|
+
|
|
25
|
+
attr_accessor user_id: String?
|
|
26
|
+
|
|
27
|
+
def initialize: (
|
|
28
|
+
company_id: String,
|
|
29
|
+
?metadata: ::Hash[Symbol, top]?,
|
|
30
|
+
?product_id: String?,
|
|
31
|
+
?referrer: String?,
|
|
32
|
+
?user_id: String?,
|
|
33
|
+
?request_options: WhopSDK::request_opts
|
|
34
|
+
) -> void
|
|
35
|
+
|
|
36
|
+
def to_hash: -> {
|
|
37
|
+
company_id: String,
|
|
38
|
+
metadata: ::Hash[Symbol, top]?,
|
|
39
|
+
product_id: String?,
|
|
40
|
+
referrer: String?,
|
|
41
|
+
user_id: String?,
|
|
42
|
+
request_options: WhopSDK::RequestOptions
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type lead_create_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
created_at: Time,
|
|
7
|
+
member: WhopSDK::Models::LeadCreateResponse::Member?,
|
|
8
|
+
metadata: ::Hash[Symbol, top]?,
|
|
9
|
+
product: WhopSDK::Models::LeadCreateResponse::Product?,
|
|
10
|
+
referrer: String?,
|
|
11
|
+
updated_at: Time,
|
|
12
|
+
user: WhopSDK::Models::LeadCreateResponse::User
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
class LeadCreateResponse < WhopSDK::Internal::Type::BaseModel
|
|
16
|
+
attr_accessor id: String
|
|
17
|
+
|
|
18
|
+
attr_accessor created_at: Time
|
|
19
|
+
|
|
20
|
+
attr_accessor member: WhopSDK::Models::LeadCreateResponse::Member?
|
|
21
|
+
|
|
22
|
+
attr_accessor metadata: ::Hash[Symbol, top]?
|
|
23
|
+
|
|
24
|
+
attr_accessor product: WhopSDK::Models::LeadCreateResponse::Product?
|
|
25
|
+
|
|
26
|
+
attr_accessor referrer: String?
|
|
27
|
+
|
|
28
|
+
attr_accessor updated_at: Time
|
|
29
|
+
|
|
30
|
+
attr_accessor user: WhopSDK::Models::LeadCreateResponse::User
|
|
31
|
+
|
|
32
|
+
def initialize: (
|
|
33
|
+
id: String,
|
|
34
|
+
created_at: Time,
|
|
35
|
+
member: WhopSDK::Models::LeadCreateResponse::Member?,
|
|
36
|
+
metadata: ::Hash[Symbol, top]?,
|
|
37
|
+
product: WhopSDK::Models::LeadCreateResponse::Product?,
|
|
38
|
+
referrer: String?,
|
|
39
|
+
updated_at: Time,
|
|
40
|
+
user: WhopSDK::Models::LeadCreateResponse::User
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
id: String,
|
|
45
|
+
created_at: Time,
|
|
46
|
+
member: WhopSDK::Models::LeadCreateResponse::Member?,
|
|
47
|
+
metadata: ::Hash[Symbol, top]?,
|
|
48
|
+
product: WhopSDK::Models::LeadCreateResponse::Product?,
|
|
49
|
+
referrer: String?,
|
|
50
|
+
updated_at: Time,
|
|
51
|
+
user: WhopSDK::Models::LeadCreateResponse::User
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type member = { id: String }
|
|
55
|
+
|
|
56
|
+
class Member < WhopSDK::Internal::Type::BaseModel
|
|
57
|
+
attr_accessor id: String
|
|
58
|
+
|
|
59
|
+
def initialize: (id: String) -> void
|
|
60
|
+
|
|
61
|
+
def to_hash: -> { id: String }
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
type product = { id: String, title: String }
|
|
65
|
+
|
|
66
|
+
class Product < WhopSDK::Internal::Type::BaseModel
|
|
67
|
+
attr_accessor id: String
|
|
68
|
+
|
|
69
|
+
attr_accessor title: String
|
|
70
|
+
|
|
71
|
+
def initialize: (id: String, title: String) -> void
|
|
72
|
+
|
|
73
|
+
def to_hash: -> { id: String, title: String }
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
type user =
|
|
77
|
+
{ id: String, email: String?, name: String?, username: String }
|
|
78
|
+
|
|
79
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
80
|
+
attr_accessor id: String
|
|
81
|
+
|
|
82
|
+
attr_accessor email: String?
|
|
83
|
+
|
|
84
|
+
attr_accessor name: String?
|
|
85
|
+
|
|
86
|
+
attr_accessor username: String
|
|
87
|
+
|
|
88
|
+
def initialize: (
|
|
89
|
+
id: String,
|
|
90
|
+
email: String?,
|
|
91
|
+
name: String?,
|
|
92
|
+
username: String
|
|
93
|
+
) -> void
|
|
94
|
+
|
|
95
|
+
def to_hash: -> {
|
|
96
|
+
id: String,
|
|
97
|
+
email: String?,
|
|
98
|
+
name: String?,
|
|
99
|
+
username: String
|
|
100
|
+
}
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|