esendex4soap 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.7.1
data/esendex4soap.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "esendex4soap"
8
- s.version = "0.7.0"
8
+ s.version = "0.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Voip Scout"]
data/lib/esendex4soap.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  require 'savon'
3
3
  require 'log4r'
4
- #require 'wtf_lang'
4
+ #require 'pry'
5
5
  require 'api_smith'
6
6
 
7
7
  module LanguageTools
@@ -54,7 +54,7 @@ module Esendex
54
54
  @password = args.shift
55
55
  @account_reference = args.shift
56
56
  # @detectlanguage_api_key, @alchemyapi_api_key = args.shift, args.shift
57
- @sent_message_ids, @sent_message_statuses = [], {}
57
+ @sent_message_ids, @sent_message_statuses = Array.new, Hash.new
58
58
 
59
59
  @language = LanguageTools::DetectLanguageDotCom.new(args.shift)
60
60
 
@@ -67,7 +67,7 @@ module Esendex
67
67
 
68
68
  @log = Logger.new "#{self.class.name}"
69
69
  @log.outputters = Outputter.stdout
70
- @log.level = DEBUG #ERROR
70
+ @log.level = ERROR
71
71
 
72
72
  @message_kind = String.new
73
73
 
@@ -114,20 +114,14 @@ module Esendex
114
114
  def get_status(*message_id)
115
115
  connect unless @client
116
116
 
117
- if message_id.size > 1
118
- message_id.each do |id|
119
- resp = @client.request :com, :get_message_status do |soap|
120
- soap.header["com:MessengerHeader"] = {"com:Username" => @username, "com:Password" => @password, "com:Account" => @account_reference}
121
- soap.body = {"com:id" => id.to_s}
122
- end
123
- @sent_message_statuses[id] = resp.to_hash[:get_message_status_response][:get_message_status_result]
124
- end
125
- else
117
+ message_id.flatten!
118
+ message_id.each do |id|
119
+ @log.debug "#{id.to_s}"
126
120
  resp = @client.request :com, :get_message_status do |soap|
127
121
  soap.header["com:MessengerHeader"] = {"com:Username" => @username, "com:Password" => @password, "com:Account" => @account_reference}
128
- soap.body = {"com:id" => message_id.first}
122
+ soap.body = {"com:id" => id.to_s}
129
123
  end
130
- resp.to_hash[:get_message_status_response][:get_message_status_result]
124
+ @sent_message_statuses[id] = resp.to_hash[:get_message_status_response][:get_message_status_result]
131
125
  end
132
126
  end
133
127
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: esendex4soap
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.7.0
5
+ version: 0.7.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Voip Scout