node-ebics-client/lib/middleware/serializer.js
2018-06-20 12:20:03 +03:00

14 lines
311 B
JavaScript

'use strict';
const H004Serializer = require('../orders/H004/serializer');
module.exports = {
use(order, client) {
const { version } = order;
if (version.toUpperCase() === 'H004') return H004Serializer.use(order, client);
throw Error('Error middleware/serializer.js: Invalid version number');
},
};