balihoo_lpc_client 0.7.0 → 0.7.1

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
  SHA1:
3
- metadata.gz: 7735f2922666882e13d21b9f0be18cc812e9052a
4
- data.tar.gz: 7ad9cab953a15e2226d290677146e2cc9c2af713
3
+ metadata.gz: 083a099c4103cd47e5ac0b5075582d01c01576b6
4
+ data.tar.gz: 719e0dab691ec008a9ab60737d308722a31764f5
5
5
  SHA512:
6
- metadata.gz: 1fb3bc582a128a0f971c37a566e361c2a4d3fd15bc5a741db6b314dbf3d9aa264f1e61ef59a3d94d9916727a8ab7b7c7665132f7b738064a949e8b79cdec89c6
7
- data.tar.gz: f95e9996b24db9148131d3ff0464656584c0937037bbd209070c161c116eb8e6a420edd79b1441d347c09333020420b4d979008f2f4993b13f1ede4b4d97ba85
6
+ metadata.gz: 12a74a20180da89e57a9c1d6b277aa1d71a7bb5fb589eaaa28a30e1886714b7d9f7acd80f3939d2e38e8bc19e7d5783445325bbddd82c87eed051be685a854b2
7
+ data.tar.gz: 4d8fc9c0f34e35a83fe34ac8445cedf11316dadd3630fd3146cfb8fbdfa4b7fbcde10b16e381ca29b2d3da5ec1d61cacca5de97c092ae77bc7f50a7fa006040d
@@ -30,4 +30,5 @@ module BalihooLpcClient
30
30
  class NotAuthenticatedError < BalihooLpcError; end
31
31
  class ApiSessionExpiredError < BalihooLpcError; end
32
32
  class ApiResponseError < BalihooLpcError; end
33
+ class LocationKeyNotFoundError < BalihooLpcError; end
33
34
  end
@@ -18,8 +18,11 @@ module BalihooLpcClient
18
18
 
19
19
  def handle_errors_with(klass:, response:)
20
20
  if response.is_a?(String)
21
- if response =~ /session has expired/
21
+ case response
22
+ when /session has expired/
22
23
  raise ApiSessionExpiredError, response
24
+ when /Location key: .+ not found for brand: .+/
25
+ raise LocationKeyNotFoundError, response
23
26
  else
24
27
  raise klass, response
25
28
  end
@@ -1,3 +1,3 @@
1
1
  module BalihooLpcClient
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: balihoo_lpc_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - JD Guzman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-03-09 00:00:00.000000000 Z
12
+ date: 2016-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty