whop_sdk 0.0.10 → 0.0.12
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 +3 -3
- data/lib/whop_sdk/internal/type/union.rb +12 -0
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
- data/lib/whop_sdk/models/invoice_create_params.rb +10 -1
- data/lib/whop_sdk/models/payment.rb +25 -27
- data/lib/whop_sdk/models/payment_create_params.rb +5 -5
- data/lib/whop_sdk/models/payment_list_response.rb +25 -27
- data/lib/whop_sdk/models/{payment_token_list_params.rb → payment_method_list_params.rb} +4 -4
- data/lib/whop_sdk/models/{payment_token_list_response.rb → payment_method_list_response.rb} +17 -18
- data/lib/whop_sdk/models/{payment_token_retrieve_params.rb → payment_method_retrieve_params.rb} +4 -4
- data/lib/whop_sdk/models/{payment_token_retrieve_response.rb → payment_method_retrieve_response.rb} +17 -18
- data/lib/whop_sdk/models/plan.rb +9 -1
- data/lib/whop_sdk/models/plan_create_params.rb +9 -1
- data/lib/whop_sdk/models/plan_list_response.rb +9 -1
- data/lib/whop_sdk/models/product_create_params.rb +2 -2
- data/lib/whop_sdk/models/setup_intent.rb +22 -24
- data/lib/whop_sdk/models/setup_intent_list_response.rb +22 -24
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +29 -22
- data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +309 -0
- data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +111 -166
- data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +309 -0
- data/lib/whop_sdk/models.rb +8 -4
- data/lib/whop_sdk/resources/invoices.rb +3 -1
- data/lib/whop_sdk/resources/{payment_tokens.rb → payment_methods.rb} +24 -16
- data/lib/whop_sdk/resources/payments.rb +7 -5
- data/lib/whop_sdk/resources/plans.rb +3 -1
- data/lib/whop_sdk/resources/products.rb +1 -1
- data/lib/whop_sdk/resources/setup_intents.rb +10 -2
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +7 -5
- data/rbi/whop_sdk/client.rbi +2 -2
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/invoice_create_params.rbi +10 -0
- data/rbi/whop_sdk/models/payment.rbi +30 -33
- data/rbi/whop_sdk/models/payment_create_params.rbi +6 -6
- data/rbi/whop_sdk/models/payment_list_response.rbi +34 -37
- data/rbi/whop_sdk/models/{payment_token_list_params.rbi → payment_method_list_params.rbi} +4 -4
- data/rbi/whop_sdk/models/{payment_token_list_response.rbi → payment_method_list_response.rbi} +18 -20
- data/rbi/whop_sdk/models/{payment_token_retrieve_params.rbi → payment_method_retrieve_params.rbi} +7 -4
- data/rbi/whop_sdk/models/{payment_token_retrieve_response.rbi → payment_method_retrieve_response.rbi} +18 -20
- data/rbi/whop_sdk/models/plan.rbi +8 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/plan_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/product_create_params.rbi +2 -2
- data/rbi/whop_sdk/models/setup_intent.rbi +27 -29
- data/rbi/whop_sdk/models/setup_intent_list_response.rbi +31 -32
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +2 -0
- data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +633 -0
- data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +326 -480
- data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +633 -0
- data/rbi/whop_sdk/models.rbi +8 -4
- data/rbi/whop_sdk/resources/invoices.rbi +4 -0
- data/rbi/whop_sdk/resources/{payment_tokens.rbi → payment_methods.rbi} +16 -8
- data/rbi/whop_sdk/resources/payments.rbi +8 -6
- data/rbi/whop_sdk/resources/plans.rbi +3 -0
- data/rbi/whop_sdk/resources/products.rbi +1 -1
- data/rbi/whop_sdk/resources/setup_intents.rbi +10 -2
- data/rbi/whop_sdk/resources/webhooks.rbi +2 -0
- data/sig/whop_sdk/client.rbs +1 -1
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
- data/sig/whop_sdk/models/invoice_create_params.rbs +5 -0
- data/sig/whop_sdk/models/payment.rbs +11 -11
- data/sig/whop_sdk/models/payment_create_params.rbs +4 -4
- data/sig/whop_sdk/models/payment_list_response.rbs +11 -11
- data/sig/whop_sdk/models/{payment_token_list_params.rbs → payment_method_list_params.rbs} +2 -2
- data/sig/whop_sdk/models/{payment_token_list_response.rbs → payment_method_list_response.rbs} +6 -6
- data/sig/whop_sdk/models/{payment_token_retrieve_params.rbs → payment_method_retrieve_params.rbs} +2 -2
- data/sig/whop_sdk/models/{payment_token_retrieve_response.rbs → payment_method_retrieve_response.rbs} +6 -6
- data/sig/whop_sdk/models/plan.rbs +5 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +5 -0
- data/sig/whop_sdk/models/plan_list_response.rbs +5 -0
- data/sig/whop_sdk/models/setup_intent.rbs +10 -10
- data/sig/whop_sdk/models/setup_intent_list_response.rbs +10 -10
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
- data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +275 -0
- data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +132 -191
- data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +275 -0
- data/sig/whop_sdk/models.rbs +8 -4
- data/sig/whop_sdk/resources/invoices.rbs +1 -0
- data/sig/whop_sdk/resources/{payment_tokens.rbs → payment_methods.rbs} +3 -3
- data/sig/whop_sdk/resources/payments.rbs +1 -1
- data/sig/whop_sdk/resources/plans.rbs +1 -0
- data/sig/whop_sdk/resources/webhooks.rbs +2 -0
- metadata +23 -17
|
@@ -57,6 +57,11 @@ module WhopSDK
|
|
|
57
57
|
sig { returns(T.nilable(String)) }
|
|
58
58
|
attr_accessor :customer_name
|
|
59
59
|
|
|
60
|
+
# The payment method ID to use for this invoice. If using charge_automatically,
|
|
61
|
+
# you must provide a payment_method_id.
|
|
62
|
+
sig { returns(T.nilable(String)) }
|
|
63
|
+
attr_accessor :payment_method_id
|
|
64
|
+
|
|
60
65
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
61
66
|
# must provide a payment_token.
|
|
62
67
|
sig { returns(T.nilable(String)) }
|
|
@@ -84,6 +89,7 @@ module WhopSDK
|
|
|
84
89
|
product_id: String,
|
|
85
90
|
charge_buyer_fee: T.nilable(T::Boolean),
|
|
86
91
|
customer_name: T.nilable(String),
|
|
92
|
+
payment_method_id: T.nilable(String),
|
|
87
93
|
payment_token_id: T.nilable(String),
|
|
88
94
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
89
95
|
).returns(T.attached_class)
|
|
@@ -117,6 +123,9 @@ module WhopSDK
|
|
|
117
123
|
# want to create an invoice for a customer who does not have a member of your
|
|
118
124
|
# company yet.
|
|
119
125
|
customer_name: nil,
|
|
126
|
+
# The payment method ID to use for this invoice. If using charge_automatically,
|
|
127
|
+
# you must provide a payment_method_id.
|
|
128
|
+
payment_method_id: nil,
|
|
120
129
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
121
130
|
# must provide a payment_token.
|
|
122
131
|
payment_token_id: nil,
|
|
@@ -135,6 +144,7 @@ module WhopSDK
|
|
|
135
144
|
product: WhopSDK::InvoiceCreateParams::Product,
|
|
136
145
|
charge_buyer_fee: T.nilable(T::Boolean),
|
|
137
146
|
customer_name: T.nilable(String),
|
|
147
|
+
payment_method_id: T.nilable(String),
|
|
138
148
|
payment_token_id: T.nilable(String),
|
|
139
149
|
email_address: String,
|
|
140
150
|
product_id: String,
|
|
@@ -93,20 +93,20 @@ module WhopSDK
|
|
|
93
93
|
sig { returns(T.nilable(Time)) }
|
|
94
94
|
attr_accessor :paid_at
|
|
95
95
|
|
|
96
|
-
# The
|
|
97
|
-
sig { returns(T.nilable(WhopSDK::
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
# The payment token used for the payment, if available.
|
|
101
|
-
sig { returns(T.nilable(WhopSDK::Payment::PaymentToken)) }
|
|
102
|
-
attr_reader :payment_token
|
|
96
|
+
# The payment method used for the payment, if available.
|
|
97
|
+
sig { returns(T.nilable(WhopSDK::Payment::PaymentMethod)) }
|
|
98
|
+
attr_reader :payment_method
|
|
103
99
|
|
|
104
100
|
sig do
|
|
105
101
|
params(
|
|
106
|
-
|
|
102
|
+
payment_method: T.nilable(WhopSDK::Payment::PaymentMethod::OrHash)
|
|
107
103
|
).void
|
|
108
104
|
end
|
|
109
|
-
attr_writer :
|
|
105
|
+
attr_writer :payment_method
|
|
106
|
+
|
|
107
|
+
# The different types of payment methods that can be used.
|
|
108
|
+
sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) }
|
|
109
|
+
attr_accessor :payment_method_type
|
|
110
110
|
|
|
111
111
|
# The plan attached to this payment.
|
|
112
112
|
sig { returns(T.nilable(WhopSDK::Payment::Plan)) }
|
|
@@ -202,8 +202,8 @@ module WhopSDK
|
|
|
202
202
|
membership: T.nilable(WhopSDK::Payment::Membership::OrHash),
|
|
203
203
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
204
204
|
paid_at: T.nilable(Time),
|
|
205
|
+
payment_method: T.nilable(WhopSDK::Payment::PaymentMethod::OrHash),
|
|
205
206
|
payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
|
|
206
|
-
payment_token: T.nilable(WhopSDK::Payment::PaymentToken::OrHash),
|
|
207
207
|
plan: T.nilable(WhopSDK::Payment::Plan::OrHash),
|
|
208
208
|
product: T.nilable(WhopSDK::Payment::Product::OrHash),
|
|
209
209
|
promo_code: T.nilable(WhopSDK::Payment::PromoCode::OrHash),
|
|
@@ -256,10 +256,10 @@ module WhopSDK
|
|
|
256
256
|
metadata:,
|
|
257
257
|
# The datetime the payment was paid
|
|
258
258
|
paid_at:,
|
|
259
|
+
# The payment method used for the payment, if available.
|
|
260
|
+
payment_method:,
|
|
259
261
|
# The different types of payment methods that can be used.
|
|
260
262
|
payment_method_type:,
|
|
261
|
-
# The payment token used for the payment, if available.
|
|
262
|
-
payment_token:,
|
|
263
263
|
# The plan attached to this payment.
|
|
264
264
|
plan:,
|
|
265
265
|
# The product this payment was made for
|
|
@@ -315,9 +315,9 @@ module WhopSDK
|
|
|
315
315
|
membership: T.nilable(WhopSDK::Payment::Membership),
|
|
316
316
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
317
317
|
paid_at: T.nilable(Time),
|
|
318
|
+
payment_method: T.nilable(WhopSDK::Payment::PaymentMethod),
|
|
318
319
|
payment_method_type:
|
|
319
320
|
T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
|
|
320
|
-
payment_token: T.nilable(WhopSDK::Payment::PaymentToken),
|
|
321
321
|
plan: T.nilable(WhopSDK::Payment::Plan),
|
|
322
322
|
product: T.nilable(WhopSDK::Payment::Product),
|
|
323
323
|
promo_code: T.nilable(WhopSDK::Payment::PromoCode),
|
|
@@ -527,54 +527,52 @@ module WhopSDK
|
|
|
527
527
|
end
|
|
528
528
|
end
|
|
529
529
|
|
|
530
|
-
class
|
|
530
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
531
531
|
OrHash =
|
|
532
532
|
T.type_alias do
|
|
533
|
-
T.any(WhopSDK::Payment::
|
|
533
|
+
T.any(WhopSDK::Payment::PaymentMethod, WhopSDK::Internal::AnyHash)
|
|
534
534
|
end
|
|
535
535
|
|
|
536
|
-
# The ID of the payment
|
|
536
|
+
# The ID of the payment method
|
|
537
537
|
sig { returns(String) }
|
|
538
538
|
attr_accessor :id
|
|
539
539
|
|
|
540
|
-
# The card data associated with the payment
|
|
541
|
-
|
|
542
|
-
sig { returns(T.nilable(WhopSDK::Payment::PaymentToken::Card)) }
|
|
540
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
541
|
+
sig { returns(T.nilable(WhopSDK::Payment::PaymentMethod::Card)) }
|
|
543
542
|
attr_reader :card
|
|
544
543
|
|
|
545
544
|
sig do
|
|
546
545
|
params(
|
|
547
|
-
card: T.nilable(WhopSDK::Payment::
|
|
546
|
+
card: T.nilable(WhopSDK::Payment::PaymentMethod::Card::OrHash)
|
|
548
547
|
).void
|
|
549
548
|
end
|
|
550
549
|
attr_writer :card
|
|
551
550
|
|
|
552
|
-
# The date and time the payment
|
|
551
|
+
# The date and time the payment method was created
|
|
553
552
|
sig { returns(Time) }
|
|
554
553
|
attr_accessor :created_at
|
|
555
554
|
|
|
556
|
-
# The payment method type of the payment
|
|
555
|
+
# The payment method type of the payment method
|
|
557
556
|
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
558
557
|
attr_accessor :payment_method_type
|
|
559
558
|
|
|
560
|
-
# The payment
|
|
559
|
+
# The payment method used for the payment, if available.
|
|
561
560
|
sig do
|
|
562
561
|
params(
|
|
563
562
|
id: String,
|
|
564
|
-
card: T.nilable(WhopSDK::Payment::
|
|
563
|
+
card: T.nilable(WhopSDK::Payment::PaymentMethod::Card::OrHash),
|
|
565
564
|
created_at: Time,
|
|
566
565
|
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
|
|
567
566
|
).returns(T.attached_class)
|
|
568
567
|
end
|
|
569
568
|
def self.new(
|
|
570
|
-
# The ID of the payment
|
|
569
|
+
# The ID of the payment method
|
|
571
570
|
id:,
|
|
572
|
-
# The card data associated with the payment
|
|
573
|
-
# token.
|
|
571
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
574
572
|
card:,
|
|
575
|
-
# The date and time the payment
|
|
573
|
+
# The date and time the payment method was created
|
|
576
574
|
created_at:,
|
|
577
|
-
# The payment method type of the payment
|
|
575
|
+
# The payment method type of the payment method
|
|
578
576
|
payment_method_type:
|
|
579
577
|
)
|
|
580
578
|
end
|
|
@@ -583,7 +581,7 @@ module WhopSDK
|
|
|
583
581
|
override.returns(
|
|
584
582
|
{
|
|
585
583
|
id: String,
|
|
586
|
-
card: T.nilable(WhopSDK::Payment::
|
|
584
|
+
card: T.nilable(WhopSDK::Payment::PaymentMethod::Card),
|
|
587
585
|
created_at: Time,
|
|
588
586
|
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
|
|
589
587
|
}
|
|
@@ -596,7 +594,7 @@ module WhopSDK
|
|
|
596
594
|
OrHash =
|
|
597
595
|
T.type_alias do
|
|
598
596
|
T.any(
|
|
599
|
-
WhopSDK::Payment::
|
|
597
|
+
WhopSDK::Payment::PaymentMethod::Card,
|
|
600
598
|
WhopSDK::Internal::AnyHash
|
|
601
599
|
)
|
|
602
600
|
end
|
|
@@ -617,8 +615,7 @@ module WhopSDK
|
|
|
617
615
|
sig { returns(T.nilable(String)) }
|
|
618
616
|
attr_accessor :last4
|
|
619
617
|
|
|
620
|
-
# The card data associated with the payment
|
|
621
|
-
# token.
|
|
618
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
622
619
|
sig do
|
|
623
620
|
params(
|
|
624
621
|
brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
|
|
@@ -19,10 +19,10 @@ module WhopSDK
|
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :member_id
|
|
21
21
|
|
|
22
|
-
# The ID of the payment
|
|
22
|
+
# The ID of the payment method to use for the payment. It must be connected to the
|
|
23
23
|
# Member being charged.
|
|
24
24
|
sig { returns(String) }
|
|
25
|
-
attr_accessor :
|
|
25
|
+
attr_accessor :payment_method_id
|
|
26
26
|
|
|
27
27
|
# Pass this object to create a new plan for this payment
|
|
28
28
|
sig { returns(WhopSDK::PaymentCreateParams::Plan) }
|
|
@@ -39,7 +39,7 @@ module WhopSDK
|
|
|
39
39
|
params(
|
|
40
40
|
company_id: String,
|
|
41
41
|
member_id: String,
|
|
42
|
-
|
|
42
|
+
payment_method_id: String,
|
|
43
43
|
plan: WhopSDK::PaymentCreateParams::Plan::OrHash,
|
|
44
44
|
plan_id: String,
|
|
45
45
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
@@ -50,9 +50,9 @@ module WhopSDK
|
|
|
50
50
|
company_id:,
|
|
51
51
|
# The ID of the member to create the payment for.
|
|
52
52
|
member_id:,
|
|
53
|
-
# The ID of the payment
|
|
53
|
+
# The ID of the payment method to use for the payment. It must be connected to the
|
|
54
54
|
# Member being charged.
|
|
55
|
-
|
|
55
|
+
payment_method_id:,
|
|
56
56
|
# Pass this object to create a new plan for this payment
|
|
57
57
|
plan:,
|
|
58
58
|
# An ID of an existing plan to use for the payment.
|
|
@@ -66,7 +66,7 @@ module WhopSDK
|
|
|
66
66
|
{
|
|
67
67
|
company_id: String,
|
|
68
68
|
member_id: String,
|
|
69
|
-
|
|
69
|
+
payment_method_id: String,
|
|
70
70
|
plan: WhopSDK::PaymentCreateParams::Plan,
|
|
71
71
|
plan_id: String,
|
|
72
72
|
request_options: WhopSDK::RequestOptions
|
|
@@ -118,25 +118,25 @@ module WhopSDK
|
|
|
118
118
|
sig { returns(T.nilable(Time)) }
|
|
119
119
|
attr_accessor :paid_at
|
|
120
120
|
|
|
121
|
-
# The
|
|
122
|
-
sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) }
|
|
123
|
-
attr_accessor :payment_method_type
|
|
124
|
-
|
|
125
|
-
# The payment token used for the payment, if available.
|
|
121
|
+
# The payment method used for the payment, if available.
|
|
126
122
|
sig do
|
|
127
|
-
returns(T.nilable(WhopSDK::Models::PaymentListResponse::
|
|
123
|
+
returns(T.nilable(WhopSDK::Models::PaymentListResponse::PaymentMethod))
|
|
128
124
|
end
|
|
129
|
-
attr_reader :
|
|
125
|
+
attr_reader :payment_method
|
|
130
126
|
|
|
131
127
|
sig do
|
|
132
128
|
params(
|
|
133
|
-
|
|
129
|
+
payment_method:
|
|
134
130
|
T.nilable(
|
|
135
|
-
WhopSDK::Models::PaymentListResponse::
|
|
131
|
+
WhopSDK::Models::PaymentListResponse::PaymentMethod::OrHash
|
|
136
132
|
)
|
|
137
133
|
).void
|
|
138
134
|
end
|
|
139
|
-
attr_writer :
|
|
135
|
+
attr_writer :payment_method
|
|
136
|
+
|
|
137
|
+
# The different types of payment methods that can be used.
|
|
138
|
+
sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) }
|
|
139
|
+
attr_accessor :payment_method_type
|
|
140
140
|
|
|
141
141
|
# The plan attached to this payment.
|
|
142
142
|
sig { returns(T.nilable(WhopSDK::Models::PaymentListResponse::Plan)) }
|
|
@@ -256,11 +256,11 @@ module WhopSDK
|
|
|
256
256
|
T.nilable(WhopSDK::Models::PaymentListResponse::Membership::OrHash),
|
|
257
257
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
258
258
|
paid_at: T.nilable(Time),
|
|
259
|
-
|
|
260
|
-
payment_token:
|
|
259
|
+
payment_method:
|
|
261
260
|
T.nilable(
|
|
262
|
-
WhopSDK::Models::PaymentListResponse::
|
|
261
|
+
WhopSDK::Models::PaymentListResponse::PaymentMethod::OrHash
|
|
263
262
|
),
|
|
263
|
+
payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
|
|
264
264
|
plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan::OrHash),
|
|
265
265
|
product:
|
|
266
266
|
T.nilable(WhopSDK::Models::PaymentListResponse::Product::OrHash),
|
|
@@ -315,10 +315,10 @@ module WhopSDK
|
|
|
315
315
|
metadata:,
|
|
316
316
|
# The datetime the payment was paid
|
|
317
317
|
paid_at:,
|
|
318
|
+
# The payment method used for the payment, if available.
|
|
319
|
+
payment_method:,
|
|
318
320
|
# The different types of payment methods that can be used.
|
|
319
321
|
payment_method_type:,
|
|
320
|
-
# The payment token used for the payment, if available.
|
|
321
|
-
payment_token:,
|
|
322
322
|
# The plan attached to this payment.
|
|
323
323
|
plan:,
|
|
324
324
|
# The product this payment was made for
|
|
@@ -376,10 +376,10 @@ module WhopSDK
|
|
|
376
376
|
T.nilable(WhopSDK::Models::PaymentListResponse::Membership),
|
|
377
377
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
378
378
|
paid_at: T.nilable(Time),
|
|
379
|
+
payment_method:
|
|
380
|
+
T.nilable(WhopSDK::Models::PaymentListResponse::PaymentMethod),
|
|
379
381
|
payment_method_type:
|
|
380
382
|
T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
|
|
381
|
-
payment_token:
|
|
382
|
-
T.nilable(WhopSDK::Models::PaymentListResponse::PaymentToken),
|
|
383
383
|
plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan),
|
|
384
384
|
product: T.nilable(WhopSDK::Models::PaymentListResponse::Product),
|
|
385
385
|
promo_code:
|
|
@@ -602,24 +602,23 @@ module WhopSDK
|
|
|
602
602
|
end
|
|
603
603
|
end
|
|
604
604
|
|
|
605
|
-
class
|
|
605
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
606
606
|
OrHash =
|
|
607
607
|
T.type_alias do
|
|
608
608
|
T.any(
|
|
609
|
-
WhopSDK::Models::PaymentListResponse::
|
|
609
|
+
WhopSDK::Models::PaymentListResponse::PaymentMethod,
|
|
610
610
|
WhopSDK::Internal::AnyHash
|
|
611
611
|
)
|
|
612
612
|
end
|
|
613
613
|
|
|
614
|
-
# The ID of the payment
|
|
614
|
+
# The ID of the payment method
|
|
615
615
|
sig { returns(String) }
|
|
616
616
|
attr_accessor :id
|
|
617
617
|
|
|
618
|
-
# The card data associated with the payment
|
|
619
|
-
# token.
|
|
618
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
620
619
|
sig do
|
|
621
620
|
returns(
|
|
622
|
-
T.nilable(WhopSDK::Models::PaymentListResponse::
|
|
621
|
+
T.nilable(WhopSDK::Models::PaymentListResponse::PaymentMethod::Card)
|
|
623
622
|
)
|
|
624
623
|
end
|
|
625
624
|
attr_reader :card
|
|
@@ -628,41 +627,40 @@ module WhopSDK
|
|
|
628
627
|
params(
|
|
629
628
|
card:
|
|
630
629
|
T.nilable(
|
|
631
|
-
WhopSDK::Models::PaymentListResponse::
|
|
630
|
+
WhopSDK::Models::PaymentListResponse::PaymentMethod::Card::OrHash
|
|
632
631
|
)
|
|
633
632
|
).void
|
|
634
633
|
end
|
|
635
634
|
attr_writer :card
|
|
636
635
|
|
|
637
|
-
# The date and time the payment
|
|
636
|
+
# The date and time the payment method was created
|
|
638
637
|
sig { returns(Time) }
|
|
639
638
|
attr_accessor :created_at
|
|
640
639
|
|
|
641
|
-
# The payment method type of the payment
|
|
640
|
+
# The payment method type of the payment method
|
|
642
641
|
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
643
642
|
attr_accessor :payment_method_type
|
|
644
643
|
|
|
645
|
-
# The payment
|
|
644
|
+
# The payment method used for the payment, if available.
|
|
646
645
|
sig do
|
|
647
646
|
params(
|
|
648
647
|
id: String,
|
|
649
648
|
card:
|
|
650
649
|
T.nilable(
|
|
651
|
-
WhopSDK::Models::PaymentListResponse::
|
|
650
|
+
WhopSDK::Models::PaymentListResponse::PaymentMethod::Card::OrHash
|
|
652
651
|
),
|
|
653
652
|
created_at: Time,
|
|
654
653
|
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
|
|
655
654
|
).returns(T.attached_class)
|
|
656
655
|
end
|
|
657
656
|
def self.new(
|
|
658
|
-
# The ID of the payment
|
|
657
|
+
# The ID of the payment method
|
|
659
658
|
id:,
|
|
660
|
-
# The card data associated with the payment
|
|
661
|
-
# token.
|
|
659
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
662
660
|
card:,
|
|
663
|
-
# The date and time the payment
|
|
661
|
+
# The date and time the payment method was created
|
|
664
662
|
created_at:,
|
|
665
|
-
# The payment method type of the payment
|
|
663
|
+
# The payment method type of the payment method
|
|
666
664
|
payment_method_type:
|
|
667
665
|
)
|
|
668
666
|
end
|
|
@@ -673,7 +671,7 @@ module WhopSDK
|
|
|
673
671
|
id: String,
|
|
674
672
|
card:
|
|
675
673
|
T.nilable(
|
|
676
|
-
WhopSDK::Models::PaymentListResponse::
|
|
674
|
+
WhopSDK::Models::PaymentListResponse::PaymentMethod::Card
|
|
677
675
|
),
|
|
678
676
|
created_at: Time,
|
|
679
677
|
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
|
|
@@ -687,7 +685,7 @@ module WhopSDK
|
|
|
687
685
|
OrHash =
|
|
688
686
|
T.type_alias do
|
|
689
687
|
T.any(
|
|
690
|
-
WhopSDK::Models::PaymentListResponse::
|
|
688
|
+
WhopSDK::Models::PaymentListResponse::PaymentMethod::Card,
|
|
691
689
|
WhopSDK::Internal::AnyHash
|
|
692
690
|
)
|
|
693
691
|
end
|
|
@@ -708,8 +706,7 @@ module WhopSDK
|
|
|
708
706
|
sig { returns(T.nilable(String)) }
|
|
709
707
|
attr_accessor :last4
|
|
710
708
|
|
|
711
|
-
# The card data associated with the payment
|
|
712
|
-
# token.
|
|
709
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
713
710
|
sig do
|
|
714
711
|
params(
|
|
715
712
|
brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class PaymentMethodListParams < WhopSDK::Internal::Type::BaseModel
|
|
6
6
|
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include WhopSDK::Internal::Type::RequestParameters
|
|
8
8
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias do
|
|
11
|
-
T.any(WhopSDK::
|
|
11
|
+
T.any(WhopSDK::PaymentMethodListParams, WhopSDK::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# The ID of the Member to list payment
|
|
14
|
+
# The ID of the Member to list payment methods for
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :member_id
|
|
17
17
|
|
|
@@ -57,7 +57,7 @@ module WhopSDK
|
|
|
57
57
|
).returns(T.attached_class)
|
|
58
58
|
end
|
|
59
59
|
def self.new(
|
|
60
|
-
# The ID of the Member to list payment
|
|
60
|
+
# The ID of the Member to list payment methods for
|
|
61
61
|
member_id:,
|
|
62
62
|
# Returns the elements in the list that come after the specified cursor.
|
|
63
63
|
after: nil,
|
data/rbi/whop_sdk/models/{payment_token_list_response.rbi → payment_method_list_response.rbi}
RENAMED
|
@@ -2,61 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class PaymentMethodListResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
WhopSDK::Models::
|
|
9
|
+
WhopSDK::Models::PaymentMethodListResponse,
|
|
10
10
|
WhopSDK::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# The ID of the payment
|
|
14
|
+
# The ID of the payment method
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :id
|
|
17
17
|
|
|
18
|
-
# The card data associated with the payment
|
|
19
|
-
# token.
|
|
18
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
20
19
|
sig do
|
|
21
|
-
returns(T.nilable(WhopSDK::Models::
|
|
20
|
+
returns(T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card))
|
|
22
21
|
end
|
|
23
22
|
attr_reader :card
|
|
24
23
|
|
|
25
24
|
sig do
|
|
26
25
|
params(
|
|
27
26
|
card:
|
|
28
|
-
T.nilable(WhopSDK::Models::
|
|
27
|
+
T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card::OrHash)
|
|
29
28
|
).void
|
|
30
29
|
end
|
|
31
30
|
attr_writer :card
|
|
32
31
|
|
|
33
|
-
# The date and time the payment
|
|
32
|
+
# The date and time the payment method was created
|
|
34
33
|
sig { returns(Time) }
|
|
35
34
|
attr_accessor :created_at
|
|
36
35
|
|
|
37
|
-
# The payment method type of the payment
|
|
36
|
+
# The payment method type of the payment method
|
|
38
37
|
sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
|
|
39
38
|
attr_accessor :payment_method_type
|
|
40
39
|
|
|
41
|
-
# A payment
|
|
40
|
+
# A stored payment method used to process payments. This could be a credit/debit
|
|
41
|
+
# card, bank account, PayPal wallet, etc.
|
|
42
42
|
sig do
|
|
43
43
|
params(
|
|
44
44
|
id: String,
|
|
45
45
|
card:
|
|
46
|
-
T.nilable(WhopSDK::Models::
|
|
46
|
+
T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card::OrHash),
|
|
47
47
|
created_at: Time,
|
|
48
48
|
payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
|
|
49
49
|
).returns(T.attached_class)
|
|
50
50
|
end
|
|
51
51
|
def self.new(
|
|
52
|
-
# The ID of the payment
|
|
52
|
+
# The ID of the payment method
|
|
53
53
|
id:,
|
|
54
|
-
# The card data associated with the payment
|
|
55
|
-
# token.
|
|
54
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
56
55
|
card:,
|
|
57
|
-
# The date and time the payment
|
|
56
|
+
# The date and time the payment method was created
|
|
58
57
|
created_at:,
|
|
59
|
-
# The payment method type of the payment
|
|
58
|
+
# The payment method type of the payment method
|
|
60
59
|
payment_method_type:
|
|
61
60
|
)
|
|
62
61
|
end
|
|
@@ -65,7 +64,7 @@ module WhopSDK
|
|
|
65
64
|
override.returns(
|
|
66
65
|
{
|
|
67
66
|
id: String,
|
|
68
|
-
card: T.nilable(WhopSDK::Models::
|
|
67
|
+
card: T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card),
|
|
69
68
|
created_at: Time,
|
|
70
69
|
payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
|
|
71
70
|
}
|
|
@@ -78,7 +77,7 @@ module WhopSDK
|
|
|
78
77
|
OrHash =
|
|
79
78
|
T.type_alias do
|
|
80
79
|
T.any(
|
|
81
|
-
WhopSDK::Models::
|
|
80
|
+
WhopSDK::Models::PaymentMethodListResponse::Card,
|
|
82
81
|
WhopSDK::Internal::AnyHash
|
|
83
82
|
)
|
|
84
83
|
end
|
|
@@ -99,8 +98,7 @@ module WhopSDK
|
|
|
99
98
|
sig { returns(T.nilable(String)) }
|
|
100
99
|
attr_accessor :last4
|
|
101
100
|
|
|
102
|
-
# The card data associated with the payment
|
|
103
|
-
# token.
|
|
101
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
104
102
|
sig do
|
|
105
103
|
params(
|
|
106
104
|
brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
|
data/rbi/whop_sdk/models/{payment_token_retrieve_params.rbi → payment_method_retrieve_params.rbi}
RENAMED
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class PaymentMethodRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
6
6
|
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include WhopSDK::Internal::Type::RequestParameters
|
|
8
8
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias do
|
|
11
|
-
T.any(
|
|
11
|
+
T.any(
|
|
12
|
+
WhopSDK::PaymentMethodRetrieveParams,
|
|
13
|
+
WhopSDK::Internal::AnyHash
|
|
14
|
+
)
|
|
12
15
|
end
|
|
13
16
|
|
|
14
|
-
# The ID of the Member associated with the
|
|
17
|
+
# The ID of the Member associated with the PaymentMethod
|
|
15
18
|
sig { returns(String) }
|
|
16
19
|
attr_accessor :member_id
|
|
17
20
|
|
|
@@ -22,7 +25,7 @@ module WhopSDK
|
|
|
22
25
|
).returns(T.attached_class)
|
|
23
26
|
end
|
|
24
27
|
def self.new(
|
|
25
|
-
# The ID of the Member associated with the
|
|
28
|
+
# The ID of the Member associated with the PaymentMethod
|
|
26
29
|
member_id:,
|
|
27
30
|
request_options: {}
|
|
28
31
|
)
|