class Rtedexis::SOAP

Public Class Methods

new(options = {}) click to toggle source
# File lib/rtedexis/soap.rb, line 3
def initialize(options = {})
  @config = {wsdl: 'http://200.41.57.109:8086/m4.in.wsint/services/M4WSIntSR?wsdl'}
  config(options)
end

Public Instance Methods

config(options = {}) click to toggle source
# File lib/rtedexis/soap.rb, line 8
def config(options = {})
    options.each do |key,value|
      @config[key] = value
    end
  @config
end
last_response() click to toggle source
# File lib/rtedexis/soap.rb, line 15
def last_response
  @last_response
end
send(to, text) click to toggle source
# File lib/rtedexis/soap.rb, line 19
def send(to, text)
  client = Savon.client(wsdl: config[:wsdl])
  response = client.call(:send_sms, message: {
  'passport' => config[:passport], 
  'password' => config[:password], 
  'number' => to, 
  'text' => text}) 
  set_last_response(response) 
end

Private Instance Methods

set_last_response(response) click to toggle source
# File lib/rtedexis/soap.rb, line 31
def set_last_response(response)
  @last_response = response
end