atol 1.2.0 → 1.3.0

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
  SHA256:
3
- metadata.gz: 17a1f879f910bd053721385602bc4e3c158dc10625534db847d78bdb54ee75e4
4
- data.tar.gz: 8408f2c974e2e49c3dd89745e942cc06375fbcbf050d843015fdd17d8839eae4
3
+ metadata.gz: eb8cdc509d9ca30ae00b7827460b82df91803c2b1586aacfbb0e2e583d2dd1cc
4
+ data.tar.gz: b78f27f7e553d81ae1c8f181340f7d1151a56f2940998c2b9824a7a024781b3a
5
5
  SHA512:
6
- metadata.gz: 05c52df6c9b2bfcd04c47a09a2e71f1e1eec304809cba41c1e858431c6a141eeca774191ebd8488c88a97225dad0a3524af12d9bc018d0c66a29a0a279b81698
7
- data.tar.gz: 5e034691a9b942dab227b3c2341b1379aebe787d6b71b9eee895387c8caee014e17da56a1588b2479d9852c21e5fe5646ef2ef7bcb15fc26141e4be7bdc90c37
6
+ metadata.gz: 1d6bc22be4eec924a0d9edfa2f771fd3c4220ad14b461e4f284fd7cdde7480242c8c233e242f481cf6517645b61ab136d41a1d89604e0a63fbae6e84b0867eb3
7
+ data.tar.gz: 5924695be6afeac843022224de7636939596c78c7e8706420018446c2170197bdb6b0816881d083a06ef10db57b303a7da34dc7f27a4da173e8c232b092e96a3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- atol (1.1.0)
4
+ atol (1.3.0)
5
5
  anyway_config (~> 1.0)
6
6
 
7
7
  GEM
data/lib/atol/errors.rb CHANGED
@@ -7,31 +7,49 @@ module Atol
7
7
  class ConfigExpectedError < StandardError; end
8
8
  class UnknownOperationError < StandardError; end
9
9
  class BadJSONError < StandardError; end
10
+ class IncomingChequeProcessingFailedError < StandardError; end
10
11
  class IncomingOperationNotSupportError < StandardError; end
11
12
  class IncomingMissingTokenError < StandardError; end
12
13
  class IncomingExpiredTokenError < StandardError; end
14
+ class WrongLoginOrPasswordError < StandardError; end
15
+ class ValidationError < StandardError; end
16
+ class UserBlockedError < StandardError; end
13
17
  class IncomingExistExternalIdError < StandardError; end
14
18
  class GroupCodeToTokenError < StandardError; end
19
+ class NotSupportedGroupCodeError < StandardError; end
15
20
  class EmptyClientContactError < StandardError; end
16
21
  class EmptySellItemsError < StandardError; end
17
22
  class IncomingValidationError < StandardError; end
18
23
  class StateMissingUuidError < StandardError; end
19
24
  class StateNotFoundError < StandardError; end
25
+ class BadRequestError < StandardError; end
26
+ class UnsupportedMediaTypeError < StandardError; end
27
+ class ErrorServerConfigurationError < StandardError; end
20
28
  class ZeroItemQuantityError < StandardError; end
21
29
  class BadPaymentError < StandardError; end
22
30
  class EmptyPaymentsError < StandardError; end
23
31
  class PaymentsTotalMismatchError < StandardError; end
24
32
 
33
+ # Service-level error codes (v5 protocol, section 7.1 "Ошибки сервиса"),
34
+ # keyed by the integer error.code returned in the service response.
25
35
  ERRORS = Hash[
26
36
  0 => BadJSONError,
37
+ 1 => IncomingChequeProcessingFailedError,
27
38
  10 => IncomingMissingTokenError,
28
39
  11 => IncomingExpiredTokenError,
40
+ 12 => WrongLoginOrPasswordError,
41
+ 13 => ValidationError,
42
+ 14 => UserBlockedError,
29
43
  20 => GroupCodeToTokenError,
44
+ 21 => NotSupportedGroupCodeError,
30
45
  30 => StateMissingUuidError,
31
46
  31 => IncomingOperationNotSupportError,
32
47
  32 => IncomingValidationError,
33
48
  33 => IncomingExistExternalIdError,
34
49
  34 => StateNotFoundError,
50
+ 40 => BadRequestError,
51
+ 41 => UnsupportedMediaTypeError,
52
+ 50 => ErrorServerConfigurationError,
35
53
  -3804 => ZeroItemQuantityError
36
54
  ].freeze
37
55
  end
data/lib/atol/version.rb CHANGED
@@ -8,6 +8,6 @@ module Atol
8
8
  V4_TEST = 'https://testonline.atol.ru/possystem/v4'
9
9
  V5_TEST = 'https://testonline.atol.ru/possystem/v5'
10
10
 
11
- LIB = '1.2.0'
11
+ LIB = '1.3.0'
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atol
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GeorgeGorbanev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-28 00:00:00.000000000 Z
11
+ date: 2026-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config