finnhub_ruby 1.1.9 → 1.1.13

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -3
  3. data/docs/CryptoProfile.md +38 -0
  4. data/docs/DefaultApi.md +396 -11
  5. data/docs/EbitEstimates.md +22 -0
  6. data/docs/EbitEstimatesInfo.md +26 -0
  7. data/docs/EbitdaEstimates.md +22 -0
  8. data/docs/EbitdaEstimatesInfo.md +26 -0
  9. data/docs/MutualFundProfileData.md +9 -1
  10. data/docs/StockSymbol.md +7 -1
  11. data/docs/Transactions.md +2 -0
  12. data/docs/UsptoPatent.md +34 -0
  13. data/docs/UsptoPatentResult.md +20 -0
  14. data/docs/VisaApplication.md +62 -0
  15. data/docs/VisaApplicationResult.md +20 -0
  16. data/finnhub_ruby-1.1.10.gem +0 -0
  17. data/finnhub_ruby-1.1.11.gem +0 -0
  18. data/finnhub_ruby-1.1.12.gem +0 -0
  19. data/finnhub_ruby-1.1.9.gem +0 -0
  20. data/lib/finnhub_ruby/api/default_api.rb +369 -6
  21. data/lib/finnhub_ruby/models/crypto_profile.rb +319 -0
  22. data/lib/finnhub_ruby/models/ebit_estimates.rb +241 -0
  23. data/lib/finnhub_ruby/models/ebit_estimates_info.rb +259 -0
  24. data/lib/finnhub_ruby/models/ebitda_estimates.rb +241 -0
  25. data/lib/finnhub_ruby/models/ebitda_estimates_info.rb +259 -0
  26. data/lib/finnhub_ruby/models/mutual_fund_profile_data.rb +44 -4
  27. data/lib/finnhub_ruby/models/stock_symbol.rb +34 -4
  28. data/lib/finnhub_ruby/models/transactions.rb +11 -1
  29. data/lib/finnhub_ruby/models/uspto_patent.rb +301 -0
  30. data/lib/finnhub_ruby/models/uspto_patent_result.rb +231 -0
  31. data/lib/finnhub_ruby/models/visa_application.rb +439 -0
  32. data/lib/finnhub_ruby/models/visa_application_result.rb +231 -0
  33. data/lib/finnhub_ruby/version.rb +1 -1
  34. data/lib/finnhub_ruby.rb +9 -0
  35. data/spec/models/crypto_profile_spec.rb +94 -0
  36. data/spec/models/ebit_estimates_info_spec.rb +58 -0
  37. data/spec/models/ebit_estimates_spec.rb +46 -0
  38. data/spec/models/ebitda_estimates_info_spec.rb +58 -0
  39. data/spec/models/ebitda_estimates_spec.rb +46 -0
  40. data/spec/models/uspto_patent_result_spec.rb +40 -0
  41. data/spec/models/uspto_patent_spec.rb +82 -0
  42. data/spec/models/visa_application_result_spec.rb +40 -0
  43. data/spec/models/visa_application_spec.rb +166 -0
  44. metadata +42 -2
@@ -231,7 +231,7 @@ module FinnhubRuby
231
231
  # Company Earnings Quality Score
232
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
233
  # @param symbol [String] Symbol.
234
- # @param freq [String] Frequency. Currently only support &lt;code&gt;quarterly&lt;/code&gt;
234
+ # @param freq [String] Frequency. Currently support &lt;code&gt;annual&lt;/code&gt; and &lt;code&gt;quarterly&lt;/code&gt;
235
235
  # @param [Hash] opts the optional parameters
236
236
  # @return [CompanyEarningsQualityScore]
237
237
  def company_earnings_quality_score(symbol, freq, opts = {})
@@ -242,7 +242,7 @@ module FinnhubRuby
242
242
  # Company Earnings Quality Score
243
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
244
  # @param symbol [String] Symbol.
245
- # @param freq [String] Frequency. Currently only support &lt;code&gt;quarterly&lt;/code&gt;
245
+ # @param freq [String] Frequency. Currently support &lt;code&gt;annual&lt;/code&gt; and &lt;code&gt;quarterly&lt;/code&gt;
246
246
  # @param [Hash] opts the optional parameters
