Sha256: 9f21b568cc96df677a161a0a3d3f7b4b7b6b2bc8bbbfcf8ddf2afa9799390143
Contents?: true
Size: 611 Bytes
Versions: 2
Compression:
Stored size: 611 Bytes
Contents
module Pipedrive class Person < Base include ::Pipedrive::Operations::Read include ::Pipedrive::Operations::Create include ::Pipedrive::Operations::Update include ::Pipedrive::Operations::Delete include ::Pipedrive::Utils def find_by_name(*args) params = args.extract_options! params[:term] ||= args[0] fail 'term is missing' unless params[:term] params[:search_by_email] ||= args[1] ? 1 : 0 return to_enum(:find_by_name, params) unless block_given? follow_pagination(:make_api_call, [:get, 'find'], params) { |item| yield item } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pipedrive.rb-0.2.0 | lib/pipedrive/person.rb |
pipedrive.rb-0.1.0 | lib/pipedrive/person.rb |