class CtmSms::SendSms
Attributes
client[R]
message[R]
to[R]
Public Class Methods
new(message, to)
click to toggle source
# File lib/ctm_sms.rb, line 17 def initialize(message, to) @message = message @to = to @client = CtmSms::CtmClient.new end
Public Instance Methods
send_sms()
click to toggle source
# File lib/ctm_sms.rb, line 23 def send_sms client.send_sms params end
Private Instance Methods
params()
click to toggle source
# File lib/ctm_sms.rb, line 29 def params { username: ENV.fetch('CTM_API_USERNAME'), password: ENV.fetch('CTM_API_PASSWORD'), from: ENV.fetch('CTM_FROM'), to: to, locale: 'utf-8', text: message } end