class Porteo::Mensario_gateway

Gateway to use Mensario service In Porteo this class acts as a link between SMS protocol and Mensario gem

This class inherits from Gateway and just overwrite the send_message method

Public Instance Methods

send_message( msg ) click to toggle source

Send the SMS using Mensario gem @param [Hash] msg The message sections to send @return [nil]

# File lib/gateways/mensario_gateway.rb, line 43
def send_message( msg )

  Mensario.set_config do
    Mensario.license( @config[:license] )
    Mensario.username( @config[:username] )
    Mensario.password( @config[:password] )
  end
  Mensario.send_message( {:text => msg[:text],
                        :sender => msg[:sender],
                        :code => msg[:code], 
                        :phone => msg[:phone], 
                        :timezone => msg[:timezone],
                        :date => msg[:date] }
                       )

 end