lib/smsc.rb in smsc-0.0.4 vs lib/smsc.rb in smsc-0.0.5
- old
+ new
@@ -13,11 +13,20 @@
i.response :logger
i.adapter Faraday.default_adapter
end
end
- def message(message, phones)
- @connection.post '/sys/send.php', { login: @login, psw: @password, phones: phones.join(','), mes: message, charset: @charset }
+ def message(message, phones, options = {})
+ params = {
+ login: @login,
+ psw: @password,
+ phones: phones.join(','),
+ mes: message,
+ charset: @charset,
+ sender: options[:sender]
+ }
+
+ @connection.post '/sys/send.php', params
end
end
end