-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AccountBalances V7 #36
Comments
Hey @Clauscomputing, sorry for the late response. I think it would be best to get rid of the duplicating functions and only retain the sepa ones in the Client struct, as most of the non Sepa data structures (AccountConnection, AccountInformation) can be created using their international counterparts. Also, we could infer the usable segments by looking into the bank parameter data up front. Those changes would of course break the existing interface to the Client, but I imagine it would be worth it for the sake of simplicity. |
Another look into it and I would maybe just duplicate the non-Sepa versions of the functions into the Sepa ones and deprecate the non-Sepa ones. That way we do not break existing code. |
@Clauscomputing I added an implementation of version 7 and 8 of that segment (HKSAL). As version 7+ uses sepa compliant accountConnections, i.e. account data with IBAN and BIC, there is a new function within the client which sends those sepa compliant requests. |
@mitch000001 Thanks a lot! I'll give it a try! |
@mitch000001 Not sure if I understand the changes correctly and therefore put together a small repo: AccountTransactions stopped working for that bank with the PR. No accounts found. Do I need additional initialization of the SepaAccount? I tried to follow |
@Clauscomputing When implementing those balance changes I saw that the account responses are not implemented properly, i.e. when fetching the accounts there is only one response implemented (I think it's V4) and therefore this request could eventually break due to unsupported versions. The banking command exposes a way of enabling the debug logs, but the method is not accessible outside the project. I could try to expose the log level into the client config so that it's possible to enable debug logging also outside the project. I will come back to you once I have added those things so you can give it a go. |
@Clauscomputing I pushed a new Commit to PR #38 so if you want to provide more low level details about the request you can now enable debug logging in your code snippets. However, be prepared to get a whole lot of details about the raw requests. |
Hi,
I just tried to fetch AccountBalances from a bank and got:
unsupported versions [7 4]
A bit of searching in the code showed that only version 5 and 6 are supported for now:
go-hbci/segment/account_balance.go
Line 12 in 4ea2bd4
Then checked:
https://github.com/raphaelm/python-fints/blob/eb94706a9ba9f91f69e3e734abe8d4e746ea82b8/fints/segments/saldo.py#L67
and it seems AccountConnectionDataElement changed from "Kontoverbindung, version 2" to "Kontoverbindung international, version 1" according to python-fints. The Gesamtdok_HBCI22.pdf however shows in II 5.3.3 the same structure implemented in go-hbci.
If I'm not mistaken the data structure in V7 also includes IBAN and BIC:
https://github.com/raphaelm/python-fints/blob/eb94706a9ba9f91f69e3e734abe8d4e746ea82b8/fints/formals.py#L476
I then tried to follow the implementation of V7 in:
go-hbci/segment/account_transaction.go
Line 29 in 4ea2bd4
and got lost. Would AccountBalance also require a SepaAccountBalances?
Any hints are highly appreciated. Thanks!
The text was updated successfully, but these errors were encountered: