diff --git a/.gitignore b/.gitignore index 7d57acd..0eb1031 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ #JetBrains IDEs /.idea/ + +*.gem diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..aedc15b --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.5.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..3a7940c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# 0.1.1 - 2019-09-16 +- bugfixes + - BIC fields are now optional diff --git a/lib/sepa_parser.rb b/lib/sepa_parser.rb index 24f83a8..36185cb 100644 --- a/lib/sepa_parser.rb +++ b/lib/sepa_parser.rb @@ -26,11 +26,11 @@ def self.parse(data) # rubocop:disable MethodLength, AbcSize get_element_text(document, 'Document/CstmrCdtTrfInitn/PmtInf/Dbtr/Nm'), get_element_text(document, 'Document/CstmrCdtTrfInitn/PmtInf/DbtrAcct/Id/IBAN'), get_element_text_if_exists(document, 'Document/CstmrCdtTrfInitn/PmtInf/DbtrAcct/Ccy'), - get_element_text(document, 'Document/CstmrCdtTrfInitn/PmtInf/DbtrAgt/FinInstnId/BIC'), + get_element_text_if_exists(document, 'Document/CstmrCdtTrfInitn/PmtInf/DbtrAgt/FinInstnId/BIC'), get_element_text(transfer, 'PmtId/EndToEndId'), get_element_text(transfer, 'Amt/InstdAmt'), get_element_attribute(transfer, 'Amt/InstdAmt', 'Ccy'), - get_element_text(transfer, 'CdtrAgt/FinInstnId/BIC'), + get_element_text_if_exists(transfer, 'CdtrAgt/FinInstnId/BIC'), get_element_text(transfer, 'Cdtr/Nm'), get_element_text(transfer, 'CdtrAcct/Id/IBAN'), get_element_text_if_exists(transfer, 'CdtrAcct/Ccy'), diff --git a/lib/sepa_parser/version.rb b/lib/sepa_parser/version.rb index 60159b0..1faf982 100644 --- a/lib/sepa_parser/version.rb +++ b/lib/sepa_parser/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module SepaParser - VERSION = '0.1.0' + VERSION = '0.1.1' end