whop_sdk 0.0.2 → 0.0.3
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 +29 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +20 -0
- data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +30 -24
- data/lib/whop_sdk/models/assessment_question_types.rb +18 -0
- data/lib/whop_sdk/models/billing_reasons.rb +20 -0
- data/lib/whop_sdk/models/card_brands.rb +30 -0
- data/lib/whop_sdk/models/checkout_configuration.rb +10 -7
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +140 -3
- data/lib/whop_sdk/models/checkout_configuration_list_response.rb +10 -7
- data/lib/whop_sdk/models/course.rb +230 -0
- data/lib/whop_sdk/models/course_chapter.rb +72 -0
- data/lib/whop_sdk/models/course_chapter_create_params.rb +30 -0
- data/lib/whop_sdk/models/course_chapter_delete_params.rb +14 -0
- data/lib/whop_sdk/models/course_chapter_delete_response.rb +8 -0
- data/lib/whop_sdk/models/course_chapter_list_params.rb +54 -0
- data/lib/whop_sdk/models/course_chapter_list_response.rb +35 -0
- data/lib/whop_sdk/models/course_chapter_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_chapter_update_params.rb +22 -0
- data/lib/whop_sdk/models/course_create_params.rb +82 -0
- data/lib/whop_sdk/models/course_delete_params.rb +14 -0
- data/lib/whop_sdk/models/course_delete_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_create_params.rb +54 -0
- data/lib/whop_sdk/models/course_lesson_delete_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_delete_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_list_params.rb +62 -0
- data/lib/whop_sdk/models/course_lesson_list_response.rb +71 -0
- data/lib/whop_sdk/models/course_lesson_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_update_params.rb +278 -0
- data/lib/whop_sdk/models/course_list_params.rb +62 -0
- data/lib/whop_sdk/models/course_list_response.rb +148 -0
- data/lib/whop_sdk/models/course_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_update_params.rb +197 -0
- data/lib/whop_sdk/models/experience_duplicate_params.rb +22 -0
- data/lib/whop_sdk/models/forum_post.rb +17 -1
- data/lib/whop_sdk/models/forum_post_list_response.rb +17 -1
- data/lib/whop_sdk/models/forum_post_update_params.rb +80 -0
- data/lib/whop_sdk/models/invoice.rb +6 -2
- data/lib/whop_sdk/models/invoice_list_item.rb +6 -2
- data/lib/whop_sdk/models/languages.rb +36 -0
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +9 -0
- data/lib/whop_sdk/models/lesson.rb +365 -0
- data/lib/whop_sdk/models/lesson_types.rb +20 -0
- data/lib/whop_sdk/models/lesson_visibilities.rb +17 -0
- data/lib/whop_sdk/models/member_list_params.rb +9 -1
- data/lib/whop_sdk/models/membership.rb +31 -1
- data/lib/whop_sdk/models/membership_list_params.rb +16 -8
- data/lib/whop_sdk/models/membership_list_response.rb +31 -1
- data/lib/whop_sdk/models/message_update_params.rb +68 -0
- data/lib/whop_sdk/models/payment.rb +24 -21
- data/lib/whop_sdk/models/payment_list_params.rb +3 -18
- data/lib/whop_sdk/models/payment_list_response.rb +24 -21
- data/lib/whop_sdk/models/payment_method_types.rb +98 -0
- data/lib/whop_sdk/models/plan.rb +25 -1
- data/lib/whop_sdk/models/plan_create_params.rb +37 -3
- data/lib/whop_sdk/models/plan_list_response.rb +25 -1
- data/lib/whop_sdk/models/plan_update_params.rb +35 -1
- data/lib/whop_sdk/models/product.rb +11 -1
- data/lib/whop_sdk/models/product_create_params.rb +1 -45
- data/lib/whop_sdk/models/product_list_item.rb +14 -1
- data/lib/whop_sdk/models/product_update_params.rb +30 -1
- data/lib/whop_sdk/models/promo_code.rb +211 -0
- data/lib/whop_sdk/models/promo_code_create_params.rb +140 -0
- data/lib/whop_sdk/models/promo_code_delete_params.rb +14 -0
- data/lib/whop_sdk/models/promo_code_delete_response.rb +8 -0
- data/lib/whop_sdk/models/promo_code_list_params.rb +78 -0
- data/lib/whop_sdk/models/promo_code_list_response.rb +181 -0
- data/lib/whop_sdk/models/promo_code_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/promo_code_status.rb +17 -0
- data/lib/whop_sdk/models/promo_duration.rb +17 -0
- data/lib/whop_sdk/models/review_list_params.rb +70 -0
- data/lib/whop_sdk/models/review_list_response.rb +183 -0
- data/lib/whop_sdk/models/review_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/review_retrieve_response.rb +251 -0
- data/lib/whop_sdk/models/review_status.rb +17 -0
- data/lib/whop_sdk/models.rb +76 -0
- data/lib/whop_sdk/resources/checkout_configurations.rb +2 -0
- data/lib/whop_sdk/resources/course_chapters.rb +151 -0
- data/lib/whop_sdk/resources/course_lessons.rb +178 -0
- data/lib/whop_sdk/resources/courses.rb +178 -0
- data/lib/whop_sdk/resources/experiences.rb +33 -0
- data/lib/whop_sdk/resources/forum_posts.rb +33 -0
- data/lib/whop_sdk/resources/members.rb +3 -1
- data/lib/whop_sdk/resources/memberships.rb +6 -4
- data/lib/whop_sdk/resources/messages.rb +28 -0
- data/lib/whop_sdk/resources/payments.rb +1 -1
- data/lib/whop_sdk/resources/plans.rb +19 -3
- data/lib/whop_sdk/resources/products.rb +4 -6
- data/lib/whop_sdk/resources/promo_codes.rb +161 -0
- data/lib/whop_sdk/resources/reviews.rb +68 -0
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +53 -0
- data/rbi/whop_sdk/client.rbi +15 -0
- data/rbi/whop_sdk/models/assessment_question_types.rbi +31 -0
- data/rbi/whop_sdk/models/billing_reasons.rbi +27 -0
- data/rbi/whop_sdk/models/card_brands.rbi +35 -0
- data/rbi/whop_sdk/models/checkout_configuration.rbi +4 -2
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +183 -2
- data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +4 -2
- data/rbi/whop_sdk/models/course.rbi +313 -0
- data/rbi/whop_sdk/models/course_chapter.rbi +101 -0
- data/rbi/whop_sdk/models/course_chapter_create_params.rbi +51 -0
- data/rbi/whop_sdk/models/course_chapter_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_chapter_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_chapter_list_params.rbi +75 -0
- data/rbi/whop_sdk/models/course_chapter_list_response.rbi +47 -0
- data/rbi/whop_sdk/models/course_chapter_retrieve_params.rbi +30 -0
- data/rbi/whop_sdk/models/course_chapter_update_params.rbi +40 -0
- data/rbi/whop_sdk/models/course_create_params.rbi +131 -0
- data/rbi/whop_sdk/models/course_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_delete_response.rbi +7 -0
- data/rbi/whop_sdk/models/course_lesson_create_params.rbi +75 -0
- data/rbi/whop_sdk/models/course_lesson_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_lesson_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/course_lesson_list_response.rbi +91 -0
- data/rbi/whop_sdk/models/course_lesson_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_lesson_update_params.rbi +465 -0
- data/rbi/whop_sdk/models/course_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/course_list_response.rbi +198 -0
- data/rbi/whop_sdk/models/course_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_update_params.rbi +293 -0
- data/rbi/whop_sdk/models/experience_duplicate_params.rbi +40 -0
- data/rbi/whop_sdk/models/forum_post.rbi +16 -0
- data/rbi/whop_sdk/models/forum_post_list_response.rbi +16 -0
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +124 -0
- data/rbi/whop_sdk/models/invoice.rbi +4 -2
- data/rbi/whop_sdk/models/invoice_list_item.rbi +4 -2
- data/rbi/whop_sdk/models/languages.rbi +40 -0
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +45 -0
- data/rbi/whop_sdk/models/lesson.rbi +517 -0
- data/rbi/whop_sdk/models/lesson_types.rbi +25 -0
- data/rbi/whop_sdk/models/lesson_visibilities.rbi +23 -0
- data/rbi/whop_sdk/models/member_list_params.rbi +8 -0
- data/rbi/whop_sdk/models/membership.rbi +40 -0
- data/rbi/whop_sdk/models/membership_list_params.rbi +16 -8
- data/rbi/whop_sdk/models/membership_list_response.rbi +47 -0
- data/rbi/whop_sdk/models/message_update_params.rbi +114 -0
- data/rbi/whop_sdk/models/payment.rbi +32 -25
- data/rbi/whop_sdk/models/payment_list_params.rbi +3 -63
- data/rbi/whop_sdk/models/payment_list_response.rbi +32 -25
- data/rbi/whop_sdk/models/payment_method_types.rbi +116 -0
- data/rbi/whop_sdk/models/plan.rbi +24 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +38 -2
- data/rbi/whop_sdk/models/plan_list_response.rbi +24 -0
- data/rbi/whop_sdk/models/plan_update_params.rbi +36 -0
- data/rbi/whop_sdk/models/product.rbi +12 -0
- data/rbi/whop_sdk/models/product_create_params.rbi +0 -74
- data/rbi/whop_sdk/models/product_list_item.rbi +12 -0
- data/rbi/whop_sdk/models/product_update_params.rbi +59 -0
- data/rbi/whop_sdk/models/promo_code.rbi +248 -0
- data/rbi/whop_sdk/models/promo_code_create_params.rbi +161 -0
- data/rbi/whop_sdk/models/promo_code_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/promo_code_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/promo_code_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/promo_code_list_response.rbi +222 -0
- data/rbi/whop_sdk/models/promo_code_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/promo_code_status.rbi +21 -0
- data/rbi/whop_sdk/models/promo_duration.rbi +21 -0
- data/rbi/whop_sdk/models/review_list_params.rbi +91 -0
- data/rbi/whop_sdk/models/review_list_response.rbi +243 -0
- data/rbi/whop_sdk/models/review_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/review_retrieve_response.rbi +354 -0
- data/rbi/whop_sdk/models/review_status.rbi +21 -0
- data/rbi/whop_sdk/models.rbi +76 -0
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +2 -0
- data/rbi/whop_sdk/resources/course_chapters.rbi +115 -0
- data/rbi/whop_sdk/resources/course_lessons.rbi +163 -0
- data/rbi/whop_sdk/resources/courses.rbi +152 -0
- data/rbi/whop_sdk/resources/experiences.rbi +25 -0
- data/rbi/whop_sdk/resources/forum_posts.rbi +29 -0
- data/rbi/whop_sdk/resources/members.rbi +3 -0
- data/rbi/whop_sdk/resources/memberships.rbi +6 -3
- data/rbi/whop_sdk/resources/messages.rbi +25 -0
- data/rbi/whop_sdk/resources/payments.rbi +1 -3
- data/rbi/whop_sdk/resources/plans.rbi +29 -1
- data/rbi/whop_sdk/resources/products.rbi +4 -7
- data/rbi/whop_sdk/resources/promo_codes.rbi +147 -0
- data/rbi/whop_sdk/resources/reviews.rbi +56 -0
- data/sig/whop_sdk/client.rbs +10 -0
- data/sig/whop_sdk/models/assessment_question_types.rbs +17 -0
- data/sig/whop_sdk/models/billing_reasons.rbs +24 -0
- data/sig/whop_sdk/models/card_brands.rbs +44 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +87 -0
- data/sig/whop_sdk/models/course.rbs +171 -0
- data/sig/whop_sdk/models/course_chapter.rbs +49 -0
- data/sig/whop_sdk/models/course_chapter_create_params.rbs +28 -0
- data/sig/whop_sdk/models/course_chapter_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/course_chapter_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/course_chapter_list_params.rbs +46 -0
- data/sig/whop_sdk/models/course_chapter_list_response.rbs +18 -0
- data/sig/whop_sdk/models/course_chapter_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_chapter_update_params.rbs +23 -0
- data/sig/whop_sdk/models/course_create_params.rbs +58 -0
- data/sig/whop_sdk/models/course_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/course_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
- data/sig/whop_sdk/models/course_lesson_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_list_params.rbs +51 -0
- data/sig/whop_sdk/models/course_lesson_list_response.rbs +50 -0
- data/sig/whop_sdk/models/course_lesson_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_update_params.rbs +162 -0
- data/sig/whop_sdk/models/course_list_params.rbs +51 -0
- data/sig/whop_sdk/models/course_list_response.rbs +102 -0
- data/sig/whop_sdk/models/course_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_update_params.rbs +137 -0
- data/sig/whop_sdk/models/experience_duplicate_params.rbs +23 -0
- data/sig/whop_sdk/models/forum_post.rbs +10 -0
- data/sig/whop_sdk/models/forum_post_list_response.rbs +10 -0
- data/sig/whop_sdk/models/forum_post_update_params.rbs +53 -0
- data/sig/whop_sdk/models/languages.rbs +56 -0
- data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +20 -1
- data/sig/whop_sdk/models/lesson.rbs +248 -0
- data/sig/whop_sdk/models/lesson_types.rbs +19 -0
- data/sig/whop_sdk/models/lesson_visibilities.rbs +14 -0
- data/sig/whop_sdk/models/member_list_params.rbs +6 -1
- data/sig/whop_sdk/models/membership.rbs +17 -0
- data/sig/whop_sdk/models/membership_list_params.rbs +11 -6
- data/sig/whop_sdk/models/membership_list_response.rbs +17 -0
- data/sig/whop_sdk/models/message_update_params.rbs +48 -0
- data/sig/whop_sdk/models/payment.rbs +12 -12
- data/sig/whop_sdk/models/payment_list_params.rbs +4 -25
- data/sig/whop_sdk/models/payment_list_response.rbs +12 -12
- data/sig/whop_sdk/models/payment_method_types.rbs +180 -0
- data/sig/whop_sdk/models/plan.rbs +15 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +20 -0
- data/sig/whop_sdk/models/plan_list_response.rbs +15 -0
- data/sig/whop_sdk/models/plan_update_params.rbs +20 -0
- data/sig/whop_sdk/models/product.rbs +5 -0
- data/sig/whop_sdk/models/product_create_params.rbs +0 -22
- data/sig/whop_sdk/models/product_list_item.rbs +5 -0
- data/sig/whop_sdk/models/product_update_params.rbs +17 -0
- data/sig/whop_sdk/models/promo_code.rbs +134 -0
- data/sig/whop_sdk/models/promo_code_create_params.rbs +96 -0
- data/sig/whop_sdk/models/promo_code_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/promo_code_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/promo_code_list_params.rbs +61 -0
- data/sig/whop_sdk/models/promo_code_list_response.rbs +117 -0
- data/sig/whop_sdk/models/promo_code_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/promo_code_status.rbs +15 -0
- data/sig/whop_sdk/models/promo_duration.rbs +15 -0
- data/sig/whop_sdk/models/review_list_params.rbs +56 -0
- data/sig/whop_sdk/models/review_list_response.rbs +116 -0
- data/sig/whop_sdk/models/review_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/review_retrieve_response.rbs +152 -0
- data/sig/whop_sdk/models/review_status.rbs +15 -0
- data/sig/whop_sdk/models.rbs +76 -0
- data/sig/whop_sdk/resources/course_chapters.rbs +35 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +47 -0
- data/sig/whop_sdk/resources/courses.rbs +47 -0
- data/sig/whop_sdk/resources/experiences.rbs +6 -0
- data/sig/whop_sdk/resources/forum_posts.rbs +9 -0
- data/sig/whop_sdk/resources/members.rbs +1 -0
- data/sig/whop_sdk/resources/memberships.rbs +2 -1
- data/sig/whop_sdk/resources/messages.rbs +8 -0
- data/sig/whop_sdk/resources/payments.rbs +1 -1
- data/sig/whop_sdk/resources/plans.rbs +8 -0
- data/sig/whop_sdk/resources/products.rbs +1 -2
- data/sig/whop_sdk/resources/promo_codes.rbs +45 -0
- data/sig/whop_sdk/resources/reviews.rbs +23 -0
- metadata +189 -2
|
@@ -39,12 +39,12 @@ module WhopSDK
|
|
|
39
39
|
end
|
|
40
40
|
attr_writer :billing_address
|
|
41
41
|
|
|
42
|
-
# The
|
|
43
|
-
sig { returns(T.nilable(
|
|
42
|
+
# The reason why a specific payment was billed
|
|
43
|
+
sig { returns(T.nilable(WhopSDK::BillingReasons::TaggedSymbol)) }
|
|
44
44
|
attr_accessor :billing_reason
|
|
45
45
|
|
|
46
|
-
#
|
|
47
|
-
sig { returns(T.nilable(
|
|
46
|
+
# Possible card brands that a payment token can have
|
|
47
|
+
sig { returns(T.nilable(WhopSDK::CardBrands::TaggedSymbol)) }
|
|
48
48
|
attr_accessor :card_brand
|
|
49
49
|
|
|
50
50
|
# The last 4 digits of the card used to make the payment.
|
|
@@ -113,9 +113,8 @@ module WhopSDK
|
|
|
113
113
|
sig { returns(T.nilable(Time)) }
|
|
114
114
|
attr_accessor :paid_at
|
|
115
115
|
|
|
116
|
-
#
|
|
117
|
-
|
|
118
|
-
sig { returns(T.nilable(String)) }
|
|
116
|
+
# The different types of payment methods that can be used.
|
|
117
|
+
sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) }
|
|
119
118
|
attr_accessor :payment_method_type
|
|
120
119
|
|
|
121
120
|
# The plan attached to this payment.
|
|
@@ -155,7 +154,8 @@ module WhopSDK
|
|
|
155
154
|
end
|
|
156
155
|
attr_writer :promo_code
|
|
157
156
|
|
|
158
|
-
#
|
|
157
|
+
# True only for payments that are `paid`, have not been fully refunded, and were
|
|
158
|
+
# processed by a payment processor that allows refunds.
|
|
159
159
|
sig { returns(T::Boolean) }
|
|
160
160
|
attr_accessor :refundable
|
|
161
161
|
|
|
@@ -167,7 +167,9 @@ module WhopSDK
|
|
|
167
167
|
sig { returns(T.nilable(Time)) }
|
|
168
168
|
attr_accessor :refunded_at
|
|
169
169
|
|
|
170
|
-
#
|
|
170
|
+
# True when the payment status is `open` and its membership is in one of the
|
|
171
|
+
# retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
|
|
172
|
+
# otherwise false. Used to decide if Whop can attempt the charge again.
|
|
171
173
|
sig { returns(T::Boolean) }
|
|
172
174
|
attr_accessor :retryable
|
|
173
175
|
|
|
@@ -202,7 +204,8 @@ module WhopSDK
|
|
|
202
204
|
end
|
|
203
205
|
attr_writer :user
|
|
204
206
|
|
|
205
|
-
#
|
|
207
|
+
# True when the payment is tied to a membership in `past_due`, the payment status
|
|
208
|
+
# is `open`, and the processor allows voiding payments; otherwise false.
|
|
206
209
|
sig { returns(T::Boolean) }
|
|
207
210
|
attr_accessor :voidable
|
|
208
211
|
|
|
@@ -216,8 +219,8 @@ module WhopSDK
|
|
|
216
219
|
T.nilable(
|
|
217
220
|
WhopSDK::Models::PaymentListResponse::BillingAddress::OrHash
|
|
218
221
|
),
|
|
219
|
-
billing_reason: T.nilable(
|
|
220
|
-
card_brand: T.nilable(
|
|
222
|
+
billing_reason: T.nilable(WhopSDK::BillingReasons::OrSymbol),
|
|
223
|
+
card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
|
|
221
224
|
card_last4: T.nilable(String),
|
|
222
225
|
company:
|
|
223
226
|
T.nilable(WhopSDK::Models::PaymentListResponse::Company::OrHash),
|
|
@@ -231,7 +234,7 @@ module WhopSDK
|
|
|
231
234
|
membership:
|
|
232
235
|
T.nilable(WhopSDK::Models::PaymentListResponse::Membership::OrHash),
|
|
233
236
|
paid_at: T.nilable(Time),
|
|
234
|
-
payment_method_type: T.nilable(
|
|
237
|
+
payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
|
|
235
238
|
plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan::OrHash),
|
|
236
239
|
product:
|
|
237
240
|
T.nilable(WhopSDK::Models::PaymentListResponse::Product::OrHash),
|
|
@@ -259,9 +262,9 @@ module WhopSDK
|
|
|
259
262
|
auto_refunded:,
|
|
260
263
|
# The address of the user who made the payment.
|
|
261
264
|
billing_address:,
|
|
262
|
-
# The
|
|
265
|
+
# The reason why a specific payment was billed
|
|
263
266
|
billing_reason:,
|
|
264
|
-
#
|
|
267
|
+
# Possible card brands that a payment token can have
|
|
265
268
|
card_brand:,
|
|
266
269
|
# The last 4 digits of the card used to make the payment.
|
|
267
270
|
card_last4:,
|
|
@@ -283,8 +286,7 @@ module WhopSDK
|
|
|
283
286
|
membership:,
|
|
284
287
|
# The datetime the payment was paid
|
|
285
288
|
paid_at:,
|
|
286
|
-
#
|
|
287
|
-
# klarna, affirm, card, cashapp
|
|
289
|
+
# The different types of payment methods that can be used.
|
|
288
290
|
payment_method_type:,
|
|
289
291
|
# The plan attached to this payment.
|
|
290
292
|
plan:,
|
|
@@ -292,13 +294,16 @@ module WhopSDK
|
|
|
292
294
|
product:,
|
|
293
295
|
# The promo code used for this payment.
|
|
294
296
|
promo_code:,
|
|
295
|
-
#
|
|
297
|
+
# True only for payments that are `paid`, have not been fully refunded, and were
|
|
298
|
+
# processed by a payment processor that allows refunds.
|
|
296
299
|
refundable:,
|
|
297
300
|
# The payment refund amount(if applicable).
|
|
298
301
|
refunded_amount:,
|
|
299
302
|
# When the payment was refunded (if applicable).
|
|
300
303
|
refunded_at:,
|
|
301
|
-
#
|
|
304
|
+
# True when the payment status is `open` and its membership is in one of the
|
|
305
|
+
# retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
|
|
306
|
+
# otherwise false. Used to decide if Whop can attempt the charge again.
|
|
302
307
|
retryable:,
|
|
303
308
|
# The status of a receipt
|
|
304
309
|
status:,
|
|
@@ -312,7 +317,8 @@ module WhopSDK
|
|
|
312
317
|
usd_total:,
|
|
313
318
|
# The user that made this payment.
|
|
314
319
|
user:,
|
|
315
|
-
#
|
|
320
|
+
# True when the payment is tied to a membership in `past_due`, the payment status
|
|
321
|
+
# is `open`, and the processor allows voiding payments; otherwise false.
|
|
316
322
|
voidable:
|
|
317
323
|
)
|
|
318
324
|
end
|
|
@@ -325,8 +331,8 @@ module WhopSDK
|
|
|
325
331
|
auto_refunded: T::Boolean,
|
|
326
332
|
billing_address:
|
|
327
333
|
T.nilable(WhopSDK::Models::PaymentListResponse::BillingAddress),
|
|
328
|
-
billing_reason: T.nilable(
|
|
329
|
-
card_brand: T.nilable(
|
|
334
|
+
billing_reason: T.nilable(WhopSDK::BillingReasons::TaggedSymbol),
|
|
335
|
+
card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol),
|
|
330
336
|
card_last4: T.nilable(String),
|
|
331
337
|
company: T.nilable(WhopSDK::Models::PaymentListResponse::Company),
|
|
332
338
|
created_at: Time,
|
|
@@ -338,7 +344,8 @@ module WhopSDK
|
|
|
338
344
|
membership:
|
|
339
345
|
T.nilable(WhopSDK::Models::PaymentListResponse::Membership),
|
|
340
346
|
paid_at: T.nilable(Time),
|
|
341
|
-
payment_method_type:
|
|
347
|
+
payment_method_type:
|
|
348
|
+
T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
|
|
342
349
|
plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan),
|
|
343
350
|
product: T.nilable(WhopSDK::Models::PaymentListResponse::Product),
|
|
344
351
|
promo_code:
|
|
@@ -654,7 +661,7 @@ module WhopSDK
|
|
|
654
661
|
sig { returns(T.nilable(String)) }
|
|
655
662
|
attr_accessor :code
|
|
656
663
|
|
|
657
|
-
# The number of
|
|
664
|
+
# The number of months the promo is applied for.
|
|
658
665
|
sig { returns(T.nilable(Integer)) }
|
|
659
666
|
attr_accessor :number_of_intervals
|
|
660
667
|
|
|
@@ -682,7 +689,7 @@ module WhopSDK
|
|
|
682
689
|
base_currency:,
|
|
683
690
|
# The specific code used to apply the promo at checkout.
|
|
684
691
|
code:,
|
|
685
|
-
# The number of
|
|
692
|
+
# The number of months the promo is applied for.
|
|
686
693
|
number_of_intervals:,
|
|
687
694
|
# The type (% or flat amount) of the promo.
|
|
688
695
|
promo_type:
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# The different types of payment methods that can be used.
|
|
6
|
+
module PaymentMethodTypes
|
|
7
|
+
extend WhopSDK::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::PaymentMethodTypes) }
|
|
10
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
11
|
+
|
|
12
|
+
ACSS_DEBIT = T.let(:acss_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
13
|
+
AFFIRM = T.let(:affirm, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
14
|
+
AFTERPAY_CLEARPAY =
|
|
15
|
+
T.let(:afterpay_clearpay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
16
|
+
ALIPAY = T.let(:alipay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
17
|
+
ALMA = T.let(:alma, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
18
|
+
AMAZON_PAY = T.let(:amazon_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
19
|
+
APPLE_PAY = T.let(:apple_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
20
|
+
AU_BECS_DEBIT =
|
|
21
|
+
T.let(:au_becs_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
22
|
+
BACS_DEBIT = T.let(:bacs_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
23
|
+
BANCONTACT = T.let(:bancontact, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
24
|
+
BILLIE = T.let(:billie, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
25
|
+
BLIK = T.let(:blik, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
26
|
+
BOLETO = T.let(:boleto, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
27
|
+
CARD = T.let(:card, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
28
|
+
CASHAPP = T.let(:cashapp, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
29
|
+
CRYPTO = T.let(:crypto, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
30
|
+
EPS = T.let(:eps, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
31
|
+
FPX = T.let(:fpx, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
32
|
+
GIROPAY = T.let(:giropay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
33
|
+
GOOGLE_PAY = T.let(:google_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
34
|
+
GRABPAY = T.let(:grabpay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
35
|
+
IDEAL = T.let(:ideal, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
36
|
+
KAKAO_PAY = T.let(:kakao_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
37
|
+
KLARNA = T.let(:klarna, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
38
|
+
KONBINI = T.let(:konbini, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
39
|
+
KR_CARD = T.let(:kr_card, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
40
|
+
LINK = T.let(:link, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
41
|
+
MOBILEPAY = T.let(:mobilepay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
42
|
+
MULTIBANCO = T.let(:multibanco, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
43
|
+
NAVER_PAY = T.let(:naver_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
44
|
+
NZ_BANK_ACCOUNT =
|
|
45
|
+
T.let(:nz_bank_account, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
46
|
+
OXXO = T.let(:oxxo, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
47
|
+
P24 = T.let(:p24, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
48
|
+
PAY_BY_BANK =
|
|
49
|
+
T.let(:pay_by_bank, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
50
|
+
PAYCO = T.let(:payco, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
51
|
+
PAYNOW = T.let(:paynow, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
52
|
+
PIX = T.let(:pix, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
53
|
+
PROMPTPAY = T.let(:promptpay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
54
|
+
REVOLUT_PAY =
|
|
55
|
+
T.let(:revolut_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
56
|
+
SAMSUNG_PAY =
|
|
57
|
+
T.let(:samsung_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
58
|
+
SATISPAY = T.let(:satispay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
59
|
+
SEPA_DEBIT = T.let(:sepa_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
60
|
+
SOFORT = T.let(:sofort, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
61
|
+
SWISH = T.let(:swish, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
62
|
+
TWINT = T.let(:twint, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
63
|
+
US_BANK_ACCOUNT =
|
|
64
|
+
T.let(:us_bank_account, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
65
|
+
WECHAT_PAY = T.let(:wechat_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
66
|
+
ZIP = T.let(:zip, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
67
|
+
BIZUM = T.let(:bizum, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
68
|
+
CAPCHASE_PAY =
|
|
69
|
+
T.let(:capchase_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
70
|
+
KRIYA = T.let(:kriya, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
71
|
+
MONDU = T.let(:mondu, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
72
|
+
NG_WALLET = T.let(:ng_wallet, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
73
|
+
PAYPAY = T.let(:paypay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
74
|
+
SEQURA = T.let(:sequra, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
75
|
+
SCALAPAY = T.let(:scalapay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
76
|
+
VIPPS = T.let(:vipps, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
77
|
+
CUSTOM = T.let(:custom, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
78
|
+
CUSTOMER_BALANCE =
|
|
79
|
+
T.let(:customer_balance, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
80
|
+
GOPAY = T.let(:gopay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
81
|
+
MB_WAY = T.let(:mb_way, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
82
|
+
NG_BANK = T.let(:ng_bank, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
83
|
+
NG_BANK_TRANSFER =
|
|
84
|
+
T.let(:ng_bank_transfer, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
85
|
+
NG_CARD = T.let(:ng_card, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
86
|
+
NG_MARKET = T.let(:ng_market, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
87
|
+
NG_USSD = T.let(:ng_ussd, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
88
|
+
PAYPAL = T.let(:paypal, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
89
|
+
PAYTO = T.let(:payto, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
90
|
+
QRIS = T.let(:qris, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
91
|
+
RECHNUNG = T.let(:rechnung, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
92
|
+
SOUTH_KOREA_MARKET =
|
|
93
|
+
T.let(:south_korea_market, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
94
|
+
KR_MARKET = T.let(:kr_market, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
95
|
+
SHOPEEPAY = T.let(:shopeepay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
96
|
+
UPI = T.let(:upi, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
97
|
+
SUNBIT = T.let(:sunbit, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
98
|
+
NETBANKING = T.let(:netbanking, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
99
|
+
ID_BANK_TRANSFER =
|
|
100
|
+
T.let(:id_bank_transfer, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
101
|
+
DEMO_PAY = T.let(:demo_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
102
|
+
SHOP_PAY = T.let(:shop_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
103
|
+
APPLE = T.let(:apple, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
104
|
+
SEZZLE = T.let(:sezzle, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
105
|
+
COINBASE = T.let(:coinbase, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
106
|
+
SPLITIT = T.let(:splitit, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
107
|
+
UNKNOWN = T.let(:unknown, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
108
|
+
|
|
109
|
+
sig do
|
|
110
|
+
override.returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol])
|
|
111
|
+
end
|
|
112
|
+
def self.values
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -86,14 +86,26 @@ module WhopSDK
|
|
|
86
86
|
sig { returns(Float) }
|
|
87
87
|
attr_accessor :renewal_price
|
|
88
88
|
|
|
89
|
+
# The number of units available for purchase. Only displayed to authorized actors
|
|
90
|
+
sig { returns(T.nilable(Integer)) }
|
|
91
|
+
attr_accessor :stock
|
|
92
|
+
|
|
89
93
|
# The tax type for the plan.
|
|
90
94
|
sig { returns(WhopSDK::TaxType::TaggedSymbol) }
|
|
91
95
|
attr_accessor :tax_type
|
|
92
96
|
|
|
97
|
+
# The title of the plan. This will be visible on the product page to customers.
|
|
98
|
+
sig { returns(T.nilable(String)) }
|
|
99
|
+
attr_accessor :title
|
|
100
|
+
|
|
93
101
|
# The number of free trial days added before a renewal plan.
|
|
94
102
|
sig { returns(T.nilable(Integer)) }
|
|
95
103
|
attr_accessor :trial_period_days
|
|
96
104
|
|
|
105
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
106
|
+
sig { returns(T::Boolean) }
|
|
107
|
+
attr_accessor :unlimited_stock
|
|
108
|
+
|
|
97
109
|
# When the plan was last updated.
|
|
98
110
|
sig { returns(Time) }
|
|
99
111
|
attr_accessor :updated_at
|
|
@@ -123,8 +135,11 @@ module WhopSDK
|
|
|
123
135
|
purchase_url: String,
|
|
124
136
|
release_method: WhopSDK::ReleaseMethod::OrSymbol,
|
|
125
137
|
renewal_price: Float,
|
|
138
|
+
stock: T.nilable(Integer),
|
|
126
139
|
tax_type: WhopSDK::TaxType::OrSymbol,
|
|
140
|
+
title: T.nilable(String),
|
|
127
141
|
trial_period_days: T.nilable(Integer),
|
|
142
|
+
unlimited_stock: T::Boolean,
|
|
128
143
|
updated_at: Time,
|
|
129
144
|
visibility: WhopSDK::Visibility::OrSymbol
|
|
130
145
|
).returns(T.attached_class)
|
|
@@ -166,10 +181,16 @@ module WhopSDK
|
|
|
166
181
|
release_method:,
|
|
167
182
|
# The price a person has to pay for a plan on the renewal purchase.
|
|
168
183
|
renewal_price:,
|
|
184
|
+
# The number of units available for purchase. Only displayed to authorized actors
|
|
185
|
+
stock:,
|
|
169
186
|
# The tax type for the plan.
|
|
170
187
|
tax_type:,
|
|
188
|
+
# The title of the plan. This will be visible on the product page to customers.
|
|
189
|
+
title:,
|
|
171
190
|
# The number of free trial days added before a renewal plan.
|
|
172
191
|
trial_period_days:,
|
|
192
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
193
|
+
unlimited_stock:,
|
|
173
194
|
# When the plan was last updated.
|
|
174
195
|
updated_at:,
|
|
175
196
|
# Shows or hides the plan from public/business view.
|
|
@@ -198,8 +219,11 @@ module WhopSDK
|
|
|
198
219
|
purchase_url: String,
|
|
199
220
|
release_method: WhopSDK::ReleaseMethod::TaggedSymbol,
|
|
200
221
|
renewal_price: Float,
|
|
222
|
+
stock: T.nilable(Integer),
|
|
201
223
|
tax_type: WhopSDK::TaxType::TaggedSymbol,
|
|
224
|
+
title: T.nilable(String),
|
|
202
225
|
trial_period_days: T.nilable(Integer),
|
|
226
|
+
unlimited_stock: T::Boolean,
|
|
203
227
|
updated_at: Time,
|
|
204
228
|
visibility: WhopSDK::Visibility::TaggedSymbol
|
|
205
229
|
}
|
|
@@ -19,7 +19,7 @@ module WhopSDK
|
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :product_id
|
|
21
21
|
|
|
22
|
-
# The interval at which the plan charges (renewal plans).
|
|
22
|
+
# The interval in days at which the plan charges (renewal plans).
|
|
23
23
|
sig { returns(T.nilable(Integer)) }
|
|
24
24
|
attr_accessor :billing_period
|
|
25
25
|
|
|
@@ -78,6 +78,20 @@ module WhopSDK
|
|
|
78
78
|
sig { returns(T.nilable(Float)) }
|
|
79
79
|
attr_accessor :renewal_price
|
|
80
80
|
|
|
81
|
+
# The number of units available for purchase.
|
|
82
|
+
sig { returns(T.nilable(Integer)) }
|
|
83
|
+
attr_accessor :stock
|
|
84
|
+
|
|
85
|
+
# The price to display with a strikethrough for the initial price. Provided as a
|
|
86
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
87
|
+
sig { returns(T.nilable(Float)) }
|
|
88
|
+
attr_accessor :strike_through_initial_price
|
|
89
|
+
|
|
90
|
+
# The price to display with a strikethrough for the renewal price. Provided as a
|
|
91
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
92
|
+
sig { returns(T.nilable(Float)) }
|
|
93
|
+
attr_accessor :strike_through_renewal_price
|
|
94
|
+
|
|
81
95
|
# The title of the plan. This will be visible on the product page to customers.
|
|
82
96
|
sig { returns(T.nilable(String)) }
|
|
83
97
|
attr_accessor :title
|
|
@@ -86,6 +100,10 @@ module WhopSDK
|
|
|
86
100
|
sig { returns(T.nilable(Integer)) }
|
|
87
101
|
attr_accessor :trial_period_days
|
|
88
102
|
|
|
103
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
104
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
105
|
+
attr_accessor :unlimited_stock
|
|
106
|
+
|
|
89
107
|
# Visibility of a resource
|
|
90
108
|
sig { returns(T.nilable(WhopSDK::Visibility::OrSymbol)) }
|
|
91
109
|
attr_accessor :visibility
|
|
@@ -107,8 +125,12 @@ module WhopSDK
|
|
|
107
125
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
108
126
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
109
127
|
renewal_price: T.nilable(Float),
|
|
128
|
+
stock: T.nilable(Integer),
|
|
129
|
+
strike_through_initial_price: T.nilable(Float),
|
|
130
|
+
strike_through_renewal_price: T.nilable(Float),
|
|
110
131
|
title: T.nilable(String),
|
|
111
132
|
trial_period_days: T.nilable(Integer),
|
|
133
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
112
134
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol),
|
|
113
135
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
114
136
|
).returns(T.attached_class)
|
|
@@ -118,7 +140,7 @@ module WhopSDK
|
|
|
118
140
|
company_id:,
|
|
119
141
|
# The product the plan is related to.
|
|
120
142
|
product_id:,
|
|
121
|
-
# The interval at which the plan charges (renewal plans).
|
|
143
|
+
# The interval in days at which the plan charges (renewal plans).
|
|
122
144
|
billing_period: nil,
|
|
123
145
|
# The available currencies on the platform
|
|
124
146
|
currency: nil,
|
|
@@ -146,10 +168,20 @@ module WhopSDK
|
|
|
146
168
|
# The amount the customer is charged every billing period. Use only if a recurring
|
|
147
169
|
# payment. Provided as a number in dollars. Eg: 10.43 for $10.43
|
|
148
170
|
renewal_price: nil,
|
|
171
|
+
# The number of units available for purchase.
|
|
172
|
+
stock: nil,
|
|
173
|
+
# The price to display with a strikethrough for the initial price. Provided as a
|
|
174
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
175
|
+
strike_through_initial_price: nil,
|
|
176
|
+
# The price to display with a strikethrough for the renewal price. Provided as a
|
|
177
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
178
|
+
strike_through_renewal_price: nil,
|
|
149
179
|
# The title of the plan. This will be visible on the product page to customers.
|
|
150
180
|
title: nil,
|
|
151
181
|
# The number of free trial days added before a renewal plan.
|
|
152
182
|
trial_period_days: nil,
|
|
183
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
184
|
+
unlimited_stock: nil,
|
|
153
185
|
# Visibility of a resource
|
|
154
186
|
visibility: nil,
|
|
155
187
|
request_options: {}
|
|
@@ -174,8 +206,12 @@ module WhopSDK
|
|
|
174
206
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
175
207
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
176
208
|
renewal_price: T.nilable(Float),
|
|
209
|
+
stock: T.nilable(Integer),
|
|
210
|
+
strike_through_initial_price: T.nilable(Float),
|
|
211
|
+
strike_through_renewal_price: T.nilable(Float),
|
|
177
212
|
title: T.nilable(String),
|
|
178
213
|
trial_period_days: T.nilable(Integer),
|
|
214
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
179
215
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol),
|
|
180
216
|
request_options: WhopSDK::RequestOptions
|
|
181
217
|
}
|
|
@@ -93,10 +93,22 @@ module WhopSDK
|
|
|
93
93
|
sig { returns(Float) }
|
|
94
94
|
attr_accessor :renewal_price
|
|
95
95
|
|
|
96
|
+
# The number of units available for purchase. Only displayed to authorized actors
|
|
97
|
+
sig { returns(T.nilable(Integer)) }
|
|
98
|
+
attr_accessor :stock
|
|
99
|
+
|
|
100
|
+
# The title of the plan. This will be visible on the product page to customers.
|
|
101
|
+
sig { returns(T.nilable(String)) }
|
|
102
|
+
attr_accessor :title
|
|
103
|
+
|
|
96
104
|
# The number of free trial days added before a renewal plan.
|
|
97
105
|
sig { returns(T.nilable(Integer)) }
|
|
98
106
|
attr_accessor :trial_period_days
|
|
99
107
|
|
|
108
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
109
|
+
sig { returns(T::Boolean) }
|
|
110
|
+
attr_accessor :unlimited_stock
|
|
111
|
+
|
|
100
112
|
# When the plan was last updated.
|
|
101
113
|
sig { returns(Time) }
|
|
102
114
|
attr_accessor :updated_at
|
|
@@ -127,7 +139,10 @@ module WhopSDK
|
|
|
127
139
|
purchase_url: String,
|
|
128
140
|
release_method: WhopSDK::ReleaseMethod::OrSymbol,
|
|
129
141
|
renewal_price: Float,
|
|
142
|
+
stock: T.nilable(Integer),
|
|
143
|
+
title: T.nilable(String),
|
|
130
144
|
trial_period_days: T.nilable(Integer),
|
|
145
|
+
unlimited_stock: T::Boolean,
|
|
131
146
|
updated_at: Time,
|
|
132
147
|
visibility: WhopSDK::Visibility::OrSymbol
|
|
133
148
|
).returns(T.attached_class)
|
|
@@ -165,8 +180,14 @@ module WhopSDK
|
|
|
165
180
|
release_method:,
|
|
166
181
|
# The price a person has to pay for a plan on the renewal purchase.
|
|
167
182
|
renewal_price:,
|
|
183
|
+
# The number of units available for purchase. Only displayed to authorized actors
|
|
184
|
+
stock:,
|
|
185
|
+
# The title of the plan. This will be visible on the product page to customers.
|
|
186
|
+
title:,
|
|
168
187
|
# The number of free trial days added before a renewal plan.
|
|
169
188
|
trial_period_days:,
|
|
189
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
190
|
+
unlimited_stock:,
|
|
170
191
|
# When the plan was last updated.
|
|
171
192
|
updated_at:,
|
|
172
193
|
# Shows or hides the plan from public/business view.
|
|
@@ -193,7 +214,10 @@ module WhopSDK
|
|
|
193
214
|
purchase_url: String,
|
|
194
215
|
release_method: WhopSDK::ReleaseMethod::TaggedSymbol,
|
|
195
216
|
renewal_price: Float,
|
|
217
|
+
stock: T.nilable(Integer),
|
|
218
|
+
title: T.nilable(String),
|
|
196
219
|
trial_period_days: T.nilable(Integer),
|
|
220
|
+
unlimited_stock: T::Boolean,
|
|
197
221
|
updated_at: Time,
|
|
198
222
|
visibility: WhopSDK::Visibility::TaggedSymbol
|
|
199
223
|
}
|
|
@@ -63,6 +63,20 @@ module WhopSDK
|
|
|
63
63
|
sig { returns(T.nilable(Float)) }
|
|
64
64
|
attr_accessor :renewal_price
|
|
65
65
|
|
|
66
|
+
# The number of units available for purchase.
|
|
67
|
+
sig { returns(T.nilable(Integer)) }
|
|
68
|
+
attr_accessor :stock
|
|
69
|
+
|
|
70
|
+
# The price to display with a strikethrough for the initial price. Provided as a
|
|
71
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
72
|
+
sig { returns(T.nilable(Float)) }
|
|
73
|
+
attr_accessor :strike_through_initial_price
|
|
74
|
+
|
|
75
|
+
# The price to display with a strikethrough for the renewal price. Provided as a
|
|
76
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
77
|
+
sig { returns(T.nilable(Float)) }
|
|
78
|
+
attr_accessor :strike_through_renewal_price
|
|
79
|
+
|
|
66
80
|
# The title of the plan. This will be visible on the product page to customers.
|
|
67
81
|
sig { returns(T.nilable(String)) }
|
|
68
82
|
attr_accessor :title
|
|
@@ -71,6 +85,10 @@ module WhopSDK
|
|
|
71
85
|
sig { returns(T.nilable(Integer)) }
|
|
72
86
|
attr_accessor :trial_period_days
|
|
73
87
|
|
|
88
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
89
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
90
|
+
attr_accessor :unlimited_stock
|
|
91
|
+
|
|
74
92
|
# Visibility of a resource
|
|
75
93
|
sig { returns(T.nilable(WhopSDK::Visibility::OrSymbol)) }
|
|
76
94
|
attr_accessor :visibility
|
|
@@ -89,8 +107,12 @@ module WhopSDK
|
|
|
89
107
|
offer_cancel_discount: T.nilable(T::Boolean),
|
|
90
108
|
override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
|
|
91
109
|
renewal_price: T.nilable(Float),
|
|
110
|
+
stock: T.nilable(Integer),
|
|
111
|
+
strike_through_initial_price: T.nilable(Float),
|
|
112
|
+
strike_through_renewal_price: T.nilable(Float),
|
|
92
113
|
title: T.nilable(String),
|
|
93
114
|
trial_period_days: T.nilable(Integer),
|
|
115
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
94
116
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol),
|
|
95
117
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
96
118
|
).returns(T.attached_class)
|
|
@@ -119,10 +141,20 @@ module WhopSDK
|
|
|
119
141
|
override_tax_type: nil,
|
|
120
142
|
# The amount the customer is charged every billing period.
|
|
121
143
|
renewal_price: nil,
|
|
144
|
+
# The number of units available for purchase.
|
|
145
|
+
stock: nil,
|
|
146
|
+
# The price to display with a strikethrough for the initial price. Provided as a
|
|
147
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
148
|
+
strike_through_initial_price: nil,
|
|
149
|
+
# The price to display with a strikethrough for the renewal price. Provided as a
|
|
150
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
151
|
+
strike_through_renewal_price: nil,
|
|
122
152
|
# The title of the plan. This will be visible on the product page to customers.
|
|
123
153
|
title: nil,
|
|
124
154
|
# The number of free trial days added before a renewal plan.
|
|
125
155
|
trial_period_days: nil,
|
|
156
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
157
|
+
unlimited_stock: nil,
|
|
126
158
|
# Visibility of a resource
|
|
127
159
|
visibility: nil,
|
|
128
160
|
request_options: {}
|
|
@@ -144,8 +176,12 @@ module WhopSDK
|
|
|
144
176
|
offer_cancel_discount: T.nilable(T::Boolean),
|
|
145
177
|
override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
|
|
146
178
|
renewal_price: T.nilable(Float),
|
|
179
|
+
stock: T.nilable(Integer),
|
|
180
|
+
strike_through_initial_price: T.nilable(Float),
|
|
181
|
+
strike_through_renewal_price: T.nilable(Float),
|
|
147
182
|
title: T.nilable(String),
|
|
148
183
|
trial_period_days: T.nilable(Integer),
|
|
184
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
149
185
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol),
|
|
150
186
|
request_options: WhopSDK::RequestOptions
|
|
151
187
|
}
|
|
@@ -41,6 +41,12 @@ module WhopSDK
|
|
|
41
41
|
sig { returns(T.nilable(String)) }
|
|
42
42
|
attr_accessor :description
|
|
43
43
|
|
|
44
|
+
# A unique identifier used to create or update products. When provided on product
|
|
45
|
+
# creation endpoints, we’ll look up an existing product by this identifier — if it
|
|
46
|
+
# exists, we’ll update it; if not, we’ll create a new one.
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
48
|
+
attr_accessor :external_identifier
|
|
49
|
+
|
|
44
50
|
# The percentage of a transaction a user is eligible to earn from the whop
|
|
45
51
|
# marketplace global affiliate program.
|
|
46
52
|
sig { returns(T.nilable(Float)) }
|
|
@@ -124,6 +130,7 @@ module WhopSDK
|
|
|
124
130
|
custom_cta_url: T.nilable(String),
|
|
125
131
|
custom_statement_descriptor: T.nilable(String),
|
|
126
132
|
description: T.nilable(String),
|
|
133
|
+
external_identifier: T.nilable(String),
|
|
127
134
|
global_affiliate_percentage: T.nilable(Float),
|
|
128
135
|
global_affiliate_status: WhopSDK::GlobalAffiliateStatus::OrSymbol,
|
|
129
136
|
headline: T.nilable(String),
|
|
@@ -158,6 +165,10 @@ module WhopSDK
|
|
|
158
165
|
custom_statement_descriptor:,
|
|
159
166
|
# A short description of what the company offers or does.
|
|
160
167
|
description:,
|
|
168
|
+
# A unique identifier used to create or update products. When provided on product
|
|
169
|
+
# creation endpoints, we’ll look up an existing product by this identifier — if it
|
|
170
|
+
# exists, we’ll update it; if not, we’ll create a new one.
|
|
171
|
+
external_identifier:,
|
|
161
172
|
# The percentage of a transaction a user is eligible to earn from the whop
|
|
162
173
|
# marketplace global affiliate program.
|
|
163
174
|
global_affiliate_percentage:,
|
|
@@ -204,6 +215,7 @@ module WhopSDK
|
|
|
204
215
|
custom_cta_url: T.nilable(String),
|
|
205
216
|
custom_statement_descriptor: T.nilable(String),
|
|
206
217
|
description: T.nilable(String),
|
|
218
|
+
external_identifier: T.nilable(String),
|
|
207
219
|
global_affiliate_percentage: T.nilable(Float),
|
|
208
220
|
global_affiliate_status:
|
|
209
221
|
WhopSDK::GlobalAffiliateStatus::TaggedSymbol,
|