Class: Retell::SDK::Unofficial::Call

Inherits:
Object
  • Object
show all
Defined in:
lib/retell/sdk/unofficial/call.rb

Class Method Summary collapse

Class Method Details

.new(client, raw_response) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/retell/sdk/unofficial/call.rb', line 5

def self.new(client, raw_response)
  case raw_response[:call_type]
  when 'web_call'
    Retell::SDK::Unofficial::WebCall.new(client, raw_response)
  when 'phone_call'
    Retell::SDK::Unofficial::PhoneCall.new(client, raw_response)
  else
    raise ArgumentError, "Unknown call type: #{raw_response[:call_type]}"
  end
end