Class: GetStream::Generated::Models::PollVoteResponseData
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::PollVoteResponseData
show all
- Defined in:
- lib/getstream_ruby/generated/models/poll_vote_response_data.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
Initialize with attributes
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 44
def initialize(attributes = {})
super(attributes)
@created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) }
@id = attributes.fetch(:id) { attributes.fetch('id', nil) }
@option_id = attributes.fetch(:option_id) { attributes.fetch('option_id', nil) }
@poll_id = attributes.fetch(:poll_id) { attributes.fetch('poll_id', nil) }
@updated_at = attributes.fetch(:updated_at) { attributes.fetch('updated_at', nil) }
@answer_text = attributes.fetch(:answer_text) { attributes.fetch('answer_text', nil) }
@is_answer = attributes.fetch(:is_answer) { attributes.fetch('is_answer', nil) }
@user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
@answer_text_i18n = attributes.fetch(:answer_text_i18n) { attributes.fetch('answer_text_i18n', nil) }
@user = attributes.fetch(:user) { attributes.fetch('user', nil) }
end
|
Instance Attribute Details
#answer_text ⇒ String
29
30
31
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 29
def answer_text
@answer_text
end
|
#answer_text_i18n ⇒ Hash<String, String>
38
39
40
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 38
def answer_text_i18n
@answer_text_i18n
end
|
#created_at ⇒ DateTime
14
15
16
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 14
def created_at
@created_at
end
|
#id ⇒ String
17
18
19
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 17
def id
@id
end
|
#is_answer ⇒ Boolean
32
33
34
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 32
def is_answer
@is_answer
end
|
#option_id ⇒ String
20
21
22
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 20
def option_id
@option_id
end
|
#poll_id ⇒ String
23
24
25
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 23
def poll_id
@poll_id
end
|
#updated_at ⇒ DateTime
26
27
28
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 26
def updated_at
@updated_at
end
|
Returns User response object.
41
42
43
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 41
def user
@user
end
|
#user_id ⇒ String
35
36
37
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 35
def user_id
@user_id
end
|
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# File 'lib/getstream_ruby/generated/models/poll_vote_response_data.rb', line 59
def self.json_field_mappings
{
created_at: 'created_at',
id: 'id',
option_id: 'option_id',
poll_id: 'poll_id',
updated_at: 'updated_at',
answer_text: 'answer_text',
is_answer: 'is_answer',
user_id: 'user_id',
answer_text_i18n: 'answer_text_i18n',
user: 'user'
}
end
|