@barchart/portfolio-client-js 1.3.2 → 1.3.3
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.
- package/example/example.js +16 -1
- package/lib/gateway/PortfolioGateway.js +19 -6
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/example/example.js
CHANGED
|
@@ -920,6 +920,21 @@ module.exports = function () {
|
|
|
920
920
|
return Gateway.invoke(_this20._readBrokerageReportAvailabilityEndpoint, payload);
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
|
+
}, {
|
|
924
|
+
key: 'getBrokerageReportUrl',
|
|
925
|
+
value: function getBrokerageReportUrl(portfolio, frame, start) {
|
|
926
|
+
var _this21 = this;
|
|
927
|
+
|
|
928
|
+
return Promise.resolve().then(function () {
|
|
929
|
+
checkStart.call(_this21);
|
|
930
|
+
|
|
931
|
+
assert.argumentIsRequired(portfolio, 'portfolio', String);
|
|
932
|
+
assert.argumentIsRequired(frame, 'frame', PositionSummaryFrame, 'PositionSummaryFrame');
|
|
933
|
+
assert.argumentIsRequired(start, 'start', Day, 'Day');
|
|
934
|
+
|
|
935
|
+
return 'https://portfolio-dev.aws.barchart.com/binary/reports/portfolios/9555fb81-f640-4a95-8766-aa59f38d2abd/frames/MONTHLY/date/2017-06-30';
|
|
936
|
+
});
|
|
937
|
+
}
|
|
923
938
|
|
|
924
939
|
/**
|
|
925
940
|
* Creates and starts a new {@link PortfolioGateway} for use in the development environment.
|
|
@@ -1563,7 +1578,7 @@ module.exports = function () {
|
|
|
1563
1578
|
return {
|
|
1564
1579
|
JwtGateway: JwtGateway,
|
|
1565
1580
|
PortfolioGateway: PortfolioGateway,
|
|
1566
|
-
version: '1.3.
|
|
1581
|
+
version: '1.3.3'
|
|
1567
1582
|
};
|
|
1568
1583
|
}();
|
|
1569
1584
|
|
|
@@ -906,15 +906,28 @@ module.exports = (() => {
|
|
|
906
906
|
*/
|
|
907
907
|
readBrokerageReportAvailability(portfolio) {
|
|
908
908
|
return Promise.resolve()
|
|
909
|
-
|
|
910
|
-
|
|
909
|
+
.then(() => {
|
|
910
|
+
assert.argumentIsRequired(portfolio, 'portfolio', String);
|
|
911
911
|
|
|
912
|
-
|
|
912
|
+
const payload = { };
|
|
913
913
|
|
|
914
|
-
|
|
914
|
+
payload.portfolio = portfolio;
|
|
915
915
|
|
|
916
|
-
|
|
917
|
-
|
|
916
|
+
return Gateway.invoke(this._readBrokerageReportAvailabilityEndpoint, payload);
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
getBrokerageReportUrl(portfolio, frame, start) {
|
|
921
|
+
return Promise.resolve()
|
|
922
|
+
.then(() => {
|
|
923
|
+
checkStart.call(this);
|
|
924
|
+
|
|
925
|
+
assert.argumentIsRequired(portfolio, 'portfolio', String);
|
|
926
|
+
assert.argumentIsRequired(frame, 'frame', PositionSummaryFrame, 'PositionSummaryFrame');
|
|
927
|
+
assert.argumentIsRequired(start, 'start', Day, 'Day');
|
|
928
|
+
|
|
929
|
+
return 'https://portfolio-dev.aws.barchart.com/binary/reports/portfolios/9555fb81-f640-4a95-8766-aa59f38d2abd/frames/MONTHLY/date/2017-06-30';
|
|
930
|
+
});
|
|
918
931
|
}
|
|
919
932
|
|
|
920
933
|
/**
|
package/lib/index.js
CHANGED