camt_parser 2.8.0 → 2.10.1
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: 60a845a56a04e83fc96028ab614225a39dbc25f2d4dc4f8f380b94d999fdceea
|
4
|
+
data.tar.gz: b67becc414021170a62cdd7390623b0d188f0aa74bf4a24923d72ba5f18fee6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c05e6f6a82c826a083f6cae07dd0bf032e28a2092c2e17d41f90130c8d3e180869e53a74873a2a0f66657231404f448223aad0649a1526db3291314d7004fd87
|
7
|
+
data.tar.gz: 4a159164beff18c387640bc8cf1b2527be0dd93e547ec6142072d87751a5b8691dea85fec3c3faae06ac0077c8338c2076013432e4b981a6e8bc076eaafb0cd1
|
@@ -8,6 +8,10 @@ module CamtParser
|
|
8
8
|
@payment_information_identification ||= @xml_data.xpath('PmtInfId/text()').text
|
9
9
|
end
|
10
10
|
|
11
|
+
def msg_id # may be missing
|
12
|
+
@msg_id ||= @xml_data.xpath('MsgId/text()').text
|
13
|
+
end
|
14
|
+
|
11
15
|
def number_of_transactions
|
12
16
|
@number_of_transactions ||= @xml_data.xpath('NbOfTxs/text()').text
|
13
17
|
end
|
@@ -105,6 +105,10 @@ module CamtParser
|
|
105
105
|
@addition_information ||= @xml_data.xpath('AddtlTxInf/text()').text
|
106
106
|
end
|
107
107
|
|
108
|
+
def reason_code # May be missing
|
109
|
+
@reason_code ||= @xml_data.xpath('RtrInf/Rsn/Cd/text()').text
|
110
|
+
end
|
111
|
+
|
108
112
|
private
|
109
113
|
|
110
114
|
def parse_amount
|
data/lib/camt_parser/misc.rb
CHANGED
@@ -4,7 +4,10 @@ module CamtParser
|
|
4
4
|
def to_amount_in_cents(value)
|
5
5
|
return nil if value == nil || value.strip == ''
|
6
6
|
|
7
|
-
|
7
|
+
# Using dollars and cents as representation for parts before and after the decimal separator
|
8
|
+
dollars, cents = value.split(/,|\./)
|
9
|
+
cents ||= '0'
|
10
|
+
format('%s%s', dollars, cents.ljust(2, '0')).to_i
|
8
11
|
end
|
9
12
|
|
10
13
|
def to_amount(value)
|
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.10.1
|
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: 2022-05-04 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:
|
19
|
+
version: 13.0.1
|
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:
|
26
|
+
version: 13.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version: '0'
|
69
69
|
description: A parser for the Camt file format
|
70
70
|
email:
|
71
|
-
- tobias.schoknecht@
|
71
|
+
- tobias.schoknecht@viafintech.com
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
@@ -104,7 +104,7 @@ homepage: https://github.com/Barzahlen/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.0.
|
123
|
-
signing_key:
|
122
|
+
rubygems_version: 3.0.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: []
|