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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8cf1ca0778bd7e64ae81296aa6dadb5414c80aea
4
- data.tar.gz: 698516d5a4b3e43e7b44325a03cc20f7675b6849
3
+ metadata.gz: 8736fc189f694a87cf8fa4d9a5196d8dccb7244d
4
+ data.tar.gz: 35c553782dc058139212ce9f5fcad13cf722e000
5
5
  SHA512:
6
- metadata.gz: 06bd3d79d91911456744b179287d78f6b752b063d4e4a02a8cb8205ba9b4ee72d1ef97d6cd50cc09e62bcba302ffe0cc97676a249f418a596d8d506497a12024
7
- data.tar.gz: 35863aff023fc454d73bdd4bcfde829158682ff5685e0ae2445661dadbd6504bf47314b5963f67d7c92feeb0174f164df83dacdb53dfcc398c0213ea721415ed
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
@@ -1,3 +1,10 @@
1
+ 3.5.15
2
+ - UnauthorizedError on invalid token
3
+ - BlockerUserError on restoring blocked user
4
+
5
+ 3.5.14
6
+ - Rate Limit Exception (@jaimeiniesta)
7
+
1
8
  3.5.12
2
9
  - Use base_url in initialize parameter
3
10
 
@@ -23,8 +23,8 @@ module Intercom
23
23
  end
24
24
  end
25
25
 
26
- # Raised when the credentials you provide don't match a valid account on Intercom.
27
- # Check that you have set <b>Intercom.app_id=</b> and <b>Intercom.app_api_key=</b> correctly.
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
@@ -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"
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "3.5.14"
2
+ VERSION = "3.5.15"
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.5.14
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-05-19 00:00:00.000000000 Z
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.5.1
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: