@barchart/portfolio-client-js 1.2.7 → 1.2.8

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.
@@ -618,6 +618,12 @@ module.exports = (() => {
618
618
  assert.argumentIsRequired(portfolio, 'portfolio', Object);
619
619
  assert.argumentIsArray(transactions, 'transactions', Object);
620
620
 
621
+ const batchData = { };
622
+
623
+ batchData.portfolio = portfolio;
624
+ batchData.transactionTypes = [ ];
625
+ batchData.transactionItems = [ ];
626
+
621
627
  const batchData = transactions.reduce((data, transaction) => {
622
628
  transaction.portfolio = portfolio.portfolio;
623
629
 
@@ -628,14 +634,11 @@ module.exports = (() => {
628
634
  const code = getTransactionTypeCode(transaction);
629
635
  const schema = getTransactionSchema(transaction);
630
636
 
631
- data.types.push(code);
632
- data.transactions.push(JSON.stringify(schema.schema.format(transaction)));
637
+ data.transactionTypes.push(code);
638
+ data.transactionItems.push(JSON.stringify(schema.schema.format(transaction)));
633
639
 
634
640
  return data;
635
- }, {
636
- types: [ ],
637
- transactions: [ ]
638
- });
641
+ }, batchData);
639
642
 
640
643
  return Gateway.invoke(this._batchTransactionEndpoint, batchData);
641
644
  });
package/lib/index.js CHANGED
@@ -7,6 +7,6 @@ module.exports = (() => {
7
7
  return {
8
8
  JwtGateway: JwtGateway,
9
9
  PortfolioGateway: PortfolioGateway,
10
- version: '1.2.7'
10
+ version: '1.2.8'
11
11
  };
12
12
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-client-js",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "JavaScript library for interfacing with Barchart's Portfolio API",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",