Class: GetStream::Generated::Models::ActivityMarkEvent

Inherits:
BaseModel
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

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_atDateTime

Returns Date/time of creation.

Returns:

  • (DateTime)

    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

#customObject

Returns:

  • (Object)


20
21
22
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 20

def custom
  @custom
end

#feed_visibilityString

Returns:

  • (String)


26
27
28
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 26

def feed_visibility
  @feed_visibility
end

#fidString

Returns:

  • (String)


17
18
19
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 17

def fid
  @fid
end

#mark_all_readBoolean

Returns Whether all activities were marked as read.

Returns:

  • (Boolean)

    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_seenBoolean

Returns Whether all activities were marked as seen.

Returns:

  • (Boolean)

    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_readArray<String>

Returns The IDs of activities marked as read.

Returns:

  • (Array<String>)

    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_seenArray<String>

Returns The IDs of activities marked as seen.

Returns:

  • (Array<String>)

    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_watchedArray<String>

Returns The IDs of activities marked as watched.

Returns:

  • (Array<String>)

    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_atDateTime

Returns:

  • (DateTime)


35
36
37
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 35

def received_at
  @received_at
end

#typeString

Returns The type of event: “feeds.activity.marked” in this case.

Returns:

  • (String)

    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

#userUserResponseCommonFields



47
48
49
# File 'lib/getstream_ruby/generated/models/activity_mark_event.rb', line 47

def user
  @user
end

Class Method Details

.json_field_mappingsObject

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