Class: GetStream::Generated::Models::NotificationTarget
- Defined in:
- lib/getstream_ruby/generated/models/notification_target.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Array<Attachment>
Attachments on the target activity (for activity targets).
- #comment ⇒ NotificationComment
-
#id ⇒ String
The ID of the target (activity ID or user ID).
-
#name ⇒ String
The name of the target user (for user targets like follows).
-
#text ⇒ String
The text content of the target activity (for activity targets).
-
#type ⇒ String
The type of the target activity (for activity targets).
-
#user_id ⇒ String
The ID of the user who created the target activity (for activity targets).
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ NotificationTarget
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ NotificationTarget
Initialize with attributes
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/getstream_ruby/generated/models/notification_target.rb', line 35 def initialize(attributes = {}) super(attributes) @id = attributes[:id] || attributes['id'] @name = attributes[:name] || attributes['name'] || nil @text = attributes[:text] || attributes['text'] || nil @type = attributes[:type] || attributes['type'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @attachments = attributes[:attachments] || attributes['attachments'] || nil @comment = attributes[:comment] || attributes['comment'] || nil end |
Instance Attribute Details
#attachments ⇒ Array<Attachment>
Returns Attachments on the target activity (for activity targets).
29 30 31 |
# File 'lib/getstream_ruby/generated/models/notification_target.rb', line 29 def @attachments end |
#comment ⇒ NotificationComment
32 33 34 |
# File 'lib/getstream_ruby/generated/models/notification_target.rb', line 32 def comment @comment end |
#id ⇒ String
Returns The ID of the target (activity ID or user ID).
14 15 16 |
# File 'lib/getstream_ruby/generated/models/notification_target.rb', line 14 def id @id end |
#name ⇒ String
Returns The name of the target user (for user targets like follows).
17 18 19 |
# File 'lib/getstream_ruby/generated/models/notification_target.rb', line 17 def name @name end |
#text ⇒ String
Returns The text content of the target activity (for activity targets).
20 21 22 |
# File 'lib/getstream_ruby/generated/models/notification_target.rb', line 20 def text @text end |
#type ⇒ String
Returns The type of the target activity (for activity targets).
23 24 25 |
# File 'lib/getstream_ruby/generated/models/notification_target.rb', line 23 def type @type end |
#user_id ⇒ String
Returns The ID of the user who created the target activity (for activity targets).
26 27 28 |
# File 'lib/getstream_ruby/generated/models/notification_target.rb', line 26 def user_id @user_id 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/notification_target.rb', line 47 def self.json_field_mappings { id: 'id', name: 'name', text: 'text', type: 'type', user_id: 'user_id', attachments: 'attachments', comment: 'comment' } end |