whop_sdk 0.0.15 → 0.0.17
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 +22 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +4 -0
- data/lib/whop_sdk/models/course.rb +65 -1
- data/lib/whop_sdk/models/course_lesson_interaction.rb +23 -1
- data/lib/whop_sdk/models/course_lesson_interaction_list_item.rb +23 -1
- data/lib/whop_sdk/models/payment_list_fees_params.rb +46 -0
- data/lib/whop_sdk/models/payment_list_fees_response.rb +84 -0
- data/lib/whop_sdk/models/payment_method_list_response.rb +214 -76
- data/lib/whop_sdk/models/payment_method_retrieve_response.rb +214 -76
- data/lib/whop_sdk/models/payout_method_list_params.rb +54 -0
- data/lib/whop_sdk/models/payout_method_list_response.rb +95 -0
- data/lib/whop_sdk/models/withdrawal_create_params.rb +46 -0
- data/lib/whop_sdk/models/withdrawal_create_response.rb +275 -0
- data/lib/whop_sdk/models.rb +6 -0
- data/lib/whop_sdk/resources/payment_methods.rb +2 -2
- data/lib/whop_sdk/resources/payments.rb +35 -0
- data/lib/whop_sdk/resources/payout_methods.rb +49 -0
- data/lib/whop_sdk/resources/withdrawals.rb +34 -0
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +7 -0
- data/rbi/whop_sdk/client.rbi +3 -0
- data/rbi/whop_sdk/models/course.rbi +123 -3
- data/rbi/whop_sdk/models/course_lesson_interaction.rbi +55 -2
- data/rbi/whop_sdk/models/course_lesson_interaction_list_item.rbi +60 -2
- data/rbi/whop_sdk/models/payment_list_fees_params.rbi +67 -0
- data/rbi/whop_sdk/models/payment_list_fees_response.rbi +239 -0
- data/rbi/whop_sdk/models/payment_method_list_response.rbi +305 -83
- data/rbi/whop_sdk/models/payment_method_retrieve_response.rbi +305 -88
- data/rbi/whop_sdk/models/payout_method_list_params.rbi +75 -0
- data/rbi/whop_sdk/models/payout_method_list_response.rbi +200 -0
- data/rbi/whop_sdk/models/withdrawal_create_params.rbi +67 -0
- data/rbi/whop_sdk/models/withdrawal_create_response.rbi +564 -0
- data/rbi/whop_sdk/models.rbi +6 -0
- data/rbi/whop_sdk/resources/payment_methods.rbi +2 -2
- data/rbi/whop_sdk/resources/payments.rbi +34 -0
- data/rbi/whop_sdk/resources/payout_methods.rbi +46 -0
- data/rbi/whop_sdk/resources/withdrawals.rbi +29 -0
- data/sig/whop_sdk/client.rbs +2 -0
- data/sig/whop_sdk/models/course.rbs +50 -3
- data/sig/whop_sdk/models/course_lesson_interaction.rbs +28 -3
- data/sig/whop_sdk/models/course_lesson_interaction_list_item.rbs +28 -3
- data/sig/whop_sdk/models/payment_list_fees_params.rbs +36 -0
- data/sig/whop_sdk/models/payment_list_fees_response.rbs +104 -0
- data/sig/whop_sdk/models/payment_method_list_response.rbs +149 -41
- data/sig/whop_sdk/models/payment_method_retrieve_response.rbs +149 -41
- data/sig/whop_sdk/models/payout_method_list_params.rbs +46 -0
- data/sig/whop_sdk/models/payout_method_list_response.rbs +83 -0
- data/sig/whop_sdk/models/withdrawal_create_params.rbs +41 -0
- data/sig/whop_sdk/models/withdrawal_create_response.rbs +243 -0
- data/sig/whop_sdk/models.rbs +6 -0
- data/sig/whop_sdk/resources/payment_methods.rbs +2 -2
- data/sig/whop_sdk/resources/payments.rbs +9 -0
- data/sig/whop_sdk/resources/payout_methods.rbs +16 -0
- data/sig/whop_sdk/resources/withdrawals.rbs +8 -0
- metadata +23 -2
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class WithdrawalCreateResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
WhopSDK::Models::WithdrawalCreateResponse,
|
|
10
|
+
WhopSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Internal ID of the withdrawal request.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# How much money was attempted to be withdrawn, in a float type.
|
|
19
|
+
sig { returns(Float) }
|
|
20
|
+
attr_accessor :amount
|
|
21
|
+
|
|
22
|
+
# When the withdrawal request was created.
|
|
23
|
+
sig { returns(Time) }
|
|
24
|
+
attr_accessor :created_at
|
|
25
|
+
|
|
26
|
+
# The currency of the withdrawal request.
|
|
27
|
+
sig { returns(WhopSDK::Currency::TaggedSymbol) }
|
|
28
|
+
attr_accessor :currency
|
|
29
|
+
|
|
30
|
+
# The different error codes a payout can be in.
|
|
31
|
+
sig do
|
|
32
|
+
returns(
|
|
33
|
+
T.nilable(
|
|
34
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
attr_accessor :error_code
|
|
39
|
+
|
|
40
|
+
# The error message for the withdrawal, if any.
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_accessor :error_message
|
|
43
|
+
|
|
44
|
+
# The estimated availability date for the withdrawal, if any.
|
|
45
|
+
sig { returns(T.nilable(Time)) }
|
|
46
|
+
attr_accessor :estimated_availability
|
|
47
|
+
|
|
48
|
+
# The fee amount that was charged for the withdrawal. This is in the same currency
|
|
49
|
+
# as the withdrawal amount.
|
|
50
|
+
sig { returns(Float) }
|
|
51
|
+
attr_accessor :fee_amount
|
|
52
|
+
|
|
53
|
+
# The different fee types for a withdrawal.
|
|
54
|
+
sig { returns(T.nilable(WhopSDK::WithdrawalFeeTypes::TaggedSymbol)) }
|
|
55
|
+
attr_accessor :fee_type
|
|
56
|
+
|
|
57
|
+
# The ledger account associated with the withdrawal.
|
|
58
|
+
sig { returns(WhopSDK::Models::WithdrawalCreateResponse::LedgerAccount) }
|
|
59
|
+
attr_reader :ledger_account
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
ledger_account:
|
|
64
|
+
WhopSDK::Models::WithdrawalCreateResponse::LedgerAccount::OrHash
|
|
65
|
+
).void
|
|
66
|
+
end
|
|
67
|
+
attr_writer :ledger_account
|
|
68
|
+
|
|
69
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
70
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
71
|
+
# Rails.
|
|
72
|
+
sig { returns(Float) }
|
|
73
|
+
attr_accessor :markup_fee
|
|
74
|
+
|
|
75
|
+
# The payout token used for the withdrawal, if applicable.
|
|
76
|
+
sig do
|
|
77
|
+
returns(
|
|
78
|
+
T.nilable(WhopSDK::Models::WithdrawalCreateResponse::PayoutToken)
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
attr_reader :payout_token
|
|
82
|
+
|
|
83
|
+
sig do
|
|
84
|
+
params(
|
|
85
|
+
payout_token:
|
|
86
|
+
T.nilable(
|
|
87
|
+
WhopSDK::Models::WithdrawalCreateResponse::PayoutToken::OrHash
|
|
88
|
+
)
|
|
89
|
+
).void
|
|
90
|
+
end
|
|
91
|
+
attr_writer :payout_token
|
|
92
|
+
|
|
93
|
+
# The speed of the withdrawal.
|
|
94
|
+
sig { returns(WhopSDK::WithdrawalSpeeds::TaggedSymbol) }
|
|
95
|
+
attr_accessor :speed
|
|
96
|
+
|
|
97
|
+
# Status of the withdrawal.
|
|
98
|
+
sig { returns(WhopSDK::WithdrawalStatus::TaggedSymbol) }
|
|
99
|
+
attr_accessor :status
|
|
100
|
+
|
|
101
|
+
# The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
102
|
+
# available.
|
|
103
|
+
sig { returns(T.nilable(String)) }
|
|
104
|
+
attr_accessor :trace_code
|
|
105
|
+
|
|
106
|
+
# The type of withdrawal.
|
|
107
|
+
sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) }
|
|
108
|
+
attr_accessor :withdrawal_type
|
|
109
|
+
|
|
110
|
+
# A withdrawal request.
|
|
111
|
+
sig do
|
|
112
|
+
params(
|
|
113
|
+
id: String,
|
|
114
|
+
amount: Float,
|
|
115
|
+
created_at: Time,
|
|
116
|
+
currency: WhopSDK::Currency::OrSymbol,
|
|
117
|
+
error_code:
|
|
118
|
+
T.nilable(
|
|
119
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::OrSymbol
|
|
120
|
+
),
|
|
121
|
+
error_message: T.nilable(String),
|
|
122
|
+
estimated_availability: T.nilable(Time),
|
|
123
|
+
fee_amount: Float,
|
|
124
|
+
fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::OrSymbol),
|
|
125
|
+
ledger_account:
|
|
126
|
+
WhopSDK::Models::WithdrawalCreateResponse::LedgerAccount::OrHash,
|
|
127
|
+
markup_fee: Float,
|
|
128
|
+
payout_token:
|
|
129
|
+
T.nilable(
|
|
130
|
+
WhopSDK::Models::WithdrawalCreateResponse::PayoutToken::OrHash
|
|
131
|
+
),
|
|
132
|
+
speed: WhopSDK::WithdrawalSpeeds::OrSymbol,
|
|
133
|
+
status: WhopSDK::WithdrawalStatus::OrSymbol,
|
|
134
|
+
trace_code: T.nilable(String),
|
|
135
|
+
withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol
|
|
136
|
+
).returns(T.attached_class)
|
|
137
|
+
end
|
|
138
|
+
def self.new(
|
|
139
|
+
# Internal ID of the withdrawal request.
|
|
140
|
+
id:,
|
|
141
|
+
# How much money was attempted to be withdrawn, in a float type.
|
|
142
|
+
amount:,
|
|
143
|
+
# When the withdrawal request was created.
|
|
144
|
+
created_at:,
|
|
145
|
+
# The currency of the withdrawal request.
|
|
146
|
+
currency:,
|
|
147
|
+
# The different error codes a payout can be in.
|
|
148
|
+
error_code:,
|
|
149
|
+
# The error message for the withdrawal, if any.
|
|
150
|
+
error_message:,
|
|
151
|
+
# The estimated availability date for the withdrawal, if any.
|
|
152
|
+
estimated_availability:,
|
|
153
|
+
# The fee amount that was charged for the withdrawal. This is in the same currency
|
|
154
|
+
# as the withdrawal amount.
|
|
155
|
+
fee_amount:,
|
|
156
|
+
# The different fee types for a withdrawal.
|
|
157
|
+
fee_type:,
|
|
158
|
+
# The ledger account associated with the withdrawal.
|
|
159
|
+
ledger_account:,
|
|
160
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
161
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
162
|
+
# Rails.
|
|
163
|
+
markup_fee:,
|
|
164
|
+
# The payout token used for the withdrawal, if applicable.
|
|
165
|
+
payout_token:,
|
|
166
|
+
# The speed of the withdrawal.
|
|
167
|
+
speed:,
|
|
168
|
+
# Status of the withdrawal.
|
|
169
|
+
status:,
|
|
170
|
+
# The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
171
|
+
# available.
|
|
172
|
+
trace_code:,
|
|
173
|
+
# The type of withdrawal.
|
|
174
|
+
withdrawal_type:
|
|
175
|
+
)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
sig do
|
|
179
|
+
override.returns(
|
|
180
|
+
{
|
|
181
|
+
id: String,
|
|
182
|
+
amount: Float,
|
|
183
|
+
created_at: Time,
|
|
184
|
+
currency: WhopSDK::Currency::TaggedSymbol,
|
|
185
|
+
error_code:
|
|
186
|
+
T.nilable(
|
|
187
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
188
|
+
),
|
|
189
|
+
error_message: T.nilable(String),
|
|
190
|
+
estimated_availability: T.nilable(Time),
|
|
191
|
+
fee_amount: Float,
|
|
192
|
+
fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::TaggedSymbol),
|
|
193
|
+
ledger_account:
|
|
194
|
+
WhopSDK::Models::WithdrawalCreateResponse::LedgerAccount,
|
|
195
|
+
markup_fee: Float,
|
|
196
|
+
payout_token:
|
|
197
|
+
T.nilable(WhopSDK::Models::WithdrawalCreateResponse::PayoutToken),
|
|
198
|
+
speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol,
|
|
199
|
+
status: WhopSDK::WithdrawalStatus::TaggedSymbol,
|
|
200
|
+
trace_code: T.nilable(String),
|
|
201
|
+
withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
end
|
|
205
|
+
def to_hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# The different error codes a payout can be in.
|
|
209
|
+
module ErrorCode
|
|
210
|
+
extend WhopSDK::Internal::Type::Enum
|
|
211
|
+
|
|
212
|
+
TaggedSymbol =
|
|
213
|
+
T.type_alias do
|
|
214
|
+
T.all(Symbol, WhopSDK::Models::WithdrawalCreateResponse::ErrorCode)
|
|
215
|
+
end
|
|
216
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
217
|
+
|
|
218
|
+
ACCOUNT_CLOSED =
|
|
219
|
+
T.let(
|
|
220
|
+
:account_closed,
|
|
221
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
222
|
+
)
|
|
223
|
+
ACCOUNT_DOES_NOT_EXIST =
|
|
224
|
+
T.let(
|
|
225
|
+
:account_does_not_exist,
|
|
226
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
227
|
+
)
|
|
228
|
+
ACCOUNT_INFORMATION_INVALID =
|
|
229
|
+
T.let(
|
|
230
|
+
:account_information_invalid,
|
|
231
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
232
|
+
)
|
|
233
|
+
ACCOUNT_NUMBER_INVALID_REGION =
|
|
234
|
+
T.let(
|
|
235
|
+
:account_number_invalid_region,
|
|
236
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
237
|
+
)
|
|
238
|
+
ACCOUNT_FROZEN =
|
|
239
|
+
T.let(
|
|
240
|
+
:account_frozen,
|
|
241
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
242
|
+
)
|
|
243
|
+
ACCOUNT_LOOKUP_FAILED =
|
|
244
|
+
T.let(
|
|
245
|
+
:account_lookup_failed,
|
|
246
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
247
|
+
)
|
|
248
|
+
ACCOUNT_NOT_FOUND =
|
|
249
|
+
T.let(
|
|
250
|
+
:account_not_found,
|
|
251
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
252
|
+
)
|
|
253
|
+
AMOUNT_OUT_OF_BOUNDS =
|
|
254
|
+
T.let(
|
|
255
|
+
:amount_out_of_bounds,
|
|
256
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
257
|
+
)
|
|
258
|
+
ATTRIBUTES_NOT_VALIDATED =
|
|
259
|
+
T.let(
|
|
260
|
+
:attributes_not_validated,
|
|
261
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
262
|
+
)
|
|
263
|
+
B2B_PAYMENTS_PROHIBITED =
|
|
264
|
+
T.let(
|
|
265
|
+
:b2b_payments_prohibited,
|
|
266
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
267
|
+
)
|
|
268
|
+
BANK_STATEMENT_REQUIRED =
|
|
269
|
+
T.let(
|
|
270
|
+
:bank_statement_required,
|
|
271
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
272
|
+
)
|
|
273
|
+
COMPLIANCE_REVIEW =
|
|
274
|
+
T.let(
|
|
275
|
+
:compliance_review,
|
|
276
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
277
|
+
)
|
|
278
|
+
CURRENCY_NOT_SUPPORTED =
|
|
279
|
+
T.let(
|
|
280
|
+
:currency_not_supported,
|
|
281
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
282
|
+
)
|
|
283
|
+
DEPOSIT_CANCELED =
|
|
284
|
+
T.let(
|
|
285
|
+
:deposit_canceled,
|
|
286
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
287
|
+
)
|
|
288
|
+
DEPOSIT_FAILED =
|
|
289
|
+
T.let(
|
|
290
|
+
:deposit_failed,
|
|
291
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
292
|
+
)
|
|
293
|
+
DEPOSIT_REJECTED =
|
|
294
|
+
T.let(
|
|
295
|
+
:deposit_rejected,
|
|
296
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
297
|
+
)
|
|
298
|
+
DESTINATION_UNAVAILABLE =
|
|
299
|
+
T.let(
|
|
300
|
+
:destination_unavailable,
|
|
301
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
302
|
+
)
|
|
303
|
+
EXCEEDED_ACCOUNT_LIMIT =
|
|
304
|
+
T.let(
|
|
305
|
+
:exceeded_account_limit,
|
|
306
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
307
|
+
)
|
|
308
|
+
EXPIRED_QUOTE =
|
|
309
|
+
T.let(
|
|
310
|
+
:expired_quote,
|
|
311
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
312
|
+
)
|
|
313
|
+
GENERIC_PAYOUT_ERROR =
|
|
314
|
+
T.let(
|
|
315
|
+
:generic_payout_error,
|
|
316
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
317
|
+
)
|
|
318
|
+
TECHNICAL_PROBLEM =
|
|
319
|
+
T.let(
|
|
320
|
+
:technical_problem,
|
|
321
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
322
|
+
)
|
|
323
|
+
IDENTIFICATION_NUMBER_INVALID =
|
|
324
|
+
T.let(
|
|
325
|
+
:identification_number_invalid,
|
|
326
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
327
|
+
)
|
|
328
|
+
INVALID_ACCOUNT_NUMBER =
|
|
329
|
+
T.let(
|
|
330
|
+
:invalid_account_number,
|
|
331
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
332
|
+
)
|
|
333
|
+
INVALID_BANK_CODE =
|
|
334
|
+
T.let(
|
|
335
|
+
:invalid_bank_code,
|
|
336
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
337
|
+
)
|
|
338
|
+
INVALID_BENEFICIARY =
|
|
339
|
+
T.let(
|
|
340
|
+
:invalid_beneficiary,
|
|
341
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
342
|
+
)
|
|
343
|
+
INVALID_BRANCH_NUMBER =
|
|
344
|
+
T.let(
|
|
345
|
+
:invalid_branch_number,
|
|
346
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
347
|
+
)
|
|
348
|
+
INVALID_BRANCH_CODE =
|
|
349
|
+
T.let(
|
|
350
|
+
:invalid_branch_code,
|
|
351
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
352
|
+
)
|
|
353
|
+
INVALID_PHONE_NUMBER =
|
|
354
|
+
T.let(
|
|
355
|
+
:invalid_phone_number,
|
|
356
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
357
|
+
)
|
|
358
|
+
INVALID_ROUTING_NUMBER =
|
|
359
|
+
T.let(
|
|
360
|
+
:invalid_routing_number,
|
|
361
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
362
|
+
)
|
|
363
|
+
INVALID_SWIFT_CODE =
|
|
364
|
+
T.let(
|
|
365
|
+
:invalid_swift_code,
|
|
366
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
367
|
+
)
|
|
368
|
+
INVALID_COMPANY_DETAILS =
|
|
369
|
+
T.let(
|
|
370
|
+
:invalid_company_details,
|
|
371
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
372
|
+
)
|
|
373
|
+
MANUAL_CANCELATION =
|
|
374
|
+
T.let(
|
|
375
|
+
:manual_cancelation,
|
|
376
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
377
|
+
)
|
|
378
|
+
MISC_ERROR =
|
|
379
|
+
T.let(
|
|
380
|
+
:misc_error,
|
|
381
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
382
|
+
)
|
|
383
|
+
MISSING_CITY_AND_COUNTRY =
|
|
384
|
+
T.let(
|
|
385
|
+
:missing_city_and_country,
|
|
386
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
387
|
+
)
|
|
388
|
+
MISSING_PHONE_NUMBER =
|
|
389
|
+
T.let(
|
|
390
|
+
:missing_phone_number,
|
|
391
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
392
|
+
)
|
|
393
|
+
MISSING_REMITTANCE_INFO =
|
|
394
|
+
T.let(
|
|
395
|
+
:missing_remittance_info,
|
|
396
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
397
|
+
)
|
|
398
|
+
PAYEE_NAME_INVALID =
|
|
399
|
+
T.let(
|
|
400
|
+
:payee_name_invalid,
|
|
401
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
402
|
+
)
|
|
403
|
+
RECEIVING_ACCOUNT_LOCKED =
|
|
404
|
+
T.let(
|
|
405
|
+
:receiving_account_locked,
|
|
406
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
407
|
+
)
|
|
408
|
+
REJECTED_BY_COMPLIANCE =
|
|
409
|
+
T.let(
|
|
410
|
+
:rejected_by_compliance,
|
|
411
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
412
|
+
)
|
|
413
|
+
RTP_NOT_SUPPORTED =
|
|
414
|
+
T.let(
|
|
415
|
+
:rtp_not_supported,
|
|
416
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
417
|
+
)
|
|
418
|
+
NON_TRANSACTION_ACCOUNT =
|
|
419
|
+
T.let(
|
|
420
|
+
:non_transaction_account,
|
|
421
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
422
|
+
)
|
|
423
|
+
SOURCE_TOKEN_INSUFFICIENT_FUNDS =
|
|
424
|
+
T.let(
|
|
425
|
+
:source_token_insufficient_funds,
|
|
426
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
427
|
+
)
|
|
428
|
+
SSN_INVALID =
|
|
429
|
+
T.let(
|
|
430
|
+
:ssn_invalid,
|
|
431
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
432
|
+
)
|
|
433
|
+
WALLET_SCREENSHOT_REQUIRED =
|
|
434
|
+
T.let(
|
|
435
|
+
:wallet_screenshot_required,
|
|
436
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
437
|
+
)
|
|
438
|
+
UNSUPPORTED_REGION =
|
|
439
|
+
T.let(
|
|
440
|
+
:unsupported_region,
|
|
441
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
sig do
|
|
445
|
+
override.returns(
|
|
446
|
+
T::Array[
|
|
447
|
+
WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol
|
|
448
|
+
]
|
|
449
|
+
)
|
|
450
|
+
end
|
|
451
|
+
def self.values
|
|
452
|
+
end
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
class LedgerAccount < WhopSDK::Internal::Type::BaseModel
|
|
456
|
+
OrHash =
|
|
457
|
+
T.type_alias do
|
|
458
|
+
T.any(
|
|
459
|
+
WhopSDK::Models::WithdrawalCreateResponse::LedgerAccount,
|
|
460
|
+
WhopSDK::Internal::AnyHash
|
|
461
|
+
)
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
# The ID of the LedgerAccount.
|
|
465
|
+
sig { returns(String) }
|
|
466
|
+
attr_accessor :id
|
|
467
|
+
|
|
468
|
+
# The ID of the company associated with this ledger account.
|
|
469
|
+
sig { returns(T.nilable(String)) }
|
|
470
|
+
attr_accessor :company_id
|
|
471
|
+
|
|
472
|
+
# The ledger account associated with the withdrawal.
|
|
473
|
+
sig do
|
|
474
|
+
params(id: String, company_id: T.nilable(String)).returns(
|
|
475
|
+
T.attached_class
|
|
476
|
+
)
|
|
477
|
+
end
|
|
478
|
+
def self.new(
|
|
479
|
+
# The ID of the LedgerAccount.
|
|
480
|
+
id:,
|
|
481
|
+
# The ID of the company associated with this ledger account.
|
|
482
|
+
company_id:
|
|
483
|
+
)
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
sig { override.returns({ id: String, company_id: T.nilable(String) }) }
|
|
487
|
+
def to_hash
|
|
488
|
+
end
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
class PayoutToken < WhopSDK::Internal::Type::BaseModel
|
|
492
|
+
OrHash =
|
|
493
|
+
T.type_alias do
|
|
494
|
+
T.any(
|
|
495
|
+
WhopSDK::Models::WithdrawalCreateResponse::PayoutToken,
|
|
496
|
+
WhopSDK::Internal::AnyHash
|
|
497
|
+
)
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
# The ID of the payout token
|
|
501
|
+
sig { returns(String) }
|
|
502
|
+
attr_accessor :id
|
|
503
|
+
|
|
504
|
+
# The date and time the payout token was created
|
|
505
|
+
sig { returns(Time) }
|
|
506
|
+
attr_accessor :created_at
|
|
507
|
+
|
|
508
|
+
# The currency code of the payout destination. This is the currency that payouts
|
|
509
|
+
# will be made in for this token.
|
|
510
|
+
sig { returns(String) }
|
|
511
|
+
attr_accessor :destination_currency_code
|
|
512
|
+
|
|
513
|
+
# An optional nickname for the payout token to help the user identify it. This is
|
|
514
|
+
# not used by the provider and is only for the user's reference.
|
|
515
|
+
sig { returns(T.nilable(String)) }
|
|
516
|
+
attr_accessor :nickname
|
|
517
|
+
|
|
518
|
+
# The name of the payer associated with the payout token.
|
|
519
|
+
sig { returns(T.nilable(String)) }
|
|
520
|
+
attr_accessor :payer_name
|
|
521
|
+
|
|
522
|
+
# The payout token used for the withdrawal, if applicable.
|
|
523
|
+
sig do
|
|
524
|
+
params(
|
|
525
|
+
id: String,
|
|
526
|
+
created_at: Time,
|
|
527
|
+
destination_currency_code: String,
|
|
528
|
+
nickname: T.nilable(String),
|
|
529
|
+
payer_name: T.nilable(String)
|
|
530
|
+
).returns(T.attached_class)
|
|
531
|
+
end
|
|
532
|
+
def self.new(
|
|
533
|
+
# The ID of the payout token
|
|
534
|
+
id:,
|
|
535
|
+
# The date and time the payout token was created
|
|
536
|
+
created_at:,
|
|
537
|
+
# The currency code of the payout destination. This is the currency that payouts
|
|
538
|
+
# will be made in for this token.
|
|
539
|
+
destination_currency_code:,
|
|
540
|
+
# An optional nickname for the payout token to help the user identify it. This is
|
|
541
|
+
# not used by the provider and is only for the user's reference.
|
|
542
|
+
nickname:,
|
|
543
|
+
# The name of the payer associated with the payout token.
|
|
544
|
+
payer_name:
|
|
545
|
+
)
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
sig do
|
|
549
|
+
override.returns(
|
|
550
|
+
{
|
|
551
|
+
id: String,
|
|
552
|
+
created_at: Time,
|
|
553
|
+
destination_currency_code: String,
|
|
554
|
+
nickname: T.nilable(String),
|
|
555
|
+
payer_name: T.nilable(String)
|
|
556
|
+
}
|
|
557
|
+
)
|
|
558
|
+
end
|
|
559
|
+
def to_hash
|
|
560
|
+
end
|
|
561
|
+
end
|
|
562
|
+
end
|
|
563
|
+
end
|
|
564
|
+
end
|
data/rbi/whop_sdk/models.rbi
CHANGED
|
@@ -330,6 +330,8 @@ module WhopSDK
|
|
|
330
330
|
|
|
331
331
|
PaymentFailedWebhookEvent = WhopSDK::Models::PaymentFailedWebhookEvent
|
|
332
332
|
|
|
333
|
+
PaymentListFeesParams = WhopSDK::Models::PaymentListFeesParams
|
|
334
|
+
|
|
333
335
|
PaymentListParams = WhopSDK::Models::PaymentListParams
|
|
334
336
|
|
|
335
337
|
PaymentMethodListParams = WhopSDK::Models::PaymentMethodListParams
|
|
@@ -352,6 +354,8 @@ module WhopSDK
|
|
|
352
354
|
|
|
353
355
|
PaymentVoidParams = WhopSDK::Models::PaymentVoidParams
|
|
354
356
|
|
|
357
|
+
PayoutMethodListParams = WhopSDK::Models::PayoutMethodListParams
|
|
358
|
+
|
|
355
359
|
Plan = WhopSDK::Models::Plan
|
|
356
360
|
|
|
357
361
|
PlanCreateParams = WhopSDK::Models::PlanCreateParams
|
|
@@ -499,6 +503,8 @@ module WhopSDK
|
|
|
499
503
|
|
|
500
504
|
WithdrawalCreatedWebhookEvent = WhopSDK::Models::WithdrawalCreatedWebhookEvent
|
|
501
505
|
|
|
506
|
+
WithdrawalCreateParams = WhopSDK::Models::WithdrawalCreateParams
|
|
507
|
+
|
|
502
508
|
WithdrawalFeeTypes = WhopSDK::Models::WithdrawalFeeTypes
|
|
503
509
|
|
|
504
510
|
WithdrawalListParams = WhopSDK::Models::WithdrawalListParams
|
|
@@ -17,7 +17,7 @@ module WhopSDK
|
|
|
17
17
|
id: String,
|
|
18
18
|
member_id: String,
|
|
19
19
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
20
|
-
).returns(WhopSDK::Models::PaymentMethodRetrieveResponse)
|
|
20
|
+
).returns(WhopSDK::Models::PaymentMethodRetrieveResponse::Variants)
|
|
21
21
|
end
|
|
22
22
|
def retrieve(
|
|
23
23
|
# The ID of the PaymentMethod
|
|
@@ -50,7 +50,7 @@ module WhopSDK
|
|
|
50
50
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
51
51
|
).returns(
|
|
52
52
|
WhopSDK::Internal::CursorPage[
|
|
53
|
-
WhopSDK::Models::PaymentMethodListResponse
|
|
53
|
+
WhopSDK::Models::PaymentMethodListResponse::Variants
|
|
54
54
|
]
|
|
55
55
|
)
|
|
56
56
|
end
|
|
@@ -144,6 +144,40 @@ module WhopSDK
|
|
|
144
144
|
)
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
+
# Lists fees for a payment
|
|
148
|
+
#
|
|
149
|
+
# Required permissions:
|
|
150
|
+
#
|
|
151
|
+
# - `payment:basic:read`
|
|
152
|
+
sig do
|
|
153
|
+
params(
|
|
154
|
+
id: String,
|
|
155
|
+
after: T.nilable(String),
|
|
156
|
+
before: T.nilable(String),
|
|
157
|
+
first: T.nilable(Integer),
|
|
158
|
+
last: T.nilable(Integer),
|
|
159
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
160
|
+
).returns(
|
|
161
|
+
WhopSDK::Internal::CursorPage[
|
|
162
|
+
WhopSDK::Models::PaymentListFeesResponse
|
|
163
|
+
]
|
|
164
|
+
)
|
|
165
|
+
end
|
|
166
|
+
def list_fees(
|
|
167
|
+
# The ID of the payment to list fees for
|
|
168
|
+
id,
|
|
169
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
170
|
+
after: nil,
|
|
171
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
172
|
+
before: nil,
|
|
173
|
+
# Returns the first _n_ elements from the list.
|
|
174
|
+
first: nil,
|
|
175
|
+
# Returns the last _n_ elements from the list.
|
|
176
|
+
last: nil,
|
|
177
|
+
request_options: {}
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
|
|
147
181
|
# Refunds a payment
|
|
148
182
|
#
|
|
149
183
|
# Required permissions:
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class PayoutMethods
|
|
6
|
+
# Lists payout destinations for a company
|
|
7
|
+
#
|
|
8
|
+
# Required permissions:
|
|
9
|
+
#
|
|
10
|
+
# - `payout:destination:read`
|
|
11
|
+
sig do
|
|
12
|
+
params(
|
|
13
|
+
company_id: String,
|
|
14
|
+
after: T.nilable(String),
|
|
15
|
+
before: T.nilable(String),
|
|
16
|
+
first: T.nilable(Integer),
|
|
17
|
+
last: T.nilable(Integer),
|
|
18
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
19
|
+
).returns(
|
|
20
|
+
WhopSDK::Internal::CursorPage[
|
|
21
|
+
WhopSDK::Models::PayoutMethodListResponse
|
|
22
|
+
]
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
def list(
|
|
26
|
+
# The company ID to list payout methods for.
|
|
27
|
+
company_id:,
|
|
28
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
29
|
+
after: nil,
|
|
30
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
31
|
+
before: nil,
|
|
32
|
+
# Returns the first _n_ elements from the list.
|
|
33
|
+
first: nil,
|
|
34
|
+
# Returns the last _n_ elements from the list.
|
|
35
|
+
last: nil,
|
|
36
|
+
request_options: {}
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# @api private
|
|
41
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
42
|
+
def self.new(client:)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|