snaptrade 2.0.185 → 2.0.186

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +52 -2
  4. data/lib/snaptrade/api/experimental_endpoints_api.rb +141 -0
  5. data/lib/snaptrade/models/account_order_record_option_symbol.rb +1 -1
  6. data/lib/snaptrade/models/account_order_record_quote_universal_symbol.rb +1 -1
  7. data/lib/snaptrade/models/account_order_record_universal_symbol.rb +1 -1
  8. data/lib/snaptrade/models/account_position.rb +288 -0
  9. data/lib/snaptrade/models/account_universal_activity_option_symbol.rb +1 -1
  10. data/lib/snaptrade/models/account_universal_activity_symbol.rb +1 -1
  11. data/lib/snaptrade/models/all_account_positions_response.rb +262 -0
  12. data/lib/snaptrade/models/crypto_instrument.rb +311 -0
  13. data/lib/snaptrade/models/crypto_instrument_kind.rb +36 -0
  14. data/lib/snaptrade/models/etf_instrument.rb +311 -0
  15. data/lib/snaptrade/models/etf_instrument_kind.rb +36 -0
  16. data/lib/snaptrade/models/future_instrument.rb +326 -0
  17. data/lib/snaptrade/models/future_instrument_kind.rb +36 -0
  18. data/lib/snaptrade/models/instrument.rb +61 -0
  19. data/lib/snaptrade/models/kind.rb +36 -0
  20. data/lib/snaptrade/models/option_instrument.rb +322 -0
  21. data/lib/snaptrade/models/option_instrument_kind.rb +36 -0
  22. data/lib/snaptrade/models/options_symbol.rb +1 -1
  23. data/lib/snaptrade/models/options_symbol_option_type.rb +37 -0
  24. data/lib/snaptrade/models/other_instrument.rb +311 -0
  25. data/lib/snaptrade/models/other_instrument_kind.rb +36 -0
  26. data/lib/snaptrade/models/stock_instrument.rb +311 -0
  27. data/lib/snaptrade/models/{symbol_figi_instrument.rb → stock_instrument_figi_instrument.rb} +3 -3
  28. data/lib/snaptrade/models/symbol.rb +1 -1
  29. data/lib/snaptrade/models/underlying_option_instrument.rb +57 -0
  30. data/lib/snaptrade/models/underlying_symbol.rb +1 -1
  31. data/lib/snaptrade/models/universal_symbol.rb +1 -1
  32. data/lib/snaptrade/version.rb +1 -1
  33. data/lib/snaptrade.rb +18 -1
  34. data/spec/api/experimental_endpoints_api_spec.rb +16 -0
  35. data/spec/models/account_position_spec.rb +65 -0
  36. data/spec/models/all_account_positions_response_spec.rb +47 -0
  37. data/spec/models/crypto_instrument_kind_spec.rb +23 -0
  38. data/spec/models/crypto_instrument_spec.rb +71 -0
  39. data/spec/models/etf_instrument_kind_spec.rb +23 -0
  40. data/spec/models/etf_instrument_spec.rb +71 -0
  41. data/spec/models/future_instrument_kind_spec.rb +23 -0
  42. data/spec/models/future_instrument_spec.rb +77 -0
  43. data/spec/models/instrument_spec.rb +38 -0
  44. data/spec/models/kind_spec.rb +23 -0
  45. data/spec/models/option_instrument_kind_spec.rb +23 -0
  46. data/spec/models/option_instrument_spec.rb +71 -0
  47. data/spec/models/options_symbol_option_type_spec.rb +23 -0
  48. data/spec/models/other_instrument_kind_spec.rb +23 -0
  49. data/spec/models/other_instrument_spec.rb +71 -0
  50. data/spec/models/{symbol_figi_instrument_spec.rb → stock_instrument_figi_instrument_spec.rb} +6 -6
  51. data/spec/models/stock_instrument_spec.rb +71 -0
  52. data/spec/models/underlying_option_instrument_spec.rb +38 -0
  53. metadata +56 -5
