Class: GetStream::Generated::Models::GetNotificationStatusResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/get_notification_status_response.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(attributes = {}) ⇒ GetNotificationStatusResponse

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/get_notification_status_response.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @duration = attributes.fetch(:duration) { attributes.fetch('duration', nil) }
  @unread = attributes.fetch(:unread) { attributes.fetch('unread', nil) }
  @unseen = attributes.fetch(:unseen) { attributes.fetch('unseen', nil) }
  @last_read_at = attributes.fetch(:last_read_at) { attributes.fetch('last_read_at', nil) }
  @last_seen_at = attributes.fetch(:last_seen_at) { attributes.fetch('last_seen_at', nil) }
end

Instance Attribute Details

#duration ⇒ String

Returns:

  • (String)


14
15
16
# File 'lib/getstream_ruby/generated/models/get_notification_status_response.rb', line 14

def duration
  @duration
end

#last_read_at ⇒ DateTime

Returns When the feed was last marked read.

Returns:

  • (DateTime) —

    When the feed was last marked read



23
24
25
# File 'lib/getstream_ruby/generated/models/get_notification_status_response.rb', line 23

def last_read_at
  @last_read_at
end

#last_seen_at ⇒ DateTime

Returns When the feed was last marked seen.

Returns:

  • (DateTime) —

    When the feed was last marked seen



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

def last_seen_at
  @last_seen_at
end

#unread ⇒ Integer

Returns Number of unread activities or groups.

Returns:

  • (Integer) —

    Number of unread activities or groups



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

def unread
  @unread
end

#unseen ⇒ Integer

Returns Number of unseen activities or groups.

Returns:

  • (Integer) —

    Number of unseen activities or groups



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

def unseen
  @unseen
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/get_notification_status_response.rb', line 39

def self.json_field_mappings
  {
    duration: 'duration',
    unread: 'unread',
    unseen: 'unseen',
    last_read_at: 'last_read_at',
    last_seen_at: 'last_seen_at'
  }
end