class SuperReceptionist::Base
Public Class Methods
new(options)
click to toggle source
# File lib/super_receptionist/base.rb, line 3 def initialize(options) SuperReceptionist.api_host = options.fetch(:api_host) { "kpi.knowlarity.com" } SuperReceptionist.protocol = options.fetch(:protocol) { "https" } SuperReceptionist.api_version = options.fetch(:api_version) { "v1" } SuperReceptionist.test_mode = options.fetch(:test_mode) { false } SuperReceptionist.channel = options.fetch(:channel) { raise ArgumentError.new(":channel is a required argument to initialize SuperReceptionist") if SuperReceptionist.channel.nil? } SuperReceptionist.x_api_key = options.fetch(:x_api_key) { raise ArgumentError.new(":x_api_key is a required argument to initialize SuperReceptionist") if SuperReceptionist.x_api_key.nil? } SuperReceptionist.authorization = options.fetch(:authorization) { raise ArgumentError.new(":authorization is a required argument to initialize SuperReceptionist") if SuperReceptionist.authorization.nil? } end
Public Instance Methods
agent()
click to toggle source
# File lib/super_receptionist/base.rb, line 21 def agent SuperReceptionist::Agent.new(self) end
base_url()
click to toggle source
# File lib/super_receptionist/base.rb, line 13 def base_url "#{SuperReceptionist.protocol}://#{SuperReceptionist.api_host}/#{SuperReceptionist.channel}/#{SuperReceptionist.api_version}/" end
call()
click to toggle source
# File lib/super_receptionist/base.rb, line 17 def call SuperReceptionist::Call.new(self) end
circle()
click to toggle source
# File lib/super_receptionist/base.rb, line 29 def circle SuperReceptionist::Circle.new(self) end
compaign()
click to toggle source
# File lib/super_receptionist/base.rb, line 25 def compaign SuperReceptionist::Compaign.new(self) end
notification()
click to toggle source
# File lib/super_receptionist/base.rb, line 33 def notification SuperReceptionist::Notification.new(self) end
number()
click to toggle source
# File lib/super_receptionist/base.rb, line 37 def number SuperReceptionist::Number.new(self) end
phonebook()
click to toggle source
# File lib/super_receptionist/base.rb, line 41 def phonebook SuperReceptionist::Phonebook.new(self) end
plan()
click to toggle source
# File lib/super_receptionist/base.rb, line 45 def plan SuperReceptionist::Plan.new(self) end
sound()
click to toggle source
# File lib/super_receptionist/base.rb, line 49 def sound SuperReceptionist::Sound.new(self) end
task()
click to toggle source
# File lib/super_receptionist/base.rb, line 53 def task SuperReceptionist::Task.new(self) end