Class: GetStream::Generated::Models::MarkUnreadRequest
- Defined in:
- lib/getstream_ruby/generated/models/mark_unread_request.rb
Instance Attribute Summary collapse
-
#message_id ⇒ String
ID of the message from where the channel is marked unread.
-
#message_timestamp ⇒ DateTime
Timestamp of the message from where the channel is marked unread.
-
#thread_id ⇒ String
Mark a thread unread.
-
#user ⇒ UserRequest
User request object.
- #user_id ⇒ String
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ MarkUnreadRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ MarkUnreadRequest
Initialize with attributes
29 30 31 32 33 34 35 36 |
# File 'lib/getstream_ruby/generated/models/mark_unread_request.rb', line 29 def initialize(attributes = {}) super(attributes) = attributes.fetch(:message_id) { attributes.fetch('message_id', nil) } = attributes.fetch(:message_timestamp) { attributes.fetch('message_timestamp', nil) } @thread_id = attributes.fetch(:thread_id) { attributes.fetch('thread_id', nil) } @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) } @user = attributes.fetch(:user) { attributes.fetch('user', nil) } end |
Instance Attribute Details
#message_id ⇒ String
Returns ID of the message from where the channel is marked unread. Omit message_id, message_timestamp and thread_id to mark the whole channel soft unread: a dot without a counter.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/mark_unread_request.rb', line 14 def end |
#message_timestamp ⇒ DateTime
Returns Timestamp of the message from where the channel is marked unread. Omit message_id, message_timestamp and thread_id to mark the whole channel soft unread.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/mark_unread_request.rb', line 17 def end |
#thread_id ⇒ String
Returns Mark a thread unread. Specify at most one of thread_id, message_timestamp, or message_id; omit all three to mark the channel soft unread.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/mark_unread_request.rb', line 20 def thread_id @thread_id end |
#user ⇒ UserRequest
Returns User request object.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/mark_unread_request.rb', line 26 def user @user end |
#user_id ⇒ String
23 24 25 |
# File 'lib/getstream_ruby/generated/models/mark_unread_request.rb', line 23 def user_id @user_id 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/mark_unread_request.rb', line 39 def self.json_field_mappings { message_id: 'message_id', message_timestamp: 'message_timestamp', thread_id: 'thread_id', user_id: 'user_id', user: 'user' } end |