whop_sdk 0.0.4 → 0.0.5
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 +25 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +4 -0
- data/lib/whop_sdk/internal/transport/base_client.rb +7 -1
- data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +6 -2
- data/lib/whop_sdk/models/access_level.rb +1 -1
- data/lib/whop_sdk/models/access_pass_type.rb +2 -1
- data/lib/whop_sdk/models/access_token_create_params.rb +67 -0
- data/lib/whop_sdk/models/access_token_create_response.rb +27 -0
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +4 -4
- data/lib/whop_sdk/models/course.rb +18 -1
- data/lib/whop_sdk/models/course_create_params.rb +20 -1
- data/lib/whop_sdk/models/course_lesson_create_params.rb +77 -1
- data/lib/whop_sdk/models/course_lesson_list_response.rb +43 -1
- data/lib/whop_sdk/models/course_lesson_update_params.rb +77 -1
- data/lib/whop_sdk/models/course_list_response.rb +18 -1
- data/lib/whop_sdk/models/course_update_params.rb +19 -1
- data/lib/whop_sdk/models/course_visibilities.rb +17 -0
- data/lib/whop_sdk/models/embed_type.rb +16 -0
- data/lib/whop_sdk/models/entry.rb +3 -3
- data/lib/whop_sdk/models/entry_list_response.rb +3 -3
- data/lib/whop_sdk/models/experience.rb +5 -6
- data/lib/whop_sdk/models/forum_post.rb +2 -2
- data/lib/whop_sdk/models/forum_post_list_response.rb +2 -2
- data/lib/whop_sdk/models/global_affiliate_status.rb +1 -1
- data/lib/whop_sdk/models/invoice_create_params.rb +2 -2
- data/lib/whop_sdk/models/invoice_list_params.rb +27 -40
- data/lib/whop_sdk/models/lesson.rb +43 -1
- data/lib/whop_sdk/models/member_list_params.rb +11 -11
- data/lib/whop_sdk/models/member_list_response.rb +3 -3
- data/lib/whop_sdk/models/member_retrieve_response.rb +3 -3
- data/lib/whop_sdk/models/membership_list_params.rb +9 -9
- data/lib/whop_sdk/models/message.rb +2 -2
- data/lib/whop_sdk/models/message_list_response.rb +2 -2
- data/lib/whop_sdk/models/payment.rb +3 -3
- data/lib/whop_sdk/models/payment_list_response.rb +3 -3
- data/lib/whop_sdk/models/plan.rb +6 -4
- data/lib/whop_sdk/models/plan_create_params.rb +2 -2
- data/lib/whop_sdk/models/plan_list_response.rb +6 -4
- data/lib/whop_sdk/models/plan_type.rb +1 -1
- data/lib/whop_sdk/models/product.rb +1 -1
- data/lib/whop_sdk/models/product_create_params.rb +6 -6
- data/lib/whop_sdk/models/product_list_item.rb +1 -1
- data/lib/whop_sdk/models/product_update_params.rb +4 -4
- data/lib/whop_sdk/models/promo_code.rb +3 -3
- data/lib/whop_sdk/models/promo_code_list_response.rb +3 -3
- data/lib/whop_sdk/models.rb +6 -0
- data/lib/whop_sdk/resources/access_tokens.rb +46 -0
- data/lib/whop_sdk/resources/app_builds.rb +4 -2
- data/lib/whop_sdk/resources/apps.rb +3 -2
- data/lib/whop_sdk/resources/authorized_users.rb +2 -1
- data/lib/whop_sdk/resources/chat_channels.rb +9 -2
- data/lib/whop_sdk/resources/checkout_configurations.rb +2 -1
- data/lib/whop_sdk/resources/companies.rb +2 -1
- data/lib/whop_sdk/resources/course_chapters.rb +5 -3
- data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -1
- data/lib/whop_sdk/resources/course_lessons.rb +19 -5
- data/lib/whop_sdk/resources/course_students.rb +2 -1
- data/lib/whop_sdk/resources/courses.rb +15 -5
- data/lib/whop_sdk/resources/entries.rb +6 -3
- data/lib/whop_sdk/resources/experiences.rb +8 -6
- data/lib/whop_sdk/resources/forum_posts.rb +3 -2
- data/lib/whop_sdk/resources/forums.rb +3 -2
- data/lib/whop_sdk/resources/invoices.rb +11 -5
- data/lib/whop_sdk/resources/ledger_accounts.rb +6 -2
- data/lib/whop_sdk/resources/members.rb +6 -5
- data/lib/whop_sdk/resources/memberships.rb +10 -8
- data/lib/whop_sdk/resources/messages.rb +3 -2
- data/lib/whop_sdk/resources/payments.rb +7 -4
- data/lib/whop_sdk/resources/plans.rb +6 -4
- data/lib/whop_sdk/resources/products.rb +9 -7
- data/lib/whop_sdk/resources/promo_codes.rb +4 -2
- data/lib/whop_sdk/resources/reactions.rb +2 -1
- data/lib/whop_sdk/resources/reviews.rb +2 -1
- data/lib/whop_sdk/resources/shipments.rb +2 -1
- data/lib/whop_sdk/resources/support_channels.rb +2 -1
- data/lib/whop_sdk/resources/transfers.rb +2 -1
- data/lib/whop_sdk/resources/users.rb +9 -3
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +6 -0
- data/manifest.yaml +1 -0
- data/rbi/whop_sdk/client.rbi +3 -0
- data/rbi/whop_sdk/internal/transport/base_client.rbi +5 -0
- data/rbi/whop_sdk/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/whop_sdk/internal/type/base_model.rbi +8 -4
- data/rbi/whop_sdk/models/access_level.rbi +1 -1
- data/rbi/whop_sdk/models/access_pass_type.rbi +2 -1
- data/rbi/whop_sdk/models/access_token_create_params.rbi +126 -0
- data/rbi/whop_sdk/models/access_token_create_response.rbi +37 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +4 -4
- data/rbi/whop_sdk/models/course.rbi +21 -3
- data/rbi/whop_sdk/models/course_create_params.rbi +22 -0
- data/rbi/whop_sdk/models/course_lesson_create_params.rbi +126 -0
- data/rbi/whop_sdk/models/course_lesson_list_response.rbi +68 -0
- data/rbi/whop_sdk/models/course_lesson_update_params.rbi +126 -0
- data/rbi/whop_sdk/models/course_list_response.rbi +21 -3
- data/rbi/whop_sdk/models/course_update_params.rbi +20 -0
- data/rbi/whop_sdk/models/course_visibilities.rbi +23 -0
- data/rbi/whop_sdk/models/embed_type.rbi +20 -0
- data/rbi/whop_sdk/models/entry.rbi +3 -3
- data/rbi/whop_sdk/models/entry_list_response.rbi +3 -3
- data/rbi/whop_sdk/models/experience.rbi +7 -9
- data/rbi/whop_sdk/models/forum_post.rbi +2 -2
- data/rbi/whop_sdk/models/forum_post_list_response.rbi +2 -2
- data/rbi/whop_sdk/models/global_affiliate_status.rbi +1 -1
- data/rbi/whop_sdk/models/invoice_create_params.rbi +2 -2
- data/rbi/whop_sdk/models/invoice_list_params.rbi +26 -71
- data/rbi/whop_sdk/models/lesson.rbi +54 -0
- data/rbi/whop_sdk/models/member_list_params.rbi +10 -10
- data/rbi/whop_sdk/models/member_list_response.rbi +6 -6
- data/rbi/whop_sdk/models/member_retrieve_response.rbi +6 -6
- data/rbi/whop_sdk/models/membership_list_params.rbi +8 -8
- data/rbi/whop_sdk/models/message.rbi +2 -2
- data/rbi/whop_sdk/models/message_list_response.rbi +2 -2
- data/rbi/whop_sdk/models/payment.rbi +3 -3
- data/rbi/whop_sdk/models/payment_list_response.rbi +3 -3
- data/rbi/whop_sdk/models/plan.rbi +6 -4
- data/rbi/whop_sdk/models/plan_create_params.rbi +2 -2
- data/rbi/whop_sdk/models/plan_list_response.rbi +6 -4
- data/rbi/whop_sdk/models/plan_type.rbi +1 -1
- data/rbi/whop_sdk/models/product.rbi +1 -1
- data/rbi/whop_sdk/models/product_create_params.rbi +6 -6
- data/rbi/whop_sdk/models/product_list_item.rbi +1 -1
- data/rbi/whop_sdk/models/product_update_params.rbi +4 -4
- data/rbi/whop_sdk/models/promo_code.rbi +3 -3
- data/rbi/whop_sdk/models/promo_code_list_response.rbi +3 -3
- data/rbi/whop_sdk/models.rbi +6 -0
- data/rbi/whop_sdk/resources/access_tokens.rbi +41 -0
- data/rbi/whop_sdk/resources/app_builds.rbi +10 -2
- data/rbi/whop_sdk/resources/apps.rbi +6 -1
- data/rbi/whop_sdk/resources/authorized_users.rbi +5 -1
- data/rbi/whop_sdk/resources/chat_channels.rbi +8 -1
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +5 -1
- data/rbi/whop_sdk/resources/companies.rbi +5 -1
- data/rbi/whop_sdk/resources/course_chapters.rbi +11 -2
- data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +5 -1
- data/rbi/whop_sdk/resources/course_lessons.rbi +41 -2
- data/rbi/whop_sdk/resources/course_students.rbi +5 -1
- data/rbi/whop_sdk/resources/courses.rbi +28 -2
- data/rbi/whop_sdk/resources/entries.rbi +15 -3
- data/rbi/whop_sdk/resources/experiences.rbi +14 -2
- data/rbi/whop_sdk/resources/forum_posts.rbi +6 -1
- data/rbi/whop_sdk/resources/forums.rbi +6 -1
- data/rbi/whop_sdk/resources/invoices.rbi +20 -5
- data/rbi/whop_sdk/resources/ledger_accounts.rbi +7 -2
- data/rbi/whop_sdk/resources/members.rbi +9 -5
- data/rbi/whop_sdk/resources/memberships.rbi +16 -5
- data/rbi/whop_sdk/resources/messages.rbi +6 -1
- data/rbi/whop_sdk/resources/payments.rbi +16 -3
- data/rbi/whop_sdk/resources/plans.rbi +12 -3
- data/rbi/whop_sdk/resources/products.rbi +15 -6
- data/rbi/whop_sdk/resources/promo_codes.rbi +10 -2
- data/rbi/whop_sdk/resources/reactions.rbi +5 -1
- data/rbi/whop_sdk/resources/reviews.rbi +5 -1
- data/rbi/whop_sdk/resources/shipments.rbi +5 -1
- data/rbi/whop_sdk/resources/support_channels.rbi +5 -1
- data/rbi/whop_sdk/resources/transfers.rbi +5 -1
- data/rbi/whop_sdk/resources/users.rbi +13 -2
- data/sig/whop_sdk/client.rbs +2 -0
- data/sig/whop_sdk/internal/transport/base_client.rbs +2 -0
- data/sig/whop_sdk/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/whop_sdk/models/access_token_create_params.rbs +56 -0
- data/sig/whop_sdk/models/access_token_create_response.rbs +15 -0
- data/sig/whop_sdk/models/course.rbs +13 -3
- data/sig/whop_sdk/models/course_create_params.rbs +11 -1
- data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
- data/sig/whop_sdk/models/course_lesson_list_response.rbs +25 -0
- data/sig/whop_sdk/models/course_lesson_update_params.rbs +46 -0
- data/sig/whop_sdk/models/course_list_response.rbs +13 -3
- data/sig/whop_sdk/models/course_update_params.rbs +11 -1
- data/sig/whop_sdk/models/course_visibilities.rbs +14 -0
- data/sig/whop_sdk/models/embed_type.rbs +14 -0
- data/sig/whop_sdk/models/invoice_list_params.rbs +16 -33
- data/sig/whop_sdk/models/lesson.rbs +25 -0
- data/sig/whop_sdk/models/member_list_params.rbs +5 -5
- data/sig/whop_sdk/models/membership_list_params.rbs +5 -5
- data/sig/whop_sdk/models.rbs +6 -0
- data/sig/whop_sdk/resources/access_tokens.rbs +15 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +6 -0
- data/sig/whop_sdk/resources/courses.rbs +4 -0
- data/sig/whop_sdk/resources/invoices.rbs +3 -1
- data/sig/whop_sdk/resources/members.rbs +1 -1
- data/sig/whop_sdk/resources/memberships.rbs +1 -1
- metadata +17 -2
|
@@ -133,7 +133,7 @@ module WhopSDK
|
|
|
133
133
|
end
|
|
134
134
|
attr_writer :plan
|
|
135
135
|
|
|
136
|
-
# The
|
|
136
|
+
# The product this payment was made for
|
|
137
137
|
sig { returns(T.nilable(WhopSDK::Models::PaymentListResponse::Product)) }
|
|
138
138
|
attr_reader :product
|
|
139
139
|
|
|
@@ -299,7 +299,7 @@ module WhopSDK
|
|
|
299
299
|
payment_method_type:,
|
|
300
300
|
# The plan attached to this payment.
|
|
301
301
|
plan:,
|
|
302
|
-
# The
|
|
302
|
+
# The product this payment was made for
|
|
303
303
|
product:,
|
|
304
304
|
# The promo code used for this payment.
|
|
305
305
|
promo_code:,
|
|
@@ -625,7 +625,7 @@ module WhopSDK
|
|
|
625
625
|
sig { returns(String) }
|
|
626
626
|
attr_accessor :title
|
|
627
627
|
|
|
628
|
-
# The
|
|
628
|
+
# The product this payment was made for
|
|
629
629
|
sig do
|
|
630
630
|
params(id: String, route: String, title: String).returns(
|
|
631
631
|
T.attached_class
|
|
@@ -79,7 +79,7 @@ module WhopSDK
|
|
|
79
79
|
sig { returns(WhopSDK::PlanType::TaggedSymbol) }
|
|
80
80
|
attr_accessor :plan_type
|
|
81
81
|
|
|
82
|
-
# The
|
|
82
|
+
# The product that this plan belongs to.
|
|
83
83
|
sig { returns(T.nilable(WhopSDK::Plan::Product)) }
|
|
84
84
|
attr_reader :product
|
|
85
85
|
|
|
@@ -126,7 +126,9 @@ module WhopSDK
|
|
|
126
126
|
sig { returns(WhopSDK::Visibility::TaggedSymbol) }
|
|
127
127
|
attr_accessor :visibility
|
|
128
128
|
|
|
129
|
-
#
|
|
129
|
+
# A plan for an product. Plans define the core parameters that define a checkout
|
|
130
|
+
# and payment on whop. Use plans to create different ways to price your products
|
|
131
|
+
# (Eg renewal / one_time)
|
|
130
132
|
sig do
|
|
131
133
|
params(
|
|
132
134
|
id: String,
|
|
@@ -189,7 +191,7 @@ module WhopSDK
|
|
|
189
191
|
payment_method_configuration:,
|
|
190
192
|
# Indicates if the plan is a one time payment or recurring.
|
|
191
193
|
plan_type:,
|
|
192
|
-
# The
|
|
194
|
+
# The product that this plan belongs to.
|
|
193
195
|
product:,
|
|
194
196
|
# The direct link to purchase the product.
|
|
195
197
|
purchase_url:,
|
|
@@ -453,7 +455,7 @@ module WhopSDK
|
|
|
453
455
|
sig { returns(String) }
|
|
454
456
|
attr_accessor :title
|
|
455
457
|
|
|
456
|
-
# The
|
|
458
|
+
# The product that this plan belongs to.
|
|
457
459
|
sig { params(id: String, title: String).returns(T.attached_class) }
|
|
458
460
|
def self.new(
|
|
459
461
|
# The internal ID of the public product.
|
|
@@ -88,7 +88,7 @@ module WhopSDK
|
|
|
88
88
|
end
|
|
89
89
|
attr_writer :payment_method_configuration
|
|
90
90
|
|
|
91
|
-
# The type of plan that can be attached to
|
|
91
|
+
# The type of plan that can be attached to a product
|
|
92
92
|
sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
|
|
93
93
|
attr_accessor :plan_type
|
|
94
94
|
|
|
@@ -197,7 +197,7 @@ module WhopSDK
|
|
|
197
197
|
# The explicit payment method configuration for the plan. If not provided, the
|
|
198
198
|
# platform or company's defaults will apply.
|
|
199
199
|
payment_method_configuration: nil,
|
|
200
|
-
# The type of plan that can be attached to
|
|
200
|
+
# The type of plan that can be attached to a product
|
|
201
201
|
plan_type: nil,
|
|
202
202
|
# The methods of how a plan can be released.
|
|
203
203
|
release_method: nil,
|
|
@@ -90,7 +90,7 @@ module WhopSDK
|
|
|
90
90
|
sig { returns(WhopSDK::PlanType::TaggedSymbol) }
|
|
91
91
|
attr_accessor :plan_type
|
|
92
92
|
|
|
93
|
-
# The
|
|
93
|
+
# The product that this plan belongs to.
|
|
94
94
|
sig { returns(T.nilable(WhopSDK::Models::PlanListResponse::Product)) }
|
|
95
95
|
attr_reader :product
|
|
96
96
|
|
|
@@ -137,7 +137,9 @@ module WhopSDK
|
|
|
137
137
|
sig { returns(WhopSDK::Visibility::TaggedSymbol) }
|
|
138
138
|
attr_accessor :visibility
|
|
139
139
|
|
|
140
|
-
#
|
|
140
|
+
# A plan for an product. Plans define the core parameters that define a checkout
|
|
141
|
+
# and payment on whop. Use plans to create different ways to price your products
|
|
142
|
+
# (Eg renewal / one_time)
|
|
141
143
|
sig do
|
|
142
144
|
params(
|
|
143
145
|
id: String,
|
|
@@ -198,7 +200,7 @@ module WhopSDK
|
|
|
198
200
|
payment_method_configuration:,
|
|
199
201
|
# Indicates if the plan is a one time payment or recurring.
|
|
200
202
|
plan_type:,
|
|
201
|
-
# The
|
|
203
|
+
# The product that this plan belongs to.
|
|
202
204
|
product:,
|
|
203
205
|
# The direct link to purchase the product.
|
|
204
206
|
purchase_url:,
|
|
@@ -395,7 +397,7 @@ module WhopSDK
|
|
|
395
397
|
sig { returns(String) }
|
|
396
398
|
attr_accessor :title
|
|
397
399
|
|
|
398
|
-
# The
|
|
400
|
+
# The product that this plan belongs to.
|
|
399
401
|
sig { params(id: String, title: String).returns(T.attached_class) }
|
|
400
402
|
def self.new(
|
|
401
403
|
# The internal ID of the public product.
|
|
@@ -119,7 +119,7 @@ module WhopSDK
|
|
|
119
119
|
sig { returns(WhopSDK::Visibility::TaggedSymbol) }
|
|
120
120
|
attr_accessor :visibility
|
|
121
121
|
|
|
122
|
-
#
|
|
122
|
+
# Represents a product on whop. Use products to sell anything on the platform.
|
|
123
123
|
sig do
|
|
124
124
|
params(
|
|
125
125
|
id: String,
|
|
@@ -53,7 +53,7 @@ module WhopSDK
|
|
|
53
53
|
sig { returns(T.nilable(Float)) }
|
|
54
54
|
attr_accessor :global_affiliate_percentage
|
|
55
55
|
|
|
56
|
-
# The different statuses of the global affiliate program for
|
|
56
|
+
# The different statuses of the global affiliate program for a product.
|
|
57
57
|
sig { returns(T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol)) }
|
|
58
58
|
attr_accessor :global_affiliate_status
|
|
59
59
|
|
|
@@ -69,7 +69,7 @@ module WhopSDK
|
|
|
69
69
|
sig { returns(T.nilable(Float)) }
|
|
70
70
|
attr_accessor :member_affiliate_percentage
|
|
71
71
|
|
|
72
|
-
# The different statuses of the global affiliate program for
|
|
72
|
+
# The different statuses of the global affiliate program for a product.
|
|
73
73
|
sig { returns(T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol)) }
|
|
74
74
|
attr_accessor :member_affiliate_status
|
|
75
75
|
|
|
@@ -164,7 +164,7 @@ module WhopSDK
|
|
|
164
164
|
experience_ids: nil,
|
|
165
165
|
# The percentage of the revenue that goes to the global affiliate program.
|
|
166
166
|
global_affiliate_percentage: nil,
|
|
167
|
-
# The different statuses of the global affiliate program for
|
|
167
|
+
# The different statuses of the global affiliate program for a product.
|
|
168
168
|
global_affiliate_status: nil,
|
|
169
169
|
# The headline of the product.
|
|
170
170
|
headline: nil,
|
|
@@ -172,7 +172,7 @@ module WhopSDK
|
|
|
172
172
|
industry_type: nil,
|
|
173
173
|
# The percentage of the revenue that goes to the member affiliate program.
|
|
174
174
|
member_affiliate_percentage: nil,
|
|
175
|
-
# The different statuses of the global affiliate program for
|
|
175
|
+
# The different statuses of the global affiliate program for a product.
|
|
176
176
|
member_affiliate_status: nil,
|
|
177
177
|
# The details to assign an autogenerated plan.
|
|
178
178
|
plan_options: nil,
|
|
@@ -257,7 +257,7 @@ module WhopSDK
|
|
|
257
257
|
sig { returns(T.nilable(Float)) }
|
|
258
258
|
attr_accessor :initial_price
|
|
259
259
|
|
|
260
|
-
# The type of plan that can be attached to
|
|
260
|
+
# The type of plan that can be attached to a product
|
|
261
261
|
sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
|
|
262
262
|
attr_accessor :plan_type
|
|
263
263
|
|
|
@@ -300,7 +300,7 @@ module WhopSDK
|
|
|
300
300
|
custom_fields: nil,
|
|
301
301
|
# An additional amount charged upon first purchase.
|
|
302
302
|
initial_price: nil,
|
|
303
|
-
# The type of plan that can be attached to
|
|
303
|
+
# The type of plan that can be attached to a product
|
|
304
304
|
plan_type: nil,
|
|
305
305
|
# The methods of how a plan can be released.
|
|
306
306
|
release_method: nil,
|
|
@@ -62,7 +62,7 @@ module WhopSDK
|
|
|
62
62
|
sig { returns(WhopSDK::Visibility::TaggedSymbol) }
|
|
63
63
|
attr_accessor :visibility
|
|
64
64
|
|
|
65
|
-
#
|
|
65
|
+
# Represents a product on whop. Use products to sell anything on the platform.
|
|
66
66
|
sig do
|
|
67
67
|
params(
|
|
68
68
|
id: String,
|
|
@@ -54,7 +54,7 @@ module WhopSDK
|
|
|
54
54
|
sig { returns(T.nilable(Float)) }
|
|
55
55
|
attr_accessor :global_affiliate_percentage
|
|
56
56
|
|
|
57
|
-
# The different statuses of the global affiliate program for
|
|
57
|
+
# The different statuses of the global affiliate program for a product.
|
|
58
58
|
sig { returns(T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol)) }
|
|
59
59
|
attr_accessor :global_affiliate_status
|
|
60
60
|
|
|
@@ -70,7 +70,7 @@ module WhopSDK
|
|
|
70
70
|
sig { returns(T.nilable(Float)) }
|
|
71
71
|
attr_accessor :member_affiliate_percentage
|
|
72
72
|
|
|
73
|
-
# The different statuses of the global affiliate program for
|
|
73
|
+
# The different statuses of the global affiliate program for a product.
|
|
74
74
|
sig { returns(T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol)) }
|
|
75
75
|
attr_accessor :member_affiliate_status
|
|
76
76
|
|
|
@@ -158,7 +158,7 @@ module WhopSDK
|
|
|
158
158
|
description: nil,
|
|
159
159
|
# The percentage of the revenue that goes to the global affiliate program.
|
|
160
160
|
global_affiliate_percentage: nil,
|
|
161
|
-
# The different statuses of the global affiliate program for
|
|
161
|
+
# The different statuses of the global affiliate program for a product.
|
|
162
162
|
global_affiliate_status: nil,
|
|
163
163
|
# The headline of the product.
|
|
164
164
|
headline: nil,
|
|
@@ -166,7 +166,7 @@ module WhopSDK
|
|
|
166
166
|
industry_type: nil,
|
|
167
167
|
# The percentage of the revenue that goes to the member affiliate program.
|
|
168
168
|
member_affiliate_percentage: nil,
|
|
169
|
-
# The different statuses of the global affiliate program for
|
|
169
|
+
# The different statuses of the global affiliate program for a product.
|
|
170
170
|
member_affiliate_status: nil,
|
|
171
171
|
# The ID of the product tax code to apply to this product.
|
|
172
172
|
product_tax_code_id: nil,
|
|
@@ -58,7 +58,7 @@ module WhopSDK
|
|
|
58
58
|
sig { returns(T::Boolean) }
|
|
59
59
|
attr_accessor :one_per_customer
|
|
60
60
|
|
|
61
|
-
# The
|
|
61
|
+
# The product this promo code applies to
|
|
62
62
|
sig { returns(T.nilable(WhopSDK::PromoCode::Product)) }
|
|
63
63
|
attr_reader :product
|
|
64
64
|
|
|
@@ -141,7 +141,7 @@ module WhopSDK
|
|
|
141
141
|
new_users_only:,
|
|
142
142
|
# Restricts promo use to only be applied once per customer.
|
|
143
143
|
one_per_customer:,
|
|
144
|
-
# The
|
|
144
|
+
# The product this promo code applies to
|
|
145
145
|
product:,
|
|
146
146
|
# The number of months the promo is applied for.
|
|
147
147
|
promo_duration_months:,
|
|
@@ -229,7 +229,7 @@ module WhopSDK
|
|
|
229
229
|
sig { returns(String) }
|
|
230
230
|
attr_accessor :title
|
|
231
231
|
|
|
232
|
-
# The
|
|
232
|
+
# The product this promo code applies to
|
|
233
233
|
sig { params(id: String, title: String).returns(T.attached_class) }
|
|
234
234
|
def self.new(
|
|
235
235
|
# The internal ID of the public product.
|
|
@@ -56,7 +56,7 @@ module WhopSDK
|
|
|
56
56
|
sig { returns(T::Boolean) }
|
|
57
57
|
attr_accessor :one_per_customer
|
|
58
58
|
|
|
59
|
-
# The
|
|
59
|
+
# The product this promo code applies to
|
|
60
60
|
sig do
|
|
61
61
|
returns(T.nilable(WhopSDK::Models::PromoCodeListResponse::Product))
|
|
62
62
|
end
|
|
@@ -142,7 +142,7 @@ module WhopSDK
|
|
|
142
142
|
new_users_only:,
|
|
143
143
|
# Restricts promo use to only be applied once per customer.
|
|
144
144
|
one_per_customer:,
|
|
145
|
-
# The
|
|
145
|
+
# The product this promo code applies to
|
|
146
146
|
product:,
|
|
147
147
|
# The number of months the promo is applied for.
|
|
148
148
|
promo_duration_months:,
|
|
@@ -203,7 +203,7 @@ module WhopSDK
|
|
|
203
203
|
sig { returns(String) }
|
|
204
204
|
attr_accessor :title
|
|
205
205
|
|
|
206
|
-
# The
|
|
206
|
+
# The product this promo code applies to
|
|
207
207
|
sig { params(id: String, title: String).returns(T.attached_class) }
|
|
208
208
|
def self.new(
|
|
209
209
|
# The internal ID of the public product.
|
data/rbi/whop_sdk/models.rbi
CHANGED
|
@@ -5,6 +5,8 @@ module WhopSDK
|
|
|
5
5
|
|
|
6
6
|
AccessPassType = WhopSDK::Models::AccessPassType
|
|
7
7
|
|
|
8
|
+
AccessTokenCreateParams = WhopSDK::Models::AccessTokenCreateParams
|
|
9
|
+
|
|
8
10
|
App = WhopSDK::Models::App
|
|
9
11
|
|
|
10
12
|
AppBuild = WhopSDK::Models::AppBuild
|
|
@@ -128,6 +130,8 @@ module WhopSDK
|
|
|
128
130
|
|
|
129
131
|
CourseUpdateParams = WhopSDK::Models::CourseUpdateParams
|
|
130
132
|
|
|
133
|
+
CourseVisibilities = WhopSDK::Models::CourseVisibilities
|
|
134
|
+
|
|
131
135
|
Currency = WhopSDK::Models::Currency
|
|
132
136
|
|
|
133
137
|
CustomCta = WhopSDK::Models::CustomCta
|
|
@@ -138,6 +142,8 @@ module WhopSDK
|
|
|
138
142
|
|
|
139
143
|
EmailNotificationPreferences = WhopSDK::Models::EmailNotificationPreferences
|
|
140
144
|
|
|
145
|
+
EmbedType = WhopSDK::Models::EmbedType
|
|
146
|
+
|
|
141
147
|
Entry = WhopSDK::Models::Entry
|
|
142
148
|
|
|
143
149
|
EntryApprovedWebhookEvent = WhopSDK::Models::EntryApprovedWebhookEvent
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class AccessTokens
|
|
6
|
+
# Creates an access token for a user to access a specific resource. These access
|
|
7
|
+
# tokens are designed to be used with Whop's embedded components.
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
scoped_actions: T::Array[String],
|
|
11
|
+
target_resource_id: String,
|
|
12
|
+
target_resource_type:
|
|
13
|
+
WhopSDK::AccessTokenCreateParams::TargetResourceType::OrSymbol,
|
|
14
|
+
expires_at: T.nilable(Time),
|
|
15
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
16
|
+
).returns(WhopSDK::Models::AccessTokenCreateResponse)
|
|
17
|
+
end
|
|
18
|
+
def create(
|
|
19
|
+
# Array of desired scoped actions for the access token. This list must be a subset
|
|
20
|
+
# of the API keys's existing permissions. Otherwise, an error will be raised.
|
|
21
|
+
scoped_actions:,
|
|
22
|
+
# The ID of the target resource (Company, User, etc.) for which the access token
|
|
23
|
+
# is being created.
|
|
24
|
+
target_resource_id:,
|
|
25
|
+
# The type of the target resource (company, user, product, experience, etc.).
|
|
26
|
+
target_resource_type:,
|
|
27
|
+
# The expiration timestamp for the access token. If not provided, a default
|
|
28
|
+
# expiration time of 1 hour will be used. The expiration can be set to a maximum
|
|
29
|
+
# of 3 hours from the current time.
|
|
30
|
+
expires_at: nil,
|
|
31
|
+
request_options: {}
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# @api private
|
|
36
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
37
|
+
def self.new(client:)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -55,7 +55,11 @@ module WhopSDK
|
|
|
55
55
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
56
56
|
).returns(WhopSDK::AppBuild)
|
|
57
57
|
end
|
|
58
|
-
def retrieve(
|
|
58
|
+
def retrieve(
|
|
59
|
+
# The ID of the app build
|
|
60
|
+
id,
|
|
61
|
+
request_options: {}
|
|
62
|
+
)
|
|
59
63
|
end
|
|
60
64
|
|
|
61
65
|
# Lists app builds for an app
|
|
@@ -107,7 +111,11 @@ module WhopSDK
|
|
|
107
111
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
108
112
|
).returns(WhopSDK::AppBuild)
|
|
109
113
|
end
|
|
110
|
-
def promote(
|
|
114
|
+
def promote(
|
|
115
|
+
# The ID of the app build to promote.
|
|
116
|
+
id,
|
|
117
|
+
request_options: {}
|
|
118
|
+
)
|
|
111
119
|
end
|
|
112
120
|
|
|
113
121
|
# @api private
|
|
@@ -39,7 +39,11 @@ module WhopSDK
|
|
|
39
39
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
40
40
|
).returns(WhopSDK::App)
|
|
41
41
|
end
|
|
42
|
-
def retrieve(
|
|
42
|
+
def retrieve(
|
|
43
|
+
# The ID of the app
|
|
44
|
+
id,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
43
47
|
end
|
|
44
48
|
|
|
45
49
|
# Update an existing App
|
|
@@ -74,6 +78,7 @@ module WhopSDK
|
|
|
74
78
|
).returns(WhopSDK::App)
|
|
75
79
|
end
|
|
76
80
|
def update(
|
|
81
|
+
# The ID of the app
|
|
77
82
|
id,
|
|
78
83
|
# The description of the app for the app store in-depth app view.
|
|
79
84
|
app_store_description: nil,
|
|
@@ -15,7 +15,11 @@ module WhopSDK
|
|
|
15
15
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
16
16
|
).returns(WhopSDK::Models::AuthorizedUserRetrieveResponse)
|
|
17
17
|
end
|
|
18
|
-
def retrieve(
|
|
18
|
+
def retrieve(
|
|
19
|
+
# The ID of the authorized user
|
|
20
|
+
id,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
19
23
|
end
|
|
20
24
|
|
|
21
25
|
# Lists authorized users
|
|
@@ -14,7 +14,12 @@ module WhopSDK
|
|
|
14
14
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
15
15
|
).returns(WhopSDK::ChatChannel)
|
|
16
16
|
end
|
|
17
|
-
def retrieve(
|
|
17
|
+
def retrieve(
|
|
18
|
+
# The ID of the chat channel to fetch, it can be an experience ID or a chat
|
|
19
|
+
# channel ID
|
|
20
|
+
id,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
18
23
|
end
|
|
19
24
|
|
|
20
25
|
# Updates a chat channel
|
|
@@ -35,6 +40,8 @@ module WhopSDK
|
|
|
35
40
|
).returns(WhopSDK::ChatChannel)
|
|
36
41
|
end
|
|
37
42
|
def update(
|
|
43
|
+
# The ID of the chat channel to update. Can be an experience ID or a chat feed
|
|
44
|
+
# external ID.
|
|
38
45
|
id,
|
|
39
46
|
# Whether media uploads are banned in this chat
|
|
40
47
|
ban_media: nil,
|
|
@@ -47,7 +47,11 @@ module WhopSDK
|
|
|
47
47
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
48
48
|
).returns(WhopSDK::CheckoutConfiguration)
|
|
49
49
|
end
|
|
50
|
-
def retrieve(
|
|
50
|
+
def retrieve(
|
|
51
|
+
# The ID of the checkout configuration
|
|
52
|
+
id,
|
|
53
|
+
request_options: {}
|
|
54
|
+
)
|
|
51
55
|
end
|
|
52
56
|
|
|
53
57
|
# Lists checkout configurations
|
|
@@ -42,7 +42,11 @@ module WhopSDK
|
|
|
42
42
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
43
43
|
).returns(WhopSDK::Company)
|
|
44
44
|
end
|
|
45
|
-
def retrieve(
|
|
45
|
+
def retrieve(
|
|
46
|
+
# The ID or route of the company
|
|
47
|
+
id,
|
|
48
|
+
request_options: {}
|
|
49
|
+
)
|
|
46
50
|
end
|
|
47
51
|
|
|
48
52
|
# Lists companies the current user has access to
|
|
@@ -35,7 +35,11 @@ module WhopSDK
|
|
|
35
35
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
36
36
|
).returns(WhopSDK::CourseChapter)
|
|
37
37
|
end
|
|
38
|
-
def retrieve(
|
|
38
|
+
def retrieve(
|
|
39
|
+
# The ID of the chapter
|
|
40
|
+
id,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
39
43
|
end
|
|
40
44
|
|
|
41
45
|
# Updates a course chapter
|
|
@@ -51,6 +55,7 @@ module WhopSDK
|
|
|
51
55
|
).returns(WhopSDK::CourseChapter)
|
|
52
56
|
end
|
|
53
57
|
def update(
|
|
58
|
+
# The ID of the chapter to update
|
|
54
59
|
id,
|
|
55
60
|
# The title of the chapter
|
|
56
61
|
title:,
|
|
@@ -103,7 +108,11 @@ module WhopSDK
|
|
|
103
108
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
104
109
|
).returns(T::Boolean)
|
|
105
110
|
end
|
|
106
|
-
def delete(
|
|
111
|
+
def delete(
|
|
112
|
+
# The ID of the chapter to delete
|
|
113
|
+
id,
|
|
114
|
+
request_options: {}
|
|
115
|
+
)
|
|
107
116
|
end
|
|
108
117
|
|
|
109
118
|
# @api private
|
|
@@ -15,7 +15,11 @@ module WhopSDK
|
|
|
15
15
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
16
16
|
).returns(WhopSDK::CourseLessonInteraction)
|
|
17
17
|
end
|
|
18
|
-
def retrieve(
|
|
18
|
+
def retrieve(
|
|
19
|
+
# The ID of the course lesson interaction
|
|
20
|
+
id,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
19
23
|
end
|
|
20
24
|
|
|
21
25
|
# Lists course lesson interactions
|
|
@@ -14,6 +14,15 @@ module WhopSDK
|
|
|
14
14
|
lesson_type: WhopSDK::LessonTypes::OrSymbol,
|
|
15
15
|
content: T.nilable(String),
|
|
16
16
|
days_from_course_start_until_unlock: T.nilable(Integer),
|
|
17
|
+
embed_id: T.nilable(String),
|
|
18
|
+
embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
|
|
19
|
+
thumbnail:
|
|
20
|
+
T.nilable(
|
|
21
|
+
T.any(
|
|
22
|
+
WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
|
|
23
|
+
WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID::OrHash
|
|
24
|
+
)
|
|
25
|
+
),
|
|
17
26
|
title: T.nilable(String),
|
|
18
27
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
19
28
|
).returns(WhopSDK::Lesson)
|
|
@@ -27,6 +36,12 @@ module WhopSDK
|
|
|
27
36
|
content: nil,
|
|
28
37
|
# Days from course start until unlock
|
|
29
38
|
days_from_course_start_until_unlock: nil,
|
|
39
|
+
# ID for the embed (YouTube video ID or Loom share ID)
|
|
40
|
+
embed_id: nil,
|
|
41
|
+
# The type of embed for a lesson
|
|
42
|
+
embed_type: nil,
|
|
43
|
+
# The thumbnail for the lesson in png, jpeg, or gif format
|
|
44
|
+
thumbnail: nil,
|
|
30
45
|
# The title of the lesson
|
|
31
46
|
title: nil,
|
|
32
47
|
request_options: {}
|
|
@@ -44,7 +59,11 @@ module WhopSDK
|
|
|
44
59
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
45
60
|
).returns(WhopSDK::Lesson)
|
|
46
61
|
end
|
|
47
|
-
def retrieve(
|
|
62
|
+
def retrieve(
|
|
63
|
+
# The ID of the lesson
|
|
64
|
+
id,
|
|
65
|
+
request_options: {}
|
|
66
|
+
)
|
|
48
67
|
end
|
|
49
68
|
|
|
50
69
|
# Updates a course lesson
|
|
@@ -76,6 +95,8 @@ module WhopSDK
|
|
|
76
95
|
),
|
|
77
96
|
content: T.nilable(String),
|
|
78
97
|
days_from_course_start_until_unlock: T.nilable(Integer),
|
|
98
|
+
embed_id: T.nilable(String),
|
|
99
|
+
embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
|
|
79
100
|
lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol),
|
|
80
101
|
main_pdf:
|
|
81
102
|
T.nilable(
|
|
@@ -86,12 +107,20 @@ module WhopSDK
|
|
|
86
107
|
),
|
|
87
108
|
max_attempts: T.nilable(Integer),
|
|
88
109
|
mux_asset_id: T.nilable(String),
|
|
110
|
+
thumbnail:
|
|
111
|
+
T.nilable(
|
|
112
|
+
T.any(
|
|
113
|
+
WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
|
|
114
|
+
WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID::OrHash
|
|
115
|
+
)
|
|
116
|
+
),
|
|
89
117
|
title: T.nilable(String),
|
|
90
118
|
visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol),
|
|
91
119
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
92
120
|
).returns(WhopSDK::Lesson)
|
|
93
121
|
end
|
|
94
122
|
def update(
|
|
123
|
+
# The ID of the lesson to update
|
|
95
124
|
id,
|
|
96
125
|
# Completion requirements for quiz/knowledge check lessons
|
|
97
126
|
assessment_completion_requirement: nil,
|
|
@@ -105,6 +134,10 @@ module WhopSDK
|
|
|
105
134
|
content: nil,
|
|
106
135
|
# Days from course start until unlock
|
|
107
136
|
days_from_course_start_until_unlock: nil,
|
|
137
|
+
# ID for the embed (YouTube video ID or Loom share ID)
|
|
138
|
+
embed_id: nil,
|
|
139
|
+
# The type of embed for a lesson
|
|
140
|
+
embed_type: nil,
|
|
108
141
|
# The available types for a lesson
|
|
109
142
|
lesson_type: nil,
|
|
110
143
|
# The main PDF file for this lesson
|
|
@@ -113,6 +146,8 @@ module WhopSDK
|
|
|
113
146
|
max_attempts: nil,
|
|
114
147
|
# The ID of the Mux asset to attach to this lesson for video lessons
|
|
115
148
|
mux_asset_id: nil,
|
|
149
|
+
# The thumbnail for the lesson in png, jpeg, or gif format
|
|
150
|
+
thumbnail: nil,
|
|
116
151
|
# The title of the lesson
|
|
117
152
|
title: nil,
|
|
118
153
|
# The available visibilities for a lesson. Determines how / whether a lesson is
|
|
@@ -170,7 +205,11 @@ module WhopSDK
|
|
|
170
205
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
171
206
|
).returns(T::Boolean)
|
|
172
207
|
end
|
|
173
|
-
def delete(
|
|
208
|
+
def delete(
|
|
209
|
+
# The ID of the lesson to delete
|
|
210
|
+
id,
|
|
211
|
+
request_options: {}
|
|
212
|
+
)
|
|
174
213
|
end
|
|
175
214
|
|
|
176
215
|
# @api private
|
|
@@ -15,7 +15,11 @@ module WhopSDK
|
|
|
15
15
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
16
16
|
).returns(WhopSDK::Models::CourseStudentRetrieveResponse)
|
|
17
17
|
end
|
|
18
|
-
def retrieve(
|
|
18
|
+
def retrieve(
|
|
19
|
+
# The ID of the course student interaction
|
|
20
|
+
id,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
19
23
|
end
|
|
20
24
|
|
|
21
25
|
# Lists students for a course
|