@barchart/portfolio-api-common 1.0.218 → 1.0.219

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.
@@ -11,7 +11,7 @@ module.exports = (() => {
11
11
  *
12
12
  * @public
13
13
  */
14
- class Validator {
14
+ class TypeValidator {
15
15
  constructor() {
16
16
 
17
17
  }
@@ -25,7 +25,7 @@ module.exports = (() => {
25
25
  * @param {Boolean=} userInitiated
26
26
  * @return {Array.<TransactionType>}
27
27
  */
28
- static getValidTransactionTypesFor(instrumentType, userInitiated) {
28
+ static getTransactionTypesFor(instrumentType, userInitiated) {
29
29
  assert.argumentIsRequired(instrumentType, 'instrumentType', InstrumentType, 'InstrumentType');
30
30
  assert.argumentIsOptional(userInitiated, 'userInitiated', Boolean);
31
31
 
@@ -48,13 +48,13 @@ module.exports = (() => {
48
48
  * @return {Boolean}
49
49
  */
50
50
  static validateTransactionTypeFor(instrumentType, transactionType, userInitiated) {
51
- const transactionTypes = Validator.getValidTransactionTypesFor(instrumentType, userInitiated);
51
+ const transactionTypes = TypeValidator.getTransactionTypesFor(instrumentType, userInitiated);
52
52
 
53
53
  return transactionType.some(t => t === transactionType);
54
54
  }
55
55
 
56
56
  toString() {
57
- return '[Validator]';
57
+ return '[TypeValidator]';
58
58
  }
59
59
  }
60
60
 
@@ -99,5 +99,5 @@ module.exports = (() => {
99
99
  associateTypes(InstrumentType.CASH, TransactionType.DEBIT, false);
100
100
  associateTypes(InstrumentType.CASH, TransactionType.CREDIT, false);
101
101
 
102
- return Validator;
102
+ return TypeValidator;
103
103
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.218",
3
+ "version": "1.0.219",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",