whop_sdk 0.0.3 → 0.0.4
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 +22 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +4 -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 +115 -39
- 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_create_params.rb +75 -30
- data/lib/whop_sdk/models/course_lesson_update_params.rb +204 -83
- 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 +51 -27
- data/lib/whop_sdk/models/experience_update_params.rb +53 -29
- data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
- data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
- data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
- data/lib/whop_sdk/models/lesson.rb +16 -8
- data/lib/whop_sdk/models/message_create_params.rb +51 -27
- data/lib/whop_sdk/models/message_update_params.rb +51 -27
- data/lib/whop_sdk/models/payment.rb +10 -1
- data/lib/whop_sdk/models/payment_list_response.rb +10 -1
- data/lib/whop_sdk/models/payment_method_types.rb +2 -1
- data/lib/whop_sdk/models/plan.rb +48 -1
- data/lib/whop_sdk/models/plan_create_params.rb +97 -22
- data/lib/whop_sdk/models/plan_list_response.rb +51 -1
- data/lib/whop_sdk/models/plan_update_params.rb +97 -22
- data/lib/whop_sdk/models/product_update_params.rb +53 -29
- 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 +8 -0
- data/lib/whop_sdk/resources/app_builds.rb +1 -1
- data/lib/whop_sdk/resources/apps.rb +1 -1
- data/lib/whop_sdk/resources/checkout_configurations.rb +6 -6
- data/lib/whop_sdk/resources/companies.rb +70 -0
- data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
- data/lib/whop_sdk/resources/course_lessons.rb +7 -3
- data/lib/whop_sdk/resources/course_students.rb +76 -0
- data/lib/whop_sdk/resources/courses.rb +10 -3
- data/lib/whop_sdk/resources/experiences.rb +1 -1
- data/lib/whop_sdk/resources/forum_posts.rb +2 -2
- data/lib/whop_sdk/resources/invoices.rb +11 -11
- data/lib/whop_sdk/resources/messages.rb +2 -2
- data/lib/whop_sdk/resources/plans.rb +8 -4
- data/lib/whop_sdk/resources/products.rb +1 -1
- data/lib/whop_sdk/resources/transfers.rb +3 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +8 -1
- data/rbi/whop_sdk/client.rbi +3 -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 +192 -64
- 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_create_params.rbi +104 -38
- data/rbi/whop_sdk/models/course_lesson_update_params.rbi +326 -114
- 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 +84 -38
- data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
- data/rbi/whop_sdk/models/lesson.rbi +14 -10
- data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/payment.rbi +10 -0
- data/rbi/whop_sdk/models/payment_list_response.rbi +10 -0
- data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
- data/rbi/whop_sdk/models/plan.rbi +82 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +174 -32
- data/rbi/whop_sdk/models/plan_list_response.rbi +94 -0
- data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
- data/rbi/whop_sdk/models/product_update_params.rbi +83 -39
- 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 +8 -0
- data/rbi/whop_sdk/resources/app_builds.rbi +5 -1
- data/rbi/whop_sdk/resources/apps.rbi +7 -1
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +6 -7
- data/rbi/whop_sdk/resources/companies.rbi +63 -0
- data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
- data/rbi/whop_sdk/resources/course_lessons.rbi +21 -2
- data/rbi/whop_sdk/resources/course_students.rbi +65 -0
- data/rbi/whop_sdk/resources/courses.rbi +22 -2
- data/rbi/whop_sdk/resources/experiences.rbi +7 -1
- data/rbi/whop_sdk/resources/forum_posts.rbi +12 -2
- data/rbi/whop_sdk/resources/invoices.rbi +18 -18
- data/rbi/whop_sdk/resources/messages.rbi +12 -2
- data/rbi/whop_sdk/resources/plans.rbi +28 -2
- data/rbi/whop_sdk/resources/products.rbi +6 -1
- data/rbi/whop_sdk/resources/transfers.rbi +3 -0
- data/sig/whop_sdk/client.rbs +2 -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_create_params.rbs +39 -10
- data/sig/whop_sdk/models/course_lesson_update_params.rbs +116 -30
- 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 +29 -10
- 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/lesson.rbs +8 -8
- 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 +8 -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 +4 -2
- data/sig/whop_sdk/resources/course_students.rbs +22 -0
- data/sig/whop_sdk/resources/courses.rbs +4 -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 +5 -5
- 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 +26 -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
|
@@ -26,12 +26,27 @@ module WhopSDK
|
|
|
26
26
|
# @return [Time]
|
|
27
27
|
required :due_date, Time
|
|
28
28
|
|
|
29
|
+
# @!attribute member_id
|
|
30
|
+
# The member ID to create this invoice for. Include this if you want to create an
|
|
31
|
+
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
32
|
+
# an email_address and customer_name.
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :member_id, String
|
|
36
|
+
|
|
29
37
|
# @!attribute plan
|
|
30
38
|
# The properties of the plan to create for this invoice.
|
|
31
39
|
#
|
|
32
40
|
# @return [WhopSDK::Models::InvoiceCreateParams::Plan]
|
|
33
41
|
required :plan, -> { WhopSDK::InvoiceCreateParams::Plan }
|
|
34
42
|
|
|
43
|
+
# @!attribute product
|
|
44
|
+
# The properties of the product to create for this invoice. Include this if you
|
|
45
|
+
# want to create an invoice for a new product.
|
|
46
|
+
#
|
|
47
|
+
# @return [WhopSDK::Models::InvoiceCreateParams::Product]
|
|
48
|
+
required :product, -> { WhopSDK::InvoiceCreateParams::Product }
|
|
49
|
+
|
|
35
50
|
# @!attribute charge_buyer_fee
|
|
36
51
|
# Whether or not to charge the customer a buyer fee.
|
|
37
52
|
#
|
|
@@ -46,21 +61,6 @@ module WhopSDK
|
|
|
46
61
|
# @return [String, nil]
|
|
47
62
|
optional :customer_name, String, nil?: true
|
|
48
63
|
|
|
49
|
-
# @!attribute email_address
|
|
50
|
-
# The email address to create this invoice for. This is required if you want to
|
|
51
|
-
# create an invoice for a user who does not have a member of your company yet.
|
|
52
|
-
#
|
|
53
|
-
# @return [String, nil]
|
|
54
|
-
optional :email_address, String, nil?: true
|
|
55
|
-
|
|
56
|
-
# @!attribute member_id
|
|
57
|
-
# The member ID to create this invoice for. Include this if you want to create an
|
|
58
|
-
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
59
|
-
# an email_address and customer_name.
|
|
60
|
-
#
|
|
61
|
-
# @return [String, nil]
|
|
62
|
-
optional :member_id, String, nil?: true
|
|
63
|
-
|
|
64
64
|
# @!attribute payment_token_id
|
|
65
65
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
66
66
|
# must provide a payment_token.
|
|
@@ -68,21 +68,21 @@ module WhopSDK
|
|
|
68
68
|
# @return [String, nil]
|
|
69
69
|
optional :payment_token_id, String, nil?: true
|
|
70
70
|
|
|
71
|
-
# @!attribute
|
|
72
|
-
# The
|
|
73
|
-
#
|
|
71
|
+
# @!attribute email_address
|
|
72
|
+
# The email address to create this invoice for. This is required if you want to
|
|
73
|
+
# create an invoice for a user who does not have a member of your company yet.
|
|
74
74
|
#
|
|
75
|
-
# @return [
|
|
76
|
-
|
|
75
|
+
# @return [String]
|
|
76
|
+
required :email_address, String
|
|
77
77
|
|
|
78
78
|
# @!attribute product_id
|
|
79
79
|
# The product ID to create this invoice for. Include this if you want to create an
|
|
80
80
|
# invoice for an existing product.
|
|
81
81
|
#
|
|
82
|
-
# @return [String
|
|
83
|
-
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :product_id, String
|
|
84
84
|
|
|
85
|
-
# @!method initialize(collection_method:, company_id:, due_date:, plan:,
|
|
85
|
+
# @!method initialize(collection_method:, company_id:, due_date:, member_id:, plan:, product:, email_address:, product_id:, charge_buyer_fee: nil, customer_name: nil, payment_token_id: nil, request_options: {})
|
|
86
86
|
# Some parameter documentations has been truncated, see
|
|
87
87
|
# {WhopSDK::Models::InvoiceCreateParams} for more details.
|
|
88
88
|
#
|
|
@@ -92,21 +92,21 @@ module WhopSDK
|
|
|
92
92
|
#
|
|
93
93
|
# @param due_date [Time] The date the invoice is due, if applicable.
|
|
94
94
|
#
|
|
95
|
-
# @param
|
|
95
|
+
# @param member_id [String] The member ID to create this invoice for. Include this if you want to create an
|
|
96
96
|
#
|
|
97
|
-
# @param
|
|
97
|
+
# @param plan [WhopSDK::Models::InvoiceCreateParams::Plan] The properties of the plan to create for this invoice.
|
|
98
98
|
#
|
|
99
|
-
# @param
|
|
99
|
+
# @param product [WhopSDK::Models::InvoiceCreateParams::Product] The properties of the product to create for this invoice. Include this if you wa
|
|
100
100
|
#
|
|
101
|
-
# @param email_address [String
|
|
101
|
+
# @param email_address [String] The email address to create this invoice for. This is required if you want to cr
|
|
102
102
|
#
|
|
103
|
-
# @param
|
|
103
|
+
# @param product_id [String] The product ID to create this invoice for. Include this if you want to create an
|
|
104
104
|
#
|
|
105
|
-
# @param
|
|
105
|
+
# @param charge_buyer_fee [Boolean, nil] Whether or not to charge the customer a buyer fee.
|
|
106
106
|
#
|
|
107
|
-
# @param
|
|
107
|
+
# @param customer_name [String, nil] The name of the customer to create this invoice for. This is required if you wan
|
|
108
108
|
#
|
|
109
|
-
# @param
|
|
109
|
+
# @param payment_token_id [String, nil] The payment token ID to use for this invoice. If using charge_automatically, you
|
|
110
110
|
#
|
|
111
111
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
112
112
|
|
|
@@ -170,19 +170,31 @@ module WhopSDK
|
|
|
170
170
|
# @return [Float, nil]
|
|
171
171
|
optional :renewal_price, Float, nil?: true
|
|
172
172
|
|
|
173
|
+
# @!attribute stock
|
|
174
|
+
# The number of units available for purchase.
|
|
175
|
+
#
|
|
176
|
+
# @return [Integer, nil]
|
|
177
|
+
optional :stock, Integer, nil?: true
|
|
178
|
+
|
|
173
179
|
# @!attribute trial_period_days
|
|
174
180
|
# The number of free trial days added before a renewal plan.
|
|
175
181
|
#
|
|
176
182
|
# @return [Integer, nil]
|
|
177
183
|
optional :trial_period_days, Integer, nil?: true
|
|
178
184
|
|
|
185
|
+
# @!attribute unlimited_stock
|
|
186
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
187
|
+
#
|
|
188
|
+
# @return [Boolean, nil]
|
|
189
|
+
optional :unlimited_stock, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
190
|
+
|
|
179
191
|
# @!attribute visibility
|
|
180
192
|
# Visibility of a resource
|
|
181
193
|
#
|
|
182
194
|
# @return [Symbol, WhopSDK::Models::Visibility, nil]
|
|
183
195
|
optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
|
|
184
196
|
|
|
185
|
-
# @!method initialize(billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, initial_price: nil, internal_notes: nil, plan_type: nil, release_method: nil, renewal_price: nil, trial_period_days: nil, visibility: nil)
|
|
197
|
+
# @!method initialize(billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, initial_price: nil, internal_notes: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil)
|
|
186
198
|
# Some parameter documentations has been truncated, see
|
|
187
199
|
# {WhopSDK::Models::InvoiceCreateParams::Plan} for more details.
|
|
188
200
|
#
|
|
@@ -206,8 +218,12 @@ module WhopSDK
|
|
|
206
218
|
#
|
|
207
219
|
# @param renewal_price [Float, nil] The amount the customer is charged every billing period. Use only if a recurring
|
|
208
220
|
#
|
|
221
|
+
# @param stock [Integer, nil] The number of units available for purchase.
|
|
222
|
+
#
|
|
209
223
|
# @param trial_period_days [Integer, nil] The number of free trial days added before a renewal plan.
|
|
210
224
|
#
|
|
225
|
+
# @param unlimited_stock [Boolean, nil] Limits/doesn't limit the number of units available for purchase.
|
|
226
|
+
#
|
|
211
227
|
# @param visibility [Symbol, WhopSDK::Models::Visibility, nil] Visibility of a resource
|
|
212
228
|
|
|
213
229
|
class CustomField < WhopSDK::Internal::Type::BaseModel
|
|
@@ -108,10 +108,11 @@ module WhopSDK
|
|
|
108
108
|
required :id, String
|
|
109
109
|
|
|
110
110
|
# @!attribute correct_answer
|
|
111
|
-
# The correct answer for the question. Used for short answer questions
|
|
111
|
+
# The correct answer for the question. Used for short answer questions. Only
|
|
112
|
+
# visible to admins (users with courses:update permission)
|
|
112
113
|
#
|
|
113
|
-
# @return [String]
|
|
114
|
-
required :correct_answer, String
|
|
114
|
+
# @return [String, nil]
|
|
115
|
+
required :correct_answer, String, nil?: true
|
|
115
116
|
|
|
116
117
|
# @!attribute created_at
|
|
117
118
|
# When the question was created
|
|
@@ -150,11 +151,14 @@ module WhopSDK
|
|
|
150
151
|
required :question_type, enum: -> { WhopSDK::AssessmentQuestionTypes }
|
|
151
152
|
|
|
152
153
|
# @!method initialize(id:, correct_answer:, created_at:, image:, options:, order:, question_text:, question_type:)
|
|
154
|
+
# Some parameter documentations has been truncated, see
|
|
155
|
+
# {WhopSDK::Models::Lesson::AssessmentQuestion} for more details.
|
|
156
|
+
#
|
|
153
157
|
# An assessment question in a course quiz or knowledge check
|
|
154
158
|
#
|
|
155
159
|
# @param id [String] The ID of the assessment question
|
|
156
160
|
#
|
|
157
|
-
# @param correct_answer [String] The correct answer for the question. Used for short answer questions
|
|
161
|
+
# @param correct_answer [String, nil] The correct answer for the question. Used for short answer questions. Only visib
|
|
158
162
|
#
|
|
159
163
|
# @param created_at [Time] When the question was created
|
|
160
164
|
#
|
|
@@ -218,10 +222,11 @@ module WhopSDK
|
|
|
218
222
|
required :id, String
|
|
219
223
|
|
|
220
224
|
# @!attribute is_correct
|
|
221
|
-
# Whether this option is a correct answer
|
|
225
|
+
# Whether this option is a correct answer. Only visible to admins (users with
|
|
226
|
+
# courses:update permission)
|
|
222
227
|
#
|
|
223
|
-
# @return [Boolean]
|
|
224
|
-
required :is_correct, WhopSDK::Internal::Type::Boolean
|
|
228
|
+
# @return [Boolean, nil]
|
|
229
|
+
required :is_correct, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
225
230
|
|
|
226
231
|
# @!attribute option_text
|
|
227
232
|
# The text of the answer option
|
|
@@ -236,11 +241,14 @@ module WhopSDK
|
|
|
236
241
|
required :order, Integer
|
|
237
242
|
|
|
238
243
|
# @!method initialize(id:, is_correct:, option_text:, order:)
|
|
244
|
+
# Some parameter documentations has been truncated, see
|
|
245
|
+
# {WhopSDK::Models::Lesson::AssessmentQuestion::Option} for more details.
|
|
246
|
+
#
|
|
239
247
|
# An answer option for a multiple choice or multiple select assessment question
|
|
240
248
|
#
|
|
241
249
|
# @param id [String] The ID of the assessment question option
|
|
242
250
|
#
|
|
243
|
-
# @param is_correct [Boolean] Whether this option is a correct answer
|
|
251
|
+
# @param is_correct [Boolean, nil] Whether this option is a correct answer. Only visible to admins (users with cour
|
|
244
252
|
#
|
|
245
253
|
# @param option_text [String] The text of the answer option
|
|
246
254
|
#
|
|
@@ -22,9 +22,9 @@ module WhopSDK
|
|
|
22
22
|
# @!attribute attachments
|
|
23
23
|
# The attachments for this message, such as videos or images.
|
|
24
24
|
#
|
|
25
|
-
# @return [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil]
|
|
25
|
+
# @return [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil]
|
|
26
26
|
optional :attachments,
|
|
27
|
-
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::MessageCreateParams::Attachment] },
|
|
27
|
+
-> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageCreateParams::Attachment] },
|
|
28
28
|
nil?: true
|
|
29
29
|
|
|
30
30
|
# @!attribute poll
|
|
@@ -38,38 +38,62 @@ module WhopSDK
|
|
|
38
38
|
#
|
|
39
39
|
# @param content [String] The content of the message in Markdown format.
|
|
40
40
|
#
|
|
41
|
-
# @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil] The attachments for this message, such as videos or images.
|
|
41
|
+
# @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message, such as videos or images.
|
|
42
42
|
#
|
|
43
43
|
# @param poll [WhopSDK::Models::MessageCreateParams::Poll, nil] The poll for this message
|
|
44
44
|
#
|
|
45
45
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
51
|
-
# doing.
|
|
52
|
-
#
|
|
53
|
-
# @return [String, nil]
|
|
54
|
-
optional :id, String, nil?: true
|
|
47
|
+
# Input for an attachment
|
|
48
|
+
module Attachment
|
|
49
|
+
extend WhopSDK::Internal::Type::Union
|
|
55
50
|
|
|
56
|
-
#
|
|
57
|
-
|
|
58
|
-
# the direct upload that was created when uploading the file to S3 via the
|
|
59
|
-
# mediaDirectUpload mutation.
|
|
60
|
-
#
|
|
61
|
-
# @return [String, nil]
|
|
62
|
-
optional :direct_upload_id, String, nil?: true
|
|
51
|
+
# Input for an attachment
|
|
52
|
+
variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID }
|
|
63
53
|
|
|
64
|
-
#
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
54
|
+
# Input for an attachment
|
|
55
|
+
variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID }
|
|
56
|
+
|
|
57
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
58
|
+
# @!attribute direct_upload_id
|
|
59
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
60
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
61
|
+
# mediaDirectUpload mutation.
|
|
62
|
+
#
|
|
63
|
+
# @return [String]
|
|
64
|
+
required :direct_upload_id, String
|
|
65
|
+
|
|
66
|
+
# @!method initialize(direct_upload_id:)
|
|
67
|
+
# Some parameter documentations has been truncated, see
|
|
68
|
+
# {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID}
|
|
69
|
+
# for more details.
|
|
70
|
+
#
|
|
71
|
+
# Input for an attachment
|
|
72
|
+
#
|
|
73
|
+
# @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
77
|
+
# @!attribute id
|
|
78
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
79
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
80
|
+
# doing.
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :id, String
|
|
84
|
+
|
|
85
|
+
# @!method initialize(id:)
|
|
86
|
+
# Some parameter documentations has been truncated, see
|
|
87
|
+
# {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID} for
|
|
88
|
+
# more details.
|
|
89
|
+
#
|
|
90
|
+
# Input for an attachment
|
|
91
|
+
#
|
|
92
|
+
# @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @!method self.variants
|
|
96
|
+
# @return [Array(WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID)]
|
|
73
97
|
end
|
|
74
98
|
|
|
75
99
|
class Poll < WhopSDK::Internal::Type::BaseModel
|
|
@@ -10,9 +10,9 @@ module WhopSDK
|
|
|
10
10
|
# @!attribute attachments
|
|
11
11
|
# The attachments for this message
|
|
12
12
|
#
|
|
13
|
-
# @return [Array<WhopSDK::Models::MessageUpdateParams::Attachment>, nil]
|
|
13
|
+
# @return [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil]
|
|
14
14
|
optional :attachments,
|
|
15
|
-
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::MessageUpdateParams::Attachment] },
|
|
15
|
+
-> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageUpdateParams::Attachment] },
|
|
16
16
|
nil?: true
|
|
17
17
|
|
|
18
18
|
# @!attribute content
|
|
@@ -28,7 +28,7 @@ module WhopSDK
|
|
|
28
28
|
optional :is_pinned, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
29
29
|
|
|
30
30
|
# @!method initialize(attachments: nil, content: nil, is_pinned: nil, request_options: {})
|
|
31
|
-
# @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment>, nil] The attachments for this message
|
|
31
|
+
# @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message
|
|
32
32
|
#
|
|
33
33
|
# @param content [String, nil] The content of the message in Markdown format
|
|
34
34
|
#
|
|
@@ -36,32 +36,56 @@ module WhopSDK
|
|
|
36
36
|
#
|
|
37
37
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
43
|
-
# doing.
|
|
44
|
-
#
|
|
45
|
-
# @return [String, nil]
|
|
46
|
-
optional :id, String, nil?: true
|
|
39
|
+
# Input for an attachment
|
|
40
|
+
module Attachment
|
|
41
|
+
extend WhopSDK::Internal::Type::Union
|
|
47
42
|
|
|
48
|
-
#
|
|
49
|
-
|
|
50
|
-
# the direct upload that was created when uploading the file to S3 via the
|
|
51
|
-
# mediaDirectUpload mutation.
|
|
52
|
-
#
|
|
53
|
-
# @return [String, nil]
|
|
54
|
-
optional :direct_upload_id, String, nil?: true
|
|
43
|
+
# Input for an attachment
|
|
44
|
+
variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID }
|
|
55
45
|
|
|
56
|
-
#
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
# Input for an attachment
|
|
47
|
+
variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID }
|
|
48
|
+
|
|
49
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
50
|
+
# @!attribute direct_upload_id
|
|
51
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
52
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
53
|
+
# mediaDirectUpload mutation.
|
|
54
|
+
#
|
|
55
|
+
# @return [String]
|
|
56
|
+
required :direct_upload_id, String
|
|
57
|
+
|
|
58
|
+
# @!method initialize(direct_upload_id:)
|
|
59
|
+
# Some parameter documentations has been truncated, see
|
|
60
|
+
# {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID}
|
|
61
|
+
# for more details.
|
|
62
|
+
#
|
|
63
|
+
# Input for an attachment
|
|
64
|
+
#
|
|
65
|
+
# @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
69
|
+
# @!attribute id
|
|
70
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
71
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
72
|
+
# doing.
|
|
73
|
+
#
|
|
74
|
+
# @return [String]
|
|
75
|
+
required :id, String
|
|
76
|
+
|
|
77
|
+
# @!method initialize(id:)
|
|
78
|
+
# Some parameter documentations has been truncated, see
|
|
79
|
+
# {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID} for
|
|
80
|
+
# more details.
|
|
81
|
+
#
|
|
82
|
+
# Input for an attachment
|
|
83
|
+
#
|
|
84
|
+
# @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# @!method self.variants
|
|
88
|
+
# @return [Array(WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID)]
|
|
65
89
|
end
|
|
66
90
|
end
|
|
67
91
|
end
|
|
@@ -93,6 +93,13 @@ module WhopSDK
|
|
|
93
93
|
# @return [WhopSDK::Models::Payment::Membership, nil]
|
|
94
94
|
required :membership, -> { WhopSDK::Payment::Membership }, nil?: true
|
|
95
95
|
|
|
96
|
+
# @!attribute metadata
|
|
97
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
98
|
+
# configuration for which this payment was made
|
|
99
|
+
#
|
|
100
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
101
|
+
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
102
|
+
|
|
96
103
|
# @!attribute paid_at
|
|
97
104
|
# The datetime the payment was paid
|
|
98
105
|
#
|
|
@@ -193,7 +200,7 @@ module WhopSDK
|
|
|
193
200
|
# @return [Boolean]
|
|
194
201
|
required :voidable, WhopSDK::Internal::Type::Boolean
|
|
195
202
|
|
|
196
|
-
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
203
|
+
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
197
204
|
# Some parameter documentations has been truncated, see {WhopSDK::Models::Payment}
|
|
198
205
|
# for more details.
|
|
199
206
|
#
|
|
@@ -229,6 +236,8 @@ module WhopSDK
|
|
|
229
236
|
#
|
|
230
237
|
# @param membership [WhopSDK::Models::Payment::Membership, nil] The membership attached to this payment.
|
|
231
238
|
#
|
|
239
|
+
# @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied the checkout con
|
|
240
|
+
#
|
|
232
241
|
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
233
242
|
#
|
|
234
243
|
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
|
|
@@ -94,6 +94,13 @@ module WhopSDK
|
|
|
94
94
|
# @return [WhopSDK::Models::PaymentListResponse::Membership, nil]
|
|
95
95
|
required :membership, -> { WhopSDK::Models::PaymentListResponse::Membership }, nil?: true
|
|
96
96
|
|
|
97
|
+
# @!attribute metadata
|
|
98
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
99
|
+
# configuration for which this payment was made
|
|
100
|
+
#
|
|
101
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
102
|
+
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
103
|
+
|
|
97
104
|
# @!attribute paid_at
|
|
98
105
|
# The datetime the payment was paid
|
|
99
106
|
#
|
|
@@ -194,7 +201,7 @@ module WhopSDK
|
|
|
194
201
|
# @return [Boolean]
|
|
195
202
|
required :voidable, WhopSDK::Internal::Type::Boolean
|
|
196
203
|
|
|
197
|
-
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
204
|
+
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
198
205
|
# Some parameter documentations has been truncated, see
|
|
199
206
|
# {WhopSDK::Models::PaymentListResponse} for more details.
|
|
200
207
|
#
|
|
@@ -230,6 +237,8 @@ module WhopSDK
|
|
|
230
237
|
#
|
|
231
238
|
# @param membership [WhopSDK::Models::PaymentListResponse::Membership, nil] The membership attached to this payment.
|
|
232
239
|
#
|
|
240
|
+
# @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied the checkout con
|
|
241
|
+
#
|
|
233
242
|
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
234
243
|
#
|
|
235
244
|
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
|
|
@@ -85,10 +85,11 @@ module WhopSDK
|
|
|
85
85
|
ID_BANK_TRANSFER = :id_bank_transfer
|
|
86
86
|
DEMO_PAY = :demo_pay
|
|
87
87
|
SHOP_PAY = :shop_pay
|
|
88
|
-
APPLE = :apple
|
|
89
88
|
SEZZLE = :sezzle
|
|
90
89
|
COINBASE = :coinbase
|
|
91
90
|
SPLITIT = :splitit
|
|
91
|
+
PLATFORM_BALANCE = :platform_balance
|
|
92
|
+
APPLE = :apple
|
|
92
93
|
UNKNOWN = :unknown
|
|
93
94
|
|
|
94
95
|
# @!method self.values
|
data/lib/whop_sdk/models/plan.rb
CHANGED
|
@@ -81,6 +81,12 @@ module WhopSDK
|
|
|
81
81
|
# @return [Integer, nil]
|
|
82
82
|
required :member_count, Integer, nil?: true
|
|
83
83
|
|
|
84
|
+
# @!attribute payment_method_configuration
|
|
85
|
+
# The explicit payment method configuration for the plan, if any.
|
|
86
|
+
#
|
|
87
|
+
# @return [WhopSDK::Models::Plan::PaymentMethodConfiguration, nil]
|
|
88
|
+
required :payment_method_configuration, -> { WhopSDK::Plan::PaymentMethodConfiguration }, nil?: true
|
|
89
|
+
|
|
84
90
|
# @!attribute plan_type
|
|
85
91
|
# Indicates if the plan is a one time payment or recurring.
|
|
86
92
|
#
|
|
@@ -153,7 +159,7 @@ module WhopSDK
|
|
|
153
159
|
# @return [Symbol, WhopSDK::Models::Visibility]
|
|
154
160
|
required :visibility, enum: -> { WhopSDK::Visibility }
|
|
155
161
|
|
|
156
|
-
# @!method initialize(id:, billing_period:, collect_tax:, company:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, stock:, tax_type:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
|
|
162
|
+
# @!method initialize(id:, billing_period:, collect_tax:, company:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, stock:, tax_type:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
|
|
157
163
|
# An object representing a (sanitized) plan of an access pass.
|
|
158
164
|
#
|
|
159
165
|
# @param id [String] The internal ID of the plan.
|
|
@@ -182,6 +188,8 @@ module WhopSDK
|
|
|
182
188
|
#
|
|
183
189
|
# @param member_count [Integer, nil] The number of members for the plan.
|
|
184
190
|
#
|
|
191
|
+
# @param payment_method_configuration [WhopSDK::Models::Plan::PaymentMethodConfiguration, nil] The explicit payment method configuration for the plan, if any.
|
|
192
|
+
#
|
|
185
193
|
# @param plan_type [Symbol, WhopSDK::Models::PlanType] Indicates if the plan is a one time payment or recurring.
|
|
186
194
|
#
|
|
187
195
|
# @param product [WhopSDK::Models::Plan::Product, nil] The access pass for the plan.
|
|
@@ -295,6 +303,45 @@ module WhopSDK
|
|
|
295
303
|
# @param id [String] The ID of the invoice.
|
|
296
304
|
end
|
|
297
305
|
|
|
306
|
+
# @see WhopSDK::Models::Plan#payment_method_configuration
|
|
307
|
+
class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
308
|
+
# @!attribute disabled
|
|
309
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
310
|
+
# applies if the include_platform_defaults is true.
|
|
311
|
+
#
|
|
312
|
+
# @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
|
|
313
|
+
required :disabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
|
|
314
|
+
|
|
315
|
+
# @!attribute enabled
|
|
316
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
317
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
318
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
319
|
+
# defaults with additional methods.
|
|
320
|
+
#
|
|
321
|
+
# @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
|
|
322
|
+
required :enabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
|
|
323
|
+
|
|
324
|
+
# @!attribute include_platform_defaults
|
|
325
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
326
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
327
|
+
# the documentation at docs.whop.com/payments.
|
|
328
|
+
#
|
|
329
|
+
# @return [Boolean]
|
|
330
|
+
required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
|
|
331
|
+
|
|
332
|
+
# @!method initialize(disabled:, enabled:, include_platform_defaults:)
|
|
333
|
+
# Some parameter documentations has been truncated, see
|
|
334
|
+
# {WhopSDK::Models::Plan::PaymentMethodConfiguration} for more details.
|
|
335
|
+
#
|
|
336
|
+
# The explicit payment method configuration for the plan, if any.
|
|
337
|
+
#
|
|
338
|
+
# @param disabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly disabled. Only applie
|
|
339
|
+
#
|
|
340
|
+
# @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
|
|
341
|
+
#
|
|
342
|
+
# @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
|
|
343
|
+
end
|
|
344
|
+
|
|
298
345
|
# @see WhopSDK::Models::Plan#product
|
|
299
346
|
class Product < WhopSDK::Internal::Type::BaseModel
|
|
300
347
|
# @!attribute id
|