sepa_file_parser 0.5.1 → 0.6.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: 2cb401c65a44c25eadf2e3c2b8d75cd3a6838bbac979687709af19d156358bcf
|
4
|
+
data.tar.gz: df7d103ca5a48a1a50d705488ed49437fffaddcfc7971cb67eabae19421b2414
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aad68c7df361fcb4b12bd412cdcb87e6a50b9609f2f6bcc452a5017c887925dcf7fd4fe69369e48858a55a7c0770a1d4879c476c2f832a0bd2223eff0ce9ff2
|
7
|
+
data.tar.gz: 3d313635b906e1cbedd4841ccd61ffabb43e30e5ee64f91bd149586de99aeb2a4f7a57cb731aa12725946ce6046db38dab5b325fdfc5cf8e5c75b18e1db1b2ac
|
@@ -3,15 +3,19 @@
|
|
3
3
|
module SepaFileParser
|
4
4
|
module Pain002
|
5
5
|
class Base
|
6
|
-
attr_reader :group_header, :reports, :xml_data
|
6
|
+
attr_reader :group_header, :group_information_and_status, :reports, :xml_data
|
7
7
|
|
8
8
|
def initialize(xml_data)
|
9
9
|
@xml_data = xml_data
|
10
10
|
# CstmrPmtStsRpt = Customer Payment Status Report
|
11
11
|
grphdr = xml_data.xpath('CstmrPmtStsRpt/GrpHdr')
|
12
12
|
@group_header = SepaFileParser::GroupHeader.new(grphdr)
|
13
|
+
|
13
14
|
reports = xml_data.xpath('CstmrPmtStsRpt/OrgnlPmtInfAndSts')
|
14
15
|
@reports = reports.map { |x| Report.new(x) }
|
16
|
+
|
17
|
+
group_information_and_status = xml_data.xpath('CstmrPmtStsRpt/OrgnlGrpInfAndSts')
|
18
|
+
@group_information_and_status = group_information_and_status.map { |x| GroupInformation.new(x) }
|
15
19
|
end
|
16
20
|
end
|
17
21
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SepaFileParser
|
4
|
+
module Pain002
|
5
|
+
class GroupInformation
|
6
|
+
|
7
|
+
attr_reader :xml_data
|
8
|
+
|
9
|
+
def initialize(xml_data)
|
10
|
+
@xml_data = xml_data
|
11
|
+
end
|
12
|
+
|
13
|
+
def message_id
|
14
|
+
@message_id ||= xml_data.xpath('OrgnlMsgId/text()').text
|
15
|
+
end
|
16
|
+
|
17
|
+
def message_name_identification
|
18
|
+
@message_name_identification ||= xml_data.xpath('OrgnlMsgNmId/text()').text
|
19
|
+
end
|
20
|
+
|
21
|
+
def status
|
22
|
+
@status ||= xml_data.xpath('GrpSts/text()').text
|
23
|
+
end
|
24
|
+
|
25
|
+
def source
|
26
|
+
xml_data.to_s
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/sepa_file_parser.rb
CHANGED
@@ -30,6 +30,7 @@ require_relative 'sepa_file_parser/camt054/notification'
|
|
30
30
|
require_relative 'sepa_file_parser/camt054/base'
|
31
31
|
require_relative 'sepa_file_parser/pain001/payment_information'
|
32
32
|
require_relative 'sepa_file_parser/pain001/base'
|
33
|
+
require_relative 'sepa_file_parser/pain002/group_information'
|
33
34
|
require_relative 'sepa_file_parser/pain002/report'
|
34
35
|
require_relative 'sepa_file_parser/pain002/base'
|
35
36
|
require_relative 'sepa_file_parser/pain008/payment_information'
|
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.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- lib/sepa_file_parser/pain001/base.rb
|
129
129
|
- lib/sepa_file_parser/pain001/payment_information.rb
|
130
130
|
- lib/sepa_file_parser/pain002/base.rb
|
131
|
+
- lib/sepa_file_parser/pain002/group_information.rb
|
131
132
|
- lib/sepa_file_parser/pain002/report.rb
|
132
133
|
- lib/sepa_file_parser/pain008/base.rb
|
133
134
|
- lib/sepa_file_parser/pain008/payment_information.rb
|
@@ -156,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
157
|
- !ruby/object:Gem::Version
|
157
158
|
version: '0'
|
158
159
|
requirements: []
|
159
|
-
rubygems_version: 3.6.
|
160
|
+
rubygems_version: 3.6.9
|
160
161
|
specification_version: 4
|
161
162
|
summary: Gem for parsing camt, pain, ... files into a speaking object.
|
162
163
|
test_files: []
|