Module: TFA::Twilio

Defined in:
lib/TFA/twilio.rb

Constant Summary collapse

@@acc_sid =
ENV["TWILIO_ACCOUNT_SID"]
@@auth_token =
ENV["TWILIO_AUTH_TOKEN"]
@@sending_phone =
ENV["TWILIO_SENDING_PHONE"]
@@client =
::Twilio::REST::Client.new(@@acc_sid, @@auth_token)

Class Method Summary collapse

Class Method Details

.send_msg(message, to:) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/TFA/twilio.rb', line 12

def self.send_msg(message, to:)
  @@client.messages.create(
    body: message,
    from: @@sending_phone,
    to: to
  ).sid
end