Class: GetStream::Generated::Models::WrappedUnreadCountsResponse
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::WrappedUnreadCountsResponse
- Defined in:
- lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb
Overview
The total unread information from the current user.
Instance Attribute Summary collapse
-
#channel_type ⇒ Array<UnreadCountsChannelType>
The unread information per channel type.
-
#channels ⇒ Array<UnreadCountsChannel>
The unread information per channel.
-
#duration ⇒ String
Duration of the request in milliseconds.
-
#threads ⇒ Array<UnreadCountsThread>
The unread information per thread.
-
#total_unread_count ⇒ Integer
The total number of unread messages.
-
#total_unread_count_by_team ⇒ Hash<String, Integer>
The total number of unread messages grouped by team.
-
#total_unread_threads_count ⇒ Integer
The total number of unread threads.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ WrappedUnreadCountsResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ WrappedUnreadCountsResponse
Initialize with attributes
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb', line 35 def initialize(attributes = {}) super(attributes) @duration = attributes.fetch(:duration) { attributes.fetch('duration', nil) } @total_unread_count = attributes.fetch(:total_unread_count) { attributes.fetch('total_unread_count', nil) } @total_unread_threads_count = attributes.fetch(:total_unread_threads_count) { attributes.fetch('total_unread_threads_count', nil) } @channel_type = attributes.fetch(:channel_type) { attributes.fetch('channel_type', nil) } @channels = attributes.fetch(:channels) { attributes.fetch('channels', nil) } @threads = attributes.fetch(:threads) { attributes.fetch('threads', nil) } @total_unread_count_by_team = attributes.fetch(:total_unread_count_by_team) { attributes.fetch('total_unread_count_by_team', nil) } end |
Instance Attribute Details
#channel_type ⇒ Array<UnreadCountsChannelType>
Returns The unread information per channel type.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb', line 23 def channel_type @channel_type end |
#channels ⇒ Array<UnreadCountsChannel>
Returns The unread information per channel.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb', line 26 def channels @channels end |
#duration ⇒ String
Returns Duration of the request in milliseconds.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb', line 14 def duration @duration end |
#threads ⇒ Array<UnreadCountsThread>
Returns The unread information per thread.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb', line 29 def threads @threads end |
#total_unread_count ⇒ Integer
Returns The total number of unread messages.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb', line 17 def total_unread_count @total_unread_count end |
#total_unread_count_by_team ⇒ Hash<String, Integer>
Returns The total number of unread messages grouped by team.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb', line 32 def total_unread_count_by_team @total_unread_count_by_team end |
#total_unread_threads_count ⇒ Integer
Returns The total number of unread threads.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb', line 20 def total_unread_threads_count @total_unread_threads_count end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb', line 47 def self.json_field_mappings { duration: 'duration', total_unread_count: 'total_unread_count', total_unread_threads_count: 'total_unread_threads_count', channel_type: 'channel_type', channels: 'channels', threads: 'threads', total_unread_count_by_team: 'total_unread_count_by_team' } end |