snaptrade 2.0.46 → 2.0.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +28 -11
  4. data/lib/snaptrade/api/trading_api.rb +29 -25
  5. data/lib/snaptrade/api/transactions_and_reporting_api.rb +4 -4
  6. data/lib/snaptrade/models/account_order_record.rb +15 -15
  7. data/lib/snaptrade/models/account_order_record_universal_symbol.rb +17 -17
  8. data/lib/snaptrade/models/action_strict_with_options.rb +41 -0
  9. data/lib/snaptrade/models/brokerage.rb +26 -26
  10. data/lib/snaptrade/models/brokerage_authorization.rb +14 -14
  11. data/lib/snaptrade/models/holdings_status.rb +1 -0
  12. data/lib/snaptrade/models/manual_trade.rb +1 -1
  13. data/lib/snaptrade/models/manual_trade_form.rb +1 -1
  14. data/lib/snaptrade/models/manual_trade_form_with_options.rb +333 -0
  15. data/lib/snaptrade/models/manual_trade_symbol.rb +14 -14
  16. data/lib/snaptrade/models/option_brokerage_symbol.rb +13 -13
  17. data/lib/snaptrade/models/options_position.rb +15 -15
  18. data/lib/snaptrade/models/position.rb +16 -16
  19. data/lib/snaptrade/models/position_symbol.rb +10 -10
  20. data/lib/snaptrade/models/transactions_status.rb +1 -0
  21. data/lib/snaptrade/models/underlying_symbol.rb +17 -17
  22. data/lib/snaptrade/models/universal_activity.rb +1 -1
  23. data/lib/snaptrade/models/universal_symbol.rb +17 -17
  24. data/lib/snaptrade/version.rb +1 -1
  25. data/lib/snaptrade.rb +2 -0
  26. data/spec/api/trading_api_spec.rb +1 -1
  27. data/spec/api/transactions_and_reporting_api_spec.rb +1 -1
  28. data/spec/models/account_order_record_spec.rb +6 -6
  29. data/spec/models/account_order_record_universal_symbol_spec.rb +3 -3
  30. data/spec/models/action_strict_with_options_spec.rb +23 -0
  31. data/spec/models/brokerage_authorization_spec.rb +6 -6
  32. data/spec/models/brokerage_spec.rb +8 -8
  33. data/spec/models/manual_trade_form_with_options_spec.rb +83 -0
  34. data/spec/models/manual_trade_symbol_spec.rb +6 -6
  35. data/spec/models/option_brokerage_symbol_spec.rb +3 -3
  36. data/spec/models/options_position_spec.rb +2 -2
  37. data/spec/models/position_spec.rb +2 -2
  38. data/spec/models/position_symbol_spec.rb +3 -3
  39. data/spec/models/underlying_symbol_spec.rb +3 -3
  40. data/spec/models/universal_symbol_spec.rb +3 -3
  41. metadata +8 -2
@@ -37,7 +37,7 @@ describe 'TransactionsAndReportingApi' do
37
37
  # @option opts [Date] :end_date The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
38
38
  # @option opts [String] :accounts Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The `brokerageAuthorizations` parameter takes precedence over this parameter.
39
39
  # @option opts [String] :brokerage_authorizations Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the `accounts` parameter.
40
- # @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account.
40
+ # @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event.
41
41
  # @return [Array<UniversalActivity>]
42
42
  describe 'get_activities test' do
43
43
  it 'should work' do
@@ -32,12 +32,6 @@ describe SnapTrade::AccountOrderRecord do
32
32
  end
33
33
  end
34
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
35
  describe 'test attribute "universal_symbol"' do
42
36
  it 'should work' do
43
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -134,4 +128,10 @@ describe SnapTrade::AccountOrderRecord do
134
128
  end
135
129
  end
136
130
 
131
+ describe 'test attribute "symbol"' do
132
+ it 'should work' do
133
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
134
+ end
135
+ end
136
+
137
137
  end
@@ -62,19 +62,19 @@ describe SnapTrade::AccountOrderRecordUniversalSymbol do
62
62
  end
63
63
  end
64
64
 
65
- describe 'test attribute "currencies"' do
65
+ describe 'test attribute "figi_code"' do
66
66
  it 'should work' do
67
67
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
68
  end
69
69
  end
70
70
 
71
- describe 'test attribute "figi_code"' do
71
+ describe 'test attribute "figi_instrument"' do
72
72
  it 'should work' do
73
73
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
74
  end
75
75
  end
76
76
 
77
- describe 'test attribute "figi_instrument"' do
77
+ describe 'test attribute "currencies"' do
78
78
  it 'should work' do
79
79
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
80
  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::ActionStrictWithOptions
15
+ describe SnapTrade::ActionStrictWithOptions do
16
+ let(:instance) { SnapTrade::ActionStrictWithOptions.new }
17
+
18
+ describe 'test an instance of ActionStrictWithOptions' do
19
+ it 'should create an instance of ActionStrictWithOptions' do
20
+ expect(instance).to be_instance_of(SnapTrade::ActionStrictWithOptions)
21
+ end
22
+ end
23
+ end
@@ -32,12 +32,6 @@ describe SnapTrade::BrokerageAuthorization do
32
32
  end
