whop_sdk 0.0.9 → 0.0.11
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 +23 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +8 -0
- data/lib/whop_sdk/internal/type/union.rb +12 -0
- data/lib/whop_sdk/models/app_build_create_params.rb +9 -1
- data/lib/whop_sdk/models/invoice_create_params.rb +10 -1
- data/lib/whop_sdk/models/payment.rb +88 -1
- data/lib/whop_sdk/models/payment_create_params.rb +307 -0
- data/lib/whop_sdk/models/payment_list_response.rb +88 -1
- data/lib/whop_sdk/models/payment_method_list_params.rb +78 -0
- data/lib/whop_sdk/models/payment_method_list_response.rb +85 -0
- data/lib/whop_sdk/models/payment_method_retrieve_params.rb +22 -0
- data/lib/whop_sdk/models/payment_method_retrieve_response.rb +85 -0
- data/lib/whop_sdk/models/setup_intent.rb +251 -0
- data/lib/whop_sdk/models/setup_intent_canceled_webhook_event.rb +52 -0
- data/lib/whop_sdk/models/setup_intent_list_params.rb +78 -0
- data/lib/whop_sdk/models/setup_intent_list_response.rb +253 -0
- data/lib/whop_sdk/models/setup_intent_requires_action_webhook_event.rb +52 -0
- data/lib/whop_sdk/models/setup_intent_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/setup_intent_status.rb +18 -0
- data/lib/whop_sdk/models/setup_intent_succeeded_webhook_event.rb +52 -0
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +28 -19
- data/lib/whop_sdk/models.rb +20 -0
- data/lib/whop_sdk/resources/app_builds.rb +3 -1
- data/lib/whop_sdk/resources/invoices.rb +3 -1
- data/lib/whop_sdk/resources/payment_methods.rb +91 -0
- data/lib/whop_sdk/resources/payments.rb +50 -0
- data/lib/whop_sdk/resources/setup_intents.rb +91 -0
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- 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/app_build_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/invoice_create_params.rbi +10 -0
- data/rbi/whop_sdk/models/payment.rbi +139 -0
- data/rbi/whop_sdk/models/payment_create_params.rbi +384 -0
- data/rbi/whop_sdk/models/payment_list_response.rbi +164 -0
- data/rbi/whop_sdk/models/payment_method_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/payment_method_list_response.rbi +137 -0
- data/rbi/whop_sdk/models/payment_method_retrieve_params.rbi +43 -0
- data/rbi/whop_sdk/models/payment_method_retrieve_response.rbi +142 -0
- data/rbi/whop_sdk/models/setup_intent.rbi +410 -0
- data/rbi/whop_sdk/models/setup_intent_canceled_webhook_event.rbi +77 -0
- data/rbi/whop_sdk/models/setup_intent_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/setup_intent_list_response.rbi +491 -0
- data/rbi/whop_sdk/models/setup_intent_requires_action_webhook_event.rbi +77 -0
- data/rbi/whop_sdk/models/setup_intent_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/setup_intent_status.rbi +25 -0
- data/rbi/whop_sdk/models/setup_intent_succeeded_webhook_event.rbi +77 -0
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -0
- data/rbi/whop_sdk/models.rbi +23 -0
- data/rbi/whop_sdk/resources/app_builds.rbi +3 -0
- data/rbi/whop_sdk/resources/invoices.rbi +4 -0
- data/rbi/whop_sdk/resources/payment_methods.rbi +84 -0
- data/rbi/whop_sdk/resources/payments.rbi +44 -0
- data/rbi/whop_sdk/resources/setup_intents.rbi +85 -0
- data/rbi/whop_sdk/resources/webhooks.rbi +3 -0
- data/sig/whop_sdk/client.rbs +4 -0
- data/sig/whop_sdk/models/app_build_create_params.rbs +5 -0
- data/sig/whop_sdk/models/invoice_create_params.rbs +5 -0
- data/sig/whop_sdk/models/payment.rbs +69 -0
- data/sig/whop_sdk/models/payment_create_params.rbs +210 -0
- data/sig/whop_sdk/models/payment_list_response.rbs +69 -0
- data/sig/whop_sdk/models/payment_method_list_params.rbs +61 -0
- data/sig/whop_sdk/models/payment_method_list_response.rbs +67 -0
- data/sig/whop_sdk/models/payment_method_retrieve_params.rbs +23 -0
- data/sig/whop_sdk/models/payment_method_retrieve_response.rbs +67 -0
- data/sig/whop_sdk/models/setup_intent.rbs +189 -0
- data/sig/whop_sdk/models/setup_intent_canceled_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/setup_intent_list_params.rbs +61 -0
- data/sig/whop_sdk/models/setup_intent_list_response.rbs +193 -0
- data/sig/whop_sdk/models/setup_intent_requires_action_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/setup_intent_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/setup_intent_status.rbs +17 -0
- data/sig/whop_sdk/models/setup_intent_succeeded_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +3 -0
- data/sig/whop_sdk/models.rbs +20 -0
- data/sig/whop_sdk/resources/app_builds.rbs +1 -0
- data/sig/whop_sdk/resources/invoices.rbs +1 -0
- data/sig/whop_sdk/resources/payment_methods.rbs +25 -0
- data/sig/whop_sdk/resources/payments.rbs +9 -0
- data/sig/whop_sdk/resources/setup_intents.rbs +24 -0
- data/sig/whop_sdk/resources/webhooks.rbs +3 -0
- metadata +47 -2
|
@@ -19,6 +19,7 @@ module WhopSDK
|
|
|
19
19
|
membership: WhopSDK::Models::PaymentListResponse::Membership?,
|
|
20
20
|
metadata: ::Hash[Symbol, top]?,
|
|
21
21
|
paid_at: Time?,
|
|
22
|
+
payment_method: WhopSDK::Models::PaymentListResponse::PaymentMethod?,
|
|
22
23
|
payment_method_type: WhopSDK::Models::payment_method_types?,
|
|
23
24
|
plan: WhopSDK::Models::PaymentListResponse::Plan?,
|
|
24
25
|
product: WhopSDK::Models::PaymentListResponse::Product?,
|
|
@@ -71,6 +72,8 @@ module WhopSDK
|
|
|
71
72
|
|
|
72
73
|
attr_accessor paid_at: Time?
|
|
73
74
|
|
|
75
|
+
attr_accessor payment_method: WhopSDK::Models::PaymentListResponse::PaymentMethod?
|
|
76
|
+
|
|
74
77
|
attr_accessor payment_method_type: WhopSDK::Models::payment_method_types?
|
|
75
78
|
|
|
76
79
|
attr_accessor plan: WhopSDK::Models::PaymentListResponse::Plan?
|
|
@@ -119,6 +122,7 @@ module WhopSDK
|
|
|
119
122
|
membership: WhopSDK::Models::PaymentListResponse::Membership?,
|
|
120
123
|
metadata: ::Hash[Symbol, top]?,
|
|
121
124
|
paid_at: Time?,
|
|
125
|
+
payment_method: WhopSDK::Models::PaymentListResponse::PaymentMethod?,
|
|
122
126
|
payment_method_type: WhopSDK::Models::payment_method_types?,
|
|
123
127
|
plan: WhopSDK::Models::PaymentListResponse::Plan?,
|
|
124
128
|
product: WhopSDK::Models::PaymentListResponse::Product?,
|
|
@@ -154,6 +158,7 @@ module WhopSDK
|
|
|
154
158
|
membership: WhopSDK::Models::PaymentListResponse::Membership?,
|
|
155
159
|
metadata: ::Hash[Symbol, top]?,
|
|
156
160
|
paid_at: Time?,
|
|
161
|
+
payment_method: WhopSDK::Models::PaymentListResponse::PaymentMethod?,
|
|
157
162
|
payment_method_type: WhopSDK::Models::payment_method_types?,
|
|
158
163
|
plan: WhopSDK::Models::PaymentListResponse::Plan?,
|
|
159
164
|
product: WhopSDK::Models::PaymentListResponse::Product?,
|
|
@@ -263,6 +268,70 @@ module WhopSDK
|
|
|
263
268
|
}
|
|
264
269
|
end
|
|
265
270
|
|
|
271
|
+
type payment_method =
|
|
272
|
+
{
|
|
273
|
+
id: String,
|
|
274
|
+
card: WhopSDK::Models::PaymentListResponse::PaymentMethod::Card?,
|
|
275
|
+
created_at: Time,
|
|
276
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
280
|
+
attr_accessor id: String
|
|
281
|
+
|
|
282
|
+
attr_accessor card: WhopSDK::Models::PaymentListResponse::PaymentMethod::Card?
|
|
283
|
+
|
|
284
|
+
attr_accessor created_at: Time
|
|
285
|
+
|
|
286
|
+
attr_accessor payment_method_type: WhopSDK::Models::payment_method_types
|
|
287
|
+
|
|
288
|
+
def initialize: (
|
|
289
|
+
id: String,
|
|
290
|
+
card: WhopSDK::Models::PaymentListResponse::PaymentMethod::Card?,
|
|
291
|
+
created_at: Time,
|
|
292
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
293
|
+
) -> void
|
|
294
|
+
|
|
295
|
+
def to_hash: -> {
|
|
296
|
+
id: String,
|
|
297
|
+
card: WhopSDK::Models::PaymentListResponse::PaymentMethod::Card?,
|
|
298
|
+
created_at: Time,
|
|
299
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
type card =
|
|
303
|
+
{
|
|
304
|
+
brand: WhopSDK::Models::card_brands?,
|
|
305
|
+
exp_month: Integer?,
|
|
306
|
+
exp_year: Integer?,
|
|
307
|
+
:last4 => String?
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
311
|
+
attr_accessor brand: WhopSDK::Models::card_brands?
|
|
312
|
+
|
|
313
|
+
attr_accessor exp_month: Integer?
|
|
314
|
+
|
|
315
|
+
attr_accessor exp_year: Integer?
|
|
316
|
+
|
|
317
|
+
attr_accessor last4: String?
|
|
318
|
+
|
|
319
|
+
def initialize: (
|
|
320
|
+
brand: WhopSDK::Models::card_brands?,
|
|
321
|
+
exp_month: Integer?,
|
|
322
|
+
exp_year: Integer?,
|
|
323
|
+
last4: String?
|
|
324
|
+
) -> void
|
|
325
|
+
|
|
326
|
+
def to_hash: -> {
|
|
327
|
+
brand: WhopSDK::Models::card_brands?,
|
|
328
|
+
exp_month: Integer?,
|
|
329
|
+
exp_year: Integer?,
|
|
330
|
+
:last4 => String?
|
|
331
|
+
}
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
|
|
266
335
|
type plan = { id: String }
|
|
267
336
|
|
|
268
337
|
class Plan < WhopSDK::Internal::Type::BaseModel
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type payment_method_list_params =
|
|
4
|
+
{
|
|
5
|
+
member_id: String,
|
|
6
|
+
after: String?,
|
|
7
|
+
before: String?,
|
|
8
|
+
created_after: Time?,
|
|
9
|
+
created_before: Time?,
|
|
10
|
+
direction: WhopSDK::Models::direction?,
|
|
11
|
+
first: Integer?,
|
|
12
|
+
last: Integer?
|
|
13
|
+
}
|
|
14
|
+
& WhopSDK::Internal::Type::request_parameters
|
|
15
|
+
|
|
16
|
+
class PaymentMethodListParams < WhopSDK::Internal::Type::BaseModel
|
|
17
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
18
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
19
|
+
|
|
20
|
+
attr_accessor member_id: String
|
|
21
|
+
|
|
22
|
+
attr_accessor after: String?
|
|
23
|
+
|
|
24
|
+
attr_accessor before: String?
|
|
25
|
+
|
|
26
|
+
attr_accessor created_after: Time?
|
|
27
|
+
|
|
28
|
+
attr_accessor created_before: Time?
|
|
29
|
+
|
|
30
|
+
attr_accessor direction: WhopSDK::Models::direction?
|
|
31
|
+
|
|
32
|
+
attr_accessor first: Integer?
|
|
33
|
+
|
|
34
|
+
attr_accessor last: Integer?
|
|
35
|
+
|
|
36
|
+
def initialize: (
|
|
37
|
+
member_id: String,
|
|
38
|
+
?after: String?,
|
|
39
|
+
?before: String?,
|
|
40
|
+
?created_after: Time?,
|
|
41
|
+
?created_before: Time?,
|
|
42
|
+
?direction: WhopSDK::Models::direction?,
|
|
43
|
+
?first: Integer?,
|
|
44
|
+
?last: Integer?,
|
|
45
|
+
?request_options: WhopSDK::request_opts
|
|
46
|
+
) -> void
|
|
47
|
+
|
|
48
|
+
def to_hash: -> {
|
|
49
|
+
member_id: String,
|
|
50
|
+
after: String?,
|
|
51
|
+
before: String?,
|
|
52
|
+
created_after: Time?,
|
|
53
|
+
created_before: Time?,
|
|
54
|
+
direction: WhopSDK::Models::direction?,
|
|
55
|
+
first: Integer?,
|
|
56
|
+
last: Integer?,
|
|
57
|
+
request_options: WhopSDK::RequestOptions
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type payment_method_list_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
card: WhopSDK::Models::PaymentMethodListResponse::Card?,
|
|
7
|
+
created_at: Time,
|
|
8
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class PaymentMethodListResponse < WhopSDK::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor id: String
|
|
13
|
+
|
|
14
|
+
attr_accessor card: WhopSDK::Models::PaymentMethodListResponse::Card?
|
|
15
|
+
|
|
16
|
+
attr_accessor created_at: Time
|
|
17
|
+
|
|
18
|
+
attr_accessor payment_method_type: WhopSDK::Models::payment_method_types
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
id: String,
|
|
22
|
+
card: WhopSDK::Models::PaymentMethodListResponse::Card?,
|
|
23
|
+
created_at: Time,
|
|
24
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
id: String,
|
|
29
|
+
card: WhopSDK::Models::PaymentMethodListResponse::Card?,
|
|
30
|
+
created_at: Time,
|
|
31
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type card =
|
|
35
|
+
{
|
|
36
|
+
brand: WhopSDK::Models::card_brands?,
|
|
37
|
+
exp_month: Integer?,
|
|
38
|
+
exp_year: Integer?,
|
|
39
|
+
:last4 => String?
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
43
|
+
attr_accessor brand: WhopSDK::Models::card_brands?
|
|
44
|
+
|
|
45
|
+
attr_accessor exp_month: Integer?
|
|
46
|
+
|
|
47
|
+
attr_accessor exp_year: Integer?
|
|
48
|
+
|
|
49
|
+
attr_accessor last4: String?
|
|
50
|
+
|
|
51
|
+
def initialize: (
|
|
52
|
+
brand: WhopSDK::Models::card_brands?,
|
|
53
|
+
exp_month: Integer?,
|
|
54
|
+
exp_year: Integer?,
|
|
55
|
+
last4: String?
|
|
56
|
+
) -> void
|
|
57
|
+
|
|
58
|
+
def to_hash: -> {
|
|
59
|
+
brand: WhopSDK::Models::card_brands?,
|
|
60
|
+
exp_month: Integer?,
|
|
61
|
+
exp_year: Integer?,
|
|
62
|
+
:last4 => String?
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type payment_method_retrieve_params =
|
|
4
|
+
{ member_id: String } & WhopSDK::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class PaymentMethodRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor member_id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
member_id: String,
|
|
14
|
+
?request_options: WhopSDK::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
member_id: String,
|
|
19
|
+
request_options: WhopSDK::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type payment_method_retrieve_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
card: WhopSDK::Models::PaymentMethodRetrieveResponse::Card?,
|
|
7
|
+
created_at: Time,
|
|
8
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class PaymentMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor id: String
|
|
13
|
+
|
|
14
|
+
attr_accessor card: WhopSDK::Models::PaymentMethodRetrieveResponse::Card?
|
|
15
|
+
|
|
16
|
+
attr_accessor created_at: Time
|
|
17
|
+
|
|
18
|
+
attr_accessor payment_method_type: WhopSDK::Models::payment_method_types
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
id: String,
|
|
22
|
+
card: WhopSDK::Models::PaymentMethodRetrieveResponse::Card?,
|
|
23
|
+
created_at: Time,
|
|
24
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
id: String,
|
|
29
|
+
card: WhopSDK::Models::PaymentMethodRetrieveResponse::Card?,
|
|
30
|
+
created_at: Time,
|
|
31
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type card =
|
|
35
|
+
{
|
|
36
|
+
brand: WhopSDK::Models::card_brands?,
|
|
37
|
+
exp_month: Integer?,
|
|
38
|
+
exp_year: Integer?,
|
|
39
|
+
:last4 => String?
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
43
|
+
attr_accessor brand: WhopSDK::Models::card_brands?
|
|
44
|
+
|
|
45
|
+
attr_accessor exp_month: Integer?
|
|
46
|
+
|
|
47
|
+
attr_accessor exp_year: Integer?
|
|
48
|
+
|
|
49
|
+
attr_accessor last4: String?
|
|
50
|
+
|
|
51
|
+
def initialize: (
|
|
52
|
+
brand: WhopSDK::Models::card_brands?,
|
|
53
|
+
exp_month: Integer?,
|
|
54
|
+
exp_year: Integer?,
|
|
55
|
+
last4: String?
|
|
56
|
+
) -> void
|
|
57
|
+
|
|
58
|
+
def to_hash: -> {
|
|
59
|
+
brand: WhopSDK::Models::card_brands?,
|
|
60
|
+
exp_month: Integer?,
|
|
61
|
+
exp_year: Integer?,
|
|
62
|
+
:last4 => String?
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type setup_intent =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
checkout_configuration: WhopSDK::SetupIntent::CheckoutConfiguration?,
|
|
7
|
+
company: WhopSDK::SetupIntent::Company?,
|
|
8
|
+
created_at: Time,
|
|
9
|
+
error_message: String?,
|
|
10
|
+
member: WhopSDK::SetupIntent::Member?,
|
|
11
|
+
metadata: ::Hash[Symbol, top]?,
|
|
12
|
+
payment_method: WhopSDK::SetupIntent::PaymentMethod?,
|
|
13
|
+
status: WhopSDK::Models::setup_intent_status
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class SetupIntent < WhopSDK::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor checkout_configuration: WhopSDK::SetupIntent::CheckoutConfiguration?
|
|
20
|
+
|
|
21
|
+
attr_accessor company: WhopSDK::SetupIntent::Company?
|
|
22
|
+
|
|
23
|
+
attr_accessor created_at: Time
|
|
24
|
+
|
|
25
|
+
attr_accessor error_message: String?
|
|
26
|
+
|
|
27
|
+
attr_accessor member: WhopSDK::SetupIntent::Member?
|
|
28
|
+
|
|
29
|
+
attr_accessor metadata: ::Hash[Symbol, top]?
|
|
30
|
+
|
|
31
|
+
attr_accessor payment_method: WhopSDK::SetupIntent::PaymentMethod?
|
|
32
|
+
|
|
33
|
+
attr_accessor status: WhopSDK::Models::setup_intent_status
|
|
34
|
+
|
|
35
|
+
def initialize: (
|
|
36
|
+
id: String,
|
|
37
|
+
checkout_configuration: WhopSDK::SetupIntent::CheckoutConfiguration?,
|
|
38
|
+
company: WhopSDK::SetupIntent::Company?,
|
|
39
|
+
created_at: Time,
|
|
40
|
+
error_message: String?,
|
|
41
|
+
member: WhopSDK::SetupIntent::Member?,
|
|
42
|
+
metadata: ::Hash[Symbol, top]?,
|
|
43
|
+
payment_method: WhopSDK::SetupIntent::PaymentMethod?,
|
|
44
|
+
status: WhopSDK::Models::setup_intent_status
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
id: String,
|
|
49
|
+
checkout_configuration: WhopSDK::SetupIntent::CheckoutConfiguration?,
|
|
50
|
+
company: WhopSDK::SetupIntent::Company?,
|
|
51
|
+
created_at: Time,
|
|
52
|
+
error_message: String?,
|
|
53
|
+
member: WhopSDK::SetupIntent::Member?,
|
|
54
|
+
metadata: ::Hash[Symbol, top]?,
|
|
55
|
+
payment_method: WhopSDK::SetupIntent::PaymentMethod?,
|
|
56
|
+
status: WhopSDK::Models::setup_intent_status
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
type checkout_configuration = { id: String }
|
|
60
|
+
|
|
61
|
+
class CheckoutConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
62
|
+
attr_accessor id: String
|
|
63
|
+
|
|
64
|
+
def initialize: (id: String) -> void
|
|
65
|
+
|
|
66
|
+
def to_hash: -> { id: String }
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
type company = { id: String }
|
|
70
|
+
|
|
71
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
72
|
+
attr_accessor id: String
|
|
73
|
+
|
|
74
|
+
def initialize: (id: String) -> void
|
|
75
|
+
|
|
76
|
+
def to_hash: -> { id: String }
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
type member = { id: String, user: WhopSDK::SetupIntent::Member::User? }
|
|
80
|
+
|
|
81
|
+
class Member < WhopSDK::Internal::Type::BaseModel
|
|
82
|
+
attr_accessor id: String
|
|
83
|
+
|
|
84
|
+
attr_accessor user: WhopSDK::SetupIntent::Member::User?
|
|
85
|
+
|
|
86
|
+
def initialize: (
|
|
87
|
+
id: String,
|
|
88
|
+
user: WhopSDK::SetupIntent::Member::User?
|
|
89
|
+
) -> void
|
|
90
|
+
|
|
91
|
+
def to_hash: -> {
|
|
92
|
+
id: String,
|
|
93
|
+
user: WhopSDK::SetupIntent::Member::User?
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
type user =
|
|
97
|
+
{ id: String, email: String?, name: String?, username: String }
|
|
98
|
+
|
|
99
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
100
|
+
attr_accessor id: String
|
|
101
|
+
|
|
102
|
+
attr_accessor email: String?
|
|
103
|
+
|
|
104
|
+
attr_accessor name: String?
|
|
105
|
+
|
|
106
|
+
attr_accessor username: String
|
|
107
|
+
|
|
108
|
+
def initialize: (
|
|
109
|
+
id: String,
|
|
110
|
+
email: String?,
|
|
111
|
+
name: String?,
|
|
112
|
+
username: String
|
|
113
|
+
) -> void
|
|
114
|
+
|
|
115
|
+
def to_hash: -> {
|
|
116
|
+
id: String,
|
|
117
|
+
email: String?,
|
|
118
|
+
name: String?,
|
|
119
|
+
username: String
|
|
120
|
+
}
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
type payment_method =
|
|
125
|
+
{
|
|
126
|
+
id: String,
|
|
127
|
+
card: WhopSDK::SetupIntent::PaymentMethod::Card?,
|
|
128
|
+
created_at: Time,
|
|
129
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
133
|
+
attr_accessor id: String
|
|
134
|
+
|
|
135
|
+
attr_accessor card: WhopSDK::SetupIntent::PaymentMethod::Card?
|
|
136
|
+
|
|
137
|
+
attr_accessor created_at: Time
|
|
138
|
+
|
|
139
|
+
attr_accessor payment_method_type: WhopSDK::Models::payment_method_types
|
|
140
|
+
|
|
141
|
+
def initialize: (
|
|
142
|
+
id: String,
|
|
143
|
+
card: WhopSDK::SetupIntent::PaymentMethod::Card?,
|
|
144
|
+
created_at: Time,
|
|
145
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
146
|
+
) -> void
|
|
147
|
+
|
|
148
|
+
def to_hash: -> {
|
|
149
|
+
id: String,
|
|
150
|
+
card: WhopSDK::SetupIntent::PaymentMethod::Card?,
|
|
151
|
+
created_at: Time,
|
|
152
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
type card =
|
|
156
|
+
{
|
|
157
|
+
brand: WhopSDK::Models::card_brands?,
|
|
158
|
+
exp_month: Integer?,
|
|
159
|
+
exp_year: Integer?,
|
|
160
|
+
:last4 => String?
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
164
|
+
attr_accessor brand: WhopSDK::Models::card_brands?
|
|
165
|
+
|
|
166
|
+
attr_accessor exp_month: Integer?
|
|
167
|
+
|
|
168
|
+
attr_accessor exp_year: Integer?
|
|
169
|
+
|
|
170
|
+
attr_accessor last4: String?
|
|
171
|
+
|
|
172
|
+
def initialize: (
|
|
173
|
+
brand: WhopSDK::Models::card_brands?,
|
|
174
|
+
exp_month: Integer?,
|
|
175
|
+
exp_year: Integer?,
|
|
176
|
+
last4: String?
|
|
177
|
+
) -> void
|
|
178
|
+
|
|
179
|
+
def to_hash: -> {
|
|
180
|
+
brand: WhopSDK::Models::card_brands?,
|
|
181
|
+
exp_month: Integer?,
|
|
182
|
+
exp_year: Integer?,
|
|
183
|
+
:last4 => String?
|
|
184
|
+
}
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type setup_intent_canceled_webhook_event =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
api_version: :v1,
|
|
7
|
+
data: WhopSDK::SetupIntent,
|
|
8
|
+
timestamp: Time,
|
|
9
|
+
type: :"setup_intent.canceled"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class SetupIntentCanceledWebhookEvent < WhopSDK::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor id: String
|
|
14
|
+
|
|
15
|
+
attr_accessor api_version: :v1
|
|
16
|
+
|
|
17
|
+
attr_accessor data: WhopSDK::SetupIntent
|
|
18
|
+
|
|
19
|
+
attr_accessor timestamp: Time
|
|
20
|
+
|
|
21
|
+
attr_accessor type: :"setup_intent.canceled"
|
|
22
|
+
|
|
23
|
+
def initialize: (
|
|
24
|
+
id: String,
|
|
25
|
+
data: WhopSDK::SetupIntent,
|
|
26
|
+
timestamp: Time,
|
|
27
|
+
?api_version: :v1,
|
|
28
|
+
?type: :"setup_intent.canceled"
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
id: String,
|
|
33
|
+
api_version: :v1,
|
|
34
|
+
data: WhopSDK::SetupIntent,
|
|
35
|
+
timestamp: Time,
|
|
36
|
+
type: :"setup_intent.canceled"
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type setup_intent_list_params =
|
|
4
|
+
{
|
|
5
|
+
company_id: String,
|
|
6
|
+
after: String?,
|
|
7
|
+
before: String?,
|
|
8
|
+
created_after: Time?,
|
|
9
|
+
created_before: Time?,
|
|
10
|
+
direction: WhopSDK::Models::direction?,
|
|
11
|
+
first: Integer?,
|
|
12
|
+
last: Integer?
|
|
13
|
+
}
|
|
14
|
+
& WhopSDK::Internal::Type::request_parameters
|
|
15
|
+
|
|
16
|
+
class SetupIntentListParams < WhopSDK::Internal::Type::BaseModel
|
|
17
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
18
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
19
|
+
|
|
20
|
+
attr_accessor company_id: String
|
|
21
|
+
|
|
22
|
+
attr_accessor after: String?
|
|
23
|
+
|
|
24
|
+
attr_accessor before: String?
|
|
25
|
+
|
|
26
|
+
attr_accessor created_after: Time?
|
|
27
|
+
|
|
28
|
+
attr_accessor created_before: Time?
|
|
29
|
+
|
|
30
|
+
attr_accessor direction: WhopSDK::Models::direction?
|
|
31
|
+
|
|
32
|
+
attr_accessor first: Integer?
|
|
33
|
+
|
|
34
|
+
attr_accessor last: Integer?
|
|
35
|
+
|
|
36
|
+
def initialize: (
|
|
37
|
+
company_id: String,
|
|
38
|
+
?after: String?,
|
|
39
|
+
?before: String?,
|
|
40
|
+
?created_after: Time?,
|
|
41
|
+
?created_before: Time?,
|
|
42
|
+
?direction: WhopSDK::Models::direction?,
|
|
43
|
+
?first: Integer?,
|
|
44
|
+
?last: Integer?,
|
|
45
|
+
?request_options: WhopSDK::request_opts
|
|
46
|
+
) -> void
|
|
47
|
+
|
|
48
|
+
def to_hash: -> {
|
|
49
|
+
company_id: String,
|
|
50
|
+
after: String?,
|
|
51
|
+
before: String?,
|
|
52
|
+
created_after: Time?,
|
|
53
|
+
created_before: Time?,
|
|
54
|
+
direction: WhopSDK::Models::direction?,
|
|
55
|
+
first: Integer?,
|
|
56
|
+
last: Integer?,
|
|
57
|
+
request_options: WhopSDK::RequestOptions
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|