camt_parser 2.10.0 → 2.11.1
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 +4 -4
- data/lib/camt_parser/general/account.rb +8 -0
- data/lib/camt_parser/misc.rb +4 -1
- data/lib/camt_parser/version.rb +1 -1
- metadata +4 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: '039b2a9d1f215d6454e76a2dabc9b97eaf761f64508366efa94e958d6ec2ca6b'
         | 
| 4 | 
            +
              data.tar.gz: 5cb533f306651d2af3b882ff43ca67075bfd2dfefc838daa94ae9589f1b8a1c2
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1fe0baecd5601aa501ef77d2a72deb5a7bc25eeea3eabd79097dff4ccd948dcffda5df289dd8ac3d303603c5f5d1ed7a04b67f03ebbb65da488ec70530c215c8
         | 
| 7 | 
            +
              data.tar.gz: c596fbb192a2e915debbbe4957150c6600872760aa7e329634af9e7749ee99c889ab2459973fec540392138de17f7fe81c04eb9f9edaf7b87231e194994dbc83
         | 
| @@ -8,6 +8,14 @@ module CamtParser | |
| 8 8 | 
             
                  @iban ||= @xml_data.xpath('Id/IBAN/text()').text
         | 
| 9 9 | 
             
                end
         | 
| 10 10 |  | 
| 11 | 
            +
                def other_id
         | 
| 12 | 
            +
                  @other_id ||= @xml_data.xpath('Id/Othr/Id/text()').text
         | 
| 13 | 
            +
                end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                def account_number
         | 
| 16 | 
            +
                  !iban.nil? && !iban.empty? ? iban : other_id
         | 
| 17 | 
            +
                end
         | 
| 18 | 
            +
             | 
| 11 19 | 
             
                def bic
         | 
| 12 20 | 
             
                  @bic ||= @xml_data.xpath('Svcr/FinInstnId/BIC/text()').text
         | 
| 13 21 | 
             
                end
         | 
    
        data/lib/camt_parser/misc.rb
    CHANGED
    
    | @@ -4,7 +4,10 @@ module CamtParser | |
| 4 4 | 
             
                  def to_amount_in_cents(value)
         | 
| 5 5 | 
             
                    return nil if value == nil || value.strip == ''
         | 
| 6 6 |  | 
| 7 | 
            -
                     | 
| 7 | 
            +
                    # Using dollars and cents as representation for parts before and after the decimal separator
         | 
| 8 | 
            +
                    dollars, cents = value.split(/,|\./)
         | 
| 9 | 
            +
                    cents ||= '0'
         | 
| 10 | 
            +
                    format('%s%s', dollars, cents.ljust(2, '0')).to_i
         | 
| 8 11 | 
             
                  end
         | 
| 9 12 |  | 
| 10 13 | 
             
                  def to_amount(value)
         | 
    
        data/lib/camt_parser/version.rb
    CHANGED
    
    
    
        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. | 
| 4 | 
            +
              version: 2.11.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Tobias Schoknecht
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2022-08-15 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rake
         | 
| @@ -68,7 +68,7 @@ dependencies: | |
| 68 68 | 
             
                    version: '0'
         | 
| 69 69 | 
             
            description: A parser for the Camt file format
         | 
| 70 70 | 
             
            email:
         | 
| 71 | 
            -
            - tobias.schoknecht@ | 
| 71 | 
            +
            - tobias.schoknecht@viafintech.com
         | 
| 72 72 | 
             
            executables: []
         | 
| 73 73 | 
             
            extensions: []
         | 
| 74 74 | 
             
            extra_rdoc_files: []
         | 
| @@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 119 119 | 
             
                - !ruby/object:Gem::Version
         | 
| 120 120 | 
             
                  version: '0'
         | 
| 121 121 | 
             
            requirements: []
         | 
| 122 | 
            -
            rubygems_version: 3.0. | 
| 122 | 
            +
            rubygems_version: 3.0.3.1
         | 
| 123 123 | 
             
            signing_key: 
         | 
| 124 124 | 
             
            specification_version: 4
         | 
| 125 125 | 
             
            summary: Gem for parsing camt files into a speaking object.
         |