whop_sdk 0.0.3 → 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 +47 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +8 -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/app_build_create_params.rb +53 -29
- data/lib/whop_sdk/models/app_update_params.rb +53 -29
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +119 -43
- data/lib/whop_sdk/models/company.rb +13 -1
- data/lib/whop_sdk/models/company_create_params.rb +46 -0
- data/lib/whop_sdk/models/company_list_params.rb +62 -0
- data/lib/whop_sdk/models/company_list_response.rb +175 -0
- data/lib/whop_sdk/models/course.rb +18 -1
- data/lib/whop_sdk/models/course_create_params.rb +94 -30
- 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 +280 -83
- data/lib/whop_sdk/models/course_list_response.rb +18 -1
- data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
- data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
- data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
- data/lib/whop_sdk/models/course_update_params.rb +70 -28
- 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/experience_update_params.rb +53 -29
- data/lib/whop_sdk/models/forum_post.rb +2 -2
- data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
- data/lib/whop_sdk/models/forum_post_list_response.rb +2 -2
- data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
- data/lib/whop_sdk/models/global_affiliate_status.rb +1 -1
- data/lib/whop_sdk/models/invoice_create_params.rb +50 -34
- data/lib/whop_sdk/models/invoice_list_params.rb +27 -40
- data/lib/whop_sdk/models/lesson.rb +59 -9
- 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_create_params.rb +51 -27
- data/lib/whop_sdk/models/message_list_response.rb +2 -2
- data/lib/whop_sdk/models/message_update_params.rb +51 -27
- data/lib/whop_sdk/models/payment.rb +13 -4
- data/lib/whop_sdk/models/payment_list_response.rb +13 -4
- data/lib/whop_sdk/models/payment_method_types.rb +2 -1
- data/lib/whop_sdk/models/plan.rb +54 -5
- data/lib/whop_sdk/models/plan_create_params.rb +99 -24
- data/lib/whop_sdk/models/plan_list_response.rb +57 -5
- data/lib/whop_sdk/models/plan_type.rb +1 -1
- data/lib/whop_sdk/models/plan_update_params.rb +97 -22
- 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 +57 -33
- 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/transfer.rb +9 -1
- data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
- data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
- data/lib/whop_sdk/models.rb +14 -0
- data/lib/whop_sdk/resources/access_tokens.rb +46 -0
- data/lib/whop_sdk/resources/app_builds.rb +5 -3
- data/lib/whop_sdk/resources/apps.rb +4 -3
- 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 +8 -7
- data/lib/whop_sdk/resources/companies.rb +72 -1
- data/lib/whop_sdk/resources/course_chapters.rb +5 -3
- data/lib/whop_sdk/resources/course_lesson_interactions.rb +4 -3
- data/lib/whop_sdk/resources/course_lessons.rb +25 -7
- data/lib/whop_sdk/resources/course_students.rb +77 -0
- data/lib/whop_sdk/resources/courses.rb +24 -7
- data/lib/whop_sdk/resources/entries.rb +6 -3
- data/lib/whop_sdk/resources/experiences.rb +9 -7
- data/lib/whop_sdk/resources/forum_posts.rb +5 -4
- data/lib/whop_sdk/resources/forums.rb +3 -2
- data/lib/whop_sdk/resources/invoices.rb +22 -16
- 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 +5 -4
- data/lib/whop_sdk/resources/payments.rb +7 -4
- data/lib/whop_sdk/resources/plans.rb +14 -8
- data/lib/whop_sdk/resources/products.rb +10 -8
- 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 +5 -2
- data/lib/whop_sdk/resources/users.rb +9 -3
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +14 -1
- data/manifest.yaml +1 -0
- data/rbi/whop_sdk/client.rbi +6 -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/app_build_create_params.rbi +80 -40
- data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +196 -68
- data/rbi/whop_sdk/models/company.rbi +10 -0
- data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
- data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
- data/rbi/whop_sdk/models/course.rbi +21 -3
- data/rbi/whop_sdk/models/course_create_params.rbi +126 -38
- 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 +449 -111
- data/rbi/whop_sdk/models/course_list_response.rbi +21 -3
- data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
- data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
- data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
- data/rbi/whop_sdk/models/course_update_params.rbi +104 -38
- 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/experience_update_params.rbi +84 -38
- data/rbi/whop_sdk/models/forum_post.rbi +2 -2
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/forum_post_list_response.rbi +2 -2
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/global_affiliate_status.rbi +1 -1
- data/rbi/whop_sdk/models/invoice_create_params.rbi +60 -46
- data/rbi/whop_sdk/models/invoice_list_params.rbi +26 -71
- data/rbi/whop_sdk/models/lesson.rbi +68 -10
- 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_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/message_list_response.rbi +2 -2
- data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/payment.rbi +13 -3
- data/rbi/whop_sdk/models/payment_list_response.rbi +13 -3
- data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
- data/rbi/whop_sdk/models/plan.rbi +88 -4
- data/rbi/whop_sdk/models/plan_create_params.rbi +176 -34
- data/rbi/whop_sdk/models/plan_list_response.rbi +100 -4
- data/rbi/whop_sdk/models/plan_type.rbi +1 -1
- data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
- 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 +87 -43
- 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/transfer.rbi +8 -0
- data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
- data/rbi/whop_sdk/models.rbi +14 -0
- data/rbi/whop_sdk/resources/access_tokens.rbi +41 -0
- data/rbi/whop_sdk/resources/app_builds.rbi +15 -3
- data/rbi/whop_sdk/resources/apps.rbi +13 -2
- 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 +11 -8
- data/rbi/whop_sdk/resources/companies.rbi +68 -1
- data/rbi/whop_sdk/resources/course_chapters.rbi +11 -2
- data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +7 -3
- data/rbi/whop_sdk/resources/course_lessons.rbi +62 -4
- data/rbi/whop_sdk/resources/course_students.rbi +69 -0
- data/rbi/whop_sdk/resources/courses.rbi +50 -4
- data/rbi/whop_sdk/resources/entries.rbi +15 -3
- data/rbi/whop_sdk/resources/experiences.rbi +21 -3
- data/rbi/whop_sdk/resources/forum_posts.rbi +18 -3
- data/rbi/whop_sdk/resources/forums.rbi +6 -1
- data/rbi/whop_sdk/resources/invoices.rbi +38 -23
- 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 +18 -3
- data/rbi/whop_sdk/resources/payments.rbi +16 -3
- data/rbi/whop_sdk/resources/plans.rbi +40 -5
- data/rbi/whop_sdk/resources/products.rbi +21 -7
- 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 +8 -1
- data/rbi/whop_sdk/resources/users.rbi +13 -2
- data/sig/whop_sdk/client.rbs +4 -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/app_build_create_params.rbs +29 -10
- data/sig/whop_sdk/models/app_update_params.rbs +29 -10
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
- data/sig/whop_sdk/models/company.rbs +5 -0
- data/sig/whop_sdk/models/company_create_params.rbs +41 -0
- data/sig/whop_sdk/models/company_list_params.rbs +51 -0
- data/sig/whop_sdk/models/company_list_response.rbs +109 -0
- data/sig/whop_sdk/models/course.rbs +13 -3
- data/sig/whop_sdk/models/course_create_params.rbs +49 -10
- 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 +162 -30
- data/sig/whop_sdk/models/course_list_response.rbs +13 -3
- data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
- data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
- data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
- data/sig/whop_sdk/models/course_update_params.rbs +40 -11
- 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/experience_update_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
- data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
- data/sig/whop_sdk/models/invoice_list_params.rbs +16 -33
- data/sig/whop_sdk/models/lesson.rbs +33 -8
- 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/message_create_params.rbs +29 -10
- data/sig/whop_sdk/models/message_update_params.rbs +29 -10
- data/sig/whop_sdk/models/payment.rbs +5 -0
- data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
- data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
- data/sig/whop_sdk/models/plan.rbs +32 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
- data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
- data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
- data/sig/whop_sdk/models/product_update_params.rbs +29 -10
- data/sig/whop_sdk/models/transfer.rbs +5 -0
- data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
- data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
- data/sig/whop_sdk/models.rbs +14 -0
- data/sig/whop_sdk/resources/access_tokens.rbs +15 -0
- data/sig/whop_sdk/resources/app_builds.rbs +1 -1
- data/sig/whop_sdk/resources/apps.rbs +1 -1
- data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
- data/sig/whop_sdk/resources/companies.rbs +18 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +10 -2
- data/sig/whop_sdk/resources/course_students.rbs +22 -0
- data/sig/whop_sdk/resources/courses.rbs +8 -2
- data/sig/whop_sdk/resources/experiences.rbs +1 -1
- data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
- data/sig/whop_sdk/resources/invoices.rbs +8 -6
- data/sig/whop_sdk/resources/members.rbs +1 -1
- data/sig/whop_sdk/resources/memberships.rbs +1 -1
- data/sig/whop_sdk/resources/messages.rbs +2 -2
- data/sig/whop_sdk/resources/plans.rbs +4 -2
- data/sig/whop_sdk/resources/products.rbs +1 -1
- data/sig/whop_sdk/resources/transfers.rbs +1 -0
- metadata +41 -5
- data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
- data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
- data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
|
@@ -42,13 +42,17 @@ module WhopSDK
|
|
|
42
42
|
attr_accessor :expiration_days
|
|
43
43
|
|
|
44
44
|
# An image for the plan. This will be visible on the product page to customers.
|
|
45
|
-
sig { returns(T.nilable(WhopSDK::PlanCreateParams::Image)) }
|
|
46
|
-
attr_reader :image
|
|
47
|
-
|
|
48
45
|
sig do
|
|
49
|
-
|
|
46
|
+
returns(
|
|
47
|
+
T.nilable(
|
|
48
|
+
T.any(
|
|
49
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
|
|
50
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
)
|
|
50
54
|
end
|
|
51
|
-
|
|
55
|
+
attr_accessor :image
|
|
52
56
|
|
|
53
57
|
# An additional amount charged upon first purchase. Use only if a one time payment
|
|
54
58
|
# OR you want to charge an additional amount on top of the renewal price. Provided
|
|
@@ -65,7 +69,26 @@ module WhopSDK
|
|
|
65
69
|
sig { returns(T.nilable(WhopSDK::TaxType::OrSymbol)) }
|
|
66
70
|
attr_accessor :override_tax_type
|
|
67
71
|
|
|
68
|
-
# The
|
|
72
|
+
# The explicit payment method configuration for the plan. If not provided, the
|
|
73
|
+
# platform or company's defaults will apply.
|
|
74
|
+
sig do
|
|
75
|
+
returns(
|
|
76
|
+
T.nilable(WhopSDK::PlanCreateParams::PaymentMethodConfiguration)
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
attr_reader :payment_method_configuration
|
|
80
|
+
|
|
81
|
+
sig do
|
|
82
|
+
params(
|
|
83
|
+
payment_method_configuration:
|
|
84
|
+
T.nilable(
|
|
85
|
+
WhopSDK::PlanCreateParams::PaymentMethodConfiguration::OrHash
|
|
86
|
+
)
|
|
87
|
+
).void
|
|
88
|
+
end
|
|
89
|
+
attr_writer :payment_method_configuration
|
|
90
|
+
|
|
91
|
+
# The type of plan that can be attached to a product
|
|
69
92
|
sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
|
|
70
93
|
attr_accessor :plan_type
|
|
71
94
|
|
|
@@ -118,10 +141,20 @@ module WhopSDK
|
|
|
118
141
|
T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField::OrHash]),
|
|
119
142
|
description: T.nilable(String),
|
|
120
143
|
expiration_days: T.nilable(Integer),
|
|
121
|
-
image:
|
|
144
|
+
image:
|
|
145
|
+
T.nilable(
|
|
146
|
+
T.any(
|
|
147
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID::OrHash,
|
|
148
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID::OrHash
|
|
149
|
+
)
|
|
150
|
+
),
|
|
122
151
|
initial_price: T.nilable(Float),
|
|
123
152
|
internal_notes: T.nilable(String),
|
|
124
153
|
override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
|
|
154
|
+
payment_method_configuration:
|
|
155
|
+
T.nilable(
|
|
156
|
+
WhopSDK::PlanCreateParams::PaymentMethodConfiguration::OrHash
|
|
157
|
+
),
|
|
125
158
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
126
159
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
127
160
|
renewal_price: T.nilable(Float),
|
|
@@ -161,7 +194,10 @@ module WhopSDK
|
|
|
161
194
|
# Whether or not the tax is included in a plan's price (or if it hasn't been set
|
|
162
195
|
# up)
|
|
163
196
|
override_tax_type: nil,
|
|
164
|
-
# The
|
|
197
|
+
# The explicit payment method configuration for the plan. If not provided, the
|
|
198
|
+
# platform or company's defaults will apply.
|
|
199
|
+
payment_method_configuration: nil,
|
|
200
|
+
# The type of plan that can be attached to a product
|
|
165
201
|
plan_type: nil,
|
|
166
202
|
# The methods of how a plan can be released.
|
|
167
203
|
release_method: nil,
|
|
@@ -199,10 +235,18 @@ module WhopSDK
|
|
|
199
235
|
T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField]),
|
|
200
236
|
description: T.nilable(String),
|
|
201
237
|
expiration_days: T.nilable(Integer),
|
|
202
|
-
image:
|
|
238
|
+
image:
|
|
239
|
+
T.nilable(
|
|
240
|
+
T.any(
|
|
241
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
|
|
242
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
|
|
243
|
+
)
|
|
244
|
+
),
|
|
203
245
|
initial_price: T.nilable(Float),
|
|
204
246
|
internal_notes: T.nilable(String),
|
|
205
247
|
override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
|
|
248
|
+
payment_method_configuration:
|
|
249
|
+
T.nilable(WhopSDK::PlanCreateParams::PaymentMethodConfiguration),
|
|
206
250
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
207
251
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
208
252
|
renewal_price: T.nilable(Float),
|
|
@@ -295,46 +339,144 @@ module WhopSDK
|
|
|
295
339
|
end
|
|
296
340
|
end
|
|
297
341
|
|
|
298
|
-
|
|
299
|
-
|
|
342
|
+
# An image for the plan. This will be visible on the product page to customers.
|
|
343
|
+
module Image
|
|
344
|
+
extend WhopSDK::Internal::Type::Union
|
|
345
|
+
|
|
346
|
+
Variants =
|
|
300
347
|
T.type_alias do
|
|
301
|
-
T.any(
|
|
348
|
+
T.any(
|
|
349
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
|
|
350
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
|
|
351
|
+
)
|
|
302
352
|
end
|
|
303
353
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
354
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
355
|
+
OrHash =
|
|
356
|
+
T.type_alias do
|
|
357
|
+
T.any(
|
|
358
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
|
|
359
|
+
WhopSDK::Internal::AnyHash
|
|
360
|
+
)
|
|
361
|
+
end
|
|
309
362
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
363
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
364
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
365
|
+
# mediaDirectUpload mutation.
|
|
366
|
+
sig { returns(String) }
|
|
367
|
+
attr_accessor :direct_upload_id
|
|
368
|
+
|
|
369
|
+
# Input for an attachment
|
|
370
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
371
|
+
def self.new(
|
|
372
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
373
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
374
|
+
# mediaDirectUpload mutation.
|
|
375
|
+
direct_upload_id:
|
|
376
|
+
)
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
380
|
+
def to_hash
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
385
|
+
OrHash =
|
|
386
|
+
T.type_alias do
|
|
387
|
+
T.any(
|
|
388
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID,
|
|
389
|
+
WhopSDK::Internal::AnyHash
|
|
390
|
+
)
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
394
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
395
|
+
# doing.
|
|
396
|
+
sig { returns(String) }
|
|
397
|
+
attr_accessor :id
|
|
398
|
+
|
|
399
|
+
# Input for an attachment
|
|
400
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
401
|
+
def self.new(
|
|
402
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
403
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
404
|
+
# doing.
|
|
405
|
+
id:
|
|
406
|
+
)
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
sig { override.returns({ id: String }) }
|
|
410
|
+
def to_hash
|
|
411
|
+
end
|
|
412
|
+
end
|
|
315
413
|
|
|
316
|
-
|
|
414
|
+
sig do
|
|
415
|
+
override.returns(T::Array[WhopSDK::PlanCreateParams::Image::Variants])
|
|
416
|
+
end
|
|
417
|
+
def self.variants
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
422
|
+
OrHash =
|
|
423
|
+
T.type_alias do
|
|
424
|
+
T.any(
|
|
425
|
+
WhopSDK::PlanCreateParams::PaymentMethodConfiguration,
|
|
426
|
+
WhopSDK::Internal::AnyHash
|
|
427
|
+
)
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
431
|
+
# applies if the include_platform_defaults is true.
|
|
432
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
|
|
433
|
+
attr_accessor :disabled
|
|
434
|
+
|
|
435
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
436
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
437
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
438
|
+
# defaults with additional methods.
|
|
439
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
|
|
440
|
+
attr_accessor :enabled
|
|
441
|
+
|
|
442
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
443
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
444
|
+
# the documentation at docs.whop.com/payments.
|
|
445
|
+
sig { returns(T::Boolean) }
|
|
446
|
+
attr_accessor :include_platform_defaults
|
|
447
|
+
|
|
448
|
+
# The explicit payment method configuration for the plan. If not provided, the
|
|
449
|
+
# platform or company's defaults will apply.
|
|
317
450
|
sig do
|
|
318
451
|
params(
|
|
319
|
-
|
|
320
|
-
|
|
452
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
453
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
454
|
+
include_platform_defaults: T::Boolean
|
|
321
455
|
).returns(T.attached_class)
|
|
322
456
|
end
|
|
323
457
|
def self.new(
|
|
324
|
-
#
|
|
325
|
-
#
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
#
|
|
329
|
-
#
|
|
330
|
-
#
|
|
331
|
-
|
|
458
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
459
|
+
# applies if the include_platform_defaults is true.
|
|
460
|
+
disabled:,
|
|
461
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
462
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
463
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
464
|
+
# defaults with additional methods.
|
|
465
|
+
enabled:,
|
|
466
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
467
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
468
|
+
# the documentation at docs.whop.com/payments.
|
|
469
|
+
include_platform_defaults:
|
|
332
470
|
)
|
|
333
471
|
end
|
|
334
472
|
|
|
335
473
|
sig do
|
|
336
474
|
override.returns(
|
|
337
|
-
{
|
|
475
|
+
{
|
|
476
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
477
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
478
|
+
include_platform_defaults: T::Boolean
|
|
479
|
+
}
|
|
338
480
|
)
|
|
339
481
|
end
|
|
340
482
|
def to_hash
|
|
@@ -66,11 +66,31 @@ module WhopSDK
|
|
|
66
66
|
sig { returns(T.nilable(Integer)) }
|
|
67
67
|
attr_accessor :member_count
|
|
68
68
|
|
|
69
|
+
# The explicit payment method configuration for the plan, if any.
|
|
70
|
+
sig do
|
|
71
|
+
returns(
|
|
72
|
+
T.nilable(
|
|
73
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration
|
|
74
|
+
)
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
attr_reader :payment_method_configuration
|
|
78
|
+
|
|
79
|
+
sig do
|
|
80
|
+
params(
|
|
81
|
+
payment_method_configuration:
|
|
82
|
+
T.nilable(
|
|
83
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration::OrHash
|
|
84
|
+
)
|
|
85
|
+
).void
|
|
86
|
+
end
|
|
87
|
+
attr_writer :payment_method_configuration
|
|
88
|
+
|
|
69
89
|
# Indicates if the plan is a one time payment or recurring.
|
|
70
90
|
sig { returns(WhopSDK::PlanType::TaggedSymbol) }
|
|
71
91
|
attr_accessor :plan_type
|
|
72
92
|
|
|
73
|
-
# The
|
|
93
|
+
# The product that this plan belongs to.
|
|
74
94
|
sig { returns(T.nilable(WhopSDK::Models::PlanListResponse::Product)) }
|
|
75
95
|
attr_reader :product
|
|
76
96
|
|
|
@@ -117,7 +137,9 @@ module WhopSDK
|
|
|
117
137
|
sig { returns(WhopSDK::Visibility::TaggedSymbol) }
|
|
118
138
|
attr_accessor :visibility
|
|
119
139
|
|
|
120
|
-
#
|
|
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)
|
|
121
143
|
sig do
|
|
122
144
|
params(
|
|
123
145
|
id: String,
|
|
@@ -133,6 +155,10 @@ module WhopSDK
|
|
|
133
155
|
invoice:
|
|
134
156
|
T.nilable(WhopSDK::Models::PlanListResponse::Invoice::OrHash),
|
|
135
157
|
member_count: T.nilable(Integer),
|
|
158
|
+
payment_method_configuration:
|
|
159
|
+
T.nilable(
|
|
160
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration::OrHash
|
|
161
|
+
),
|
|
136
162
|
plan_type: WhopSDK::PlanType::OrSymbol,
|
|
137
163
|
product:
|
|
138
164
|
T.nilable(WhopSDK::Models::PlanListResponse::Product::OrHash),
|
|
@@ -170,9 +196,11 @@ module WhopSDK
|
|
|
170
196
|
invoice:,
|
|
171
197
|
# The number of members for the plan.
|
|
172
198
|
member_count:,
|
|
199
|
+
# The explicit payment method configuration for the plan, if any.
|
|
200
|
+
payment_method_configuration:,
|
|
173
201
|
# Indicates if the plan is a one time payment or recurring.
|
|
174
202
|
plan_type:,
|
|
175
|
-
# The
|
|
203
|
+
# The product that this plan belongs to.
|
|
176
204
|
product:,
|
|
177
205
|
# The direct link to purchase the product.
|
|
178
206
|
purchase_url:,
|
|
@@ -209,6 +237,10 @@ module WhopSDK
|
|
|
209
237
|
internal_notes: T.nilable(String),
|
|
210
238
|
invoice: T.nilable(WhopSDK::Models::PlanListResponse::Invoice),
|
|
211
239
|
member_count: T.nilable(Integer),
|
|
240
|
+
payment_method_configuration:
|
|
241
|
+
T.nilable(
|
|
242
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration
|
|
243
|
+
),
|
|
212
244
|
plan_type: WhopSDK::PlanType::TaggedSymbol,
|
|
213
245
|
product: T.nilable(WhopSDK::Models::PlanListResponse::Product),
|
|
214
246
|
purchase_url: String,
|
|
@@ -284,6 +316,70 @@ module WhopSDK
|
|
|
284
316
|
end
|
|
285
317
|
end
|
|
286
318
|
|
|
319
|
+
class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
320
|
+
OrHash =
|
|
321
|
+
T.type_alias do
|
|
322
|
+
T.any(
|
|
323
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration,
|
|
324
|
+
WhopSDK::Internal::AnyHash
|
|
325
|
+
)
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
329
|
+
# applies if the include_platform_defaults is true.
|
|
330
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
|
|
331
|
+
attr_accessor :disabled
|
|
332
|
+
|
|
333
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
334
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
335
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
336
|
+
# defaults with additional methods.
|
|
337
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
|
|
338
|
+
attr_accessor :enabled
|
|
339
|
+
|
|
340
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
341
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
342
|
+
# the documentation at docs.whop.com/payments.
|
|
343
|
+
sig { returns(T::Boolean) }
|
|
344
|
+
attr_accessor :include_platform_defaults
|
|
345
|
+
|
|
346
|
+
# The explicit payment method configuration for the plan, if any.
|
|
347
|
+
sig do
|
|
348
|
+
params(
|
|
349
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
350
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
351
|
+
include_platform_defaults: T::Boolean
|
|
352
|
+
).returns(T.attached_class)
|
|
353
|
+
end
|
|
354
|
+
def self.new(
|
|
355
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
356
|
+
# applies if the include_platform_defaults is true.
|
|
357
|
+
disabled:,
|
|
358
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
359
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
360
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
361
|
+
# defaults with additional methods.
|
|
362
|
+
enabled:,
|
|
363
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
364
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
365
|
+
# the documentation at docs.whop.com/payments.
|
|
366
|
+
include_platform_defaults:
|
|
367
|
+
)
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
sig do
|
|
371
|
+
override.returns(
|
|
372
|
+
{
|
|
373
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
|
|
374
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
|
|
375
|
+
include_platform_defaults: T::Boolean
|
|
376
|
+
}
|
|
377
|
+
)
|
|
378
|
+
end
|
|
379
|
+
def to_hash
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
|
|
287
383
|
class Product < WhopSDK::Internal::Type::BaseModel
|
|
288
384
|
OrHash =
|
|
289
385
|
T.type_alias do
|
|
@@ -301,7 +397,7 @@ module WhopSDK
|
|
|
301
397
|
sig { returns(String) }
|
|
302
398
|
attr_accessor :title
|
|
303
399
|
|
|
304
|
-
# The
|
|
400
|
+
# The product that this plan belongs to.
|
|
305
401
|
sig { params(id: String, title: String).returns(T.attached_class) }
|
|
306
402
|
def self.new(
|
|
307
403
|
# The internal ID of the public product.
|