base.rb

Path: lib/sms_on_rails/service_providers/base.rb
Last Update: Thu May 07 04:16:35 -0700 2009

This is the base class for service providers from which all others inherit All service providers are singletons and can be accessed by their instance

To send a message without validation

 SmsOnRails::ServiceProviders::<Provider>.instance.send_message '12065551234', 'my message', options

To send a message with validation use send_to_phone_number with a string or SmsOnRails::PhoneNumber instance

 SmsOnRails::ServiceProviders<Provider>.instance.send_to_phone_number(number, message, options)

To send an sms(with validation)

 SmsOnRails::ServiceProviders<Provider>.instance.send_sms(sms, options)

However, it is preferred to use the locking mechanism to prevent double messages from being sent

  sms.deliver!

[Validate]