finnhub_ruby 1.1.8 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30d3bc7aee90a7d7aa1679fefc232458e9681cb90240381b21cac6851116f8bb
4
- data.tar.gz: ead3196677192f69af95c29591faef8aa7e63206389d98565bdddd934dd6c9ae
3
+ metadata.gz: e61bc02c6ad4fbcb4354238607808bb403d237028a9ae13e52ec45f652510739
4
+ data.tar.gz: 2a894f9f4786fcd8cf97a1f3a22357945903a224c2b2cb8a81aafd3ff4d34aa8
5
5
  SHA512:
6
- metadata.gz: bb000372cb7719457c08da2f8488ad6d10503eac8fe3851eba71d8f9a3e3a77f35a4623d2d4a65a19a0c28625b4894ea1b62377fe2daf03825fbab959e40584a
7
- data.tar.gz: 00ba23b45e29b9d879be159cdbc355ce48925a185dea9a50c26a5180fa1df839c1480f776bcfcbc511e2f7a19eb885925e2477fabf398cf748150abb51af26d6
6
+ metadata.gz: 4aa8ab5823abb0dfbfe9958da04514bdbe7d75c53dd95b8ad07664a63aa7ac66f594b9fcd6b74c6d89fbd0e31430f5c5d0bbe90bbe1c5d07c130e16e8615d79d
7
+ data.tar.gz: ebe8c18cbedbbcc0c88ab6b85dca6419bb893cdcf58c166e73e3fea2b23c3330a1b487a74c6047e2c3c9f60aab6e6bc2b3573418260ce87fc54e2e24d1878570
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # finnhub-ruby
2
2
  - API documentation: https://finnhub.io/docs/api
3
3
  - API version: 1.0.0
4
- - Package version: 1.1.8
4
+ - Package version: 1.1.9
5
5
 
6
6
  ## Installation
7
7
  https://rubygems.org/gems/finnhub_ruby
@@ -13,7 +13,7 @@ gem install finnhub_ruby
13
13
  or in your Gemfile
14
14
 
15
15
  ```ruby
16
- gem 'finnhub_ruby', '~> 1.1.8'
16
+ gem 'finnhub_ruby', '~> 1.1.9'
17
17
  ```
18
18
 
19
19
  ## Getting Started
@@ -187,7 +187,7 @@ puts(finnhub_client.forex_candles('OANDA:EUR_USD', 'D', 1590988249, 1591852249))
187
187
  puts(finnhub_client.crypto_candles('BINANCE:BTCUSDT', 'D', 1590988249, 1591852249))
188
188
 
189
189
  # Technical Indicator
190
- puts(finnhub_client.technical_indicator("AAPL", 'D', 1583098857, 1584308457, 'rsi', {"timeperiod": 3}))
190
+ puts(finnhub_client.technical_indicator("AAPL", 'D', 1583098857, 1584308457, 'rsi', {indicator_fields:{'timeperiod': 3}}))
191
191
 
192
192
  # Indices Constituents
193
193
  puts(finnhub_client.indices_constituents("^GSPC"))
@@ -240,6 +240,9 @@ puts(finnhub_client.fda_committee_meeting_calendar())
240
240
  # Company ESG
241
241
  puts(finnhub_client.company_esg_score('AAPL'))
242
242
 
243
+ # Company Earnings Quality
244
+ puts(finnhub_client.company_earnings_quality_score('AAPL', 'quarterly'))
245
+
243
246
  ```
244
247
 
245
248
  ## License
data/docs/CompanyESG.md CHANGED
@@ -6,9 +6,9 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **symbol** | **String** | symbol | [optional] |
8
8
  | **total_esg_score** | **Float** | Total ESG Score | [optional] |
9
- | **environment_score** | **Float** | symbol | [optional] |
10
- | **governance_score** | **Float** | symbol | [optional] |
11
- | **social_score** | **Float** | symbol | [optional] |
9
+ | **environment_score** | **Float** | Environment Score | [optional] |
10
+ | **governance_score** | **Float** | Governance Score | [optional] |
11
+ | **social_score** | **Float** | Social Score | [optional] |
12
12
  | **data** | **Object** | | [optional] |
13
13
 
14
14
  ## Example
@@ -0,0 +1,22 @@
1
+ # FinnhubRuby::CompanyEarningsQualityScore
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **symbol** | **String** | Symbol | [optional] |
8
+ | **freq** | **String** | Frequency | [optional] |
9
+ | **data** | [**Array<CompanyEarningsQualityScoreData>**](CompanyEarningsQualityScoreData.md) | Array of earnings quality score. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'finnhub_ruby'
15
+
16
+ instance = FinnhubRuby::CompanyEarningsQualityScore.new(
17
+ symbol: null,
18
+ freq: null,
19
+ data: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,30 @@
1
+ # FinnhubRuby::CompanyEarningsQualityScoreData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **period** | **String** | Period | [optional] |
8
+ | **growth** | **Float** | Growth Score | [optional] |
9
+ | **profitability** | **Float** | Profitability Score | [optional] |
10
+ | **cash_generation_capital_allocation** | **Float** | Cash Generation and Capital Allocation | [optional] |
11
+ | **leverage** | **Float** | Leverage Score | [optional] |
12
+ | **score** | **Float** | Total Score | [optional] |
13
+ | **letter_score** | **String** | Letter Score | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'finnhub_ruby'
19
+
20
+ instance = FinnhubRuby::CompanyEarningsQualityScoreData.new(
21
+ period: null,
22
+ growth: null,
23
+ profitability: null,
24
+ cash_generation_capital_allocation: null,
25
+ leverage: null,
26
+ score: null,
27
+ letter_score: null
28
+ )
29
+ ```
30
+
@@ -12,10 +12,10 @@
12
12
  | **sedol** | **String** | Sedol number. | [optional] |