247
247
  # @return [Array<(CompanyEarningsQualityScore, Integer, Hash)>] CompanyEarningsQualityScore data, response status code and response headers
248
248
  def company_earnings_quality_score_with_http_info(symbol, freq, opts = {})
@@ -299,6 +299,140 @@ module FinnhubRuby
299
299
  return data, status_code, headers
300
300
  end
301
301
 
302
+ # EBIT Estimates
303
+ # Get company's ebit estimates.
304
+ # @param symbol [String] Symbol of the company: AAPL.
305
+ # @param [Hash] opts the optional parameters
306
+ # @option opts [String] :freq Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt;
307
+ # @return [EbitEstimates]
308
+ def company_ebit_estimates(symbol, opts = {})
309
+ data, _status_code, _headers = company_ebit_estimates_with_http_info(symbol, opts)
310
+ data
311
+ end
312
+
313
+ # EBIT Estimates
314
+ # Get company&#39;s ebit estimates.
315
+ # @param symbol [String] Symbol of the company: AAPL.
316
+ # @param [Hash] opts the optional parameters
317
+ # @option opts [String] :freq Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt;
318
+ # @return [Array<(EbitEstimates, Integer, Hash)>] EbitEstimates data, response status code and response headers
319
+ def company_ebit_estimates_with_http_info(symbol, opts = {})
320
+ if @api_client.config.debugging
321
+ @api_client.config.logger.debug 'Calling API: DefaultApi.company_ebit_estimates ...'
322
+ end
323
+ # verify the required parameter 'symbol' is set
324
+ if @api_client.config.client_side_validation && symbol.nil?
325
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_ebit_estimates"
326
+ end
327
+ # resource path
328
+ local_var_path = '/stock/ebit-estimate'
329
+
330
+ # query parameters
331
+ query_params = opts[:query_params] || {}
332
+ query_params[:'symbol'] = symbol
333
+ query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil?
334
+
335
+ # header parameters
336
+ header_params = opts[:header_params] || {}
337
+ # HTTP header 'Accept' (if needed)
338
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
339
+
340
+ # form parameters
341
+ form_params = opts[:form_params] || {}
342
+
343
+ # http body (model)
344
+ post_body = opts[:debug_body]
345
+
346
+ # return_type
347
+ return_type = opts[:debug_return_type] || 'EbitEstimates'
348
+
349
+ # auth_names
350
+ auth_names = opts[:debug_auth_names] || ['api_key']
351
+
352
+ new_options = opts.merge(
353
+ :operation => :"DefaultApi.company_ebit_estimates",
354
+ :header_params => header_params,
355
+ :query_params => query_params,
356
+ :form_params => form_params,
357
+ :body => post_body,
358
+ :auth_names => auth_names,
359
+ :return_type => return_type
360
+ )
361
+
362
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
363
+ if @api_client.config.debugging
364
+ @api_client.config.logger.debug "API called: DefaultApi#company_ebit_estimates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
365
+ end
366
+ return data, status_code, headers
367
+ end
368
+
369
+ # EBITDA Estimates
370
+ # Get company's ebitda estimates.
371
+ # @param symbol [String] Symbol of the company: AAPL.
372
+ # @param [Hash] opts the optional parameters
373
+ # @option opts [String] :freq Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt;
374
+ # @return [EbitdaEstimates]
375
+ def company_ebitda_estimates(symbol, opts = {})
376
+ data, _status_code, _headers = company_ebitda_estimates_with_http_info(symbol, opts)
377
+ data
378
+ end
379
+
380
+ # EBITDA Estimates
381
+ # Get company&#39;s ebitda estimates.
382
+ # @param symbol [String] Symbol of the company: AAPL.
383
+ # @param [Hash] opts the optional parameters
384
+ # @option opts [String] :freq Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt;
385
+ # @return [Array<(EbitdaEstimates, Integer, Hash)>] EbitdaEstimates data, response status code and response headers
386
+ def company_ebitda_estimates_with_http_info(symbol, opts = {})
387
+ if @api_client.config.debugging
388
+ @api_client.config.logger.debug 'Calling API: DefaultApi.company_ebitda_estimates ...'
389
+ end
390
+ # verify the required parameter 'symbol' is set
391
+ if @api_client.config.client_side_validation && symbol.nil?
392
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_ebitda_estimates"
393
+ end
394
+ # resource path
395
+ local_var_path = '/stock/ebitda-estimate'
396
+
397
+ # query parameters
398
+ query_params = opts[:query_params] || {}
399
+ query_params[:'symbol'] = symbol
400
+ query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil?
401
+
402
+ # header parameters
403
+ header_params = opts[:header_params] || {}
404
+ # HTTP header 'Accept' (if needed)
405
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
406
+
407
+ # form parameters
408
+ form_params = opts[:form_params] || {}
409
+
410
+ # http body (model)
411
+ post_body = opts[:debug_body]
412
+
413
+ # return_type
414
+ return_type = opts[:debug_return_type] || 'EbitdaEstimates'
415
+
416
+ # auth_names
417
+ auth_names = opts[:debug_auth_names] || ['api_key']
418
+
419
+ new_options = opts.merge(
420
+ :operation => :"DefaultApi.company_ebitda_estimates",
421
+ :header_params => header_params,
422
+ :query_params => query_params,
423
+ :form_params => form_params,
424
+ :body => post_body,
425
+ :auth_names => auth_names,
426
+ :return_type => return_type
427
+ )
428
+
429
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug "API called: DefaultApi#company_ebitda_estimates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
432
+ end
433
+ return data, status_code, headers
434
+ end
435
+
302
436
  # Earnings Estimates
