Method: Unityapi::UnityClient#initialize
- Defined in:
- lib/unityapi/unity_client.rb
#initialize(user, pass, app, path_to_wsdl, proxy = nil) ⇒ UnityClient
Returns a new instance of UnityClient.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/unityapi/unity_client.rb', line 5 def initialize(user, pass, app, path_to_wsdl, proxy = nil) @user = user @pass = pass @app = app Savon.configure do |config| config.env_namespace = :soap config.log = false config.pretty_print_xml = true HTTPI.log = false end @client = Savon.client do |wsdl, http| wsdl.document = path_to_wsdl if proxy http.proxy = proxy end end @security_token = get_security_token(user, pass) end |