deltavista_crif_dva_interface 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,6 @@ module DeltavistaCrifDvaInterface
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def to_xml(address)
|
23
|
-
puts address.inspect
|
24
23
|
builder = Nokogiri::XML::Builder.new(:encoding => @config[:encoding]) do |xml|
|
25
24
|
xml.dvaCheckRequest {
|
26
25
|
xml.identity {
|
@@ -46,8 +45,8 @@ module DeltavistaCrifDvaInterface
|
|
46
45
|
if valid_response? xml_doc
|
47
46
|
address = {}
|
48
47
|
metadata = {}
|
49
|
-
xml_doc.xpath("//private").each do |private_node|
|
50
|
-
%w(addressId birthDate sex
|
48
|
+
xml_doc.xpath("//dvaCheckResponse/private").each do |private_node|
|
49
|
+
%w(addressId birthDate sex lastName firstName maidenName street house poBox zip city country phone).each do |key|
|
51
50
|
if key == "country"
|
52
51
|
address[key.downcase.to_sym] = convert_country(get_value(private_node, key))
|
53
52
|
else
|
@@ -56,8 +55,8 @@ module DeltavistaCrifDvaInterface
|
|
56
55
|
end
|
57
56
|
end
|
58
57
|
|
59
|
-
xml_doc.xpath("//private/payLoad/highestAddress/private").each do |private_node|
|
60
|
-
%w(
|
58
|
+
xml_doc.xpath("//dvaCheckResponse/private/payLoad/highestAddress/private").each do |private_node|
|
59
|
+
%w(lastName firstName maidenName street house poBox zip city country phone).each do |key|
|
61
60
|
if key == "country"
|
62
61
|
address[key.downcase.to_sym] = convert_country(get_value(private_node, key))
|
63
62
|
else
|
@@ -80,7 +79,7 @@ module DeltavistaCrifDvaInterface
|
|
80
79
|
|
81
80
|
[address, metadata]
|
82
81
|
else
|
83
|
-
raise NotFoundError
|
82
|
+
raise NotFoundError.new(2, "Test")
|
84
83
|
end
|
85
84
|
end
|
86
85
|
|