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
|
@@ -2,140 +2,357 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
# A payment method with no additional properties
|
|
6
|
+
module PaymentMethodRetrieveResponse
|
|
7
|
+
extend WhopSDK::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
Variants =
|
|
7
10
|
T.type_alias do
|
|
8
11
|
T.any(
|
|
9
|
-
WhopSDK::Models::PaymentMethodRetrieveResponse,
|
|
10
|
-
WhopSDK::
|
|
12
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::BasePaymentMethod,
|
|
13
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod,
|
|
14
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod
|
|
11
15
|
)
|
|
12
16
|
end
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
returns(T.nilable(WhopSDK::Models::PaymentMethodRetrieveResponse::Card))
|
|
21
|
-
end
|
|
22
|
-
attr_reader :card
|
|
23
|
-
|
|
24
|
-
sig do
|
|
25
|
-
params(
|
|
26
|
-
card:
|
|
27
|
-
T.nilable(
|
|
28
|
-
WhopSDK::Models::PaymentMethodRetrieveResponse::Card::OrHash
|
|
18
|
+
class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
19
|
+
OrHash =
|
|
20
|
+
T.type_alias do
|
|
21
|
+
T.any(
|
|
22
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::BasePaymentMethod,
|
|
23
|
+
WhopSDK::Internal::AnyHash
|
|
29
24
|
)
|
|
30
|
-
|
|
31
|
-
end
|
|
32
|
-
attr_writer :card
|
|
25
|
+
end
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
# The ID of the payment method
|
|
28
|
+
sig { returns(String) }
|
|
29
|
+
attr_accessor :id
|
|
37
30
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
# When the payment method was created
|
|
32
|
+
sig { returns(Time) }
|
|
33
|
+
attr_accessor :created_at
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
params(
|
|
46
|
-
id: String,
|
|
47
|
-
card:
|
|
48
|
-
T.nilable(
|
|
49
|
-
WhopSDK::Models::PaymentMethodRetrieveResponse::Card::OrHash
|
|
50
|
-
),
|
|
51
|
-
created_at: Time,
|
|
52
|
-
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
|
|
53
|
-
).returns(T.attached_class)
|
|
54
|
-
end
|
|
55
|
-
def self.new(
|
|
56
|
-
# The ID of the payment method
|
|
57
|
-
id:,
|
|
58
|
-
# The card data associated with the payment method, if its a debit or credit card.
|
|
59
|
-
card:,
|
|
60
|
-
# The date and time the payment method was created
|
|
61
|
-
created_at:,
|
|
62
|
-
# The payment method type of the payment method
|
|
63
|
-
payment_method_type:
|
|
64
|
-
)
|
|
65
|
-
end
|
|
35
|
+
# The type of the payment method
|
|
36
|
+
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
37
|
+
attr_accessor :payment_method_type
|
|
66
38
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
39
|
+
# The typename of this object
|
|
40
|
+
sig { returns(Symbol) }
|
|
41
|
+
attr_accessor :typename
|
|
42
|
+
|
|
43
|
+
# A payment method with no additional properties
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
70
46
|
id: String,
|
|
71
|
-
card:
|
|
72
|
-
T.nilable(WhopSDK::Models::PaymentMethodRetrieveResponse::Card),
|
|
73
47
|
created_at: Time,
|
|
74
|
-
payment_method_type: WhopSDK::PaymentMethodTypes::
|
|
75
|
-
|
|
48
|
+
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol,
|
|
49
|
+
typename: Symbol
|
|
50
|
+
).returns(T.attached_class)
|
|
51
|
+
end
|
|
52
|
+
def self.new(
|
|
53
|
+
# The ID of the payment method
|
|
54
|
+
id:,
|
|
55
|
+
# When the payment method was created
|
|
56
|
+
created_at:,
|
|
57
|
+
# The type of the payment method
|
|
58
|
+
payment_method_type:,
|
|
59
|
+
# The typename of this object
|
|
60
|
+
typename: :BasePaymentMethod
|
|
76
61
|
)
|
|
77
|
-
|
|
78
|
-
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
sig do
|
|
65
|
+
override.returns(
|
|
66
|
+
{
|
|
67
|
+
id: String,
|
|
68
|
+
created_at: Time,
|
|
69
|
+
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol,
|
|
70
|
+
typename: Symbol
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
def to_hash
|
|
75
|
+
end
|
|
79
76
|
end
|
|
80
77
|
|
|
81
|
-
class
|
|
78
|
+
class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
82
79
|
OrHash =
|
|
83
80
|
T.type_alias do
|
|
84
81
|
T.any(
|
|
85
|
-
WhopSDK::Models::PaymentMethodRetrieveResponse::
|
|
82
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod,
|
|
86
83
|
WhopSDK::Internal::AnyHash
|
|
87
84
|
)
|
|
88
85
|
end
|
|
89
86
|
|
|
90
|
-
#
|
|
91
|
-
sig { returns(
|
|
92
|
-
attr_accessor :
|
|
87
|
+
# The ID of the payment method
|
|
88
|
+
sig { returns(String) }
|
|
89
|
+
attr_accessor :id
|
|
90
|
+
|
|
91
|
+
# The card details associated with this payment method
|
|
92
|
+
sig do
|
|
93
|
+
returns(
|
|
94
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod::Card
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
attr_reader :card
|
|
98
|
+
|
|
99
|
+
sig do
|
|
100
|
+
params(
|
|
101
|
+
card:
|
|
102
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod::Card::OrHash
|
|
103
|
+
).void
|
|
104
|
+
end
|
|
105
|
+
attr_writer :card
|
|
93
106
|
|
|
94
|
-
#
|
|
95
|
-
sig { returns(
|
|
96
|
-
attr_accessor :
|
|
107
|
+
# When the payment method was created
|
|
108
|
+
sig { returns(Time) }
|
|
109
|
+
attr_accessor :created_at
|
|
97
110
|
|
|
98
|
-
#
|
|
99
|
-
sig { returns(
|
|
100
|
-
attr_accessor :
|
|
111
|
+
# The type of the payment method
|
|
112
|
+
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
113
|
+
attr_accessor :payment_method_type
|
|
101
114
|
|
|
102
|
-
#
|
|
103
|
-
sig { returns(
|
|
104
|
-
attr_accessor :
|
|
115
|
+
# The typename of this object
|
|
116
|
+
sig { returns(Symbol) }
|
|
117
|
+
attr_accessor :typename
|
|
105
118
|
|
|
106
|
-
# The card
|
|
119
|
+
# The card for the payment method
|
|
107
120
|
sig do
|
|
108
121
|
params(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
122
|
+
id: String,
|
|
123
|
+
card:
|
|
124
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod::Card::OrHash,
|
|
125
|
+
created_at: Time,
|
|
126
|
+
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol,
|
|
127
|
+
typename: Symbol
|
|
113
128
|
).returns(T.attached_class)
|
|
114
129
|
end
|
|
115
130
|
def self.new(
|
|
131
|
+
# The ID of the payment method
|
|
132
|
+
id:,
|
|
133
|
+
# The card details associated with this payment method
|
|
134
|
+
card:,
|
|
135
|
+
# When the payment method was created
|
|
136
|
+
created_at:,
|
|
137
|
+
# The type of the payment method
|
|
138
|
+
payment_method_type:,
|
|
139
|
+
# The typename of this object
|
|
140
|
+
typename: :CardPaymentMethod
|
|
141
|
+
)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
sig do
|
|
145
|
+
override.returns(
|
|
146
|
+
{
|
|
147
|
+
id: String,
|
|
148
|
+
card:
|
|
149
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod::Card,
|
|
150
|
+
created_at: Time,
|
|
151
|
+
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol,
|
|
152
|
+
typename: Symbol
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
end
|
|
156
|
+
def to_hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
160
|
+
OrHash =
|
|
161
|
+
T.type_alias do
|
|
162
|
+
T.any(
|
|
163
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod::Card,
|
|
164
|
+
WhopSDK::Internal::AnyHash
|
|
165
|
+
)
|
|
166
|
+
end
|
|
167
|
+
|
|
116
168
|
# Possible card brands that a payment token can have
|
|
117
|
-
|
|
169
|
+
sig { returns(T.nilable(WhopSDK::CardBrands::TaggedSymbol)) }
|
|
170
|
+
attr_accessor :brand
|
|
171
|
+
|
|
118
172
|
# Card expiration month, like 03 for March.
|
|
119
|
-
|
|
173
|
+
sig { returns(T.nilable(Integer)) }
|
|
174
|
+
attr_accessor :exp_month
|
|
175
|
+
|
|
120
176
|
# Card expiration year, like 27 for 2027.
|
|
121
|
-
|
|
177
|
+
sig { returns(T.nilable(Integer)) }
|
|
178
|
+
attr_accessor :exp_year
|
|
179
|
+
|
|
122
180
|
# Last four digits of the card.
|
|
123
|
-
|
|
181
|
+
sig { returns(T.nilable(String)) }
|
|
182
|
+
attr_accessor :last4
|
|
183
|
+
|
|
184
|
+
# The card details associated with this payment method
|
|
185
|
+
sig do
|
|
186
|
+
params(
|
|
187
|
+
brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
|
|
188
|
+
exp_month: T.nilable(Integer),
|
|
189
|
+
exp_year: T.nilable(Integer),
|
|
190
|
+
last4: T.nilable(String)
|
|
191
|
+
).returns(T.attached_class)
|
|
192
|
+
end
|
|
193
|
+
def self.new(
|
|
194
|
+
# Possible card brands that a payment token can have
|
|
195
|
+
brand:,
|
|
196
|
+
# Card expiration month, like 03 for March.
|
|
197
|
+
exp_month:,
|
|
198
|
+
# Card expiration year, like 27 for 2027.
|
|
199
|
+
exp_year:,
|
|
200
|
+
# Last four digits of the card.
|
|
201
|
+
last4:
|
|
202
|
+
)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
sig do
|
|
206
|
+
override.returns(
|
|
207
|
+
{
|
|
208
|
+
brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol),
|
|
209
|
+
exp_month: T.nilable(Integer),
|
|
210
|
+
exp_year: T.nilable(Integer),
|
|
211
|
+
last4: T.nilable(String)
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
end
|
|
215
|
+
def to_hash
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
221
|
+
OrHash =
|
|
222
|
+
T.type_alias do
|
|
223
|
+
T.any(
|
|
224
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod,
|
|
225
|
+
WhopSDK::Internal::AnyHash
|
|
226
|
+
)
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# The ID of the payment method
|
|
230
|
+
sig { returns(String) }
|
|
231
|
+
attr_accessor :id
|
|
232
|
+
|
|
233
|
+
# When the payment method was created
|
|
234
|
+
sig { returns(Time) }
|
|
235
|
+
attr_accessor :created_at
|
|
236
|
+
|
|
237
|
+
# The type of the payment method
|
|
238
|
+
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
239
|
+
attr_accessor :payment_method_type
|
|
240
|
+
|
|
241
|
+
# The typename of this object
|
|
242
|
+
sig { returns(Symbol) }
|
|
243
|
+
attr_accessor :typename
|
|
244
|
+
|
|
245
|
+
# The bank details associated with this payment method
|
|
246
|
+
sig do
|
|
247
|
+
returns(
|
|
248
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod::UsBankAccount
|
|
249
|
+
)
|
|
250
|
+
end
|
|
251
|
+
attr_reader :us_bank_account
|
|
252
|
+
|
|
253
|
+
sig do
|
|
254
|
+
params(
|
|
255
|
+
us_bank_account:
|
|
256
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod::UsBankAccount::OrHash
|
|
257
|
+
).void
|
|
258
|
+
end
|
|
259
|
+
attr_writer :us_bank_account
|
|
260
|
+
|
|
261
|
+
# The bank account for the payment method
|
|
262
|
+
sig do
|
|
263
|
+
params(
|
|
264
|
+
id: String,
|
|
265
|
+
created_at: Time,
|
|
266
|
+
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol,
|
|
267
|
+
us_bank_account:
|
|
268
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod::UsBankAccount::OrHash,
|
|
269
|
+
typename: Symbol
|
|
270
|
+
).returns(T.attached_class)
|
|
271
|
+
end
|
|
272
|
+
def self.new(
|
|
273
|
+
# The ID of the payment method
|
|
274
|
+
id:,
|
|
275
|
+
# When the payment method was created
|
|
276
|
+
created_at:,
|
|
277
|
+
# The type of the payment method
|
|
278
|
+
payment_method_type:,
|
|
279
|
+
# The bank details associated with this payment method
|
|
280
|
+
us_bank_account:,
|
|
281
|
+
# The typename of this object
|
|
282
|
+
typename: :UsBankAccountPaymentMethod
|
|
124
283
|
)
|
|
125
284
|
end
|
|
126
285
|
|
|
127
286
|
sig do
|
|
128
287
|
override.returns(
|
|
129
288
|
{
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
289
|
+
id: String,
|
|
290
|
+
created_at: Time,
|
|
291
|
+
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol,
|
|
292
|
+
typename: Symbol,
|
|
293
|
+
us_bank_account:
|
|
294
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod::UsBankAccount
|
|
134
295
|
}
|
|
135
296
|
)
|
|
136
297
|
end
|
|
137
298
|
def to_hash
|
|
138
299
|
end
|
|
300
|
+
|
|
301
|
+
class UsBankAccount < WhopSDK::Internal::Type::BaseModel
|
|
302
|
+
OrHash =
|
|
303
|
+
T.type_alias do
|
|
304
|
+
T.any(
|
|
305
|
+
WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod::UsBankAccount,
|
|
306
|
+
WhopSDK::Internal::AnyHash
|
|
307
|
+
)
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# The type of account
|
|
311
|
+
sig { returns(String) }
|
|
312
|
+
attr_accessor :account_type
|
|
313
|
+
|
|
314
|
+
# The name of the bank
|
|
315
|
+
sig { returns(String) }
|
|
316
|
+
attr_accessor :bank_name
|
|
317
|
+
|
|
318
|
+
# The last 4 digits of the account number
|
|
319
|
+
sig { returns(String) }
|
|
320
|
+
attr_accessor :last4
|
|
321
|
+
|
|
322
|
+
# The bank details associated with this payment method
|
|
323
|
+
sig do
|
|
324
|
+
params(
|
|
325
|
+
account_type: String,
|
|
326
|
+
bank_name: String,
|
|
327
|
+
last4: String
|
|
328
|
+
).returns(T.attached_class)
|
|
329
|
+
end
|
|
330
|
+
def self.new(
|
|
331
|
+
# The type of account
|
|
332
|
+
account_type:,
|
|
333
|
+
# The name of the bank
|
|
334
|
+
bank_name:,
|
|
335
|
+
# The last 4 digits of the account number
|
|
336
|
+
last4:
|
|
337
|
+
)
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
sig do
|
|
341
|
+
override.returns(
|
|
342
|
+
{ account_type: String, bank_name: String, last4: String }
|
|
343
|
+
)
|
|
344
|
+
end
|
|
345
|
+
def to_hash
|
|
346
|
+
end
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
sig do
|
|
351
|
+
override.returns(
|
|
352
|
+
T::Array[WhopSDK::Models::PaymentMethodRetrieveResponse::Variants]
|
|
353
|
+
)
|
|
354
|
+
end
|
|
355
|
+
def self.variants
|
|
139
356
|
end
|
|
140
357
|
end
|
|
141
358
|
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class PayoutMethodListParams < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(WhopSDK::PayoutMethodListParams, WhopSDK::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The company ID to list payout methods for.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :company_id
|
|
17
|
+
|
|
18
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_accessor :after
|
|
21
|
+
|
|
22
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_accessor :before
|
|
25
|
+
|
|
26
|
+
# Returns the first _n_ elements from the list.
|
|
27
|
+
sig { returns(T.nilable(Integer)) }
|
|
28
|
+
attr_accessor :first
|
|
29
|
+
|
|
30
|
+
# Returns the last _n_ elements from the list.
|
|
31
|
+
sig { returns(T.nilable(Integer)) }
|
|
32
|
+
attr_accessor :last
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
company_id: String,
|
|
37
|
+
after: T.nilable(String),
|
|
38
|
+
before: T.nilable(String),
|
|
39
|
+
first: T.nilable(Integer),
|
|
40
|
+
last: T.nilable(Integer),
|
|
41
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
# The company ID to list payout methods for.
|
|
46
|
+
company_id:,
|
|
47
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
48
|
+
after: nil,
|
|
49
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
50
|
+
before: nil,
|
|
51
|
+
# Returns the first _n_ elements from the list.
|
|
52
|
+
first: nil,
|
|
53
|
+
# Returns the last _n_ elements from the list.
|
|
54
|
+
last: nil,
|
|
55
|
+
request_options: {}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
sig do
|
|
60
|
+
override.returns(
|
|
61
|
+
{
|
|
62
|
+
company_id: String,
|
|
63
|
+
after: T.nilable(String),
|
|
64
|
+
before: T.nilable(String),
|
|
65
|
+
first: T.nilable(Integer),
|
|
66
|
+
last: T.nilable(Integer),
|
|
67
|
+
request_options: WhopSDK::RequestOptions
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
def to_hash
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|