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)
@@ -1,3 +1,3 @@
1
1
  module DeltavistaCrifDvaInterface
2
- VERSION = '0.0.24'
2
+ VERSION = '0.0.25'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deltavista_crif_dva_interface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: