lib/wego/search.rb in wego-0.1.4 vs lib/wego/search.rb in wego-0.1.5

- old
+ new

@@ -1,13 +1,17 @@ require "wego/result" module Wego class Search - def self.create(search_terms) - search_terms[:check_in] = Wego.format_date(search_terms[:check_in]) - search_terms[:check_out] = Wego.format_date(search_terms[:check_out]) - - Wego.get_resource "search/new", search_terms + def self.create(location_id:, check_in:, check_out:, user_ip:, **options) + Wego.get_resource( + "search/new", + location_id: location_id, + check_in: Wego.format_date(check_in), + check_out: Wego.format_date(check_out), + user_ip: user_ip, + **options + ) end end def self.format_date(date) DateTime.parse(date).strftime("%Y-%m-%d")