13
13
  | **description** | **String** | Company business summary. | [optional] |
14
14
  | **exchange** | **String** | Listed exchange. | [optional] |
15
- | **ggroup** | **String** | GICS industry group. | [optional] |
16
- | **gind** | **String** | GICS industry. | [optional] |
17
- | **gsector** | **String** | GICS sector. | [optional] |
18
- | **gsubind** | **String** | GICS sub-industry. | [optional] |
15
+ | **ggroup** | **String** | Industry group. | [optional] |
16
+ | **gind** | **String** | Industry. | [optional] |
17
+ | **gsector** | **String** | Sector. | [optional] |
18
+ | **gsubind** | **String** | Sub-industry. | [optional] |
19
19
  | **isin** | **String** | ISIN number. | [optional] |
20
20
  | **naics_national_industry** | **String** | NAICS national industry. | [optional] |
21
21
  | **naics** | **String** | NAICS industry. | [optional] |
@@ -10,6 +10,8 @@
10
10
  | **code_no** | **String** | UN code | [optional] |
11
11
  | **currency** | **String** | Currency name | [optional] |
12
12
  | **currency_code** | **String** | Currency code | [optional] |
13
+ | **region** | **String** | Region | [optional] |
14
+ | **sub_region** | **String** | Sub-Region | [optional] |
13
15
 
14
16
  ## Example
15
17
 
@@ -22,7 +24,9 @@ instance = FinnhubRuby::CountryMetadata.new(
22
24
  code3: null,
23
25
  code_no: null,
24
26
  currency: null,
25
- currency_code: null
27
+ currency_code: null,
28
+ region: null,
29
+ sub_region: null
26
30
  )
