UNPKG

@gitchrisqueen/tdameritrade-api-js-client

Version:
191 lines (173 loc) 7.87 kB
/* * TD Ameritrade API - OAuth2 * This is replication of the TD Ameritrade API. * * OpenAPI spec version: 0.1.4 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.14 * * Do not edit the class manually. * */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. define(['expect.js', '../../src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) factory(root.expect, root.GitChrisQueen_TDA_JS); } }(this, function(expect, GitChrisQueen_TDA_JS) { 'use strict'; var instance; beforeEach(function() { instance = new GitChrisQueen_TDA_JS.WatchlistApi(); }); describe('(package)', function() { describe('WatchlistApi', function() { describe('accountsAccountIdWatchlistsGET', function() { it('should call accountsAccountIdWatchlistsGET successfully', function(done) { // TODO: uncomment, update parameter values for accountsAccountIdWatchlistsGET call and complete the assertions /* var accountId = "accountId_example"; instance.accountsAccountIdWatchlistsGET(accountId).then(function(data) { // TODO: update response assertions expect(data).to.be.a(GitChrisQueen_TDA_JS.WatchListResponse); done(); }, function(error) { done(error); }); */ // TODO: uncomment and complete method invocation above, then delete this line and the next: done(); }); }); describe('accountsAccountIdWatchlistsPOST', function() { it('should call accountsAccountIdWatchlistsPOST successfully', function(done) { // TODO: uncomment, update parameter values for accountsAccountIdWatchlistsPOST call /* var accountId = "accountId_example"; var opts = {}; opts.body = new GitChrisQueen_TDA_JS.WatchListRequest(); opts.body.name = ""; opts.body.watchlistId = ""; opts.body.watchlistItems = [new GitChrisQueen_TDA_JS.WatchListRequestWatchlistItems()]; opts.body.watchlistItems[0].averagePrice = 0.0; opts.body.watchlistItems[0].commission = 0.0; opts.body.watchlistItems[0].instrument = new GitChrisQueen_TDA_JS.WatchListRequestInstrument(); opts.body.watchlistItems[0].instrument.assetType = "EQUITY"; opts.body.watchlistItems[0].instrument.symbol = ""; opts.body.watchlistItems[0].purchasedDate = ; opts.body.watchlistItems[0].quantity = 0.0; opts.body.watchlistItems[0].sequenceId = 0; instance.accountsAccountIdWatchlistsPOST(accountId, opts).then(function(data) { done(); }, function(error) { done(error); }); */ // TODO: uncomment and complete method invocation above, then delete this line and the next: done(); }); }); describe('accountsAccountIdWatchlistsWatchlistIdGET', function() { it('should call accountsAccountIdWatchlistsWatchlistIdGET successfully', function(done) { // TODO: uncomment, update parameter values for accountsAccountIdWatchlistsWatchlistIdGET call and complete the assertions /* var accountId = "accountId_example"; var watchlistId = "watchlistId_example"; instance.accountsAccountIdWatchlistsWatchlistIdGET(accountId, watchlistId).then(function(data) { // TODO: update response assertions expect(data).to.be.a(GitChrisQueen_TDA_JS.WatchListResponse); done(); }, function(error) { done(error); }); */ // TODO: uncomment and complete method invocation above, then delete this line and the next: done(); }); }); describe('accountsAccountIdWatchlistsWatchlistIdPATCH', function() { it('should call accountsAccountIdWatchlistsWatchlistIdPATCH successfully', function(done) { // TODO: uncomment, update parameter values for accountsAccountIdWatchlistsWatchlistIdPATCH call /* var accountId = "accountId_example"; var watchlistId = "watchlistId_example"; var opts = {}; opts.body = new GitChrisQueen_TDA_JS.WatchListRequest(); opts.body.name = ""; opts.body.watchlistId = ""; opts.body.watchlistItems = [new GitChrisQueen_TDA_JS.WatchListRequestWatchlistItems()]; opts.body.watchlistItems[0].averagePrice = 0.0; opts.body.watchlistItems[0].commission = 0.0; opts.body.watchlistItems[0].instrument = new GitChrisQueen_TDA_JS.WatchListRequestInstrument(); opts.body.watchlistItems[0].instrument.assetType = "EQUITY"; opts.body.watchlistItems[0].instrument.symbol = ""; opts.body.watchlistItems[0].purchasedDate = ; opts.body.watchlistItems[0].quantity = 0.0; opts.body.watchlistItems[0].sequenceId = 0; instance.accountsAccountIdWatchlistsWatchlistIdPATCH(accountId, watchlistId, opts).then(function(data) { done(); }, function(error) { done(error); }); */ // TODO: uncomment and complete method invocation above, then delete this line and the next: done(); }); }); describe('accountsAccountIdWatchlistsWatchlistIdPUT', function() { it('should call accountsAccountIdWatchlistsWatchlistIdPUT successfully', function(done) { // TODO: uncomment, update parameter values for accountsAccountIdWatchlistsWatchlistIdPUT call /* var accountId = "accountId_example"; var watchlistId = "watchlistId_example"; var opts = {}; opts.body = new GitChrisQueen_TDA_JS.WatchListRequest(); opts.body.name = ""; opts.body.watchlistId = ""; opts.body.watchlistItems = [new GitChrisQueen_TDA_JS.WatchListRequestWatchlistItems()]; opts.body.watchlistItems[0].averagePrice = 0.0; opts.body.watchlistItems[0].commission = 0.0; opts.body.watchlistItems[0].instrument = new GitChrisQueen_TDA_JS.WatchListRequestInstrument(); opts.body.watchlistItems[0].instrument.assetType = "EQUITY"; opts.body.watchlistItems[0].instrument.symbol = ""; opts.body.watchlistItems[0].purchasedDate = ; opts.body.watchlistItems[0].quantity = 0.0; opts.body.watchlistItems[0].sequenceId = 0; instance.accountsAccountIdWatchlistsWatchlistIdPUT(accountId, watchlistId, opts).then(function(data) { done(); }, function(error) { done(error); }); */ // TODO: uncomment and complete method invocation above, then delete this line and the next: done(); }); }); describe('accountsWatchlistsGET', function() { it('should call accountsWatchlistsGET successfully', function(done) { // TODO: uncomment accountsWatchlistsGET call and complete the assertions /* instance.accountsWatchlistsGET().then(function(data) { // TODO: update response assertions expect(data).to.be.a(GitChrisQueen_TDA_JS.WatchListResponse); done(); }, function(error) { done(error); }); */ // TODO: uncomment and complete method invocation above, then delete this line and the next: done(); }); }); }); }); }));