cin7_api 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: 056166ba00f5465bd7aa38f23e82a384f0690cb4edaddf990d6794cd30785736
4
- data.tar.gz: 9cc3abe5f31a1c51a063dfd52e30a040dcab70078f1d54f26df6c71fa61e0cdb
3
+ metadata.gz: 3649d7406e010700d3596d03c8022a197e1bfbe200d4271a0259da223bad6b47
4
+ data.tar.gz: f2502dadc70812ab8065b4020f989fb9e9d7ffd09963d90f9b90f4a7e0209c8a
5
5
  SHA512:
6
- metadata.gz: b2d9165f321d846269107172ee3da875725e086cbf20246f2a9dc70de0ecbc51f3595d76829eca8ff285dc3c908ff3398ea643bf6575d0832dca0889202f8927
7
- data.tar.gz: 1a14d8c4a9977f810609cdaec318edc69801cc2fba5b4825b57d878dd3c813e3c2f09d00ccd705cd3305ec4c5580d907ef2ec4996e3ddd7810bccdf978a83c54
6
+ metadata.gz: 9297145c475bf521d10fa9a5e60338eb3dd5b642b15d720fa035c3da5b84ff7f852cee1539257bceb895e24245b64adf159e02052fd3345218b401bc1868fbb2
7
+ data.tar.gz: f67e0f395798aeecd3ffd893f787d8d0ab6ba6cc3b7aa94bcc152a1f9a53cb19cebac245e5ba081a98442fbdfd408d69b39796b7dca74d272b51ce626664e507
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cin7_api (1.1.0)
4
+ cin7_api (1.1.1)
5
5
  activesupport
6
6
  faraday (~> 2.5)
7
7
  zeitwerk
@@ -19,16 +19,16 @@ GEM
19
19
  concurrent-ruby (1.2.2)
20
20
  diff-lcs (1.5.0)
21
21
  dotenv (2.8.1)
22
- faraday (2.7.5)
22
+ faraday (2.7.6)
23
23
  faraday-net_http (>= 2.0, < 3.1)
24
24
  ruby2_keywords (>= 0.0.4)
25
25
  faraday-net_http (3.0.2)
26
- i18n (1.13.0)
26
+ i18n (1.14.1)
27
27
  concurrent-ruby (~> 1.0)
28
28
  json (2.6.3)
29
29
  language_server-protocol (3.17.0.3)
30
30
  method_source (1.0.0)
31
- minitest (5.18.0)
31
+ minitest (5.18.1)
32
32
  parallel (1.22.1)
33
33
  parser (3.2.2.0)
34
34
  ast (~> 2.4.1)
@@ -9,4 +9,10 @@ module Cin7API
9
9
 
10
10
  class RateLimitError < StandardError
11
11
  end
12
+
13
+ class AuthenticationError < StandardError
14
+ end
15
+
16
+ class PermissionError < StandardError
17
+ end
12
18
  end
@@ -29,9 +29,9 @@ module Cin7API
29
29
  when 400
30
30
  raise Error, "A bad request or a validation exception has occurred. #{error_message}"
31
31
  when 401
32
- raise Error, "Invalid authorization credentials. #{error_message}"
32
+ raise AuthenticationError, "Invalid authorization credentials. #{error_message}"
33
33
  when 403
34
- raise Error, "Connection doesn't have permission to access the resource. #{error_message}"
34
+ raise PermissionError, "Connection doesn't have permission to access the resource. #{error_message}"
35
35
  when 404
36
36
  raise Error, "The resource you have specified cannot be found. #{error_message}"
37
37
  when 429
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cin7API
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cin7_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wei Zhe Heng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2023-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport