whop_sdk 0.0.15 → 0.0.16
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 +14 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +4 -0
- data/lib/whop_sdk/models/course.rb +57 -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 +115 -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 +45 -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,84 +2,222 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
+
# A payment method with no additional properties
|
|
6
|
+
#
|
|
5
7
|
# @see WhopSDK::Resources::PaymentMethods#retrieve
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# @
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
# @return [Integer, nil]
|
|
58
|
-
required :exp_month, Integer, nil?: true
|
|
59
|
-
|
|
60
|
-
# @!attribute exp_year
|
|
61
|
-
# Card expiration year, like 27 for 2027.
|
|
62
|
-
#
|
|
63
|
-
# @return [Integer, nil]
|
|
64
|
-
required :exp_year, Integer, nil?: true
|
|
65
|
-
|
|
66
|
-
# @!attribute last4
|
|
67
|
-
# Last four digits of the card.
|
|
68
|
-
#
|
|
69
|
-
# @return [String, nil]
|
|
70
|
-
required :last4, String, nil?: true
|
|
71
|
-
|
|
72
|
-
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
73
|
-
# The card data associated with the payment method, if its a debit or credit card.
|
|
74
|
-
#
|
|
75
|
-
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
76
|
-
#
|
|
77
|
-
# @param exp_month [Integer, nil] Card expiration month, like 03 for March.
|
|
78
|
-
#
|
|
79
|
-
# @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
|
|
80
|
-
#
|
|
81
|
-
# @param last4 [String, nil] Last four digits of the card.
|
|
8
|
+
module PaymentMethodRetrieveResponse
|
|
9
|
+
extend WhopSDK::Internal::Type::Union
|
|
10
|
+
|
|
11
|
+
discriminator :typename
|
|
12
|
+
|
|
13
|
+
# A payment method with no additional properties
|
|
14
|
+
variant :BasePaymentMethod, -> { WhopSDK::Models::PaymentMethodRetrieveResponse::BasePaymentMethod }
|
|
15
|
+
|
|
16
|
+
# The card for the payment method
|
|
17
|
+
variant :CardPaymentMethod, -> { WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod }
|
|
18
|
+
|
|
19
|
+
# The bank account for the payment method
|
|
20
|
+
variant :UsBankAccountPaymentMethod,
|
|
21
|
+
-> { WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod }
|
|
22
|
+
|
|
23
|
+
class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
24
|
+
# @!attribute id
|
|
25
|
+
# The ID of the payment method
|
|
26
|
+
#
|
|
27
|
+
# @return [String]
|
|
28
|
+
required :id, String
|
|
29
|
+
|
|
30
|
+
# @!attribute created_at
|
|
31
|
+
# When the payment method was created
|
|
32
|
+
#
|
|
33
|
+
# @return [Time]
|
|
34
|
+
required :created_at, Time
|
|
35
|
+
|
|
36
|
+
# @!attribute payment_method_type
|
|
37
|
+
# The type of the payment method
|
|
38
|
+
#
|
|
39
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
40
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
41
|
+
|
|
42
|
+
# @!attribute typename
|
|
43
|
+
# The typename of this object
|
|
44
|
+
#
|
|
45
|
+
# @return [Symbol, :BasePaymentMethod]
|
|
46
|
+
required :typename, const: :BasePaymentMethod
|
|
47
|
+
|
|
48
|
+
# @!method initialize(id:, created_at:, payment_method_type:, typename: :BasePaymentMethod)
|
|
49
|
+
# A payment method with no additional properties
|
|
50
|
+
#
|
|
51
|
+
# @param id [String] The ID of the payment method
|
|
52
|
+
#
|
|
53
|
+
# @param created_at [Time] When the payment method was created
|
|
54
|
+
#
|
|
55
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of the payment method
|
|
56
|
+
#
|
|
57
|
+
# @param typename [Symbol, :BasePaymentMethod] The typename of this object
|
|
82
58
|
end
|
|
59
|
+
|
|
60
|
+
class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
61
|
+
# @!attribute id
|
|
62
|
+
# The ID of the payment method
|
|
63
|
+
#
|
|
64
|
+
# @return [String]
|
|
65
|
+
required :id, String
|
|
66
|
+
|
|
67
|
+
# @!attribute card
|
|
68
|
+
# The card details associated with this payment method
|
|
69
|
+
#
|
|
70
|
+
# @return [WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod::Card]
|
|
71
|
+
required :card, -> { WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod::Card }
|
|
72
|
+
|
|
73
|
+
# @!attribute created_at
|
|
74
|
+
# When the payment method was created
|
|
75
|
+
#
|
|
76
|
+
# @return [Time]
|
|
77
|
+
required :created_at, Time
|
|
78
|
+
|
|
79
|
+
# @!attribute payment_method_type
|
|
80
|
+
# The type of the payment method
|
|
81
|
+
#
|
|
82
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
83
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
84
|
+
|
|
85
|
+
# @!attribute typename
|
|
86
|
+
# The typename of this object
|
|
87
|
+
#
|
|
88
|
+
# @return [Symbol, :CardPaymentMethod]
|
|
89
|
+
required :typename, const: :CardPaymentMethod
|
|
90
|
+
|
|
91
|
+
# @!method initialize(id:, card:, created_at:, payment_method_type:, typename: :CardPaymentMethod)
|
|
92
|
+
# The card for the payment method
|
|
93
|
+
#
|
|
94
|
+
# @param id [String] The ID of the payment method
|
|
95
|
+
#
|
|
96
|
+
# @param card [WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod::Card] The card details associated with this payment method
|
|
97
|
+
#
|
|
98
|
+
# @param created_at [Time] When the payment method was created
|
|
99
|
+
#
|
|
100
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of the payment method
|
|
101
|
+
#
|
|
102
|
+
# @param typename [Symbol, :CardPaymentMethod] The typename of this object
|
|
103
|
+
|
|
104
|
+
# @see WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod#card
|
|
105
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
106
|
+
# @!attribute brand
|
|
107
|
+
# Possible card brands that a payment token can have
|
|
108
|
+
#
|
|
109
|
+
# @return [Symbol, WhopSDK::Models::CardBrands, nil]
|
|
110
|
+
required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
|
|
111
|
+
|
|
112
|
+
# @!attribute exp_month
|
|
113
|
+
# Card expiration month, like 03 for March.
|
|
114
|
+
#
|
|
115
|
+
# @return [Integer, nil]
|
|
116
|
+
required :exp_month, Integer, nil?: true
|
|
117
|
+
|
|
118
|
+
# @!attribute exp_year
|
|
119
|
+
# Card expiration year, like 27 for 2027.
|
|
120
|
+
#
|
|
121
|
+
# @return [Integer, nil]
|
|
122
|
+
required :exp_year, Integer, nil?: true
|
|
123
|
+
|
|
124
|
+
# @!attribute last4
|
|
125
|
+
# Last four digits of the card.
|
|
126
|
+
#
|
|
127
|
+
# @return [String, nil]
|
|
128
|
+
required :last4, String, nil?: true
|
|
129
|
+
|
|
130
|
+
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
131
|
+
# The card details associated with this payment method
|
|
132
|
+
#
|
|
133
|
+
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
134
|
+
#
|
|
135
|
+
# @param exp_month [Integer, nil] Card expiration month, like 03 for March.
|
|
136
|
+
#
|
|
137
|
+
# @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
|
|
138
|
+
#
|
|
139
|
+
# @param last4 [String, nil] Last four digits of the card.
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
144
|
+
# @!attribute id
|
|
145
|
+
# The ID of the payment method
|
|
146
|
+
#
|
|
147
|
+
# @return [String]
|
|
148
|
+
required :id, String
|
|
149
|
+
|
|
150
|
+
# @!attribute created_at
|
|
151
|
+
# When the payment method was created
|
|
152
|
+
#
|
|
153
|
+
# @return [Time]
|
|
154
|
+
required :created_at, Time
|
|
155
|
+
|
|
156
|
+
# @!attribute payment_method_type
|
|
157
|
+
# The type of the payment method
|
|
158
|
+
#
|
|
159
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
160
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
161
|
+
|
|
162
|
+
# @!attribute typename
|
|
163
|
+
# The typename of this object
|
|
164
|
+
#
|
|
165
|
+
# @return [Symbol, :UsBankAccountPaymentMethod]
|
|
166
|
+
required :typename, const: :UsBankAccountPaymentMethod
|
|
167
|
+
|
|
168
|
+
# @!attribute us_bank_account
|
|
169
|
+
# The bank details associated with this payment method
|
|
170
|
+
#
|
|
171
|
+
# @return [WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod::UsBankAccount]
|
|
172
|
+
required :us_bank_account,
|
|
173
|
+
-> { WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod::UsBankAccount }
|
|
174
|
+
|
|
175
|
+
# @!method initialize(id:, created_at:, payment_method_type:, us_bank_account:, typename: :UsBankAccountPaymentMethod)
|
|
176
|
+
# The bank account for the payment method
|
|
177
|
+
#
|
|
178
|
+
# @param id [String] The ID of the payment method
|
|
179
|
+
#
|
|
180
|
+
# @param created_at [Time] When the payment method was created
|
|
181
|
+
#
|
|
182
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of the payment method
|
|
183
|
+
#
|
|
184
|
+
# @param us_bank_account [WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod::UsBankAccount] The bank details associated with this payment method
|
|
185
|
+
#
|
|
186
|
+
# @param typename [Symbol, :UsBankAccountPaymentMethod] The typename of this object
|
|
187
|
+
|
|
188
|
+
# @see WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod#us_bank_account
|
|
189
|
+
class UsBankAccount < WhopSDK::Internal::Type::BaseModel
|
|
190
|
+
# @!attribute account_type
|
|
191
|
+
# The type of account
|
|
192
|
+
#
|
|
193
|
+
# @return [String]
|
|
194
|
+
required :account_type, String
|
|
195
|
+
|
|
196
|
+
# @!attribute bank_name
|
|
197
|
+
# The name of the bank
|
|
198
|
+
#
|
|
199
|
+
# @return [String]
|
|
200
|
+
required :bank_name, String
|
|
201
|
+
|
|
202
|
+
# @!attribute last4
|
|
203
|
+
# The last 4 digits of the account number
|
|
204
|
+
#
|
|
205
|
+
# @return [String]
|
|
206
|
+
required :last4, String
|
|
207
|
+
|
|
208
|
+
# @!method initialize(account_type:, bank_name:, last4:)
|
|
209
|
+
# The bank details associated with this payment method
|
|
210
|
+
#
|
|
211
|
+
# @param account_type [String] The type of account
|
|
212
|
+
#
|
|
213
|
+
# @param bank_name [String] The name of the bank
|
|
214
|
+
#
|
|
215
|
+
# @param last4 [String] The last 4 digits of the account number
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# @!method self.variants
|
|
220
|
+
# @return [Array(WhopSDK::Models::PaymentMethodRetrieveResponse::BasePaymentMethod, WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod, WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod)]
|
|
83
221
|
end
|
|
84
222
|
end
|
|
85
223
|
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::PayoutMethods#list
|
|
6
|
+
class PayoutMethodListParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute company_id
|
|
11
|
+
# The company ID to list payout methods for.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :company_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute after
|
|
17
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :after, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute before
|
|
23
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :before, String, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute first
|
|
29
|
+
# Returns the first _n_ elements from the list.
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :first, Integer, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute last
|
|
35
|
+
# Returns the last _n_ elements from the list.
|
|
36
|
+
#
|
|
37
|
+
# @return [Integer, nil]
|
|
38
|
+
optional :last, Integer, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!method initialize(company_id:, after: nil, before: nil, first: nil, last: nil, request_options: {})
|
|
41
|
+
# @param company_id [String] The company ID to list payout methods for.
|
|
42
|
+
#
|
|
43
|
+
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
44
|
+
#
|
|
45
|
+
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
46
|
+
#
|
|
47
|
+
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
48
|
+
#
|
|
49
|
+
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
50
|
+
#
|
|
51
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::PayoutMethods#list
|
|
6
|
+
class PayoutMethodListResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the payout token
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute currency
|
|
14
|
+
# The currency code of the payout destination. This is the currency that payouts
|
|
15
|
+
# will be made in for this token.
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :currency, String
|
|
19
|
+
|
|
20
|
+
# @!attribute destination
|
|
21
|
+
# The payout destination associated with the payout token
|
|
22
|
+
#
|
|
23
|
+
# @return [WhopSDK::Models::PayoutMethodListResponse::Destination, nil]
|
|
24
|
+
required :destination, -> { WhopSDK::Models::PayoutMethodListResponse::Destination }, nil?: true
|
|
25
|
+
|
|
26
|
+
# @!attribute nickname
|
|
27
|
+
# An optional nickname for the payout token to help the user identify it. This is
|
|
28
|
+
# not used by the provider and is only for the user's reference.
|
|
29
|
+
#
|
|
30
|
+
# @return [String, nil]
|
|
31
|
+
required :nickname, String, nil?: true
|
|
32
|
+
|
|
33
|
+
# @!method initialize(id:, currency:, destination:, nickname:)
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {WhopSDK::Models::PayoutMethodListResponse} for more details.
|
|
36
|
+
#
|
|
37
|
+
# An object representing an user's setup payout destination.
|
|
38
|
+
#
|
|
39
|
+
# @param id [String] The ID of the payout token
|
|
40
|
+
#
|
|
41
|
+
# @param currency [String] The currency code of the payout destination. This is the currency that payouts w
|
|
42
|
+
#
|
|
43
|
+
# @param destination [WhopSDK::Models::PayoutMethodListResponse::Destination, nil] The payout destination associated with the payout token
|
|
44
|
+
#
|
|
45
|
+
# @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
|
|
46
|
+
|
|
47
|
+
# @see WhopSDK::Models::PayoutMethodListResponse#destination
|
|
48
|
+
class Destination < WhopSDK::Internal::Type::BaseModel
|
|
49
|
+
# @!attribute category
|
|
50
|
+
# The category of the payout destination
|
|
51
|
+
#
|
|
52
|
+
# @return [Symbol, WhopSDK::Models::PayoutMethodListResponse::Destination::Category]
|
|
53
|
+
required :category, enum: -> { WhopSDK::Models::PayoutMethodListResponse::Destination::Category }
|
|
54
|
+
|
|
55
|
+
# @!attribute country_code
|
|
56
|
+
# The country code of the payout destination
|
|
57
|
+
#
|
|
58
|
+
# @return [String]
|
|
59
|
+
required :country_code, String
|
|
60
|
+
|
|
61
|
+
# @!attribute name
|
|
62
|
+
# The name of the payer associated with the payout destination
|
|
63
|
+
#
|
|
64
|
+
# @return [String]
|
|
65
|
+
required :name, String
|
|
66
|
+
|
|
67
|
+
# @!method initialize(category:, country_code:, name:)
|
|
68
|
+
# The payout destination associated with the payout token
|
|
69
|
+
#
|
|
70
|
+
# @param category [Symbol, WhopSDK::Models::PayoutMethodListResponse::Destination::Category] The category of the payout destination
|
|
71
|
+
#
|
|
72
|
+
# @param country_code [String] The country code of the payout destination
|
|
73
|
+
#
|
|
74
|
+
# @param name [String] The name of the payer associated with the payout destination
|
|
75
|
+
|
|
76
|
+
# The category of the payout destination
|
|
77
|
+
#
|
|
78
|
+
# @see WhopSDK::Models::PayoutMethodListResponse::Destination#category
|
|
79
|
+
module Category
|
|
80
|
+
extend WhopSDK::Internal::Type::Enum
|
|
81
|
+
|
|
82
|
+
CRYPTO = :crypto
|
|
83
|
+
RTP = :rtp
|
|
84
|
+
NEXT_DAY_BANK = :next_day_bank
|
|
85
|
+
BANK_WIRE = :bank_wire
|
|
86
|
+
DIGITAL_WALLET = :digital_wallet
|
|
87
|
+
UNKNOWN = :unknown
|
|
88
|
+
|
|
89
|
+
# @!method self.values
|
|
90
|
+
# @return [Array<Symbol>]
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Withdrawals#create
|
|
6
|
+
class WithdrawalCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute amount
|
|
11
|
+
# The amount to withdraw in the specified currency
|
|
12
|
+
#
|
|
13
|
+
# @return [Float]
|
|
14
|
+
required :amount, Float
|
|
15
|
+
|
|
16
|
+
# @!attribute company_id
|
|
17
|
+
# The ID of the company to withdraw from.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :company_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute currency
|
|
23
|
+
# The currency that is being withdrawn.
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, WhopSDK::Models::Currency]
|
|
26
|
+
required :currency, enum: -> { WhopSDK::Currency }
|
|
27
|
+
|
|
28
|
+
# @!attribute payout_method_id
|
|
29
|
+
# The ID of the payout method to use for the withdrawal.
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :payout_method_id, String, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!method initialize(amount:, company_id:, currency:, payout_method_id: nil, request_options: {})
|
|
35
|
+
# @param amount [Float] The amount to withdraw in the specified currency
|
|
36
|
+
#
|
|
37
|
+
# @param company_id [String] The ID of the company to withdraw from.
|
|
38
|
+
#
|
|
39
|
+
# @param currency [Symbol, WhopSDK::Models::Currency] The currency that is being withdrawn.
|
|
40
|
+
#
|
|
41
|
+
# @param payout_method_id [String, nil] The ID of the payout method to use for the withdrawal.
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|