nuntium_api 0.9 → 0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nuntium.rb +5 -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
|
-
|
108
|
-
|
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