-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vladislav Hristov
authored and
Vladislav Hristov
committed
Jun 15, 2018
1 parent
d5d80ee
commit 1876360
Showing
26 changed files
with
789 additions
and
682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
'use strict'; | ||
|
||
const Client = require('./lib/Client'); | ||
const OrderBuilder = require('./lib/OrderBuilder'); | ||
const ISO20022Builder = require('./lib/ISO20022OrderBuilder'); | ||
const keysManager = require('./lib/keymanagers/keysManager'); | ||
const fsKeysStorage = require('./lib/keymanagers/fsKeysStorage'); | ||
|
||
module.exports = Client; | ||
module.exports = { | ||
Client, | ||
OrderBuilder, | ||
ISO20022Builder, | ||
keysManager, | ||
fsKeysStorage, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
'use strict'; | ||
|
||
const OrderBuilder = require('./OrderBuilder'); | ||
|
||
module.exports = class ISO20022OrderBuilder extends OrderBuilder { | ||
get document() { return this._document; } | ||
get ebicsData() { return this._ebicsData; } | ||
|
||
use(dataToUse) { | ||
if (Object.prototype.hasOwnProperty.call(dataToUse, 'ebicsData')) this._ebicsData = dataToUse.ebicsData; | ||
if (Object.prototype.hasOwnProperty.call(dataToUse, 'document')) this._document = dataToUse.document; | ||
|
||
return this; | ||
} | ||
|
||
static h004() { | ||
const builder = new ISO20022OrderBuilder(); | ||
|
||
builder._version = 'H004'; | ||
|
||
return builder; | ||
} | ||
|
||
INI() { | ||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'INI', OrderAttribute: 'DZNNN' }, | ||
}); | ||
} | ||
|
||
HIA() { | ||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'HIA', OrderAttribute: 'DZNNN' }, | ||
}); | ||
} | ||
|
||
HPB() { | ||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'HPB', OrderAttribute: 'DZHNN' }, | ||
}); | ||
} | ||
|
||
HKD() { | ||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'HKD', OrderAttribute: 'DZHNN', StandardOrderParams: {} }, | ||
}); | ||
} | ||
|
||
HPD() { | ||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'HPD', OrderAttribute: 'DZHNN', StandardOrderParams: {} }, | ||
}); | ||
} | ||
|
||
HTD() { | ||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'HTD', OrderAttribute: 'DZHNN', StandardOrderParams: {} }, | ||
}); | ||
} | ||
|
||
HAA() { | ||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'HAA', OrderAttribute: 'DZHNN', StandardOrderParams: {} }, | ||
}); | ||
} | ||
|
||
HAC(start = null, end = null) { | ||
const params = start && end | ||
? { DateRange: { Start: start, End: end } } | ||
: {}; | ||
|
||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'HAC', OrderAttribute: 'DZHNN', StandardOrderParams: params }, | ||
}); | ||
} | ||
|
||
PTK(start = null, end = null) { | ||
const params = start && end | ||
? { DateRange: { Start: start, End: end } } | ||
: {}; | ||
|
||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'PTK', OrderAttribute: 'DZHNN', StandardOrderParams: params }, | ||
}); | ||
} | ||
|
||
Z52() { | ||
return this.details({ | ||
ebicsData: this.ebicsData, | ||
orderDetails: { OrderType: 'Z52', OrderAttribute: 'DZHNN', StandardOrderParams: {} }, | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.