Class: AutotaskRuby::ZoneInfo
- Inherits:
-
Object
- Object
- AutotaskRuby::ZoneInfo
show all
- Defined in:
- lib/autotask_ruby/zone_info.rb
Constant Summary
collapse
- ENDPOINT =
'https://webservices.autotask.net/ATServices/1.5/atws.asmx'
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(username) ⇒ ZoneInfo
Returns a new instance of ZoneInfo.
9
10
11
12
13
|
# File 'lib/autotask_ruby/zone_info.rb', line 9
def initialize(username)
@client = Savon.client(wsdl: './atws.wsdl', endpoint: ENDPOINT)
@raw_result = @client.call(:get_zone_info, message: { 'UserName' => username })
@zone_info = @raw_result.body[:get_zone_info_response][:get_zone_info_result]
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *_args) ⇒ Object
30
31
32
|
# File 'lib/autotask_ruby/zone_info.rb', line 30
def method_missing(method, *_args)
@zone_info[method]
end
|
Instance Attribute Details
#raw_result ⇒ Object
Returns the value of attribute raw_result.
5
6
7
|
# File 'lib/autotask_ruby/zone_info.rb', line 5
def raw_result
@raw_result
end
|
Instance Method Details
#error_code ⇒ Object
15
16
17
|
# File 'lib/autotask_ruby/zone_info.rb', line 15
def error_code
@zone_info[:error_code].to_i
end
|
#url ⇒ Object
23
24
25
|
# File 'lib/autotask_ruby/zone_info.rb', line 23
def url
@zone_info[:url]
end
|
#web_url ⇒ Object
19
20
21
|
# File 'lib/autotask_ruby/zone_info.rb', line 19
def web_url
@zone_info[:web_url]
end
|