Class: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/course_lesson_update_params.rb

Defined Under Namespace

Classes: Image, Option

Instance Attribute Summary collapse

Instance Method Summary collapse

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:) ⇒ Object

Optional image attachment for the question

Parameters:

  • id (String)

    The ID of an existing file object.



# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 218

Instance Attribute Details

#correct_answerString

The correct answer for the question. Used for short answer questions

Returns:

  • (String)


181
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 181

required :correct_answer, String

#idString?

The ID of an existing question. If provided, the question will be updated. If not provided, a new question will be created.

Returns:

  • (String, nil)


200
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 200

optional :id, String, nil?: true

#imageWhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image?

Optional image attachment for the question



206
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 206

optional :image, -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image }, nil?: true

#optionsArray<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Option>?

The answer options for multiple choice/select questions



212
213
214
215
216
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 212

optional :options,
-> {
  WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option]
},
nil?: true

#question_textString

The text of the question

Returns:

  • (String)


187
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 187

required :question_text, String

#question_typeSymbol, WhopSDK::Models::AssessmentQuestionTypes

The type of the question



193
# File 'lib/whop_sdk/models/course_lesson_update_params.rb', line 193

required :question_type, enum: -> { WhopSDK::AssessmentQuestionTypes }