Class: Moonbase::Models::ChoiceFieldOption

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/choice_field_option.rb

Defined Under Namespace

Modules: Color

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:, color:, name:, type: :choice_field_option) ⇒ Object

Some parameter documentations has been truncated, see Moonbase::Models::ChoiceFieldOption for more details.

Represents a single selectable option within a choice field.

Parameters:

  • id (String)

    Unique identifier for the option.

  • color (Symbol, Moonbase::Models::ChoiceFieldOption::Color)

    The color of the option.

  • name (String)

    The human-readable text displayed for this option.

  • type (Symbol, :choice_field_option) (defaults to: :choice_field_option)

    String representing the object’s type. Always ‘choice_field_option` for this obj



# File 'lib/moonbase/models/choice_field_option.rb', line 31

Instance Attribute Details

#colorSymbol, Moonbase::Models::ChoiceFieldOption::Color

The color of the option.



16
# File 'lib/moonbase/models/choice_field_option.rb', line 16

required :color, enum: -> { Moonbase::ChoiceFieldOption::Color }

#idString

Unique identifier for the option.

Returns:

  • (String)


10
# File 'lib/moonbase/models/choice_field_option.rb', line 10

required :id, String

#nameString

The human-readable text displayed for this option.

Returns:

  • (String)


22
# File 'lib/moonbase/models/choice_field_option.rb', line 22

required :name, String

#typeSymbol, :choice_field_option

String representing the object’s type. Always ‘choice_field_option` for this object.

Returns:

  • (Symbol, :choice_field_option)


29
# File 'lib/moonbase/models/choice_field_option.rb', line 29

required :type, const: :choice_field_option