27
31
  ```
28
32
 
data/docs/DefaultApi.md CHANGED
@@ -7,6 +7,7 @@ All URIs are relative to *https://finnhub.io/api/v1*
7
7
  | [**aggregate_indicator**](DefaultApi.md#aggregate_indicator) | **GET** /scan/technical-indicator | Aggregate Indicators |
8
8
  | [**company_basic_financials**](DefaultApi.md#company_basic_financials) | **GET** /stock/metric | Basic Financials |
9
9
  | [**company_earnings**](DefaultApi.md#company_earnings) | **GET** /stock/earnings | Earnings Surprises |
10
+ | [**company_earnings_quality_score**](DefaultApi.md#company_earnings_quality_score) | **GET** /stock/earnings-quality-score | Company Earnings Quality Score |
10
11
  | [**company_eps_estimates**](DefaultApi.md#company_eps_estimates) | **GET** /stock/eps-estimate | Earnings Estimates |
11
12
  | [**company_esg_score**](DefaultApi.md#company_esg_score) | **GET** /stock/esg | Company ESG Scores |
12
13
  | [**company_executive**](DefaultApi.md#company_executive) | **GET** /stock/executive | Company Executive |
@@ -297,6 +298,79 @@ end
297
298
  - **Accept**: application/json
298
299
 
299
300
 
301
+ ## company_earnings_quality_score
302
+
303
+ > <CompanyEarningsQualityScore> company_earnings_quality_score(symbol, freq)
304
+
305
+ Company Earnings Quality Score
306
+
307
+ <p>This endpoint provides Earnings Quality Score for global companies.</p><p> Earnings quality refers to the extent to which current earnings predict future earnings. \"High-quality\" earnings are expected to persist, while \"low-quality\" earnings do not. A higher score means a higher earnings quality</p><p>Finnhub uses a proprietary model which takes into consideration 4 criteria:</p> <ul style=\"list-style-type: unset; margin-left: 30px;\"><li>Profitability</li><li>Growth</li><li>Cash Generation & Capital Allocation</li><li>Leverage</li></ul><br/><p>We then compare the metrics of each company in each category against its peers in the same industry to gauge how quality its earnings is.</p>
308
+
309
+ ### Examples
310
+
311
+ ```ruby
312
+ require 'time'
313
+ require 'finnhub_ruby'
314
+ # setup authorization
315
+ FinnhubRuby.configure do |config|
316
+ # Configure API key authorization: api_key
317
+ config.api_key['api_key'] = 'YOUR API KEY'
318
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
319
+ # config.api_key_prefix['api_key'] = 'Bearer'
320
+ end
321
+
322
+ api_instance = FinnhubRuby::DefaultApi.new
323
+ symbol = 'symbol_example' # String | Symbol.
324
+ freq = 'freq_example' # String | Frequency. Currently only support <code>quarterly</code>
325
+
326
+ begin
327
+ # Company Earnings Quality Score
328
+ result = api_instance.company_earnings_quality_score(symbol, freq)
329
+ p result
330
+ rescue FinnhubRuby::ApiError => e
331
+ puts "Error when calling DefaultApi->company_earnings_quality_score: #{e}"
332
+ end
333
+ ```
334
+
335
+ #### Using the company_earnings_quality_score_with_http_info variant
336
+
337
+ This returns an Array which contains the response data, status code and headers.
338
+
339
+ > <Array(<CompanyEarningsQualityScore>, Integer, Hash)> company_earnings_quality_score_with_http_info(symbol, freq)
340
+
341
+ ```ruby
342
+ begin
343
+ # Company Earnings Quality Score
344
+ data, status_code, headers = api_instance.company_earnings_quality_score_with_http_info(symbol, freq)
345
+ p status_code # => 2xx
346
+ p headers # => { ... }
347
+ p data # => <CompanyEarningsQualityScore>
348
+ rescue FinnhubRuby::ApiError => e
349
+ puts "Error when calling DefaultApi->company_earnings_quality_score_with_http_info: #{e}"
350
+ end
351
+ ```
352
+
353
+ ### Parameters
354
+
355
+ | Name | Type | Description | Notes |
356
+ | ---- | ---- | ----------- | ----- |
357
+ | **symbol** | **String** | Symbol. | |
358
+ | **freq** | **String** | Frequency. Currently only support &lt;code&gt;quarterly&lt;/code&gt; | |
359
+
360
+ ### Return type
361
+
362
+ [**CompanyEarningsQualityScore**](CompanyEarningsQualityScore.md)
363
+
364
+ ### Authorization
365
+
366
+ [api_key](../README.md#api_key)
367
+
368
+ ### HTTP request headers
369
+
370
+ - **Content-Type**: Not defined
371
+ - **Accept**: application/json
372
+
373
+
300
374
  ## company_eps_estimates
301
375
 
302
376
  > <EarningsEstimates> company_eps_estimates(symbol, opts)
@@ -595,7 +669,7 @@ end
595
669
 
596
670
  Peers
597
671
 
598
- Get company peers. Return a list of peers in the same country and GICS sub-industry
672
+ Get company peers. Return a list of peers in the same country and sub-industry
599
673
 
600
674
  ### Examples
601
675
 
@@ -4637,7 +4711,7 @@ end
4637
4711
 
4638
4712
  Tick Data
4639
4713
 
4640
- <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><p>Note that for Nasdaq Nordic and Baltic, you need to use ISIN instead of symbol to query tick data. </p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Nasdaq Nordic & Baltic</th> <td> <ul> <li>Copenhagen (CO)</li> <li>Stockholm (ST)</li> <li>Helsinki (HE)</li> <li>Iceland (IC)</li> <li>Riga (RG)</li> <li>Tallinn (TL)</li> <li>Vilnius(VS)</li> <li>Fixed Income</li> <li>Derivatives</li> <li>Commodities</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
4714
+ <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Nasdaq Nordic & Baltic</th> <td> <ul> <li>Copenhagen (CO)</li> <li>Stockholm (ST)</li> <li>Helsinki (HE)</li> <li>Iceland (IC)</li> <li>Riga (RG)</li> <li>Tallinn (TL)</li> <li>Vilnius(VS)</li> <li>Fixed Income</li> <li>Derivatives</li> <li>Commodities</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
4641
4715
 
4642
4716
  ### Examples
4643
4717
 
Binary file
@@ -228,6 +228,77 @@ module FinnhubRuby
228
228
  return data, status_code, headers
229
229
  end
230
230
 
231
+ # Company Earnings Quality Score
232
+ # <p>This endpoint provides Earnings Quality Score for global companies.</p><p> Earnings quality refers to the extent to which current earnings predict future earnings. \"High-quality\" earnings are expected to persist, while \"low-quality\" earnings do not. A higher score means a higher earnings quality</p><p>Finnhub uses a proprietary model which takes into consideration 4 criteria:</p> <ul style=\"list-style-type: unset; margin-left: 30px;\"><li>Profitability</li><li>Growth</li><li>Cash Generation & Capital Allocation</li><li>Leverage</li></ul><br/><p>We then compare the metrics of each company in each category against its peers in the same industry to gauge how quality its earnings is.</p>
233
+ # @param symbol [String] Symbol.
234
+ # @param freq [String] Frequency. Currently only support &lt;code&gt;quarterly&lt;/code&gt;
235
+ # @param [Hash] opts the optional parameters
236
+ # @return [CompanyEarningsQualityScore]
237
+ def company_earnings_quality_score(symbol, freq, opts = {})
238
+ data, _status_code, _headers = company_earnings_quality_score_with_http_info(symbol, freq, opts)
239
+ data
240
+ end
241
+
242
+ # Company Earnings Quality Score
243
+ # &lt;p&gt;This endpoint provides Earnings Quality Score for global companies.&lt;/p&gt;&lt;p&gt; Earnings quality refers to the extent to which current earnings predict future earnings. \&quot;High-quality\&quot; earnings are expected to persist, while \&quot;low-quality\&quot; earnings do not. A higher score means a higher earnings quality&lt;/p&gt;&lt;p&gt;Finnhub uses a proprietary model which takes into consideration 4 criteria:&lt;/p&gt; &lt;ul style&#x3D;\&quot;list-style-type: unset; margin-left: 30px;\&quot;&gt;&lt;li&gt;Profitability&lt;/li&gt;&lt;li&gt;Growth&lt;/li&gt;&lt;li&gt;Cash Generation &amp; Capital Allocation&lt;/li&gt;&lt;li&gt;Leverage&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;&lt;p&gt;We then compare the metrics of each company in each category against its peers in the same industry to gauge how quality its earnings is.&lt;/p&gt;
244
+ # @param symbol [String] Symbol.
245
+ # @param freq [String] Frequency. Currently only support &lt;code&gt;quarterly&lt;/code&gt;
246
+ # @param [Hash] opts the optional parameters
247
+ # @return [Array<(CompanyEarningsQualityScore, Integer, Hash)>] CompanyEarningsQualityScore data, response status code and response headers
248
+ def company_earnings_quality_score_with_http_info(symbol, freq, opts = {})
249
+ if @api_client.config.debugging
250
+ @api_client.config.logger.debug 'Calling API: DefaultApi.company_earnings_quality_score ...'
251
+ end
252
+ # verify the required parameter 'symbol' is set
253
+ if @api_client.config.client_side_validation && symbol.nil?
254
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_earnings_quality_score"
255
+ end
256
+ # verify the required parameter 'freq' is set
257
+ if @api_client.config.client_side_validation && freq.nil?
258
+ fail ArgumentError, "Missing the required parameter 'freq' when calling DefaultApi.company_earnings_quality_score"
259
+ end
260
+ # resource path
261
+ local_var_path = '/stock/earnings-quality-score'
262
+
263
+ # query parameters
264
+ query_params = opts[:query_params] || {}
265
+ query_params[:'symbol'] = symbol
266
+ query_params[:'freq'] = freq
267
+
268
+ # header parameters
269
+ header_params = opts[:header_params] || {}
270
+ # HTTP header 'Accept' (if needed)
271
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
272
+
273
+ # form parameters
274
+ form_params = opts[:form_params] || {}
275
+
276
+ # http body (model)
277
+ post_body = opts[:debug_body]
278
+
279
+ # return_type
280
+ return_type = opts[:debug_return_type] || 'CompanyEarningsQualityScore'
281
+
282
+ # auth_names
283
+ auth_names = opts[:debug_auth_names] || ['api_key']
284
+
285
+ new_options = opts.merge(
286
+ :operation => :"DefaultApi.company_earnings_quality_score",
287
+ :header_params => header_params,
288
+ :query_params => query_params,
289
+ :form_params => form_params,
290
+ :body => post_body,
291
+ :auth_names => auth_names,
292
+ :return_type => return_type
293
+ )
294
+
295
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug "API called: DefaultApi#company_earnings_quality_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
298
+ end
299
+ return data, status_code, headers
300
+ end
301
+
231
302
  # Earnings Estimates
232
303
  # Get company's EPS estimates.
233
304
  # @param symbol [String] Symbol of the company: AAPL.
@@ -502,7 +573,7 @@ module FinnhubRuby
502
573
  end
503
574
 
504
575
  # Peers
505
- # Get company peers. Return a list of peers in the same country and GICS sub-industry
576
+ # Get company peers. Return a list of peers in the same country and sub-industry
506
577
  # @param symbol [String] Symbol of the company: AAPL.
507
578
  # @param [Hash] opts the optional parameters
508
579
  # @return [Array<String>]
@@ -512,7 +583,7 @@ module FinnhubRuby
512
583
  end
513
584
 
514
585
  # Peers
515
- # Get company peers. Return a list of peers in the same country and GICS sub-industry
586
+ # Get company peers. Return a list of peers in the same country and sub-industry
516
587
  # @param symbol [String] Symbol of the company: AAPL.
517
588
  # @param [Hash] opts the optional parameters
518
589
  # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
@@ -4175,7 +4246,7 @@ module FinnhubRuby
4175
4246
  end
4176
4247
 
4177
4248
  # Tick Data
4178
- # <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><p>Note that for Nasdaq Nordic and Baltic, you need to use ISIN instead of symbol to query tick data. </p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Nasdaq Nordic & Baltic</th> <td> <ul> <li>Copenhagen (CO)</li> <li>Stockholm (ST)</li> <li>Helsinki (HE)</li> <li>Iceland (IC)</li> <li>Riga (RG)</li> <li>Tallinn (TL)</li> <li>Vilnius(VS)</li> <li>Fixed Income</li> <li>Derivatives</li> <li>Commodities</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
4249
+ # <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Nasdaq Nordic & Baltic</th> <td> <ul> <li>Copenhagen (CO)</li> <li>Stockholm (ST)</li> <li>Helsinki (HE)</li> <li>Iceland (IC)</li> <li>Riga (RG)</li> <li>Tallinn (TL)</li> <li>Vilnius(VS)</li> <li>Fixed Income</li> <li>Derivatives</li> <li>Commodities</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
4179
4250
  # @param symbol [String] Symbol.
4180
4251
  # @param date [Date] Date: 2020-04-02.
4181
4252
  # @param limit [Integer] Limit number of ticks returned. Maximum value: &lt;code&gt;25000&lt;/code&gt;
@@ -4188,7 +4259,7 @@ module FinnhubRuby
4188
4259
  end
4189
4260
 
4190
4261
  # Tick Data
4191
- # &lt;p&gt;Get historical tick data for global exchanges. You can send the request directly to our tick server at &lt;a href&#x3D;\&quot;https://tick.finnhub.io/\&quot;&gt;https://tick.finnhub.io/&lt;/a&gt; with the same path and parameters or get redirected there if you call our main server.&lt;/p&gt;&lt;p&gt;For US market, you can visit our bulk download page in the Dashboard &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;/dashboard/download\&quot;,&gt;here&lt;/a&gt; to speed up the download process.&lt;/p&gt;&lt;p&gt;Note that for Nasdaq Nordic and Baltic, you need to use ISIN instead of symbol to query tick data. &lt;/p&gt;&lt;table class&#x3D;\&quot;table table-hover\&quot;&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Exchange&lt;/th&gt; &lt;th&gt;Segment&lt;/th&gt; &lt;th&gt;Delay&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;US CTA/UTP&lt;/th&gt; &lt;td&gt;Full SIP&lt;/td&gt; &lt;td&gt;15 minute&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;TSX&lt;/th&gt; &lt;td&gt;&lt;ul&gt;&lt;li&gt;TSX&lt;/li&gt;&lt;li&gt;TSX Venture&lt;/li&gt;&lt;li&gt;Index&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;LSE&lt;/th&gt; &lt;td&gt;&lt;ul&gt;&lt;li&gt;London Stock Exchange (L)&lt;/li&gt;&lt;li&gt;LSE International (L)&lt;/li&gt;&lt;li&gt;LSE European (L)&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;15 minute&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;Euronext&lt;/th&gt; &lt;td&gt;&lt;ul&gt; &lt;li&gt;Euronext Paris (PA)&lt;/li&gt; &lt;li&gt;Euronext Amsterdam (AS)&lt;/li&gt; &lt;li&gt;Euronext Lisbon (LS)&lt;/li&gt; &lt;li&gt;Euronext Brussels (BR)&lt;/li&gt; &lt;li&gt;Euronext Oslo (OL)&lt;/li&gt; &lt;li&gt;Euronext London (LN)&lt;/li&gt; &lt;li&gt;Euronext Dublin (IR)&lt;/li&gt; &lt;li&gt;Index&lt;/li&gt; &lt;li&gt;Warrant&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;Deutsche Börse&lt;/th&gt; &lt;td&gt;&lt;ul&gt; &lt;li&gt;Frankfurt (F)&lt;/li&gt; &lt;li&gt;Xetra (DE)&lt;/li&gt; &lt;li&gt;Duesseldorf (DU)&lt;/li&gt; &lt;li&gt;Hamburg (HM)&lt;/li&gt; &lt;li&gt;Berlin (BE)&lt;/li&gt; &lt;li&gt;Hanover (HA)&lt;/li&gt; &lt;li&gt;Stoxx (SX)&lt;/li&gt; &lt;li&gt;TradeGate (TG)&lt;/li&gt; &lt;li&gt;Zertifikate (SC)&lt;/li&gt; &lt;li&gt;Index&lt;/li&gt; &lt;li&gt;Warrant&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;Nasdaq Nordic &amp; Baltic&lt;/th&gt; &lt;td&gt; &lt;ul&gt; &lt;li&gt;Copenhagen (CO)&lt;/li&gt; &lt;li&gt;Stockholm (ST)&lt;/li&gt; &lt;li&gt;Helsinki (HE)&lt;/li&gt; &lt;li&gt;Iceland (IC)&lt;/li&gt; &lt;li&gt;Riga (RG)&lt;/li&gt; &lt;li&gt;Tallinn (TL)&lt;/li&gt; &lt;li&gt;Vilnius(VS)&lt;/li&gt; &lt;li&gt;Fixed Income&lt;/li&gt; &lt;li&gt;Derivatives&lt;/li&gt; &lt;li&gt;Commodities&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
4262
+ # &lt;p&gt;Get historical tick data for global exchanges. You can send the request directly to our tick server at &lt;a href&#x3D;\&quot;https://tick.finnhub.io/\&quot;&gt;https://tick.finnhub.io/&lt;/a&gt; with the same path and parameters or get redirected there if you call our main server.&lt;/p&gt;&lt;p&gt;For US market, you can visit our bulk download page in the Dashboard &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;/dashboard/download\&quot;,&gt;here&lt;/a&gt; to speed up the download process.&lt;/p&gt;&lt;table class&#x3D;\&quot;table table-hover\&quot;&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Exchange&lt;/th&gt; &lt;th&gt;Segment&lt;/th&gt; &lt;th&gt;Delay&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;US CTA/UTP&lt;/th&gt; &lt;td&gt;Full SIP&lt;/td&gt; &lt;td&gt;15 minute&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;TSX&lt;/th&gt; &lt;td&gt;&lt;ul&gt;&lt;li&gt;TSX&lt;/li&gt;&lt;li&gt;TSX Venture&lt;/li&gt;&lt;li&gt;Index&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;LSE&lt;/th&gt; &lt;td&gt;&lt;ul&gt;&lt;li&gt;London Stock Exchange (L)&lt;/li&gt;&lt;li&gt;LSE International (L)&lt;/li&gt;&lt;li&gt;LSE European (L)&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;15 minute&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;Euronext&lt;/th&gt; &lt;td&gt;&lt;ul&gt; &lt;li&gt;Euronext Paris (PA)&lt;/li&gt; &lt;li&gt;Euronext Amsterdam (AS)&lt;/li&gt; &lt;li&gt;Euronext Lisbon (LS)&lt;/li&gt; &lt;li&gt;Euronext Brussels (BR)&lt;/li&gt; &lt;li&gt;Euronext Oslo (OL)&lt;/li&gt; &lt;li&gt;Euronext London (LN)&lt;/li&gt; &lt;li&gt;Euronext Dublin (IR)&lt;/li&gt; &lt;li&gt;Index&lt;/li&gt; &lt;li&gt;Warrant&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;Deutsche Börse&lt;/th&gt; &lt;td&gt;&lt;ul&gt; &lt;li&gt;Frankfurt (F)&lt;/li&gt; &lt;li&gt;Xetra (DE)&lt;/li&gt; &lt;li&gt;Duesseldorf (DU)&lt;/li&gt; &lt;li&gt;Hamburg (HM)&lt;/li&gt; &lt;li&gt;Berlin (BE)&lt;/li&gt; &lt;li&gt;Hanover (HA)&lt;/li&gt; &lt;li&gt;Stoxx (SX)&lt;/li&gt; &lt;li&gt;TradeGate (TG)&lt;/li&gt; &lt;li&gt;Zertifikate (SC)&lt;/li&gt; &lt;li&gt;Index&lt;/li&gt; &lt;li&gt;Warrant&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;Nasdaq Nordic &amp; Baltic&lt;/th&gt; &lt;td&gt; &lt;ul&gt; &lt;li&gt;Copenhagen (CO)&lt;/li&gt; &lt;li&gt;Stockholm (ST)&lt;/li&gt; &lt;li&gt;Helsinki (HE)&lt;/li&gt; &lt;li&gt;Iceland (IC)&lt;/li&gt; &lt;li&gt;Riga (RG)&lt;/li&gt; &lt;li&gt;Tallinn (TL)&lt;/li&gt; &lt;li&gt;Vilnius(VS)&lt;/li&gt; &lt;li&gt;Fixed Income&lt;/li&gt; &lt;li&gt;Derivatives&lt;/li&gt; &lt;li&gt;Commodities&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
4192
4263
  # @param symbol [String] Symbol.
4193
4264
  # @param date [Date] Date: 2020-04-02.
4194
4265
  # @param limit [Integer] Limit number of ticks returned. Maximum value: &lt;code&gt;25000&lt;/code&gt;
@@ -0,0 +1,241 @@
1
+ =begin
2
+ #Finnhub API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FinnhubRuby
17
+ class CompanyEarningsQualityScore
18
+ # Symbol
19
+ attr_accessor :symbol
20
+
21
+ # Frequency
22
+ attr_accessor :freq
23
+
24
+ # Array of earnings quality score.
25
+ attr_accessor :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'symbol' => :'symbol',
31
+ :'freq' => :'freq',
32
+ :'data' => :'data'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'symbol' => :'String',
45
+ :'freq' => :'String',
46
+ :'data' => :'Array<CompanyEarningsQualityScoreData>'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FinnhubRuby::CompanyEarningsQualityScore` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FinnhubRuby::CompanyEarningsQualityScore`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'symbol')
72
+ self.symbol = attributes[:'symbol']
73
+ end
74
+
75
+ if attributes.key?(:'freq')
76
+ self.freq = attributes[:'freq']
77
+ end
78
+
79
+ if attributes.key?(:'data')
80
+ if (value = attributes[:'data']).is_a?(Array)
81
+ self.data = value
82
+ end
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ symbol == o.symbol &&
105
+ freq == o.freq &&
106
+ data == o.data
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Integer] Hash code
117
+ def hash
118
+ [symbol, freq, data].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def self.build_from_hash(attributes)
125
+ new.build_from_hash(attributes)
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ self.class.openapi_types.each_pair do |key, type|
134
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
135
+ self.send("#{key}=", nil)
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ end
142
+ elsif !attributes[self.class.attribute_map[key]].nil?
143
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ end
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :Time
157
+ Time.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ # models (e.g. Pet) or oneOf
188
+ klass = FinnhubRuby.const_get(type)
189
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ # Returns the string representation of the object
194
+ # @return [String] String presentation of the object
195
+ def to_s
196
+ to_hash.to_s
197
+ end
198
+
199
+ # to_body is an alias to to_hash (backward compatibility)
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_body
202
+ to_hash
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -0,0 +1,279 @@
1
+ =begin
2
+ #Finnhub API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FinnhubRuby
17
+ class CompanyEarningsQualityScoreData
18
+ # Period
19
+ attr_accessor :period
20
+
21
+ # Growth Score
22
+ attr_accessor :growth
23
+
24
+ # Profitability Score
25
+ attr_accessor :profitability
26
+
27
+ # Cash Generation and Capital Allocation
28
+ attr_accessor :cash_generation_capital_allocation
29
+
30
+ # Leverage Score
31
+ attr_accessor :leverage
32
+
33
+ # Total Score
34
+ attr_accessor :score
35
+
36
+ # Letter Score
37
+ attr_accessor :letter_score
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'period' => :'period',
43
+ :'growth' => :'growth',
44
+ :'profitability' => :'profitability',
45
+ :'cash_generation_capital_allocation' => :'cashGenerationCapitalAllocation',
46
+ :'leverage' => :'leverage',
47
+ :'score' => :'score',
48
+ :'letter_score' => :'letterScore'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'period' => :'String',
61
+ :'growth' => :'Float',
62
+ :'profitability' => :'Float',
63
+ :'cash_generation_capital_allocation' => :'Float',
64
+ :'leverage' => :'Float',
65
+ :'score' => :'Float',
66
+ :'letter_score' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FinnhubRuby::CompanyEarningsQualityScoreData` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FinnhubRuby::CompanyEarningsQualityScoreData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'period')
92
+ self.period = attributes[:'period']
93
+ end
94
+
95
+ if attributes.key?(:'growth')
96
+ self.growth = attributes[:'growth']
97
+ end
98
+
99
+ if attributes.key?(:'profitability')
100
+ self.profitability = attributes[:'profitability']
101
+ end
102
+
103
+ if attributes.key?(:'cash_generation_capital_allocation')
104
+ self.cash_generation_capital_allocation = attributes[:'cash_generation_capital_allocation']
105
+ end
106
+
107
+ if attributes.key?(:'leverage')
108
+ self.leverage = attributes[:'leverage']
109
+ end
110
+
111
+ if attributes.key?(:'score')
112
+ self.score = attributes[:'score']
113
+ end
114
+
115
+ if attributes.key?(:'letter_score')
116
+ self.letter_score = attributes[:'letter_score']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ period == o.period &&
139
+ growth == o.growth &&
140
+ profitability == o.profitability &&
141
+ cash_generation_capital_allocation == o.cash_generation_capital_allocation &&
142
+ leverage == o.leverage &&
143
+ score == o.score &&
144
+ letter_score == o.letter_score
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [period, growth, profitability, cash_generation_capital_allocation, leverage, score, letter_score].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ new.build_from_hash(attributes)
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def build_from_hash(attributes)
170
+ return nil unless attributes.is_a?(Hash)
171
+ self.class.openapi_types.each_pair do |key, type|
172
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
173
+ self.send("#{key}=", nil)
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
178
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
179
+ end
180
+ elsif !attributes[self.class.attribute_map[key]].nil?
181
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
182
+ end
183
+ end
184
+
185
+ self
186
+ end
187
+
188
+ # Deserializes the data based on type
189
+ # @param string type Data type
190
+ # @param string value Value to be deserialized
191
+ # @return [Object] Deserialized data
192
+ def _deserialize(type, value)
193
+ case type.to_sym
194
+ when :Time
195
+ Time.parse(value)
196
+ when :Date
197
+ Date.parse(value)
198
+ when :String
199
+ value.to_s
200
+ when :Integer
201
+ value.to_i
202
+ when :Float
203
+ value.to_f
204
+ when :Boolean
205
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
206
+ true
207
+ else
208
+ false
209
+ end
210
+ when :Object
211
+ # generic object (usually a Hash), return directly
212
+ value
213
+ when /\AArray<(?<inner_type>.+)>\z/
214
+ inner_type = Regexp.last_match[:inner_type]
215
+ value.map { |v| _deserialize(inner_type, v) }
216
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
217
+ k_type = Regexp.last_match[:k_type]
218
+ v_type = Regexp.last_match[:v_type]
219
+ {}.tap do |hash|
220
+ value.each do |k, v|
221
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
222
+ end
223
+ end
224
+ else # model
225
+ # models (e.g. Pet) or oneOf
226
+ klass = FinnhubRuby.const_get(type)
227
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
228
+ end
229
+ end
230
+
231
+ # Returns the string representation of the object
232
+ # @return [String] String presentation of the object
233
+ def to_s
234
+ to_hash.to_s
235
+ end
236
+
237
+ # to_body is an alias to to_hash (backward compatibility)
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_body
240
+ to_hash
241
+ end
242
+
243
+ # Returns the object in the form of hash
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_hash
246
+ hash = {}
247
+ self.class.attribute_map.each_pair do |attr, param|
248
+ value = self.send(attr)
249
+ if value.nil?
250
+ is_nullable = self.class.openapi_nullable.include?(attr)
251
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
252
+ end
253
+
254
+ hash[param] = _to_hash(value)
255
+ end
256
+ hash
257
+ end
258
+
259
+ # Outputs non-array value in the form of hash
260
+ # For object, use to_hash. Otherwise, just return the value
261
+ # @param [Object] value Any valid value
262
+ # @return [Hash] Returns the value in the form of hash
263
+ def _to_hash(value)
264
+ if value.is_a?(Array)
265
+ value.compact.map { |v| _to_hash(v) }
266
+ elsif value.is_a?(Hash)
267
+ {}.tap do |hash|
268
+ value.each { |k, v| hash[k] = _to_hash(v) }
269
+ end
270
+ elsif value.respond_to? :to_hash
271
+ value.to_hash
272
+ else
273
+ value
274
+ end
275
+ end
276
+
277
+ end
278
+
279
+ end
@@ -21,13 +21,13 @@ module FinnhubRuby
21
21
  # Total ESG Score
