Code Monkey home page Code Monkey logo

camt_parser's People

Contributors

alexanderadam avatar bkutil avatar danielpuglisi avatar dependabot[bot] avatar gadimbaylisahil avatar kpost avatar loudandwicked avatar manubo avatar martinseener avatar mmore avatar nghi93 avatar noefroidevaux avatar olleolleolle avatar p886 avatar sunsations avatar tobischo avatar yoyostile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

camt_parser's Issues

Ruby 2.6, warning: BigDecimal.new is deprecated

Hi, got this warning message on Ruby 2.6

~/.gem/ruby/2.6.0/gems/camt_parser-2.3.5/lib/camt_parser/misc.rb:9: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.

Thanks for your gem!

Format Version

Hey,

right now there is only one supported version for each camt format e.g. camt.054.001.04.
But I need to parse camt.054.001.02 formats.
How about to structure the Base class like this: CamtParser::Format054::V001::V04::Base
in order to support different versions?

I can provide a Pull request.

Implement camt052

Provide accessor for MsgId of Batch Detail

As we are usually not seeing individual transactions for bookings made as batch, backoffice systems quite often identifies and associates them by MsgId and performs status updates accordingly.

It would be nice to have it.

See #34

Possibility of extracting address fields ?

Good morning,

First of all, a BIG thank you for writing this superb lib (camt_parser) to process these CAMT XML files which are really painful.

Among all the libs I tested, only yours, written in Ruby, worked well but above all can be modified very easily to have the columns you want for extracting the CAMT file !

In order to simplify the life of our financial secretary, who is not a computer scientist, I created a very small WEB service that is very simple to use:

https://github.com/zuzu59/zcamt2csv

This works great, except we need to be able to extract the transaction proxy address columns:


                       <Dbtr>
                            <Nm>Toto, Tutu</Nm>
                            <PstlAdr>
                                <StrtNm>Avenue de Milan</StrtNm>
                                <BldgNb>26</BldgNb>
                                <PstCd>1007</PstCd>
                                <TwnNm>Lausanne</TwnNm>
                                <Ctry>CH</Ctry>
                            </PstlAdr>
                        </Dbtr>

and


                        <Cdtr>
                            <Nm>Association MakeRevolution</Nm>
                            <PstlAdr>
                                <AdrLine>Chemin du Closel 2</AdrLine>
                                <AdrLine>1020 Renens VD</AdrLine>
                            </PstlAdr>
                        </Cdtr>

And this is where my limits in Ruby are exceeded !

Would it be possible, please, to add in your camt_parser lib the possibility of extracting address fields ?

THANKS
Sincerely
Ch. Zufferey

Introduce a CamtParser::Errors base class

Hi!

I was looking at the collection of errors the Errors module.

All of them inherit directly from Ruby's StandardError.

What if they inherited from a class CamtParserError < StandardError exception class? That way, I'd be able to catch that one, in my application code.

Weird behavior for <AmtDtls> with multiple <*Amt>s

This commit introduced a bug where a <AmtDtls> with multiple kinds of <*Amt> leads Transaction#parse_currency and #parse_amount to concatenate the values of all <*Amt>s.

E.g., this XML leads to the currency being EUREUREUR and the amount 0.03 (== "0.030.040.03".to_f):

<AmtDtls>
  <InstdAmt>
    <Amt Ccy="EUR">0.03</Amt>
  </InstdAmt>
  <TxAmt>
    <Amt Ccy="EUR">0.04</Amt>
  </TxAmt>
  <PrtryAmt>
    <Tp>IBS</Tp>
    <Amt Ccy="EUR">0.03</Amt>
  </PrtryAmt>
</AmtDtls>

ArgumentError: invalid value for BigDecimal(): ""

Hi,

Somehow a client of us managed to get hold of a CAMT file with transactions without an amount. This yields the error described with the trace below. As this is not easy to catch, I think the gem should check the value before building the BigDecimal. Maybe a validation? I'm using amount_in_cents now, as this yields zero when no amount is set.

[GEM_ROOT]/gems/camt_parser-2.4.0/lib/camt_parser/misc.rb:9 :in `BigDecimal`
[GEM_ROOT]/gems/camt_parser-2.4.0/lib/camt_parser/misc.rb:9 :in `to_amount`
[GEM_ROOT]/gems/camt_parser-2.4.0/lib/camt_parser/general/transaction.rb:11 :in `amount`

Support block transfers

Some banks may trigger transfers/transactions as blocks.
Currently it is not possible to handle these transactions independently even though they may be listed separately in the CAMT052/CAMT053 files.
Add support for it

Attribute reader for @xml_data

Heyo!

I was wondering if we could potentially introduce an attribute reader for @xml_data?

Maybe by directly adding attr_reader :xml_data to each class or by adding a new superclass CamtParser::XmlData from which the other classes could inherit?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.