snaptrade 1.17.11 → 1.17.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89a20280d9b851518ff6cb3d0de7d9da7e10ca979110d76bde7d65ded8b3cea0
4
- data.tar.gz: 8777f7b671a47885513f3e26dbe3952590e37f95dbfb2700582bf747a29926a5
3
+ metadata.gz: 975d402b0d373fe2299950d7e6939d1d0a01465ec71fc60c96542394c6214d98
4
+ data.tar.gz: 25f83be291930f060708ddab5753080eefe30736e701d71a06c08d0e46381761
5
5
  SHA512:
6
- metadata.gz: 4386f8003ff97d7572b654cab71a0fed781bd470d021e9f0fa1d5f89bcdad6fa907d22c2c03b4a21e9c05679cdc43c5f21963727073e43025fce0a0057dca059
7
- data.tar.gz: d02afd9d1eccb3f8ccf03a8e6271874e7e73e50d6ce08ce7e433a8151e2abcbe23570a49b27bf6efcb5c5d09cdd25a2ffc00eb894413a4af224c351b84fedaaf
6
+ metadata.gz: b7247b98a43069a678782e0f99945607ea6ffe06f43990a1b68ab5edb70b7525b8ceca24e465701c93b8b89235c5a649980af2ed7b959f5538b7d68dc01c7907
7
+ data.tar.gz: a4e2fc6e5d6296f87bbf525d01e165f1316a9fc15cf7169dd52ae976d887bf6a90f39555b494fe6e9649061df97af13ef9970cbc55b0059b36048818803d92bc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (1.17.10)
4
+ snaptrade (1.17.13)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -9,47 +9,40 @@ GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.4.2)
12
- base64 (0.1.1)
13
12
  byebug (11.1.3)
14
13
  coderay (1.1.3)
15
14
  debug (1.8.0)
16
15
  irb (>= 1.5.0)
17
16
  reline (>= 0.3.1)
18
17
  diff-lcs (1.5.0)
19
- faraday (2.7.11)
20
- base64
21
- faraday-net_http (>= 2.0, < 3.1)
22
- ruby2_keywords (>= 0.0.4)
18
+ faraday (2.9.0)
19
+ faraday-net_http (>= 2.0, < 3.2)
23
20
  faraday-multipart (1.0.4)
24
21
  multipart-post (~> 2)
25
- faraday-net_http (3.0.2)
22
+ faraday-net_http (3.1.0)
23
+ net-http
26
24
  io-console (0.6.0)
27
- irb (1.8.1)
28
- rdoc
29
- reline (>= 0.3.8)
25
+ irb (1.6.4)
26
+ reline (>= 0.3.0)
30
27
  method_source (1.0.0)
31
28
  multipart-post (2.3.0)
29
+ net-http (0.4.1)
30
+ uri
32
31
  parallel (1.23.0)
33
- parser (3.2.2.3)
32
+ parser (3.2.2.1)
34
33
  ast (~> 2.4.1)
35
- racc
36
34
  pry (0.14.2)
37
35
  coderay (~> 1.1)
38
36
  method_source (~> 1.0)
39
37
  pry-byebug (3.10.1)
40
38
  byebug (~> 11.0)
41
39
  pry (>= 0.13, < 0.15)
42
- psych (5.1.0)
43
- stringio
44
- racc (1.7.1)
45
40
  rainbow (3.1.1)
46
41
  rake (13.0.6)
47
- rdoc (6.5.0)
48
- psych (>= 4.0.0)
49
- regexp_parser (2.8.1)
50
- reline (0.3.8)
42
+ regexp_parser (2.8.0)
43
+ reline (0.3.4)
51
44
  io-console (~> 0.5)
52
- rexml (3.2.6)
45
+ rexml (3.2.5)
53
46
  rspec (3.12.0)
54
47
  rspec-core (~> 3.12.0)
55
48
  rspec-expectations (~> 3.12.0)
@@ -59,10 +52,10 @@ GEM
59
52
  rspec-expectations (3.12.3)
60
53
  diff-lcs (>= 1.2.0, < 2.0)
61
54
  rspec-support (~> 3.12.0)
62
- rspec-mocks (3.12.6)
55
+ rspec-mocks (3.12.5)
63
56
  diff-lcs (>= 1.2.0, < 2.0)
64
57
  rspec-support (~> 3.12.0)
65
- rspec-support (3.12.1)
58
+ rspec-support (3.12.0)
66
59
  rubocop (1.12.1)
67
60
  parallel (~> 1.10)
68
61
  parser (>= 3.0.0.0)
@@ -72,15 +65,14 @@ GEM
72
65
  rubocop-ast (>= 1.2.0, < 2.0)
73
66
  ruby-progressbar (~> 1.7)
74
67
  unicode-display_width (>= 1.4.0, < 3.0)
75
- rubocop-ast (1.29.0)
68
+ rubocop-ast (1.28.1)
76
69
  parser (>= 3.2.1.0)
77
70
  ruby-progressbar (1.13.0)
78
- ruby2_keywords (0.0.5)
79
- stringio (3.0.8)
80
71
  unicode-display_width (2.4.2)
72
+ uri (0.13.0)
81
73
 