22
22
  attr_accessor :total_esg_score
23
23
 
24
- # symbol
24
+ # Environment Score
25
25
  attr_accessor :environment_score
26
26
 
27
- # symbol
27
+ # Governance Score
28
28
  attr_accessor :governance_score
29
29
 
30
- # symbol
30
+ # Social Score
31
31
  attr_accessor :social_score
32
32
 
33
33
  attr_accessor :data
@@ -39,16 +39,16 @@ module FinnhubRuby
39
39
  # Listed exchange.
40
40
  attr_accessor :exchange
41
41
 
42
- # GICS industry group.
42
+ # Industry group.
43
43
  attr_accessor :ggroup
44
44
 
45
- # GICS industry.
45
+ # Industry.
46
46
  attr_accessor :gind
47
47
 
48
- # GICS sector.
48
+ # Sector.
49
49
  attr_accessor :gsector
50
50
 
51
- # GICS sub-industry.
51
+ # Sub-industry.
52
52
  attr_accessor :gsubind
53
53
 
54
54
  # ISIN number.
@@ -33,6 +33,12 @@ module FinnhubRuby
33
33
  # Currency code
34
34
  attr_accessor :currency_code
35
35
 
36
+ # Region
37
+ attr_accessor :region
38
+
39
+ # Sub-Region
40
+ attr_accessor :sub_region
41
+
36
42
  # Attribute mapping from ruby-style variable name to JSON key.
