five9 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +0 -1
- data/five9.gemspec +1 -1
- data/lib/five9/base.rb +3 -4
- data/lib/five9/statistics.rb +3 -3
- data/lib/five9/version.rb +1 -1
- metadata +5 -5
data/Gemfile
CHANGED
data/five9.gemspec
CHANGED
@@ -16,5 +16,5 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
|
-
gem.add_dependency('savon', '~>
|
19
|
+
gem.add_dependency('savon', '~> 2.2.0')
|
20
20
|
end
|
data/lib/five9/base.rb
CHANGED
@@ -2,10 +2,9 @@ require 'savon'
|
|
2
2
|
module Five9
|
3
3
|
class Base
|
4
4
|
def initialize(username,password,given_wsdl,timeout=300)
|
5
|
-
|
6
|
-
wsdl
|
7
|
-
|
8
|
-
http.read_timeout = timeout
|
5
|
+
@client = Savon.client do
|
6
|
+
wsdl "#{given_wsdl}#{username}"
|
7
|
+
basic_auth [username, password]
|
9
8
|
end
|
10
9
|
end
|
11
10
|
end
|
data/lib/five9/statistics.rb
CHANGED
@@ -6,12 +6,12 @@ module Five9
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def setSessionParams(options)
|
9
|
-
@client.
|
9
|
+
@client.call(:set_session_parameters, message: {viewSettings: {rollingPeriod: options[:rolling_period], shiftStart: options[:shift_start], statisticsRange: options[:statistics_range],timeZone: options[:time_zone]}})
|
10
10
|
end
|
11
11
|
|
12
12
|
def getStatistics(statistic_type,columns=[])
|
13
13
|
stats = []
|
14
|
-
response = @client.
|
14
|
+
response = @client.call(:get_statistics, message: {statisticType: statistic_type, columnNames: {values: { data: columns}}})
|
15
15
|
data = response.to_array
|
16
16
|
@last_working_timestamp = data[0][:get_statistics_response][:return][:timestamp]
|
17
17
|
headers = data[0][:get_statistics_response][:return][:columns][:values][:data]
|
@@ -24,7 +24,7 @@ module Five9
|
|
24
24
|
def getStatisticsUpdate(statistic_type, object_name,long_polling_timeout=10000)
|
25
25
|
begin
|
26
26
|
prev_timestamp = @last_working_timestamp
|
27
|
-
response = @client.
|
27
|
+
response = @client.call(:getStatisticsUpdate, message: {statisticType: statistic_type, previousTimestamp: prev_timestamp, longPollingTimeout: long_polling_timeout})
|
28
28
|
data = response.to_array
|
29
29
|
raise TypeError, "No Updated Statistics" if data[0][:get_statistics_update_response][:return].nil?
|
30
30
|
prev_timestamp = data[0][:get_statistics_update_response][:return][:last_timestamp]
|
data/lib/five9/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: five9
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 2.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 2.2.0
|
30
30
|
description: Rubygem integration with five9 API
|
31
31
|
email:
|
32
32
|
- dhahn@ctatechs.com
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
version: '0'
|
69
69
|
requirements: []
|
70
70
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.8.
|
71
|
+
rubygems_version: 1.8.25
|
72
72
|
signing_key:
|
73
73
|
specification_version: 3
|
74
74
|
summary: Write a gem summary
|