33
33
  end
34
34
 
35
- describe 'test attribute "updated_date"' 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
35
  describe 'test attribute "brokerage"' do
42
36
  it 'should work' do
43
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -74,4 +68,10 @@ describe SnapTrade::BrokerageAuthorization do
74
68
  end
75
69
  end
76
70
 
71
+ describe 'test attribute "updated_date"' 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
77
  end
@@ -62,12 +62,6 @@ describe SnapTrade::Brokerage do
62
62
  end
63
63
  end
64
64
 
65
- describe 'test attribute "open_url"' 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
65
  describe 'test attribute "url"' do
72
66
  it 'should work' do
73
67
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -86,13 +80,13 @@ describe SnapTrade::Brokerage do
86
80
  end
87
81
  end
88
82
 
89
- describe 'test attribute "allows_fractional_units"' do
83
+ describe 'test attribute "allows_trading"' do
90
84
  it 'should work' do
91
85
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
86
  end
93
87
  end
94
88
 
95
- describe 'test attribute "allows_trading"' do
89
+ describe 'test attribute "allows_fractional_units"' do
96
90
  it 'should work' do
97
91
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
92
  end
@@ -122,4 +116,10 @@ describe SnapTrade::Brokerage do
122
116
  end
123
117
  end
124
118
 
119
+ describe 'test attribute "open_url"' do
120
+ it 'should work' do
121
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
122
+ end
123
+ end
124
+
125
125
  end
@@ -0,0 +1,83 @@
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::ManualTradeFormWithOptions
15
+ describe SnapTrade::ManualTradeFormWithOptions do
16
+ let(:instance) { SnapTrade::ManualTradeFormWithOptions.new }
17
+
18
+ describe 'test an instance of ManualTradeFormWithOptions' do
19
+ it 'should create an instance of ManualTradeFormWithOptions' do
20
+ expect(instance).to be_instance_of(SnapTrade::ManualTradeFormWithOptions)
21
+ end
22
+ end
23
+ describe 'test attribute "account_id"' 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 "action"' 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 "universal_symbol_id"' 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 "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 "order_type"' 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 "time_in_force"' 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 "price"' 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 "stop"' 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 "units"' 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
+ describe 'test attribute "notional_value"' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
83
+ end
@@ -20,12 +20,6 @@ describe SnapTrade::ManualTradeSymbol do
20
20
  expect(instance).to be_instance_of(SnapTrade::ManualTradeSymbol)
21
21
  end
22
22
  end
23
- describe 'test attribute "brokerage_symbol_id"' 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
23
  describe 'test attribute "universal_symbol_id"' do
30
24
  it 'should work' do
31
25
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -56,4 +50,10 @@ describe SnapTrade::ManualTradeSymbol do
56
50
  end
57
51
  end
58
52
 
53
+ describe 'test attribute "brokerage_symbol_id"' 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
59
  end
@@ -20,19 +20,19 @@ describe SnapTrade::OptionBrokerageSymbol do
20
20
  expect(instance).to be_instance_of(SnapTrade::OptionBrokerageSymbol)
21
21
  end
22
22
  end
23
- describe 'test attribute "id"' do
23
+ describe 'test attribute "option_symbol"' do
24
24
  it 'should work' do
25
25
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
26
  end
27
27
  end
28
28
 
29
- describe 'test attribute "description"' do
29
+ describe 'test attribute "id"' do
30
30
  it 'should work' do
31
31
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
32
  end
33
33
  end
34
34
 
35
- describe 'test attribute "option_symbol"' do
35
+ describe 'test attribute "description"' do
36
36
  it 'should work' do
37
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
38
  end
@@ -38,13 +38,13 @@ describe SnapTrade::OptionsPosition do
38
38
  end
39
39
  end
40
40
 
41
- describe 'test attribute "currency"' do
41
+ describe 'test attribute "average_purchase_price"' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
44
  end
45
45
  end
46
46
 
47
- describe 'test attribute "average_purchase_price"' do
47
+ describe 'test attribute "currency"' do
48
48
  it 'should work' do
49
49
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
50
  end
@@ -44,13 +44,13 @@ describe SnapTrade::Position do
44
44
  end
45
45
  end
46
46
 
47
- describe 'test attribute "fractional_units"' do
47
+ describe 'test attribute "average_purchase_price"' do
48
48
  it 'should work' do
49
49
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
50
  end
51
51
  end
52
52
 
53
- describe 'test attribute "average_purchase_price"' do
53
+ describe 'test attribute "fractional_units"' do
54
54
  it 'should work' do
55
55
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
56
  end
@@ -20,19 +20,19 @@ describe SnapTrade::PositionSymbol do
20
20
  expect(instance).to be_instance_of(SnapTrade::PositionSymbol)
21
21
  end
22
22
  end
23
- describe 'test attribute "id"' do
23
+ describe 'test attribute "symbol"' do
24
24
  it 'should work' do