303
437
  # Get company's EPS estimates.
304
438
  # @param symbol [String] Symbol of the company: AAPL.
@@ -1091,6 +1225,70 @@ module FinnhubRuby
1091
1225
  return data, status_code, headers
1092
1226
  end
1093
1227
 
1228
+ # Crypto Profile
1229
+ # Get crypto's profile.
1230
+ # @param symbol [String] Crypto symbol such as BTC or ETH.
1231
+ # @param [Hash] opts the optional parameters
1232
+ # @return [CryptoProfile]
1233
+ def crypto_profile(symbol, opts = {})
1234
+ data, _status_code, _headers = crypto_profile_with_http_info(symbol, opts)
1235
+ data
1236
+ end
1237
+
1238
+ # Crypto Profile
1239
+ # Get crypto&#39;s profile.
1240
+ # @param symbol [String] Crypto symbol such as BTC or ETH.
1241
+ # @param [Hash] opts the optional parameters
1242
+ # @return [Array<(CryptoProfile, Integer, Hash)>] CryptoProfile data, response status code and response headers
1243
+ def crypto_profile_with_http_info(symbol, opts = {})
1244
+ if @api_client.config.debugging
1245
+ @api_client.config.logger.debug 'Calling API: DefaultApi.crypto_profile ...'
1246
+ end
1247
+ # verify the required parameter 'symbol' is set
1248
+ if @api_client.config.client_side_validation && symbol.nil?
1249
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.crypto_profile"
1250
+ end
1251
+ # resource path
1252
+ local_var_path = '/crypto/profile'
1253
+
1254
+ # query parameters
1255
+ query_params = opts[:query_params] || {}
1256
+ query_params[:'symbol'] = symbol
1257
+
1258
+ # header parameters
1259
+ header_params = opts[:header_params] || {}
1260
+ # HTTP header 'Accept' (if needed)
1261
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1262
+
1263
+ # form parameters
1264
+ form_params = opts[:form_params] || {}
1265
+
1266
+ # http body (model)
1267
+ post_body = opts[:debug_body]
1268
+
1269
+ # return_type
1270
+ return_type = opts[:debug_return_type] || 'CryptoProfile'
1271
+
1272
+ # auth_names
1273
+ auth_names = opts[:debug_auth_names] || ['api_key']
1274
+
1275
+ new_options = opts.merge(
1276
+ :operation => :"DefaultApi.crypto_profile",
1277
+ :header_params => header_params,
1278
+ :query_params => query_params,
1279
+ :form_params => form_params,
1280
+ :body => post_body,
1281
+ :auth_names => auth_names,
1282
+ :return_type => return_type
1283
+ )
1284
+
1285
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1286
+ if @api_client.config.debugging
1287
+ @api_client.config.logger.debug "API called: DefaultApi#crypto_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1288
+ end
1289
+ return data, status_code, headers
1290
+ end
1291
+
1094
1292
  # Crypto Symbol
1095
1293
  # List supported crypto symbols by exchange
