deltavista_crif_dva_interface 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
@@ -71,6 +71,24 @@ module DeltavistaCrifDvaInterface
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
# Takes an address object and sends it as XML to the DeltaVista-Interface.
|
75
|
+
# The XML-Response will be converted back into an address object and returned.
|
76
|
+
# If no address is available the method returns nil.
|
77
|
+
#
|
78
|
+
# If the Service is not available a StandardError will be thrown.
|
79
|
+
#
|
80
|
+
# @param address [Struct] collection of the address to scan
|
81
|
+
# @param collection [Struct] collection to scan
|
82
|
+
# @return [Struct] address Record
|
83
|
+
def collection_check(address, collection)
|
84
|
+
@parser = CollectionCheck.new @config
|
85
|
+
request_body = @parser.to_xml(address, collection)
|
86
|
+
headers = {'Content-Type' => 'text/xml'}
|
87
|
+
post_http_request(@url, request_body, headers) do |data|
|
88
|
+
extract_response data
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
74
92
|
# @param xml_body [String] XML Body to parse
|
75
93
|
# @return [Struct] XML Body converted to hash
|
76
94
|
def extract_response(xml_body)
|