camt_parser 2.16.0 → 2.18.0
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 +4 -4
- data/lib/camt_parser/general/entry.rb +5 -0
- data/lib/camt_parser/general/transaction.rb +16 -0
- data/lib/camt_parser/version.rb +1 -1
- metadata +17 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65159c9e17355d90b7a3de05def06771c26a634a16bf6a6b3c7c3fed4d0175de
|
4
|
+
data.tar.gz: d4fe464522603dcb074279bebd12b915a43d3f1cd366f33c48e24b4d91c5324b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4501cfc93989d6889a607df03f17eb49da240348c2a2fee8ae8a0af3f70619ba00b8da18525e9501fcc9709d39767fd3737bde0eb6e4224782792b0b9aa4a9f
|
7
|
+
data.tar.gz: 33f48ff56fb46a51be30c538ad692e7a0ca8ba4b6a58087d9b657f333670cee823b5c9b47d4a56c0e2a090e4d0cb6c564493db09cbff07b88b0b6bc092034ca0
|
@@ -51,6 +51,11 @@ module CamtParser
|
|
51
51
|
@bank_reference ||= xml_data.xpath('AcctSvcrRef/text()').text
|
52
52
|
end
|
53
53
|
|
54
|
+
# @return [String]
|
55
|
+
def reference # May be missing
|
56
|
+
@reference ||= xml_data.xpath('NtryRef/text()').text
|
57
|
+
end
|
58
|
+
|
54
59
|
# @return [Array<CamtParser::Transaction>]
|
55
60
|
def transactions
|
56
61
|
@transactions ||= parse_transactions
|
@@ -80,6 +80,18 @@ module CamtParser
|
|
80
80
|
@reference ||= xml_data.xpath('Refs/InstrId/text()').text
|
81
81
|
end
|
82
82
|
|
83
|
+
def original_currency_amount # May be missing
|
84
|
+
@original_currency_amount ||= CamtParser::Misc.to_amount(parse_original_currency_amount)
|
85
|
+
end
|
86
|
+
|
87
|
+
def original_currency # May be missing
|
88
|
+
@original_currency ||= xml_data.xpath('AmtDtls/InstdAmt/Amt/@Ccy').text
|
89
|
+
end
|
90
|
+
|
91
|
+
def exchange_rate # May be missing
|
92
|
+
@exchange_rate ||= xml_data.xpath('AmtDtls/TxAmt/CcyXchg/XchgRate/text()').text
|
93
|
+
end
|
94
|
+
|
83
95
|
def bank_reference # May be missing
|
84
96
|
@bank_reference ||= xml_data.xpath('Refs/AcctSvcrRef/text()').text
|
85
97
|
end
|
@@ -118,6 +130,10 @@ module CamtParser
|
|
118
130
|
|
119
131
|
private
|
120
132
|
|
133
|
+
def parse_original_currency_amount
|
134
|
+
xml_data.xpath('AmtDtls/InstdAmt/Amt/text()').text
|
135
|
+
end
|
136
|
+
|
121
137
|
def parse_amount
|
122
138
|
if xml_data.xpath('Amt').any?
|
123
139
|
xml_data.xpath('Amt/text()').text
|
data/lib/camt_parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: camt_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-15 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rake
|
@@ -66,6 +65,20 @@ dependencies:
|
|
66
65
|
- - ">="
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: bigdecimal
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
type: :runtime
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
69
82
|
description: A parser for the Camt file format
|
70
83
|
email:
|
71
84
|
- tobias.schoknecht@viafintech.com
|
@@ -105,7 +118,6 @@ homepage: https://github.com/viafintech/camt_parser
|
|
105
118
|
licenses:
|
106
119
|
- MIT
|
107
120
|
metadata: {}
|
108
|
-
post_install_message:
|
109
121
|
rdoc_options: []
|
110
122
|
require_paths:
|
111
123
|
- lib
|
@@ -120,8 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
132
|
- !ruby/object:Gem::Version
|
121
133
|
version: '0'
|
122
134
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
124
|
-
signing_key:
|
135
|
+
rubygems_version: 3.6.2
|
125
136
|
specification_version: 4
|
126
137
|
summary: Gem for parsing camt files into a speaking object.
|
127
138
|
test_files: []
|