82
74
  PLATFORMS
83
- arm64-darwin-22
75
+ arm64-darwin-21
84
76
 
85
77
  DEPENDENCIES
86
78
  debug (~> 1.8)
@@ -91,4 +83,4 @@ DEPENDENCIES
91
83
  snaptrade!
92
84
 
93
85
  BUNDLED WITH
94
- 2.4.19
86
+ 2.3.7
data/README.md CHANGED
@@ -9,7 +9,7 @@ For more information, please visit [https://snaptrade.com/](https://snaptrade.co
9
9
  Add to Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'snaptrade', '~> 1.17.11'
12
+ gem 'snaptrade', '~> 1.17.13'
13
13
  ```
14
14
 
15
15
  ## Getting Started
@@ -216,7 +216,6 @@ Class | Method | HTTP request | Description
216
216
  - [SnapTrade::UnderlyingSymbol](docs/UnderlyingSymbol.md)
217
217
  - [SnapTrade::UniversalActivity](docs/UniversalActivity.md)
218
218
  - [SnapTrade::UniversalSymbol](docs/UniversalSymbol.md)
219
- - [SnapTrade::UniversalSymbolTicker](docs/UniversalSymbolTicker.md)
220
219
  - [SnapTrade::UserErrorLog](docs/UserErrorLog.md)
221
220
  - [SnapTrade::UserIDandSecret](docs/UserIDandSecret.md)
222
221
  - [SnapTrade::UserSettings](docs/UserSettings.md)
@@ -12,6 +12,7 @@
12
12
  | **exchange** | [**Exchange**](Exchange.md) | | [optional] |
13
13
  | **type** | [**SecurityType**](SecurityType.md) | | |
14
14
  | **currencies** | [**Array&lt;Currency&gt;**](Currency.md) | | |
15
+ | **figi_code** | **String** | | [optional] |
15
16
 
16
17
  ## Example
17
18
 
@@ -26,7 +27,8 @@ instance = SnapTrade::BrokerageSymbolSymbol.new(
26
27
  currency: null,
27
28
  exchange: null,
28
29
  type: null,
29
- currencies: null
30
+ currencies: null,
31
+ figi_code: BBG000B9XRY4
30
32
  )
31
33
  ```
32
34
 
@@ -10,9 +10,9 @@
10
10
  | **price** | **Float** | Trade Price if limit or stop limit order | [optional] |
11
11
  | **stop** | **Float** | Stop Price. If stop loss or stop limit order, the price to trigger the stop | [optional] |
12
12
  | **time_in_force** | [**TimeInForce**](TimeInForce.md) | | [optional] |
13
- | **units** | **Float** | Trade Units. Cannot work with notional value. | [optional] |
13
+ | **units** | **Float** | | [optional] |
14
14
  | **universal_symbol_id** | **String** | | [optional] |
15
- | **notional_value** | **Float** | Dollar amount to trade. Cannot work with units. Can only work for market order types and day for time in force. **Only available for Alpaca and Alpaca Paper. Please contact support to get access to place notional trades** | [optional] |
15
+ | **notional_value** | **Float** | | [optional] |
16
16
 
17
17
  ## Example
18
18
 
@@ -28,7 +28,7 @@ instance = SnapTrade::ManualTradeForm.new(
28
28
  time_in_force: null,
29
29
  units: null,
30
30
  universal_symbol_id: 2bcd7cc3-e922-4976-bce1-9858296801c3,
31
- notional_value: 100
31
+ notional_value: null
32
32
  )
33
33
  ```
34
34
 
data/docs/Symbol.md CHANGED
@@ -11,6 +11,7 @@
11
11
  | **currency** | [**Currency**](Currency.md) | | [optional] |
12
12
  | **exchange** | [**Exchange**](Exchange.md) | | [optional] |
13
13
  | **type** | [**SecurityType**](SecurityType.md) | | [optional] |
14
+ | **figi_code** | **String** | | [optional] |
14
15
 
15
16
  ## Example
16
17
 
@@ -24,7 +25,8 @@ instance = SnapTrade::Symbol.new(
24
25
  name: Vanguard Canadian Aggregate Bond Index ETF,
25
26
  currency: null,
26
27
  exchange: null,
27
- type: null
28
+ type: null,
29
+ figi_code: BBG000B9XRY4
28
30
  )
29
31
  ```
30
32
 
data/docs/TradingApi.md CHANGED
@@ -103,7 +103,7 @@ stop = 31.33
103
103
  time_in_force = "Day"
104
104
  units = 3.14
105
105
  universal_symbol_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
106
- notional_value = 100
106
+ notional_value = 3.14
107
107
 
108
108
  begin
109
109
  # Check impact of trades on account.
@@ -141,7 +141,7 @@ stop = 31.33
141
141
  time_in_force = "Day"
142
142
  units = 3.14
143
143
  universal_symbol_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
144
- notional_value = 100
144
+ notional_value = 3.14
145
145
 
146
146
  begin
147
147
  # Check impact of trades on account.
@@ -275,7 +275,7 @@ stop = 31.33
275
275
  time_in_force = "Day"
276
276
  units = 3.14
277
277
  universal_symbol_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
278
- notional_value = 100
278
+ notional_value = 3.14
279
279
 
280
280
  begin
281
281
  # Place a trade with NO validation.
@@ -313,7 +313,7 @@ stop = 31.33
313
313
  time_in_force = "Day"
314
314
  units = 3.14
315
315
  universal_symbol_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
316
- notional_value = 100
316
+ notional_value = 3.14
317
317
 
318
318
  begin
319
319
  # Place a trade with NO validation.
@@ -11,6 +11,7 @@
11
11
  | **exchange** | [**USExchange**](USExchange.md) | | [optional] |
12
12
  | **type** | [**SecurityType**](SecurityType.md) | | [optional] |
13
13
  | **currencies** | [**Array&lt;Currency&gt;**](Currency.md) | | [optional] |
14
+ | **figi_code** | **String** | | [optional] |
14
15
 
15
16
  ## Example
16
17
 
@@ -24,7 +25,8 @@ instance = SnapTrade::UnderlyingSymbol.new(
24
25
  currency: null,
25
26
  exchange: null,
26
27
  type: null,
27
- currencies: null
28
+ currencies: null,
29
+ figi_code: BBG000B9XRY4
28
30
  )
29
31
  ```
30
32
 
@@ -12,6 +12,7 @@
12
12
  | **exchange** | [**Exchange**](Exchange.md) | | [optional] |
13
13
  | **type** | [**SecurityType**](SecurityType.md) | | |
14
14
  | **currencies** | [**Array&lt;Currency&gt;**](Currency.md) | | |
15
+ | **figi_code** | **String** | | [optional] |
15
16
 
16
17
  ## Example
17
18
 
@@ -26,7 +27,8 @@ instance = SnapTrade::UniversalSymbol.new(
26
27
  currency: null,
27
28
  exchange: null,
28
29
  type: null,
29
- currencies: null
30
+ currencies: null,
31
+ figi_code: BBG000B9XRY4
30
32
  )
31
33
  ```
32
34
 
@@ -143,9 +143,9 @@ module SnapTrade
143
143
  # @param price [Float] Trade Price if limit or stop limit order
144
144
  # @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
145
145
  # @param time_in_force [TimeInForce]
146
- # @param units [Float] Trade Units. Cannot work with notional value.
146
+ # @param units [Float]
147
147
  # @param universal_symbol_id [String]
148
- # @param notional_value [Float] Dollar amount to trade. Cannot work with units. Can only work for market order types and day for time in force. **Only available for Alpaca and Alpaca Paper. Please contact support to get access to place notional trades**
148
+ # @param notional_value [Float]
149
149
  # @param body [ManualTradeForm]
150
150
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
151
151
  def get_order_impact(user_id:, user_secret:, account_id: SENTINEL, action: SENTINEL, order_type: SENTINEL, price: SENTINEL, stop: SENTINEL, time_in_force: SENTINEL, units: SENTINEL, universal_symbol_id: SENTINEL, notional_value: SENTINEL, extra: {})
@@ -173,9 +173,9 @@ module SnapTrade
173
173
  # @param price [Float] Trade Price if limit or stop limit order
174
174
  # @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
175
175
  # @param time_in_force [TimeInForce]
176
- # @param units [Float] Trade Units. Cannot work with notional value.
176
+ # @param units [Float]
177
177
  # @param universal_symbol_id [String]
178
- # @param notional_value [Float] Dollar amount to trade. Cannot work with units. Can only work for market order types and day for time in force. **Only available for Alpaca and Alpaca Paper. Please contact support to get access to place notional trades**
178
+ # @param notional_value [Float]
179
179
  # @param body [ManualTradeForm]
180
180
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
181
181
  def get_order_impact_with_http_info(user_id:, user_secret:, account_id: SENTINEL, action: SENTINEL, order_type: SENTINEL, price: SENTINEL, stop: SENTINEL, time_in_force: SENTINEL, units: SENTINEL, universal_symbol_id: SENTINEL, notional_value: SENTINEL, extra: {})
@@ -394,9 +394,9 @@ module SnapTrade
394
394
  # @param price [Float] Trade Price if limit or stop limit order
395
395
  # @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
396
396
  # @param time_in_force [TimeInForce]
397
- # @param units [Float] Trade Units. Cannot work with notional value.
397
+ # @param units [Float]
398
398
  # @param universal_symbol_id [String]
399
- # @param notional_value [Float] Dollar amount to trade. Cannot work with units. Can only work for market order types and day for time in force. **Only available for Alpaca and Alpaca Paper. Please contact support to get access to place notional trades**
399
+ # @param notional_value [Float]
400
400
  # @param body [ManualTradeForm]
401
401
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
402
402
  def place_force_order(user_id:, user_secret:, account_id: SENTINEL, action: SENTINEL, order_type: SENTINEL, price: SENTINEL, stop: SENTINEL, time_in_force: SENTINEL, units: SENTINEL, universal_symbol_id: SENTINEL, notional_value: SENTINEL, extra: {})
@@ -424,9 +424,9 @@ module SnapTrade
424
424
  # @param price [Float] Trade Price if limit or stop limit order
425
425
  # @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
426
426
  # @param time_in_force [TimeInForce]
427
- # @param units [Float] Trade Units. Cannot work with notional value.
427
+ # @param units [Float]
428
428
  # @param universal_symbol_id [String]
429
- # @param notional_value [Float] Dollar amount to trade. Cannot work with units. Can only work for market order types and day for time in force. **Only available for Alpaca and Alpaca Paper. Please contact support to get access to place notional trades**
429
+ # @param notional_value [Float]
430
430
  # @param body [ManualTradeForm]
431
431
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
432
432
  def place_force_order_with_http_info(user_id:, user_secret:, account_id: SENTINEL, action: SENTINEL, order_type: SENTINEL, price: SENTINEL, stop: SENTINEL, time_in_force: SENTINEL, units: SENTINEL, universal_symbol_id: SENTINEL, notional_value: SENTINEL, extra: {})
@@ -29,6 +29,8 @@ module SnapTrade
29
29
 
30
30
  attr_accessor :currencies
31
31
 
32
+ attr_accessor :figi_code
33
+
32
34
  # Attribute mapping from ruby-style variable name to JSON key.
33
35
  def self.attribute_map
34
36
  {
@@ -39,7 +41,8 @@ module SnapTrade
39
41
  :'currency' => :'currency',
40
42
  :'exchange' => :'exchange',
41
43
  :'type' => :'type',
42
- :'currencies' => :'currencies'
44
+ :'currencies' => :'currencies',
45
+ :'figi_code' => :'figi_code'
43
46
  }
44
47
  end
45
48
 
@@ -58,7 +61,8 @@ module SnapTrade
58
61
  :'currency' => :'Currency',
59
62
  :'exchange' => :'Exchange',
60
63
  :'type' => :'SecurityType',
61
- :'currencies' => :'Array<Currency>'
64
+ :'currencies' => :'Array<Currency>',
65
+ :'figi_code' => :'String'
62
66
  }