37
43
  def self.attribute_map
38
44
  {
@@ -41,7 +47,9 @@ module FinnhubRuby
41
47
  :'code3' => :'code3',
42
48
  :'code_no' => :'codeNo',
43
49
  :'currency' => :'currency',
44
- :'currency_code' => :'currencyCode'
50
+ :'currency_code' => :'currencyCode',
51
+ :'region' => :'region',
52
+ :'sub_region' => :'subRegion'
45
53
  }
46
54
  end
47
55
 
@@ -58,7 +66,9 @@ module FinnhubRuby
58
66
  :'code3' => :'String',
59
67
  :'code_no' => :'String',
60
68
  :'currency' => :'String',
61
- :'currency_code' => :'String'
69
+ :'currency_code' => :'String',
70
+ :'region' => :'String',
71
+ :'sub_region' => :'String'
62
72
  }
63
73
  end
64
74
 
@@ -106,6 +116,14 @@ module FinnhubRuby
106
116
  if attributes.key?(:'currency_code')
107
117
  self.currency_code = attributes[:'currency_code']
108
118
  end
119
+
120
+ if attributes.key?(:'region')
121
+ self.region = attributes[:'region']
122
+ end
123
+
124
+ if attributes.key?(:'sub_region')
125
+ self.sub_region = attributes[:'sub_region']
126
+ end
109
127
  end
