Class: Moonbase::Models::Collections::FieldUpdateParams::Field::FieldChoice::Option

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/collections/field_update_params.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(color:, name:, id: nil) ⇒ Object

A choice field option. Items with an ‘id` update existing options; items without an `id` are added as new options.

Parameters:



# File 'lib/moonbase/models/collections/field_update_params.rb', line 1523

Instance Attribute Details

#colorSymbol, Moonbase::Models::Collections::FieldUpdateParams::Field::FieldChoice::Option::Color

The color of the option.



1509
# File 'lib/moonbase/models/collections/field_update_params.rb', line 1509

required :color, enum: -> { Moonbase::Collections::FieldUpdateParams::Field::FieldChoice::Option::Color }

#idString?

The ID of an existing option to update. When absent, a new option is created.

Returns:

  • (String, nil)


1521
# File 'lib/moonbase/models/collections/field_update_params.rb', line 1521

optional :id, String

#nameString

The display name of the option.

Returns:

  • (String)


1515
# File 'lib/moonbase/models/collections/field_update_params.rb', line 1515

required :name, String