@barchart/portfolio-api-common 1.0.73 → 1.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,6 +19,10 @@ module.exports = (() => {
|
|
|
19
19
|
constructor(code, description, alternateDescription, canReinvest, usesSymbols) {
|
|
20
20
|
super(code, description);
|
|
21
21
|
|
|
22
|
+
assert.argumentIsRequired(alternateDescription, 'alternateDescription', String);
|
|
23
|
+
assert.argumentIsRequired(canReinvest, 'canReinvest', Boolean);
|
|
24
|
+
assert.argumentIsRequired(usesSymbols, 'usesSymbols', Boolean);
|
|
25
|
+
|
|
22
26
|
this._alternateDescription = alternateDescription;
|
|
23
27
|
this._canReinvest = canReinvest;
|
|
24
28
|
this._usesSymbols = usesSymbols;
|
|
@@ -249,7 +249,6 @@ module.exports = (() => {
|
|
|
249
249
|
.withField('instrument.currency', DataType.forEnum(Currency, 'Currency'), true)
|
|
250
250
|
.withField('instrument.symbol.barchart', DataType.STRING, true)
|
|
251
251
|
.withField('instrument.symbol.display', DataType.STRING, true)
|
|
252
|
-
.withField('currency', DataType.forEnum(Currency, 'Currency'))
|
|
253
252
|
.withField('date', DataType.DAY)
|
|
254
253
|
.withField('price', DataType.DECIMAL)
|
|
255
254
|
.withField('quantity', DataType.DECIMAL)
|
|
@@ -388,11 +387,8 @@ module.exports = (() => {
|
|
|
388
387
|
.withField('portfolio', DataType.STRING)
|
|
389
388
|
.withField('position', DataType.STRING)
|
|
390
389
|
.withField('type', DataType.forEnum(TransactionType, 'TransactionType'))
|
|
391
|
-
.withField('instrument.name', DataType.STRING, true)
|
|
392
390
|
.withField('instrument.type', DataType.STRING, true)
|
|
393
391
|
.withField('instrument.currency', DataType.forEnum(Currency, 'Currency'), true)
|
|
394
|
-
.withField('instrument.symbol.barchart', DataType.STRING, true)
|
|
395
|
-
.withField('instrument.symbol.display', DataType.STRING, true)
|
|
396
392
|
.withField('date', DataType.DAY)
|
|
397
393
|
.withField('amount', DataType.DECIMAL)
|
|
398
394
|
.withField('fee', DataType.DECIMAL, true)
|
package/package.json
CHANGED
package/test/SpecRunner.js
CHANGED
|
@@ -20,6 +20,10 @@ module.exports = (() => {
|
|
|
20
20
|
constructor(code, description, alternateDescription, canReinvest, usesSymbols) {
|
|
21
21
|
super(code, description);
|
|
22
22
|
|
|
23
|
+
assert.argumentIsRequired(alternateDescription, 'alternateDescription', String);
|
|
24
|
+
assert.argumentIsRequired(canReinvest, 'canReinvest', Boolean);
|
|
25
|
+
assert.argumentIsRequired(usesSymbols, 'usesSymbols', Boolean);
|
|
26
|
+
|
|
23
27
|
this._alternateDescription = alternateDescription;
|
|
24
28
|
this._canReinvest = canReinvest;
|
|
25
29
|
this._usesSymbols = usesSymbols;
|