Class: WhopSDK::Models::Message::Poll::Option

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/message.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(options: ) ⇒ Object

The poll for this message

Parameters:



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/whop_sdk/models/message.rb', line 126

class Option < WhopSDK::Internal::Type::BaseModel
  # @!attribute id
  #   The ID of the poll option
  #
  #   @return [String]
  required :id, String

  # @!attribute text
  #   The text of the poll option
  #
  #   @return [String]
  required :text, String

  # @!method initialize(id:, text:)
  #   Represents a single poll option
  #
  #   @param id [String] The ID of the poll option
  #
  #   @param text [String] The text of the poll option
end

Instance Attribute Details

#idString

The ID of the poll option

Returns:

  • (String)


131
# File 'lib/whop_sdk/models/message.rb', line 131

required :id, String

#textString

The text of the poll option

Returns:

  • (String)


137
# File 'lib/whop_sdk/models/message.rb', line 137

required :text, String