Module: AutotaskRuby::Response
- Includes:
- Constants
- Included in:
- CreateResponse, DeleteResponse, QueryResponse, ThresholdAndUsageInfoResponse, UpdateResponse
- Defined in:
- lib/autotask_ruby/response.rb
Constant Summary
Constants included from Constants
Constants::AUTOTASK_TIME_FORMAT
Instance Attribute Summary collapse
-
#entities ⇒ Object
Returns the value of attribute entities.
-
#entity_type ⇒ Object
Returns the value of attribute entity_type.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#return_code ⇒ Object
Returns the value of attribute return_code.
Instance Method Summary collapse
Instance Attribute Details
#entities ⇒ Object
Returns the value of attribute entities.
6 7 8 |
# File 'lib/autotask_ruby/response.rb', line 6 def entities @entities end |
#entity_type ⇒ Object
Returns the value of attribute entity_type.
6 7 8 |
# File 'lib/autotask_ruby/response.rb', line 6 def entity_type @entity_type end |
#errors ⇒ Object
Returns the value of attribute errors.
6 7 8 |
# File 'lib/autotask_ruby/response.rb', line 6 def errors @errors end |
#return_code ⇒ Object
Returns the value of attribute return_code.
6 7 8 |
# File 'lib/autotask_ruby/response.rb', line 6 def return_code @return_code end |
Instance Method Details
#initialize(client, response) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/autotask_ruby/response.rb', line 8 def initialize(client, response) @client = client @entities = [] @errors = response.xpath('//Autotask:Errors', Autotask: AutotaskRuby.configuration.namespace).text @return_code = response.xpath('//Autotask:ReturnCode', Autotask: AutotaskRuby.configuration.namespace).text.to_i @entity_type = response.xpath('//Autotask:EntityResultType', Autotask: AutotaskRuby.configuration.namespace).text.classify parse_entities(response.xpath('//Autotask:Entity', Autotask: AutotaskRuby.configuration.namespace)) end |