pipedrive-connect 1.2.10 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2281f9b37f07b817f422ff7d3d8b254901850051e49a14b8f9e8e5d8e6882046
4
- data.tar.gz: 52a88a1f8d811197c860821ce67937ebb381aef36b78f9a683f849f84e818e11
3
+ metadata.gz: 9893998dfcae74b8d260672486acecd728c90e0106ac31ecfa0a9346ecff7d16
4
+ data.tar.gz: 56cd3850aec29c134a9b4ebe909fed4521e082bdf7336da21fcee487bbfba162
5
5
  SHA512:
6
- metadata.gz: 8d754a927d1aff43105a9c74a2ac650a7750ddc1c092c5dfc8c45a58cecc9fa857e55aaabc3a0bed7afbd42afed9b8500514e62fa25d6491f5433531b06a10d2
7
- data.tar.gz: e84716ef498f0bd319e036c7e2fdc6df88ac9b9c0d43ab978f41ff0003721747c2a27e0db4192fee8de6c9ee862b220bf28e0d5197dd3c6353dcbb22f4fa7fa2
6
+ metadata.gz: 68014fe619c968921a3875415317fe72f4fccc9c2b9cc1860d5ce0d45d551b40d820b4a9e0caba90371066f661c584a5d782cd7cda9efeb1e11d09df6237f488
7
+ data.tar.gz: 0e890a6305abdd0fe15d7700bef130fe0d4bcb8b0de5f4dcc42b904ae83d89dedf8c1fe11afa38cdb05f40de6708e3854f14726ebbb5d87bfcbb6bfc0e00489c
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ This file contains all notable changes to this project.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
  This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
6
6
 
7
+ ## [1.2.11] - 2022-11-21
8
+
9
+ - Added `find` method for user to work for the `find` endpoint of the Pipedrive API
10
+
7
11
  ## [1.2.10] - 2022-10-19
8
12
 
9
13
  - Implement `empty?` (or `no_content?`) method on all the models when the response is No content (204 HTTP code)
data/README.md CHANGED
@@ -64,11 +64,11 @@ For example to search, retrieve, access, create, update or delete an organizatio
64
64
  # return an array of Pipedrive::Organization instances
65
65
  orgs = Pipedrive::Organization.search("Acme Inc")
66
66
 
67
- # specify it is an exact match and reduce the scope to name and address
67
+ # specify it is an exact match and reduce the scope to the fields name and address (CSV string)
68
68
  orgs = Pipedrive::Organization.search(
69
69
  "Acme Inc",
70
- extact_match: true,
71
- fields: [:name, :address]
70
+ exact_match: true,
71
+ fields: [:name, :address].join(",")
72
72
  )
73
73
 
74
74
  # Want to paginate across all the organizations sorting them by name?
@@ -116,7 +116,7 @@ In case you want to override that behavior treating **no content** as **not foun
116
116
 
117
117
  ```ruby
118
118
  Pipedrive.treat_no_content_as_not_found = true
119
- # Will raise a instance of Pipedrive::NotFoundError if subscription
119
+ # Will raise a instance of Pipedrive::NotFoundError if no content is returned
120
120
  subscription = Pipedrive::Subscription.find_by_deal(123)
121
121
  ```
122
122
 
@@ -1,5 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pipedrive
4
- class User < Resource; end
4
+ class User < Resource
5
+ # GET /v1/users/find/
6
+ # Find users by their name or email
7
+ def self.find(term, search_by_email)
8
+ params = { term: term }
9
+ params = params.merge({ search_by_email: 1 }) if search_by_email
10
+ response = request(
11
+ :get,
12
+ "#{resource_url}/find",
13
+ params
14
+ )
15
+ items = response[:data]
16
+
17
+ return [] if items.nil?
18
+
19
+ items.map { |d| new(d) }
20
+ end
21
+ end
5
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pipedrive
4
- VERSION = "1.2.10"
4
+ VERSION = "1.2.11"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipedrive-connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.10
4
+ version: 1.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Get on Board
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-20 00:00:00.000000000 Z
11
+ date: 2022-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday