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

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

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

#initializeObject



174
# File 'sig/whop_sdk/models/course_lesson_update_params.rbs', line 174

def initialize: (

Instance Attribute Details

#idString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#is_correctBoolean

Whether this option is a correct answer

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


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

required :is_correct, WhopSDK::Internal::Type::Boolean

#option_textString

The text of the answer option

Parameters:

  • value (String)

Returns:

  • (String)


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

required :option_text, String

Instance Method Details

#to_hash{ is_correct: bool, option_text: String, id: String? }

Returns:

  • ({ is_correct: bool, option_text: String, id: String? })


180
# File 'sig/whop_sdk/models/course_lesson_update_params.rbs', line 180

def to_hash: -> { is_correct: bool, option_text: String, id: String? }