1096
1294
  # @param exchange [String] Exchange you want to get the list of symbols from.
@@ -1227,6 +1425,8 @@ module FinnhubRuby
1227
1425
  # Economic Calendar
1228
1426
  # <p>Get recent and upcoming economic releases.</p><p>Historical events and surprises are available for Enterprise clients.</p>
1229
1427
  # @param [Hash] opts the optional parameters
1428
+ # @option opts [Date] :from From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
1429
+ # @option opts [Date] :to To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
1230
1430
  # @return [EconomicCalendar]
1231
1431
  def economic_calendar(opts = {})
1232
1432
  data, _status_code, _headers = economic_calendar_with_http_info(opts)
@@ -1236,6 +1436,8 @@ module FinnhubRuby
1236
1436
  # Economic Calendar
1237
1437
  # &lt;p&gt;Get recent and upcoming economic releases.&lt;/p&gt;&lt;p&gt;Historical events and surprises are available for Enterprise clients.&lt;/p&gt;
1238
1438
  # @param [Hash] opts the optional parameters
1439
+ # @option opts [Date] :from From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
1440
+ # @option opts [Date] :to To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
1239
1441
  # @return [Array<(EconomicCalendar, Integer, Hash)>] EconomicCalendar data, response status code and response headers
1240
1442
  def economic_calendar_with_http_info(opts = {})
1241
1443
  if @api_client.config.debugging
@@ -1246,6 +1448,8 @@ module FinnhubRuby
1246
1448
 
1247
1449
  # query parameters
1248
1450
  query_params = opts[:query_params] || {}
1451
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
1452
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
1249
1453
 
1250
1454
  # header parameters
1251
1455
  header_params = opts[:header_params] || {}
@@ -2148,6 +2352,7 @@ module FinnhubRuby
2148
2352
  # Get rates for all forex pairs. Ideal for currency conversion
2149
2353
  # @param [Hash] opts the optional parameters
2150
2354
  # @option opts [String] :base Base currency. Default to EUR.
2355
+ # @option opts [String] :date Date. Leave blank to get the latest data.
2151
2356
  # @return [Forexrates]
2152
2357
  def forex_rates(opts = {})
2153
2358
  data, _status_code, _headers = forex_rates_with_http_info(opts)
@@ -2158,6 +2363,7 @@ module FinnhubRuby
2158
2363
  # Get rates for all forex pairs. Ideal for currency conversion
2159
2364
  # @param [Hash] opts the optional parameters
2160
2365
  # @option opts [String] :base Base currency. Default to EUR.
2366
+ # @option opts [String] :date Date. Leave blank to get the latest data.
2161
2367
  # @return [Array<(Forexrates, Integer, Hash)>] Forexrates data, response status code and response headers
2162
2368
  def forex_rates_with_http_info(opts = {})
2163
2369
  if @api_client.config.debugging
@@ -2169,6 +2375,7 @@ module FinnhubRuby
2169
2375
  # query parameters
2170
2376
  query_params = opts[:query_params] || {}
2171
2377
  query_params[:'base'] = opts[:'base'] if !opts[:'base'].nil?
2378
+ query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
2172
2379
 
2173
2380
  # header parameters
2174
2381
  header_params = opts[:header_params] || {}
@@ -2465,7 +2672,7 @@ module FinnhubRuby
2465
2672
 
2466
2673
  # Insider Transactions
2467
2674
  # Company insider transactions data sourced from <code>Form 3,4,5</code>. This endpoint only covers US companies at the moment. Limit to 100 transactions per API call.
2468
- # @param symbol [String] Symbol of the company: AAPL.
2675
+ # @param symbol [String] Symbol of the company: AAPL. Leave this param blank to get the latest transactions.
2469
2676
  # @param [Hash] opts the optional parameters
2470
2677
  # @option opts [Date] :from From date: 2020-03-15.
2471
2678
  # @option opts [Date] :to To date: 2020-03-16.
@@ -2477,7 +2684,7 @@ module FinnhubRuby
2477
2684
 
2478
2685
  # Insider Transactions
2479
2686
  # Company insider transactions data sourced from &lt;code&gt;Form 3,4,5&lt;/code&gt;. This endpoint only covers US companies at the moment. Limit to 100 transactions per API call.
