Sha256: e249d995632c61ad5ea6d258bf76b0d985f06c263c944b31bc228e5398af6f74

Contents?: true

Size: 612 Bytes

Versions: 1

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true

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 search(*args, &block)
      params = args.extract_options!
      params[:term] ||= args[0]
      raise 'term is missing' unless params[:term]

      params[:fields] ||= args[1]
      return to_enum(:search, params) unless block_given?

      follow_pagination(:make_api_call, [:get, 'search'], params, &block)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pipedrive_api_rb-1.0.2 lib/pipedrive/person.rb