Class: One::EmailDirect::Client

Inherits:
Savon::Client
  • Object
show all
Defined in:
lib/one/email_direct/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(soap_action = nil) ⇒ Client

Returns a new instance of Client.



3
4
5
6
7
8
9
# File 'lib/one/email_direct/client.rb', line 3

def initialize(soap_action=nil)
  super() do
    wsdl.document = "#{File.dirname(__FILE__)}/../../emaildirect.wsdl"
    http.url = 'http://dev.emaildirect.com/v1/api.asmx'
    http.headers['SOAPAction'] = %{"#{soap_action}"} if !soap_action.nil?
  end
end