2480
- # @param symbol [String] Symbol of the company: AAPL.
2687
+ # @param symbol [String] Symbol of the company: AAPL. Leave this param blank to get the latest transactions.
2481
2688
  # @param [Hash] opts the optional parameters
2482
2689
  # @option opts [Date] :from From date: 2020-03-15.
2483
2690
  # @option opts [Date] :to To date: 2020-03-16.
@@ -2534,7 +2741,7 @@ module FinnhubRuby
2534
2741
  end
2535
2742
 
2536
2743
  # International Filings
2537
- # List filings for international companies which covers 95%+ of global market cap. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
2744
+ # List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
2538
2745
  # @param [Hash] opts the optional parameters
2539
2746
  # @option opts [String] :symbol Symbol. Leave empty to list latest filings.
2540
2747
  # @option opts [String] :country Filter by country using country&#39;s 2-letter code.
@@ -2545,7 +2752,7 @@ module FinnhubRuby
2545
2752
  end
2546
2753
 
2547
2754
  # International Filings
2548
- # List filings for international companies which covers 95%+ of global market cap. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
2755
+ # List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
2549
2756
  # @param [Hash] opts the optional parameters
2550
2757
  # @option opts [String] :symbol Symbol. Leave empty to list latest filings.
2551
2758
  # @option opts [String] :country Filter by country using country&#39;s 2-letter code.
@@ -4330,6 +4537,162 @@ module FinnhubRuby
4330
4537
  return data, status_code, headers
4331
4538
  end
4332
4539
 