63
67
  end
64
68
 
@@ -66,6 +70,7 @@ module SnapTrade
66
70
  def self.openapi_nullable
67
71
  Set.new([
68
72
  :'description',
73
+ :'figi_code'
69
74
  ])
70
75
  end
71
76
 
@@ -124,6 +129,10 @@ module SnapTrade
124
129
  self.currencies = value
125
130
  end
126
131
  end
132
+
133
+ if attributes.key?(:'figi_code')
134
+ self.figi_code = attributes[:'figi_code']
135
+ end
127
136
  end
128
137
 
129
138
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -181,7 +190,8 @@ module SnapTrade
181
190
  currency == o.currency &&
182
191
  exchange == o.exchange &&
183
192
  type == o.type &&
184
- currencies == o.currencies
193
+ currencies == o.currencies &&
194
+ figi_code == o.figi_code
185
195
  end
186
196
 
187
197
  # @see the `==` method
@@ -193,7 +203,7 @@ module SnapTrade
193
203
  # Calculates hash code according to all attributes.
194
204
  # @return [Integer] Hash code
195
205
  def hash
196
- [id, symbol, raw_symbol, description, currency, exchange, type, currencies].hash
206
+ [id, symbol, raw_symbol, description, currency, exchange, type, currencies, figi_code].hash
197
207
  end
