Class: GetStream::Generated::Models::VoteData
- Defined in:
- lib/getstream_ruby/generated/models/vote_data.rb
Instance Attribute Summary collapse
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ VoteData
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ VoteData
Initialize with attributes
20 21 22 23 24 |
# File 'lib/getstream_ruby/generated/models/vote_data.rb', line 20 def initialize(attributes = {}) super(attributes) @answer_text = attributes[:answer_text] || attributes['answer_text'] || nil @option_id = attributes[:option_id] || attributes['option_id'] || nil end |
Instance Attribute Details
#answer_text ⇒ String
14 15 16 |
# File 'lib/getstream_ruby/generated/models/vote_data.rb', line 14 def answer_text @answer_text end |
#option_id ⇒ String
17 18 19 |
# File 'lib/getstream_ruby/generated/models/vote_data.rb', line 17 def option_id @option_id end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
27 28 29 30 31 32 |
# File 'lib/getstream_ruby/generated/models/vote_data.rb', line 27 def self.json_field_mappings { answer_text: 'answer_text', option_id: 'option_id' } end |