intercom 3.7.2 → 3.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -1
- data/changes.txt +3 -0
- data/lib/intercom/errors.rb +3 -0
- data/lib/intercom/request.rb +2 -0
- data/lib/intercom/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72074a3a5bc6699bf1a5d17aa79b7653fb1b5bc7
|
4
|
+
data.tar.gz: 46aab387557d19fa6db6a0b7d5b588640afb01f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4643efa421e81d2f548c6982e19d54b3234ae45c7b4fc1540be1200d10c533788cc58d0e3c871b6354d93586a0e8e51d9706b84a1698b2fdbf9b09db8af2a400
|
7
|
+
data.tar.gz: 11005b933a45e374f66481311aa15df949fbab2b006c4576304c9f5598ebad5c27dc22a496aec3ba3eb49e92f5b629358da8828e30096c81ac47575ab87d7564
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ This version of the gem is compatible with `Ruby 2.1` and above.
|
|
22
22
|
|
23
23
|
Using bundler:
|
24
24
|
|
25
|
-
gem 'intercom', '~> 3.7.
|
25
|
+
gem 'intercom', '~> 3.7.2'
|
26
26
|
|
27
27
|
## Basic Usage
|
28
28
|
|
@@ -91,6 +91,14 @@ intercom.users.all.map {|user| user.email }
|
|
91
91
|
intercom.users.find_all(type: 'users', page: 1, per_page: 10, created_since: 2, order: :asc).to_a.each_with_index {|usr, i| puts "#{i+1}: #{usr.name}"};
|
92
92
|
# Paginate through your list of users choosing how many to return per page (default and max is 50 per page)
|
93
93
|
intercom.users.find_all(type: 'users', page: 1, per_page: 10, order: :asc).to_a.each_with_index {|usr, i| puts "#{i+1}: #{usr.name}"}
|
94
|
+
|
95
|
+
# Duplicate users? If you have duplicate users you can search for them via their email address.
|
96
|
+
# Note this feature is only available from version 1.1 of the API so you will need to switch to that version
|
97
|
+
# This will return multiple users if they have the same email address
|
98
|
+
usrs = intercom.users.find_all(type: 'users', email: 'myemail@example.com', page: 1, per_page: 10, order: :asc)
|
99
|
+
# This returns a user.list so you can access it via
|
100
|
+
usrs.to_a.each_with_index {|usr, i| puts "#{i+1}: #{usr.id}"};
|
101
|
+
|
94
102
|
# If you have over 10,000 users then you will need to use the scroll function to list your users
|
95
103
|
# otherwise you will encounter a page limit with list all your users
|
96
104
|
# You can use the scroll method to list all your users
|
data/changes.txt
CHANGED
data/lib/intercom/errors.rb
CHANGED
@@ -51,6 +51,9 @@ module Intercom
|
|
51
51
|
# Raised when requesting resources on behalf of a user that doesn't exist in your application on Intercom.
|
52
52
|
class ResourceNotFound < IntercomError; end
|
53
53
|
|
54
|
+
# Raised when requesting an admin that doesn't exist in your Intercom workspace.
|
55
|
+
class AdminNotFound < IntercomError; end
|
56
|
+
|
54
57
|
# Raised when trying to create a resource that already exists in Intercom.
|
55
58
|
class ResourceNotUniqueError < IntercomError; end
|
56
59
|
|
data/lib/intercom/request.rb
CHANGED
@@ -168,6 +168,8 @@ module Intercom
|
|
168
168
|
raise Intercom::BlockedUserError.new(error_details['message'], error_context)
|
169
169
|
when "not_found"
|
170
170
|
raise Intercom::ResourceNotFound.new(error_details['message'], error_context)
|
171
|
+
when "admin_not_found"
|
172
|
+
raise Intercom::AdminNotFound.new(error_details['message'], error_context)
|
171
173
|
when "rate_limit_exceeded"
|
172
174
|
raise Intercom::RateLimitExceeded.new(error_details['message'], error_context)
|
173
175
|
when "custom_data_limit_reached"
|
data/lib/intercom/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intercom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben McRedmond
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2019-01-
|
18
|
+
date: 2019-01-18 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: minitest
|