camt_parser 2.6.3 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/camt_parser.rb +1 -0
- data/lib/camt_parser/general/batch_detail.rb +15 -0
- data/lib/camt_parser/general/entry.rb +5 -0
- data/lib/camt_parser/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04b4fe6fbcccc25bb371b92a083ef4254519a40b71445d255692bd19aa03ed61
|
4
|
+
data.tar.gz: 3b074da5f4ae129c1bb741a4cf0be7dbf1390903ee1e3b11393164625f42e886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb4b83c29aa119b37d4ee516e8a0e9265ceabdfba1f37beea31cccc52e4cb074c74ffc0e7faab7da9357a127ee82000c8a845509053a4ddefd73c814b3db5034
|
7
|
+
data.tar.gz: 8f3355e04d4b62427e01af58cbc962a03e8fa6002bd2770190531df9f6f9262ec68bedded1418404c540a5507bd12a3a04624b087b29c16d7e598b242ffe1bd5
|
data/lib/camt_parser.rb
CHANGED
@@ -14,6 +14,7 @@ require_relative "camt_parser/general/entry"
|
|
14
14
|
require_relative "camt_parser/general/record"
|
15
15
|
require_relative "camt_parser/general/charges"
|
16
16
|
require_relative "camt_parser/general/account"
|
17
|
+
require_relative "camt_parser/general/batch_detail"
|
17
18
|
require_relative "camt_parser/general/group_header"
|
18
19
|
require_relative "camt_parser/general/transaction"
|
19
20
|
require_relative "camt_parser/general/type/builder"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module CamtParser
|
2
|
+
class BatchDetail
|
3
|
+
def initialize(xml_data)
|
4
|
+
@xml_data = xml_data
|
5
|
+
end
|
6
|
+
|
7
|
+
def payment_information_identification
|
8
|
+
@payment_information_identification ||= @xml_data.xpath('PmtInfId/text()').text
|
9
|
+
end
|
10
|
+
|
11
|
+
def number_of_transactions
|
12
|
+
@number_of_transactions ||= @xml_data.xpath('NbOfTxs/text()').text
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -65,6 +65,10 @@ module CamtParser
|
|
65
65
|
def charges
|
66
66
|
@charges ||= CamtParser::Charges.new(@xml_data.xpath('Chrgs'))
|
67
67
|
end
|
68
|
+
|
69
|
+
def batch_detail
|
70
|
+
@batch_detail ||= @xml_data.xpath('NtryDtls/Btch').empty? ? nil : CamtParser::BatchDetail.new(@xml_data.xpath('NtryDtls/Btch'))
|
71
|
+
end
|
68
72
|
|
69
73
|
private
|
70
74
|
|
@@ -81,5 +85,6 @@ module CamtParser
|
|
81
85
|
|
82
86
|
@xml_data.xpath('NtryDtls/TxDtls').map { |x| Transaction.new(x, debit?, amt, ccy) }
|
83
87
|
end
|
88
|
+
|
84
89
|
end
|
85
90
|
end
|
data/lib/camt_parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: camt_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- lib/camt_parser/file.rb
|
85
85
|
- lib/camt_parser/general/account.rb
|
86
86
|
- lib/camt_parser/general/account_balance.rb
|
87
|
+
- lib/camt_parser/general/batch_detail.rb
|
87
88
|
- lib/camt_parser/general/charges.rb
|
88
89
|
- lib/camt_parser/general/creditor.rb
|
89
90
|
- lib/camt_parser/general/debitor.rb
|