Sha256: b7a4c0b0ecfbca492245ea1b00e89456d2e9eb2ba74afa194acd984dfab96ff9

Contents?: true

Size: 577 Bytes

Versions: 2

Compression:

Stored size: 577 Bytes

Contents

# frozen_string_literal: true

module Pipedrive
  class Organization < 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]

      return to_enum(:search, params) unless block

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pipedrive_api_rb-1.0.5 lib/pipedrive/organization.rb
pipedrive_api_rb-1.0.4 lib/pipedrive/organization.rb