sepa_file_parser 0.4.0 → 0.5.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c644e49126d13760411521d6b09a79ca5ab4556ebfe05b04061084dcd26d9e1a
|
4
|
+
data.tar.gz: e4ad27478179994fdfaa725a46b9578768f79889e985b2a5945822c9169f09e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7404de07f43c6535f6e539d098f1f5e1cb8d32503ee80b4e34def512883db628ec332f8b7d153f0ce358e9e722ee62d0f54240b5c4ba9221acf0b5f3fd1d8580
|
7
|
+
data.tar.gz: e4fd1d46fbc976a0b103b885a79b48e791fe57719083bb7337b34c1e36a41bde81419b2d81305fdb6718dbbf48f10af6ea72088a9e6fd5edd6dcf4a58daa76b1
|
@@ -40,7 +40,10 @@ module SepaFileParser
|
|
40
40
|
|
41
41
|
def opening_balance
|
42
42
|
@opening_balance ||= begin
|
43
|
-
|
43
|
+
openingNode = xml_data.xpath('Bal/Tp//Cd[contains(text(), "PRCD")]').first ||
|
44
|
+
xml_data.xpath('Bal/Tp//Cd[contains(text(), "OPBD")]').first
|
45
|
+
|
46
|
+
bal = openingNode.ancestors('Bal')
|
44
47
|
date = bal.xpath('Dt/Dt/text()').text
|
45
48
|
credit = bal.xpath('CdtDbtInd/text()').text == 'CRDT'
|
46
49
|
currency = bal.xpath('Amt').attribute('Ccy').value
|
@@ -115,7 +115,10 @@ module SepaFileParser
|
|
115
115
|
end
|
116
116
|
|
117
117
|
def creditor_identifier # May be missing
|
118
|
-
@creditor_identifier ||=
|
118
|
+
@creditor_identifier ||= [
|
119
|
+
xml_data.xpath('RltdPties/Cdtr/Id/PrvtId/Othr/Id/text()'),
|
120
|
+
xml_data.xpath('RltdPties/Cdtr/Pty/Id/PrvtId/Othr/Id/text()'),
|
121
|
+
].reject(&:empty?).first&.text
|
119
122
|
end
|
120
123
|
|
121
124
|
def payment_information # May be missing
|
@@ -5,6 +5,7 @@ require_relative './xml'
|
|
5
5
|
# Add registrations
|
6
6
|
## CAMT052
|
7
7
|
SepaFileParser::Xml.register('urn:iso:std:iso:20022:tech:xsd:camt.052.001.02', :camt052)
|
8
|
+
SepaFileParser::Xml.register('urn:iso:std:iso:20022:tech:xsd:camt.052.001.08', :camt052)
|
8
9
|
|
9
10
|
## CAMT053
|
10
11
|
SepaFileParser::Xml.register('urn:iso:std:iso:20022:tech:xsd:camt.053.001.02', :camt053)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sepa_file_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rake
|
@@ -138,7 +138,10 @@ files:
|
|
138
138
|
homepage: https://github.com/viafintech/sepa_file_parser
|
139
139
|
licenses:
|
140
140
|
- MIT
|
141
|
-
metadata:
|
141
|
+
metadata:
|
142
|
+
changelog_uri: https://github.com/viafintech/sepa_file_parser/blob/master/CHANGELOG.md
|
143
|
+
source_code_uri: https://github.com/viafintech/sepa_file_parser
|
144
|
+
bug_tracker_uri: https://github.com/viafintech/sepa_file_parser/issues
|
142
145
|
rdoc_options: []
|
143
146
|
require_paths:
|
144
147
|
- lib
|
@@ -153,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
156
|
- !ruby/object:Gem::Version
|
154
157
|
version: '0'
|
155
158
|
requirements: []
|
156
|
-
rubygems_version: 3.6.
|
159
|
+
rubygems_version: 3.6.8
|
157
160
|
specification_version: 4
|
158
161
|
summary: Gem for parsing camt, pain, ... files into a speaking object.
|
159
162
|
test_files: []
|