@@ -0,0 +1,57 @@
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
+ =end
9
+
10
+ require 'date'
11
+ require 'time'
12
+
13
+ module SnapTrade
14
+ # The underlying instrument for an option.
15
+ module UnderlyingOptionInstrument
16
+ class << self
17
+ # List of class defined in oneOf (OpenAPI v3)
18
+ def openapi_one_of
19
+ [
20
+ :'CryptoInstrument',
21
+ :'EtfInstrument',
22
+ :'OtherInstrument',
23
+ :'StockInstrument'
24
+ ]
25
+ end
26
+
27
+ # Discriminator's property name (OpenAPI v3)
28
+ def openapi_discriminator_name
29
+ :'kind'
30
+ end
31
+
32
+ # Discriminator's mapping (OpenAPI v3)
33
+ def openapi_discriminator_mapping
34
+ {
35
+ :'crypto' => :'CryptoInstrument',
36
+ :'etf' => :'EtfInstrument',
37
+ :'other' => :'OtherInstrument',
38
+ :'stock' => :'StockInstrument'
39
+ }
40
+ end
41
+
42
+ # Builds the object
43
+ # @param [Mixed] Data to be matched against the list of oneOf items
44
+ # @return [Object] Returns the model or the data itself
45
+ def build(data)
46
+ discriminator_value = data[openapi_discriminator_name]
47
+ return nil if discriminator_value.nil?
48
+
49
+ klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
50
+ return nil unless klass
51
+
52
+ SnapTrade.const_get(klass).build_from_hash(data)
53
+ end
54
+ end
55
+ end
56
+
57
+ end
@@ -71,7 +71,7 @@ module SnapTrade
71
71
  :'exchange' => :'UnderlyingSymbolExchange',
72
72
  :'type' => :'UnderlyingSymbolType',
73
73
  :'figi_code' => :'String',
74
- :'figi_instrument' => :'SymbolFigiInstrument',
74
+ :'figi_instrument' => :'StockInstrumentFigiInstrument',
75
75
  :'currencies' => :'Array<Currency>'
76
76
  }
77
77
  end
@@ -71,7 +71,7 @@ module SnapTrade
71
71
  :'exchange' => :'SymbolExchange',
72
72
  :'type' => :'SecurityType',
73
73
  :'figi_code' => :'String',
74
- :'figi_instrument' => :'SymbolFigiInstrument',
74
+ :'figi_instrument' => :'StockInstrumentFigiInstrument',
75
75
  :'currencies' => :'Array<Currency>'
76
76
  }
77
77
  end
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.185'
11
+ VERSION = '2.0.186'
12
12
  end
data/lib/snaptrade.rb CHANGED
@@ -36,6 +36,7 @@ require 'snaptrade/models/account_order_record_trailing_stop'
36
36
  require 'snaptrade/models/account_order_record_universal_symbol'
37
37
  require 'snaptrade/models/account_order_record_v2'
38
38
  require 'snaptrade/models/account_orders_v2_response'
39
+ require 'snaptrade/models/account_position'
39
40
  require 'snaptrade/models/account_simple'
40
41
  require 'snaptrade/models/account_status'
41
42
  require 'snaptrade/models/account_sync_status'
@@ -47,6 +48,7 @@ require 'snaptrade/models/account_value_history_item'
47
48
  require 'snaptrade/models/account_value_history_response'
48
49
  require 'snaptrade/models/action_strict'
49
50
  require 'snaptrade/models/action_strict_with_options'
51
+ require 'snaptrade/models/all_account_positions_response'
50
52
  require 'snaptrade/models/auth_type'
51
53
  require 'snaptrade/models/authentication_login_snap_trade_user200_response'
52
54
  require 'snaptrade/models/balance'
