snaptrade 2.0.42 → 2.0.44
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 +9 -6
- data/lib/snaptrade/api/reference_data_api.rb +16 -16
- data/lib/snaptrade/api/transactions_and_reporting_api.rb +4 -4
- data/lib/snaptrade/models/partner_data.rb +49 -49
- data/lib/snaptrade/models/universal_activity.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/reference_data_api_spec.rb +4 -4
- data/spec/api/transactions_and_reporting_api_spec.rb +1 -1
- data/spec/models/partner_data_spec.rb +12 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d8f0b8a1363f9c2578f1cf5d43ba3a892cf2fa147f76637a184a1248e4ca31e
|
4
|
+
data.tar.gz: 0cf96b9380ece2e60b9c7acb2fe0d5fbc49f3fd5d536194b13c8352f2bf62160
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 990eead66b72fd6c5381f955e7ebfb7559e63f1eeed4576bab7d886d298796dfec308e407c71800393d9acf76a75bd64bc98d23de4b6396630db1e245d7b13d0
|
7
|
+
data.tar.gz: 5fd1dfda03290175a8cf0666565070a7c4248224f543b8bd9f7abd0a3788fd86fff84d91a813998da2b1a9a249762be19f6f78b0112eec56c2dc15b5e481f49d
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
snaptrade (2.0.
|
4
|
+
snaptrade (2.0.44)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
7
7
|
|
@@ -51,7 +51,7 @@ GEM
|
|
51
51
|
rspec-mocks (~> 3.13.0)
|
52
52
|
rspec-core (3.13.1)
|
53
53
|
rspec-support (~> 3.13.0)
|
54
|
-
rspec-expectations (3.13.
|
54
|
+
rspec-expectations (3.13.3)
|
55
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
56
56
|
rspec-support (~> 3.13.0)
|
57
57
|
rspec-mocks (3.13.1)
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
8
8
|
|
9
|
-
[![npm](https://img.shields.io/badge/gem-v2.0.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v2.0.44-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.44)
|
10
10
|
[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
|
11
11
|
|
12
12
|
</div>
|
@@ -70,7 +70,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
70
70
|
Add to Gemfile:
|
71
71
|
|
72
72
|
```ruby
|
73
|
-
gem 'snaptrade', '~> 2.0.
|
73
|
+
gem 'snaptrade', '~> 2.0.44'
|
74
74
|
```
|
75
75
|
|
76
76
|
## Getting Started<a id="getting-started"></a>
|
@@ -1089,7 +1089,7 @@ A currency pair based on currency code for example, {CAD-USD}
|
|
1089
1089
|
|
1090
1090
|
### `snaptrade.reference_data.get_partner_info`<a id="snaptradereference_dataget_partner_info"></a>
|
1091
1091
|
|
1092
|
-
Returns
|
1092
|
+
Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
1093
1093
|
|
1094
1094
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1095
1095
|
|
@@ -1113,7 +1113,7 @@ p result
|
|
1113
1113
|
|
1114
1114
|
### `snaptrade.reference_data.get_security_types`<a id="snaptradereference_dataget_security_types"></a>
|
1115
1115
|
|
1116
|
-
|
1116
|
+
Return all available security types supported by SnapTrade.
|
1117
1117
|
|
1118
1118
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1119
1119
|
|
@@ -1697,8 +1697,11 @@ parameter takes precedence over the `accounts` parameter.
|
|
1697
1697
|
##### type: `String`<a id="type-string"></a>
|
1698
1698
|
Optional comma separated list of transaction types to filter by. SnapTrade does
|
1699
1699
|
a best effort to categorize brokerage transaction types into a common set of
|
1700
|
-
values. Here are some of the most popular values: - BUY -
|
1701
|
-
|
1700
|
+
values. Here are some of the most popular values: - `BUY` - Asset bought. -
|
1701
|
+
`SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash
|
1702
|
+
contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment.
|
1703
|
+
- `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from
|
1704
|
+
the account.
|
1702
1705
|
|
1703
1706
|
#### 🔄 Return<a id="🔄-return"></a>
|
1704
1707
|
|
@@ -102,9 +102,9 @@ module SnapTrade
|
|
102
102
|
end
|
103
103
|
|
104
104
|
|
105
|
-
# Get
|
105
|
+
# Get Client Info
|
106
106
|
#
|
107
|
-
# Returns
|
107
|
+
# Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
108
108
|
#
|
109
109
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
110
110
|
def get_partner_info(extra: {})
|
@@ -112,17 +112,17 @@ module SnapTrade
|
|
112
112
|
data
|
113
113
|
end
|
114
114
|
|
115
|
-
# Get
|
115
|
+
# Get Client Info
|
116
116
|
#
|
117
|
-
# Returns
|
117
|
+
# Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
118
118
|
#
|
119
119
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
120
120
|
def get_partner_info_with_http_info(extra: {})
|
121
121
|
get_partner_info_with_http_info_impl(extra)
|
122
122
|
end
|
123
123
|
|
124
|
-
# Get
|
125
|
-
# Returns
|
124
|
+
# Get Client Info
|
125
|
+
# Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
126
126
|
# @param [Hash] opts the optional parameters
|
127
127
|
# @return [PartnerData]
|
128
128
|
private def get_partner_info_impl(opts = {})
|
@@ -130,8 +130,8 @@ module SnapTrade
|
|
130
130
|
data
|
131
131
|
end
|
132
132
|
|
133
|
-
# Get
|
134
|
-
# Returns
|
133
|
+
# Get Client Info
|
134
|
+
# Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
135
135
|
# @param [Hash] opts the optional parameters
|
136
136
|
# @return [Array<(PartnerData, Integer, Hash)>] PartnerData data, response status code and response headers
|
137
137
|
private def get_partner_info_with_http_info_impl(opts = {})
|
@@ -179,9 +179,9 @@ module SnapTrade
|
|
179
179
|
end
|
180
180
|
|
181
181
|
|
182
|
-
# List
|
182
|
+
# List security types
|
183
183
|
#
|
184
|
-
#
|
184
|
+
# Return all available security types supported by SnapTrade.
|
185
185
|
#
|
186
186
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
187
187
|
def get_security_types(extra: {})
|
@@ -189,17 +189,17 @@ module SnapTrade
|
|
189
189
|
data
|
190
190
|
end
|
191
191
|
|
192
|
-
# List
|
192
|
+
# List security types
|
193
193
|
#
|
194
|
-
#
|
194
|
+
# Return all available security types supported by SnapTrade.
|
195
195
|
#
|
196
196
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
197
197
|
def get_security_types_with_http_info(extra: {})
|
198
198
|
get_security_types_with_http_info_impl(extra)
|
199
199
|
end
|
200
200
|
|
201
|
-
# List
|
202
|
-
#
|
201
|
+
# List security types
|
202
|
+
# Return all available security types supported by SnapTrade.
|
203
203
|
# @param [Hash] opts the optional parameters
|
204
204
|
# @return [Array<SecurityType>]
|
205
205
|
private def get_security_types_impl(opts = {})
|
@@ -207,8 +207,8 @@ module SnapTrade
|
|
207
207
|
data
|
208
208
|
end
|
209
209
|
|
210
|
-
# List
|
211
|
-
#
|
210
|
+
# List security types
|
211
|
+
# Return all available security types supported by SnapTrade.
|
212
212
|
# @param [Hash] opts the optional parameters
|
213
213
|
# @return [Array<(Array<SecurityType>, Integer, Hash)>] Array<SecurityType> data, response status code and response headers
|
214
214
|
private def get_security_types_with_http_info_impl(opts = {})
|
@@ -31,7 +31,7 @@ module SnapTrade
|
|
31
31
|
# @param end_date [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`.
|
32
32
|
# @param accounts [String] 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.
|
33
33
|
# @param brokerage_authorizations [String] 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.
|
34
|
-
# @param type [String] 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
|
34
|
+
# @param type [String] 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.
|
35
35
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
36
36
|
def get_activities(user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, accounts: SENTINEL, brokerage_authorizations: SENTINEL, type: SENTINEL, extra: {})
|
37
37
|
extra[:start_date] = start_date if start_date != SENTINEL
|
@@ -57,7 +57,7 @@ module SnapTrade
|
|
57
57
|
# @param end_date [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`.
|
58
58
|
# @param accounts [String] 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.
|
59
59
|
# @param brokerage_authorizations [String] 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.
|
60
|
-
# @param type [String] 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
|
60
|
+
# @param type [String] 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.
|
61
61
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
62
62
|
def get_activities_with_http_info(user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, accounts: SENTINEL, brokerage_authorizations: SENTINEL, type: SENTINEL, extra: {})
|
63
63
|
extra[:start_date] = start_date if start_date != SENTINEL
|
@@ -77,7 +77,7 @@ module SnapTrade
|
|
77
77
|
# @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`.
|
78
78
|
# @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.
|
79
79
|
# @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.
|
80
|
-
# @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
|
80
|
+
# @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.
|
81
81
|
# @return [Array<UniversalActivity>]
|
82
82
|
private def get_activities_impl(user_id, user_secret, opts = {})
|
83
83
|
data, _status_code, _headers = get_activities_with_http_info(user_id, user_secret, opts)
|
@@ -93,7 +93,7 @@ module SnapTrade
|
|
93
93
|
# @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`.
|
94
94
|
# @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.
|
95
95
|
# @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.
|
96
|
-
# @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
|
96
|
+
# @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.
|
97
97
|
# @return [Array<(Array<UniversalActivity>, Integer, Hash)>] Array<UniversalActivity> data, response status code and response headers
|
98
98
|
private def get_activities_with_http_info_impl(user_id, user_secret, opts = {})
|
99
99
|
if @api_client.config.debugging
|
@@ -11,59 +11,59 @@ require 'date'
|
|
11
11
|
require 'time'
|
12
12
|
|
13
13
|
module SnapTrade
|
14
|
-
# SnapTrade
|
14
|
+
# Configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
15
15
|
class PartnerData
|
16
|
-
#
|
17
|
-
attr_accessor :
|
18
|
-
|
19
|
-
# Brokerages that can be accessed by partners
|
20
|
-
attr_accessor :allowed_brokerages
|
16
|
+
# A short, unique identifier for your company or product.
|
17
|
+
attr_accessor :slug
|
21
18
|
|
22
|
-
#
|
19
|
+
# Your company or product name.
|
23
20
|
attr_accessor :name
|
24
21
|
|
25
|
-
#
|
26
|
-
attr_accessor :slug
|
27
|
-
|
28
|
-
# URL to partner's logo
|
22
|
+
# URL to your company or product logo.
|
29
23
|
attr_accessor :logo_url
|
30
24
|
|
31
|
-
#
|
32
|
-
attr_accessor :
|
25
|
+
# Brokerages that can be accessed by your Client ID.
|
26
|
+
attr_accessor :allowed_brokerages
|
33
27
|
|
34
|
-
#
|
28
|
+
# Whether trading is enabled for your SnapTrade Client ID.
|
35
29
|
attr_accessor :can_access_trades
|
36
30
|
|
37
|
-
#
|
31
|
+
# Whether holdings data is enabled for your SnapTrade Client ID.
|
38
32
|
attr_accessor :can_access_holdings
|
39
33
|
|
40
|
-
#
|
34
|
+
# Whether account historical transactions is enabled for your SnapTrade Client ID.
|
41
35
|
attr_accessor :can_access_account_history
|
42
36
|
|
43
|
-
#
|
37
|
+
# Whether reference data is enabled for your SnapTrade Client ID.
|
44
38
|
attr_accessor :can_access_reference_data
|
45
39
|
|
46
|
-
#
|
40
|
+
# Whether portfolio management is enabled for your SnapTrade Client ID.
|
47
41
|
attr_accessor :can_access_portfolio_management
|
48
42
|
|
49
|
-
#
|
43
|
+
# Whether recent order history is enabled for your SnapTrade Client ID.
|
50
44
|
attr_accessor :can_access_orders
|
51
45
|
|
46
|
+
# URI to redirect user back to after user is done adding brokerage connections.
|
47
|
+
attr_accessor :redirect_uri
|
48
|
+
|
49
|
+
# Shows if pin is required by users to access connection page. This field has been deprecated.
|
50
|
+
attr_accessor :pin_required
|
51
|
+
|
52
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
53
53
|
def self.attribute_map
|
54
54
|
{
|
55
|
-
:'redirect_uri' => :'redirect_uri',
|
56
|
-
:'allowed_brokerages' => :'allowed_brokerages',
|
57
|
-
:'name' => :'name',
|
58
55
|
:'slug' => :'slug',
|
56
|
+
:'name' => :'name',
|
59
57
|
:'logo_url' => :'logo_url',
|
60
|
-
:'
|
58
|
+
:'allowed_brokerages' => :'allowed_brokerages',
|
61
59
|
:'can_access_trades' => :'can_access_trades',
|
62
60
|
:'can_access_holdings' => :'can_access_holdings',
|
63
61
|
:'can_access_account_history' => :'can_access_account_history',
|
64
62
|
:'can_access_reference_data' => :'can_access_reference_data',
|
65
63
|
:'can_access_portfolio_management' => :'can_access_portfolio_management',
|
66
|
-
:'can_access_orders' => :'can_access_orders'
|
64
|
+
:'can_access_orders' => :'can_access_orders',
|
65
|
+
:'redirect_uri' => :'redirect_uri',
|
66
|
+
:'pin_required' => :'pin_required'
|
67
67
|
}
|
68
68
|
end
|
69
69
|
|
@@ -75,18 +75,18 @@ module SnapTrade
|
|
75
75
|
# Attribute type mapping.
|
76
76
|
def self.openapi_types
|
77
77
|
{
|
78
|
-
:'redirect_uri' => :'String',
|
79
|
-
:'allowed_brokerages' => :'Array<Brokerage>',
|
80
|
-
:'name' => :'String',
|
81
78
|
:'slug' => :'String',
|
79
|
+
:'name' => :'String',
|
82
80
|
:'logo_url' => :'String',
|
83
|
-
:'
|
81
|
+
:'allowed_brokerages' => :'Array<Brokerage>',
|
84
82
|
:'can_access_trades' => :'Boolean',
|
85
83
|
:'can_access_holdings' => :'Boolean',
|
86
84
|
:'can_access_account_history' => :'Boolean',
|
87
85
|
:'can_access_reference_data' => :'Boolean',
|
88
86
|
:'can_access_portfolio_management' => :'Boolean',
|
89
|
-
:'can_access_orders' => :'Boolean'
|
87
|
+
:'can_access_orders' => :'Boolean',
|
88
|
+
:'redirect_uri' => :'String',
|
89
|
+
:'pin_required' => :'Boolean'
|
90
90
|
}
|
91
91
|
end
|
92
92
|
|
@@ -111,30 +111,22 @@ module SnapTrade
|
|
111
111
|
h[k.to_sym] = v
|
112
112
|
}
|
113
113
|
|
114
|
-
if attributes.key?(:'
|
115
|
-
self.
|
116
|
-
end
|
117
|
-
|
118
|
-
if attributes.key?(:'allowed_brokerages')
|
119
|
-
if (value = attributes[:'allowed_brokerages']).is_a?(Array)
|
120
|
-
self.allowed_brokerages = value
|
121
|
-
end
|
114
|
+
if attributes.key?(:'slug')
|
115
|
+
self.slug = attributes[:'slug']
|
122
116
|
end
|
123
117
|
|
124
118
|
if attributes.key?(:'name')
|
125
119
|
self.name = attributes[:'name']
|
126
120
|
end
|
127
121
|
|
128
|
-
if attributes.key?(:'slug')
|
129
|
-
self.slug = attributes[:'slug']
|
130
|
-
end
|
131
|
-
|
132
122
|
if attributes.key?(:'logo_url')
|
133
123
|
self.logo_url = attributes[:'logo_url']
|
134
124
|
end
|
135
125
|
|
136
|
-
if attributes.key?(:'
|
137
|
-
|
126
|
+
if attributes.key?(:'allowed_brokerages')
|
127
|
+
if (value = attributes[:'allowed_brokerages']).is_a?(Array)
|
128
|
+
self.allowed_brokerages = value
|
129
|
+
end
|
138
130
|
end
|
139
131
|
|
140
132
|
if attributes.key?(:'can_access_trades')
|
@@ -160,6 +152,14 @@ module SnapTrade
|
|
160
152
|
if attributes.key?(:'can_access_orders')
|
161
153
|
self.can_access_orders = attributes[:'can_access_orders']
|
162
154
|
end
|
155
|
+
|
156
|
+
if attributes.key?(:'redirect_uri')
|
157
|
+
self.redirect_uri = attributes[:'redirect_uri']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'pin_required')
|
161
|
+
self.pin_required = attributes[:'pin_required']
|
162
|
+
end
|
163
163
|
end
|
164
164
|
|
165
165
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -180,18 +180,18 @@ module SnapTrade
|
|
180
180
|
def ==(o)
|
181
181
|
return true if self.equal?(o)
|
182
182
|
self.class == o.class &&
|
183
|
-
redirect_uri == o.redirect_uri &&
|
184
|
-
allowed_brokerages == o.allowed_brokerages &&
|
185
|
-
name == o.name &&
|
186
183
|
slug == o.slug &&
|
184
|
+
name == o.name &&
|
187
185
|
logo_url == o.logo_url &&
|
188
|
-
|
186
|
+
allowed_brokerages == o.allowed_brokerages &&
|
189
187
|
can_access_trades == o.can_access_trades &&
|
190
188
|
can_access_holdings == o.can_access_holdings &&
|
191
189
|
can_access_account_history == o.can_access_account_history &&
|
192
190
|
can_access_reference_data == o.can_access_reference_data &&
|
193
191
|
can_access_portfolio_management == o.can_access_portfolio_management &&
|
194
|
-
can_access_orders == o.can_access_orders
|
192
|
+
can_access_orders == o.can_access_orders &&
|
193
|
+
redirect_uri == o.redirect_uri &&
|
194
|
+
pin_required == o.pin_required
|
195
195
|
end
|
196
196
|
|
197
197
|
# @see the `==` method
|
@@ -203,7 +203,7 @@ module SnapTrade
|
|
203
203
|
# Calculates hash code according to all attributes.
|
204
204
|
# @return [Integer] Hash code
|
205
205
|
def hash
|
206
|
-
[
|
206
|
+
[slug, name, logo_url, allowed_brokerages, can_access_trades, can_access_holdings, can_access_account_history, can_access_reference_data, can_access_portfolio_management, can_access_orders, redirect_uri, pin_required].hash
|
207
207
|
end
|
208
208
|
|
209
209
|
# Builds the object from hash
|
@@ -33,7 +33,7 @@ module SnapTrade
|
|
33
33
|
|
34
34
|
attr_accessor :currency
|
35
35
|
|
36
|
-
# A string representing the type of transaction. SnapTrade does a best effort to categorize the 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
|
36
|
+
# A string representing the type of transaction. SnapTrade does a best effort to categorize the 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.
|
37
37
|
attr_accessor :type
|
38
38
|
|
39
39
|
# If an option `BUY` or `SELL` transaction, this further specifies the type of action. The possible values are: - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE
|
data/lib/snaptrade/version.rb
CHANGED
@@ -40,8 +40,8 @@ describe 'ReferenceDataApi' do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# unit tests for get_partner_info
|
43
|
-
# Get
|
44
|
-
# Returns
|
43
|
+
# Get Client Info
|
44
|
+
# Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
45
45
|
# @param [Hash] opts the optional parameters
|
46
46
|
# @return [PartnerData]
|
47
47
|
describe 'get_partner_info test' do
|
@@ -51,8 +51,8 @@ describe 'ReferenceDataApi' do
|
|
51
51
|
end
|
52
52
|
|
53
53
|
# unit tests for get_security_types
|
54
|
-
# List
|
55
|
-
#
|
54
|
+
# List security types
|
55
|
+
# Return all available security types supported by SnapTrade.
|
56
56
|
# @param [Hash] opts the optional parameters
|
57
57
|
# @return [Array<SecurityType>]
|
58
58
|
describe 'get_security_types test' do
|
@@ -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 - SELL - DIVIDEND - CONTRIBUTION - WITHDRAWAL - REI - INTEREST - FEE
|
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.
|
41
41
|
# @return [Array<UniversalActivity>]
|
42
42
|
describe 'get_activities test' do
|
43
43
|
it 'should work' do
|
@@ -20,73 +20,73 @@ describe SnapTrade::PartnerData do
|
|
20
20
|
expect(instance).to be_instance_of(SnapTrade::PartnerData)
|
21
21
|
end
|
22
22
|
end
|
23
|
-
describe 'test attribute "
|
23
|
+
describe 'test attribute "slug"' 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 "
|
29
|
+
describe 'test attribute "name"' 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 "logo_url"' 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 "allowed_brokerages"' 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 "can_access_trades"' 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 "can_access_holdings"' 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 "can_access_account_history"' 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 "can_access_reference_data"' 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 "can_access_portfolio_management"' 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 "can_access_orders"' 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 "redirect_uri"' 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 "pin_required"' 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
|
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.44
|
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-
|
11
|
+
date: 2024-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|