sepa_file_parser 0.9.0 → 0.10.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3bc89d325dfff3184b2c7c1e9246bf300624cec80eb694371b8ffed66a86ff3b
|
|
4
|
+
data.tar.gz: ce7ed8c47d0c158a235f662fd8af44148fce23f5c46b6a31c96559ea146ce126
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa561758b2159891d6bb31e9282e8f9466e6156f86f96d61e2070388f5fcb34654347bb8c769ba797e70dbf64a78e5e0f4fa002b592d228298852615cc380fdd
|
|
7
|
+
data.tar.gz: f82b5c6a1599d02b59e408b4cc734a362294bcd443e647c0d8ff798087d756b52358ef4cefdc6b52b88e2bd8b64d3b858127c6c6be71aeb4b06029e9e22e6df4
|
|
@@ -7,6 +7,20 @@ module SepaFileParser
|
|
|
7
7
|
|
|
8
8
|
def initialize(xml_data)
|
|
9
9
|
@xml_data = xml_data
|
|
10
|
+
@amount = xml_data.xpath('TtlAmt/text()').text
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def total_amount
|
|
14
|
+
SepaFileParser::Misc.to_amount(@amount)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def total_amount_in_cents
|
|
18
|
+
SepaFileParser::Misc.to_amount_in_cents(@amount)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# @return [String]
|
|
22
|
+
def currency
|
|
23
|
+
@currency ||= xml_data.xpath('TtlAmt/@Ccy').text
|
|
10
24
|
end
|
|
11
25
|
|
|
12
26
|
def payment_information_identification
|
|
@@ -16,6 +30,7 @@ module SepaFileParser
|
|
|
16
30
|
def msg_id # may be missing
|
|
17
31
|
@msg_id ||= xml_data.xpath('MsgId/text()').text
|
|
18
32
|
end
|
|
33
|
+
alias_method :message_id, :msg_id # same like in transaction.rb
|
|
19
34
|
|
|
20
35
|
def number_of_transactions
|
|
21
36
|
@number_of_transactions ||= xml_data.xpath('NbOfTxs/text()').text
|
|
@@ -137,6 +137,11 @@ module SepaFileParser
|
|
|
137
137
|
@payment_information ||= xml_data.xpath('Refs/PmtInfId/text()').text
|
|
138
138
|
end
|
|
139
139
|
|
|
140
|
+
def uetr # May be missing
|
|
141
|
+
@uetr ||= xml_data.xpath('Refs/UETR/text()').text
|
|
142
|
+
end
|
|
143
|
+
alias_method :unique_e2e_reference, :uetr
|
|
144
|
+
|
|
140
145
|
def additional_information # May be missing
|
|
141
146
|
@addition_information ||= xml_data.xpath('AddtlTxInf/text()').text
|
|
142
147
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tobias Schoknecht
|
|
@@ -29,14 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 3.13.
|
|
32
|
+
version: 3.13.2
|
|
33
33
|
type: :development
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 3.13.
|
|
39
|
+
version: 3.13.2
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: builder
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
158
|
- !ruby/object:Gem::Version
|
|
159
159
|
version: '0'
|
|
160
160
|
requirements: []
|
|
161
|
-
rubygems_version: 4.0.
|
|
161
|
+
rubygems_version: 4.0.10
|
|
162
162
|
specification_version: 4
|
|
163
163
|
summary: Gem for parsing camt, pain, ... files into a speaking object.
|
|
164
164
|
test_files: []
|