4540
+ # USPTO Patents
4541
+ # List USPTO patents for companies. Limit to 250 records per API call.
4542
+ # @param symbol [String] Symbol.
4543
+ # @param from [Date] From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
4544
+ # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
4545
+ # @param [Hash] opts the optional parameters
4546
+ # @return [UsptoPatentResult]
4547
+ def stock_uspto_patent(symbol, from, to, opts = {})
4548
+ data, _status_code, _headers = stock_uspto_patent_with_http_info(symbol, from, to, opts)
4549
+ data
4550
+ end
4551
+
4552
+ # USPTO Patents
4553
+ # List USPTO patents for companies. Limit to 250 records per API call.
4554
+ # @param symbol [String] Symbol.
4555
+ # @param from [Date] From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
4556
+ # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
4557
+ # @param [Hash] opts the optional parameters
4558
+ # @return [Array<(UsptoPatentResult, Integer, Hash)>] UsptoPatentResult data, response status code and response headers
4559
+ def stock_uspto_patent_with_http_info(symbol, from, to, opts = {})
4560
+ if @api_client.config.debugging
4561
+ @api_client.config.logger.debug 'Calling API: DefaultApi.stock_uspto_patent ...'
4562
+ end
4563
+ # verify the required parameter 'symbol' is set
4564
+ if @api_client.config.client_side_validation && symbol.nil?
4565
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_uspto_patent"
4566
+ end
4567
+ # verify the required parameter 'from' is set
4568
+ if @api_client.config.client_side_validation && from.nil?
4569
+ fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_uspto_patent"
4570
+ end
4571
+ # verify the required parameter 'to' is set
4572
+ if @api_client.config.client_side_validation && to.nil?
4573
+ fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_uspto_patent"
4574
+ end
4575
+ # resource path
4576
+ local_var_path = '/stock/uspto-patent'
4577
+
4578
+ # query parameters
4579
+ query_params = opts[:query_params] || {}
4580
+ query_params[:'symbol'] = symbol
4581
+ query_params[:'from'] = from
4582
+ query_params[:'to'] = to
4583
+
4584
+ # header parameters
4585
+ header_params = opts[:header_params] || {}
4586
+ # HTTP header 'Accept' (if needed)
4587
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4588
+
4589
+ # form parameters
4590
+ form_params = opts[:form_params] || {}
4591
+
4592
+ # http body (model)
4593
+ post_body = opts[:debug_body]
4594
+
4595
+ # return_type
4596
+ return_type = opts[:debug_return_type] || 'UsptoPatentResult'
4597
+
4598
+ # auth_names
4599
+ auth_names = opts[:debug_auth_names] || ['api_key']
4600
+
4601
+ new_options = opts.merge(
4602
+ :operation => :"DefaultApi.stock_uspto_patent",
4603
+ :header_params => header_params,
4604
+ :query_params => query_params,
4605
+ :form_params => form_params,
4606
+ :body => post_body,
4607
+ :auth_names => auth_names,
4608
+ :return_type => return_type
4609
+ )
4610
+
4611
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4612
+ if @api_client.config.debugging
4613
+ @api_client.config.logger.debug "API called: DefaultApi#stock_uspto_patent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4614
+ end
4615
+ return data, status_code, headers
4616
+ end
4617
+
4618
+ # H1-B Visa Application
4619
+ # Get a list of H1-B and Permanent visa applications for companies from the DOL. The data is updated quarterly.
4620
+ # @param symbol [String] Symbol.
4621
+ # @param from [Date] From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. Filter on the &lt;code&gt;beginDate&lt;/code&gt; column.
4622
+ # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. Filter on the &lt;code&gt;beginDate&lt;/code&gt; column.
4623
+ # @param [Hash] opts the optional parameters
4624
+ # @return [VisaApplicationResult]
4625
+ def stock_visa_application(symbol, from, to, opts = {})
4626
+ data, _status_code, _headers = stock_visa_application_with_http_info(symbol, from, to, opts)
4627
+ data
4628
+ end
4629
+
4630
+ # H1-B Visa Application
4631
+ # Get a list of H1-B and Permanent visa applications for companies from the DOL. The data is updated quarterly.
4632
+ # @param symbol [String] Symbol.
4633
+ # @param from [Date] From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. Filter on the &lt;code&gt;beginDate&lt;/code&gt; column.
4634
+ # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. Filter on the &lt;code&gt;beginDate&lt;/code&gt; column.
4635
+ # @param [Hash] opts the optional parameters
4636
+ # @return [Array<(VisaApplicationResult, Integer, Hash)>] VisaApplicationResult data, response status code and response headers
4637
+ def stock_visa_application_with_http_info(symbol, from, to, opts = {})
4638
+ if @api_client.config.debugging
4639
+ @api_client.config.logger.debug 'Calling API: DefaultApi.stock_visa_application ...'
4640
+ end
4641
+ # verify the required parameter 'symbol' is set
4642
+ if @api_client.config.client_side_validation && symbol.nil?
4643
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_visa_application"
4644
+ end
4645
+ # verify the required parameter 'from' is set
4646
+ if @api_client.config.client_side_validation && from.nil?
4647
+ fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_visa_application"
4648
+ end
4649
+ # verify the required parameter 'to' is set
4650
+ if @api_client.config.client_side_validation && to.nil?
4651
+ fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_visa_application"
4652
+ end
4653
+ # resource path
4654
+ local_var_path = '/stock/visa-application'
4655
+
4656
+ # query parameters
4657
+ query_params = opts[:query_params] || {}
4658
+ query_params[:'symbol'] = symbol
4659
+ query_params[:'from'] = from
4660
+ query_params[:'to'] = to
4661
+
4662
+ # header parameters
4663
+ header_params = opts[:header_params] || {}
4664
+ # HTTP header 'Accept' (if needed)
4665
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4666
+
4667
+ # form parameters
4668
+ form_params = opts[:form_params] || {}
4669
+
4670
+ # http body (model)
4671
+ post_body = opts[:debug_body]
4672
+
4673
+ # return_type
4674
+ return_type = opts[:debug_return_type] || 'VisaApplicationResult'
4675
+
4676
+ # auth_names
4677
+ auth_names = opts[:debug_auth_names] || ['api_key']
4678
+
4679
+ new_options = opts.merge(
4680
+ :operation => :"DefaultApi.stock_visa_application",
4681
+ :header_params => header_params,
4682
+ :query_params => query_params,
4683
+ :form_params => form_params,
4684
+ :body => post_body,
4685
+ :auth_names => auth_names,
4686
+ :return_type => return_type
4687
+ )
4688
+
4689
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4690
+ if @api_client.config.debugging
4691
+ @api_client.config.logger.debug "API called: DefaultApi#stock_visa_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4692
+ end
4693
+ return data, status_code, headers
4694
+ end
4695
+
4333
4696
  # Supply Chain Relationships
4334
4697
  # <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p><p>We currently cover data for S&P500 and Nasdaq 100 companies.</p>
4335
4698
  # @param symbol [String] Symbol.