module ChromedataService include HttpRestClient VEHICLE_BY_CHROMEDATA_URL = "#{BASE_URL}/UsedCarWS/UsedCarWS/UsedVehicle/Chrome".freeze def range_by_chromedata_id(chrome_id, query_params ={}) url = "#{VEHICLE_BY_CHROMEDATA_URL}/#{chrome_id}" begin response = HTTParty.get(url, headers: headers, query: query_params) process_response(JSON.parse(response), :map_fields) rescue => e [{ error: e.to_s }, 500] end end end