Class: ZenviaS4m::SendSms
- Inherits:
-
Object
- Object
- ZenviaS4m::SendSms
- Defined in:
- lib/zenvia_s4m/send_sms.rb
Instance Method Summary collapse
- #add_schedule(date) ⇒ Object
-
#initialize(params) ⇒ SendSms
constructor
A new instance of SendSms.
- #return_codeSMS ⇒ Object
- #send ⇒ Object
Constructor Details
#initialize(params) ⇒ SendSms
Returns a new instance of SendSms.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/zenvia_s4m/send_sms.rb', line 6 def initialize(params) @params = params @res = nil puts @params if ZenviaS4m.config.log @info_SMS = { account: ZenviaS4m.config.account, code: ZenviaS4m.config.code, from: ZenviaS4m.config.from, dispatch: 'send', to: @params[:phone], msg: @params[:message], id: @params[:sms_id], callbackOption: 1 } end |
Instance Method Details
#add_schedule(date) ⇒ Object
22 23 24 25 |
# File 'lib/zenvia_s4m/send_sms.rb', line 22 def add_schedule(date) #dd/mm/aaaa hh:mm:ss @info_SMS[:schedule] = date unless date.nil? end |
#return_codeSMS ⇒ Object
33 34 35 |
# File 'lib/zenvia_s4m/send_sms.rb', line 33 def return_codeSMS @res end |