Class: SmsLayer

Inherits:
Sms
  • Object
show all
Defined in:
lib/smster/sms_layer.rb

Overview

For compatibility with smster rails gem.

Constant Summary

Constants inherited from Sms

Sms::STATUSES

Instance Attribute Summary

Attributes inherited from Sms

#api_message_id, #balance, #cost, #name, #status, #status_message, #text, #to, #type

Instance Method Summary collapse

Methods inherited from Sms

#initialize, send_sms

Constructor Details

This class inherits a constructor from Sms

Instance Method Details

#send_smsObject



4
5
6
7
8
9
10
11
# File 'lib/smster/sms_layer.rb', line 4

def send_sms
  send_to_provider

  status_name = api_message_id ? :sent : :failed
  self.status = STATUSES[status_name]

  self
end