Class: GetStream::Generated::Models::ActivityMarkEvent
- Defined in:
- lib/getstream_ruby/generated/models/activity_mark_event.rb
Overview
Emitted when activities are marked as read, seen, or watched.
Instance Attribute Summary collapse
-
#created_at ⇒ DateTime
Date/time of creation.
- #custom ⇒ Object
- #feed_visibility ⇒ String
- #fid ⇒ String
-
#mark_all_read ⇒ Boolean
Whether all activities were marked as read.
-
#mark_all_seen ⇒ Boolean
Whether all activities were marked as seen.
-
#mark_read ⇒ Array<String>
The IDs of activities marked as read.
-
#mark_seen ⇒ Array<String>
The IDs of activities marked as seen.
-
#mark_watched ⇒ Array<String>
The IDs of activities marked as watched.
- #received_at ⇒ DateTime
-
#type ⇒ String
The type of event: “feeds.activity.marked” in this case.
- #user ⇒ UserResponseCommonFields
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ActivityMarkEvent
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ ActivityMarkEvent
Initialize with attributes
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 50 def initialize(attributes = {}) super(attributes) @created_at = attributes[:created_at] || attributes['created_at'] @fid = attributes[:fid] || attributes['fid'] @custom = attributes[:custom] || attributes['custom'] @type = attributes[:type] || attributes['type'] || "feeds.activity.marked" @feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil @mark_all_read = attributes[:mark_all_read] || attributes['mark_all_read'] || nil @mark_all_seen = attributes[:mark_all_seen] || attributes['mark_all_seen'] || nil @received_at = attributes[:received_at] || attributes['received_at'] || nil @mark_read = attributes[:mark_read] || attributes['mark_read'] || nil @mark_seen = attributes[:mark_seen] || attributes['mark_seen'] || nil @mark_watched = attributes[:mark_watched] || attributes['mark_watched'] || nil @user = attributes[:user] || attributes['user'] || nil end |
Instance Attribute Details
#created_at ⇒ DateTime
Returns Date/time of creation.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 14 def created_at @created_at end |
#custom ⇒ Object
20 21 22 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 20 def custom @custom end |
#feed_visibility ⇒ String
26 27 28 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 26 def feed_visibility @feed_visibility end |
#fid ⇒ String
17 18 19 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 17 def fid @fid end |
#mark_all_read ⇒ Boolean
Returns Whether all activities were marked as read.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 29 def mark_all_read @mark_all_read end |
#mark_all_seen ⇒ Boolean
Returns Whether all activities were marked as seen.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 32 def mark_all_seen @mark_all_seen end |
#mark_read ⇒ Array<String>
Returns The IDs of activities marked as read.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 38 def mark_read @mark_read end |
#mark_seen ⇒ Array<String>
Returns The IDs of activities marked as seen.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 41 def mark_seen @mark_seen end |
#mark_watched ⇒ Array<String>
Returns The IDs of activities marked as watched.
44 45 46 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 44 def mark_watched @mark_watched end |
#received_at ⇒ DateTime
35 36 37 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 35 def received_at @received_at end |
#type ⇒ String
Returns The type of event: “feeds.activity.marked” in this case.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 23 def type @type end |
#user ⇒ UserResponseCommonFields
47 48 49 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 47 def user @user end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 67 def self.json_field_mappings { created_at: 'created_at', fid: 'fid', custom: 'custom', type: 'type', feed_visibility: 'feed_visibility', mark_all_read: 'mark_all_read', mark_all_seen: 'mark_all_seen', received_at: 'received_at', mark_read: 'mark_read', mark_seen: 'mark_seen', mark_watched: 'mark_watched', user: 'user' } end |