Exception: SmsOnRails::ServiceProviders::EmailGatewayInvalidSms

Inherits:
SmsOnRails::SmsError show all
Defined in:
lib/sms_on_rails/service_providers/email_gateway_support/errors.rb

Direct Known Subclasses

EmailGatewayInvalidCarrier

Instance Attribute Summary

Attributes inherited from SmsOnRails::SmsError

#sub_status

Class Method Summary collapse

Methods inherited from SmsOnRails::SmsError

#initialize

Constructor Details

This class inherits a constructor from SmsOnRails::SmsError

Class Method Details

.phone_error(phone_number) ⇒ Object



4
5
6
# File 'lib/sms_on_rails/service_providers/email_gateway_support/errors.rb', line 4

def self.phone_error(phone_number)
  new(self.phone_message(phone_number))
end

.phone_message(phone_number) ⇒ Object



7
8
9
10
11
# File 'lib/sms_on_rails/service_providers/email_gateway_support/errors.rb', line 7

def self.phone_message(phone_number)
  msg =  "Invalid phone number #{phone_number.human_display if phone_number}. "
  msg << "Please specify the digits and the option :carrier, "
  msg << "or specify the full email address like [email protected]"
end