Class: GetStream::Generated::Models::PollClosedEvent
- Defined in:
- lib/getstream_ruby/generated/models/poll_closed_event.rb
Overview
Emitted when a poll is closed.
Instance Attribute Summary collapse
- #activity_id ⇒ String
-
#cid ⇒ String
The CID of the channel containing the poll.
-
#created_at ⇒ DateTime
Date/time of creation.
- #custom ⇒ Object
-
#message_id ⇒ String
The ID of the message containing the poll.
- #poll ⇒ PollResponseData
- #received_at ⇒ DateTime
-
#type ⇒ String
The type of event: "poll.closed" in this case.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ PollClosedEvent
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ PollClosedEvent
Initialize with attributes
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 38 def initialize(attributes = {}) super(attributes) @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) } @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) } @poll = attributes.fetch(:poll) { attributes.fetch('poll', nil) } @type = attributes.fetch(:type) { attributes.fetch('type', "poll.closed") } @activity_id = attributes.fetch(:activity_id) { attributes.fetch('activity_id', nil) } @cid = attributes.fetch(:cid) { attributes.fetch('cid', nil) } @message_id = attributes.fetch(:message_id) { attributes.fetch('message_id', nil) } @received_at = attributes.fetch(:received_at) { attributes.fetch('received_at', nil) } end |
Instance Attribute Details
#activity_id ⇒ String
26 27 28 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 26 def activity_id @activity_id end |
#cid ⇒ String
Returns The CID of the channel containing the poll.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 29 def cid @cid end |
#created_at ⇒ DateTime
Returns Date/time of creation.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 14 def created_at @created_at end |
#custom ⇒ Object
17 18 19 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 17 def custom @custom end |
#message_id ⇒ String
Returns The ID of the message containing the poll.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 32 def @message_id end |
#poll ⇒ PollResponseData
20 21 22 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 20 def poll @poll end |
#received_at ⇒ DateTime
35 36 37 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 35 def received_at @received_at end |
#type ⇒ String
Returns The type of event: "poll.closed" in this case.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 23 def type @type end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/getstream_ruby/generated/models/poll_closed_event.rb', line 51 def self.json_field_mappings { created_at: 'created_at', custom: 'custom', poll: 'poll', type: 'type', activity_id: 'activity_id', cid: 'cid', message_id: 'message_id', received_at: 'received_at' } end |