fix(examples): orders ref

This commit is contained in:
nanov 2019-12-30 11:36:11 +02:00
parent e060863356
commit 4b0bf0eba6
10 changed files with 22 additions and 10 deletions

View File

@ -6,9 +6,11 @@ const ebics = require('../index');
const configjs = require('./config.js');
const client = gClient;
const { Orders } = require('../index');
// New keys will be generated and saved in ./keys-test
client.send(ebics.Orders.INI)
client.send(Orders.INI)
.then((resp) => {
console.log('Response for INI order %j', resp);
return client.send(ebics.Orders.HIA);

View File

@ -3,10 +3,11 @@
'use strict';
const client = require('./getClient')();
const { Orders } = require('../index');
// Client keys must be already generated and send by letter.
// The bank should have enabled the user
client.send(ebics.Orders.HPB)
client.send(Orders.HPB)
.then((resp) => {
console.log('Response for HPB order %j', resp);
if (resp.technicalCode !== '000000')

View File

@ -3,9 +3,10 @@
'use strict';
const client = require('./getClient')();
const { Orders } = require('../index');
// The bank keys must have been already saved
client.send(ebics.Orders.C52(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
client.send(Orders.C52(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
.then((resp) => {
console.log('Response for C52 order %j', resp);
if (resp.technicalCode !== '000000')

View File

@ -3,9 +3,10 @@
'use strict';
const client = require('./getClient')();
const { Orders } = require('../index');
// The bank keys must have been already saved
client.send(ebics.Orders.C53(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
client.send(Orders.C53(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
.then((resp) => {
console.log('Response for C53 order %j', resp);
if (resp.technicalCode !== '000000')

View File

@ -3,9 +3,10 @@
'use strict';
const client = require('./getClient')();
const { Orders } = require('../index');
// The bank keys must have been already saved
client.send(ebics.Orders.DKI(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
client.send(Orders.DKI(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
.then((resp) => {
console.log('Response for DKI order %j', resp);
if (resp.technicalCode !== '000000')

View File

@ -3,9 +3,10 @@
'use strict';
const client = require('./getClient')();
const { Orders } = require('../index');
// The bank keys must have been already saved
client.send(ebics.Orders.HKD)
client.send(Orders.HKD)
.then((resp) => {
console.log('Response for HKD order %j', resp);
if (resp.technicalCode !== '000000')

View File

@ -3,9 +3,10 @@
'use strict';
const client = require('./getClient')();
const { Orders } = require('../index');
// The bank keys must have been already saved
client.send(ebics.Orders.HTD)
client.send(Orders.HTD)
.then((resp) => {
console.log('Response for HTD order %j', resp);
if (resp.technicalCode !== '000000')

View File

@ -3,9 +3,10 @@
'use strict';
const client = require('./getClient')();
const { Orders } = require('../index');
// The bank keys must have been already saved
client.send(ebics.Orders.STA(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
client.send(Orders.STA(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
.then((resp) => {
console.log('Response for STA order %j', resp);
if (resp.technicalCode !== '000000')

View File

@ -3,9 +3,11 @@
'use strict';
const client = require('./getClient')();
const { Orders } = require('../index');
// The bank keys must have been already saved
client.send(ebics.Orders.VMK(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
client.send(Orders.VMK(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
.then((resp) => {
console.log('Response for VMK order %j', resp);
if (resp.technicalCode !== '000000')

View File

@ -6,11 +6,12 @@ const ebics = require('../index');
const fs = require('fs');
const client = require('./getClient')();
const { Orders } = require('../index');
// The bank keys must have been already saved
const paymentFile = fs.readFileSync('mytestfile.xml').toString();
client.send(ebics.Orders.XG1(paymentFile))
client.send(Orders.XG1(paymentFile))
.then((resp) => {
console.log('Response for XG1 order %j', resp);
})