nuntium_api 0.9 → 0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/nuntium.rb +5 -2
  2. metadata +3 -3
data/lib/nuntium.rb CHANGED
@@ -104,8 +104,11 @@ class Nuntium
104
104
  # send_ao :from => 'sms://1', :to => 'sms://2', :subject => 'hello', :body => 'hi!'
105
105
  # send_ao [{:from => 'sms://1', :to => 'sms://2', :subject => 'hello', :body => 'hi!'}, {...}]
106
106
  def send_ao(messages)
107
- body = messages.is_a?(Array) ? messages.to_json : messages
108
- self.class.post "#{@url}/#{@account}/#{@application}/send_ao.json", :basic_auth => @auth, :body => body
107
+ if messages.is_a? Array
108
+ self.class.post "#{@url}/#{@account}/#{@application}/send_ao.json", :basic_auth => @auth, :body => messages.to_json
109
+ else
110
+ self.class.post "#{@url}/#{@account}/#{@application}/send_ao", :basic_auth => @auth, :body => messages
111
+ end
109
112
  end
110
113
 
111
114
  # Gets the custom attributes specified for a given address. Returns a hash with the attributes
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nuntium_api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 9
9
- version: "0.9"
8
+ - 10
9
+ version: "0.10"
10
10
  platform: ruby
11
11
  authors:
12
12
  - InsTEDD