camt_parser 2.7.0 → 2.8.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: 04b4fe6fbcccc25bb371b92a083ef4254519a40b71445d255692bd19aa03ed61
4
- data.tar.gz: 3b074da5f4ae129c1bb741a4cf0be7dbf1390903ee1e3b11393164625f42e886
3
+ metadata.gz: edbff7658266a9cf3b798b83f7de21e344c2186be71b41c2d5b24774f3256ff4
4
+ data.tar.gz: f67ab8465111d7fc8defb21a0737fecb3e8fd453be7fd6f7dcd06dfb2340cf4e
5
5
  SHA512:
6
- metadata.gz: eb4b83c29aa119b37d4ee516e8a0e9265ceabdfba1f37beea31cccc52e4cb074c74ffc0e7faab7da9357a127ee82000c8a845509053a4ddefd73c814b3db5034
7
- data.tar.gz: 8f3355e04d4b62427e01af58cbc962a03e8fa6002bd2770190531df9f6f9262ec68bedded1418404c540a5507bd12a3a04624b087b29c16d7e598b242ffe1bd5
6
+ metadata.gz: d19c2dacbda91453d1428316e4821b9c7cec23221a92712ce2e2ceeaf867f5892295889cd17ca8a8e9d934d6d35732dfb919d0e7b7686648251841c2e1884f6f
7
+ data.tar.gz: 11951969b5acabd9e89c5d0b23f2810caf07ec99b8d743ebc9ea3280efbf1a4d78566c0da4abf8ee802994c3f58f8e7f5b5d51f8835e68399b3fe2c5d2ff88be
@@ -25,6 +25,14 @@ module CamtParser
25
25
  @legal_sequence_number ||= @xml_data.xpath('LglSeqNb/text()').text
26
26
  end
27
27
 
28
+ def from_date_time
29
+ @from_date_time ||= (x = @xml_data.xpath('FrToDt/FrDtTm')).empty? ? nil : Time.parse(x.first.content)
30
+ end
31
+
32
+ def to_date_time
33
+ @to_date_time ||= (x = @xml_data.xpath('FrToDt/ToDtTm')).empty? ? nil : Time.parse(x.first.content)
34
+ end
35
+
28
36
  def opening_balance
29
37
  @opening_balance ||= begin
30
38
  bal = @xml_data.xpath('Bal/Tp//Cd[contains(text(), "PRCD")]').first.ancestors('Bal')
@@ -15,5 +15,9 @@ module CamtParser
15
15
  def bank_name
16
16
  @bank_name ||= @xml_data.xpath('Svcr/FinInstnId/Nm/text()').text
17
17
  end
18
+
19
+ def currency
20
+ @currency ||= @xml_data.xpath('Ccy/text()').text
21
+ end
18
22
  end
19
23
  end
@@ -1,3 +1,3 @@
1
1
  module CamtParser
2
- VERSION = '2.7.0'.freeze
2
+ VERSION = '2.8.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camt_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Schoknecht
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake