Class: GetStream::Generated::Models::CallSessionParticipantLeftEvent

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

Overview

This event is sent when a participant leaves a call session

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

Initialize with attributes



35
36
37
38
39
40
41
42
43
44
# File 'lib/getstream_ruby/generated/models/call_session_participant_left_event.rb', line 35

def initialize(attributes = {})
  super(attributes)
  @call_cid = attributes[:call_cid] || attributes['call_cid']
  @created_at = attributes[:created_at] || attributes['created_at']
  @duration_seconds = attributes[:duration_seconds] || attributes['duration_seconds']
  @session_id = attributes[:session_id] || attributes['session_id']
  @participant = attributes[:participant] || attributes['participant']
  @type = attributes[:type] || attributes['type'] || "call.session_participant_left"
  @reason = attributes[:reason] || attributes['reason'] || nil
end

Instance Attribute Details

#call_cidString

Returns:

  • (String)


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

def call_cid
  @call_cid
end

#created_atDateTime

Returns:

  • (DateTime)


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

def created_at
  @created_at
end

#duration_secondsInteger

Returns The duration participant was in the session in seconds.

Returns:

  • (Integer)

    The duration participant was in the session in seconds



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

def duration_seconds
  @duration_seconds
end

#participantCallParticipantResponse



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

def participant
  @participant
end

#reasonString

Returns The reason why the participant left the session.

Returns:

  • (String)

    The reason why the participant left the session



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

def reason
  @reason
end

#session_idString

Returns Call session ID.

Returns:

  • (String)

    Call session ID



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

def session_id
  @session_id
end

#typeString

Returns The type of event: “call.session_participant_left” in this case.

Returns:

  • (String)

    The type of event: “call.session_participant_left” in this case



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

def type
  @type
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/getstream_ruby/generated/models/call_session_participant_left_event.rb', line 47

def self.json_field_mappings
  {
    call_cid: 'call_cid',
    created_at: 'created_at',
    duration_seconds: 'duration_seconds',
    session_id: 'session_id',
    participant: 'participant',
    type: 'type',
    reason: 'reason'
  }
end