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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c55b2860c65b9125650ed7d16ab2ec66018aa6a5239ce13d10c5bf1907528326
4
- data.tar.gz: 4aeee45425ea98ba03adbb6ca10daada5435084b53c69d040b68b92b7d216cfb
3
+ metadata.gz: 04b4fe6fbcccc25bb371b92a083ef4254519a40b71445d255692bd19aa03ed61
4
+ data.tar.gz: 3b074da5f4ae129c1bb741a4cf0be7dbf1390903ee1e3b11393164625f42e886
5
5
  SHA512:
6
- metadata.gz: 0ead76b9016f9534c66e6535c81061f596dfba84d4ca7346341fbcfe74b3e7787d257d44778dbc3c459ad69b1c0a909207150ea648618ccacbe0db3cbc001620
7
- data.tar.gz: fbc04891d18356284425039122ecab9d105bb81c91e65b33a1575563f128d833e8b14c94838e31e9b6595163cdddb34e8df71fe5a44ca7ffc97f04e09b37bb42
6
+ metadata.gz: eb4b83c29aa119b37d4ee516e8a0e9265ceabdfba1f37beea31cccc52e4cb074c74ffc0e7faab7da9357a127ee82000c8a845509053a4ddefd73c814b3db5034
7
+ data.tar.gz: 8f3355e04d4b62427e01af58cbc962a03e8fa6002bd2770190531df9f6f9262ec68bedded1418404c540a5507bd12a3a04624b087b29c16d7e598b242ffe1bd5
@@ -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
@@ -1,3 +1,3 @@
1
1
  module CamtParser
2
- VERSION = '2.6.3'
2
+ VERSION = '2.7.0'.freeze
3
3
  end
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.6.3
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