lib/pipedrive/person.rb in pipedrive_api_rb-1.0.0 vs lib/pipedrive/person.rb in pipedrive_api_rb-1.0.1
- old
+ new
@@ -6,17 +6,17 @@
include ::Pipedrive::Operations::Create
include ::Pipedrive::Operations::Update
include ::Pipedrive::Operations::Delete
include ::Pipedrive::Utils
- def find_by_name(*args, &block)
+ def search(*args, &block)
params = args.extract_options!
params[:term] ||= args[0]
raise 'term is missing' unless params[:term]
- params[:search_by_email] ||= args[1] ? 1 : 0
+ params[:fields] ||= args[1]
return to_enum(:find_by_name, params) unless block_given?
- follow_pagination(:make_api_call, [:get, 'find'], params, &block)
+ follow_pagination(:make_api_call, [:get, 'search'], params, &block)
end
end
end