Class: AutotaskApi::Configuration
- Inherits:
-
Object
- Object
- AutotaskApi::Configuration
- Defined in:
- lib/autotask_api/config.rb
Instance Attribute Summary collapse
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#integration_code ⇒ Object
Returns the value of attribute integration_code.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#password ⇒ Object
Returns the value of attribute password.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
#username ⇒ Object
Returns the value of attribute username.
-
#wsdl ⇒ Object
Returns the value of attribute wsdl.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #set(options = {}) ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Configuration
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
#debug ⇒ Object
Returns the value of attribute debug.
16 17 18 |
# File 'lib/autotask_api/config.rb', line 16 def debug @debug end |
#integration_code ⇒ Object
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_timeout ⇒ Object
Returns the value of attribute open_timeout.
16 17 18 |
# File 'lib/autotask_api/config.rb', line 16 def open_timeout @open_timeout end |
#password ⇒ Object
Returns the value of attribute password.
16 17 18 |
# File 'lib/autotask_api/config.rb', line 16 def password @password end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
16 17 18 |
# File 'lib/autotask_api/config.rb', line 16 def read_timeout @read_timeout end |
#username ⇒ Object
Returns the value of attribute username.
16 17 18 |
# File 'lib/autotask_api/config.rb', line 16 def username @username end |
#wsdl ⇒ Object
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( = {}) .each { |k, v| self.send("#{k.to_s}=", v) } end |
#to_hash ⇒ Object
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 |