Class: ConnectWiseRest::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/connect_wise_rest/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



19
20
21
22
23
# File 'lib/connect_wise_rest/configuration.rb', line 19

def initialize
  @version = '3.0'
  @debug = false
  @logger = $stdout
end

Instance Attribute Details

#company_idObject

Returns the value of attribute company_id.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def company_id
  @company_id
end

#debugObject

Returns the value of attribute debug.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def debug
  @debug
end

#loggerObject

Returns the value of attribute logger.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def logger
  @logger
end

#private_keyObject

Returns the value of attribute private_key.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def private_key
  @private_key
end

#proxy_hostObject

Returns the value of attribute proxy_host.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def proxy_host
  @proxy_host
end

#proxy_passwordObject

Returns the value of attribute proxy_password.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def proxy_password
  @proxy_password
end

#proxy_portObject

Returns the value of attribute proxy_port.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def proxy_port
  @proxy_port
end

#proxy_userObject

Returns the value of attribute proxy_user.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def proxy_user
  @proxy_user
end

#public_keyObject

Returns the value of attribute public_key.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def public_key
  @public_key
end

#request_optionsObject

Returns the value of attribute request_options.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def request_options
  @request_options
end

#url_prefixObject

Returns the value of attribute url_prefix.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def url_prefix
  @url_prefix
end

#versionObject

Returns the value of attribute version.



16
17
18
# File 'lib/connect_wise_rest/configuration.rb', line 16

def version
  @version
end

Instance Method Details

#set(options = {}) ⇒ Object



25
26
27
# File 'lib/connect_wise_rest/configuration.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/connect_wise_rest/configuration.rb', line 29

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