snaptrade 1.17.12 → 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: 4e9789f55603bbab4757b768cf14bb1c4f49b1b6cde5c0b0f56389ba8db8eab1
4
- data.tar.gz: 4edfde4d5e8e9732c83cef5417ca8d98dd4c5fafc7f13267e2c823478ca01ddb
3
+ metadata.gz: 975d402b0d373fe2299950d7e6939d1d0a01465ec71fc60c96542394c6214d98
4
+ data.tar.gz: 25f83be291930f060708ddab5753080eefe30736e701d71a06c08d0e46381761
5
5
  SHA512:
6
- metadata.gz: baaab36fde93555803ea8f3a6d6da3a8d6c357341f4509a9f2956d0cade3ea6996a802454ac60a632a81bb0e20ca26edda74093901081037a02be14c25db8fba
7
- data.tar.gz: 7f1962fe3364eba460e44292ba0044b1e99587f66f63425bcb886e84a92e41a1d85ce4cea0fa983d7574baca6a392b83cfe1c869b0e3278f4b303d94788b4c2b
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.12)
4
+ snaptrade (1.17.13)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
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.12'
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
 
@@ -13,7 +13,7 @@
13
13
  require 'snaptrade'
14
14
 
15
15
  instance = SnapTrade::MonthlyDividends.new(
16
- date: Sun Jan 23 16:00:00 PST 2022,
16
+ date: Mon Jan 24 00:00:00 UTC 2022,
17
17
  dividends: null
18
18
  )
19
19
  ```
@@ -14,7 +14,7 @@
14
14
  require 'snaptrade'
15
15
 
16
16
  instance = SnapTrade::NetContributions.new(
17
- date: Sun Jan 23 16:00:00 PST 2022,
17
+ date: Mon Jan 24 00:00:00 UTC 2022,
18
18
  contributions: 524.74,
19
19
  currency: CAD
20
20
  )
data/docs/PastValue.md CHANGED
@@ -14,7 +14,7 @@
14
14
  require 'snaptrade'
15
15
 
16
16
  instance = SnapTrade::PastValue.new(
17
- date: Sun Jan 23 16:00:00 PST 2022,
17
+ date: Mon Jan 24 00:00:00 UTC 2022,
18
18
  value: 52.74,
19
19
  currency: CAD
20
20
  )
@@ -14,8 +14,8 @@
14
14
  require 'snaptrade'
15
15
 
16
16
  instance = SnapTrade::SubPeriodReturnRate.new(
17
- period_start: Sun Jan 23 16:00:00 PST 2022,
18
- period_end: Sun Jan 23 16:00:00 PST 2022,
17
+ period_start: Mon Jan 24 00:00:00 UTC 2022,
18
+ period_end: Mon Jan 24 00:00:00 UTC 2022,
19
19
  rate_of_return: 0.012312367452
20
20
  )
21
21
  ```
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
 
@@ -14,7 +14,7 @@ require 'snaptrade'
14
14
 
15
15
  instance = SnapTrade::TransactionsStatus.new(
16
16
  initial_sync_completed: null,
17
- last_successful_sync: Sun Jan 23 16:00:00 PST 2022
17
+ last_successful_sync: Mon Jan 24 00:00:00 UTC 2022
18
18
  )
19
19
  ```
20
20
 
@@ -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
 
@@ -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,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.12'
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.12
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-16 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
@@ -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