five9 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,4 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in five9.gemspec
4
4
  gemspec
5
- require 'savon'
@@ -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', '~> 1.1.0')
19
+ gem.add_dependency('savon', '~> 2.2.0')
20
20
  end
@@ -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
- @client = Savon::Client.new do
6
- wsdl.document = given_wsdl + username
7
- http.auth.basic(username,password)
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
@@ -6,12 +6,12 @@ module Five9
6
6
  end
7
7
 
8
8
  def setSessionParams(options)
9
- @client.request :ser, :setSessionParameters, body: {viewSettings: {rollingPeriod: options[:rolling_period], shiftStart: options[:shift_start], statisticsRange: options[:statistics_range],timeZone: options[:time_zone]}}
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.request :getStatistics, body: {statisticType: statistic_type, columnNames: {values: { data: columns}}}
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.request :ser, :getStatisticsUpdate, body: {statisticType: statistic_type, previousTimestamp: prev_timestamp, longPollingTimeout: long_polling_timeout}
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]
@@ -1,3 +1,3 @@
1
1
  module Five9
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
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.9
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-04-10 00:00:00.000000000 Z
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: 1.1.0
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: 1.1.0
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.24
71
+ rubygems_version: 1.8.25
72
72
  signing_key:
73
73
  specification_version: 3
74
74
  summary: Write a gem summary