Class: SipgateIo::NewCall

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, EventProcessor
Defined in:
lib/sipgate_io/new_call.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from EventProcessor

#process

Constructor Details

#initialize(params) ⇒ NewCall

Returns a new instance of NewCall.



13
14
15
16
17
18
19
20
21
# File 'lib/sipgate_io/new_call.rb', line 13

def initialize(params)
  @to = params[:to]
  @from = params[:from]
  @direction = params[:direction]
  @event = params[:event]
  @call_id = params[:callId]
  @users = params[:user]
  @diversion = params[:diversion] unless params[:diversion].blank?
end

Instance Attribute Details

#call_idObject (readonly)

Returns the value of attribute call_id.



6
7
8
# File 'lib/sipgate_io/new_call.rb', line 6

def call_id
  @call_id
end

#directionObject (readonly)

Returns the value of attribute direction.



6
7
8
# File 'lib/sipgate_io/new_call.rb', line 6

def direction
  @direction
end

#diversionObject (readonly)

Returns the value of attribute diversion.



6
7
8
# File 'lib/sipgate_io/new_call.rb', line 6

def diversion
  @diversion
end

#eventObject (readonly)

Returns the value of attribute event.



6
7
8
# File 'lib/sipgate_io/new_call.rb', line 6

def event
  @event
end

#fromObject (readonly)

Returns the value of attribute from.



6
7
8
# File 'lib/sipgate_io/new_call.rb', line 6

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to.



6
7
8
# File 'lib/sipgate_io/new_call.rb', line 6

def to
  @to
end

#usersObject (readonly)

Returns the value of attribute users.



6
7
8
# File 'lib/sipgate_io/new_call.rb', line 6

def users
  @users
end