Class: AutotaskApi::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/autotask_api/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
23
# File 'lib/autotask_api/config.rb', line 18

def initialize
  @wsdl = 'https://webservices.autotask.net/atservices/1.6/atws.wsdl'
  @read_timeout = 30
  @open_timeout = 30
  @debug = false
end

Instance Attribute Details

#debugObject

Returns the value of attribute debug.



16
17
18
# File 'lib/autotask_api/config.rb', line 16

def debug
  @debug
end

#integration_codeObject

Returns the value of attribute integration_code.



16
17
18
# File 'lib/autotask_api/config.rb', line 16

def integration_code
  @integration_code
end

#open_timeoutObject

Returns the value of attribute open_timeout.



16
17
18
# File 'lib/autotask_api/config.rb', line 16

def open_timeout
  @open_timeout
end

#passwordObject

Returns the value of attribute password.



16
17
18
# File 'lib/autotask_api/config.rb', line 16

def password
  @password
end

#read_timeoutObject

Returns the value of attribute read_timeout.



16
17
18
# File 'lib/autotask_api/config.rb', line 16

def read_timeout
  @read_timeout
end

#usernameObject

Returns the value of attribute username.



16
17
18
# File 'lib/autotask_api/config.rb', line 16

def username
  @username
end

#wsdlObject

Returns the value of attribute wsdl.



16
17
18
# File 'lib/autotask_api/config.rb', line 16

def wsdl
  @wsdl
end

Instance Method Details

#set(options = {}) ⇒ Object



25
26
27
# File 'lib/autotask_api/config.rb', line 25

def set(options = {})
  options.each { |k, v| self.send("#{k.to_s}=", v) }
end

#to_hashObject



29
30
31
32
33
# File 'lib/autotask_api/config.rb', line 29

def to_hash
  hash = {}
  instance_variables.each { |var| hash[var.to_s.delete('@').to_sym] = instance_variable_get(var) }
  hash
end