Class: Celsius::Primo::SoapApi::Searcher::SearchBrief::SearchRequestTransformation::SetLocations
- Inherits:
-
Transformation::Step
- Object
- Transformation::Step
- Celsius::Primo::SoapApi::Searcher::SearchBrief::SearchRequestTransformation::SetLocations
- Defined in:
- lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/set_locations.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/set_locations.rb', line 7 def call (transformation.locations || []).each do |location| type = location[:type] || location["type"] value = location[:value] || location["value"] transformation.inner_search_request.locate("PrimoSearchRequest/Locations").first.tap do |node| node << Ox.parse("<uic:Location type=\"#{type}\" value=\"#{value}\"/>") end end end |