110
128
 
111
129
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -131,7 +149,9 @@ module FinnhubRuby
131
149
  code3 == o.code3 &&
132
150
  code_no == o.code_no &&
133
151
  currency == o.currency &&
134
- currency_code == o.currency_code
152
+ currency_code == o.currency_code &&
153
+ region == o.region &&
154
+ sub_region == o.sub_region
135
155
  end
136
156
 
137
157
  # @see the `==` method
@@ -143,7 +163,7 @@ module FinnhubRuby
143
163
  # Calculates hash code according to all attributes.
144
164
  # @return [Integer] Hash code
145
165
  def hash
146
- [country, code2, code3, code_no, currency, currency_code].hash
166
+ [country, code2, code3, code_no, currency, currency_code, region, sub_region].hash
147
167
  end
148
168
 
149
169
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.2.1
11
11
  =end
12
12
 
13
13
  module FinnhubRuby
14
- VERSION = '1.1.8'
14
+ VERSION = '1.1.9'
15
15
  end
data/lib/finnhub_ruby.rb CHANGED
@@ -22,6 +22,8 @@ require 'finnhub_ruby/models/basic_financials'
22
22
  require 'finnhub_ruby/models/breakdown_item'
23
23
  require 'finnhub_ruby/models/company'
24
24
  require 'finnhub_ruby/models/company_esg'