@@ -71,6 +73,8 @@ require 'snaptrade/models/complex_order_response_type'
71
73
  require 'snaptrade/models/connection_portal_version'
72
74
  require 'snaptrade/models/connection_type'
73
75
  require 'snaptrade/models/connections_session_events200_response_inner'
76
+ require 'snaptrade/models/crypto_instrument'
77
+ require 'snaptrade/models/crypto_instrument_kind'
74
78
  require 'snaptrade/models/crypto_order_form'
75
79
  require 'snaptrade/models/crypto_order_form_time_in_force'
76
80
  require 'snaptrade/models/crypto_order_form_type'
@@ -86,10 +90,16 @@ require 'snaptrade/models/delete_user_response'
86
90
  require 'snaptrade/models/dividend_at_date'
87
91
  require 'snaptrade/models/encrypted_response'
88
92
  require 'snaptrade/models/encrypted_response_encrypted_message_data'
93
+ require 'snaptrade/models/etf_instrument'
94
+ require 'snaptrade/models/etf_instrument_kind'
89
95
  require 'snaptrade/models/exchange'
90
96
  require 'snaptrade/models/exchange_rate_pairs'
91
97
  require 'snaptrade/models/figi_instrument'
98
+ require 'snaptrade/models/future_instrument'
99
+ require 'snaptrade/models/future_instrument_kind'
92
100
  require 'snaptrade/models/holdings_status'
101
+ require 'snaptrade/models/instrument'
102
+ require 'snaptrade/models/kind'
93
103
  require 'snaptrade/models/login_redirect_uri'
94
104
  require 'snaptrade/models/manual_trade'
95
105
  require 'snaptrade/models/manual_trade_and_impact'
@@ -129,6 +139,8 @@ require 'snaptrade/models/option_chain_inner'
129
139
  require 'snaptrade/models/option_chain_inner_chain_per_root_inner'
130
140
  require 'snaptrade/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner'
131
141
  require 'snaptrade/models/option_impact'
142
+ require 'snaptrade/models/option_instrument'
143
+ require 'snaptrade/models/option_instrument_kind'
132
144
  require 'snaptrade/models/option_leg'
133
145
  require 'snaptrade/models/option_leg_action'
134
146
  require 'snaptrade/models/option_quote'
@@ -139,10 +151,13 @@ require 'snaptrade/models/option_type'
139
151
  require 'snaptrade/models/options_position'
140
152
  require 'snaptrade/models/options_position_currency'
141
153
  require 'snaptrade/models/options_symbol'
154
+ require 'snaptrade/models/options_symbol_option_type'
142
155
  require 'snaptrade/models/order_role'
143
156
  require 'snaptrade/models/order_type_strict'
144
157
  require 'snaptrade/models/order_updated_response'
145
158
  require 'snaptrade/models/order_updated_response_order'
159
+ require 'snaptrade/models/other_instrument'
160
+ require 'snaptrade/models/other_instrument_kind'
146
161
  require 'snaptrade/models/paginated_universal_activity'
147
162
  require 'snaptrade/models/pagination_details'
148
163
  require 'snaptrade/models/partner_data'
@@ -165,6 +180,8 @@ require 'snaptrade/models/snap_trade_holdings_total_value'
165
180
  require 'snaptrade/models/snap_trade_login_user_request_body'
166
181
  require 'snaptrade/models/snap_trade_register_user_request_body'
167
182
  require 'snaptrade/models/status'
183
+ require 'snaptrade/models/stock_instrument'
184
+ require 'snaptrade/models/stock_instrument_figi_instrument'
168
185
  require 'snaptrade/models/stop_loss'
169
186
  require 'snaptrade/models/strategy_order_record'
170
187
  require 'snaptrade/models/strategy_order_record_status'
@@ -175,7 +192,6 @@ require 'snaptrade/models/sub_period_return_rate'
175
192
  require 'snaptrade/models/symbol'
