Class: DAF::SMSAction
Overview
An action that sends an sms using twilio based on parameters
Instance Method Summary collapse
Methods inherited from Action
Methods included from Configurable
Instance Method Details
#client ⇒ Object
15 16 17 |
# File 'lib/daf/actions/sms_action.rb', line 15 def client @client ||= Twilio::REST::Client.new(@sid, @token) end |
#invoke ⇒ Object
19 20 21 22 23 |
# File 'lib/daf/actions/sms_action.rb', line 19 def invoke @message_id = client.account..create(body: @message, to: @to, from: @from) end |