intercom 3.5.14 → 3.5.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/changes.txt +7 -0
- data/lib/intercom/errors.rb +6 -2
- data/lib/intercom/request.rb +3 -1
- data/lib/intercom/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8736fc189f694a87cf8fa4d9a5196d8dccb7244d
|
4
|
+
data.tar.gz: 35c553782dc058139212ce9f5fcad13cf722e000
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba36260e11e2dda2c3b6f4a44e683e3d442e85923b35ffcca0a9adbb8870b23bd5cf2640cf1c4704bb36c633946b3ff9252054fe6973ba203fb665b30518a4c3
|
7
|
+
data.tar.gz: 8027f84fd08f6c0aaa992e111172892e3700bada6e2adaf0e314bf422f07ac4d5e3defe8fe8ce49230460c95d1b97be96f2113677b2a64644b2f0b573881a8ce
|
data/README.md
CHANGED
@@ -416,6 +416,7 @@ Intercom::ServerError
|
|
416
416
|
Intercom::ServiceUnavailableError
|
417
417
|
Intercom::ServiceConnectionError
|
418
418
|
Intercom::ResourceNotFound
|
419
|
+
Intercom::BlockedUserError
|
419
420
|
Intercom::BadRequestError
|
420
421
|
Intercom::RateLimitExceeded
|
421
422
|
Intercom::AttributeNotSetError # Raised when you try to call a getter that does not exist on an object
|
data/changes.txt
CHANGED
data/lib/intercom/errors.rb
CHANGED
@@ -23,8 +23,8 @@ module Intercom
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
# Raised when the
|
27
|
-
# Check that you have set
|
26
|
+
# Raised when the token you provided is incorrect or not authorized to access certain type of data.
|
27
|
+
# Check that you have set Intercom.token correctly.
|
28
28
|
class AuthenticationError < IntercomError; end
|
29
29
|
|
30
30
|
# Raised when something goes wrong on within the Intercom API service.
|
@@ -54,6 +54,9 @@ module Intercom
|
|
54
54
|
# Raised when multiple users match the query (typically duplicate email addresses)
|
55
55
|
class MultipleMatchingUsersError < IntercomError; end
|
56
56
|
|
57
|
+
# Raised when restoring a blocked user
|
58
|
+
class BlockedUserError < IntercomError ; end
|
59
|
+
|
57
60
|
# Raised when you try to call a non-setter method that does not exist on an object
|
58
61
|
class Intercom::AttributeNotSetError < IntercomError ; end
|
59
62
|
|
@@ -71,4 +74,5 @@ module Intercom
|
|
71
74
|
class Intercom::NoMethodMissingHandler < IntercomInternalError; end
|
72
75
|
|
73
76
|
class Intercom::DeserializationError < IntercomInternalError; end
|
77
|
+
|
74
78
|
end
|
data/lib/intercom/request.rb
CHANGED
@@ -139,10 +139,12 @@ module Intercom
|
|
139
139
|
:request_id => error_list_details['request_id']
|
140
140
|
}
|
141
141
|
case error_code
|
142
|
-
when 'unauthorized', 'forbidden'
|
142
|
+
when 'unauthorized', 'forbidden', 'token_not_found'
|
143
143
|
raise Intercom::AuthenticationError.new(error_details['message'], error_context)
|
144
144
|
when "bad_request", "missing_parameter", 'parameter_invalid', 'parameter_not_found'
|
145
145
|
raise Intercom::BadRequestError.new(error_details['message'], error_context)
|
146
|
+
when "not_restorable"
|
147
|
+
raise Intercom::BlockedUser.new(error_details['message'], error_context)
|
146
148
|
when "not_found"
|
147
149
|
raise Intercom::ResourceNotFound.new(error_details['message'], error_context)
|
148
150
|
when "rate_limit_exceeded"
|
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.5.
|
4
|
+
version: 3.5.15
|
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: 2017-
|
18
|
+
date: 2017-06-07 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: minitest
|
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
243
|
version: '0'
|
244
244
|
requirements: []
|
245
245
|
rubyforge_project: intercom
|
246
|
-
rubygems_version: 2.
|
246
|
+
rubygems_version: 2.4.8
|
247
247
|
signing_key:
|
248
248
|
specification_version: 4
|
249
249
|
summary: Ruby bindings for the Intercom API
|
@@ -270,3 +270,4 @@ test_files:
|
|
270
270
|
- spec/unit/intercom/user_spec.rb
|
271
271
|
- spec/unit/intercom/visitors_spec.rb
|
272
272
|
- spec/unit/intercom_spec.rb
|
273
|
+
has_rdoc:
|