198
208
 
199
209
  # Builds the object from hash
@@ -28,12 +28,10 @@ module SnapTrade
28
28
 
29
29
  attr_accessor :time_in_force
30
30
 
31
- # Trade Units. Cannot work with notional value.
32
31
  attr_accessor :units
33
32
 
34
33
  attr_accessor :universal_symbol_id
35
34
 
36
- # Dollar amount to trade. Cannot work with units. Can only work for market order types and day for time in force. **Only available for Alpaca and Alpaca Paper. Please contact support to get access to place notional trades**
37
35
  attr_accessor :notional_value
38
36
 
39
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -76,6 +74,7 @@ module SnapTrade
76
74
  Set.new([
77
75
  :'price',
78
76
  :'stop',
77
+ :'units',
79
78
  :'notional_value'
80
79
  ])
81
80
  end
@@ -28,6 +28,8 @@ module SnapTrade
28
28
 
29
29
  attr_accessor :type
30
30
 
31
+ attr_accessor :figi_code
32
+
31
33
  # Attribute mapping from ruby-style variable name to JSON key.
32
34
  def self.attribute_map
33
35
  {
@@ -37,7 +39,8 @@ module SnapTrade
37
39
  :'name' => :'name',
38
40
  :'currency' => :'currency',
39
41
  :'exchange' => :'exchange',
40
- :'type' => :'type'
42
+ :'type' => :'type',
43
+ :'figi_code' => :'figi_code'
41
44
  }
42
45
  end
43
46
 
@@ -55,13 +58,15 @@ module SnapTrade
55
58
  :'name' => :'String',
56
59
  :'currency' => :'Currency',
57
60
  :'exchange' => :'Exchange',
58
- :'type' => :'SecurityType'
61
+ :'type' => :'SecurityType',
62
+ :'figi_code' => :'String'
59
63
  }
60
64
  end
61
65
 
62
66
  # List of attributes with nullable: true
63
67
  def self.openapi_nullable
