Class: GetStream::Generated::Models::PollResponseData
- Defined in:
- lib/getstream_ruby/generated/models/poll_response_data.rb
Instance Attribute Summary collapse
- #allow_answers ⇒ Boolean
- #allow_user_suggested_options ⇒ Boolean
- #answers_count ⇒ Integer
- #created_at ⇒ DateTime
- #created_by ⇒ UserResponse
- #created_by_id ⇒ String
- #custom ⇒ Object
- #description ⇒ String
- #enforce_unique_vote ⇒ Boolean
- #id ⇒ String
- #is_closed ⇒ Boolean
- #latest_answers ⇒ Array<PollVoteResponseData>
- #latest_votes_by_option ⇒ Hash<String, Array<PollVoteResponseData>>
- #max_votes_allowed ⇒ Integer
- #name ⇒ String
- #options ⇒ Array<PollOptionResponseData>
- #own_votes ⇒ Array<PollVoteResponseData>
- #updated_at ⇒ DateTime
- #vote_count ⇒ Integer
- #vote_counts_by_option ⇒ Hash<String, Integer>
- #voting_visibility ⇒ String
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ PollResponseData
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ PollResponseData
Initialize with attributes
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 77 def initialize(attributes = {}) super(attributes) @allow_answers = attributes[:allow_answers] || attributes['allow_answers'] @allow_user_suggested_options = attributes[:allow_user_suggested_options] || attributes['allow_user_suggested_options'] @answers_count = attributes[:answers_count] || attributes['answers_count'] @created_at = attributes[:created_at] || attributes['created_at'] @created_by_id = attributes[:created_by_id] || attributes['created_by_id'] @description = attributes[:description] || attributes['description'] @enforce_unique_vote = attributes[:enforce_unique_vote] || attributes['enforce_unique_vote'] @id = attributes[:id] || attributes['id'] @name = attributes[:name] || attributes['name'] @updated_at = attributes[:updated_at] || attributes['updated_at'] @vote_count = attributes[:vote_count] || attributes['vote_count'] @voting_visibility = attributes[:voting_visibility] || attributes['voting_visibility'] @latest_answers = attributes[:latest_answers] || attributes['latest_answers'] @options = attributes[:options] || attributes['options'] @own_votes = attributes[:own_votes] || attributes['own_votes'] @custom = attributes[:custom] || attributes['custom'] @latest_votes_by_option = attributes[:latest_votes_by_option] || attributes['latest_votes_by_option'] @vote_counts_by_option = attributes[:vote_counts_by_option] || attributes['vote_counts_by_option'] @is_closed = attributes[:is_closed] || attributes['is_closed'] || nil @max_votes_allowed = attributes[:max_votes_allowed] || attributes['max_votes_allowed'] || nil @created_by = attributes[:created_by] || attributes['created_by'] || nil end |
Instance Attribute Details
#allow_answers ⇒ Boolean
14 15 16 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 14 def allow_answers @allow_answers end |
#allow_user_suggested_options ⇒ Boolean
17 18 19 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 17 def @allow_user_suggested_options end |
#answers_count ⇒ Integer
20 21 22 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 20 def answers_count @answers_count end |
#created_at ⇒ DateTime
23 24 25 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 23 def created_at @created_at end |
#created_by ⇒ UserResponse
74 75 76 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 74 def created_by @created_by end |
#created_by_id ⇒ String
26 27 28 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 26 def created_by_id @created_by_id end |
#custom ⇒ Object
59 60 61 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 59 def custom @custom end |
#description ⇒ String
29 30 31 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 29 def description @description end |
#enforce_unique_vote ⇒ Boolean
32 33 34 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 32 def enforce_unique_vote @enforce_unique_vote end |
#id ⇒ String
35 36 37 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 35 def id @id end |
#is_closed ⇒ Boolean
68 69 70 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 68 def is_closed @is_closed end |
#latest_answers ⇒ Array<PollVoteResponseData>
50 51 52 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 50 def latest_answers @latest_answers end |
#latest_votes_by_option ⇒ Hash<String, Array<PollVoteResponseData>>
62 63 64 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 62 def latest_votes_by_option @latest_votes_by_option end |
#max_votes_allowed ⇒ Integer
71 72 73 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 71 def max_votes_allowed @max_votes_allowed end |
#name ⇒ String
38 39 40 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 38 def name @name end |
#options ⇒ Array<PollOptionResponseData>
53 54 55 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 53 def @options end |
#own_votes ⇒ Array<PollVoteResponseData>
56 57 58 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 56 def own_votes @own_votes end |
#updated_at ⇒ DateTime
41 42 43 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 41 def updated_at @updated_at end |
#vote_count ⇒ Integer
44 45 46 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 44 def vote_count @vote_count end |
#vote_counts_by_option ⇒ Hash<String, Integer>
65 66 67 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 65 def vote_counts_by_option @vote_counts_by_option end |
#voting_visibility ⇒ String
47 48 49 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 47 def voting_visibility @voting_visibility end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/getstream_ruby/generated/models/poll_response_data.rb', line 103 def self.json_field_mappings { allow_answers: 'allow_answers', allow_user_suggested_options: 'allow_user_suggested_options', answers_count: 'answers_count', created_at: 'created_at', created_by_id: 'created_by_id', description: 'description', enforce_unique_vote: 'enforce_unique_vote', id: 'id', name: 'name', updated_at: 'updated_at', vote_count: 'vote_count', voting_visibility: 'voting_visibility', latest_answers: 'latest_answers', options: 'options', own_votes: 'own_votes', custom: 'custom', latest_votes_by_option: 'latest_votes_by_option', vote_counts_by_option: 'vote_counts_by_option', is_closed: 'is_closed', max_votes_allowed: 'max_votes_allowed', created_by: 'created_by' } end |