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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 708ce733ee0e370b127a9cd6a112cd51b736e5b5
4
- data.tar.gz: e5b89d798adcb026df69012aef5632fc60c07081
3
+ metadata.gz: 72074a3a5bc6699bf1a5d17aa79b7653fb1b5bc7
4
+ data.tar.gz: 46aab387557d19fa6db6a0b7d5b588640afb01f0
5
5
  SHA512:
6
- metadata.gz: 3c6390d4a7aabf7d7a7ae5e25ef904cbea0c0c66a4f17370da73d9b9df2d9e27574018f6dc906f55e0712430660e61945997e8464beac30218102da8eb469e19
7
- data.tar.gz: 2a22d0138af9458459c946591f6fb55ed88beb2919f1d7b0fbe68c17c560da98a44f19b9f4a34a7ba931719a27837a9921040de71c8a4b90baa79ada938a7bf8
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.1'
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
@@ -1,3 +1,6 @@
1
+ 3.7.2
2
+ Added error handling for when an app's custom attribute limits have been reached.
3
+
1
4
  3.7.1
2
5
  Extra version bump after faulty previous bump
3
6
 
@@ -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
 
@@ -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"
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "3.7.2"
2
+ VERSION = "3.7.3"
3
3
  end
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.2
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-15 00:00:00.000000000 Z
18
+ date: 2019-01-18 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: minitest