Class: Callcenter

Inherits:
Object
  • Object
show all
Defined in:
lib/call-center-api.rb

Class Method Summary collapse

Class Method Details

.call(callRequest, url) ⇒ RestClient::Response

Parameters:

Returns:

  • (RestClient::Response)


18
19
20
# File 'lib/call-center-api.rb', line 18

def self.call(callRequest, url)
  return RestClient.post url, {'partner_id' => callRequest.partner_id, 'account_id' => callRequest., 'account_name' => callRequest., 'mobile_phone' => callRequest.mobile_phone}.to_json, {content_type: :json, accept: :json}
end

.get_call_info(callIdCrm, url) ⇒ RestClient::Response

get call info from database including these fields callCrm, callId, ipPhone, callNumber, urlRecord, disposition, verb, timeRing, timeTalk, timeTotal

Parameters:

  • callIdCrm (String)
  • url (String)

Returns:

  • (RestClient::Response)


11
12
13
# File 'lib/call-center-api.rb', line 11

def self.get_call_info(callIdCrm, url)
  return RestClient.get url, {:params => {'callIdCrm' => callIdCrm}}
end