whop_sdk 0.0.10 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +3 -3
- data/lib/whop_sdk/internal/type/union.rb +12 -0
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
- data/lib/whop_sdk/models/invoice_create_params.rb +10 -1
- data/lib/whop_sdk/models/payment.rb +25 -27
- data/lib/whop_sdk/models/payment_create_params.rb +5 -5
- data/lib/whop_sdk/models/payment_list_response.rb +25 -27
- data/lib/whop_sdk/models/{payment_token_list_params.rb → payment_method_list_params.rb} +4 -4
- data/lib/whop_sdk/models/{payment_token_list_response.rb → payment_method_list_response.rb} +17 -18
- data/lib/whop_sdk/models/{payment_token_retrieve_params.rb → payment_method_retrieve_params.rb} +4 -4
- data/lib/whop_sdk/models/{payment_token_retrieve_response.rb → payment_method_retrieve_response.rb} +17 -18
- data/lib/whop_sdk/models/plan.rb +9 -1
- data/lib/whop_sdk/models/plan_create_params.rb +9 -1
- data/lib/whop_sdk/models/plan_list_response.rb +9 -1
- data/lib/whop_sdk/models/product_create_params.rb +2 -2
- data/lib/whop_sdk/models/setup_intent.rb +22 -24
- data/lib/whop_sdk/models/setup_intent_list_response.rb +22 -24
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +29 -22
- data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +309 -0
- data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +111 -166
- data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +309 -0
- data/lib/whop_sdk/models.rb +8 -4
- data/lib/whop_sdk/resources/invoices.rb +3 -1
- data/lib/whop_sdk/resources/{payment_tokens.rb → payment_methods.rb} +24 -16
- data/lib/whop_sdk/resources/payments.rb +7 -5
- data/lib/whop_sdk/resources/plans.rb +3 -1
- data/lib/whop_sdk/resources/products.rb +1 -1
- data/lib/whop_sdk/resources/setup_intents.rb +10 -2
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +7 -5
- data/rbi/whop_sdk/client.rbi +2 -2
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/invoice_create_params.rbi +10 -0
- data/rbi/whop_sdk/models/payment.rbi +30 -33
- data/rbi/whop_sdk/models/payment_create_params.rbi +6 -6
- data/rbi/whop_sdk/models/payment_list_response.rbi +34 -37
- data/rbi/whop_sdk/models/{payment_token_list_params.rbi → payment_method_list_params.rbi} +4 -4
- data/rbi/whop_sdk/models/{payment_token_list_response.rbi → payment_method_list_response.rbi} +18 -20
- data/rbi/whop_sdk/models/{payment_token_retrieve_params.rbi → payment_method_retrieve_params.rbi} +7 -4
- data/rbi/whop_sdk/models/{payment_token_retrieve_response.rbi → payment_method_retrieve_response.rbi} +18 -20
- data/rbi/whop_sdk/models/plan.rbi +8 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/plan_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/product_create_params.rbi +2 -2
- data/rbi/whop_sdk/models/setup_intent.rbi +27 -29
- data/rbi/whop_sdk/models/setup_intent_list_response.rbi +31 -32
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +2 -0
- data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +633 -0
- data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +326 -480
- data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +633 -0
- data/rbi/whop_sdk/models.rbi +8 -4
- data/rbi/whop_sdk/resources/invoices.rbi +4 -0
- data/rbi/whop_sdk/resources/{payment_tokens.rbi → payment_methods.rbi} +16 -8
- data/rbi/whop_sdk/resources/payments.rbi +8 -6
- data/rbi/whop_sdk/resources/plans.rbi +3 -0
- data/rbi/whop_sdk/resources/products.rbi +1 -1
- data/rbi/whop_sdk/resources/setup_intents.rbi +10 -2
- data/rbi/whop_sdk/resources/webhooks.rbi +2 -0
- data/sig/whop_sdk/client.rbs +1 -1
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
- data/sig/whop_sdk/models/invoice_create_params.rbs +5 -0
- data/sig/whop_sdk/models/payment.rbs +11 -11
- data/sig/whop_sdk/models/payment_create_params.rbs +4 -4
- data/sig/whop_sdk/models/payment_list_response.rbs +11 -11
- data/sig/whop_sdk/models/{payment_token_list_params.rbs → payment_method_list_params.rbs} +2 -2
- data/sig/whop_sdk/models/{payment_token_list_response.rbs → payment_method_list_response.rbs} +6 -6
- data/sig/whop_sdk/models/{payment_token_retrieve_params.rbs → payment_method_retrieve_params.rbs} +2 -2
- data/sig/whop_sdk/models/{payment_token_retrieve_response.rbs → payment_method_retrieve_response.rbs} +6 -6
- data/sig/whop_sdk/models/plan.rbs +5 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +5 -0
- data/sig/whop_sdk/models/plan_list_response.rbs +5 -0
- data/sig/whop_sdk/models/setup_intent.rbs +10 -10
- data/sig/whop_sdk/models/setup_intent_list_response.rbs +10 -10
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
- data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +275 -0
- data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +132 -191
- data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +275 -0
- data/sig/whop_sdk/models.rbs +8 -4
- data/sig/whop_sdk/resources/invoices.rbs +1 -0
- data/sig/whop_sdk/resources/{payment_tokens.rbs → payment_methods.rbs} +3 -3
- data/sig/whop_sdk/resources/payments.rbs +1 -1
- data/sig/whop_sdk/resources/plans.rbs +1 -0
- data/sig/whop_sdk/resources/webhooks.rbs +2 -0
- metadata +23 -17
|
@@ -2,23 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class PaymentMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
WhopSDK::Models::
|
|
9
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse,
|
|
10
10
|
WhopSDK::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# The ID of the payment
|
|
14
|
+
# The ID of the payment method
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :id
|
|
17
17
|
|
|
18
|
-
# The card data associated with the payment
|
|
19
|
-
# token.
|
|
18
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
20
19
|
sig do
|
|
21
|
-
returns(T.nilable(WhopSDK::Models::
|
|
20
|
+
returns(T.nilable(WhopSDK::Models::PaymentMethodRetrieveResponse::Card))
|
|
22
21
|
end
|
|
23
22
|
attr_reader :card
|
|
24
23
|
|
|
@@ -26,41 +25,41 @@ module WhopSDK
|
|
|
26
25
|
params(
|
|
27
26
|
card:
|
|
28
27
|
T.nilable(
|
|
29
|
-
WhopSDK::Models::
|
|
28
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::Card::OrHash
|
|
30
29
|
)
|
|
31
30
|
).void
|
|
32
31
|
end
|
|
33
32
|
attr_writer :card
|
|
34
33
|
|
|
35
|
-
# The date and time the payment
|
|
34
|
+
# The date and time the payment method was created
|
|
36
35
|
sig { returns(Time) }
|
|
37
36
|
attr_accessor :created_at
|
|
38
37
|
|
|
39
|
-
# The payment method type of the payment
|
|
38
|
+
# The payment method type of the payment method
|
|
40
39
|
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
41
40
|
attr_accessor :payment_method_type
|
|
42
41
|
|
|
43
|
-
# A payment
|
|
42
|
+
# A stored payment method used to process payments. This could be a credit/debit
|
|
43
|
+
# card, bank account, PayPal wallet, etc.
|
|
44
44
|
sig do
|
|
45
45
|
params(
|
|
46
46
|
id: String,
|
|
47
47
|
card:
|
|
48
48
|
T.nilable(
|
|
49
|
-
WhopSDK::Models::
|
|
49
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::Card::OrHash
|
|
50
50
|
),
|
|
51
51
|
created_at: Time,
|
|
52
52
|
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
|
|
53
53
|
).returns(T.attached_class)
|
|
54
54
|
end
|
|
55
55
|
def self.new(
|
|
56
|
-
# The ID of the payment
|
|
56
|
+
# The ID of the payment method
|
|
57
57
|
id:,
|
|
58
|
-
# The card data associated with the payment
|
|
59
|
-
# token.
|
|
58
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
60
59
|
card:,
|
|
61
|
-
# The date and time the payment
|
|
60
|
+
# The date and time the payment method was created
|
|
62
61
|
created_at:,
|
|
63
|
-
# The payment method type of the payment
|
|
62
|
+
# The payment method type of the payment method
|
|
64
63
|
payment_method_type:
|
|
65
64
|
)
|
|
66
65
|
end
|
|
@@ -70,7 +69,7 @@ module WhopSDK
|
|
|
70
69
|
{
|
|
71
70
|
id: String,
|
|
72
71
|
card:
|
|
73
|
-
T.nilable(WhopSDK::Models::
|
|
72
|
+
T.nilable(WhopSDK::Models::PaymentMethodRetrieveResponse::Card),
|
|
74
73
|
created_at: Time,
|
|
75
74
|
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
|
|
76
75
|
}
|
|
@@ -83,7 +82,7 @@ module WhopSDK
|
|
|
83
82
|
OrHash =
|
|
84
83
|
T.type_alias do
|
|
85
84
|
T.any(
|
|
86
|
-
WhopSDK::Models::
|
|
85
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::Card,
|
|
87
86
|
WhopSDK::Internal::AnyHash
|
|
88
87
|
)
|
|
89
88
|
end
|
|
@@ -104,8 +103,7 @@ module WhopSDK
|
|
|
104
103
|
sig { returns(T.nilable(String)) }
|
|
105
104
|
attr_accessor :last4
|
|
106
105
|
|
|
107
|
-
# The card data associated with the payment
|
|
108
|
-
# token.
|
|
106
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
109
107
|
sig do
|
|
110
108
|
params(
|
|
111
109
|
brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
|
|
@@ -98,6 +98,10 @@ module WhopSDK
|
|
|
98
98
|
sig { returns(Float) }
|
|
99
99
|
attr_accessor :renewal_price
|
|
100
100
|
|
|
101
|
+
# The number of payments required before pausing the subscription.
|
|
102
|
+
sig { returns(T.nilable(Integer)) }
|
|
103
|
+
attr_accessor :split_pay_required_payments
|
|
104
|
+
|
|
101
105
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
102
106
|
sig { returns(T.nilable(Integer)) }
|
|
103
107
|
attr_accessor :stock
|
|
@@ -151,6 +155,7 @@ module WhopSDK
|
|
|
151
155
|
purchase_url: String,
|
|
152
156
|
release_method: WhopSDK::ReleaseMethod::OrSymbol,
|
|
153
157
|
renewal_price: Float,
|
|
158
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
154
159
|
stock: T.nilable(Integer),
|
|
155
160
|
tax_type: WhopSDK::TaxType::OrSymbol,
|
|
156
161
|
title: T.nilable(String),
|
|
@@ -199,6 +204,8 @@ module WhopSDK
|
|
|
199
204
|
release_method:,
|
|
200
205
|
# The price a person has to pay for a plan on the renewal purchase.
|
|
201
206
|
renewal_price:,
|
|
207
|
+
# The number of payments required before pausing the subscription.
|
|
208
|
+
split_pay_required_payments:,
|
|
202
209
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
203
210
|
stock:,
|
|
204
211
|
# The tax type for the plan.
|
|
@@ -239,6 +246,7 @@ module WhopSDK
|
|
|
239
246
|
purchase_url: String,
|
|
240
247
|
release_method: WhopSDK::ReleaseMethod::TaggedSymbol,
|
|
241
248
|
renewal_price: Float,
|
|
249
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
242
250
|
stock: T.nilable(Integer),
|
|
243
251
|
tax_type: WhopSDK::TaxType::TaggedSymbol,
|
|
244
252
|
title: T.nilable(String),
|
|
@@ -101,6 +101,10 @@ module WhopSDK
|
|
|
101
101
|
sig { returns(T.nilable(Float)) }
|
|
102
102
|
attr_accessor :renewal_price
|
|
103
103
|
|
|
104
|
+
# The number of payments required before pausing the subscription.
|
|
105
|
+
sig { returns(T.nilable(Integer)) }
|
|
106
|
+
attr_accessor :split_pay_required_payments
|
|
107
|
+
|
|
104
108
|
# The number of units available for purchase.
|
|
105
109
|
sig { returns(T.nilable(Integer)) }
|
|
106
110
|
attr_accessor :stock
|
|
@@ -148,6 +152,7 @@ module WhopSDK
|
|
|
148
152
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
149
153
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
150
154
|
renewal_price: T.nilable(Float),
|
|
155
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
151
156
|
stock: T.nilable(Integer),
|
|
152
157
|
title: T.nilable(String),
|
|
153
158
|
trial_period_days: T.nilable(Integer),
|
|
@@ -192,6 +197,8 @@ module WhopSDK
|
|
|
192
197
|
# The amount the customer is charged every billing period. Use only if a recurring
|
|
193
198
|
# payment. Provided as a number in dollars. Eg: 10.43 for $10.43
|
|
194
199
|
renewal_price: nil,
|
|
200
|
+
# The number of payments required before pausing the subscription.
|
|
201
|
+
split_pay_required_payments: nil,
|
|
195
202
|
# The number of units available for purchase.
|
|
196
203
|
stock: nil,
|
|
197
204
|
# The title of the plan. This will be visible on the product page to customers.
|
|
@@ -232,6 +239,7 @@ module WhopSDK
|
|
|
232
239
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
233
240
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
234
241
|
renewal_price: T.nilable(Float),
|
|
242
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
235
243
|
stock: T.nilable(Integer),
|
|
236
244
|
title: T.nilable(String),
|
|
237
245
|
trial_period_days: T.nilable(Integer),
|
|
@@ -113,6 +113,10 @@ module WhopSDK
|
|
|
113
113
|
sig { returns(Float) }
|
|
114
114
|
attr_accessor :renewal_price
|
|
115
115
|
|
|
116
|
+
# The number of payments required before pausing the subscription.
|
|
117
|
+
sig { returns(T.nilable(Integer)) }
|
|
118
|
+
attr_accessor :split_pay_required_payments
|
|
119
|
+
|
|
116
120
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
117
121
|
sig { returns(T.nilable(Integer)) }
|
|
118
122
|
attr_accessor :stock
|
|
@@ -165,6 +169,7 @@ module WhopSDK
|
|
|
165
169
|
purchase_url: String,
|
|
166
170
|
release_method: WhopSDK::ReleaseMethod::OrSymbol,
|
|
167
171
|
renewal_price: Float,
|
|
172
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
168
173
|
stock: T.nilable(Integer),
|
|
169
174
|
title: T.nilable(String),
|
|
170
175
|
trial_period_days: T.nilable(Integer),
|
|
@@ -208,6 +213,8 @@ module WhopSDK
|
|
|
208
213
|
release_method:,
|
|
209
214
|
# The price a person has to pay for a plan on the renewal purchase.
|
|
210
215
|
renewal_price:,
|
|
216
|
+
# The number of payments required before pausing the subscription.
|
|
217
|
+
split_pay_required_payments:,
|
|
211
218
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
212
219
|
stock:,
|
|
213
220
|
# The title of the plan. This will be visible on the product page to customers.
|
|
@@ -246,6 +253,7 @@ module WhopSDK
|
|
|
246
253
|
purchase_url: String,
|
|
247
254
|
release_method: WhopSDK::ReleaseMethod::TaggedSymbol,
|
|
248
255
|
renewal_price: Float,
|
|
256
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
249
257
|
stock: T.nilable(Integer),
|
|
250
258
|
title: T.nilable(String),
|
|
251
259
|
trial_period_days: T.nilable(Integer),
|
|
@@ -15,7 +15,7 @@ module WhopSDK
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :company_id
|
|
17
17
|
|
|
18
|
-
# The title of the product.
|
|
18
|
+
# The title of the product. It must be max 40 characters.
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :title
|
|
21
21
|
|
|
@@ -144,7 +144,7 @@ module WhopSDK
|
|
|
144
144
|
def self.new(
|
|
145
145
|
# The ID of the company to create the product for.
|
|
146
146
|
company_id:,
|
|
147
|
-
# The title of the product.
|
|
147
|
+
# The title of the product. It must be max 40 characters.
|
|
148
148
|
title:,
|
|
149
149
|
# The different business types a company can be.
|
|
150
150
|
business_type: nil,
|
|
@@ -52,16 +52,16 @@ module WhopSDK
|
|
|
52
52
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
53
53
|
attr_accessor :metadata
|
|
54
54
|
|
|
55
|
-
# The payment
|
|
56
|
-
sig { returns(T.nilable(WhopSDK::SetupIntent::
|
|
57
|
-
attr_reader :
|
|
55
|
+
# The payment method created during the setup, if available.
|
|
56
|
+
sig { returns(T.nilable(WhopSDK::SetupIntent::PaymentMethod)) }
|
|
57
|
+
attr_reader :payment_method
|
|
58
58
|
|
|
59
59
|
sig do
|
|
60
60
|
params(
|
|
61
|
-
|
|
61
|
+
payment_method: T.nilable(WhopSDK::SetupIntent::PaymentMethod::OrHash)
|
|
62
62
|
).void
|
|
63
63
|
end
|
|
64
|
-
attr_writer :
|
|
64
|
+
attr_writer :payment_method
|
|
65
65
|
|
|
66
66
|
# The status of the setup intent
|
|
67
67
|
sig { returns(WhopSDK::SetupIntentStatus::TaggedSymbol) }
|
|
@@ -79,7 +79,8 @@ module WhopSDK
|
|
|
79
79
|
error_message: T.nilable(String),
|
|
80
80
|
member: T.nilable(WhopSDK::SetupIntent::Member::OrHash),
|
|
81
81
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
82
|
-
|
|
82
|
+
payment_method:
|
|
83
|
+
T.nilable(WhopSDK::SetupIntent::PaymentMethod::OrHash),
|
|
83
84
|
status: WhopSDK::SetupIntentStatus::OrSymbol
|
|
84
85
|
).returns(T.attached_class)
|
|
85
86
|
end
|
|
@@ -98,8 +99,8 @@ module WhopSDK
|
|
|
98
99
|
member:,
|
|
99
100
|
# The metadata associated with the setup intent
|
|
100
101
|
metadata:,
|
|
101
|
-
# The payment
|
|
102
|
-
|
|
102
|
+
# The payment method created during the setup, if available.
|
|
103
|
+
payment_method:,
|
|
103
104
|
# The status of the setup intent
|
|
104
105
|
status:
|
|
105
106
|
)
|
|
@@ -116,7 +117,7 @@ module WhopSDK
|
|
|
116
117
|
error_message: T.nilable(String),
|
|
117
118
|
member: T.nilable(WhopSDK::SetupIntent::Member),
|
|
118
119
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
119
|
-
|
|
120
|
+
payment_method: T.nilable(WhopSDK::SetupIntent::PaymentMethod),
|
|
120
121
|
status: WhopSDK::SetupIntentStatus::TaggedSymbol
|
|
121
122
|
}
|
|
122
123
|
)
|
|
@@ -278,57 +279,55 @@ module WhopSDK
|
|
|
278
279
|
end
|
|
279
280
|
end
|
|
280
281
|
|
|
281
|
-
class
|
|
282
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
282
283
|
OrHash =
|
|
283
284
|
T.type_alias do
|
|
284
285
|
T.any(
|
|
285
|
-
WhopSDK::SetupIntent::
|
|
286
|
+
WhopSDK::SetupIntent::PaymentMethod,
|
|
286
287
|
WhopSDK::Internal::AnyHash
|
|
287
288
|
)
|
|
288
289
|
end
|
|
289
290
|
|
|
290
|
-
# The ID of the payment
|
|
291
|
+
# The ID of the payment method
|
|
291
292
|
sig { returns(String) }
|
|
292
293
|
attr_accessor :id
|
|
293
294
|
|
|
294
|
-
# The card data associated with the payment
|
|
295
|
-
|
|
296
|
-
sig { returns(T.nilable(WhopSDK::SetupIntent::PaymentToken::Card)) }
|
|
295
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
296
|
+
sig { returns(T.nilable(WhopSDK::SetupIntent::PaymentMethod::Card)) }
|
|
297
297
|
attr_reader :card
|
|
298
298
|
|
|
299
299
|
sig do
|
|
300
300
|
params(
|
|
301
|
-
card: T.nilable(WhopSDK::SetupIntent::
|
|
301
|
+
card: T.nilable(WhopSDK::SetupIntent::PaymentMethod::Card::OrHash)
|
|
302
302
|
).void
|
|
303
303
|
end
|
|
304
304
|
attr_writer :card
|
|
305
305
|
|
|
306
|
-
# The date and time the payment
|
|
306
|
+
# The date and time the payment method was created
|
|
307
307
|
sig { returns(Time) }
|
|
308
308
|
attr_accessor :created_at
|
|
309
309
|
|
|
310
|
-
# The payment method type of the payment
|
|
310
|
+
# The payment method type of the payment method
|
|
311
311
|
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
312
312
|
attr_accessor :payment_method_type
|
|
313
313
|
|
|
314
|
-
# The payment
|
|
314
|
+
# The payment method created during the setup, if available.
|
|
315
315
|
sig do
|
|
316
316
|
params(
|
|
317
317
|
id: String,
|
|
318
|
-
card: T.nilable(WhopSDK::SetupIntent::
|
|
318
|
+
card: T.nilable(WhopSDK::SetupIntent::PaymentMethod::Card::OrHash),
|
|
319
319
|
created_at: Time,
|
|
320
320
|
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
|
|
321
321
|
).returns(T.attached_class)
|
|
322
322
|
end
|
|
323
323
|
def self.new(
|
|
324
|
-
# The ID of the payment
|
|
324
|
+
# The ID of the payment method
|
|
325
325
|
id:,
|
|
326
|
-
# The card data associated with the payment
|
|
327
|
-
# token.
|
|
326
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
328
327
|
card:,
|
|
329
|
-
# The date and time the payment
|
|
328
|
+
# The date and time the payment method was created
|
|
330
329
|
created_at:,
|
|
331
|
-
# The payment method type of the payment
|
|
330
|
+
# The payment method type of the payment method
|
|
332
331
|
payment_method_type:
|
|
333
332
|
)
|
|
334
333
|
end
|
|
@@ -337,7 +336,7 @@ module WhopSDK
|
|
|
337
336
|
override.returns(
|
|
338
337
|
{
|
|
339
338
|
id: String,
|
|
340
|
-
card: T.nilable(WhopSDK::SetupIntent::
|
|
339
|
+
card: T.nilable(WhopSDK::SetupIntent::PaymentMethod::Card),
|
|
341
340
|
created_at: Time,
|
|
342
341
|
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
|
|
343
342
|
}
|
|
@@ -350,7 +349,7 @@ module WhopSDK
|
|
|
350
349
|
OrHash =
|
|
351
350
|
T.type_alias do
|
|
352
351
|
T.any(
|
|
353
|
-
WhopSDK::SetupIntent::
|
|
352
|
+
WhopSDK::SetupIntent::PaymentMethod::Card,
|
|
354
353
|
WhopSDK::Internal::AnyHash
|
|
355
354
|
)
|
|
356
355
|
end
|
|
@@ -371,8 +370,7 @@ module WhopSDK
|
|
|
371
370
|
sig { returns(T.nilable(String)) }
|
|
372
371
|
attr_accessor :last4
|
|
373
372
|
|
|
374
|
-
# The card data associated with the payment
|
|
375
|
-
# token.
|
|
373
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
376
374
|
sig do
|
|
377
375
|
params(
|
|
378
376
|
brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
|
|
@@ -75,23 +75,23 @@ module WhopSDK
|
|
|
75
75
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
76
76
|
attr_accessor :metadata
|
|
77
77
|
|
|
78
|
-
# The payment
|
|
78
|
+
# The payment method created during the setup, if available.
|
|
79
79
|
sig do
|
|
80
80
|
returns(
|
|
81
|
-
T.nilable(WhopSDK::Models::SetupIntentListResponse::
|
|
81
|
+
T.nilable(WhopSDK::Models::SetupIntentListResponse::PaymentMethod)
|
|
82
82
|
)
|
|
83
83
|
end
|
|
84
|
-
attr_reader :
|
|
84
|
+
attr_reader :payment_method
|
|
85
85
|
|
|
86
86
|
sig do
|
|
87
87
|
params(
|
|
88
|
-
|
|
88
|
+
payment_method:
|
|
89
89
|
T.nilable(
|
|
90
|
-
WhopSDK::Models::SetupIntentListResponse::
|
|
90
|
+
WhopSDK::Models::SetupIntentListResponse::PaymentMethod::OrHash
|
|
91
91
|
)
|
|
92
92
|
).void
|
|
93
93
|
end
|
|
94
|
-
attr_writer :
|
|
94
|
+
attr_writer :payment_method
|
|
95
95
|
|
|
96
96
|
# The status of the setup intent
|
|
97
97
|
sig { returns(WhopSDK::SetupIntentStatus::TaggedSymbol) }
|
|
@@ -115,9 +115,9 @@ module WhopSDK
|
|
|
115
115
|
member:
|
|
116
116
|
T.nilable(WhopSDK::Models::SetupIntentListResponse::Member::OrHash),
|
|
117
117
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
118
|
-
|
|
118
|
+
payment_method:
|
|
119
119
|
T.nilable(
|
|
120
|
-
WhopSDK::Models::SetupIntentListResponse::
|
|
120
|
+
WhopSDK::Models::SetupIntentListResponse::PaymentMethod::OrHash
|
|
121
121
|
),
|
|
122
122
|
status: WhopSDK::SetupIntentStatus::OrSymbol
|
|
123
123
|
).returns(T.attached_class)
|
|
@@ -137,8 +137,8 @@ module WhopSDK
|
|
|
137
137
|
member:,
|
|
138
138
|
# The metadata associated with the setup intent
|
|
139
139
|
metadata:,
|
|
140
|
-
# The payment
|
|
141
|
-
|
|
140
|
+
# The payment method created during the setup, if available.
|
|
141
|
+
payment_method:,
|
|
142
142
|
# The status of the setup intent
|
|
143
143
|
status:
|
|
144
144
|
)
|
|
@@ -158,8 +158,10 @@ module WhopSDK
|
|
|
158
158
|
error_message: T.nilable(String),
|
|
159
159
|
member: T.nilable(WhopSDK::Models::SetupIntentListResponse::Member),
|
|
160
160
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
161
|
-
|
|
162
|
-
T.nilable(
|
|
161
|
+
payment_method:
|
|
162
|
+
T.nilable(
|
|
163
|
+
WhopSDK::Models::SetupIntentListResponse::PaymentMethod
|
|
164
|
+
),
|
|
163
165
|
status: WhopSDK::SetupIntentStatus::TaggedSymbol
|
|
164
166
|
}
|
|
165
167
|
)
|
|
@@ -343,25 +345,24 @@ module WhopSDK
|
|
|
343
345
|
end
|
|
344
346
|
end
|
|
345
347
|
|
|
346
|
-
class
|
|
348
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
347
349
|
OrHash =
|
|
348
350
|
T.type_alias do
|
|
349
351
|
T.any(
|
|
350
|
-
WhopSDK::Models::SetupIntentListResponse::
|
|
352
|
+
WhopSDK::Models::SetupIntentListResponse::PaymentMethod,
|
|
351
353
|
WhopSDK::Internal::AnyHash
|
|
352
354
|
)
|
|
353
355
|
end
|
|
354
356
|
|
|
355
|
-
# The ID of the payment
|
|
357
|
+
# The ID of the payment method
|
|
356
358
|
sig { returns(String) }
|
|
357
359
|
attr_accessor :id
|
|
358
360
|
|
|
359
|
-
# The card data associated with the payment
|
|
360
|
-
# token.
|
|
361
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
361
362
|
sig do
|
|
362
363
|
returns(
|
|
363
364
|
T.nilable(
|
|
364
|
-
WhopSDK::Models::SetupIntentListResponse::
|
|
365
|
+
WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card
|
|
365
366
|
)
|
|
366
367
|
)
|
|
367
368
|
end
|
|
@@ -371,41 +372,40 @@ module WhopSDK
|
|
|
371
372
|
params(
|
|
372
373
|
card:
|
|
373
374
|
T.nilable(
|
|
374
|
-
WhopSDK::Models::SetupIntentListResponse::
|
|
375
|
+
WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card::OrHash
|
|
375
376
|
)
|
|
376
377
|
).void
|
|
377
378
|
end
|
|
378
379
|
attr_writer :card
|
|
379
380
|
|
|
380
|
-
# The date and time the payment
|
|
381
|
+
# The date and time the payment method was created
|
|
381
382
|
sig { returns(Time) }
|
|
382
383
|
attr_accessor :created_at
|
|
383
384
|
|
|
384
|
-
# The payment method type of the payment
|
|
385
|
+
# The payment method type of the payment method
|
|
385
386
|
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
386
387
|
attr_accessor :payment_method_type
|
|
387
388
|
|
|
388
|
-
# The payment
|
|
389
|
+
# The payment method created during the setup, if available.
|
|
389
390
|
sig do
|
|
390
391
|
params(
|
|
391
392
|
id: String,
|
|
392
393
|
card:
|
|
393
394
|
T.nilable(
|
|
394
|
-
WhopSDK::Models::SetupIntentListResponse::
|
|
395
|
+
WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card::OrHash
|
|
395
396
|
),
|
|
396
397
|
created_at: Time,
|
|
397
398
|
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
|
|
398
399
|
).returns(T.attached_class)
|
|
399
400
|
end
|
|
400
401
|
def self.new(
|
|
401
|
-
# The ID of the payment
|
|
402
|
+
# The ID of the payment method
|
|
402
403
|
id:,
|
|
403
|
-
# The card data associated with the payment
|
|
404
|
-
# token.
|
|
404
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
405
405
|
card:,
|
|
406
|
-
# The date and time the payment
|
|
406
|
+
# The date and time the payment method was created
|
|
407
407
|
created_at:,
|
|
408
|
-
# The payment method type of the payment
|
|
408
|
+
# The payment method type of the payment method
|
|
409
409
|
payment_method_type:
|
|
410
410
|
)
|
|
411
411
|
end
|
|
@@ -416,7 +416,7 @@ module WhopSDK
|
|
|
416
416
|
id: String,
|
|
417
417
|
card:
|
|
418
418
|
T.nilable(
|
|
419
|
-
WhopSDK::Models::SetupIntentListResponse::
|
|
419
|
+
WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card
|
|
420
420
|
),
|
|
421
421
|
created_at: Time,
|
|
422
422
|
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
|
|
@@ -430,7 +430,7 @@ module WhopSDK
|
|
|
430
430
|
OrHash =
|
|
431
431
|
T.type_alias do
|
|
432
432
|
T.any(
|
|
433
|
-
WhopSDK::Models::SetupIntentListResponse::
|
|
433
|
+
WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card,
|
|
434
434
|
WhopSDK::Internal::AnyHash
|
|
435
435
|
)
|
|
436
436
|
end
|
|
@@ -451,8 +451,7 @@ module WhopSDK
|
|
|
451
451
|
sig { returns(T.nilable(String)) }
|
|
452
452
|
attr_accessor :last4
|
|
453
453
|
|
|
454
|
-
# The card data associated with the payment
|
|
455
|
-
# token.
|
|
454
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
456
455
|
sig do
|
|
457
456
|
params(
|
|
458
457
|
brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
|
|
@@ -21,6 +21,8 @@ module WhopSDK
|
|
|
21
21
|
WhopSDK::SetupIntentRequiresActionWebhookEvent,
|
|
22
22
|
WhopSDK::SetupIntentSucceededWebhookEvent,
|
|
23
23
|
WhopSDK::SetupIntentCanceledWebhookEvent,
|
|
24
|
+
WhopSDK::WithdrawalCreatedWebhookEvent,
|
|
25
|
+
WhopSDK::WithdrawalUpdatedWebhookEvent,
|
|
24
26
|
WhopSDK::CourseLessonInteractionCompletedWebhookEvent,
|
|
25
27
|
WhopSDK::PaymentSucceededWebhookEvent,
|
|
26
28
|
WhopSDK::PaymentFailedWebhookEvent,
|