Class: Skala::PrimoAdapter::Search::RequestTransformation::SetLocations

Inherits:
Transformator::Transformation::Step
  • Object
show all
Defined in:
lib/skala/primo_adapter/search/request_transformation/set_locations.rb

Instance Method Summary collapse

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/skala/primo_adapter/search/request_transformation/set_locations.rb', line 8

def call
  transformation.locations.each do |_location|
    transformation.inner_search_request.locate("PrimoSearchRequest/Locations").first.tap do |_node|
      _node << Ox.parse(
        <<-xml
          <uic:Location type="#{_location[:type]}" value="#{_location[:value]}"/>
        xml
      )
    end
  end
end