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

14 lines
311 B
JavaScript
Raw Normal View History

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