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
data/lib/whop_sdk/models/plan.rb
CHANGED
|
@@ -117,6 +117,12 @@ module WhopSDK
|
|
|
117
117
|
# @return [Float]
|
|
118
118
|
required :renewal_price, Float
|
|
119
119
|
|
|
120
|
+
# @!attribute split_pay_required_payments
|
|
121
|
+
# The number of payments required before pausing the subscription.
|
|
122
|
+
#
|
|
123
|
+
# @return [Integer, nil]
|
|
124
|
+
required :split_pay_required_payments, Integer, nil?: true
|
|
125
|
+
|
|
120
126
|
# @!attribute stock
|
|
121
127
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
122
128
|
#
|
|
@@ -159,7 +165,7 @@ module WhopSDK
|
|
|
159
165
|
# @return [Symbol, WhopSDK::Models::Visibility]
|
|
160
166
|
required :visibility, enum: -> { WhopSDK::Visibility }
|
|
161
167
|
|
|
162
|
-
# @!method initialize(id:, billing_period:, collect_tax:, company:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, stock:, tax_type:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
|
|
168
|
+
# @!method initialize(id:, billing_period:, collect_tax:, company:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, tax_type:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
|
|
163
169
|
# A plan for an product. Plans define the core parameters that define a checkout
|
|
164
170
|
# and payment on whop. Use plans to create different ways to price your products
|
|
165
171
|
# (Eg renewal / one_time)
|
|
@@ -202,6 +208,8 @@ module WhopSDK
|
|
|
202
208
|
#
|
|
203
209
|
# @param renewal_price [Float] The price a person has to pay for a plan on the renewal purchase.
|
|
204
210
|
#
|
|
211
|
+
# @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription.
|
|
212
|
+
#
|
|
205
213
|
# @param stock [Integer, nil] The number of units available for purchase. Only displayed to authorized actors
|
|
206
214
|
#
|
|
207
215
|
# @param tax_type [Symbol, WhopSDK::Models::TaxType] The tax type for the plan.
|
|
@@ -106,6 +106,12 @@ module WhopSDK
|
|
|
106
106
|
# @return [Float, nil]
|
|
107
107
|
optional :renewal_price, Float, nil?: true
|
|
108
108
|
|
|
109
|
+
# @!attribute split_pay_required_payments
|
|
110
|
+
# The number of payments required before pausing the subscription.
|
|
111
|
+
#
|
|
112
|
+
# @return [Integer, nil]
|
|
113
|
+
optional :split_pay_required_payments, Integer, nil?: true
|
|
114
|
+
|
|
109
115
|
# @!attribute stock
|
|
110
116
|
# The number of units available for purchase.
|
|
111
117
|
#
|
|
@@ -136,7 +142,7 @@ module WhopSDK
|
|
|
136
142
|
# @return [Symbol, WhopSDK::Models::Visibility, nil]
|
|
137
143
|
optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
|
|
138
144
|
|
|
139
|
-
# @!method initialize(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
|
|
145
|
+
# @!method initialize(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
|
|
140
146
|
# Some parameter documentations has been truncated, see
|
|
141
147
|
# {WhopSDK::Models::PlanCreateParams} for more details.
|
|
142
148
|
#
|
|
@@ -170,6 +176,8 @@ module WhopSDK
|
|
|
170
176
|
#
|
|
171
177
|
# @param renewal_price [Float, nil] The amount the customer is charged every billing period. Use only if a recurring
|
|
172
178
|
#
|
|
179
|
+
# @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription.
|
|
180
|
+
#
|
|
173
181
|
# @param stock [Integer, nil] The number of units available for purchase.
|
|
174
182
|
#
|
|
175
183
|
# @param title [String, nil] The title of the plan. This will be visible on the product page to customers.
|
|
@@ -108,6 +108,12 @@ module WhopSDK
|
|
|
108
108
|
# @return [Float]
|
|
109
109
|
required :renewal_price, Float
|
|
110
110
|
|
|
111
|
+
# @!attribute split_pay_required_payments
|
|
112
|
+
# The number of payments required before pausing the subscription.
|
|
113
|
+
#
|
|
114
|
+
# @return [Integer, nil]
|
|
115
|
+
required :split_pay_required_payments, Integer, nil?: true
|
|
116
|
+
|
|
111
117
|
# @!attribute stock
|
|
112
118
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
113
119
|
#
|
|
@@ -144,7 +150,7 @@ module WhopSDK
|
|
|
144
150
|
# @return [Symbol, WhopSDK::Models::Visibility]
|
|
145
151
|
required :visibility, enum: -> { WhopSDK::Visibility }
|
|
146
152
|
|
|
147
|
-
# @!method initialize(id:, billing_period:, company:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, stock:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
|
|
153
|
+
# @!method initialize(id:, billing_period:, company:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
|
|
148
154
|
# A plan for an product. Plans define the core parameters that define a checkout
|
|
149
155
|
# and payment on whop. Use plans to create different ways to price your products
|
|
150
156
|
# (Eg renewal / one_time)
|
|
@@ -183,6 +189,8 @@ module WhopSDK
|
|
|
183
189
|
#
|
|
184
190
|
# @param renewal_price [Float] The price a person has to pay for a plan on the renewal purchase.
|
|
185
191
|
#
|
|
192
|
+
# @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription.
|
|
193
|
+
#
|
|
186
194
|
# @param stock [Integer, nil] The number of units available for purchase. Only displayed to authorized actors
|
|
187
195
|
#
|
|
188
196
|
# @param title [String, nil] The title of the plan. This will be visible on the product page to customers.
|
|
@@ -14,7 +14,7 @@ module WhopSDK
|
|
|
14
14
|
required :company_id, String
|
|
15
15
|
|
|
16
16
|
# @!attribute title
|
|
17
|
-
# The title of the product.
|
|
17
|
+
# The title of the product. It must be max 40 characters.
|
|
18
18
|
#
|
|
19
19
|
# @return [String]
|
|
20
20
|
required :title, String
|
|
@@ -143,7 +143,7 @@ module WhopSDK
|
|
|
143
143
|
#
|
|
144
144
|
# @param company_id [String] The ID of the company to create the product for.
|
|
145
145
|
#
|
|
146
|
-
# @param title [String] The title of the product.
|
|
146
|
+
# @param title [String] The title of the product. It must be max 40 characters.
|
|
147
147
|
#
|
|
148
148
|
# @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
|
|
149
149
|
#
|
|
@@ -46,11 +46,11 @@ module WhopSDK
|
|
|
46
46
|
# @return [Hash{Symbol=>Object}, nil]
|
|
47
47
|
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
48
48
|
|
|
49
|
-
# @!attribute
|
|
50
|
-
# The payment
|
|
49
|
+
# @!attribute payment_method
|
|
50
|
+
# The payment method created during the setup, if available.
|
|
51
51
|
#
|
|
52
|
-
# @return [WhopSDK::Models::SetupIntent::
|
|
53
|
-
required :
|
|
52
|
+
# @return [WhopSDK::Models::SetupIntent::PaymentMethod, nil]
|
|
53
|
+
required :payment_method, -> { WhopSDK::SetupIntent::PaymentMethod }, nil?: true
|
|
54
54
|
|
|
55
55
|
# @!attribute status
|
|
56
56
|
# The status of the setup intent
|
|
@@ -58,7 +58,7 @@ module WhopSDK
|
|
|
58
58
|
# @return [Symbol, WhopSDK::Models::SetupIntentStatus]
|
|
59
59
|
required :status, enum: -> { WhopSDK::SetupIntentStatus }
|
|
60
60
|
|
|
61
|
-
# @!method initialize(id:, checkout_configuration:, company:, created_at:, error_message:, member:, metadata:,
|
|
61
|
+
# @!method initialize(id:, checkout_configuration:, company:, created_at:, error_message:, member:, metadata:, payment_method:, status:)
|
|
62
62
|
# An object representing a setup intent, which is a flow for allowing a customer
|
|
63
63
|
# to add a payment method to their account without making a purchase.
|
|
64
64
|
#
|
|
@@ -76,7 +76,7 @@ module WhopSDK
|
|
|
76
76
|
#
|
|
77
77
|
# @param metadata [Hash{Symbol=>Object}, nil] The metadata associated with the setup intent
|
|
78
78
|
#
|
|
79
|
-
# @param
|
|
79
|
+
# @param payment_method [WhopSDK::Models::SetupIntent::PaymentMethod, nil] The payment method created during the setup, if available.
|
|
80
80
|
#
|
|
81
81
|
# @param status [Symbol, WhopSDK::Models::SetupIntentStatus] The status of the setup intent
|
|
82
82
|
|
|
@@ -168,48 +168,47 @@ module WhopSDK
|
|
|
168
168
|
end
|
|
169
169
|
end
|
|
170
170
|
|
|
171
|
-
# @see WhopSDK::Models::SetupIntent#
|
|
172
|
-
class
|
|
171
|
+
# @see WhopSDK::Models::SetupIntent#payment_method
|
|
172
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
173
173
|
# @!attribute id
|
|
174
|
-
# The ID of the payment
|
|
174
|
+
# The ID of the payment method
|
|
175
175
|
#
|
|
176
176
|
# @return [String]
|
|
177
177
|
required :id, String
|
|
178
178
|
|
|
179
179
|
# @!attribute card
|
|
180
|
-
# The card data associated with the payment
|
|
181
|
-
# token.
|
|
180
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
182
181
|
#
|
|
183
|
-
# @return [WhopSDK::Models::SetupIntent::
|
|
184
|
-
required :card, -> { WhopSDK::SetupIntent::
|
|
182
|
+
# @return [WhopSDK::Models::SetupIntent::PaymentMethod::Card, nil]
|
|
183
|
+
required :card, -> { WhopSDK::SetupIntent::PaymentMethod::Card }, nil?: true
|
|
185
184
|
|
|
186
185
|
# @!attribute created_at
|
|
187
|
-
# The date and time the payment
|
|
186
|
+
# The date and time the payment method was created
|
|
188
187
|
#
|
|
189
188
|
# @return [Time]
|
|
190
189
|
required :created_at, Time
|
|
191
190
|
|
|
192
191
|
# @!attribute payment_method_type
|
|
193
|
-
# The payment method type of the payment
|
|
192
|
+
# The payment method type of the payment method
|
|
194
193
|
#
|
|
195
194
|
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
196
195
|
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
197
196
|
|
|
198
197
|
# @!method initialize(id:, card:, created_at:, payment_method_type:)
|
|
199
198
|
# Some parameter documentations has been truncated, see
|
|
200
|
-
# {WhopSDK::Models::SetupIntent::
|
|
199
|
+
# {WhopSDK::Models::SetupIntent::PaymentMethod} for more details.
|
|
201
200
|
#
|
|
202
|
-
# The payment
|
|
201
|
+
# The payment method created during the setup, if available.
|
|
203
202
|
#
|
|
204
|
-
# @param id [String] The ID of the payment
|
|
203
|
+
# @param id [String] The ID of the payment method
|
|
205
204
|
#
|
|
206
|
-
# @param card [WhopSDK::Models::SetupIntent::
|
|
205
|
+
# @param card [WhopSDK::Models::SetupIntent::PaymentMethod::Card, nil] The card data associated with the payment method, if its a debit or credit card.
|
|
207
206
|
#
|
|
208
|
-
# @param created_at [Time] The date and time the payment
|
|
207
|
+
# @param created_at [Time] The date and time the payment method was created
|
|
209
208
|
#
|
|
210
|
-
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment
|
|
209
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
|
|
211
210
|
|
|
212
|
-
# @see WhopSDK::Models::SetupIntent::
|
|
211
|
+
# @see WhopSDK::Models::SetupIntent::PaymentMethod#card
|
|
213
212
|
class Card < WhopSDK::Internal::Type::BaseModel
|
|
214
213
|
# @!attribute brand
|
|
215
214
|
# Possible card brands that a payment token can have
|
|
@@ -236,8 +235,7 @@ module WhopSDK
|
|
|
236
235
|
required :last4, String, nil?: true
|
|
237
236
|
|
|
238
237
|
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
239
|
-
# The card data associated with the payment
|
|
240
|
-
# token.
|
|
238
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
241
239
|
#
|
|
242
240
|
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
243
241
|
#
|
|
@@ -48,11 +48,11 @@ module WhopSDK
|
|
|
48
48
|
# @return [Hash{Symbol=>Object}, nil]
|
|
49
49
|
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
50
50
|
|
|
51
|
-
# @!attribute
|
|
52
|
-
# The payment
|
|
51
|
+
# @!attribute payment_method
|
|
52
|
+
# The payment method created during the setup, if available.
|
|
53
53
|
#
|
|
54
|
-
# @return [WhopSDK::Models::SetupIntentListResponse::
|
|
55
|
-
required :
|
|
54
|
+
# @return [WhopSDK::Models::SetupIntentListResponse::PaymentMethod, nil]
|
|
55
|
+
required :payment_method, -> { WhopSDK::Models::SetupIntentListResponse::PaymentMethod }, nil?: true
|
|
56
56
|
|
|
57
57
|
# @!attribute status
|
|
58
58
|
# The status of the setup intent
|
|
@@ -60,7 +60,7 @@ module WhopSDK
|
|
|
60
60
|
# @return [Symbol, WhopSDK::Models::SetupIntentStatus]
|
|
61
61
|
required :status, enum: -> { WhopSDK::SetupIntentStatus }
|
|
62
62
|
|
|
63
|
-
# @!method initialize(id:, checkout_configuration:, company:, created_at:, error_message:, member:, metadata:,
|
|
63
|
+
# @!method initialize(id:, checkout_configuration:, company:, created_at:, error_message:, member:, metadata:, payment_method:, status:)
|
|
64
64
|
# An object representing a setup intent, which is a flow for allowing a customer
|
|
65
65
|
# to add a payment method to their account without making a purchase.
|
|
66
66
|
#
|
|
@@ -78,7 +78,7 @@ module WhopSDK
|
|
|
78
78
|
#
|
|
79
79
|
# @param metadata [Hash{Symbol=>Object}, nil] The metadata associated with the setup intent
|
|
80
80
|
#
|
|
81
|
-
# @param
|
|
81
|
+
# @param payment_method [WhopSDK::Models::SetupIntentListResponse::PaymentMethod, nil] The payment method created during the setup, if available.
|
|
82
82
|
#
|
|
83
83
|
# @param status [Symbol, WhopSDK::Models::SetupIntentStatus] The status of the setup intent
|
|
84
84
|
|
|
@@ -170,48 +170,47 @@ module WhopSDK
|
|
|
170
170
|
end
|
|
171
171
|
end
|
|
172
172
|
|
|
173
|
-
# @see WhopSDK::Models::SetupIntentListResponse#
|
|
174
|
-
class
|
|
173
|
+
# @see WhopSDK::Models::SetupIntentListResponse#payment_method
|
|
174
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
175
175
|
# @!attribute id
|
|
176
|
-
# The ID of the payment
|
|
176
|
+
# The ID of the payment method
|
|
177
177
|
#
|
|
178
178
|
# @return [String]
|
|
179
179
|
required :id, String
|
|
180
180
|
|
|
181
181
|
# @!attribute card
|
|
182
|
-
# The card data associated with the payment
|
|
183
|
-
# token.
|
|
182
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
184
183
|
#
|
|
185
|
-
# @return [WhopSDK::Models::SetupIntentListResponse::
|
|
186
|
-
required :card, -> { WhopSDK::Models::SetupIntentListResponse::
|
|
184
|
+
# @return [WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card, nil]
|
|
185
|
+
required :card, -> { WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card }, nil?: true
|
|
187
186
|
|
|
188
187
|
# @!attribute created_at
|
|
189
|
-
# The date and time the payment
|
|
188
|
+
# The date and time the payment method was created
|
|
190
189
|
#
|
|
191
190
|
# @return [Time]
|
|
192
191
|
required :created_at, Time
|
|
193
192
|
|
|
194
193
|
# @!attribute payment_method_type
|
|
195
|
-
# The payment method type of the payment
|
|
194
|
+
# The payment method type of the payment method
|
|
196
195
|
#
|
|
197
196
|
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
198
197
|
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
199
198
|
|
|
200
199
|
# @!method initialize(id:, card:, created_at:, payment_method_type:)
|
|
201
200
|
# Some parameter documentations has been truncated, see
|
|
202
|
-
# {WhopSDK::Models::SetupIntentListResponse::
|
|
201
|
+
# {WhopSDK::Models::SetupIntentListResponse::PaymentMethod} for more details.
|
|
203
202
|
#
|
|
204
|
-
# The payment
|
|
203
|
+
# The payment method created during the setup, if available.
|
|
205
204
|
#
|
|
206
|
-
# @param id [String] The ID of the payment
|
|
205
|
+
# @param id [String] The ID of the payment method
|
|
207
206
|
#
|
|
208
|
-
# @param card [WhopSDK::Models::SetupIntentListResponse::
|
|
207
|
+
# @param card [WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card, nil] The card data associated with the payment method, if its a debit or credit card.
|
|
209
208
|
#
|
|
210
|
-
# @param created_at [Time] The date and time the payment
|
|
209
|
+
# @param created_at [Time] The date and time the payment method was created
|
|
211
210
|
#
|
|
212
|
-
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment
|
|
211
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
|
|
213
212
|
|
|
214
|
-
# @see WhopSDK::Models::SetupIntentListResponse::
|
|
213
|
+
# @see WhopSDK::Models::SetupIntentListResponse::PaymentMethod#card
|
|
215
214
|
class Card < WhopSDK::Internal::Type::BaseModel
|
|
216
215
|
# @!attribute brand
|
|
217
216
|
# Possible card brands that a payment token can have
|
|
@@ -238,8 +237,7 @@ module WhopSDK
|
|
|
238
237
|
required :last4, String, nil?: true
|
|
239
238
|
|
|
240
239
|
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
241
|
-
# The card data associated with the payment
|
|
242
|
-
# token.
|
|
240
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
243
241
|
#
|
|
244
242
|
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
245
243
|
#
|
|
@@ -5,50 +5,57 @@ module WhopSDK
|
|
|
5
5
|
module UnwrapWebhookEvent
|
|
6
6
|
extend WhopSDK::Internal::Type::Union
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
discriminator :type
|
|
9
9
|
|
|
10
|
-
variant -> { WhopSDK::
|
|
10
|
+
variant :"invoice.created", -> { WhopSDK::InvoiceCreatedWebhookEvent }
|
|
11
11
|
|
|
12
|
-
variant -> { WhopSDK::
|
|
12
|
+
variant :"invoice.paid", -> { WhopSDK::InvoicePaidWebhookEvent }
|
|
13
13
|
|
|
14
|
-
variant -> { WhopSDK::
|
|
14
|
+
variant :"invoice.past_due", -> { WhopSDK::InvoicePastDueWebhookEvent }
|
|
15
15
|
|
|
16
|
-
variant -> { WhopSDK::
|
|
16
|
+
variant :"invoice.voided", -> { WhopSDK::InvoiceVoidedWebhookEvent }
|
|
17
17
|
|
|
18
|
-
variant -> { WhopSDK::
|
|
18
|
+
variant :"membership.activated", -> { WhopSDK::MembershipActivatedWebhookEvent }
|
|
19
19
|
|
|
20
|
-
variant -> { WhopSDK::
|
|
20
|
+
variant :"membership.deactivated", -> { WhopSDK::MembershipDeactivatedWebhookEvent }
|
|
21
21
|
|
|
22
|
-
variant -> { WhopSDK::
|
|
22
|
+
variant :"entry.created", -> { WhopSDK::EntryCreatedWebhookEvent }
|
|
23
23
|
|
|
24
|
-
variant -> { WhopSDK::
|
|
24
|
+
variant :"entry.approved", -> { WhopSDK::EntryApprovedWebhookEvent }
|
|
25
25
|
|
|
26
|
-
variant -> { WhopSDK::
|
|
26
|
+
variant :"entry.denied", -> { WhopSDK::EntryDeniedWebhookEvent }
|
|
27
27
|
|
|
28
|
-
variant -> { WhopSDK::
|
|
28
|
+
variant :"entry.deleted", -> { WhopSDK::EntryDeletedWebhookEvent }
|
|
29
29
|
|
|
30
|
-
variant -> { WhopSDK::
|
|
30
|
+
variant :"setup_intent.requires_action", -> { WhopSDK::SetupIntentRequiresActionWebhookEvent }
|
|
31
31
|
|
|
32
|
-
variant -> { WhopSDK::
|
|
32
|
+
variant :"setup_intent.succeeded", -> { WhopSDK::SetupIntentSucceededWebhookEvent }
|
|
33
33
|
|
|
34
|
-
variant -> { WhopSDK::
|
|
34
|
+
variant :"setup_intent.canceled", -> { WhopSDK::SetupIntentCanceledWebhookEvent }
|
|
35
35
|
|
|
36
|
-
variant -> { WhopSDK::
|
|
36
|
+
variant :"withdrawal.created", -> { WhopSDK::WithdrawalCreatedWebhookEvent }
|
|
37
37
|
|
|
38
|
-
variant -> { WhopSDK::
|
|
38
|
+
variant :"withdrawal.updated", -> { WhopSDK::WithdrawalUpdatedWebhookEvent }
|
|
39
39
|
|
|
40
|
-
variant
|
|
40
|
+
variant :"course_lesson_interaction.completed",
|
|
41
|
+
-> { WhopSDK::CourseLessonInteractionCompletedWebhookEvent }
|
|
41
42
|
|
|
42
|
-
variant -> { WhopSDK::
|
|
43
|
+
variant :"payment.succeeded", -> { WhopSDK::PaymentSucceededWebhookEvent }
|
|
43
44
|
|
|
44
|
-
variant -> { WhopSDK::
|
|
45
|
+
variant :"payment.failed", -> { WhopSDK::PaymentFailedWebhookEvent }
|
|
45
46
|
|
|
46
|
-
variant -> { WhopSDK::
|
|
47
|
+
variant :"payment.pending", -> { WhopSDK::PaymentPendingWebhookEvent }
|
|
47
48
|
|
|
48
|
-
variant -> { WhopSDK::
|
|
49
|
+
variant :"dispute.created", -> { WhopSDK::DisputeCreatedWebhookEvent }
|
|
50
|
+
|
|
51
|
+
variant :"dispute.updated", -> { WhopSDK::DisputeUpdatedWebhookEvent }
|
|
52
|
+
|
|
53
|
+
variant :"refund.created", -> { WhopSDK::RefundCreatedWebhookEvent }
|
|
54
|
+
|
|
55
|
+
variant :"refund.updated", -> { WhopSDK::RefundUpdatedWebhookEvent }
|
|
49
56
|
|
|
50
57
|
# @!method self.variants
|
|
51
|
-
# @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::SetupIntentRequiresActionWebhookEvent, WhopSDK::Models::SetupIntentSucceededWebhookEvent, WhopSDK::Models::SetupIntentCanceledWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent)]
|
|
58
|
+
# @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::SetupIntentRequiresActionWebhookEvent, WhopSDK::Models::SetupIntentSucceededWebhookEvent, WhopSDK::Models::SetupIntentCanceledWebhookEvent, WhopSDK::Models::WithdrawalCreatedWebhookEvent, WhopSDK::Models::WithdrawalUpdatedWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent)]
|
|
52
59
|
end
|
|
53
60
|
end
|
|
54
61
|
end
|