camt_parser 2.12.0 → 2.14.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a14cf208512428c2b5598f13c736e42e36e8d821cf74fdc9b729545387b1243
|
4
|
+
data.tar.gz: faeb2af47c98f82135430e9586bf962ff2db1ea38b67720dd358b43156831a32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 841652ca51bd7e936feadd3f7b38a5df2bd5d18088d22bad9fc6e35c60a4519cfc4effa415c3985304a5cc3bea5943d9f9d713e659927af72cf5c760b93c24e4
|
7
|
+
data.tar.gz: 0f8a1bfa248544999e7849d581b4eb2a88d7c80cb153d74b9a56a974c67d8e9525c54ff522c5f724799195fe7d5cb0a2366380f98975c9cf8334d58310b0b02b
|
@@ -37,8 +37,9 @@ module CamtParser
|
|
37
37
|
@opening_balance ||= begin
|
38
38
|
bal = @xml_data.xpath('Bal/Tp//Cd[contains(text(), "PRCD")]').first.ancestors('Bal')
|
39
39
|
date = bal.xpath('Dt/Dt/text()').text
|
40
|
+
credit = bal.xpath('CdtDbtInd/text()').text == 'CRDT'
|
40
41
|
currency = bal.xpath('Amt').attribute('Ccy').value
|
41
|
-
CamtParser::AccountBalance.new bal.xpath('Amt/text()').text, currency, date,
|
42
|
+
CamtParser::AccountBalance.new bal.xpath('Amt/text()').text, currency, date, credit
|
42
43
|
end
|
43
44
|
end
|
44
45
|
alias_method :opening_or_intermediary_balance, :opening_balance
|
@@ -47,8 +48,9 @@ module CamtParser
|
|
47
48
|
@closing_balance ||= begin
|
48
49
|
bal = @xml_data.xpath('Bal/Tp//Cd[contains(text(), "CLBD")]').first.ancestors('Bal')
|
49
50
|
date = bal.xpath('Dt/Dt/text()').text
|
51
|
+
credit = bal.xpath('CdtDbtInd/text()').text == 'CRDT'
|
50
52
|
currency = bal.xpath('Amt').attribute('Ccy').value
|
51
|
-
CamtParser::AccountBalance.new bal.xpath('Amt/text()').text, currency, date,
|
53
|
+
CamtParser::AccountBalance.new bal.xpath('Amt/text()').text, currency, date, credit
|
52
54
|
end
|
53
55
|
end
|
54
56
|
alias_method :closing_or_intermediary_balance, :closing_balance
|
@@ -41,18 +41,19 @@ module CamtParser
|
|
41
41
|
@opening_balance ||= begin
|
42
42
|
bal = @xml_data.xpath('Bal/Tp//Cd[contains(text(), "OPBD") or contains(text(), "PRCD")]').first.ancestors('Bal')
|
43
43
|
date = bal.xpath('Dt/Dt/text()').text
|
44
|
+
credit = bal.xpath('CdtDbtInd/text()').text == 'CRDT'
|
44
45
|
currency = bal.xpath('Amt').attribute('Ccy').value
|
45
|
-
AccountBalance.new bal.xpath('Amt/text()').text, currency, date,
|
46
|
+
AccountBalance.new bal.xpath('Amt/text()').text, currency, date, credit
|
46
47
|
end
|
47
48
|
end
|
48
|
-
alias_method :opening_or_intermediary_balance, :opening_balance
|
49
49
|
|
50
50
|
def closing_balance
|
51
51
|
@closing_balance ||= begin
|
52
52
|
bal = @xml_data.xpath('Bal/Tp//Cd[contains(text(), "CLBD")]').first.ancestors('Bal')
|
53
53
|
date = bal.xpath('Dt/Dt/text()').text
|
54
|
+
credit = bal.xpath('CdtDbtInd/text()').text == 'CRDT'
|
54
55
|
currency = bal.xpath('Amt').attribute('Ccy').value
|
55
|
-
AccountBalance.new bal.xpath('Amt/text()').text, currency, date,
|
56
|
+
AccountBalance.new bal.xpath('Amt/text()').text, currency, date, credit
|
56
57
|
end
|
57
58
|
end
|
58
59
|
alias_method :closing_or_intermediary_balance, :closing_balance
|
data/lib/camt_parser/misc.rb
CHANGED
data/lib/camt_parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: camt_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 13.0.
|
19
|
+
version: 13.0.6
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 13.0.
|
26
|
+
version: 13.0.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,11 +100,11 @@ files:
|
|
100
100
|
- lib/camt_parser/string.rb
|
101
101
|
- lib/camt_parser/version.rb
|
102
102
|
- lib/camt_parser/xml.rb
|
103
|
-
homepage: https://github.com/
|
103
|
+
homepage: https://github.com/viafintech/camt_parser
|
104
104
|
licenses:
|
105
105
|
- MIT
|
106
106
|
metadata: {}
|
107
|
-
post_install_message:
|
107
|
+
post_install_message:
|
108
108
|
rdoc_options: []
|
109
109
|
require_paths:
|
110
110
|
- lib
|
@@ -119,8 +119,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
123
|
-
signing_key:
|
122
|
+
rubygems_version: 3.1.6
|
123
|
+
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: Gem for parsing camt files into a speaking object.
|
126
126
|
test_files: []
|