64
68
  Set.new([
69
+ :'figi_code'
65
70
  ])
66
71
  end
67
72
 
@@ -107,6 +112,10 @@ module SnapTrade
107
112
  if attributes.key?(:'type')
108
113
  self.type = attributes[:'type']
109
114
  end
115
+
116
+ if attributes.key?(:'figi_code')
117
+ self.figi_code = attributes[:'figi_code']
118
+ end
110
119
  end
111
120
 
112
121
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -133,7 +142,8 @@ module SnapTrade
133
142
  name == o.name &&
134
143
  currency == o.currency &&
135
144
  exchange == o.exchange &&
136
- type == o.type
145
+ type == o.type &&
146
+ figi_code == o.figi_code
137
147
  end
138
148
 
139
149
  # @see the `==` method
@@ -145,7 +155,7 @@ module SnapTrade
145
155
  # Calculates hash code according to all attributes.
146
156
  # @return [Integer] Hash code
147
157
  def hash
148
- [id, symbol, raw_symbol, name, currency, exchange, type].hash
158
+ [id, symbol, raw_symbol, name, currency, exchange, type, figi_code].hash
149
159
  end
150
160
 
151
161
  # Builds the object from hash
@@ -28,6 +28,8 @@ module SnapTrade
28
28
 
29
29
  attr_accessor :currencies
30
30
 
31
+ attr_accessor :figi_code
32
+
31
33
  # Attribute mapping from ruby-style variable name to JSON key.
32
34
  def self.attribute_map
33
35
  {
@@ -37,7 +39,8 @@ module SnapTrade
37
39
  :'currency' => :'currency',
38
40
  :'exchange' => :'exchange',
39
41
  :'type' => :'type',
40
- :'currencies' => :'currencies'
42
+ :'currencies' => :'currencies',
43
+ :'figi_code' => :'figi_code'
41
44
  }
42
45
  end
43
46
 
@@ -55,7 +58,8 @@ module SnapTrade
55
58
  :'currency' => :'Currency',
56
59
  :'exchange' => :'USExchange',
57
60
  :'type' => :'SecurityType',
58
- :'currencies' => :'Array<Currency>'
61
+ :'currencies' => :'Array<Currency>',
62
+ :'figi_code' => :'String'
59
63
  }
60
64
  end
61
65
 
@@ -63,6 +67,7 @@ module SnapTrade
63
67
  def self.openapi_nullable
64
68
  Set.new([
65
69
  :'description',
70
+ :'figi_code'
66
71
  ])
67
72
  end
68
73
 
@@ -110,6 +115,10 @@ module SnapTrade
110
115
  self.currencies = value
111
116
  end
112
117
  end
118
+
119
+ if attributes.key?(:'figi_code')
120
+ self.figi_code = attributes[:'figi_code']
121
+ end
113
122
  end
114
123
 
115
124
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -136,7 +145,8 @@ module SnapTrade
136
145
  currency == o.currency &&
137
146
  exchange == o.exchange &&
138
147
  type == o.type &&
139
- currencies == o.currencies
148
+ currencies == o.currencies &&
149
+ figi_code == o.figi_code
140
150
  end
141
151
 
142
152
  # @see the `==` method
@@ -148,7 +158,7 @@ module SnapTrade
148
158
  # Calculates hash code according to all attributes.
149
159
  # @return [Integer] Hash code
150
160
  def hash
151
- [id, symbol, description, currency, exchange, type, currencies].hash
161
+ [id, symbol, description, currency, exchange, type, currencies, figi_code].hash
152
162
  end
153
163
 
154
164
  # Builds the object from hash
@@ -30,6 +30,8 @@ module SnapTrade
30
30
 
31
31
  attr_accessor :currencies
32
32
 
33
+ attr_accessor :figi_code
34
+
33
35
  # Attribute mapping from ruby-style variable name to JSON key.
34
36
  def self.attribute_map
35
37
  {
@@ -40,7 +42,8 @@ module SnapTrade
40
42
  :'currency' => :'currency',
41
43
  :'exchange' => :'exchange',
42
44
  :'type' => :'type',
43
- :'currencies' => :'currencies'
45
+ :'currencies' => :'currencies',
46
+ :'figi_code' => :'figi_code'
44
47
  }
45
48
  end
46
49
 
@@ -59,7 +62,8 @@ module SnapTrade
59
62
  :'currency' => :'Currency',
60
63
  :'exchange' => :'Exchange',
61
64
  :'type' => :'SecurityType',
62
- :'currencies' => :'Array<Currency>'
65
+ :'currencies' => :'Array<Currency>',
66
+ :'figi_code' => :'String'
63
67
  }
64
68
  end
65
69
 
@@ -67,6 +71,7 @@ module SnapTrade
67
71
  def self.openapi_nullable
68
72
  Set.new([
69
73
  :'description',
74
+ :'figi_code'
70
75
  ])
71
76
  end
72
77
 
@@ -118,6 +123,10 @@ module SnapTrade
118
123
  self.currencies = value
119
124
  end
120
125
  end
126
+
127
+ if attributes.key?(:'figi_code')
128
+ self.figi_code = attributes[:'figi_code']
129
+ end
121
130
  end
122
131
 
