IsraelOrtuno / pipedrive

Complete Pipedrive API client for PHP
MIT License
166 stars 58 forks source link

Find deal by custom field #103

Closed techguydev closed 3 years ago

techguydev commented 3 years ago

I need to find a deal by its custom field ID.

is it possible?

techguydev commented 3 years ago

Maybe findByName method would work?

<?php

namespace Devio\Pipedrive\Resources\Traits;

use Devio\Pipedrive\Http\Response;

trait FindsByName
{
    /**
     * Find an element by name.
     *
     * @param       $term
     * @param array $options
     * @return Response
     */
    public function findByName($term, $options = [])
    {
        $options['term'] = $term;

        return $this->request->get('find', $options);
    }
}