node-ebics-client/lib/middleware/serializer.js

14 lines
295 B
JavaScript
Raw Normal View History

2018-06-15 06:33:41 +00:00
'use strict';
const H004Serializer = require('../orders/H004/serializer');
module.exports = {
use(order) {
const { version } = order;
if (version.toUpperCase() === 'H004') return H004Serializer.use(order);
throw Error('Error middleware/serializer.js: Invalid version number');
},
};