call-center-api 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4d08991a070c97161ada1d09050e5c8c092fa4ddcd4672f827f1cfc6dca8549f
4
+ data.tar.gz: 55f6a95b55b93b8431e3caf492897190c7ae6ff0bc978d0bc68a3d02a73b83e8
5
+ SHA512:
6
+ metadata.gz: 8432f879458d9efdc00d9b96fafe60a30232dfce6fc9e572c8e35b3d94aa72f712bb2189ea203717e29cd1db0eeee954d09f8f05136e2bd4bdaa749276e58f9a
7
+ data.tar.gz: 77076f1129030ee77fcc154d4749a3e82553dd3ef9a9b9da6b98ca19fe49b19c44076ab420270d6b549576313baa7e74a39ee62073abffd816175fdf2da7e303
@@ -0,0 +1,22 @@
1
+ require 'rest_client'
2
+ require 'json'
3
+ require 'call_request'
4
+ class Callcenter
5
+
6
+ # @param [String] callIdCrm
7
+ # @param [String] url
8
+ # @return [RestClient::Response]
9
+ # get call info from database
10
+ # including these fields callCrm, callId, ipPhone, callNumber, urlRecord, disposition, verb, timeRing, timeTalk, timeTotal
11
+ def self.get_call_info(callIdCrm, url)
12
+ return RestClient.get url, {:params => {'callIdCrm' => callIdCrm}}
13
+ end
14
+
15
+ # @param [ CallRequest] callRequest
16
+ # @param [String] url
17
+ # @return [RestClient::Response]
18
+ def self.call(callRequest, url)
19
+ return RestClient.post url, {'partner_id' => callRequest.partner_id, 'account_id' => callRequest.account_id, 'account_name' => callRequest.account_name, 'mobile_phone' => callRequest.mobile_phone}.to_json, {content_type: :json, accept: :json}
20
+ end
21
+
22
+ end
@@ -0,0 +1,10 @@
1
+ class CallRequest
2
+
3
+ attr_accessor :account_name, :account_id, :mobile_phone, :partner_id
4
+
5
+ @partner_id = ''
6
+ @account_id = ''
7
+ @account_name = ''
8
+ @mobile_phone = ''
9
+
10
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: call-center-api
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - edumall
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-08-17 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Call and get call info
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/call-center-api.rb
20
+ - lib/call_request.rb
21
+ homepage: https://rubygems.org/gems/topica
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubygems_version: 3.0.6
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Sdk for call center api of topica
44
+ test_files: []