176
193
  require 'snaptrade/models/symbol_currency'
177
194
  require 'snaptrade/models/symbol_exchange'
178
- require 'snaptrade/models/symbol_figi_instrument'
179
195
  require 'snaptrade/models/symbol_query'
180
196
  require 'snaptrade/models/symbols_quotes_inner'
181
197
  require 'snaptrade/models/take_profit'
@@ -190,6 +206,7 @@ require 'snaptrade/models/trailing_stop'
190
206
  require 'snaptrade/models/transactions_status'
191
207
  require 'snaptrade/models/type'
192
208
  require 'snaptrade/models/us_exchange'
209
+ require 'snaptrade/models/underlying_option_instrument'
193
210
  require 'snaptrade/models/underlying_symbol'
194
211
  require 'snaptrade/models/underlying_symbol_exchange'
195
212
  require 'snaptrade/models/underlying_symbol_type'
@@ -41,6 +41,22 @@ describe 'ExperimentalEndpointsApi' do
41
41
  end
42
42
  end
43
43
 
44
+ # unit tests for get_all_account_positions
45
+ # List all account positions
46
+ # Returns a paginated list of all positions in the specified account. The &#x60;results&#x60; list can contain multiple instrument types in the same response page, including stocks, ETFs, crypto, futures, and option positions. Use the &#x60;instrument.kind&#x60; discriminator to determine the schema for each position&#39;s &#x60;instrument&#x60;. Stock positions may also include &#x60;cash_equivalent&#x60;, and may include &#x60;tax_lots&#x60; when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
47
+ # @param user_id
48
+ # @param user_secret
49
+ # @param account_id
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [Integer] :page The page number to return. Defaults to 1.
52
+ # @option opts [Integer] :page_size The number of positions to return per page. Defaults to 100 with a maximum of 1000.
53
+ # @return [AllAccountPositionsResponse]
54
+ describe 'get_all_account_positions test' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
44
60
  # unit tests for get_user_account_order_detail_v2
45
61
  # Get account order detail (V2)
46
62
  # Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the &#x60;legs&#x60; list field. If the order is single legged, &#x60;legs&#x60; will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
