Skip to content

A basic parser for camt.052, camt.053 and camt.054 files

License

Notifications You must be signed in to change notification settings

noefroidevaux/camt_parser

 
 

Repository files navigation

CamtParser

Travis Build state

CamtParser is a Ruby Gem which does some basic parsing of camt052, camt053, and camt054 files into an object structure for easier usability instead of having to use an XML parser all the time. Keep in mind that this might not include a complete parsing of camt specification. Fields that we did not need for our use-cases are simply ignored for now.

Getting started

  1. add the Gem to the Gemfile

     gem 'camt_parser'
    
  2. Require the Gem at any point before using it

  3. Use it!

Example for camt053

camt = CamtParser::File.parse path_to_file
puts camt.group_headers.creation_date_time
camt.statements.each do |statement|
    puts statement.account.iban
    statement.entries.each do |entry|
        # Access individual entries/bank transfers
        puts entry.amount
        puts entry.debitor.iban
    end
end

Please check the code for fields not mentioned here. Also check the code for camt052 and camt054.

Bugs and Contribution

For bugs and feature requests open an issue on Github. For code contributions fork the repo, make your changes and create a pull request.

License

LICENSE

About

A basic parser for camt.052, camt.053 and camt.054 files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%