Module: Zanox::Connect
- Defined in:
- lib/zanox.rb
Instance Attribute Summary collapse
-
#driver ⇒ Object
Returns the value of attribute driver.
-
#wsdl ⇒ Object
Returns the value of attribute wsdl.
Class Method Summary collapse
Instance Attribute Details
#driver ⇒ Object
Returns the value of attribute driver.
111 112 113 |
# File 'lib/zanox.rb', line 111 def driver @driver end |
#wsdl ⇒ Object
Returns the value of attribute wsdl.
110 111 112 |
# File 'lib/zanox.rb', line 110 def wsdl @wsdl end |
Class Method Details
.request(method, options) ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/zanox.rb', line 113 def self.request(method, ) begin .merge!(:publicKey=>Zanox::API.public_key) unless Zanox::API.secret_key.nil? = Zanox::API. nonce = Zanox::API.generate_nonce signature = Zanox::API.create_signature(Zanox::API.secret_key, "connectservice"+method.downcase + + nonce) .merge!(:timestamp=>, :nonce=>nonce, :signature=>signature) end @wsdl = 'https://auth.zanox-affiliate.de/wsdl/2010-02-01' unless !!@wsdl @driver = SOAP::WSDLDriverFactory.new(@wsdl).create_rpc_driver unless !!@driver @driver.wiredump_dev = STDOUT if $DEBUG @driver.['protocol.http.ssl_config.verify_mode'] = OpenSSL::SSL::VERIFY_NONE if $DEBUG @driver.method(method.to_sym).call() rescue Exception => e puts puts "ERROR" puts e. end end |