atol 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +2 -2
- data/lib/atol.rb +1 -0
- data/lib/atol/config.rb +1 -0
- data/lib/atol/request/post_document/sell/body.rb +9 -8
- data/lib/atol/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e641c3da1fd82f9b25d4d6f7945758211f2a304c
|
4
|
+
data.tar.gz: ffa5be8712a96c1fa5767289e5fb26735ecfd573
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8af070acadff92c07ea6bb74e21ea48b6ac78b94baea32edab622a60b44b3e53ca745a1033611c847cdf508bef08adc708626b37d1d80f6548471ccd580faa1b
|
7
|
+
data.tar.gz: 8d6c72068f8ba205e7260ce7f1f22beb6e365406a16171e11c0157f88cc536a3b74747947b9c906c6e77142d32456cb6d935c38be52a442a5739f34b2558811f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
atol (0.4.
|
4
|
+
atol (0.4.2)
|
5
5
|
anyway_config (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -9,7 +9,7 @@ GEM
|
|
9
9
|
specs:
|
10
10
|
addressable (2.5.2)
|
11
11
|
public_suffix (>= 2.0.2, < 4.0)
|
12
|
-
anyway_config (1.
|
12
|
+
anyway_config (1.1.3)
|
13
13
|
ast (2.3.0)
|
14
14
|
coveralls (0.8.21)
|
15
15
|
json (>= 1.8, < 3)
|
data/lib/atol.rb
CHANGED
data/lib/atol/config.rb
CHANGED
@@ -29,8 +29,8 @@ module Atol
|
|
29
29
|
def body
|
30
30
|
@body ||= body_template.tap do |result|
|
31
31
|
result[:external_id] = @external_id
|
32
|
-
result[:receipt][:
|
33
|
-
result[:receipt][:
|
32
|
+
result[:receipt][:client][:email] = @email unless @email.empty?
|
33
|
+
result[:receipt][:client][:phone] = @phone unless @phone.empty?
|
34
34
|
result[:service][:callback_url] = @config.callback_url if @config.callback_url
|
35
35
|
|
36
36
|
total = @items.inject(0) { |sum, item| sum += item[:sum] }
|
@@ -44,8 +44,12 @@ module Atol
|
|
44
44
|
def body_template
|
45
45
|
{
|
46
46
|
receipt: {
|
47
|
-
|
48
|
-
|
47
|
+
client: {},
|
48
|
+
company: {
|
49
|
+
inn: @config.inn.to_s,
|
50
|
+
sno: @config.default_sno,
|
51
|
+
payment_address: @config.payment_address,
|
52
|
+
email: @config.company_email
|
49
53
|
},
|
50
54
|
items: [],
|
51
55
|
payments: [
|
@@ -55,10 +59,7 @@ module Atol
|
|
55
59
|
}
|
56
60
|
]
|
57
61
|
},
|
58
|
-
service: {
|
59
|
-
inn: @config.inn.to_s,
|
60
|
-
payment_address: @config.payment_address
|
61
|
-
},
|
62
|
+
service: {},
|
62
63
|
timestamp: Time.now.strftime(Atol::TIMESTAMP_FORMAT)
|
63
64
|
}
|
64
65
|
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: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GeorgeGorbanev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anyway_config
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
146
|
rubyforge_project:
|
147
|
-
rubygems_version: 2.
|
147
|
+
rubygems_version: 2.6.14
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: ATOL KaaS client for Ruby
|