def contact(element, type)
node(element) do |raw|
address = (raw["Address"] || "").split("\n")
company = address.size == 6 ? address.shift : nil
Record::Contact.new(
:id => raw["ContactID"],
:type => type,
:name => raw["Name"],
:organization => raw["Organization"] || company,
:address => address[0],
:city => address[1],
:zip => address[2],
:state => address[3],
:country_code => address[4],
:created_on => raw["Created"] ? Time.parse(raw["Created"]) : nil,
:updated_on => raw["Last Update"] ? Time.parse(raw["Last Update"]) : nil
)
end
end