pipedrive.rb icon indicating copy to clipboard operation
pipedrive.rb copied to clipboard

Support find_by_name for Organizations

Open rmorlok opened this issue 7 years ago • 9 comments

Currently, the person class supports find_by_name, but this is also available in the API for organizations. Please add support for that class as well.

rmorlok avatar Nov 07 '18 00:11 rmorlok

Ah, sorry, this already exists. It looks like the gem just hasn't been updated. Could we get a new version of the gem?

Thanks!

rmorlok avatar Nov 07 '18 00:11 rmorlok

I think it's resolved

We use finding organisations by term (this means also in other string fields)

choosen avatar Apr 01 '19 12:04 choosen

So term searches beyond just the name? This would be good for some cases, but not if you are specifically searching by name.

Per my second comment, the code actually supports searching by name, a new release of the gem just hasn't been pushed since that change was made. Can you push a new version of the gem?

rmorlok avatar Apr 01 '19 13:04 rmorlok

Yeah, term aims in different fields also.

This is gem which uses public API

there is no other way to query it according to: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/get_organizations_find

choosen avatar Apr 01 '19 14:04 choosen

Ah, I see what you mean. The find_by_name method is actually implemented as a term search, regardless.

Perhaps I'm missing something, but I'm not seeing anything in the ruby code for how to do a term search for an organization. If you could point me to it, I'd appreciate it.

Per my previous messages, there is the following code which is labeled as find_by_name (which does the term search), but it is not part of the current version of the gem, and I was hoping you could release it as a new version.

https://github.com/amoniacou/pipedrive.rb/blob/master/lib/pipedrive/organization.rb#L9

rmorlok avatar Apr 01 '19 14:04 rmorlok

oh true that, it's not released ; /

merged 3 years ago

we use gem 'pipedrive.rb', git: 'https://github.com/amoniacou/pipedrive.rb.git'

choosen avatar Apr 01 '19 17:04 choosen

@rmorlok @choosen, Can you share example of find_by_name example for organization. And how to find unique organization using unique attributes i.e. name or other field. kindly guide about it.

when I try by name, client = ::Pipedrive::Organization.new(ENV[‘PIPEDRIVE_API_TOKEN’]) client.find_by_name(‘name’) , it return result like #<Enumerator: #<Pipedrive::Organization:0x00007f06a0ab8210 @api_token=“my_api_token”>:find_by_name(term: name)>

image

9211ali avatar May 14 '23 04:05 9211ali

sorry , not in the project with pipedrive anymore. Cannot paste it

choosen avatar May 17 '23 08:05 choosen

Unfortunately I don't have access to the project using pipedrive as well.

rmorlok avatar May 17 '23 13:05 rmorlok