sepa_file_parser 0.4.0 → 0.5.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:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d849a3d8a2c14d65f90cd313e59ea45d6a61fe9c8a4e2ab4adbdc92b74e2ee44
         | 
| 4 | 
            +
              data.tar.gz: 39b96e5ed8cab2969e2c81aa1c89a6993c519181da677cb3e103e3ff7f6dee79
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 52abe875f8007897411b0dfa7d2ef163ff57b94e925afdee25c508e63176418f9a054ab400bdcac35c29dbb51369fac2ca6fc03351e97b2bbd40fc1499c2c20b
         | 
| 7 | 
            +
              data.tar.gz: 016deaaaad4a9ec7cdb922ce4f340033e7772bfb7dd0815d9d899c6f7c52b5bced82233e7f2114e1dfe5de9d2f95697093a0ee049085a00b75448584a0014950
         | 
| @@ -40,7 +40,10 @@ module SepaFileParser | |
| 40 40 |  | 
| 41 41 | 
             
                  def opening_balance
         | 
| 42 42 | 
             
                    @opening_balance ||= begin
         | 
| 43 | 
            -
                       | 
| 43 | 
            +
                      openingNode = xml_data.xpath('Bal/Tp//Cd[contains(text(), "PRCD")]').first ||
         | 
| 44 | 
            +
                                      xml_data.xpath('Bal/Tp//Cd[contains(text(), "OPBD")]').first
         | 
| 45 | 
            +
             | 
| 46 | 
            +
                      bal = openingNode.ancestors('Bal')
         | 
| 44 47 | 
             
                      date = bal.xpath('Dt/Dt/text()').text
         | 
| 45 48 | 
             
                      credit = bal.xpath('CdtDbtInd/text()').text == 'CRDT'
         | 
| 46 49 | 
             
                      currency = bal.xpath('Amt').attribute('Ccy').value
         | 
| @@ -115,7 +115,10 @@ module SepaFileParser | |
| 115 115 | 
             
                end
         | 
| 116 116 |  | 
| 117 117 | 
             
                def creditor_identifier # May be missing
         | 
| 118 | 
            -
                  @creditor_identifier ||=  | 
| 118 | 
            +
                  @creditor_identifier ||= [
         | 
| 119 | 
            +
                    xml_data.xpath('RltdPties/Cdtr/Id/PrvtId/Othr/Id/text()'),
         | 
| 120 | 
            +
                    xml_data.xpath('RltdPties/Cdtr/Pty/Id/PrvtId/Othr/Id/text()'),
         | 
| 121 | 
            +
                  ].reject(&:empty?).first.text
         | 
| 119 122 | 
             
                end
         | 
| 120 123 |  | 
| 121 124 | 
             
                def payment_information # May be missing
         | 
| @@ -5,6 +5,7 @@ require_relative './xml' | |
| 5 5 | 
             
            # Add registrations
         | 
| 6 6 | 
             
            ## CAMT052
         | 
| 7 7 | 
             
            SepaFileParser::Xml.register('urn:iso:std:iso:20022:tech:xsd:camt.052.001.02', :camt052)
         | 
| 8 | 
            +
            SepaFileParser::Xml.register('urn:iso:std:iso:20022:tech:xsd:camt.052.001.08', :camt052)
         | 
| 8 9 |  | 
| 9 10 | 
             
            ## CAMT053
         | 
| 10 11 | 
             
            SepaFileParser::Xml.register('urn:iso:std:iso:20022:tech:xsd:camt.053.001.02', :camt053)
         | 
    
        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. | 
| 4 | 
            +
              version: 0.5.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Tobias Schoknecht
         | 
| 8 8 | 
             
            bindir: bin
         | 
| 9 9 | 
             
            cert_chain: []
         | 
| 10 | 
            -
            date: 2025- | 
| 10 | 
            +
            date: 2025-03-14 00:00:00.000000000 Z
         | 
| 11 11 | 
             
            dependencies:
         | 
| 12 12 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 13 13 | 
             
              name: rake
         |