123
132
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -175,7 +184,8 @@ module SnapTrade
175
184
  currency == o.currency &&
176
185
  exchange == o.exchange &&
177
186
  type == o.type &&
178
- currencies == o.currencies
187
+ currencies == o.currencies &&
188
+ figi_code == o.figi_code
179
189
  end
180
190
 
181
191
  # @see the `==` method
@@ -187,7 +197,7 @@ module SnapTrade
187
197
  # Calculates hash code according to all attributes.
188
198
  # @return [Integer] Hash code
189
199
  def hash
190
- [id, symbol, raw_symbol, description, currency, exchange, type, currencies].hash
200
+ [id, symbol, raw_symbol, description, currency, exchange, type, currencies, figi_code].hash
191
201
  end
192
202
 
193
203
  # Builds the object from hash
@@ -9,5 +9,5 @@ Contact: api@snaptrade.com
9
9
  =end
10
10
 
11
11
  module SnapTrade
12
- VERSION = '1.17.11'
12
+ VERSION = '1.17.13'
13
13
  end
data/lib/snaptrade.rb CHANGED
@@ -143,7 +143,6 @@ require 'snaptrade/models/us_exchange'
143
143
  require 'snaptrade/models/underlying_symbol'
144
144
  require 'snaptrade/models/universal_activity'
145
145
  require 'snaptrade/models/universal_symbol'
146
- require 'snaptrade/models/universal_symbol_ticker'
147
146
  require 'snaptrade/models/user_error_log'
148
147
  require 'snaptrade/models/user_i_dand_secret'
149
148
  require 'snaptrade/models/user_settings'
@@ -69,4 +69,10 @@ describe SnapTrade::BrokerageSymbolSymbol do
69
69
  end
70
70
  end
71
71
 
72
+ describe 'test attribute "figi_code"' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
75
+ end
76
+ end
77
+
72
78
  end
@@ -63,4 +63,10 @@ describe SnapTrade::Symbol do
63
63
  end
64
64
  end
65
65
 
66
+ describe 'test attribute "figi_code"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
66
72
  end
@@ -63,4 +63,10 @@ describe SnapTrade::UnderlyingSymbol do
63
63
  end
64
64
  end
65
65
 
66
+ describe 'test attribute "figi_code"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
66
72
  end
@@ -69,4 +69,10 @@ describe SnapTrade::UniversalSymbol do
69
69
  end
70
70
  end
71
71
 
72
+ describe 'test attribute "figi_code"' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
75
+ end
76
+ end
77
+
72
78
  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.11
4
+ version: 1.17.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-11 00:00:00.000000000 Z
11
+ date: 2024-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -216,7 +216,6 @@ files:
216
216
  - docs/UnderlyingSymbol.md
217
217
  - docs/UniversalActivity.md
218
218
  - docs/UniversalSymbol.md
219
- - docs/UniversalSymbolTicker.md
220
219
  - docs/UserErrorLog.md
221
220
  - docs/UserIDandSecret.md
222
221
  - docs/UserSettings.md
@@ -360,7 +359,6 @@ files:
360
359
  - lib/snaptrade/models/underlying_symbol.rb
361
360
  - lib/snaptrade/models/universal_activity.rb
362
361
  - lib/snaptrade/models/universal_symbol.rb
363
- - lib/snaptrade/models/universal_symbol_ticker.rb
364
362
  - lib/snaptrade/models/us_exchange.rb
365
363
  - lib/snaptrade/models/user_error_log.rb
366
364
  - lib/snaptrade/models/user_i_dand_secret.rb
@@ -504,7 +502,6 @@ files:
504
502
  - spec/models/underlying_symbol_spec.rb
505
503
  - spec/models/universal_activity_spec.rb
506
504
  - spec/models/universal_symbol_spec.rb
507
- - spec/models/universal_symbol_ticker_spec.rb
508
505
  - spec/models/us_exchange_spec.rb
509
506
  - spec/models/user_error_log_spec.rb
510
507
  - spec/models/user_i_dand_secret_spec.rb
@@ -531,7 +528,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
531
528
  - !ruby/object:Gem::Version
532
529
  version: '0'
533
530
  requirements: []
534
- rubygems_version: 3.4.10
531
+ rubygems_version: 3.3.7
535
532
  signing_key:
536
533
  specification_version: 4
537
534
  summary: SnapTrade Ruby Gem
@@ -604,7 +601,6 @@ test_files:
604
601
  - spec/models/manual_trade_balance_spec.rb
605
602
  - spec/models/session_event_spec.rb
606
603
  - spec/models/state_spec.rb
607
- - spec/models/universal_symbol_ticker_spec.rb
608
604
  - spec/models/strategy_order_place_orders_inner_spec.rb
609
605
  - spec/models/connection_type_spec.rb
610
606
  - spec/models/strategy_order_record_status_spec.rb
