sepa_file_parser 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sepa_file_parser/general/transaction.rb +16 -0
- data/lib/sepa_file_parser/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: dc1b49342df2ec9e64acf292db190c7a0f18faa8ac3b687f0411abdc09b17095
|
4
|
+
data.tar.gz: 44a28b13cbff5ec5d953f990d51ba927dd4851c12e661097126529c13bf4c922
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5e447b025c72c012230d773d67ce6d55cbbc6cf3c88da7c9c3c97e9cc8b112d8eea2c56a1b199826f63c92f1446bccd36258cd22a0fa43aa7dbc5fec883d198
|
7
|
+
data.tar.gz: 0eab576311fa01993d1499ca6050330ebd373075f4a0165071b527df5f2fb79d6ea81c77c51d2335d7785df4131d633b005b32bb5edf88ab918312c45490caa4
|
@@ -82,6 +82,18 @@ module SepaFileParser
|
|
82
82
|
@reference ||= xml_data.xpath('Refs/InstrId/text()').text
|
83
83
|
end
|
84
84
|
|
85
|
+
def original_currency_amount # May be missing
|
86
|
+
@original_currency_amount ||= SepaFileParser::Misc.to_amount(parse_original_currency_amount)
|
87
|
+
end
|
88
|
+
|
89
|
+
def original_currency # May be missing
|
90
|
+
@original_currency ||= xml_data.xpath('AmtDtls/InstdAmt/Amt/@Ccy').text
|
91
|
+
end
|
92
|
+
|
93
|
+
def exchange_rate # May be missing
|
94
|
+
@exchange_rate ||= xml_data.xpath('AmtDtls/TxAmt/CcyXchg/XchgRate/text()').text
|
95
|
+
end
|
96
|
+
|
85
97
|
def bank_reference # May be missing
|
86
98
|
@bank_reference ||= xml_data.xpath('Refs/AcctSvcrRef/text()').text
|
87
99
|
end
|
@@ -120,6 +132,10 @@ module SepaFileParser
|
|
120
132
|
|
121
133
|
private
|
122
134
|
|
135
|
+
def parse_original_currency_amount
|
136
|
+
xml_data.xpath('AmtDtls/InstdAmt/Amt/text()').text
|
137
|
+
end
|
138
|
+
|
123
139
|
def parse_amount
|
124
140
|
if xml_data.xpath('Amt').any?
|
125
141
|
xml_data.xpath('Amt/text()').text
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-15 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rake
|