Class: Nuntius::SmstoolsSmsProvider

Inherits:
BaseProvider show all
Defined in:
app/providers/nuntius/smstools_sms_provider.rb

Overview

Send SMS messages using smstools.nl

Instance Attribute Summary

Attributes inherited from BaseProvider

#message

Instance Method Summary collapse

Methods inherited from BaseProvider

all_settings, #callback, class_from_name, #initialize, #name, #refresh, setting_reader, states, transport

Constructor Details

This class inherits a constructor from Nuntius::BaseProvider

Instance Method Details

#deliverObject



17
18
19
20
21
22
# File 'app/providers/nuntius/smstools_sms_provider.rb', line 17

def deliver
  response = client.messages.create(sender: message.from.present? ? message.from : from, to: message.to, message: message.text)
  message.provider_id = response.body.messageid
  message.status = translated_status(response.status)
  message
end