snaptrade 2.0.36 → 2.0.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +60 -56
- data/lib/snaptrade/api/account_information_api.rb +4 -4
- data/lib/snaptrade/api/authentication_api.rb +12 -12
- data/lib/snaptrade/api/connections_api.rb +70 -52
- data/lib/snaptrade/models/account.rb +2 -2
- data/lib/snaptrade/models/brokerage.rb +25 -40
- data/lib/snaptrade/models/brokerage_authorization.rb +12 -8
- data/lib/snaptrade/models/brokerage_authorization_disabled_confirmation.rb +1 -0
- data/lib/snaptrade/models/brokerage_authorization_refresh_confirmation.rb +1 -0
- data/lib/snaptrade/models/brokerage_type.rb +1 -1
- data/lib/snaptrade/models/user_i_dand_secret.rb +1 -2
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +1 -1
- data/spec/api/authentication_api_spec.rb +2 -2
- data/spec/api/connections_api_spec.rb +13 -13
- data/spec/models/brokerage_spec.rb +6 -24
- metadata +2 -2
@@ -28,9 +28,9 @@ describe 'ConnectionsApi' do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
# unit tests for detail_brokerage_authorization
|
31
|
-
# Get
|
32
|
-
# Returns a single
|
33
|
-
# @param authorization_id
|
31
|
+
# Get connection detail
|
32
|
+
# Returns a single connection for the specified ID.
|
33
|
+
# @param authorization_id
|
34
34
|
# @param user_id
|
35
35
|
# @param user_secret
|
36
36
|
# @param [Hash] opts the optional parameters
|
@@ -42,9 +42,9 @@ describe 'ConnectionsApi' do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
# unit tests for disable_brokerage_authorization
|
45
|
-
#
|
46
|
-
# Manually
|
47
|
-
# @param authorization_id
|
45
|
+
# Force disable connection
|
46
|
+
# Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a [`CONNECTION_BROKEN` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_broken) for the connection. *Please contact us in order to use this endpoint as it is disabled by default.*
|
47
|
+
# @param authorization_id
|
48
48
|
# @param user_id
|
49
49
|
# @param user_secret
|
50
50
|
# @param [Hash] opts the optional parameters
|
@@ -56,8 +56,8 @@ describe 'ConnectionsApi' do
|
|
56
56
|
end
|
57
57
|
|
58
58
|
# unit tests for list_brokerage_authorizations
|
59
|
-
# List all
|
60
|
-
# Returns a list of Brokerage Authorization
|
59
|
+
# List all connections
|
60
|
+
# Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
|
61
61
|
# @param user_id
|
62
62
|
# @param user_secret
|
63
63
|
# @param [Hash] opts the optional parameters
|
@@ -70,8 +70,8 @@ describe 'ConnectionsApi' do
|
|
70
70
|
|
71
71
|
# unit tests for refresh_brokerage_authorization
|
72
72
|
# Refresh holdings for a connection
|
73
|
-
# Trigger a holdings update for all accounts under this
|
74
|
-
# @param authorization_id
|
73
|
+
# Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. *Please contact support for access as this endpoint is not enabled by default.*
|
74
|
+
# @param authorization_id
|
75
75
|
# @param user_id
|
76
76
|
# @param user_secret
|
77
77
|
# @param [Hash] opts the optional parameters
|
@@ -83,9 +83,9 @@ describe 'ConnectionsApi' do
|
|
83
83
|
end
|
84
84
|
|
85
85
|
# unit tests for remove_brokerage_authorization
|
86
|
-
# Delete
|
87
|
-
# Deletes
|
88
|
-
# @param authorization_id
|
86
|
+
# Delete connection
|
87
|
+
# Deletes the connection specified by the ID. This will also delete all accounts and holdings associated with the connection. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the connection has been successfully deleted.
|
88
|
+
# @param authorization_id
|
89
89
|
# @param user_id
|
90
90
|
# @param user_secret
|
91
91
|
# @param [Hash] opts the optional parameters
|
@@ -26,6 +26,12 @@ describe SnapTrade::Brokerage do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
describe 'test attribute "slug"' 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 "name"' do
|
30
36
|
it 'should work' do
|
31
37
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -62,12 +68,6 @@ describe SnapTrade::Brokerage do
|
|
62
68
|
end
|
63
69
|
end
|
64
70
|
|
65
|
-
describe 'test attribute "slug"' 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
71
|
describe 'test attribute "url"' do
|
72
72
|
it 'should work' do
|
73
73
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -110,24 +110,6 @@ describe SnapTrade::Brokerage do
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
-
describe 'test attribute "allows_trading_through_snaptrade_api"' do
|
114
|
-
it 'should work' do
|
115
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
describe 'test attribute "is_scraping_integration"' 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
|
-
describe 'test attribute "default_currency"' do
|
126
|
-
it 'should work' do
|
127
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
113
|
describe 'test attribute "brokerage_type"' do
|
132
114
|
it 'should work' do
|
133
115
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
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.
|
4
|
+
version: 2.0.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|