25
25
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
26
  end
27
27
  end
28
28
 
29
- describe 'test attribute "description"' do
29
+ describe 'test attribute "id"' do
30
30
  it 'should work' do
31
31
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
32
  end
33
33
  end
34
34
 
35
- describe 'test attribute "symbol"' do
35
+ describe 'test attribute "description"' do
36
36
  it 'should work' do
37
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
38
  end
@@ -62,19 +62,19 @@ describe SnapTrade::UnderlyingSymbol do
62
62
  end
63
63
  end
64
64
 
65
- describe 'test attribute "currencies"' do
65
+ describe 'test attribute "figi_code"' do
66
66
  it 'should work' do
67
67
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
68
  end
69
69
  end
70
70
 
71
- describe 'test attribute "figi_code"' do
71
+ describe 'test attribute "figi_instrument"' do
72
72
  it 'should work' do
73
73
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
74
  end
75
75
  end
76
76
 
77
- describe 'test attribute "figi_instrument"' do
77
+ describe 'test attribute "currencies"' do
78
78
  it 'should work' do
79
79
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
80
  end
@@ -62,19 +62,19 @@ describe SnapTrade::UniversalSymbol do
62
62
  end
63
63
  end
64
64
 
65
- describe 'test attribute "currencies"' do
65
+ describe 'test attribute "figi_code"' do
66
66
  it 'should work' do
67
67
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
68
  end
69
69
  end
70
70
 
71
- describe 'test attribute "figi_code"' do
71
+ describe 'test attribute "figi_instrument"' do
72
72
  it 'should work' do
73
73
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
74
  end
75
75
  end
76
76
 
77
- describe 'test attribute "figi_instrument"' do
77
+ describe 'test attribute "currencies"' do
78
78
  it 'should work' do
79
79
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
80
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snaptrade
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.46
4
+ version: 2.0.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-25 00:00:00.000000000 Z
11
+ date: 2024-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -107,6 +107,7 @@ files:
107
107
  - lib/snaptrade/models/account_simple.rb
108
108
  - lib/snaptrade/models/account_sync_status.rb
109
109
  - lib/snaptrade/models/action_strict.rb
110
+ - lib/snaptrade/models/action_strict_with_options.rb
110
111
  - lib/snaptrade/models/auth_type.rb
111
112
  - lib/snaptrade/models/authentication_login_snap_trade_user200_response.rb
112
113
  - lib/snaptrade/models/balance.rb
@@ -136,6 +137,7 @@ files:
136
137
  - lib/snaptrade/models/manual_trade_balance.rb
137
138
  - lib/snaptrade/models/manual_trade_form.rb
138
139
  - lib/snaptrade/models/manual_trade_form_notional_value.rb
140
+ - lib/snaptrade/models/manual_trade_form_with_options.rb
139
141
  - lib/snaptrade/models/manual_trade_impact.rb
140
142
  - lib/snaptrade/models/manual_trade_symbol.rb
141
143
  - lib/snaptrade/models/model400_failed_request_response.rb
@@ -230,6 +232,7 @@ files:
230
232
  - spec/models/account_spec.rb
231
233
  - spec/models/account_sync_status_spec.rb
232
234
  - spec/models/action_strict_spec.rb
235
+ - spec/models/action_strict_with_options_spec.rb
233
236
  - spec/models/auth_type_spec.rb
234
237
  - spec/models/authentication_login_snap_trade_user200_response_spec.rb
235
238
  - spec/models/balance_currency_spec.rb
@@ -258,6 +261,7 @@ files:
258
261
  - spec/models/manual_trade_balance_spec.rb
259
262
  - spec/models/manual_trade_form_notional_value_spec.rb
260
263
  - spec/models/manual_trade_form_spec.rb
264
+ - spec/models/manual_trade_form_with_options_spec.rb
261
265
  - spec/models/manual_trade_impact_spec.rb
262
266
  - spec/models/manual_trade_spec.rb
263
267
  - spec/models/manual_trade_symbol_spec.rb
@@ -418,6 +422,7 @@ test_files:
418
422
  - spec/models/underlying_symbol_exchange_spec.rb
419
423
  - spec/models/manual_trade_and_impact_spec.rb
420
424
  - spec/models/monthly_dividends_spec.rb
425
+ - spec/models/manual_trade_form_with_options_spec.rb
421
426
  - spec/models/strategy_order_record_spec.rb
422
427
  - spec/models/account_simple_spec.rb
423
428
  - spec/models/universal_symbol_spec.rb
@@ -458,6 +463,7 @@ test_files:
458
463
  - spec/models/model402_brokerage_auth_already_disabled_exception_spec.rb
459
464
  - spec/models/position_spec.rb
460
465
  - spec/models/notional_value_spec.rb
466
+ - spec/models/action_strict_with_options_spec.rb
461
467
  - spec/models/options_get_option_strategy_request_spec.rb
462
468
  - spec/models/option_chain_inner_chain_per_root_inner_spec.rb
463
469
  - spec/models/trading_cancel_user_account_order_request_spec.rb