Class: OvhRb::Session

Inherits:
Object
  • Object
show all
Includes:
SoapRequestHandler
Defined in:
lib/ovhrb/session.rb

Instance Attribute Summary

Attributes included from SoapRequestHandler

#session_id, #soap_object

Instance Method Summary collapse

Methods included from SoapRequestHandler

included, #method_missing

Constructor Details

#initialize(nic, password, language = 'en', mulisession = true, wsdl = "https://www.ovh.com/soapi/soapi-re-1.9.wsdl") ⇒ Session

Returns a new instance of Session.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ovhrb/session.rb', line 5

def initialize(nic, password, language = 'en', mulisession = true, wsdl = "https://www.ovh.com/soapi/soapi-re-1.9.wsdl")
  @nic = nic
  @password = password
  @language = language
  @multisession = mulisession

  self.soap_object = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
  @session_id = (@nic, @password, @language, @multisession)
  
  if block_given?
    begin
      yield self
#        ensure
#          logout
    end
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OvhRb::SoapRequestHandler