Add custom handler for the German bank Rheinhessen Sparkasse to the GoCardless app (#454)

* Add custom handler for the German bank Rheinhessen Sparkasse to the GoCardless app.

Following the guide and using the template added the code, similar to other handlers, that should match the transaction as seen in the logs when syncing my bank through Actual.

The only thing that had to be added was the notes about the transaction are stored under remittanceInformationStructured and not under remittanceInformationUnstructured.

Testing still pending.

* FIx linting errors and add release notes

Replaced the indentation from 4 spaces to 2, to fix linting error as recommended by the yarn test.

Added the release notes file 454.md.

* FIx linting errors (second try) and fix error in the release notes

* Fix linting errors

* Update src/app-gocardless/bank-factory.js

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Update src/app-gocardless/bank-factory.js

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Update src/app-gocardless/banks/spk_worms_alzey_ried_malade51wor.js

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Update upcoming-release-notes/454.md

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Rename file "spk-worms-alzey-ried-malade51wor.js"

* Remove functions normalizeAccount and CalculateStartingBalance

Since no changes were made to the default functions, they should be deleted from this specific bank (SPK_WORMS_ALZEY_RIED_MALADE51WOR).

* Correct linting error

Remove import of unsed variables.

---------

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>
This commit is contained in:
DirgoSalga
2024-09-26 09:38:46 +02:00
committed by GitHub
parent 2e70c11c74
commit 835b6987a7
3 changed files with 37 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import SandboxfinanceSfin0000 from './banks/sandboxfinance-sfin0000.js';
import SparNordSpNoDK22 from './banks/sparnord-spnodk22.js';
import SpkKarlsruhekarsde66 from './banks/spk-karlsruhe-karsde66.js';
import SpkMarburgBiedenkopfHeladef1mar from './banks/spk-marburg-biedenkopf-heladef1mar.js';
import SpkWormsAlzeyRiedMalade51wor from './banks/spk-worms-alzey-ried-malade51wor.js';
import VirginNrnbgb22 from './banks/virgin_nrnbgb22.js';
import NbgEthngraaxxx from './banks/nbg_ethngraaxxx.js';
@@ -51,6 +52,7 @@ export const banks = [
SparNordSpNoDK22,
SpkKarlsruhekarsde66,
SpkMarburgBiedenkopfHeladef1mar,
SpkWormsAlzeyRiedMalade51wor,
VirginNrnbgb22,
NbgEthngraaxxx,
];

View File

@@ -0,0 +1,29 @@
import Fallback from './integration-bank.js';
import { formatPayeeName } from '../../util/payee-name.js';
/** @type {import('./bank.interface.js').IBank} */
export default {
...Fallback,
institutionIds: ['SPK_WORMS_ALZEY_RIED_MALADE51WOR'],
accessValidForDays: 90,
normalizeTransaction(transaction, _booked) {
const date = transaction.bookingDate || transaction.valueDate;
if (!date) {
return null;
}
transaction.remittanceInformationUnstructured =
transaction.remittanceInformationUnstructured ??
transaction.remittanceInformationStructured ??
transaction.remittanceInformationStructuredArray?.join(' ');
return {
...transaction,
payeeName: formatPayeeName(transaction),
date: transaction.bookingDate || transaction.valueDate,
};
},
};

View File

@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [DirgoSalga]
---
Add integration of Rheinhessen Sparkasse (`SPK_WORMS_ALZEY_RIED_MALADE51WOR`) to the GoCardless app