mirror of
https://github.com/node-ebics/node-ebics-client.git
synced 2024-11-23 22:52:08 +00:00
fix(examples): orders ref
This commit is contained in:
parent
e060863356
commit
4b0bf0eba6
@ -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);
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user