25
+ require 'finnhub_ruby/models/company_earnings_quality_score'
26
+ require 'finnhub_ruby/models/company_earnings_quality_score_data'
25
27
  require 'finnhub_ruby/models/company_executive'
26
28
  require 'finnhub_ruby/models/company_news'
27
29
  require 'finnhub_ruby/models/company_news_statistics'
@@ -0,0 +1,70 @@
1
+ =begin
2
+ #Finnhub API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FinnhubRuby::CompanyEarningsQualityScoreData
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe FinnhubRuby::CompanyEarningsQualityScoreData do
21
+ let(:instance) { FinnhubRuby::CompanyEarningsQualityScoreData.new }
22
+
23
+ describe 'test an instance of CompanyEarningsQualityScoreData' do
24
+ it 'should create an instance of CompanyEarningsQualityScoreData' do
25
+ expect(instance).to be_instance_of(FinnhubRuby::CompanyEarningsQualityScoreData)
26
+ end
27
+ end
28
+ describe 'test attribute "period"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "growth"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "profitability"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "cash_generation_capital_allocation"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "leverage"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'test attribute "score"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "letter_score"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
70
+ end
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Finnhub API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FinnhubRuby::CompanyEarningsQualityScore
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe FinnhubRuby::CompanyEarningsQualityScore do
21
+ let(:instance) { FinnhubRuby::CompanyEarningsQualityScore.new }
22
+
23
+ describe 'test an instance of CompanyEarningsQualityScore' do
24
+ it 'should create an instance of CompanyEarningsQualityScore' do
25
+ expect(instance).to be_instance_of(FinnhubRuby::CompanyEarningsQualityScore)
26
+ end
27
+ end
28
+ describe 'test attribute "symbol"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "freq"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "data"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finnhub_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-18 00:00:00.000000000 Z
11
+ date: 2021-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -66,6 +66,8 @@ files:
66
66
  - docs/BreakdownItem.md
