Class: GetStream::Generated::Models::NotificationComment
- Defined in:
- lib/getstream_ruby/generated/models/notification_comment.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Array<Attachment>
Attachments on the comment.
-
#comment ⇒ String
The text of the comment.
-
#id ⇒ String
The ID of the comment.
-
#parent_id ⇒ String
The ID of the parent comment when this comment is a reply; omitted for top-level comments.
-
#user_id ⇒ String
The ID of the user who wrote the comment.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ NotificationComment
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ NotificationComment
Initialize with attributes
29 30 31 32 33 34 35 36 |
# File 'lib/getstream_ruby/generated/models/notification_comment.rb', line 29 def initialize(attributes = {}) super(attributes) @comment = attributes.fetch(:comment) { attributes.fetch('comment', nil) } @id = attributes.fetch(:id) { attributes.fetch('id', nil) } @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) } @parent_id = attributes.fetch(:parent_id) { attributes.fetch('parent_id', nil) } @attachments = attributes.fetch(:attachments) { attributes.fetch('attachments', nil) } end |
Instance Attribute Details
#attachments ⇒ Array<Attachment>
Returns Attachments on the comment.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/notification_comment.rb', line 26 def @attachments end |
#comment ⇒ String
Returns The text of the comment.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/notification_comment.rb', line 14 def comment @comment end |
#id ⇒ String
Returns The ID of the comment.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/notification_comment.rb', line 17 def id @id end |
#parent_id ⇒ String
Returns The ID of the parent comment when this comment is a reply; omitted for top-level comments.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/notification_comment.rb', line 23 def parent_id @parent_id end |
#user_id ⇒ String
Returns The ID of the user who wrote the comment.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/notification_comment.rb', line 20 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/notification_comment.rb', line 39 def self.json_field_mappings { comment: 'comment', id: 'id', user_id: 'user_id', parent_id: 'parent_id', attachments: 'attachments' } end |