Class: WhopSDK::Models::CourseLessonSubmitAssessmentParams::Answer

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

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(question_id: , answer_text: nil, selected_option_ids: nil) ⇒ Object

Input for a single question’s answer in an assessment submission

Parameters:

  • question_id (String) (defaults to: )

    The ID of the question being answered

  • answer_text (String, nil) (defaults to: nil)

    The text answer provided by the user (for short answer questions)

  • selected_option_ids (Array<String>, nil) (defaults to: nil)

    The IDs of the selected options (for multiple choice/select questions)



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/whop_sdk/models/course_lesson_submit_assessment_params.rb', line 22

class Answer < WhopSDK::Internal::Type::BaseModel
  # @!attribute question_id
  #   The ID of the question being answered
  #
  #   @return [String]
  required :question_id, String

  # @!attribute answer_text
  #   The text answer provided by the user (for short answer questions)
  #
  #   @return [String, nil]
  optional :answer_text, String, nil?: true

  # @!attribute selected_option_ids
  #   The IDs of the selected options (for multiple choice/select questions)
  #
  #   @return [Array<String>, nil]
  optional :selected_option_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true

  # @!method initialize(question_id:, answer_text: nil, selected_option_ids: nil)
  #   Input for a single question's answer in an assessment submission
  #
  #   @param question_id [String] The ID of the question being answered
  #
  #   @param answer_text [String, nil] The text answer provided by the user (for short answer questions)
  #
  #   @param selected_option_ids [Array<String>, nil] The IDs of the selected options (for multiple choice/select questions)
end

Instance Attribute Details

#answer_textString?

The text answer provided by the user (for short answer questions)

Returns:

  • (String, nil)


33
# File 'lib/whop_sdk/models/course_lesson_submit_assessment_params.rb', line 33

optional :answer_text, String, nil?: true

#question_idString

The ID of the question being answered

Returns:

  • (String)


27
# File 'lib/whop_sdk/models/course_lesson_submit_assessment_params.rb', line 27

required :question_id, String

#selected_option_idsArray<String>?

The IDs of the selected options (for multiple choice/select questions)

Returns:

  • (Array<String>, nil)


39
# File 'lib/whop_sdk/models/course_lesson_submit_assessment_params.rb', line 39

optional :selected_option_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true