sepa_file_parser 0.3.0 → 0.4.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: e36d19a3088792a5780d1fa99382550e8687915602c534e001a6925ab2ab2c3c
4
- data.tar.gz: 95569a4dc93f63069c3ec2aea6f63cf6baf0f445055a9093c27779dffb458995
3
+ metadata.gz: dc1b49342df2ec9e64acf292db190c7a0f18faa8ac3b687f0411abdc09b17095
4
+ data.tar.gz: 44a28b13cbff5ec5d953f990d51ba927dd4851c12e661097126529c13bf4c922
5
5
  SHA512:
6
- metadata.gz: 5249e791af1fab390dda946f936e48d0ccda37e3d74500f34810e44886f0be7c6fbd325f6e84007a46850298f53018c20dca47f6d453d9eb9dbf473fbd98a432
7
- data.tar.gz: cac1cc8a474b15bd90552be5d4eac86899ad02ad9323bd87d50a4590c6f3225400abda71c4f5d7f11ae3b94bb22c8cf06f7793e99aa303defd38e18a1c36c17d
6
+ metadata.gz: b5e447b025c72c012230d773d67ce6d55cbbc6cf3c88da7c9c3c97e9cc8b112d8eea2c56a1b199826f63c92f1446bccd36258cd22a0fa43aa7dbc5fec883d198
7
+ data.tar.gz: 0eab576311fa01993d1499ca6050330ebd373075f4a0165071b527df5f2fb79d6ea81c77c51d2335d7785df4131d633b005b32bb5edf88ab918312c45490caa4
@@ -82,6 +82,18 @@ module SepaFileParser
82
82
  @reference ||= xml_data.xpath('Refs/InstrId/text()').text
83
83
  end
84
84
 
85
+ def original_currency_amount # May be missing
86
+ @original_currency_amount ||= SepaFileParser::Misc.to_amount(parse_original_currency_amount)
87
+ end
88
+
89
+ def original_currency # May be missing
90
+ @original_currency ||= xml_data.xpath('AmtDtls/InstdAmt/Amt/@Ccy').text
91
+ end
92
+
93
+ def exchange_rate # May be missing
94
+ @exchange_rate ||= xml_data.xpath('AmtDtls/TxAmt/CcyXchg/XchgRate/text()').text
95
+ end
96
+
85
97
  def bank_reference # May be missing
86
98
  @bank_reference ||= xml_data.xpath('Refs/AcctSvcrRef/text()').text
87
99
  end
@@ -120,6 +132,10 @@ module SepaFileParser
120
132
 
121
133
  private
122
134
 
135
+ def parse_original_currency_amount
136
+ xml_data.xpath('AmtDtls/InstdAmt/Amt/text()').text
137
+ end
138
+
123
139
  def parse_amount
124
140
  if xml_data.xpath('Amt').any?
125
141
  xml_data.xpath('Amt/text()').text
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SepaFileParser
4
- VERSION = '0.3.0'.freeze
4
+ VERSION = '0.4.0'.freeze
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sepa_file_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Schoknecht
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-10 00:00:00.000000000 Z
10
+ date: 2025-01-15 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake