This commit is contained in:
nanov
2021-03-30 14:24:07 +03:00
7 changed files with 199 additions and 11 deletions

View File

@@ -46,6 +46,10 @@ const stringifyKeys = (keys) => {
* @property {string} passphrase - passphrase for keys encryption
* @property {KeyStorage} keyStorage - keyStorage implementation
* @property {object} [tracesStorage] - traces (logs) storage implementation
* @property {string} bankName - Full name of the bank to be used in the bank INI letters.
* @property {string} bankShortName - Short name of the bank to be used in folders, filenames etc.
* @property {string} languageCode - Language code to be used in the bank INI letters ("de", "en" and "fr" are currently supported).
* @property {string} storageLocation - Location where to store the files that are downloaded. This can be a network share for example.
*/
@@ -62,6 +66,10 @@ module.exports = class Client {
passphrase,
keyStorage,
tracesStorage,
bankName,
bankShortName,
languageCode,
storageLocation,
}) {
if (!url)
throw new Error('EBICS URL is required');
@@ -83,7 +91,11 @@ module.exports = class Client {
this.hostId = hostId;
this.keyStorage = keyStorage;
this.keyEncryptor = defaultKeyEncryptor({ passphrase });
this.tracesStorage = tracesStorage || null;
this.tracesStorage = tracesStorage || null;
this.bankName = bankName || "Dummy Bank Full Name",
this.bankShortName = bankShortName || "BANKSHORTCODE",
this.languageCode = languageCode || "en",
this.storageLocation = storageLocation || null,
}
async send(order) {