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
|
@@ -7,6 +7,14 @@ module WhopSDK
|
|
|
7
7
|
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include WhopSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute assessment_completion_requirement
|
|
11
|
+
# Completion requirements for quiz/knowledge check lessons
|
|
12
|
+
#
|
|
13
|
+
# @return [WhopSDK::Models::CourseLessonUpdateParams::AssessmentCompletionRequirement, nil]
|
|
14
|
+
optional :assessment_completion_requirement,
|
|
15
|
+
-> { WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement },
|
|
16
|
+
nil?: true
|
|
17
|
+
|
|
10
18
|
# @!attribute assessment_questions
|
|
11
19
|
# Assessment questions for quiz/knowledge check lessons. Replaces all existing
|
|
12
20
|
# questions.
|
|
@@ -20,9 +28,9 @@ module WhopSDK
|
|
|
20
28
|
# General attachments for the lesson (PDFs, files, etc). Replaces all existing
|
|
21
29
|
# attachments.
|
|
22
30
|
#
|
|
23
|
-
# @return [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment>, nil]
|
|
31
|
+
# @return [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID>, nil]
|
|
24
32
|
optional :attachments,
|
|
25
|
-
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseLessonUpdateParams::Attachment] },
|
|
33
|
+
-> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::CourseLessonUpdateParams::Attachment] },
|
|
26
34
|
nil?: true
|
|
27
35
|
|
|
28
36
|
# @!attribute content
|
|
@@ -46,8 +54,14 @@ module WhopSDK
|
|
|
46
54
|
# @!attribute main_pdf
|
|
47
55
|
# The main PDF file for this lesson
|
|
48
56
|
#
|
|
49
|
-
# @return [WhopSDK::Models::CourseLessonUpdateParams::MainPdf, nil]
|
|
50
|
-
optional :main_pdf, -> { WhopSDK::CourseLessonUpdateParams::MainPdf }, nil?: true
|
|
57
|
+
# @return [WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID, nil]
|
|
58
|
+
optional :main_pdf, union: -> { WhopSDK::CourseLessonUpdateParams::MainPdf }, nil?: true
|
|
59
|
+
|
|
60
|
+
# @!attribute max_attempts
|
|
61
|
+
# Maximum number of attempts allowed for assessments
|
|
62
|
+
#
|
|
63
|
+
# @return [Integer, nil]
|
|
64
|
+
optional :max_attempts, Integer, nil?: true
|
|
51
65
|
|
|
52
66
|
# @!attribute mux_asset_id
|
|
53
67
|
# The ID of the Mux asset to attach to this lesson for video lessons
|
|
@@ -68,13 +82,15 @@ module WhopSDK
|
|
|
68
82
|
# @return [Symbol, WhopSDK::Models::LessonVisibilities, nil]
|
|
69
83
|
optional :visibility, enum: -> { WhopSDK::LessonVisibilities }, nil?: true
|
|
70
84
|
|
|
71
|
-
# @!method initialize(assessment_questions: nil, attachments: nil, content: nil, days_from_course_start_until_unlock: nil, lesson_type: nil, main_pdf: nil, mux_asset_id: nil, title: nil, visibility: nil, request_options: {})
|
|
85
|
+
# @!method initialize(assessment_completion_requirement: nil, assessment_questions: nil, attachments: nil, content: nil, days_from_course_start_until_unlock: nil, lesson_type: nil, main_pdf: nil, max_attempts: nil, mux_asset_id: nil, title: nil, visibility: nil, request_options: {})
|
|
72
86
|
# Some parameter documentations has been truncated, see
|
|
73
87
|
# {WhopSDK::Models::CourseLessonUpdateParams} for more details.
|
|
74
88
|
#
|
|
89
|
+
# @param assessment_completion_requirement [WhopSDK::Models::CourseLessonUpdateParams::AssessmentCompletionRequirement, nil] Completion requirements for quiz/knowledge check lessons
|
|
90
|
+
#
|
|
75
91
|
# @param assessment_questions [Array<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion>, nil] Assessment questions for quiz/knowledge check lessons. Replaces all existing que
|
|
76
92
|
#
|
|
77
|
-
# @param attachments [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment>, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att
|
|
93
|
+
# @param attachments [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID>, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att
|
|
78
94
|
#
|
|
79
95
|
# @param content [String, nil] The content of the lesson
|
|
80
96
|
#
|
|
@@ -82,7 +98,9 @@ module WhopSDK
|
|
|
82
98
|
#
|
|
83
99
|
# @param lesson_type [Symbol, WhopSDK::Models::LessonTypes, nil] The available types for a lesson
|
|
84
100
|
#
|
|
85
|
-
# @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf, nil] The main PDF file for this lesson
|
|
101
|
+
# @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID, nil] The main PDF file for this lesson
|
|
102
|
+
#
|
|
103
|
+
# @param max_attempts [Integer, nil] Maximum number of attempts allowed for assessments
|
|
86
104
|
#
|
|
87
105
|
# @param mux_asset_id [String, nil] The ID of the Mux asset to attach to this lesson for video lessons
|
|
88
106
|
#
|
|
@@ -92,6 +110,33 @@ module WhopSDK
|
|
|
92
110
|
#
|
|
93
111
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
94
112
|
|
|
113
|
+
class AssessmentCompletionRequirement < WhopSDK::Internal::Type::BaseModel
|
|
114
|
+
# @!attribute minimum_grade_percent
|
|
115
|
+
# The minimum grade percentage required to pass (0-100). Cannot be set together
|
|
116
|
+
# with minimum_questions_correct.
|
|
117
|
+
#
|
|
118
|
+
# @return [Float, nil]
|
|
119
|
+
optional :minimum_grade_percent, Float, nil?: true
|
|
120
|
+
|
|
121
|
+
# @!attribute minimum_questions_correct
|
|
122
|
+
# The minimum number of questions that must be answered correctly. Cannot be set
|
|
123
|
+
# together with minimum_grade_percent.
|
|
124
|
+
#
|
|
125
|
+
# @return [Integer, nil]
|
|
126
|
+
optional :minimum_questions_correct, Integer, nil?: true
|
|
127
|
+
|
|
128
|
+
# @!method initialize(minimum_grade_percent: nil, minimum_questions_correct: nil)
|
|
129
|
+
# Some parameter documentations has been truncated, see
|
|
130
|
+
# {WhopSDK::Models::CourseLessonUpdateParams::AssessmentCompletionRequirement} for
|
|
131
|
+
# more details.
|
|
132
|
+
#
|
|
133
|
+
# Completion requirements for quiz/knowledge check lessons
|
|
134
|
+
#
|
|
135
|
+
# @param minimum_grade_percent [Float, nil] The minimum grade percentage required to pass (0-100). Cannot be set together wi
|
|
136
|
+
#
|
|
137
|
+
# @param minimum_questions_correct [Integer, nil] The minimum number of questions that must be answered correctly. Cannot be set t
|
|
138
|
+
end
|
|
139
|
+
|
|
95
140
|
class AssessmentQuestion < WhopSDK::Internal::Type::BaseModel
|
|
96
141
|
# @!attribute correct_answer
|
|
97
142
|
# The correct answer for the question. Used for short answer questions
|
|
@@ -121,8 +166,12 @@ module WhopSDK
|
|
|
121
166
|
# @!attribute image
|
|
122
167
|
# Optional image attachment for the question
|
|
123
168
|
#
|
|
124
|
-
# @return [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image, nil]
|
|
125
|
-
optional :image,
|
|
169
|
+
# @return [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID, nil]
|
|
170
|
+
optional :image,
|
|
171
|
+
union: -> {
|
|
172
|
+
WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image
|
|
173
|
+
},
|
|
174
|
+
nil?: true
|
|
126
175
|
|
|
127
176
|
# @!attribute options
|
|
128
177
|
# The answer options for multiple choice/select questions
|
|
@@ -149,38 +198,62 @@ module WhopSDK
|
|
|
149
198
|
#
|
|
150
199
|
# @param id [String, nil] The ID of an existing question. If provided, the question will be updated. If no
|
|
151
200
|
#
|
|
152
|
-
# @param image [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image, nil] Optional image attachment for the question
|
|
201
|
+
# @param image [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID, nil] Optional image attachment for the question
|
|
153
202
|
#
|
|
154
203
|
# @param options [Array<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Option>, nil] The answer options for multiple choice/select questions
|
|
155
204
|
|
|
205
|
+
# Optional image attachment for the question
|
|
206
|
+
#
|
|
156
207
|
# @see WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion#image
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
# The ID of an existing attachment object. Use this when updating a resource and
|
|
160
|
-
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
161
|
-
# doing.
|
|
162
|
-
#
|
|
163
|
-
# @return [String, nil]
|
|
164
|
-
optional :id, String, nil?: true
|
|
208
|
+
module Image
|
|
209
|
+
extend WhopSDK::Internal::Type::Union
|
|
165
210
|
|
|
166
|
-
#
|
|
167
|
-
|
|
168
|
-
# the direct upload that was created when uploading the file to S3 via the
|
|
169
|
-
# mediaDirectUpload mutation.
|
|
170
|
-
#
|
|
171
|
-
# @return [String, nil]
|
|
172
|
-
optional :direct_upload_id, String, nil?: true
|
|
211
|
+
# Input for an attachment
|
|
212
|
+
variant -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID }
|
|
173
213
|
|
|
174
|
-
#
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
214
|
+
# Input for an attachment
|
|
215
|
+
variant -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID }
|
|
216
|
+
|
|
217
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
218
|
+
# @!attribute direct_upload_id
|
|
219
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
220
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
221
|
+
# mediaDirectUpload mutation.
|
|
222
|
+
#
|
|
223
|
+
# @return [String]
|
|
224
|
+
required :direct_upload_id, String
|
|
225
|
+
|
|
226
|
+
# @!method initialize(direct_upload_id:)
|
|
227
|
+
# Some parameter documentations has been truncated, see
|
|
228
|
+
# {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID}
|
|
229
|
+
# for more details.
|
|
230
|
+
#
|
|
231
|
+
# Input for an attachment
|
|
232
|
+
#
|
|
233
|
+
# @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
237
|
+
# @!attribute id
|
|
238
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
239
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
240
|
+
# doing.
|
|
241
|
+
#
|
|
242
|
+
# @return [String]
|
|
243
|
+
required :id, String
|
|
244
|
+
|
|
245
|
+
# @!method initialize(id:)
|
|
246
|
+
# Some parameter documentations has been truncated, see
|
|
247
|
+
# {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID}
|
|
248
|
+
# for more details.
|
|
249
|
+
#
|
|
250
|
+
# Input for an attachment
|
|
251
|
+
#
|
|
252
|
+
# @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# @!method self.variants
|
|
256
|
+
# @return [Array(WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID)]
|
|
184
257
|
end
|
|
185
258
|
|
|
186
259
|
class Option < WhopSDK::Internal::Type::BaseModel
|
|
@@ -218,60 +291,108 @@ module WhopSDK
|
|
|
218
291
|
end
|
|
219
292
|
end
|
|
220
293
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
225
|
-
# doing.
|
|
226
|
-
#
|
|
227
|
-
# @return [String, nil]
|
|
228
|
-
optional :id, String, nil?: true
|
|
294
|
+
# Input for an attachment
|
|
295
|
+
module Attachment
|
|
296
|
+
extend WhopSDK::Internal::Type::Union
|
|
229
297
|
|
|
230
|
-
#
|
|
231
|
-
|
|
232
|
-
# the direct upload that was created when uploading the file to S3 via the
|
|
233
|
-
# mediaDirectUpload mutation.
|
|
234
|
-
#
|
|
235
|
-
# @return [String, nil]
|
|
236
|
-
optional :direct_upload_id, String, nil?: true
|
|
298
|
+
# Input for an attachment
|
|
299
|
+
variant -> { WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID }
|
|
237
300
|
|
|
238
|
-
#
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
301
|
+
# Input for an attachment
|
|
302
|
+
variant -> { WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID }
|
|
303
|
+
|
|
304
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
305
|
+
# @!attribute direct_upload_id
|
|
306
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
307
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
308
|
+
# mediaDirectUpload mutation.
|
|
309
|
+
#
|
|
310
|
+
# @return [String]
|
|
311
|
+
required :direct_upload_id, String
|
|
312
|
+
|
|
313
|
+
# @!method initialize(direct_upload_id:)
|
|
314
|
+
# Some parameter documentations has been truncated, see
|
|
315
|
+
# {WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID}
|
|
316
|
+
# for more details.
|
|
317
|
+
#
|
|
318
|
+
# Input for an attachment
|
|
319
|
+
#
|
|
320
|
+
# @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
324
|
+
# @!attribute id
|
|
325
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
326
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
327
|
+
# doing.
|
|
328
|
+
#
|
|
329
|
+
# @return [String]
|
|
330
|
+
required :id, String
|
|
331
|
+
|
|
332
|
+
# @!method initialize(id:)
|
|
333
|
+
# Some parameter documentations has been truncated, see
|
|
334
|
+
# {WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID}
|
|
335
|
+
# for more details.
|
|
336
|
+
#
|
|
337
|
+
# Input for an attachment
|
|
338
|
+
#
|
|
339
|
+
# @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
# @!method self.variants
|
|
343
|
+
# @return [Array(WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID)]
|
|
247
344
|
end
|
|
248
345
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
253
|
-
# doing.
|
|
254
|
-
#
|
|
255
|
-
# @return [String, nil]
|
|
256
|
-
optional :id, String, nil?: true
|
|
346
|
+
# The main PDF file for this lesson
|
|
347
|
+
module MainPdf
|
|
348
|
+
extend WhopSDK::Internal::Type::Union
|
|
257
349
|
|
|
258
|
-
#
|
|
259
|
-
|
|
260
|
-
# the direct upload that was created when uploading the file to S3 via the
|
|
261
|
-
# mediaDirectUpload mutation.
|
|
262
|
-
#
|
|
263
|
-
# @return [String, nil]
|
|
264
|
-
optional :direct_upload_id, String, nil?: true
|
|
350
|
+
# Input for an attachment
|
|
351
|
+
variant -> { WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID }
|
|
265
352
|
|
|
266
|
-
#
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
353
|
+
# Input for an attachment
|
|
354
|
+
variant -> { WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID }
|
|
355
|
+
|
|
356
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
357
|
+
# @!attribute direct_upload_id
|
|
358
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
359
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
360
|
+
# mediaDirectUpload mutation.
|
|
361
|
+
#
|
|
362
|
+
# @return [String]
|
|
363
|
+
required :direct_upload_id, String
|
|
364
|
+
|
|
365
|
+
# @!method initialize(direct_upload_id:)
|
|
366
|
+
# Some parameter documentations has been truncated, see
|
|
367
|
+
# {WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID}
|
|
368
|
+
# for more details.
|
|
369
|
+
#
|
|
370
|
+
# Input for an attachment
|
|
371
|
+
#
|
|
372
|
+
# @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
376
|
+
# @!attribute id
|
|
377
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
378
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
379
|
+
# doing.
|
|
380
|
+
#
|
|
381
|
+
# @return [String]
|
|
382
|
+
required :id, String
|
|
383
|
+
|
|
384
|
+
# @!method initialize(id:)
|
|
385
|
+
# Some parameter documentations has been truncated, see
|
|
386
|
+
# {WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID} for
|
|
387
|
+
# more details.
|
|
388
|
+
#
|
|
389
|
+
# Input for an attachment
|
|
390
|
+
#
|
|
391
|
+
# @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
# @!method self.variants
|
|
395
|
+
# @return [Array(WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID)]
|
|
275
396
|
end
|
|
276
397
|
end
|
|
277
398
|
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::CourseStudents#list
|
|
6
|
+
class CourseStudentListParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute course_id
|
|
11
|
+
# The ID of the course
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :course_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute after
|
|
17
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :after, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute before
|
|
23
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :before, String, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute first
|
|
29
|
+
# Returns the first _n_ elements from the list.
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :first, Integer, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute keyword
|
|
35
|
+
# Filter students by name - returns students whose names match the keyword
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :keyword, String, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute last
|
|
41
|
+
# Returns the last _n_ elements from the list.
|
|
42
|
+
#
|
|
43
|
+
# @return [Integer, nil]
|
|
44
|
+
optional :last, Integer, nil?: true
|
|
45
|
+
|
|
46
|
+
# @!method initialize(course_id:, after: nil, before: nil, first: nil, keyword: nil, last: nil, request_options: {})
|
|
47
|
+
# @param course_id [String] The ID of the course
|
|
48
|
+
#
|
|
49
|
+
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
50
|
+
#
|
|
51
|
+
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
52
|
+
#
|
|
53
|
+
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
54
|
+
#
|
|
55
|
+
# @param keyword [String, nil] Filter students by name - returns students whose names match the keyword
|
|
56
|
+
#
|
|
57
|
+
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
58
|
+
#
|
|
59
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::CourseStudents#list
|
|
6
|
+
class CourseStudentListResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the course student. Looks like crsi_XXX
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute completed_lessons_count
|
|
14
|
+
# The number of lessons the student has completed
|
|
15
|
+
#
|
|
16
|
+
# @return [Integer]
|
|
17
|
+
required :completed_lessons_count, Integer
|
|
18
|
+
|
|
19
|
+
# @!attribute completion_rate
|
|
20
|
+
# The percentage of lessons completed (0-100)
|
|
21
|
+
#
|
|
22
|
+
# @return [Float]
|
|
23
|
+
required :completion_rate, Float
|
|
24
|
+
|
|
25
|
+
# @!attribute first_interaction_at
|
|
26
|
+
# When the student first interacted with the course
|
|
27
|
+
#
|
|
28
|
+
# @return [Time]
|
|
29
|
+
required :first_interaction_at, Time
|
|
30
|
+
|
|
31
|
+
# @!attribute last_interaction_at
|
|
32
|
+
# When the student last interacted with the course
|
|
33
|
+
#
|
|
34
|
+
# @return [Time]
|
|
35
|
+
required :last_interaction_at, Time
|
|
36
|
+
|
|
37
|
+
# @!attribute total_lessons_count
|
|
38
|
+
# The total number of lessons the student has access to
|
|
39
|
+
#
|
|
40
|
+
# @return [Integer]
|
|
41
|
+
required :total_lessons_count, Integer
|
|
42
|
+
|
|
43
|
+
# @!attribute user
|
|
44
|
+
# The user who is enrolled in the course
|
|
45
|
+
#
|
|
46
|
+
# @return [WhopSDK::Models::CourseStudentListResponse::User]
|
|
47
|
+
required :user, -> { WhopSDK::Models::CourseStudentListResponse::User }
|
|
48
|
+
|
|
49
|
+
# @!method initialize(id:, completed_lessons_count:, completion_rate:, first_interaction_at:, last_interaction_at:, total_lessons_count:, user:)
|
|
50
|
+
# A course student (enrollment of a student in a course)
|
|
51
|
+
#
|
|
52
|
+
# @param id [String] The ID of the course student. Looks like crsi_XXX
|
|
53
|
+
#
|
|
54
|
+
# @param completed_lessons_count [Integer] The number of lessons the student has completed
|
|
55
|
+
#
|
|
56
|
+
# @param completion_rate [Float] The percentage of lessons completed (0-100)
|
|
57
|
+
#
|
|
58
|
+
# @param first_interaction_at [Time] When the student first interacted with the course
|
|
59
|
+
#
|
|
60
|
+
# @param last_interaction_at [Time] When the student last interacted with the course
|
|
61
|
+
#
|
|
62
|
+
# @param total_lessons_count [Integer] The total number of lessons the student has access to
|
|
63
|
+
#
|
|
64
|
+
# @param user [WhopSDK::Models::CourseStudentListResponse::User] The user who is enrolled in the course
|
|
65
|
+
|
|
66
|
+
# @see WhopSDK::Models::CourseStudentListResponse#user
|
|
67
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
68
|
+
# @!attribute id
|
|
69
|
+
# The internal ID of the user.
|
|
70
|
+
#
|
|
71
|
+
# @return [String]
|
|
72
|
+
required :id, String
|
|
73
|
+
|
|
74
|
+
# @!attribute name
|
|
75
|
+
# The name of the user from their Whop account.
|
|
76
|
+
#
|
|
77
|
+
# @return [String, nil]
|
|
78
|
+
required :name, String, nil?: true
|
|
79
|
+
|
|
80
|
+
# @!attribute username
|
|
81
|
+
# The username of the user from their Whop account.
|
|
82
|
+
#
|
|
83
|
+
# @return [String]
|
|
84
|
+
required :username, String
|
|
85
|
+
|
|
86
|
+
# @!method initialize(id:, name:, username:)
|
|
87
|
+
# The user who is enrolled in the course
|
|
88
|
+
#
|
|
89
|
+
# @param id [String] The internal ID of the user.
|
|
90
|
+
#
|
|
91
|
+
# @param name [String, nil] The name of the user from their Whop account.
|
|
92
|
+
#
|
|
93
|
+
# @param username [String] The username of the user from their Whop account.
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::CourseStudents#retrieve
|
|
6
|
+
class CourseStudentRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|