snaptrade 1.7.0 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,403 +0,0 @@
1
- =begin
2
- #SnapTrade
3
-
4
- #Connect brokerage accounts to your app for live positions and trading
5
-
6
- The version of the OpenAPI document: 1.0.0
7
- Contact: api@snaptrade.com
8
-
9
- =end
10
-
11
- require 'spec_helper'
12
- require 'json'
13
-
14
- # Unit tests for SnapTrade::PortfolioManagementApi
15
- describe 'PortfolioManagementApi' do
16
- before do
17
- # run before each test
18
- @api_instance = SnapTrade::PortfolioManagementApi.new
19
- end
20
-
21
- after do
22
- # run after each test
23
- end
24
-
25
- describe 'test an instance of PortfolioManagementApi' do
26
- it 'should create an instance of PortfolioManagementApi' do
27
- expect(@api_instance).to be_instance_of(SnapTrade::PortfolioManagementApi)
28
- end
29
- end
30
-
31
- # unit tests for add_portfolio_excluded_asset
32
- # Adds an asset to exclude to a portfolio group
33
- # @param portfolio_group_id The ID of the PortfolioGroup under which to exclude an asset.
34
- # @param [Hash] opts the optional parameters
35
- # @option opts [UniversalSymbol] :universal_symbol
36
- # @return [ExcludedAsset]
37
- describe 'add_portfolio_excluded_asset test' do
38
- it 'should work' do
39
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
40
- end
41
- end
42
-
43
- # unit tests for create
44
- # Create new portfolio group
45
- # @param user_id
46
- # @param user_secret
47
- # @param request_body
48
- # @param [Hash] opts the optional parameters
49
- # @return [Array<PortfolioGroup>]
50
- describe 'create test' do
51
- it 'should work' do
52
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
53
- end
54
- end
55
-
56
- # unit tests for create_asset_class
57
- # Create a new model asset class
58
- # @param user_id
59
- # @param user_secret
60
- # @param [Hash] opts the optional parameters
61
- # @return [ModelAssetClassDetails]
62
- describe 'create_asset_class test' do
63
- it 'should work' do
64
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
65
- end
66
- end
67
-
68
- # unit tests for create_model_portfolio
69
- # Creates a new model portfolio
70
- # @param [Hash] opts the optional parameters
71
- # @return [ModelPortfolioDetails]
72
- describe 'create_model_portfolio test' do
73
- it 'should work' do
74
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
75
- end
76
- end
77
-
78
- # unit tests for delete_asset_class
79
- # Deletes a model asset class
80
- # @param model_asset_class_id The ID of the model asset class to delete.
81
- # @param [Hash] opts the optional parameters
82
- # @return [nil]
83
- describe 'delete_asset_class test' do
84
- it 'should work' do
85
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
- end
87
- end
88
-
89
- # unit tests for delete_excluded_asset
90
- # Unexclude an asset from a portfolio group
91
- # @param portfolio_group_id The ID of the PortfolioGroup under which to unexclude an asset.
92
- # @param symbol_id The ID of the excluded asset Symbol to delete.
93
- # @param [Hash] opts the optional parameters
94
- # @return [nil]
95
- describe 'delete_excluded_asset test' do
96
- it 'should work' do
97
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
- end
99
- end
100
-
101
- # unit tests for delete_model_portfolio_by_id
102
- # Deletes a model portfolio
103
- # @param model_portfolio_id The ID of the model portfolio to delete.
104
- # @param [Hash] opts the optional parameters
105
- # @return [nil]
106
- describe 'delete_model_portfolio_by_id test' do
107
- it 'should work' do
108
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
109
- end
110
- end
111
-
112
- # unit tests for delete_portfoli
113
- # Remove a target portfolio.
114
- # @param portfolio_group_id The ID of the PortfolioGroup to delete.
115
- # @param [Hash] opts the optional parameters
116
- # @return [PortfolioGroup]
117
- describe 'delete_portfoli test' do
118
- it 'should work' do
119
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
120
- end
121
- end
122
-
123
- # unit tests for delete_portfolio_target_by_id
124
- # Remove a TargetAsset.
125
- # @param portfolio_group_id The ID of the PortfolioGroup under which to remove the target asset.
126
- # @param target_asset_id The ID of the TargetAsset to delete.
127
- # @param [Hash] opts the optional parameters
128
- # @return [TargetAsset]
129
- describe 'delete_portfolio_target_by_id test' do
130
- it 'should work' do
131
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
132
- end
133
- end
134
-
135
- # unit tests for detail_asset_class
136
- # Get details of a model asset class
137
- # @param model_asset_class_id The ID of the model asset class to get.
138
- # @param user_id
139
- # @param user_secret
140
- # @param [Hash] opts the optional parameters
141
- # @return [ModelAssetClassDetails]
142
- describe 'detail_asset_class test' do
143
- it 'should work' do
144
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
145
- end
146
- end
147
-
148
- # unit tests for get_calculated_trade_by_id
149
- # Return an individual trade
150
- # @param portfolio_group_id The ID of the PortfolioGroup to perform rebalancing calculations
151
- # @param calculated_trade_id The ID of calculated trade to get account impact
152
- # @param trade_id The ID of trade object
153
- # @param [Hash] opts the optional parameters
154
- # @return [Array<Trade>]
155
- describe 'get_calculated_trade_by_id test' do
156
- it 'should work' do
157
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
158
- end
159
- end
160
-
161
- # unit tests for get_model_details_by_id
162
- # Get details of a model portfolio
163
- # @param model_portfolio_id The ID of the model portfolio to get.
164
- # @param [Hash] opts the optional parameters
165
- # @return [ModelPortfolioDetails]
166
- describe 'get_model_details_by_id test' do
167
- it 'should work' do
168
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
169
- end
170
- end
171
-
172
- # unit tests for get_portfolio_balances
173
- # Get sum of cash balances in portfolio group
174
- # @param portfolio_group_id The ID of the PortfolioGroup under which to create the target asset.
175
- # @param [Hash] opts the optional parameters
176
- # @return [Array<Balance>]
177
- describe 'get_portfolio_balances test' do
178
- it 'should work' do
179
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
180
- end
181
- end
182
-
183
- # unit tests for get_portfolio_details_by_id
184
- # Get details of a target portfolio
185
- # @param portfolio_group_id The ID of the PortfolioGroup to get.
186
- # @param [Hash] opts the optional parameters
187
- # @return [PortfolioGroup]
188
- describe 'get_portfolio_details_by_id test' do
189
- it 'should work' do
190
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
191
- end
192
- end
193
-
194
- # unit tests for get_portfolio_info
195
- # Return a whole bunch of relevant information relating to a portfolio group.
196
- # @param portfolio_group_id The ID of the PortfolioGroup under which to create the target asset.
197
- # @param [Hash] opts the optional parameters
198
- # @return [PortfolioGroupInfo]
199
- describe 'get_portfolio_info test' do
200
- it 'should work' do
201
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
202
- end
203
- end
204
-
205
- # unit tests for get_portfolio_settings
206
- # Get portfolio group settings
207
- # @param portfolio_group_id The ID of the PortfolioGroup under which to get the settings.
208
- # @param [Hash] opts the optional parameters
209
- # @return [PortfolioGroupSettings]
210
- describe 'get_portfolio_settings test' do
211
- it 'should work' do
212
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
213
- end
214
- end
215
-
216
- # unit tests for get_portfolio_target_by_id
217
- # Get a specific target from a portfolio group
218
- # @param portfolio_group_id The ID of the PortfolioGroup under which to get the target asset.
219
- # @param target_asset_id The ID of the TargetAsset to get.
220
- # @param [Hash] opts the optional parameters
221
- # @return [TargetAsset]
222
- describe 'get_portfolio_target_by_id test' do
223
- it 'should work' do
224
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
225
- end
226
- end
227
-
228
- # unit tests for get_portfolio_targets
229
- # Get all target assets under the specified PortfolioGroup.
230
- # @param portfolio_group_id The ID of the PortfolioGroup under which to create the target asset.
231
- # @param [Hash] opts the optional parameters
232
- # @return [Array<TargetAsset>]
233
- describe 'get_portfolio_targets test' do
234
- it 'should work' do
235
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
236
- end
237
- end
238
-
239
- # unit tests for get_portoflio_excluded_assets
240
- # Get an array of excluded assets associated with a portfolio group\\
241
- # @param portfolio_group_id The ID of the PortfolioGroup under which the excluded assets are linked.
242
- # @param [Hash] opts the optional parameters
243
- # @return [Array<ExcludedAsset>]
244
- describe 'get_portoflio_excluded_assets test' do
245
- it 'should work' do
246
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
247
- end
248
- end
249
-
250
- # unit tests for import_model_portfolio
251
- # Import target allocation based on portfolio group
252
- # @param portfolio_group_id The ID of the PortfolioGroup under which to create the target asset.
253
- # @param [Hash] opts the optional parameters
254
- # @return [Array<TargetAsset>]
255
- describe 'import_model_portfolio test' do
256
- it 'should work' do
257
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
258
- end
259
- end
260
-
261
- # unit tests for list
262
- # List all portfolio groups
263
- # @param user_id
264
- # @param user_secret
265
- # @param [Hash] opts the optional parameters
266
- # @return [Array<PortfolioGroup>]
267
- describe 'list test' do
268
- it 'should work' do
269
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
270
- end
271
- end
272
-
273
- # unit tests for list_asset_classes
274
- # List of model asset class
275
- # @param user_id
276
- # @param user_secret
277
- # @param [Hash] opts the optional parameters
278
- # @return [Array<ModelAssetClassDetails>]
279
- describe 'list_asset_classes test' do
280
- it 'should work' do
281
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
282
- end
283
- end
284
-
285
- # unit tests for list_calculated_trades
286
- # List of trades to make to rebalance portfolio group
287
- # @param portfolio_group_id The ID of the PortfolioGroup to perform rebalancing calculations
288
- # @param [Hash] opts the optional parameters
289
- # @return [CalculatedTrade]
290
- describe 'list_calculated_trades test' do
291
- it 'should work' do
292
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
293
- end
294
- end
295
-
296
- # unit tests for list_model_portfolio
297
- # List of model portfolio
298
- # @param [Hash] opts the optional parameters
299
- # @return [Array<ModelPortfolioDetails>]
300
- describe 'list_model_portfolio test' do
301
- it 'should work' do
302
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
303
- end
304
- end
305
-
306
- # unit tests for list_portfolio_accounts
307
- # Get all accounts associated with a portfolio group
308
- # @param portfolio_group_id The ID of the PortfolioGroup under which the accounts are linked.
309
- # @param [Hash] opts the optional parameters
310
- # @return [Array<Account>]
311
- describe 'list_portfolio_accounts test' do
312
- it 'should work' do
313
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
314
- end
315
- end
316
-
317
- # unit tests for modify_model_portfolio_by_id
318
- # Updates model portfolio object
319
- # @param model_portfolio_id The ID of the model portfolio to update.
320
- # @param model_portfolio_details Use this endpoint change model asset class name and to add or remove a model portfolio security/model portfolio asset class. &lt;br /&gt;&lt;br /&gt; * The model portfolio name and model portfolio model type is required. &lt;br /&gt; * The model portfolio model type must be either 0 or 1. [0 -&gt; Securities based, 1 -&gt; Asset Class based] &lt;br /&gt;&lt;br /&gt; * If the model portfolio type is 0, the model portfolio asset class must be an empty array. &lt;br /&gt; * If the model portfolio type is 1, the model portfolio security must be an empty array. &lt;br /&gt;&lt;br /&gt; * When updating the model portfolio security, the percent is required. Only the symbol id is required for the symbol object &lt;br /&gt; * When updating the model portfolio asset classes, the percent is required. Only the model asset class id is required for the model asset class object &lt;br /&gt;&lt;br /&gt; * To remove all model portfolio securities or model portfolio asset class, set then to an empty array
321
- # @param [Hash] opts the optional parameters
322
- # @return [nil]
323
- describe 'modify_model_portfolio_by_id test' do
324
- it 'should work' do
325
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
326
- end
327
- end
328
-
329
- # unit tests for save_portfolio
330
- # Update an existing target portfolio.
331
- # @param portfolio_group_id The ID of the PortfolioGroup to update.
332
- # @param request_body
333
- # @param [Hash] opts the optional parameters
334
- # @return [PortfolioGroup]
335
- describe 'save_portfolio test' do
336
- it 'should work' do
337
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
338
- end
339
- end
340
-
341
- # unit tests for search_portfolio_symbols
342
- # Search for symbols limited to brokerages under the specified portfolio group
343
- # @param portfolio_group_id The ID of the PortfolioGroup to search under
344
- # @param [Hash] opts the optional parameters
345
- # @option opts [SymbolQuery] :symbol_query
346
- # @return [Array<UniversalSymbol>]
347
- describe 'search_portfolio_symbols test' do
348
- it 'should work' do
349
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
350
- end
351
- end
352
-
353
- # unit tests for set_portfolio_targets
354
- # Set a new list of target assets under the specified PortfolioGroup. All existing target assets under this portfolio group will be replaced with the new list.
355
- # @param portfolio_group_id The ID of the PortfolioGroup under which to create the target asset.
356
- # @param [Hash] opts the optional parameters
357
- # @option opts [Array<TargetAsset>] :target_asset
358
- # @return [Array<TargetAsset>]
359
- describe 'set_portfolio_targets test' do
360
- it 'should work' do
361
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
362
- end
363
- end
364
-
365
- # unit tests for update_asset_class
366
- # Updates model asset class objects
367
- # @param model_asset_class_id The ID of the model asset class to update.
368
- # @param user_id
369
- # @param user_secret
370
- # @param model_asset_class_details Use this endpoint change model asset class name and to add or remove a model asset class target. &lt;br /&gt;&lt;br /&gt; * Only the model asset class name is required for the model asset class object. &lt;br /&gt; * Only the symbol id is required for the symbol object in the model asset class target object. &lt;br /&gt; * To remove all model asset class targets, set the model asset class target as an empty array
371
- # @param [Hash] opts the optional parameters
372
- # @return [nil]
373
- describe 'update_asset_class test' do
374
- it 'should work' do
375
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
376
- end
377
- end
378
-
379
- # unit tests for update_portfolio_settings
380
- # Updates portfolio group settings
381
- # @param portfolio_group_id The ID of the PortfolioGroup under which to patch the settings.
382
- # @param [Hash] opts the optional parameters
383
- # @return [PortfolioGroupSettings]
384
- describe 'update_portfolio_settings test' do
385
- it 'should work' do
386
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
387
- end
388
- end
389
-
390
- # unit tests for update_portfolio_target_by_id
391
- # Update a TargetAsset under the specified PortfolioGroup.
392
- # @param portfolio_group_id The ID of the PortfolioGroup under which to patch the target asset.
393
- # @param target_asset_id The ID of the TargetAsset to patch.
394
- # @param target_asset
395
- # @param [Hash] opts the optional parameters
396
- # @return [TargetAsset]
397
- describe 'update_portfolio_target_by_id test' do
398
- it 'should work' do
399
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
400
- end
401
- end
402
-
403
- end