Class: GetStream::Generated::Models::ReminderCreatedEvent

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/reminder_created_event.rb

Overview

Emitted when a reminder is created.

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 = {}) ⇒ ReminderCreatedEvent

Initialize with attributes



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/reminder_created_event.rb', line 41

def initialize(attributes = {})
  super(attributes)
  @cid = attributes[:cid] || attributes['cid']
  @created_at = attributes[:created_at] || attributes['created_at']
  @message_id = attributes[:message_id] || attributes['message_id']
  @user_id = attributes[:user_id] || attributes['user_id']
  @custom = attributes[:custom] || attributes['custom']
  @type = attributes[:type] || attributes['type'] || "reminder.created"
  @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
  @received_at = attributes[:received_at] || attributes['received_at'] || nil
  @reminder = attributes[:reminder] || attributes['reminder'] || nil
end

Instance Attribute Details

#cidString

Returns The CID of the Channel for which the reminder was created.

Returns:

  • (String)

    The CID of the Channel for which the reminder was created



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

def cid
  @cid
end

#created_atDateTime

Returns Date/time of creation.

Returns:

  • (DateTime)

    Date/time of creation



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

def created_at
  @created_at
end

#customObject

Returns:

  • (Object)


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

def custom
  @custom
end

#message_idString

Returns The ID of the message for which the reminder was created.

Returns:

  • (String)

    The ID of the message for which the reminder was created



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

def message_id
  @message_id
end

#parent_idString

Returns The ID of the parent message, if the reminder is for a thread message.

Returns:

  • (String)

    The ID of the parent message, if the reminder is for a thread message



32
33
34
# File 'lib/getstream_ruby/generated/models/reminder_created_event.rb', line 32

def parent_id
  @parent_id
end

#received_atDateTime

Returns:

  • (DateTime)


35
36
37
# File 'lib/getstream_ruby/generated/models/reminder_created_event.rb', line 35

def received_at
  @received_at
end

#reminderReminderResponseData



38
39
40
# File 'lib/getstream_ruby/generated/models/reminder_created_event.rb', line 38

def reminder
  @reminder
end

#typeString

Returns The type of event: “reminder.created” in this case.

Returns:

  • (String)

    The type of event: “reminder.created” in this case



29
30
31
# File 'lib/getstream_ruby/generated/models/reminder_created_event.rb', line 29

def type
  @type
end

#user_idString

Returns The ID of the user for whom the reminder was created.

Returns:

  • (String)

    The ID of the user for whom the reminder was created



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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/getstream_ruby/generated/models/reminder_created_event.rb', line 55

def self.json_field_mappings
  {
    cid: 'cid',
    created_at: 'created_at',
    message_id: 'message_id',
    user_id: 'user_id',
    custom: 'custom',
    type: 'type',
    parent_id: 'parent_id',
    received_at: 'received_at',
    reminder: 'reminder'
  }
end