Class: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion
- Defined in:
- lib/whop_sdk/models/course_lesson_update_params.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#correct_answer ⇒ String
The correct answer for the question.
-
#id ⇒ String?
The ID of an existing question.
-
#image ⇒ WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image?
Optional image attachment for the question.
-
#options ⇒ Array<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Option>?
The answer options for multiple choice/select questions.
-
#question_text ⇒ String
The text of the question.
-
#question_type ⇒ Symbol, WhopSDK::Models::AssessmentQuestionTypes
The type of the question.
Instance Method Summary collapse
-
#initialize(id: nil, direct_upload_id: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Image for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id: nil, direct_upload_id: nil) ⇒ Object
Some parameter documentations has been truncated, see Image for more details.
Optional image attachment for the question
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 95 class AssessmentQuestion < WhopSDK::Internal::Type::BaseModel # @!attribute correct_answer # The correct answer for the question. Used for short answer questions # # @return [String] required :correct_answer, String # @!attribute question_text # The text of the question # # @return [String] required :question_text, String # @!attribute question_type # The type of the question # # @return [Symbol, WhopSDK::Models::AssessmentQuestionTypes] required :question_type, enum: -> { WhopSDK::AssessmentQuestionTypes } # @!attribute id # The ID of an existing question. If provided, the question will be updated. If # not provided, a new question will be created. # # @return [String, nil] optional :id, String, nil?: true # @!attribute image # Optional image attachment for the question # # @return [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image, nil] optional :image, -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image }, nil?: true # @!attribute options # The answer options for multiple choice/select questions # # @return [Array<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Option>, nil] optional :options, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option] }, nil?: true # @!method initialize(correct_answer:, question_text:, question_type:, id: nil, image: nil, options: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion} for more # details. # # Input for creating or updating an assessment question # # @param correct_answer [String] The correct answer for the question. Used for short answer questions # # @param question_text [String] The text of the question # # @param question_type [Symbol, WhopSDK::Models::AssessmentQuestionTypes] The type of the question # # @param id [String, nil] The ID of an existing question. If provided, the question will be updated. If no # # @param image [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image, nil] Optional image attachment for the question # # @param options [Array<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Option>, nil] The answer options for multiple choice/select questions # @see WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion#image class Image < WhopSDK::Internal::Type::BaseModel # @!attribute id # The ID of an existing attachment object. Use this when updating a resource and # keeping a subset of the attachments. Don't use this unless you know what you're # doing. # # @return [String, nil] optional :id, String, nil?: true # @!attribute direct_upload_id # This ID should be used the first time you upload an attachment. It is the ID of # the direct upload that was created when uploading the file to S3 via the # mediaDirectUpload mutation. # # @return [String, nil] optional :direct_upload_id, String, nil?: true # @!method initialize(id: nil, direct_upload_id: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image} for more # details. # # Optional image attachment for the question # # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k # # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of end class Option < WhopSDK::Internal::Type::BaseModel # @!attribute is_correct # Whether this option is a correct answer # # @return [Boolean] required :is_correct, WhopSDK::Internal::Type::Boolean # @!attribute option_text # The text of the answer option # # @return [String] required :option_text, String # @!attribute id # The ID of an existing option. If provided, the option will be updated. If not # provided, a new option will be created. # # @return [String, nil] optional :id, String, nil?: true # @!method initialize(is_correct:, option_text:, id: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Option} for more # details. # # Input for creating or updating an assessment question option # # @param is_correct [Boolean] Whether this option is a correct answer # # @param option_text [String] The text of the answer option # # @param id [String, nil] The ID of an existing option. If provided, the option will be updated. If not pr end end |
Instance Attribute Details
#correct_answer ⇒ String
The correct answer for the question. Used for short answer questions
100 |
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 100 required :correct_answer, String |
#id ⇒ String?
The ID of an existing question. If provided, the question will be updated. If not provided, a new question will be created.
119 |
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 119 optional :id, String, nil?: true |
#image ⇒ WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image?
Optional image attachment for the question
125 |
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 125 optional :image, -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image }, nil?: true |
#options ⇒ Array<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Option>?
The answer options for multiple choice/select questions
131 132 133 134 135 |
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 131 optional :options, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option] }, nil?: true |
#question_text ⇒ String
The text of the question
106 |
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 106 required :question_text, String |
#question_type ⇒ Symbol, WhopSDK::Models::AssessmentQuestionTypes
The type of the question
112 |
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 112 required :question_type, enum: -> { WhopSDK::AssessmentQuestionTypes } |