@@ -0,0 +1,65 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::AccountPosition
15
+ describe SnapTrade::AccountPosition do
16
+ let(:instance) { SnapTrade::AccountPosition.new }
17
+
18
+ describe 'test an instance of AccountPosition' do
19
+ it 'should create an instance of AccountPosition' do
20
+ expect(instance).to be_instance_of(SnapTrade::AccountPosition)
21
+ end
22
+ end
23
+ describe 'test attribute "instrument"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "units"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "price"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "cost_basis"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "currency"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "cash_equivalent"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "tax_lots"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ end
@@ -0,0 +1,47 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::AllAccountPositionsResponse
15
+ describe SnapTrade::AllAccountPositionsResponse do
16
+ let(:instance) { SnapTrade::AllAccountPositionsResponse.new }
17
+
18
+ describe 'test an instance of AllAccountPositionsResponse' do
19
+ it 'should create an instance of AllAccountPositionsResponse' do
20
+ expect(instance).to be_instance_of(SnapTrade::AllAccountPositionsResponse)
21
+ end
22
+ end
23
+ describe 'test attribute "count"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "_next"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "previous"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "results"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
@@ -0,0 +1,23 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::CryptoInstrumentKind
15
+ describe SnapTrade::CryptoInstrumentKind do
16
+ let(:instance) { SnapTrade::CryptoInstrumentKind.new }
17
+
18
+ describe 'test an instance of CryptoInstrumentKind' do
19
+ it 'should create an instance of CryptoInstrumentKind' do
20
+ expect(instance).to be_instance_of(SnapTrade::CryptoInstrumentKind)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,71 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::CryptoInstrument
15
+ describe SnapTrade::CryptoInstrument do
16
+ let(:instance) { SnapTrade::CryptoInstrument.new }
17
+
18
+ describe 'test an instance of CryptoInstrument' do
19
+ it 'should create an instance of CryptoInstrument' do
20
+ expect(instance).to be_instance_of(SnapTrade::CryptoInstrument)
21
+ end
22
+ end
23
+ describe 'test attribute "kind"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "id"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "symbol"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "raw_symbol"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "description"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "currency"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "exchange"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ describe 'test attribute "figi_instrument"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ end
@@ -0,0 +1,23 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::EtfInstrumentKind
15
+ describe SnapTrade::EtfInstrumentKind do
16
+ let(:instance) { SnapTrade::EtfInstrumentKind.new }
17
+
18
+ describe 'test an instance of EtfInstrumentKind' do
19
+ it 'should create an instance of EtfInstrumentKind' do
20
+ expect(instance).to be_instance_of(SnapTrade::EtfInstrumentKind)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,71 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::EtfInstrument
15
+ describe SnapTrade::EtfInstrument do
16
+ let(:instance) { SnapTrade::EtfInstrument.new }
17
+
18
+ describe 'test an instance of EtfInstrument' do
19
+ it 'should create an instance of EtfInstrument' do
20
+ expect(instance).to be_instance_of(SnapTrade::EtfInstrument)
21
+ end
22
+ end
23
+ describe 'test attribute "kind"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "id"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "symbol"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "raw_symbol"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "description"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "currency"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "exchange"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ describe 'test attribute "figi_instrument"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ end
@@ -0,0 +1,23 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::FutureInstrumentKind
15
+ describe SnapTrade::FutureInstrumentKind do
16
+ let(:instance) { SnapTrade::FutureInstrumentKind.new }
17
+
18
+ describe 'test an instance of FutureInstrumentKind' do
19
+ it 'should create an instance of FutureInstrumentKind' do
20
+ expect(instance).to be_instance_of(SnapTrade::FutureInstrumentKind)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,77 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::FutureInstrument
15
+ describe SnapTrade::FutureInstrument do
16
+ let(:instance) { SnapTrade::FutureInstrument.new }
17
+
18
+ describe 'test an instance of FutureInstrument' do
19
+ it 'should create an instance of FutureInstrument' do
20
+ expect(instance).to be_instance_of(SnapTrade::FutureInstrument)
21
+ end
22
+ end
23
+ describe 'test attribute "kind"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "id"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "symbol"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "root_symbol"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "expiration_code"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "expiration_date"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "multiplier"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ describe 'test attribute "currency"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ describe 'test attribute "exchange"' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
77
+ end
@@ -0,0 +1,38 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::Instrument
15
+ describe SnapTrade::Instrument do
16
+ describe '.openapi_one_of' do
17
+ it 'lists the items referenced in the oneOf array' do
18
+ expect(described_class.openapi_one_of).to_not be_empty
19
+ end
20
+ end
21
+
22
+ describe '.openapi_discriminator_name' do
23
+ it 'returns the value of the "discriminator" property' do
24
+ expect(described_class.openapi_discriminator_name).to_not be_empty
25
+ end
26
+ end
27
+
28
+ describe '.openapi_discriminator_mapping' do
29
+ it 'returns the key/values of the "mapping" property' do
30
+ expect(described_class.openapi_discriminator_mapping.values.sort).to eq(described_class.openapi_one_of.sort)
31
+ end
32
+ end
33
+
34
+ describe '.build' do
35
+ it 'returns the correct model' do
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,23 @@
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
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SnapTrade::Kind
15
+ describe SnapTrade::Kind do
16
+ let(:instance) { SnapTrade::Kind.new }
17
+
18
+ describe 'test an instance of Kind' do
19
+ it 'should create an instance of Kind' do
20
+ expect(instance).to be_instance_of(SnapTrade::Kind)
21
+ end
22
+ end
23
+ end