class Nuntius::TwilioSmsProvider
Send SMS messages using twilio.com
def client
def client @client ||= Twilio::REST::Client.new(sid, auth_token) end
def deliver
def deliver response = client.messages.create(from: message.from.present? ? message.from : from, to: message.to, body: message.text) message.provider_id = response.sid message.status = translated_status(response.status) message end
def refresh
def refresh response = client.messages(message.provider_id).fetch message.provider_id = response.sid message.status = translated_status(response.status) message end