@@ -1,32 +0,0 @@
1
- # SnapTrade::UniversalSymbolTicker
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | [optional] |
8
- | **symbol** | **String** | | [optional] |
9
- | **raw_symbol** | **String** | | [optional] |
10
- | **description** | **String** | | [optional] |
11
- | **currency** | [**Currency**](Currency.md) | | [optional] |
12
- | **exchange** | [**Exchange**](Exchange.md) | | [optional] |
13
- | **type** | [**SecurityType**](SecurityType.md) | | [optional] |
14
- | **currencies** | [**Array&lt;Currency&gt;**](Currency.md) | | [optional] |
15
-
16
- ## Example
17
-
18
- ```ruby
19
- require 'snaptrade'
20
-
21
- instance = SnapTrade::UniversalSymbolTicker.new(
22
- id: 2bcd7cc3-e922-4976-bce1-9858296801c3,
23
- symbol: VAB.TO,
24
- raw_symbol: VAB,
25
- description: VANGUARD CDN AGGREGATE BOND INDEX ETF,
26
- currency: null,
27
- exchange: null,
28
- type: null,
29
- currencies: null
30
- )
31
- ```
32
-
@@ -1,283 +0,0 @@
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
- # Universal symbol
16
- class UniversalSymbolTicker
17
- attr_accessor :id
18
-
19
- attr_accessor :symbol
20
-
21
- attr_accessor :raw_symbol
22
-
23
- attr_accessor :description
24
-
25
- attr_accessor :currency
26
-
27
- attr_accessor :exchange
28
-
29
- attr_accessor :type
30
-
31
- attr_accessor :currencies
32
-
33
- # Attribute mapping from ruby-style variable name to JSON key.
34
- def self.attribute_map
35
- {
36
- :'id' => :'id',
37
- :'symbol' => :'symbol',
38
- :'raw_symbol' => :'raw_symbol',
39
- :'description' => :'description',
40
- :'currency' => :'currency',
41
- :'exchange' => :'exchange',
42
- :'type' => :'type',
43
- :'currencies' => :'currencies'
44
- }
45
- end
46
-
47
- # Returns all the JSON keys this model knows about
48
- def self.acceptable_attributes
49
- attribute_map.values
50
- end
51
-
52
- # Attribute type mapping.
53
- def self.openapi_types
54
- {
55
- :'id' => :'String',
56
- :'symbol' => :'String',
57
- :'raw_symbol' => :'String',
58
- :'description' => :'String',
59
- :'currency' => :'Currency',
60
- :'exchange' => :'Exchange',
61
- :'type' => :'SecurityType',
62
- :'currencies' => :'Array<Currency>'
63
- }
64
- end
65
-
66
- # List of attributes with nullable: true
67
- def self.openapi_nullable
68
- Set.new([
69
- ])
70
- end
71
-
72
- # Initializes the object
73
- # @param [Hash] attributes Model attributes in the form of hash
74
- def initialize(attributes = {})
75
- if (!attributes.is_a?(Hash))
76
- fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::UniversalSymbolTicker` initialize method"
77
- end
78
-
79
- # check to see if the attribute exists and convert string to symbol for hash key
80
- attributes = attributes.each_with_object({}) { |(k, v), h|
81
- if (!self.class.attribute_map.key?(k.to_sym))
82
- fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::UniversalSymbolTicker`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
- end
84
- h[k.to_sym] = v
85
- }
86
-
87
- if attributes.key?(:'id')
88
- self.id = attributes[:'id']
89
- end
90
-
91
- if attributes.key?(:'symbol')
92
- self.symbol = attributes[:'symbol']
93
- end
94
-
95
- if attributes.key?(:'raw_symbol')
96
- self.raw_symbol = attributes[:'raw_symbol']
97
- end
98
-
99
- if attributes.key?(:'description')
100
- self.description = attributes[:'description']
101
- end
102
-
103
- if attributes.key?(:'currency')
104
- self.currency = attributes[:'currency']
105
- end
106
-
107
- if attributes.key?(:'exchange')
108
- self.exchange = attributes[:'exchange']
109
- end
110
-
111
- if attributes.key?(:'type')
112
- self.type = attributes[:'type']
113
- end
114
-
115
- if attributes.key?(:'currencies')
116
- if (value = attributes[:'currencies']).is_a?(Array)
117
- self.currencies = value
118
- end
119
- end
120
- end
121
-
122
- # Show invalid properties with the reasons. Usually used together with valid?
123
- # @return Array for valid properties with the reasons
124
- def list_invalid_properties
125
- invalid_properties = Array.new
126
- invalid_properties
127
- end
128
-
129
- # Check to see if the all the properties in the model are valid
130
- # @return true if the model is valid
131
- def valid?
132
- true
133
- end
134
-
135
- # Checks equality by comparing each attribute.
136
- # @param [Object] Object to be compared
137
- def ==(o)
138
- return true if self.equal?(o)
139
- self.class == o.class &&
140
- id == o.id &&
141
- symbol == o.symbol &&
142
- raw_symbol == o.raw_symbol &&
143
- description == o.description &&
144
- currency == o.currency &&
145
- exchange == o.exchange &&
146
- type == o.type &&
147
- currencies == o.currencies
148
- end
149
-
150
- # @see the `==` method
151
- # @param [Object] Object to be compared
152
- def eql?(o)
153
- self == o
154
- end
155
-
156
- # Calculates hash code according to all attributes.
157
- # @return [Integer] Hash code
158
- def hash
159
- [id, symbol, raw_symbol, description, currency, exchange, type, currencies].hash
160
- end
161
-
162
- # Builds the object from hash
163
- # @param [Hash] attributes Model attributes in the form of hash
164
- # @return [Object] Returns the model itself
165
- def self.build_from_hash(attributes)
166
- new.build_from_hash(attributes)
167
- end
168
-
169
- # Builds the object from hash
170
- # @param [Hash] attributes Model attributes in the form of hash
171
- # @return [Object] Returns the model itself
172
- def build_from_hash(attributes)
173
- return nil unless attributes.is_a?(Hash)
174
- attributes = attributes.transform_keys(&:to_sym)
175
- self.class.openapi_types.each_pair do |key, type|
176
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
177
- self.send("#{key}=", nil)
178
- elsif type =~ /\AArray<(.*)>/i
179
- # check to ensure the input is an array given that the attribute
180
- # is documented as an array but the input is not
181
- if attributes[self.class.attribute_map[key]].is_a?(Array)
182
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
183
- end
184
- elsif !attributes[self.class.attribute_map[key]].nil?
185
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
186
- end
187
- end
188
-
189
- self
190
- end
191
-
192
- # Deserializes the data based on type
193
- # @param string type Data type
194
- # @param string value Value to be deserialized
195
- # @return [Object] Deserialized data
196
- def _deserialize(type, value)
197
- case type.to_sym
198
- when :Time
199
- Time.parse(value)
200
- when :Date
201
- Date.parse(value)
202
- when :String
203
- value.to_s
204
- when :Integer
205
- value.to_i
206
- when :Float
207
- value.to_f
208
- when :Boolean
209
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
- true
211
- else
212
- false
213
- end
214
- when :Object
215
- # generic object (usually a Hash), return directly
216
- value
217
- when /\AArray<(?<inner_type>.+)>\z/
218
- inner_type = Regexp.last_match[:inner_type]
219
- value.map { |v| _deserialize(inner_type, v) }
220
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
- k_type = Regexp.last_match[:k_type]
222
- v_type = Regexp.last_match[:v_type]
223
- {}.tap do |hash|
224
- value.each do |k, v|
225
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
226
- end
227
- end
228
- else # model
229
- # models (e.g. Pet) or oneOf
230
- klass = SnapTrade.const_get(type)
231
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
232
- end
233
- end
234
-
235
- # Returns the string representation of the object
236
- # @return [String] String presentation of the object
237
- def to_s
238
- to_hash.to_s
239
- end
240
-
241
- # to_body is an alias to to_hash (backward compatibility)
242
- # @return [Hash] Returns the object in the form of hash
243
- def to_body
244
- to_hash
245
- end
246
-
247
- # Returns the object in the form of hash
248
- # @return [Hash] Returns the object in the form of hash
249
- def to_hash
250
- hash = {}
251
- self.class.attribute_map.each_pair do |attr, param|
252
- value = self.send(attr)
253
- if value.nil?
254
- is_nullable = self.class.openapi_nullable.include?(attr)
255
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
256
- end
257
-
258
- hash[param] = _to_hash(value)
259
- end
260
- hash
261
- end
262
-
263
- # Outputs non-array value in the form of hash
264
- # For object, use to_hash. Otherwise, just return the value
265
- # @param [Object] value Any valid value
266
- # @return [Hash] Returns the value in the form of hash
267
- def _to_hash(value)
268
- if value.is_a?(Array)
269
- value.compact.map { |v| _to_hash(v) }
270
- elsif value.is_a?(Hash)
271
- {}.tap do |hash|
272
- value.each { |k, v| hash[k] = _to_hash(v) }
273
- end
274
- elsif value.respond_to? :to_hash
275
- value.to_hash
276
- else
277
- value
278
- end
279
- end
280
-
281
- end
282
-
283
- end
@@ -1,72 +0,0 @@
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::UniversalSymbolTicker
16
- describe SnapTrade::UniversalSymbolTicker do
17
- let(:instance) { SnapTrade::UniversalSymbolTicker.new }
18
-
19
- describe 'test an instance of UniversalSymbolTicker' do
20
- it 'should create an instance of UniversalSymbolTicker' do
21
- expect(instance).to be_instance_of(SnapTrade::UniversalSymbolTicker)
22
- end
23
- end
24
- describe 'test attribute "id"' do
25
- it 'should work' do
26
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
27
- end
28
- end
29
-
30
- describe 'test attribute "symbol"' do
31
- it 'should work' do
32
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
33
- end
34
- end
35
-
36
- describe 'test attribute "raw_symbol"' do
37
- it 'should work' do
38
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
- end
40
- end
41
-
42
- describe 'test attribute "description"' do
43
- it 'should work' do
44
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
- end
46
- end
47
-
48
- describe 'test attribute "currency"' do
49
- it 'should work' do
50
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
- end
52
- end
53
-
54
- describe 'test attribute "exchange"' 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
-
60
- describe 'test attribute "type"' do
61
- it 'should work' do
62
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
- end
64
- end
65
-
66
- describe 'test attribute "currencies"' do
67
- it 'should work' do
68
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
- end
70
- end
71
-
72
- end