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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/atol/errors.rb +18 -0
- data/lib/atol/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eb8cdc509d9ca30ae00b7827460b82df91803c2b1586aacfbb0e2e583d2dd1cc
|
|
4
|
+
data.tar.gz: b78f27f7e553d81ae1c8f181340f7d1151a56f2940998c2b9824a7a024781b3a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d6bc22be4eec924a0d9edfa2f771fd3c4220ad14b461e4f284fd7cdde7480242c8c233e242f481cf6517645b61ab136d41a1d89604e0a63fbae6e84b0867eb3
|
|
7
|
+
data.tar.gz: 5924695be6afeac843022224de7636939596c78c7e8706420018446c2170197bdb6b0816881d083a06ef10db57b303a7da34dc7f27a4da173e8c232b092e96a3
|
data/Gemfile.lock
CHANGED
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
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.
|
|
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-
|
|
11
|
+
date: 2026-07-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: anyway_config
|