lib/freshbooks/freshbooks.rb
def resource(options = {})
    if options.is_a?(Hash) && options.key?(:filter) && !options[:filter].empty?
      options[:filter] = Hash[options[:filter].map {|k, v| [CGI::escape("search[#{k}]"), v] }]
    end
    super options
  end
# The new FreshBooks API wants all search/filter query string parameters as "search[key]=value" instead of "key=value",
# so we rewrite those here before letting REST::Client take care of the rest
The new FreshBooks API wants all search/filter query string parameters as "search[key]=value" instead of "key=value",
so we rewrite those here before letting REST::Client take care of the rest
The new FreshBooks API wants all search / filter query string parameters as " search [ key ] = value " instead of " key = value " so we rewrite those here before letting REST :: Client take care of the rest
def resource(options = {})
    if options.is_a?(Hash) && options.key?(:filter) && !options[:filter].empty?
      options[:filter] = Hash[options[:filter].map {|k, v| [CGI::escape("search[#{k}]"), v] }]
    end
    super options
  end
def resource ( options = { } ) if options . is_a? ( Hash ) && options . key? ( :filter ) && ! options [ :filter ] . empty? options [ :filter ] = Hash [ options [ :filter ] . map { | k , v | [ CGI :: escape ( "search[#{k}]" ) , v ] } ] end super options end
The new FreshBooks API wants all search/filter query string parameters as "search[key]=value" instead of "key=value",
so we rewrite those here before letting REST::Client take care of the rest
The new FreshBooks API wants all search / filter query string parameters as " search [ key ] = value " instead of " key = value " so we rewrite those here before letting REST :: Client take care of the rest
options