nuntium_api 0.9 → 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/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