@barchart/portfolio-api-common 7.4.1 → 7.5.0

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.
@@ -0,0 +1,47 @@
1
+ const Enum = require('@barchart/common-js/lang/Enum');
2
+
3
+ module.exports = (() => {
4
+ 'use strict';
5
+
6
+ /**
7
+ * An enumeration item that describes a strategy for importing positions
8
+ * into a SnapTrade-linked account.
9
+ *
10
+ * @public
11
+ * @extends {Enum}
12
+ * @param {String} code
13
+ */
14
+ class SnapTradeLinkMode extends Enum {
15
+ constructor(code) {
16
+ super(code, code);
17
+ }
18
+
19
+ static get STANDARD() {
20
+ return standard;
21
+ }
22
+
23
+ static get LIMITED() {
24
+ return limited;
25
+ }
26
+
27
+ /**
28
+ * Given a code, returns the enumeration item.
29
+ *
30
+ * @public
31
+ * @param {String} code
32
+ * @returns {SnapTradeLinkMode|null}
33
+ */
34
+ static parse(code) {
35
+ return Enum.fromCode(SnapTradeLinkMode, code);
36
+ }
37
+
38
+ toString() {
39
+ return `[SnapTradeLinkMode (code=${this.code})]`;
40
+ }
41
+ }
42
+
43
+ const standard = new SnapTradeLinkMode('STANDARD');
44
+ const limited = new SnapTradeLinkMode('LIMITED');
45
+
46
+ return SnapTradeLinkMode;
47
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "7.4.1",
3
+ "version": "7.5.0",
4
4
  "description": "Common JavaScript code used by Barchart's Portfolio Service",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",