Class: Exchanger::ResolveNames::Response

Inherits:
Operation::Response show all
Defined in:
lib/exchanger/operations/resolve_names.rb

Instance Attribute Summary

Attributes inherited from Operation::Response

#body, #status

Instance Method Summary collapse

Methods inherited from Operation::Response

#code, #initialize, #parse_response_message, #parse_soap_errors, #to_xml

Constructor Details

This class inherits a constructor from Exchanger::Operation::Response

Instance Method Details

#contactsObject



35
36
37
38
39
40
# File 'lib/exchanger/operations/resolve_names.rb', line 35

def contacts
  to_xml.xpath(".//t:Contact", NS).map do |node|
    item_klass = Exchanger.const_get(node.name)
    item_klass.new_from_xml(node)
  end
end

#mailboxesObject



28
29
30
31
32
33
# File 'lib/exchanger/operations/resolve_names.rb', line 28

def mailboxes
  to_xml.xpath(".//t:Mailbox", NS).map do |node|
    item_klass = Exchanger.const_get(node.name)
    item_klass.new_from_xml(node)
  end
end