67
67
  - docs/Company.md
68
68
  - docs/CompanyESG.md
69
+ - docs/CompanyEarningsQualityScore.md
70
+ - docs/CompanyEarningsQualityScoreData.md
69
71
  - docs/CompanyExecutive.md
70
72
  - docs/CompanyNews.md
71
73
  - docs/CompanyNewsStatistics.md
@@ -169,6 +171,7 @@ files:
169
171
  - docs/TwitterSentimentContent.md
170
172
  - docs/UpgradeDowngrade.md
171
173
  - finnhub_ruby-1.1.7.gem
174
+ - finnhub_ruby-1.1.8.gem
172
175
  - finnhub_ruby.gemspec
173
176
  - git_push.sh
174
177
  - lib/finnhub_ruby.rb
@@ -180,6 +183,8 @@ files:
180
183
  - lib/finnhub_ruby/models/basic_financials.rb
181
184
  - lib/finnhub_ruby/models/breakdown_item.rb
182
185
  - lib/finnhub_ruby/models/company.rb
186
+ - lib/finnhub_ruby/models/company_earnings_quality_score.rb
187
+ - lib/finnhub_ruby/models/company_earnings_quality_score_data.rb
183
188
  - lib/finnhub_ruby/models/company_esg.rb
184
189
  - lib/finnhub_ruby/models/company_executive.rb
185
190
  - lib/finnhub_ruby/models/company_news.rb
@@ -305,6 +310,8 @@ files:
305
310
  - spec/models/aggregate_indicators_spec.rb
306
311
  - spec/models/basic_financials_spec.rb
307
312
  - spec/models/breakdown_item_spec.rb
313
+ - spec/models/company_earnings_quality_score_data_spec.rb
314
+ - spec/models/company_earnings_quality_score_spec.rb
308
315
  - spec/models/company_esg_spec.rb
309
316
  - spec/models/company_executive_spec.rb
310
317
  - spec/models/company_news_spec.rb
@@ -472,6 +479,7 @@ test_files:
472
479
  - spec/models/company_spec.rb
473
480
  - spec/models/investment_theme_portfolio_spec.rb
474
481
  - spec/models/etf_country_exposure_data_spec.rb
482
+ - spec/models/company_earnings_quality_score_data_spec.rb
475
483
  - spec/models/earnings_estimates_info_spec.rb
476
484
  - spec/models/forex_symbol_spec.rb
477
485
  - spec/models/key_customers_suppliers_spec.rb
@@ -533,6 +541,7 @@ test_files:
533
541
  - spec/models/investment_themes_spec.rb
534
542
  - spec/models/financial_statements_spec.rb
535
543
  - spec/models/ipo_calendar_spec.rb
544
+ - spec/models/company_earnings_quality_score_spec.rb
536
545
  - spec/models/dividends_spec.rb
537
546
  - spec/models/transcript_content_spec.rb
538
547
  - spec/models/international_filing_spec.rb