snaptrade 2.0.33 → 2.0.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +81 -54
- data/lib/snaptrade/api/account_information_api.rb +74 -56
- data/lib/snaptrade/api/authentication_api.rb +44 -46
- data/lib/snaptrade/api/connections_api.rb +8 -8
- data/lib/snaptrade/api/options_api.rb +16 -12
- data/lib/snaptrade/api/transactions_and_reporting_api.rb +36 -28
- data/lib/snaptrade/models/account.rb +11 -2
- data/lib/snaptrade/models/account_balance_total.rb +1 -8
- data/lib/snaptrade/models/account_holdings_account.rb +1 -1
- data/lib/snaptrade/models/account_order_record.rb +1 -1
- data/lib/snaptrade/models/account_order_record_universal_symbol.rb +2 -2
- data/lib/snaptrade/models/account_simple.rb +4 -1
- data/lib/snaptrade/models/account_sync_status.rb +1 -1
- data/lib/snaptrade/models/balance.rb +1 -1
- data/lib/snaptrade/models/{snap_trade_holdings_account_account_id_balance.rb → balance_currency.rb} +33 -12
- data/lib/snaptrade/models/delete_user_response.rb +12 -3
- data/lib/snaptrade/models/holdings_status.rb +4 -4
- data/lib/snaptrade/models/login_redirect_uri.rb +3 -2
- data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +10 -6
- data/lib/snaptrade/models/symbol.rb +16 -10
- data/lib/snaptrade/models/{universal_symbol_currency.rb → symbol_currency.rb} +3 -3
- data/lib/snaptrade/models/{universal_symbol_exchange.rb → symbol_exchange.rb} +3 -3
- data/lib/snaptrade/models/transactions_status.rb +4 -5
- data/lib/snaptrade/models/underlying_symbol.rb +1 -1
- data/lib/snaptrade/models/universal_activity.rb +91 -81
- data/lib/snaptrade/models/{amount.rb → universal_activity_currency.rb} +36 -19
- data/lib/snaptrade/models/{snap_trade_holdings_account_account_id.rb → universal_activity_option_symbol.rb} +83 -82
- data/lib/snaptrade/models/universal_activity_symbol.rb +304 -0
- data/lib/snaptrade/models/universal_symbol.rb +2 -2
- data/lib/snaptrade/models/user_i_dand_secret.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +6 -5
- data/spec/api/account_information_api_spec.rb +13 -13
- data/spec/api/authentication_api_spec.rb +7 -7
- data/spec/api/connections_api_spec.rb +2 -2
- data/spec/api/options_api_spec.rb +3 -3
- data/spec/api/transactions_and_reporting_api_spec.rb +7 -7
- data/spec/models/{universal_symbol_currency_spec.rb → balance_currency_spec.rb} +6 -6
- data/spec/models/delete_user_response_spec.rb +6 -0
- data/spec/models/symbol_currency_spec.rb +41 -0
- data/spec/models/{universal_symbol_exchange_spec.rb → symbol_exchange_spec.rb} +6 -6
- data/spec/models/symbol_spec.rb +1 -1
- data/spec/models/universal_activity_currency_spec.rb +41 -0
- data/spec/models/universal_activity_option_symbol_spec.rb +65 -0
- data/spec/models/universal_activity_spec.rb +15 -15
- data/spec/models/{snap_trade_holdings_account_account_id_spec.rb → universal_activity_symbol_spec.rb} +14 -20
- metadata +20 -17
- data/spec/models/amount_spec.rb +0 -35
- data/spec/models/snap_trade_holdings_account_account_id_balance_spec.rb +0 -29
@@ -33,7 +33,7 @@ describe 'AccountInformationApi' do
|
|
33
33
|
# @param user_id
|
34
34
|
# @param user_secret
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @option opts [String] :brokerage_authorizations Optional. Comma
|
36
|
+
# @option opts [String] :brokerage_authorizations Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
37
37
|
# @return [Array<AccountHoldings>]
|
38
38
|
describe 'get_all_user_holdings test' do
|
39
39
|
it 'should work' do
|
@@ -43,10 +43,10 @@ describe 'AccountInformationApi' do
|
|
43
43
|
|
44
44
|
# unit tests for get_user_account_balance
|
45
45
|
# List account balances
|
46
|
-
#
|
46
|
+
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
47
47
|
# @param user_id
|
48
48
|
# @param user_secret
|
49
|
-
# @param account_id
|
49
|
+
# @param account_id
|
50
50
|
# @param [Hash] opts the optional parameters
|
51
51
|
# @return [Array<Balance>]
|
52
52
|
describe 'get_user_account_balance test' do
|
@@ -56,11 +56,11 @@ describe 'AccountInformationApi' do
|
|
56
56
|
end
|
57
57
|
|
58
58
|
# unit tests for get_user_account_details
|
59
|
-
#
|
60
|
-
# Returns
|
59
|
+
# Get account detail
|
60
|
+
# Returns account detail known to SnapTrade for the specified account. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
61
61
|
# @param user_id
|
62
62
|
# @param user_secret
|
63
|
-
# @param account_id
|
63
|
+
# @param account_id
|
64
64
|
# @param [Hash] opts the optional parameters
|
65
65
|
# @return [Account]
|
66
66
|
describe 'get_user_account_details test' do
|
@@ -70,11 +70,11 @@ describe 'AccountInformationApi' do
|
|
70
70
|
end
|
71
71
|
|
72
72
|
# unit tests for get_user_account_orders
|
73
|
-
# List account orders
|
74
|
-
#
|
73
|
+
# List account recent orders
|
74
|
+
# Returns a list of recent orders in the specified account. The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
75
75
|
# @param user_id
|
76
76
|
# @param user_secret
|
77
|
-
# @param account_id
|
77
|
+
# @param account_id
|
78
78
|
# @param [Hash] opts the optional parameters
|
79
79
|
# @option opts [String] :state defaults value is set to \"all\"
|
80
80
|
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
@@ -87,10 +87,10 @@ describe 'AccountInformationApi' do
|
|
87
87
|
|
88
88
|
# unit tests for get_user_account_positions
|
89
89
|
# List account positions
|
90
|
-
# Returns a list of positions in the specified account.
|
90
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
91
91
|
# @param user_id
|
92
92
|
# @param user_secret
|
93
|
-
# @param account_id
|
93
|
+
# @param account_id
|
94
94
|
# @param [Hash] opts the optional parameters
|
95
95
|
# @return [Array<Position>]
|
96
96
|
describe 'get_user_account_positions test' do
|
@@ -101,7 +101,7 @@ describe 'AccountInformationApi' do
|
|
101
101
|
|
102
102
|
# unit tests for get_user_holdings
|
103
103
|
# List account holdings
|
104
|
-
#
|
104
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
105
105
|
# @param account_id
|
106
106
|
# @param user_id
|
107
107
|
# @param user_secret
|
@@ -115,7 +115,7 @@ describe 'AccountInformationApi' do
|
|
115
115
|
|
116
116
|
# unit tests for list_user_accounts
|
117
117
|
# List accounts
|
118
|
-
#
|
118
|
+
# Returns all brokerage accounts known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
119
119
|
# @param user_id
|
120
120
|
# @param user_secret
|
121
121
|
# @param [Hash] opts the optional parameters
|
@@ -28,8 +28,8 @@ describe 'AuthenticationApi' do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
# unit tests for delete_snap_trade_user
|
31
|
-
# Delete
|
32
|
-
# Deletes a user
|
31
|
+
# Delete user
|
32
|
+
# Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent.
|
33
33
|
# @param user_id
|
34
34
|
# @param [Hash] opts the optional parameters
|
35
35
|
# @return [DeleteUserResponse]
|
@@ -40,8 +40,8 @@ describe 'AuthenticationApi' do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# unit tests for list_snap_trade_users
|
43
|
-
# List
|
44
|
-
# Returns a list of
|
43
|
+
# List all users
|
44
|
+
# Returns a list of all registered user IDs.
|
45
45
|
# @param [Hash] opts the optional parameters
|
46
46
|
# @return [Array<String>]
|
47
47
|
describe 'list_snap_trade_users test' do
|
@@ -65,7 +65,7 @@ describe 'AuthenticationApi' do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
# unit tests for register_snap_trade_user
|
68
|
-
#
|
68
|
+
# Register user
|
69
69
|
# Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database. Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
|
70
70
|
# @param snap_trade_register_user_request_body
|
71
71
|
# @param [Hash] opts the optional parameters
|
@@ -77,8 +77,8 @@ describe 'AuthenticationApi' do
|
|
77
77
|
end
|
78
78
|
|
79
79
|
# unit tests for reset_snap_trade_user_secret
|
80
|
-
#
|
81
|
-
#
|
80
|
+
# Rotate user secret
|
81
|
+
# Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
|
82
82
|
# @param user_i_dand_secret
|
83
83
|
# @param [Hash] opts the optional parameters
|
84
84
|
# @return [UserIDandSecret]
|
@@ -101,8 +101,8 @@ describe 'ConnectionsApi' do
|
|
101
101
|
# Returns a list of session events associated with a user.
|
102
102
|
# @param partner_client_id
|
103
103
|
# @param [Hash] opts the optional parameters
|
104
|
-
# @option opts [String] :user_id Optional comma
|
105
|
-
# @option opts [String] :session_id Optional comma
|
104
|
+
# @option opts [String] :user_id Optional comma separated list of user IDs used to filter the request on specific users
|
105
|
+
# @option opts [String] :session_id Optional comma separated list of session IDs used to filter the request on specific users
|
106
106
|
# @return [Array<ConnectionsSessionEvents200ResponseInner>]
|
107
107
|
describe 'session_events test' do
|
108
108
|
it 'should work' do
|
@@ -73,11 +73,11 @@ describe 'OptionsApi' do
|
|
73
73
|
end
|
74
74
|
|
75
75
|
# unit tests for list_option_holdings
|
76
|
-
#
|
77
|
-
# Returns a list of
|
76
|
+
# List account option positions
|
77
|
+
# Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
78
78
|
# @param user_id
|
79
79
|
# @param user_secret
|
80
|
-
# @param account_id
|
80
|
+
# @param account_id
|
81
81
|
# @param [Hash] opts the optional parameters
|
82
82
|
# @return [Array<OptionsPosition>]
|
83
83
|
describe 'list_option_holdings test' do
|
@@ -29,15 +29,15 @@ describe 'TransactionsAndReportingApi' do
|
|
29
29
|
|
30
30
|
# unit tests for get_activities
|
31
31
|
# Get transaction history for a user
|
32
|
-
# Returns
|
32
|
+
# Returns all historical transactions for the specified user and filtering criteria. It's recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There's a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
33
33
|
# @param user_id
|
34
34
|
# @param user_secret
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @option opts [Date] :start_date
|
37
|
-
# @option opts [Date] :end_date
|
38
|
-
# @option opts [String] :accounts Optional comma
|
39
|
-
# @option opts [String] :brokerage_authorizations Optional comma
|
40
|
-
# @option opts [String] :type Optional comma
|
36
|
+
# @option opts [Date] :start_date The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`.
|
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
|
+
# @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
|
+
# @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 - SELL - DIVIDEND - CONTRIBUTION - WITHDRAWAL - REI - INTEREST - FEE
|
41
41
|
# @return [Array<UniversalActivity>]
|
42
42
|
describe 'get_activities test' do
|
43
43
|
it 'should work' do
|
@@ -53,7 +53,7 @@ describe 'TransactionsAndReportingApi' do
|
|
53
53
|
# @param user_id
|
54
54
|
# @param user_secret
|
55
55
|
# @param [Hash] opts the optional parameters
|
56
|
-
# @option opts [String] :accounts Optional comma
|
56
|
+
# @option opts [String] :accounts Optional comma separated list of account IDs used to filter the request on specific accounts
|
57
57
|
# @option opts [Boolean] :detailed Optional, increases frequency of data points for the total value and contribution charts if set to true
|
58
58
|
# @option opts [String] :frequency Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
|
59
59
|
# @return [PerformanceCustom]
|
@@ -11,13 +11,13 @@ require 'spec_helper'
|
|
11
11
|
require 'json'
|
12
12
|
require 'date'
|
13
13
|
|
14
|
-
# Unit tests for SnapTrade::
|
15
|
-
describe SnapTrade::
|
16
|
-
let(:instance) { SnapTrade::
|
14
|
+
# Unit tests for SnapTrade::BalanceCurrency
|
15
|
+
describe SnapTrade::BalanceCurrency do
|
16
|
+
let(:instance) { SnapTrade::BalanceCurrency.new }
|
17
17
|
|
18
|
-
describe 'test an instance of
|
19
|
-
it 'should create an instance of
|
20
|
-
expect(instance).to be_instance_of(SnapTrade::
|
18
|
+
describe 'test an instance of BalanceCurrency' do
|
19
|
+
it 'should create an instance of BalanceCurrency' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::BalanceCurrency)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
describe 'test attribute "id"' do
|
@@ -26,6 +26,12 @@ describe SnapTrade::DeleteUserResponse do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
describe 'test attribute "detail"' 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
|
+
|
29
35
|
describe 'test attribute "user_id"' do
|
30
36
|
it 'should work' do
|
31
37
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -0,0 +1,41 @@
|
|
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::SymbolCurrency
|
15
|
+
describe SnapTrade::SymbolCurrency do
|
16
|
+
let(:instance) { SnapTrade::SymbolCurrency.new }
|
17
|
+
|
18
|
+
describe 'test an instance of SymbolCurrency' do
|
19
|
+
it 'should create an instance of SymbolCurrency' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::SymbolCurrency)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
describe 'test attribute "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 "code"' 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 "name"' 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
|
+
end
|
@@ -11,13 +11,13 @@ require 'spec_helper'
|
|
11
11
|
require 'json'
|
12
12
|
require 'date'
|
13
13
|
|
14
|
-
# Unit tests for SnapTrade::
|
15
|
-
describe SnapTrade::
|
16
|
-
let(:instance) { SnapTrade::
|
14
|
+
# Unit tests for SnapTrade::SymbolExchange
|
15
|
+
describe SnapTrade::SymbolExchange do
|
16
|
+
let(:instance) { SnapTrade::SymbolExchange.new }
|
17
17
|
|
18
|
-
describe 'test an instance of
|
19
|
-
it 'should create an instance of
|
20
|
-
expect(instance).to be_instance_of(SnapTrade::
|
18
|
+
describe 'test an instance of SymbolExchange' do
|
19
|
+
it 'should create an instance of SymbolExchange' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::SymbolExchange)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
describe 'test attribute "id"' do
|
data/spec/models/symbol_spec.rb
CHANGED
@@ -38,7 +38,7 @@ describe SnapTrade::Symbol do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
describe 'test attribute "
|
41
|
+
describe 'test attribute "description"' 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
|
@@ -0,0 +1,41 @@
|
|
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::UniversalActivityCurrency
|
15
|
+
describe SnapTrade::UniversalActivityCurrency do
|
16
|
+
let(:instance) { SnapTrade::UniversalActivityCurrency.new }
|
17
|
+
|
18
|
+
describe 'test an instance of UniversalActivityCurrency' do
|
19
|
+
it 'should create an instance of UniversalActivityCurrency' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::UniversalActivityCurrency)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
describe 'test attribute "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 "code"' 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 "name"' 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
|
+
end
|
@@ -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::UniversalActivityOptionSymbol
|
15
|
+
describe SnapTrade::UniversalActivityOptionSymbol do
|
16
|
+
let(:instance) { SnapTrade::UniversalActivityOptionSymbol.new }
|
17
|
+
|
18
|
+
describe 'test an instance of UniversalActivityOptionSymbol' do
|
19
|
+
it 'should create an instance of UniversalActivityOptionSymbol' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::UniversalActivityOptionSymbol)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
describe 'test attribute "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 "ticker"' 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 "option_type"' 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 "strike_price"' 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_date"' 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 "is_mini_option"' 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 "underlying_symbol"' 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
|
@@ -32,91 +32,91 @@ describe SnapTrade::UniversalActivity do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
describe 'test attribute "
|
35
|
+
describe 'test attribute "symbol"' 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
|
39
39
|
end
|
40
40
|
|
41
|
-
describe 'test attribute "
|
41
|
+
describe 'test attribute "option_symbol"' 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 "
|
47
|
+
describe 'test attribute "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 "
|
53
|
+
describe 'test attribute "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
|
57
57
|
end
|
58
58
|
|
59
|
-
describe 'test attribute "
|
59
|
+
describe 'test attribute "amount"' do
|
60
60
|
it 'should work' do
|
61
61
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
describe 'test attribute "
|
65
|
+
describe 'test attribute "currency"' 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 "
|
71
|
+
describe 'test attribute "type"' 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 "
|
77
|
+
describe 'test attribute "option_type"' 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
|
81
81
|
end
|
82
82
|
|
83
|
-
describe 'test attribute "
|
83
|
+
describe 'test attribute "description"' do
|
84
84
|
it 'should work' do
|
85
85
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
describe 'test attribute "
|
89
|
+
describe 'test attribute "trade_date"' do
|
90
90
|
it 'should work' do
|
91
91
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
describe 'test attribute "
|
95
|
+
describe 'test attribute "settlement_date"' do
|
96
96
|
it 'should work' do
|
97
97
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
describe 'test attribute "
|
101
|
+
describe 'test attribute "fee"' do
|
102
102
|
it 'should work' do
|
103
103
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
-
describe 'test attribute "
|
107
|
+
describe 'test attribute "fx_rate"' do
|
108
108
|
it 'should work' do
|
109
109
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
-
describe 'test attribute "
|
113
|
+
describe 'test attribute "institution"' do
|
114
114
|
it 'should work' do
|
115
115
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
|
-
describe 'test attribute "
|
119
|
+
describe 'test attribute "external_reference_id"' do
|
120
120
|
it 'should work' do
|
121
121
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
122
122
|
end
|
@@ -11,13 +11,13 @@ require 'spec_helper'
|
|
11
11
|
require 'json'
|
12
12
|
require 'date'
|
13
13
|
|
14
|
-
# Unit tests for SnapTrade::
|
15
|
-
describe SnapTrade::
|
16
|
-
let(:instance) { SnapTrade::
|
14
|
+
# Unit tests for SnapTrade::UniversalActivitySymbol
|
15
|
+
describe SnapTrade::UniversalActivitySymbol do
|
16
|
+
let(:instance) { SnapTrade::UniversalActivitySymbol.new }
|
17
17
|
|
18
|
-
describe 'test an instance of
|
19
|
-
it 'should create an instance of
|
20
|
-
expect(instance).to be_instance_of(SnapTrade::
|
18
|
+
describe 'test an instance of UniversalActivitySymbol' do
|
19
|
+
it 'should create an instance of UniversalActivitySymbol' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::UniversalActivitySymbol)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
describe 'test attribute "id"' do
|
@@ -26,55 +26,49 @@ describe SnapTrade::SnapTradeHoldingsAccountAccountId do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
describe 'test attribute "
|
29
|
+
describe 'test attribute "symbol"' 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 "
|
35
|
+
describe 'test attribute "raw_symbol"' 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
|
39
39
|
end
|
40
40
|
|
41
|
-
describe 'test attribute "
|
41
|
+
describe 'test attribute "description"' 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 "
|
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
|
51
51
|
end
|
52
52
|
|
53
|
-
describe 'test attribute "
|
53
|
+
describe 'test attribute "exchange"' 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
|
57
57
|
end
|
58
58
|
|
59
|
-
describe 'test attribute "
|
59
|
+
describe 'test attribute "type"' do
|
60
60
|
it 'should work' do
|
61
61
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
describe 'test attribute "
|
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 "
|
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 "created_date"' do
|
71
|
+
describe 'test attribute "figi_instrument"' do
|
78
72
|
it 'should work' do
|
79
73
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
74
|
end
|