whop_sdk 0.0.14 → 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 +24 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +8 -0
- data/lib/whop_sdk/models/checkout_configuration.rb +9 -1
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
- data/lib/whop_sdk/models/checkout_configuration_list_response.rb +9 -1
- 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/experience.rb +9 -1
- data/lib/whop_sdk/models/experience_create_params.rb +9 -1
- data/lib/whop_sdk/models/experience_list_response.rb +9 -1
- data/lib/whop_sdk/models/experience_update_params.rb +9 -1
- data/lib/whop_sdk/models/fee_markup_create_params.rb +62 -0
- data/lib/whop_sdk/models/fee_markup_create_response.rb +67 -0
- data/lib/whop_sdk/models/fee_markup_delete_params.rb +14 -0
- data/lib/whop_sdk/models/fee_markup_delete_response.rb +8 -0
- data/lib/whop_sdk/models/fee_markup_list_params.rb +58 -0
- data/lib/whop_sdk/models/fee_markup_list_response.rb +67 -0
- data/lib/whop_sdk/models/fee_markup_type.rb +19 -0
- 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 +14 -0
- data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
- data/lib/whop_sdk/resources/experiences.rb +6 -2
- data/lib/whop_sdk/resources/fee_markups.rb +112 -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 +15 -0
- data/rbi/whop_sdk/client.rbi +6 -0
- data/rbi/whop_sdk/models/checkout_configuration.rbi +8 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +8 -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/experience.rbi +8 -0
- data/rbi/whop_sdk/models/experience_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/experience_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/experience_update_params.rbi +8 -0
- data/rbi/whop_sdk/models/fee_markup_create_params.rbi +83 -0
- data/rbi/whop_sdk/models/fee_markup_create_response.rbi +89 -0
- data/rbi/whop_sdk/models/fee_markup_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/fee_markup_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/fee_markup_list_params.rbi +77 -0
- data/rbi/whop_sdk/models/fee_markup_list_response.rbi +89 -0
- data/rbi/whop_sdk/models/fee_markup_type.rbi +37 -0
- 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 +14 -0
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
- data/rbi/whop_sdk/resources/experiences.rbi +6 -0
- data/rbi/whop_sdk/resources/fee_markups.rbi +96 -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 +4 -0
- data/sig/whop_sdk/models/checkout_configuration.rbs +5 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
- data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +5 -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/experience.rbs +5 -0
- data/sig/whop_sdk/models/experience_create_params.rbs +11 -1
- data/sig/whop_sdk/models/experience_list_response.rbs +5 -0
- data/sig/whop_sdk/models/experience_update_params.rbs +5 -0
- data/sig/whop_sdk/models/fee_markup_create_params.rbs +51 -0
- data/sig/whop_sdk/models/fee_markup_create_response.rbs +50 -0
- data/sig/whop_sdk/models/fee_markup_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/fee_markup_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/fee_markup_list_params.rbs +46 -0
- data/sig/whop_sdk/models/fee_markup_list_response.rbs +50 -0
- data/sig/whop_sdk/models/fee_markup_type.rbs +22 -0
- 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 +14 -0
- data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
- data/sig/whop_sdk/resources/experiences.rbs +2 -0
- data/sig/whop_sdk/resources/fee_markups.rbs +28 -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 +47 -2
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class PaymentListFeesResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
WhopSDK::Models::PaymentListFeesResponse,
|
|
10
|
+
WhopSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The value or amount to display for the fee.
|
|
15
|
+
sig { returns(Float) }
|
|
16
|
+
attr_accessor :amount
|
|
17
|
+
|
|
18
|
+
# The currency of the fee.
|
|
19
|
+
sig { returns(WhopSDK::Currency::TaggedSymbol) }
|
|
20
|
+
attr_accessor :currency
|
|
21
|
+
|
|
22
|
+
# The label to display for the fee.
|
|
23
|
+
sig { returns(String) }
|
|
24
|
+
attr_accessor :name
|
|
25
|
+
|
|
26
|
+
# The specific origin of the fee, if applicable.
|
|
27
|
+
sig do
|
|
28
|
+
returns(WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol)
|
|
29
|
+
end
|
|
30
|
+
attr_accessor :type
|
|
31
|
+
|
|
32
|
+
# Represents a fee related to a payment
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
amount: Float,
|
|
36
|
+
currency: WhopSDK::Currency::OrSymbol,
|
|
37
|
+
name: String,
|
|
38
|
+
type: WhopSDK::Models::PaymentListFeesResponse::Type::OrSymbol
|
|
39
|
+
).returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
# The value or amount to display for the fee.
|
|
43
|
+
amount:,
|
|
44
|
+
# The currency of the fee.
|
|
45
|
+
currency:,
|
|
46
|
+
# The label to display for the fee.
|
|
47
|
+
name:,
|
|
48
|
+
# The specific origin of the fee, if applicable.
|
|
49
|
+
type:
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
override.returns(
|
|
55
|
+
{
|
|
56
|
+
amount: Float,
|
|
57
|
+
currency: WhopSDK::Currency::TaggedSymbol,
|
|
58
|
+
name: String,
|
|
59
|
+
type: WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
def to_hash
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# The specific origin of the fee, if applicable.
|
|
67
|
+
module Type
|
|
68
|
+
extend WhopSDK::Internal::Type::Enum
|
|
69
|
+
|
|
70
|
+
TaggedSymbol =
|
|
71
|
+
T.type_alias do
|
|
72
|
+
T.all(Symbol, WhopSDK::Models::PaymentListFeesResponse::Type)
|
|
73
|
+
end
|
|
74
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
75
|
+
|
|
76
|
+
STRIPE_DOMESTIC_PROCESSING_FEE =
|
|
77
|
+
T.let(
|
|
78
|
+
:stripe_domestic_processing_fee,
|
|
79
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
80
|
+
)
|
|
81
|
+
STRIPE_INTERNATIONAL_PROCESSING_FEE =
|
|
82
|
+
T.let(
|
|
83
|
+
:stripe_international_processing_fee,
|
|
84
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
85
|
+
)
|
|
86
|
+
STRIPE_FIXED_PROCESSING_FEE =
|
|
87
|
+
T.let(
|
|
88
|
+
:stripe_fixed_processing_fee,
|
|
89
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
90
|
+
)
|
|
91
|
+
STRIPE_BILLING_FEE =
|
|
92
|
+
T.let(
|
|
93
|
+
:stripe_billing_fee,
|
|
94
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
95
|
+
)
|
|
96
|
+
STRIPE_RADAR_FEE =
|
|
97
|
+
T.let(
|
|
98
|
+
:stripe_radar_fee,
|
|
99
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
100
|
+
)
|
|
101
|
+
SALES_TAX_REMITTANCE =
|
|
102
|
+
T.let(
|
|
103
|
+
:sales_tax_remittance,
|
|
104
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
105
|
+
)
|
|
106
|
+
SALES_TAX_REMITTANCE_REVERSAL =
|
|
107
|
+
T.let(
|
|
108
|
+
:sales_tax_remittance_reversal,
|
|
109
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
110
|
+
)
|
|
111
|
+
STRIPE_SALES_TAX_FEE =
|
|
112
|
+
T.let(
|
|
113
|
+
:stripe_sales_tax_fee,
|
|
114
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
115
|
+
)
|
|
116
|
+
WHOP_PROCESSING_FEE =
|
|
117
|
+
T.let(
|
|
118
|
+
:whop_processing_fee,
|
|
119
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
120
|
+
)
|
|
121
|
+
MARKETPLACE_AFFILIATE_FEE =
|
|
122
|
+
T.let(
|
|
123
|
+
:marketplace_affiliate_fee,
|
|
124
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
125
|
+
)
|
|
126
|
+
AFFILIATE_FEE =
|
|
127
|
+
T.let(
|
|
128
|
+
:affiliate_fee,
|
|
129
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
130
|
+
)
|
|
131
|
+
CRYPTO_FEE =
|
|
132
|
+
T.let(
|
|
133
|
+
:crypto_fee,
|
|
134
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
135
|
+
)
|
|
136
|
+
STRIPE_STANDARD_PROCESSING_FEE =
|
|
137
|
+
T.let(
|
|
138
|
+
:stripe_standard_processing_fee,
|
|
139
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
140
|
+
)
|
|
141
|
+
PAYPAL_FEE =
|
|
142
|
+
T.let(
|
|
143
|
+
:paypal_fee,
|
|
144
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
145
|
+
)
|
|
146
|
+
STRIPE_PAYOUT_FEE =
|
|
147
|
+
T.let(
|
|
148
|
+
:stripe_payout_fee,
|
|
149
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
150
|
+
)
|
|
151
|
+
DISPUTE_FEE =
|
|
152
|
+
T.let(
|
|
153
|
+
:dispute_fee,
|
|
154
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
155
|
+
)
|
|
156
|
+
DISPUTE_ALERT_FEE =
|
|
157
|
+
T.let(
|
|
158
|
+
:dispute_alert_fee,
|
|
159
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
160
|
+
)
|
|
161
|
+
APPLE_PROCESSING_FEE =
|
|
162
|
+
T.let(
|
|
163
|
+
:apple_processing_fee,
|
|
164
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
165
|
+
)
|
|
166
|
+
BUYER_FEE =
|
|
167
|
+
T.let(
|
|
168
|
+
:buyer_fee,
|
|
169
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
170
|
+
)
|
|
171
|
+
SEZZLE_PROCESSING_FEE =
|
|
172
|
+
T.let(
|
|
173
|
+
:sezzle_processing_fee,
|
|
174
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
175
|
+
)
|
|
176
|
+
SPLITIT_PROCESSING_FEE =
|
|
177
|
+
T.let(
|
|
178
|
+
:splitit_processing_fee,
|
|
179
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
180
|
+
)
|
|
181
|
+
PLATFORM_BALANCE_PROCESSING_FEE =
|
|
182
|
+
T.let(
|
|
183
|
+
:platform_balance_processing_fee,
|
|
184
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
185
|
+
)
|
|
186
|
+
PAYMENT_PROCESSING_PERCENTAGE_FEE =
|
|
187
|
+
T.let(
|
|
188
|
+
:payment_processing_percentage_fee,
|
|
189
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
190
|
+
)
|
|
191
|
+
PAYMENT_PROCESSING_FIXED_FEE =
|
|
192
|
+
T.let(
|
|
193
|
+
:payment_processing_fixed_fee,
|
|
194
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
195
|
+
)
|
|
196
|
+
CROSS_BORDER_PERCENTAGE_FEE =
|
|
197
|
+
T.let(
|
|
198
|
+
:cross_border_percentage_fee,
|
|
199
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
200
|
+
)
|
|
201
|
+
FX_PERCENTAGE_FEE =
|
|
202
|
+
T.let(
|
|
203
|
+
:fx_percentage_fee,
|
|
204
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
205
|
+
)
|
|
206
|
+
ORCHESTRATION_PERCENTAGE_FEE =
|
|
207
|
+
T.let(
|
|
208
|
+
:orchestration_percentage_fee,
|
|
209
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
210
|
+
)
|
|
211
|
+
THREE_DS_FIXED_FEE =
|
|
212
|
+
T.let(
|
|
213
|
+
:three_ds_fixed_fee,
|
|
214
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
215
|
+
)
|
|
216
|
+
BILLING_PERCENTAGE_FEE =
|
|
217
|
+
T.let(
|
|
218
|
+
:billing_percentage_fee,
|
|
219
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
220
|
+
)
|
|
221
|
+
REVSHARE_PERCENTAGE_FEE =
|
|
222
|
+
T.let(
|
|
223
|
+
:revshare_percentage_fee,
|
|
224
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
sig do
|
|
228
|
+
override.returns(
|
|
229
|
+
T::Array[
|
|
230
|
+
WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
|
|
231
|
+
]
|
|
232
|
+
)
|
|
233
|
+
end
|
|
234
|
+
def self.values
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
end
|
|
@@ -2,135 +2,357 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
# A payment method with no additional properties
|
|
6
|
+
module PaymentMethodListResponse
|
|
7
|
+
extend WhopSDK::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
Variants =
|
|
7
10
|
T.type_alias do
|
|
8
11
|
T.any(
|
|
9
|
-
WhopSDK::Models::PaymentMethodListResponse,
|
|
10
|
-
WhopSDK::
|
|
12
|
+
WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod,
|
|
13
|
+
WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod,
|
|
14
|
+
WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod
|
|
11
15
|
)
|
|
12
16
|
end
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
attr_reader :card
|
|
18
|
+
class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
19
|
+
OrHash =
|
|
20
|
+
T.type_alias do
|
|
21
|
+
T.any(
|
|
22
|
+
WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod,
|
|
23
|
+
WhopSDK::Internal::AnyHash
|
|
24
|
+
)
|
|
25
|
+
end
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card::OrHash)
|
|
28
|
-
).void
|
|
29
|
-
end
|
|
30
|
-
attr_writer :card
|
|
27
|
+
# The ID of the payment method
|
|
28
|
+
sig { returns(String) }
|
|
29
|
+
attr_accessor :id
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
# When the payment method was created
|
|
32
|
+
sig { returns(Time) }
|
|
33
|
+
attr_accessor :created_at
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
# The type of the payment method
|
|
36
|
+
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
37
|
+
attr_accessor :payment_method_type
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
params(
|
|
44
|
-
id: String,
|
|
45
|
-
card:
|
|
46
|
-
T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card::OrHash),
|
|
47
|
-
created_at: Time,
|
|
48
|
-
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
|
|
49
|
-
).returns(T.attached_class)
|
|
50
|
-
end
|
|
51
|
-
def self.new(
|
|
52
|
-
# The ID of the payment method
|
|
53
|
-
id:,
|
|
54
|
-
# The card data associated with the payment method, if its a debit or credit card.
|
|
55
|
-
card:,
|
|
56
|
-
# The date and time the payment method was created
|
|
57
|
-
created_at:,
|
|
58
|
-
# The payment method type of the payment method
|
|
59
|
-
payment_method_type:
|
|
60
|
-
)
|
|
61
|
-
end
|
|
39
|
+
# The typename of this object
|
|
40
|
+
sig { returns(Symbol) }
|
|
41
|
+
attr_accessor :typename
|
|
62
42
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
43
|
+
# A payment method with no additional properties
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
66
46
|
id: String,
|
|
67
|
-
card: T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card),
|
|
68
47
|
created_at: Time,
|
|
69
|
-
payment_method_type: WhopSDK::PaymentMethodTypes::
|
|
70
|
-
|
|
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
|
|
71
61
|
)
|
|
72
|
-
|
|
73
|
-
|
|
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
|
|
74
76
|
end
|
|
75
77
|
|
|
76
|
-
class
|
|
78
|
+
class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
77
79
|
OrHash =
|
|
78
80
|
T.type_alias do
|
|
79
81
|
T.any(
|
|
80
|
-
WhopSDK::Models::PaymentMethodListResponse::
|
|
82
|
+
WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod,
|
|
81
83
|
WhopSDK::Internal::AnyHash
|
|
82
84
|
)
|
|
83
85
|
end
|
|
84
86
|
|
|
85
|
-
#
|
|
86
|
-
sig { returns(
|
|
87
|
-
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::PaymentMethodListResponse::CardPaymentMethod::Card
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
attr_reader :card
|
|
98
|
+
|
|
99
|
+
sig do
|
|
100
|
+
params(
|
|
101
|
+
card:
|
|
102
|
+
WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod::Card::OrHash
|
|
103
|
+
).void
|
|
104
|
+
end
|
|
105
|
+
attr_writer :card
|
|
88
106
|
|
|
89
|
-
#
|
|
90
|
-
sig { returns(
|
|
91
|
-
attr_accessor :
|
|
107
|
+
# When the payment method was created
|
|
108
|
+
sig { returns(Time) }
|
|
109
|
+
attr_accessor :created_at
|
|
92
110
|
|
|
93
|
-
#
|
|
94
|
-
sig { returns(
|
|
95
|
-
attr_accessor :
|
|
111
|
+
# The type of the payment method
|
|
112
|
+
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
113
|
+
attr_accessor :payment_method_type
|
|
96
114
|
|
|
97
|
-
#
|
|
98
|
-
sig { returns(
|
|
99
|
-
attr_accessor :
|
|
115
|
+
# The typename of this object
|
|
116
|
+
sig { returns(Symbol) }
|
|
117
|
+
attr_accessor :typename
|
|
100
118
|
|
|
101
|
-
# The card
|
|
119
|
+
# The card for the payment method
|
|
102
120
|
sig do
|
|
103
121
|
params(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
id: String,
|
|
123
|
+
card:
|
|
124
|
+
WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod::Card::OrHash,
|
|
125
|
+
created_at: Time,
|
|
126
|
+
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol,
|
|
127
|
+
typename: Symbol
|
|
108
128
|
).returns(T.attached_class)
|
|
109
129
|
end
|
|
110
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::PaymentMethodListResponse::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::PaymentMethodListResponse::CardPaymentMethod::Card,
|
|
164
|
+
WhopSDK::Internal::AnyHash
|
|
165
|
+
)
|
|
166
|
+
end
|
|
167
|
+
|
|
111
168
|
# Possible card brands that a payment token can have
|
|
112
|
-
|
|
169
|
+
sig { returns(T.nilable(WhopSDK::CardBrands::TaggedSymbol)) }
|
|
170
|
+
attr_accessor :brand
|
|
171
|
+
|
|
113
172
|
# Card expiration month, like 03 for March.
|
|
114
|
-
|
|
173
|
+
sig { returns(T.nilable(Integer)) }
|
|
174
|
+
attr_accessor :exp_month
|
|
175
|
+
|
|
115
176
|
# Card expiration year, like 27 for 2027.
|
|
116
|
-
|
|
177
|
+
sig { returns(T.nilable(Integer)) }
|
|
178
|
+
attr_accessor :exp_year
|
|
179
|
+
|
|
117
180
|
# Last four digits of the card.
|
|
118
|
-
|
|
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::PaymentMethodListResponse::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::PaymentMethodListResponse::UsBankAccountPaymentMethod::UsBankAccount
|
|
249
|
+
)
|
|
250
|
+
end
|
|
251
|
+
attr_reader :us_bank_account
|
|
252
|
+
|
|
253
|
+
sig do
|
|
254
|
+
params(
|
|
255
|
+
us_bank_account:
|
|
256
|
+
WhopSDK::Models::PaymentMethodListResponse::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::PaymentMethodListResponse::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
|
|
119
283
|
)
|
|
120
284
|
end
|
|
121
285
|
|
|
122
286
|
sig do
|
|
123
287
|
override.returns(
|
|
124
288
|
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
289
|
+
id: String,
|
|
290
|
+
created_at: Time,
|
|
291
|
+
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol,
|
|
292
|
+
typename: Symbol,
|
|
293
|
+
us_bank_account:
|
|
294
|
+
WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod::UsBankAccount
|
|
129
295
|
}
|
|
130
296
|
)
|
|
131
297
|
end
|
|
132
298
|
def to_hash
|
|
133
299
|
end
|
|
300
|
+
|
|
301
|
+
class UsBankAccount < WhopSDK::Internal::Type::BaseModel
|
|
302
|
+
OrHash =
|
|
303
|
+
T.type_alias do
|
|
304
|
+
T.any(
|
|
305
|
+
WhopSDK::Models::PaymentMethodListResponse::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::PaymentMethodListResponse::Variants]
|
|
353
|
+
)
|
|
354
|
+
end
|
|
355
|
+
def self.variants
|
|
134
356
|
end
|
|
135
357
|
end
|
|
136
358
|
end
|