Class: Pipedrive::Organization

Inherits:
Base
  • Object
show all
Includes:
Pipedrive::Operations::Create, Pipedrive::Operations::Delete, Pipedrive::Operations::Read, Pipedrive::Operations::Update, Utils
Defined in:
lib/pipedrive/organization.rb

Instance Method Summary collapse

Methods included from Utils

#follow_pagination

Methods included from Pipedrive::Operations::Delete

#delete, #delete_all

Methods included from Pipedrive::Operations::Update

#update

Methods included from Pipedrive::Operations::Create

#create

Methods included from Pipedrive::Operations::Read

#all, #chunk, #each, #find

Methods inherited from Base

#build_url, #connection, connection, #entity_name, #failed_response, faraday_options, #initialize, #make_api_call, #process_response

Constructor Details

This class inherits a constructor from Pipedrive::Base

Instance Method Details

#search(*args, &block) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/pipedrive/organization.rb', line 11

def search(*args, &block)
  params = args.extract_options!
  params[:term] ||= args[0]
  raise 'term is missing' unless params[:term]

  return to_enum(:search, params) unless block

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