whop_sdk 0.0.11 → 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 +10 -0
- data/README.md +1 -1
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
- 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/unwrap_webhook_event.rb +5 -1
- 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 +4 -0
- data/lib/whop_sdk/resources/plans.rb +3 -1
- data/lib/whop_sdk/resources/products.rb +1 -1
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +2 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
- 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/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 +4 -0
- data/rbi/whop_sdk/resources/plans.rbi +3 -0
- data/rbi/whop_sdk/resources/products.rbi +1 -1
- data/rbi/whop_sdk/resources/webhooks.rbi +2 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
- 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/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 +4 -0
- data/sig/whop_sdk/resources/plans.rbs +1 -0
- data/sig/whop_sdk/resources/webhooks.rbs +2 -0
- metadata +8 -2
|
@@ -14,7 +14,7 @@ module WhopSDK
|
|
|
14
14
|
# - `access_pass:basic:read`
|
|
15
15
|
# - `plan:basic:read`
|
|
16
16
|
#
|
|
17
|
-
# @overload create(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: {})
|
|
17
|
+
# @overload create(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: {})
|
|
18
18
|
#
|
|
19
19
|
# @param company_id [String] The company the plan should be created for.
|
|
20
20
|
#
|
|
@@ -46,6 +46,8 @@ module WhopSDK
|
|
|
46
46
|
#
|
|
47
47
|
# @param renewal_price [Float, nil] The amount the customer is charged every billing period. Use only if a recurring
|
|
48
48
|
#
|
|
49
|
+
# @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription.
|
|
50
|
+
#
|
|
49
51
|
# @param stock [Integer, nil] The number of units available for purchase.
|
|
50
52
|
#
|
|
51
53
|
# @param title [String, nil] The title of the plan. This will be visible on the product page to customers.
|
|
@@ -17,7 +17,7 @@ module WhopSDK
|
|
|
17
17
|
#
|
|
18
18
|
# @param company_id [String] The ID of the company to create the product for.
|
|
19
19
|
#
|
|
20
|
-
# @param title [String] The title of the product.
|
|
20
|
+
# @param title [String] The title of the product. It must be max 40 characters.
|
|
21
21
|
#
|
|
22
22
|
# @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
|
|
23
23
|
#
|
|
@@ -5,7 +5,7 @@ module WhopSDK
|
|
|
5
5
|
class Webhooks
|
|
6
6
|
# @param payload [String] The raw webhook payload as a string
|
|
7
7
|
#
|
|
8
|
-
# @return [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]
|
|
8
|
+
# @return [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]
|
|
9
9
|
def unwrap(payload)
|
|
10
10
|
parsed = JSON.parse(payload, symbolize_names: true)
|
|
11
11
|
WhopSDK::Internal::Type::Converter.coerce(WhopSDK::Models::UnwrapWebhookEvent, parsed)
|
data/lib/whop_sdk/version.rb
CHANGED
data/lib/whop_sdk.rb
CHANGED
|
@@ -342,6 +342,7 @@ require_relative "whop_sdk/models/who_can_comment_types"
|
|
|
342
342
|
require_relative "whop_sdk/models/who_can_post"
|
|
343
343
|
require_relative "whop_sdk/models/who_can_post_types"
|
|
344
344
|
require_relative "whop_sdk/models/who_can_react"
|
|
345
|
+
require_relative "whop_sdk/models/withdrawal_created_webhook_event"
|
|
345
346
|
require_relative "whop_sdk/models/withdrawal_fee_types"
|
|
346
347
|
require_relative "whop_sdk/models/withdrawal_list_params"
|
|
347
348
|
require_relative "whop_sdk/models/withdrawal_list_response"
|
|
@@ -350,6 +351,7 @@ require_relative "whop_sdk/models/withdrawal_retrieve_response"
|
|
|
350
351
|
require_relative "whop_sdk/models/withdrawal_speeds"
|
|
351
352
|
require_relative "whop_sdk/models/withdrawal_status"
|
|
352
353
|
require_relative "whop_sdk/models/withdrawal_types"
|
|
354
|
+
require_relative "whop_sdk/models/withdrawal_updated_webhook_event"
|
|
353
355
|
require_relative "whop_sdk/models"
|
|
354
356
|
require_relative "whop_sdk/resources/access_tokens"
|
|
355
357
|
require_relative "whop_sdk/resources/account_links"
|
|
@@ -259,6 +259,10 @@ module WhopSDK
|
|
|
259
259
|
sig { returns(T.nilable(Float)) }
|
|
260
260
|
attr_accessor :renewal_price
|
|
261
261
|
|
|
262
|
+
# The number of payments required before pausing the subscription.
|
|
263
|
+
sig { returns(T.nilable(Integer)) }
|
|
264
|
+
attr_accessor :split_pay_required_payments
|
|
265
|
+
|
|
262
266
|
# The title of the plan. This will be visible on the product page to customers.
|
|
263
267
|
sig { returns(T.nilable(String)) }
|
|
264
268
|
attr_accessor :title
|
|
@@ -308,6 +312,7 @@ module WhopSDK
|
|
|
308
312
|
product_id: T.nilable(String),
|
|
309
313
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
310
314
|
renewal_price: T.nilable(Float),
|
|
315
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
311
316
|
title: T.nilable(String),
|
|
312
317
|
trial_period_days: T.nilable(Integer),
|
|
313
318
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
|
|
@@ -352,6 +357,8 @@ module WhopSDK
|
|
|
352
357
|
release_method: nil,
|
|
353
358
|
# The amount the customer is charged every billing period.
|
|
354
359
|
renewal_price: nil,
|
|
360
|
+
# The number of payments required before pausing the subscription.
|
|
361
|
+
split_pay_required_payments: nil,
|
|
355
362
|
# The title of the plan. This will be visible on the product page to customers.
|
|
356
363
|
title: nil,
|
|
357
364
|
# The number of free trial days added before a renewal plan.
|
|
@@ -398,6 +405,7 @@ module WhopSDK
|
|
|
398
405
|
product_id: T.nilable(String),
|
|
399
406
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
400
407
|
renewal_price: T.nilable(Float),
|
|
408
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
401
409
|
title: T.nilable(String),
|
|
402
410
|
trial_period_days: T.nilable(Integer),
|
|
403
411
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
|
|
@@ -98,6 +98,10 @@ module WhopSDK
|
|
|
98
98
|
sig { returns(Float) }
|
|
99
99
|
attr_accessor :renewal_price
|
|
100
100
|
|
|
101
|
+
# The number of payments required before pausing the subscription.
|
|
102
|
+
sig { returns(T.nilable(Integer)) }
|
|
103
|
+
attr_accessor :split_pay_required_payments
|
|
104
|
+
|
|
101
105
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
102
106
|
sig { returns(T.nilable(Integer)) }
|
|
103
107
|
attr_accessor :stock
|
|
@@ -151,6 +155,7 @@ module WhopSDK
|
|
|
151
155
|
purchase_url: String,
|
|
152
156
|
release_method: WhopSDK::ReleaseMethod::OrSymbol,
|
|
153
157
|
renewal_price: Float,
|
|
158
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
154
159
|
stock: T.nilable(Integer),
|
|
155
160
|
tax_type: WhopSDK::TaxType::OrSymbol,
|
|
156
161
|
title: T.nilable(String),
|
|
@@ -199,6 +204,8 @@ module WhopSDK
|
|
|
199
204
|
release_method:,
|
|
200
205
|
# The price a person has to pay for a plan on the renewal purchase.
|
|
201
206
|
renewal_price:,
|
|
207
|
+
# The number of payments required before pausing the subscription.
|
|
208
|
+
split_pay_required_payments:,
|
|
202
209
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
203
210
|
stock:,
|
|
204
211
|
# The tax type for the plan.
|
|
@@ -239,6 +246,7 @@ module WhopSDK
|
|
|
239
246
|
purchase_url: String,
|
|
240
247
|
release_method: WhopSDK::ReleaseMethod::TaggedSymbol,
|
|
241
248
|
renewal_price: Float,
|
|
249
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
242
250
|
stock: T.nilable(Integer),
|
|
243
251
|
tax_type: WhopSDK::TaxType::TaggedSymbol,
|
|
244
252
|
title: T.nilable(String),
|
|
@@ -101,6 +101,10 @@ module WhopSDK
|
|
|
101
101
|
sig { returns(T.nilable(Float)) }
|
|
102
102
|
attr_accessor :renewal_price
|
|
103
103
|
|
|
104
|
+
# The number of payments required before pausing the subscription.
|
|
105
|
+
sig { returns(T.nilable(Integer)) }
|
|
106
|
+
attr_accessor :split_pay_required_payments
|
|
107
|
+
|
|
104
108
|
# The number of units available for purchase.
|
|
105
109
|
sig { returns(T.nilable(Integer)) }
|
|
106
110
|
attr_accessor :stock
|
|
@@ -148,6 +152,7 @@ module WhopSDK
|
|
|
148
152
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
149
153
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
150
154
|
renewal_price: T.nilable(Float),
|
|
155
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
151
156
|
stock: T.nilable(Integer),
|
|
152
157
|
title: T.nilable(String),
|
|
153
158
|
trial_period_days: T.nilable(Integer),
|
|
@@ -192,6 +197,8 @@ module WhopSDK
|
|
|
192
197
|
# The amount the customer is charged every billing period. Use only if a recurring
|
|
193
198
|
# payment. Provided as a number in dollars. Eg: 10.43 for $10.43
|
|
194
199
|
renewal_price: nil,
|
|
200
|
+
# The number of payments required before pausing the subscription.
|
|
201
|
+
split_pay_required_payments: nil,
|
|
195
202
|
# The number of units available for purchase.
|
|
196
203
|
stock: nil,
|
|
197
204
|
# The title of the plan. This will be visible on the product page to customers.
|
|
@@ -232,6 +239,7 @@ module WhopSDK
|
|
|
232
239
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
233
240
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
234
241
|
renewal_price: T.nilable(Float),
|
|
242
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
235
243
|
stock: T.nilable(Integer),
|
|
236
244
|
title: T.nilable(String),
|
|
237
245
|
trial_period_days: T.nilable(Integer),
|
|
@@ -113,6 +113,10 @@ module WhopSDK
|
|
|
113
113
|
sig { returns(Float) }
|
|
114
114
|
attr_accessor :renewal_price
|
|
115
115
|
|
|
116
|
+
# The number of payments required before pausing the subscription.
|
|
117
|
+
sig { returns(T.nilable(Integer)) }
|
|
118
|
+
attr_accessor :split_pay_required_payments
|
|
119
|
+
|
|
116
120
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
117
121
|
sig { returns(T.nilable(Integer)) }
|
|
118
122
|
attr_accessor :stock
|
|
@@ -165,6 +169,7 @@ module WhopSDK
|
|
|
165
169
|
purchase_url: String,
|
|
166
170
|
release_method: WhopSDK::ReleaseMethod::OrSymbol,
|
|
167
171
|
renewal_price: Float,
|
|
172
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
168
173
|
stock: T.nilable(Integer),
|
|
169
174
|
title: T.nilable(String),
|
|
170
175
|
trial_period_days: T.nilable(Integer),
|
|
@@ -208,6 +213,8 @@ module WhopSDK
|
|
|
208
213
|
release_method:,
|
|
209
214
|
# The price a person has to pay for a plan on the renewal purchase.
|
|
210
215
|
renewal_price:,
|
|
216
|
+
# The number of payments required before pausing the subscription.
|
|
217
|
+
split_pay_required_payments:,
|
|
211
218
|
# The number of units available for purchase. Only displayed to authorized actors
|
|
212
219
|
stock:,
|
|
213
220
|
# The title of the plan. This will be visible on the product page to customers.
|
|
@@ -246,6 +253,7 @@ module WhopSDK
|
|
|
246
253
|
purchase_url: String,
|
|
247
254
|
release_method: WhopSDK::ReleaseMethod::TaggedSymbol,
|
|
248
255
|
renewal_price: Float,
|
|
256
|
+
split_pay_required_payments: T.nilable(Integer),
|
|
249
257
|
stock: T.nilable(Integer),
|
|
250
258
|
title: T.nilable(String),
|
|
251
259
|
trial_period_days: T.nilable(Integer),
|
|
@@ -15,7 +15,7 @@ module WhopSDK
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :company_id
|
|
17
17
|
|
|
18
|
-
# The title of the product.
|
|
18
|
+
# The title of the product. It must be max 40 characters.
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :title
|
|
21
21
|
|
|
@@ -144,7 +144,7 @@ module WhopSDK
|
|
|
144
144
|
def self.new(
|
|
145
145
|
# The ID of the company to create the product for.
|
|
146
146
|
company_id:,
|
|
147
|
-
# The title of the product.
|
|
147
|
+
# The title of the product. It must be max 40 characters.
|
|
148
148
|
title:,
|
|
149
149
|
# The different business types a company can be.
|
|
150
150
|
business_type: nil,
|
|
@@ -21,6 +21,8 @@ module WhopSDK
|
|
|
21
21
|
WhopSDK::SetupIntentRequiresActionWebhookEvent,
|
|
22
22
|
WhopSDK::SetupIntentSucceededWebhookEvent,
|
|
23
23
|
WhopSDK::SetupIntentCanceledWebhookEvent,
|
|
24
|
+
WhopSDK::WithdrawalCreatedWebhookEvent,
|
|
25
|
+
WhopSDK::WithdrawalUpdatedWebhookEvent,
|
|
24
26
|
WhopSDK::CourseLessonInteractionCompletedWebhookEvent,
|
|
25
27
|
WhopSDK::PaymentSucceededWebhookEvent,
|
|
26
28
|
WhopSDK::PaymentFailedWebhookEvent,
|