snaptrade 1.17.6 → 1.17.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -22
- data/README.md +2 -1
- data/docs/AccountHoldings.md +2 -2
- data/docs/AccountHoldingsAccount.md +2 -2
- data/docs/AccountOrderRecord.md +2 -2
- data/docs/AuthenticationApi.md +4 -0
- data/docs/Balance.md +1 -1
- data/docs/Brokerage.md +1 -1
- data/docs/BrokerageAuthorization.md +1 -1
- data/docs/BrokerageAuthorizationTypeReadOnly.md +1 -1
- data/docs/BrokerageSymbol.md +1 -1
- data/docs/BrokerageSymbolOptionSymbol.md +1 -1
- data/docs/BrokerageSymbolSymbol.md +3 -3
- data/docs/ConnectionPortalVersion.md +15 -0
- data/docs/EncryptedResponse.md +1 -1
- data/docs/ExchangeRatePairs.md +2 -2
- data/docs/ExcludedAsset.md +1 -1
- data/docs/ManualTrade.md +1 -1
- data/docs/ManualTradeAndImpact.md +2 -2
- data/docs/ManualTradeBalance.md +2 -2
- data/docs/ManualTradeSymbol.md +1 -1
- data/docs/ModelAssetClassDetails.md +1 -1
- data/docs/ModelAssetClassTarget.md +1 -1
- data/docs/ModelPortfolioAssetClass.md +1 -1
- data/docs/ModelPortfolioDetails.md +1 -1
- data/docs/ModelPortfolioSecurity.md +1 -1
- data/docs/MonthlyDividends.md +1 -1
- data/docs/NetContributions.md +1 -1
- data/docs/NetDividend.md +1 -1
- data/docs/OptionStrategy.md +1 -1
- data/docs/OptionsHoldings.md +2 -2
- data/docs/OptionsPosition.md +1 -1
- data/docs/OptionsSymbol.md +1 -1
- data/docs/PastValue.md +1 -1
- data/docs/PerformanceCustom.md +1 -1
- data/docs/PortfolioGroupInfo.md +1 -1
- data/docs/PortfolioGroupPosition.md +1 -1
- data/docs/PortfolioGroupSettings.md +1 -1
- data/docs/Position.md +1 -1
- data/docs/PositionSymbol.md +1 -1
- data/docs/SnapTradeHoldingsAccount.md +1 -1
- data/docs/SnapTradeLoginUserRequestBody.md +4 -2
- data/docs/StrategyOrderRecord.md +1 -1
- data/docs/StrategyQuotes.md +2 -2
- data/docs/SubPeriodReturnRate.md +2 -2
- data/docs/Symbol.md +3 -3
- data/docs/SymbolsQuotesInner.md +1 -1
- data/docs/TargetAsset.md +1 -1
- data/docs/Trade.md +3 -3
- data/docs/TradeExecutionStatus.md +3 -3
- data/docs/TradeImpact.md +2 -2
- data/docs/TransactionsAndReportingApi.md +2 -2
- data/docs/TransactionsStatus.md +1 -1
- data/docs/UnderlyingSymbol.md +3 -3
- data/docs/UniversalActivity.md +4 -4
- data/docs/UniversalSymbol.md +3 -3
- data/docs/UniversalSymbolTicker.md +3 -3
- data/docs/UserSettings.md +1 -1
- data/lib/snaptrade/api/authentication_api.rb +8 -4
- data/lib/snaptrade/api/transactions_and_reporting_api.rb +8 -8
- data/lib/snaptrade/models/connection_portal_version.rb +38 -0
- data/lib/snaptrade/models/snap_trade_holdings_total_value.rb +2 -0
- data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +14 -5
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +1 -0
- data/spec/api/transactions_and_reporting_api_spec.rb +2 -2
- data/spec/models/connection_portal_version_spec.rb +24 -0
- data/spec/models/snap_trade_login_user_request_body_spec.rb +6 -0
- metadata +7 -3
data/docs/Symbol.md
CHANGED
@@ -8,9 +8,9 @@
|
|
8
8
|
| **symbol** | **String** | | [optional] |
|
9
9
|
| **raw_symbol** | **String** | | [optional] |
|
10
10
|
| **name** | **String** | | [optional] |
|
11
|
-
| **currency** | **Currency** | | [optional] |
|
12
|
-
| **exchange** | **Exchange** | | [optional] |
|
13
|
-
| **type** | **SecurityType** | | [optional] |
|
11
|
+
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
12
|
+
| **exchange** | [**Exchange**](Exchange.md) | | [optional] |
|
13
|
+
| **type** | [**SecurityType**](SecurityType.md) | | [optional] |
|
14
14
|
|
15
15
|
## Example
|
16
16
|
|
data/docs/SymbolsQuotesInner.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **symbol** | **UniversalSymbol** | | [optional] |
|
7
|
+
| **symbol** | [**UniversalSymbol**](UniversalSymbol.md) | | [optional] |
|
8
8
|
| **bid_price** | **Float** | | [optional] |
|
9
9
|
| **ask_price** | **Float** | | [optional] |
|
10
10
|
| **last_trade_price** | **Float** | | [optional] |
|
data/docs/TargetAsset.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | | [optional] |
|
8
|
-
| **symbol** | **UniversalSymbol** | | [optional] |
|
8
|
+
| **symbol** | [**UniversalSymbol**](UniversalSymbol.md) | | [optional] |
|
9
9
|
| **percent** | **Float** | | [optional] |
|
10
10
|
| **is_supported** | **Boolean** | | [optional] |
|
11
11
|
| **is_excluded** | **Boolean** | | [optional] |
|
data/docs/Trade.md
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | | [optional] |
|
8
|
-
| **account** | **Account** | | [optional] |
|
9
|
-
| **symbol** | **BrokerageSymbol** | | [optional] |
|
10
|
-
| **universal_symbol** | **UniversalSymbol** | | [optional] |
|
8
|
+
| **account** | [**Account**](Account.md) | | [optional] |
|
9
|
+
| **symbol** | [**BrokerageSymbol**](BrokerageSymbol.md) | | [optional] |
|
10
|
+
| **universal_symbol** | [**UniversalSymbol**](UniversalSymbol.md) | | [optional] |
|
11
11
|
| **action** | [**TradeAction**](TradeAction.md) | | [optional] |
|
12
12
|
| **units** | **Integer** | | [optional] |
|
13
13
|
| **price** | **Float** | | [optional] |
|
@@ -4,9 +4,9 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **symbol** | **BrokerageSymbol** | | [optional] |
|
8
|
-
| **universal_symbol** | **UniversalSymbol** | | [optional] |
|
9
|
-
| **trade** | **Trade** | | [optional] |
|
7
|
+
| **symbol** | [**BrokerageSymbol**](BrokerageSymbol.md) | | [optional] |
|
8
|
+
| **universal_symbol** | [**UniversalSymbol**](UniversalSymbol.md) | | [optional] |
|
9
|
+
| **trade** | [**Trade**](Trade.md) | | [optional] |
|
10
10
|
| **state** | [**State**](State.md) | | [optional] |
|
11
11
|
| **filled_units** | **Integer** | Number of filled units | [optional] |
|
12
12
|
| **action** | [**TradeExecutionStatusAction**](TradeExecutionStatusAction.md) | | [optional] |
|
data/docs/TradeImpact.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **account** | **Account** | | [optional] |
|
8
|
-
| **currency** | **Currency** | | [optional] |
|
7
|
+
| **account** | [**Account**](Account.md) | | [optional] |
|
8
|
+
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
9
9
|
| **remaining_cash** | **Float** | Remaining balance after executing all trades | [optional] |
|
10
10
|
| **estimated_commissions** | **Float** | Total estimated commissions across all trades to make | [optional] |
|
11
11
|
| **forex_fees** | **Float** | Estimated forex fees to pay to excute trades | [optional] |
|
@@ -11,7 +11,7 @@ All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
11
11
|
|
12
12
|
Get transaction history for a user
|
13
13
|
|
14
|
-
Returns activities (transactions) for a user.
|
14
|
+
Returns activities (transactions) for a user. Specifying start and end date is highly recommended for better performance
|
15
15
|
|
16
16
|
### Example
|
17
17
|
|
@@ -98,7 +98,7 @@ end
|
|
98
98
|
|
99
99
|
Get performance information for a specific timeframe
|
100
100
|
|
101
|
-
Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental
|
101
|
+
Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
|
102
102
|
|
103
103
|
### Example
|
104
104
|
|
data/docs/TransactionsStatus.md
CHANGED
data/docs/UnderlyingSymbol.md
CHANGED
@@ -7,9 +7,9 @@
|
|
7
7
|
| **id** | **String** | | [optional] |
|
8
8
|
| **symbol** | **String** | | [optional] |
|
9
9
|
| **description** | **String** | | [optional] |
|
10
|
-
| **currency** | **Currency** | | [optional] |
|
11
|
-
| **exchange** | **USExchange** | | [optional] |
|
12
|
-
| **type** | **SecurityType** | | [optional] |
|
10
|
+
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
11
|
+
| **exchange** | [**USExchange**](USExchange.md) | | [optional] |
|
12
|
+
| **type** | [**SecurityType**](SecurityType.md) | | [optional] |
|
13
13
|
| **currencies** | [**Array<Currency>**](Currency.md) | | [optional] |
|
14
14
|
|
15
15
|
## Example
|
data/docs/UniversalActivity.md
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | | [optional] |
|
8
|
-
| **account** | **AccountSimple** | | [optional] |
|
8
|
+
| **account** | [**AccountSimple**](AccountSimple.md) | | [optional] |
|
9
9
|
| **amount** | **Float** | | [optional] |
|
10
|
-
| **currency** | **Currency** | | [optional] |
|
10
|
+
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
11
11
|
| **description** | **String** | | [optional] |
|
12
12
|
| **fee** | **Float** | | [optional] |
|
13
13
|
| **fx_rate** | **Float** | The forex conversion rate involved in the transaction if provided by the brokerage. Used in cases where securities of one currency are purchased in a different currency, and the forex conversion is automatic. In those cases, price, amount and fee will be in the top level currency (activity -> currency) | [optional] |
|
@@ -16,8 +16,8 @@
|
|
16
16
|
| **price** | **Float** | | [optional] |
|
17
17
|
| **settlement_date** | **String** | | [optional] |
|
18
18
|
| **external_reference_id** | **String** | Reference ID from brokerage used to identify related transactions. For example if an order comprises of several transactions (buy, fee, fx), they can be grouped if they share the same external_reference_id | [optional] |
|
19
|
-
| **symbol** | **Symbol** | | [optional] |
|
20
|
-
| **option_symbol** | **OptionsSymbol** | | [optional] |
|
19
|
+
| **symbol** | [**Symbol**](Symbol.md) | | [optional] |
|
20
|
+
| **option_symbol** | [**OptionsSymbol**](OptionsSymbol.md) | | [optional] |
|
21
21
|
| **trade_date** | **String** | | [optional] |
|
22
22
|
| **type** | **String** | Potential values include (but are not limited to) - DIVIDEND - BUY - SELL - CONTRIBUTION - WITHDRAWAL - EXTERNAL_ASSET_TRANSFER_IN - EXTERNAL_ASSET_TRANSFER_OUT - INTERNAL_CASH_TRANSFER_IN - INTERNAL_CASH_TRANSFER_OUT - INTERNAL_ASSET_TRANSFER_IN - INTERNAL_ASSET_TRANSFER_OUT - INTEREST - REBATE - GOV_GRANT - TAX - FEE - REI - FXT | [optional] |
|
23
23
|
| **units** | **Float** | Usually but not necessarily an integer | [optional] |
|
data/docs/UniversalSymbol.md
CHANGED
@@ -8,9 +8,9 @@
|
|
8
8
|
| **symbol** | **String** | | |
|
9
9
|
| **raw_symbol** | **String** | | |
|
10
10
|
| **description** | **String** | | [optional] |
|
11
|
-
| **currency** | **Currency** | | |
|
12
|
-
| **exchange** | **Exchange** | | [optional] |
|
13
|
-
| **type** | **SecurityType** | | |
|
11
|
+
| **currency** | [**Currency**](Currency.md) | | |
|
12
|
+
| **exchange** | [**Exchange**](Exchange.md) | | [optional] |
|
13
|
+
| **type** | [**SecurityType**](SecurityType.md) | | |
|
14
14
|
| **currencies** | [**Array<Currency>**](Currency.md) | | |
|
15
15
|
|
16
16
|
## Example
|
@@ -8,9 +8,9 @@
|
|
8
8
|
| **symbol** | **String** | | [optional] |
|
9
9
|
| **raw_symbol** | **String** | | [optional] |
|
10
10
|
| **description** | **String** | | [optional] |
|
11
|
-
| **currency** | **Currency** | | [optional] |
|
12
|
-
| **exchange** | **Exchange** | | [optional] |
|
13
|
-
| **type** | **SecurityType** | | [optional] |
|
11
|
+
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
12
|
+
| **exchange** | [**Exchange**](Exchange.md) | | [optional] |
|
13
|
+
| **type** | [**SecurityType**](SecurityType.md) | | [optional] |
|
14
14
|
| **currencies** | [**Array<Currency>**](Currency.md) | | [optional] |
|
15
15
|
|
16
16
|
## Example
|
data/docs/UserSettings.md
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
| **demo** | **Boolean** | | [optional] |
|
14
14
|
| **api_enabled** | **Boolean** | | [optional] |
|
15
15
|
| **drift_threshold** | **Float** | | [optional] |
|
16
|
-
| **preferred_currency** | **Currency** | | [optional] |
|
16
|
+
| **preferred_currency** | [**Currency**](Currency.md) | | [optional] |
|
17
17
|
|
18
18
|
## Example
|
19
19
|
|
@@ -267,17 +267,19 @@ module SnapTrade
|
|
267
267
|
# @param broker [String] Slug of the brokerage to connect the user to
|
268
268
|
# @param immediate_redirect [Boolean] When set to True, user will be redirected back to the partner's site instead of the connection portal
|
269
269
|
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account
|
270
|
-
# @param reconnect [String] The UUID of the brokerage connection to be reconnected
|
270
|
+
# @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See ‘Reconnecting Accounts’ for more information.
|
271
271
|
# @param connection_type [ConnectionType]
|
272
|
+
# @param connection_portal_version [ConnectionPortalVersion]
|
272
273
|
# @param body [SnapTradeLoginUserRequestBody]
|
273
274
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
274
|
-
def login_snap_trade_user(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: SENTINEL, extra: {})
|
275
|
+
def login_snap_trade_user(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: SENTINEL, connection_portal_version: SENTINEL, extra: {})
|
275
276
|
_body = {}
|
276
277
|
_body[:broker] = broker if broker != SENTINEL
|
277
278
|
_body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
|
278
279
|
_body[:customRedirect] = custom_redirect if custom_redirect != SENTINEL
|
279
280
|
_body[:reconnect] = reconnect if reconnect != SENTINEL
|
280
281
|
_body[:connectionType] = connection_type if connection_type != SENTINEL
|
282
|
+
_body[:connectionPortalVersion] = connection_portal_version if connection_portal_version != SENTINEL
|
281
283
|
extra[:snap_trade_login_user_request_body] = _body if !_body.empty?
|
282
284
|
data, _status_code, _headers = login_snap_trade_user_with_http_info_impl(user_id, user_secret, extra)
|
283
285
|
data
|
@@ -290,17 +292,19 @@ module SnapTrade
|
|
290
292
|
# @param broker [String] Slug of the brokerage to connect the user to
|
291
293
|
# @param immediate_redirect [Boolean] When set to True, user will be redirected back to the partner's site instead of the connection portal
|
292
294
|
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account
|
293
|
-
# @param reconnect [String] The UUID of the brokerage connection to be reconnected
|
295
|
+
# @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See ‘Reconnecting Accounts’ for more information.
|
294
296
|
# @param connection_type [ConnectionType]
|
297
|
+
# @param connection_portal_version [ConnectionPortalVersion]
|
295
298
|
# @param body [SnapTradeLoginUserRequestBody]
|
296
299
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
297
|
-
def login_snap_trade_user_with_http_info(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: SENTINEL, extra: {})
|
300
|
+
def login_snap_trade_user_with_http_info(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: SENTINEL, connection_portal_version: SENTINEL, extra: {})
|
298
301
|
_body = {}
|
299
302
|
_body[:broker] = broker if broker != SENTINEL
|
300
303
|
_body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
|
301
304
|
_body[:customRedirect] = custom_redirect if custom_redirect != SENTINEL
|
302
305
|
_body[:reconnect] = reconnect if reconnect != SENTINEL
|
303
306
|
_body[:connectionType] = connection_type if connection_type != SENTINEL
|
307
|
+
_body[:connectionPortalVersion] = connection_portal_version if connection_portal_version != SENTINEL
|
304
308
|
extra[:snap_trade_login_user_request_body] = _body if !_body.empty?
|
305
309
|
login_snap_trade_user_with_http_info_impl(user_id, user_secret, extra)
|
306
310
|
end
|
@@ -19,7 +19,7 @@ module SnapTrade
|
|
19
19
|
end
|
20
20
|
|
21
21
|
# Get transaction history for a user
|
22
|
-
# Returns activities (transactions) for a user.
|
22
|
+
# Returns activities (transactions) for a user. Specifying start and end date is highly recommended for better performance
|
23
23
|
# @param user_id [String]
|
24
24
|
# @param user_secret [String]
|
25
25
|
# @param start_date [Date]
|
@@ -39,7 +39,7 @@ module SnapTrade
|
|
39
39
|
end
|
40
40
|
|
41
41
|
# Get transaction history for a user
|
42
|
-
# Returns activities (transactions) for a user.
|
42
|
+
# Returns activities (transactions) for a user. Specifying start and end date is highly recommended for better performance
|
43
43
|
# @param user_id [String]
|
44
44
|
# @param user_secret [String]
|
45
45
|
# @param start_date [Date]
|
@@ -58,7 +58,7 @@ module SnapTrade
|
|
58
58
|
end
|
59
59
|
|
60
60
|
# Get transaction history for a user
|
61
|
-
# Returns activities (transactions) for a user.
|
61
|
+
# Returns activities (transactions) for a user. Specifying start and end date is highly recommended for better performance
|
62
62
|
# @param user_id [String]
|
63
63
|
# @param user_secret [String]
|
64
64
|
# @param [Hash] opts the optional parameters
|
@@ -74,7 +74,7 @@ module SnapTrade
|
|
74
74
|
end
|
75
75
|
|
76
76
|
# Get transaction history for a user
|
77
|
-
# Returns activities (transactions) for a user.
|
77
|
+
# Returns activities (transactions) for a user. Specifying start and end date is highly recommended for better performance
|
78
78
|
# @param user_id [String]
|
79
79
|
# @param user_secret [String]
|
80
80
|
# @param [Hash] opts the optional parameters
|
@@ -145,7 +145,7 @@ module SnapTrade
|
|
145
145
|
|
146
146
|
|
147
147
|
# Get performance information for a specific timeframe
|
148
|
-
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental
|
148
|
+
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
|
149
149
|
# @param start_date [Date]
|
150
150
|
# @param end_date [Date]
|
151
151
|
# @param user_id [String]
|
@@ -163,7 +163,7 @@ module SnapTrade
|
|
163
163
|
end
|
164
164
|
|
165
165
|
# Get performance information for a specific timeframe
|
166
|
-
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental
|
166
|
+
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
|
167
167
|
# @param start_date [Date]
|
168
168
|
# @param end_date [Date]
|
169
169
|
# @param user_id [String]
|
@@ -180,7 +180,7 @@ module SnapTrade
|
|
180
180
|
end
|
181
181
|
|
182
182
|
# Get performance information for a specific timeframe
|
183
|
-
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental
|
183
|
+
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
|
184
184
|
# @param start_date [Date]
|
185
185
|
# @param end_date [Date]
|
186
186
|
# @param user_id [String]
|
@@ -196,7 +196,7 @@ module SnapTrade
|
|
196
196
|
end
|
197
197
|
|
198
198
|
# Get performance information for a specific timeframe
|
199
|
-
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental
|
199
|
+
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
|
200
200
|
# @param start_date [Date]
|
201
201
|
# @param end_date [Date]
|
202
202
|
# @param user_id [String]
|
@@ -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
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
require 'time'
|
13
|
+
|
14
|
+
module SnapTrade
|
15
|
+
class ConnectionPortalVersion
|
16
|
+
V2 = "v2".freeze
|
17
|
+
V3 = "v3".freeze
|
18
|
+
|
19
|
+
def self.all_vars
|
20
|
+
@all_vars ||= [V2, V3].freeze
|
21
|
+
end
|
22
|
+
|
23
|
+
# Builds the enum from string
|
24
|
+
# @param [String] The enum value in the form of the string
|
25
|
+
# @return [String] The enum value
|
26
|
+
def self.build_from_hash(value)
|
27
|
+
new.build_from_hash(value)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Builds the enum from string
|
31
|
+
# @param [String] The enum value in the form of the string
|
32
|
+
# @return [String] The enum value
|
33
|
+
def build_from_hash(value)
|
34
|
+
return value if ConnectionPortalVersion.all_vars.include?(value)
|
35
|
+
raise "Invalid ENUM value #{value} for class #ConnectionPortalVersion"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -23,11 +23,13 @@ module SnapTrade
|
|
23
23
|
# URL to redirect the user to after the user connects their brokerage account
|
24
24
|
attr_accessor :custom_redirect
|
25
25
|
|
26
|
-
# The UUID of the brokerage connection to be reconnected
|
26
|
+
# The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See ‘Reconnecting Accounts’ for more information.
|
27
27
|
attr_accessor :reconnect
|
28
28
|
|
29
29
|
attr_accessor :connection_type
|
30
30
|
|
31
|
+
attr_accessor :connection_portal_version
|
32
|
+
|
31
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
34
|
def self.attribute_map
|
33
35
|
{
|
@@ -35,7 +37,8 @@ module SnapTrade
|
|
35
37
|
:'immediate_redirect' => :'immediateRedirect',
|
36
38
|
:'custom_redirect' => :'customRedirect',
|
37
39
|
:'reconnect' => :'reconnect',
|
38
|
-
:'connection_type' => :'connectionType'
|
40
|
+
:'connection_type' => :'connectionType',
|
41
|
+
:'connection_portal_version' => :'connectionPortalVersion'
|
39
42
|
}
|
40
43
|
end
|
41
44
|
|
@@ -51,7 +54,8 @@ module SnapTrade
|
|
51
54
|
:'immediate_redirect' => :'Boolean',
|
52
55
|
:'custom_redirect' => :'String',
|
53
56
|
:'reconnect' => :'String',
|
54
|
-
:'connection_type' => :'ConnectionType'
|
57
|
+
:'connection_type' => :'ConnectionType',
|
58
|
+
:'connection_portal_version' => :'ConnectionPortalVersion'
|
55
59
|
}
|
56
60
|
end
|
57
61
|
|
@@ -95,6 +99,10 @@ module SnapTrade
|
|
95
99
|
if attributes.key?(:'connection_type')
|
96
100
|
self.connection_type = attributes[:'connection_type']
|
97
101
|
end
|
102
|
+
|
103
|
+
if attributes.key?(:'connection_portal_version')
|
104
|
+
self.connection_portal_version = attributes[:'connection_portal_version']
|
105
|
+
end
|
98
106
|
end
|
99
107
|
|
100
108
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -119,7 +127,8 @@ module SnapTrade
|
|
119
127
|
immediate_redirect == o.immediate_redirect &&
|
120
128
|
custom_redirect == o.custom_redirect &&
|
121
129
|
reconnect == o.reconnect &&
|
122
|
-
connection_type == o.connection_type
|
130
|
+
connection_type == o.connection_type &&
|
131
|
+
connection_portal_version == o.connection_portal_version
|
123
132
|
end
|
124
133
|
|
125
134
|
# @see the `==` method
|
@@ -131,7 +140,7 @@ module SnapTrade
|
|
131
140
|
# Calculates hash code according to all attributes.
|
132
141
|
# @return [Integer] Hash code
|
133
142
|
def hash
|
134
|
-
[broker, immediate_redirect, custom_redirect, reconnect, connection_type].hash
|
143
|
+
[broker, immediate_redirect, custom_redirect, reconnect, connection_type, connection_portal_version].hash
|
135
144
|
end
|
136
145
|
|
137
146
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
data/lib/snaptrade.rb
CHANGED
@@ -44,6 +44,7 @@ require 'snaptrade/models/brokerage_symbol_symbol'
|
|
44
44
|
require 'snaptrade/models/brokerage_type'
|
45
45
|
require 'snaptrade/models/calculated_trade'
|
46
46
|
require 'snaptrade/models/cash_restriction'
|
47
|
+
require 'snaptrade/models/connection_portal_version'
|
47
48
|
require 'snaptrade/models/connection_type'
|
48
49
|
require 'snaptrade/models/connections_session_events200_response_inner'
|
49
50
|
require 'snaptrade/models/currency'
|
@@ -30,7 +30,7 @@ describe 'TransactionsAndReportingApi' do
|
|
30
30
|
|
31
31
|
# unit tests for get_activities
|
32
32
|
# Get transaction history for a user
|
33
|
-
# Returns activities (transactions) for a user.
|
33
|
+
# Returns activities (transactions) for a user. Specifying start and end date is highly recommended for better performance
|
34
34
|
# @param user_id
|
35
35
|
# @param user_secret
|
36
36
|
# @param [Hash] opts the optional parameters
|
@@ -48,7 +48,7 @@ describe 'TransactionsAndReportingApi' do
|
|
48
48
|
|
49
49
|
# unit tests for get_reporting_custom_range
|
50
50
|
# Get performance information for a specific timeframe
|
51
|
-
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental
|
51
|
+
# Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
|
52
52
|
# @param start_date
|
53
53
|
# @param end_date
|
54
54
|
# @param user_id
|
@@ -0,0 +1,24 @@
|
|
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
|
+
require 'date'
|
14
|
+
|
15
|
+
# Unit tests for SnapTrade::ConnectionPortalVersion
|
16
|
+
describe SnapTrade::ConnectionPortalVersion do
|
17
|
+
let(:instance) { SnapTrade::ConnectionPortalVersion.new }
|
18
|
+
|
19
|
+
describe 'test an instance of ConnectionPortalVersion' do
|
20
|
+
it 'should create an instance of ConnectionPortalVersion' do
|
21
|
+
expect(instance).to be_instance_of(SnapTrade::ConnectionPortalVersion)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -51,4 +51,10 @@ describe SnapTrade::SnapTradeLoginUserRequestBody do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
describe 'test attribute "connection_portal_version"' 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
|
+
|
54
60
|
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: 1.17.
|
4
|
+
version: 1.17.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- docs/BrokerageType.md
|
112
112
|
- docs/CalculatedTrade.md
|
113
113
|
- docs/CashRestriction.md
|
114
|
+
- docs/ConnectionPortalVersion.md
|
114
115
|
- docs/ConnectionType.md
|
115
116
|
- docs/ConnectionsApi.md
|
116
117
|
- docs/ConnectionsSessionEvents200ResponseInner.md
|
@@ -261,6 +262,7 @@ files:
|
|
261
262
|
- lib/snaptrade/models/brokerage_type.rb
|
262
263
|
- lib/snaptrade/models/calculated_trade.rb
|
263
264
|
- lib/snaptrade/models/cash_restriction.rb
|
265
|
+
- lib/snaptrade/models/connection_portal_version.rb
|
264
266
|
- lib/snaptrade/models/connection_type.rb
|
265
267
|
- lib/snaptrade/models/connections_session_events200_response_inner.rb
|
266
268
|
- lib/snaptrade/models/currency.rb
|
@@ -404,6 +406,7 @@ files:
|
|
404
406
|
- spec/models/brokerage_type_spec.rb
|
405
407
|
- spec/models/calculated_trade_spec.rb
|
406
408
|
- spec/models/cash_restriction_spec.rb
|
409
|
+
- spec/models/connection_portal_version_spec.rb
|
407
410
|
- spec/models/connection_type_spec.rb
|
408
411
|
- spec/models/connections_session_events200_response_inner_spec.rb
|
409
412
|
- spec/models/currency_spec.rb
|
@@ -528,7 +531,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
528
531
|
- !ruby/object:Gem::Version
|
529
532
|
version: '0'
|
530
533
|
requirements: []
|
531
|
-
rubygems_version: 3.
|
534
|
+
rubygems_version: 3.3.7
|
532
535
|
signing_key:
|
533
536
|
specification_version: 4
|
534
537
|
summary: SnapTrade Ruby Gem
|
@@ -589,6 +592,7 @@ test_files:
|
|
589
592
|
- spec/models/options_position_spec.rb
|
590
593
|
- spec/models/jwt_spec.rb
|
591
594
|
- spec/models/brokerage_spec.rb
|
595
|
+
- spec/models/connection_portal_version_spec.rb
|
592
596
|
- spec/models/account_order_record_status_spec.rb
|
593
597
|
- spec/models/snap_trade_api_disclaimer_accept_status_spec.rb
|
594
598
|
- spec/models/snap_trade_login_user_request_body_spec.rb
|