finnhub_ruby 1.1.12 → 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.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/docs/DefaultApi.md +79 -1
- data/docs/UsptoPatent.md +1 -1
- data/docs/VisaApplication.md +62 -0
- data/docs/VisaApplicationResult.md +20 -0
- data/finnhub_ruby-1.1.12.gem +0 -0
- data/lib/finnhub_ruby/api/default_api.rb +81 -0
- data/lib/finnhub_ruby/models/uspto_patent.rb +1 -1
- data/lib/finnhub_ruby/models/visa_application.rb +439 -0
- data/lib/finnhub_ruby/models/visa_application_result.rb +231 -0
- data/lib/finnhub_ruby/version.rb +1 -1
- data/lib/finnhub_ruby.rb +2 -0
- data/spec/models/visa_application_result_spec.rb +40 -0
- data/spec/models/visa_application_spec.rb +166 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e36670eda77a8ce542ba847a4d42bd58794eb8fca5bc7d1e7b48fed9a18e1c58
|
4
|
+
data.tar.gz: 826059c874f10b755cf306dad7f9031230008bfaca31a9c0239637022bc1a5b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e102598fafad86d9af44c1aed2e16dea8a7fe57d0befa3a50769a4ff94c61f0b439e4350de3d653339514df2c1a9425ece648d5ef56cda1bd39774c51cffd0c
|
7
|
+
data.tar.gz: 7be63933d8e423c86778349f13c843bba4bb6dd4bd860a5932675631069f86aae75b85e78540b43f2d0c83057615e1974cf624ed15a919b959eff2bb44e006fd
|
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.
|
4
|
+
- Package version: 1.1.13
|
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.
|
16
|
+
gem 'finnhub_ruby', '~> 1.1.13'
|
17
17
|
```
|
18
18
|
|
19
19
|
## Getting Started
|
@@ -254,6 +254,9 @@ puts(finnhub_client.company_ebit_estimates('TSLA', {freq: 'quarterly'}))
|
|
254
254
|
# USPTO
|
255
255
|
puts(finnhub_client.stock_uspto_patent('NVDA', "2020-06-01", "2021-06-10"))
|
256
256
|
|
257
|
+
# Visa Application
|
258
|
+
puts(finnhub_client.stock_visa_application('AAPL', "2020-06-01", "2021-06-10"))
|
259
|
+
|
257
260
|
```
|
258
261
|
|
259
262
|
## License
|
data/docs/DefaultApi.md
CHANGED
@@ -72,6 +72,7 @@ All URIs are relative to *https://finnhub.io/api/v1*
|
|
72
72
|
| [**stock_symbols**](DefaultApi.md#stock_symbols) | **GET** /stock/symbol | Stock Symbol |
|
73
73
|
| [**stock_tick**](DefaultApi.md#stock_tick) | **GET** /stock/tick | Tick Data |
|
74
74
|
| [**stock_uspto_patent**](DefaultApi.md#stock_uspto_patent) | **GET** /stock/uspto-patent | USPTO Patents |
|
75
|
+
| [**stock_visa_application**](DefaultApi.md#stock_visa_application) | **GET** /stock/visa-application | H1-B Visa Application |
|
75
76
|
| [**supply_chain_relationships**](DefaultApi.md#supply_chain_relationships) | **GET** /stock/supply-chain | Supply Chain Relationships |
|
76
77
|
| [**support_resistance**](DefaultApi.md#support_resistance) | **GET** /scan/support-resistance | Support/Resistance |
|
77
78
|
| [**symbol_search**](DefaultApi.md#symbol_search) | **GET** /search | Symbol Lookup |
|
@@ -2671,7 +2672,8 @@ end
|
|
2671
2672
|
|
2672
2673
|
api_instance = FinnhubRuby::DefaultApi.new
|
2673
2674
|
opts = {
|
2674
|
-
base: 'base_example' # String | Base currency. Default to EUR.
|
2675
|
+
base: 'base_example', # String | Base currency. Default to EUR.
|
2676
|
+
date: 'date_example' # String | Date. Leave blank to get the latest data.
|
2675
2677
|
}
|
2676
2678
|
|
2677
2679
|
begin
|
@@ -2706,6 +2708,7 @@ end
|
|
2706
2708
|
| Name | Type | Description | Notes |
|
2707
2709
|
| ---- | ---- | ----------- | ----- |
|
2708
2710
|
| **base** | **String** | Base currency. Default to EUR. | [optional] |
|
2711
|
+
| **date** | **String** | Date. Leave blank to get the latest data. | [optional] |
|
2709
2712
|
|
2710
2713
|
### Return type
|
2711
2714
|
|
@@ -5089,6 +5092,81 @@ end
|
|
5089
5092
|
- **Accept**: application/json
|
5090
5093
|
|
5091
5094
|
|
5095
|
+
## stock_visa_application
|
5096
|
+
|
5097
|
+
> <VisaApplicationResult> stock_visa_application(symbol, from, to)
|
5098
|
+
|
5099
|
+
H1-B Visa Application
|
5100
|
+
|
5101
|
+
Get a list of H1-B and Permanent visa applications for companies from the DOL. The data is updated quarterly.
|
5102
|
+
|
5103
|
+
### Examples
|
5104
|
+
|
5105
|
+
```ruby
|
5106
|
+
require 'time'
|
5107
|
+
require 'finnhub_ruby'
|
5108
|
+
# setup authorization
|
5109
|
+
FinnhubRuby.configure do |config|
|
5110
|
+
# Configure API key authorization: api_key
|
5111
|
+
config.api_key['api_key'] = 'YOUR API KEY'
|
5112
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
5113
|
+
# config.api_key_prefix['api_key'] = 'Bearer'
|
5114
|
+
end
|
5115
|
+
|
5116
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
5117
|
+
symbol = 'symbol_example' # String | Symbol.
|
5118
|
+
from = Date.parse('2013-10-20') # Date | From date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.
|
5119
|
+
to = Date.parse('2013-10-20') # Date | To date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.
|
5120
|
+
|
5121
|
+
begin
|
5122
|
+
# H1-B Visa Application
|
5123
|
+
result = api_instance.stock_visa_application(symbol, from, to)
|
5124
|
+
p result
|
5125
|
+
rescue FinnhubRuby::ApiError => e
|
5126
|
+
puts "Error when calling DefaultApi->stock_visa_application: #{e}"
|
5127
|
+
end
|
5128
|
+
```
|
5129
|
+
|
5130
|
+
#### Using the stock_visa_application_with_http_info variant
|
5131
|
+
|
5132
|
+
This returns an Array which contains the response data, status code and headers.
|
5133
|
+
|
5134
|
+
> <Array(<VisaApplicationResult>, Integer, Hash)> stock_visa_application_with_http_info(symbol, from, to)
|
5135
|
+
|
5136
|
+
```ruby
|
5137
|
+
begin
|
5138
|
+
# H1-B Visa Application
|
5139
|
+
data, status_code, headers = api_instance.stock_visa_application_with_http_info(symbol, from, to)
|
5140
|
+
p status_code # => 2xx
|
5141
|
+
p headers # => { ... }
|
5142
|
+
p data # => <VisaApplicationResult>
|
5143
|
+
rescue FinnhubRuby::ApiError => e
|
5144
|
+
puts "Error when calling DefaultApi->stock_visa_application_with_http_info: #{e}"
|
5145
|
+
end
|
5146
|
+
```
|
5147
|
+
|
5148
|
+
### Parameters
|
5149
|
+
|
5150
|
+
| Name | Type | Description | Notes |
|
5151
|
+
| ---- | ---- | ----------- | ----- |
|
5152
|
+
| **symbol** | **String** | Symbol. | |
|
5153
|
+
| **from** | **Date** | From date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column. | |
|
5154
|
+
| **to** | **Date** | To date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column. | |
|
5155
|
+
|
5156
|
+
### Return type
|
5157
|
+
|
5158
|
+
[**VisaApplicationResult**](VisaApplicationResult.md)
|
5159
|
+
|
5160
|
+
### Authorization
|
5161
|
+
|
5162
|
+
[api_key](../README.md#api_key)
|
5163
|
+
|
5164
|
+
### HTTP request headers
|
5165
|
+
|
5166
|
+
- **Content-Type**: Not defined
|
5167
|
+
- **Accept**: application/json
|
5168
|
+
|
5169
|
+
|
5092
5170
|
## supply_chain_relationships
|
5093
5171
|
|
5094
5172
|
> <SupplyChainRelationships> supply_chain_relationships(symbol)
|
data/docs/UsptoPatent.md
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
| **description** | **String** | Description. | [optional] |
|
11
11
|
| **filing_status** | **String** | Filing status. | [optional] |
|
12
12
|
| **patent_number** | **String** | Patent number. | [optional] |
|
13
|
-
| **publication_date** | **String** |
|
13
|
+
| **publication_date** | **String** | Publication date. | [optional] |
|
14
14
|
| **patent_type** | **String** | Patent's type. | [optional] |
|
15
15
|
| **url** | **String** | URL of the original article. | [optional] |
|
16
16
|
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# FinnhubRuby::VisaApplication
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **year** | **Integer** | Year. | [optional] |
|
8
|
+
| **quarter** | **Integer** | Quarter. | [optional] |
|
9
|
+
| **symbol** | **String** | Symbol. | [optional] |
|
10
|
+
| **case_number** | **String** | Case number. | [optional] |
|
11
|
+
| **case_status** | **String** | Case status. | [optional] |
|
12
|
+
| **received_date** | **String** | Received date. | [optional] |
|
13
|
+
| **visa_class** | **String** | Visa class. | [optional] |
|
14
|
+
| **job_title** | **String** | Job Title. | [optional] |
|
15
|
+
| **soc_code** | **String** | SOC Code. A list of SOC code can be found <a href=\"https://www.bls.gov/oes/current/oes_stru.htm\" target=\"_blank\">here</a>. | [optional] |
|
16
|
+
| **full_time_position** | **String** | Full-time position flag. | [optional] |
|
17
|
+
| **begin_date** | **String** | Job's start date. | [optional] |
|
18
|
+
| **end_date** | **String** | Job's end date. | [optional] |
|
19
|
+
| **employer_name** | **String** | Company's name. | [optional] |
|
20
|
+
| **worksite_address** | **String** | Worksite address. | [optional] |
|
21
|
+
| **worksite_city** | **String** | Worksite city. | [optional] |
|
22
|
+
| **worksite_county** | **String** | Worksite county. | [optional] |
|
23
|
+
| **worksite_state** | **String** | Worksite state. | [optional] |
|
24
|
+
| **worksite_postal_code** | **String** | Worksite postal code. | [optional] |
|
25
|
+
| **wage_range_from** | **Float** | Wage range from. | [optional] |
|
26
|
+
| **wage_range_to** | **Float** | Wage range to. | [optional] |
|
27
|
+
| **wave_unit_of_pay** | **String** | Wage unit of pay. | [optional] |
|
28
|
+
| **wage_level** | **String** | Wage level. | [optional] |
|
29
|
+
| **h1b_dependent** | **String** | H1B dependent flag. | [optional] |
|
30
|
+
|
31
|
+
## Example
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
require 'finnhub_ruby'
|
35
|
+
|
36
|
+
instance = FinnhubRuby::VisaApplication.new(
|
37
|
+
year: null,
|
38
|
+
quarter: null,
|
39
|
+
symbol: null,
|
40
|
+
case_number: null,
|
41
|
+
case_status: null,
|
42
|
+
received_date: null,
|
43
|
+
visa_class: null,
|
44
|
+
job_title: null,
|
45
|
+
soc_code: null,
|
46
|
+
full_time_position: null,
|
47
|
+
begin_date: null,
|
48
|
+
end_date: null,
|
49
|
+
employer_name: null,
|
50
|
+
worksite_address: null,
|
51
|
+
worksite_city: null,
|
52
|
+
worksite_county: null,
|
53
|
+
worksite_state: null,
|
54
|
+
worksite_postal_code: null,
|
55
|
+
wage_range_from: null,
|
56
|
+
wage_range_to: null,
|
57
|
+
wave_unit_of_pay: null,
|
58
|
+
wage_level: null,
|
59
|
+
h1b_dependent: null
|
60
|
+
)
|
61
|
+
```
|
62
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# FinnhubRuby::VisaApplicationResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **symbol** | **String** | Symbol. | [optional] |
|
8
|
+
| **data** | [**Array<VisaApplication>**](VisaApplication.md) | Array of H1b and Permanent visa applications. | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'finnhub_ruby'
|
14
|
+
|
15
|
+
instance = FinnhubRuby::VisaApplicationResult.new(
|
16
|
+
symbol: null,
|
17
|
+
data: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
Binary file
|
@@ -2352,6 +2352,7 @@ module FinnhubRuby
|
|
2352
2352
|
# Get rates for all forex pairs. Ideal for currency conversion
|
2353
2353
|
# @param [Hash] opts the optional parameters
|
2354
2354
|
# @option opts [String] :base Base currency. Default to EUR.
|
2355
|
+
# @option opts [String] :date Date. Leave blank to get the latest data.
|
2355
2356
|
# @return [Forexrates]
|
2356
2357
|
def forex_rates(opts = {})
|
2357
2358
|
data, _status_code, _headers = forex_rates_with_http_info(opts)
|
@@ -2362,6 +2363,7 @@ module FinnhubRuby
|
|
2362
2363
|
# Get rates for all forex pairs. Ideal for currency conversion
|
2363
2364
|
# @param [Hash] opts the optional parameters
|
2364
2365
|
# @option opts [String] :base Base currency. Default to EUR.
|
2366
|
+
# @option opts [String] :date Date. Leave blank to get the latest data.
|
2365
2367
|
# @return [Array<(Forexrates, Integer, Hash)>] Forexrates data, response status code and response headers
|
2366
2368
|
def forex_rates_with_http_info(opts = {})
|
2367
2369
|
if @api_client.config.debugging
|
@@ -2373,6 +2375,7 @@ module FinnhubRuby
|
|
2373
2375
|
# query parameters
|
2374
2376
|
query_params = opts[:query_params] || {}
|
2375
2377
|
query_params[:'base'] = opts[:'base'] if !opts[:'base'].nil?
|
2378
|
+
query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
|
2376
2379
|
|
2377
2380
|
# header parameters
|
2378
2381
|
header_params = opts[:header_params] || {}
|
@@ -4612,6 +4615,84 @@ module FinnhubRuby
|
|
4612
4615
|
return data, status_code, headers
|
4613
4616
|
end
|
4614
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 <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.
|
4622
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> 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 <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.
|
4634
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> 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
|
+
|
4615
4696
|
# Supply Chain Relationships
|
4616
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>
|
4617
4698
|
# @param symbol [String] Symbol.
|
@@ -0,0 +1,439 @@
|
|
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 VisaApplication
|
18
|
+
# Year.
|
19
|
+
attr_accessor :year
|
20
|
+
|
21
|
+
# Quarter.
|
22
|
+
attr_accessor :quarter
|
23
|
+
|
24
|
+
# Symbol.
|
25
|
+
attr_accessor :symbol
|
26
|
+
|
27
|
+
# Case number.
|
28
|
+
attr_accessor :case_number
|
29
|
+
|
30
|
+
# Case status.
|
31
|
+
attr_accessor :case_status
|
32
|
+
|
33
|
+
# Received date.
|
34
|
+
attr_accessor :received_date
|
35
|
+
|
36
|
+
# Visa class.
|
37
|
+
attr_accessor :visa_class
|
38
|
+
|
39
|
+
# Job Title.
|
40
|
+
attr_accessor :job_title
|
41
|
+
|
42
|
+
# SOC Code. A list of SOC code can be found <a href=\"https://www.bls.gov/oes/current/oes_stru.htm\" target=\"_blank\">here</a>.
|
43
|
+
attr_accessor :soc_code
|
44
|
+
|
45
|
+
# Full-time position flag.
|
46
|
+
attr_accessor :full_time_position
|
47
|
+
|
48
|
+
# Job's start date.
|
49
|
+
attr_accessor :begin_date
|
50
|
+
|
51
|
+
# Job's end date.
|
52
|
+
attr_accessor :end_date
|
53
|
+
|
54
|
+
# Company's name.
|
55
|
+
attr_accessor :employer_name
|
56
|
+
|
57
|
+
# Worksite address.
|
58
|
+
attr_accessor :worksite_address
|
59
|
+
|
60
|
+
# Worksite city.
|
61
|
+
attr_accessor :worksite_city
|
62
|
+
|
63
|
+
# Worksite county.
|
64
|
+
attr_accessor :worksite_county
|
65
|
+
|
66
|
+
# Worksite state.
|
67
|
+
attr_accessor :worksite_state
|
68
|
+
|
69
|
+
# Worksite postal code.
|
70
|
+
attr_accessor :worksite_postal_code
|
71
|
+
|
72
|
+
# Wage range from.
|
73
|
+
attr_accessor :wage_range_from
|
74
|
+
|
75
|
+
# Wage range to.
|
76
|
+
attr_accessor :wage_range_to
|
77
|
+
|
78
|
+
# Wage unit of pay.
|
79
|
+
attr_accessor :wave_unit_of_pay
|
80
|
+
|
81
|
+
# Wage level.
|
82
|
+
attr_accessor :wage_level
|
83
|
+
|
84
|
+
# H1B dependent flag.
|
85
|
+
attr_accessor :h1b_dependent
|
86
|
+
|
87
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
88
|
+
def self.attribute_map
|
89
|
+
{
|
90
|
+
:'year' => :'year',
|
91
|
+
:'quarter' => :'quarter',
|
92
|
+
:'symbol' => :'symbol',
|
93
|
+
:'case_number' => :'caseNumber',
|
94
|
+
:'case_status' => :'caseStatus',
|
95
|
+
:'received_date' => :'receivedDate',
|
96
|
+
:'visa_class' => :'visaClass',
|
97
|
+
:'job_title' => :'jobTitle',
|
98
|
+
:'soc_code' => :'socCode',
|
99
|
+
:'full_time_position' => :'fullTimePosition',
|
100
|
+
:'begin_date' => :'beginDate',
|
101
|
+
:'end_date' => :'endDate',
|
102
|
+
:'employer_name' => :'employerName',
|
103
|
+
:'worksite_address' => :'worksiteAddress',
|
104
|
+
:'worksite_city' => :'worksiteCity',
|
105
|
+
:'worksite_county' => :'worksiteCounty',
|
106
|
+
:'worksite_state' => :'worksiteState',
|
107
|
+
:'worksite_postal_code' => :'worksitePostalCode',
|
108
|
+
:'wage_range_from' => :'wageRangeFrom',
|
109
|
+
:'wage_range_to' => :'wageRangeTo',
|
110
|
+
:'wave_unit_of_pay' => :'waveUnitOfPay',
|
111
|
+
:'wage_level' => :'wageLevel',
|
112
|
+
:'h1b_dependent' => :'h1bDependent'
|
113
|
+
}
|
114
|
+
end
|
115
|
+
|
116
|
+
# Returns all the JSON keys this model knows about
|
117
|
+
def self.acceptable_attributes
|
118
|
+
attribute_map.values
|
119
|
+
end
|
120
|
+
|
121
|
+
# Attribute type mapping.
|
122
|
+
def self.openapi_types
|
123
|
+
{
|
124
|
+
:'year' => :'Integer',
|
125
|
+
:'quarter' => :'Integer',
|
126
|
+
:'symbol' => :'String',
|
127
|
+
:'case_number' => :'String',
|
128
|
+
:'case_status' => :'String',
|
129
|
+
:'received_date' => :'String',
|
130
|
+
:'visa_class' => :'String',
|
131
|
+
:'job_title' => :'String',
|
132
|
+
:'soc_code' => :'String',
|
133
|
+
:'full_time_position' => :'String',
|
134
|
+
:'begin_date' => :'String',
|
135
|
+
:'end_date' => :'String',
|
136
|
+
:'employer_name' => :'String',
|
137
|
+
:'worksite_address' => :'String',
|
138
|
+
:'worksite_city' => :'String',
|
139
|
+
:'worksite_county' => :'String',
|
140
|
+
:'worksite_state' => :'String',
|
141
|
+
:'worksite_postal_code' => :'String',
|
142
|
+
:'wage_range_from' => :'Float',
|
143
|
+
:'wage_range_to' => :'Float',
|
144
|
+
:'wave_unit_of_pay' => :'String',
|
145
|
+
:'wage_level' => :'String',
|
146
|
+
:'h1b_dependent' => :'String'
|
147
|
+
}
|
148
|
+
end
|
149
|
+
|
150
|
+
# List of attributes with nullable: true
|
151
|
+
def self.openapi_nullable
|
152
|
+
Set.new([
|
153
|
+
])
|
154
|
+
end
|
155
|
+
|
156
|
+
# Initializes the object
|
157
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
158
|
+
def initialize(attributes = {})
|
159
|
+
if (!attributes.is_a?(Hash))
|
160
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FinnhubRuby::VisaApplication` initialize method"
|
161
|
+
end
|
162
|
+
|
163
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
164
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
165
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
166
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FinnhubRuby::VisaApplication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
167
|
+
end
|
168
|
+
h[k.to_sym] = v
|
169
|
+
}
|
170
|
+
|
171
|
+
if attributes.key?(:'year')
|
172
|
+
self.year = attributes[:'year']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.key?(:'quarter')
|
176
|
+
self.quarter = attributes[:'quarter']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.key?(:'symbol')
|
180
|
+
self.symbol = attributes[:'symbol']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.key?(:'case_number')
|
184
|
+
self.case_number = attributes[:'case_number']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.key?(:'case_status')
|
188
|
+
self.case_status = attributes[:'case_status']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.key?(:'received_date')
|
192
|
+
self.received_date = attributes[:'received_date']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.key?(:'visa_class')
|
196
|
+
self.visa_class = attributes[:'visa_class']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.key?(:'job_title')
|
200
|
+
self.job_title = attributes[:'job_title']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.key?(:'soc_code')
|
204
|
+
self.soc_code = attributes[:'soc_code']
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.key?(:'full_time_position')
|
208
|
+
self.full_time_position = attributes[:'full_time_position']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.key?(:'begin_date')
|
212
|
+
self.begin_date = attributes[:'begin_date']
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.key?(:'end_date')
|
216
|
+
self.end_date = attributes[:'end_date']
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.key?(:'employer_name')
|
220
|
+
self.employer_name = attributes[:'employer_name']
|
221
|
+
end
|
222
|
+
|
223
|
+
if attributes.key?(:'worksite_address')
|
224
|
+
self.worksite_address = attributes[:'worksite_address']
|
225
|
+
end
|
226
|
+
|
227
|
+
if attributes.key?(:'worksite_city')
|
228
|
+
self.worksite_city = attributes[:'worksite_city']
|
229
|
+
end
|
230
|
+
|
231
|
+
if attributes.key?(:'worksite_county')
|
232
|
+
self.worksite_county = attributes[:'worksite_county']
|
233
|
+
end
|
234
|
+
|
235
|
+
if attributes.key?(:'worksite_state')
|
236
|
+
self.worksite_state = attributes[:'worksite_state']
|
237
|
+
end
|
238
|
+
|
239
|
+
if attributes.key?(:'worksite_postal_code')
|
240
|
+
self.worksite_postal_code = attributes[:'worksite_postal_code']
|
241
|
+
end
|
242
|
+
|
243
|
+
if attributes.key?(:'wage_range_from')
|
244
|
+
self.wage_range_from = attributes[:'wage_range_from']
|
245
|
+
end
|
246
|
+
|
247
|
+
if attributes.key?(:'wage_range_to')
|
248
|
+
self.wage_range_to = attributes[:'wage_range_to']
|
249
|
+
end
|
250
|
+
|
251
|
+
if attributes.key?(:'wave_unit_of_pay')
|
252
|
+
self.wave_unit_of_pay = attributes[:'wave_unit_of_pay']
|
253
|
+
end
|
254
|
+
|
255
|
+
if attributes.key?(:'wage_level')
|
256
|
+
self.wage_level = attributes[:'wage_level']
|
257
|
+
end
|
258
|
+
|
259
|
+
if attributes.key?(:'h1b_dependent')
|
260
|
+
self.h1b_dependent = attributes[:'h1b_dependent']
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
265
|
+
# @return Array for valid properties with the reasons
|
266
|
+
def list_invalid_properties
|
267
|
+
invalid_properties = Array.new
|
268
|
+
invalid_properties
|
269
|
+
end
|
270
|
+
|
271
|
+
# Check to see if the all the properties in the model are valid
|
272
|
+
# @return true if the model is valid
|
273
|
+
def valid?
|
274
|
+
true
|
275
|
+
end
|
276
|
+
|
277
|
+
# Checks equality by comparing each attribute.
|
278
|
+
# @param [Object] Object to be compared
|
279
|
+
def ==(o)
|
280
|
+
return true if self.equal?(o)
|
281
|
+
self.class == o.class &&
|
282
|
+
year == o.year &&
|
283
|
+
quarter == o.quarter &&
|
284
|
+
symbol == o.symbol &&
|
285
|
+
case_number == o.case_number &&
|
286
|
+
case_status == o.case_status &&
|
287
|
+
received_date == o.received_date &&
|
288
|
+
visa_class == o.visa_class &&
|
289
|
+
job_title == o.job_title &&
|
290
|
+
soc_code == o.soc_code &&
|
291
|
+
full_time_position == o.full_time_position &&
|
292
|
+
begin_date == o.begin_date &&
|
293
|
+
end_date == o.end_date &&
|
294
|
+
employer_name == o.employer_name &&
|
295
|
+
worksite_address == o.worksite_address &&
|
296
|
+
worksite_city == o.worksite_city &&
|
297
|
+
worksite_county == o.worksite_county &&
|
298
|
+
worksite_state == o.worksite_state &&
|
299
|
+
worksite_postal_code == o.worksite_postal_code &&
|
300
|
+
wage_range_from == o.wage_range_from &&
|
301
|
+
wage_range_to == o.wage_range_to &&
|
302
|
+
wave_unit_of_pay == o.wave_unit_of_pay &&
|
303
|
+
wage_level == o.wage_level &&
|
304
|
+
h1b_dependent == o.h1b_dependent
|
305
|
+
end
|
306
|
+
|
307
|
+
# @see the `==` method
|
308
|
+
# @param [Object] Object to be compared
|
309
|
+
def eql?(o)
|
310
|
+
self == o
|
311
|
+
end
|
312
|
+
|
313
|
+
# Calculates hash code according to all attributes.
|
314
|
+
# @return [Integer] Hash code
|
315
|
+
def hash
|
316
|
+
[year, quarter, symbol, case_number, case_status, received_date, visa_class, job_title, soc_code, full_time_position, begin_date, end_date, employer_name, worksite_address, worksite_city, worksite_county, worksite_state, worksite_postal_code, wage_range_from, wage_range_to, wave_unit_of_pay, wage_level, h1b_dependent].hash
|
317
|
+
end
|
318
|
+
|
319
|
+
# Builds the object from hash
|
320
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
321
|
+
# @return [Object] Returns the model itself
|
322
|
+
def self.build_from_hash(attributes)
|
323
|
+
new.build_from_hash(attributes)
|
324
|
+
end
|
325
|
+
|
326
|
+
# Builds the object from hash
|
327
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
328
|
+
# @return [Object] Returns the model itself
|
329
|
+
def build_from_hash(attributes)
|
330
|
+
return nil unless attributes.is_a?(Hash)
|
331
|
+
self.class.openapi_types.each_pair do |key, type|
|
332
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
333
|
+
self.send("#{key}=", nil)
|
334
|
+
elsif type =~ /\AArray<(.*)>/i
|
335
|
+
# check to ensure the input is an array given that the attribute
|
336
|
+
# is documented as an array but the input is not
|
337
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
338
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
339
|
+
end
|
340
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
341
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
self
|
346
|
+
end
|
347
|
+
|
348
|
+
# Deserializes the data based on type
|
349
|
+
# @param string type Data type
|
350
|
+
# @param string value Value to be deserialized
|
351
|
+
# @return [Object] Deserialized data
|
352
|
+
def _deserialize(type, value)
|
353
|
+
case type.to_sym
|
354
|
+
when :Time
|
355
|
+
Time.parse(value)
|
356
|
+
when :Date
|
357
|
+
Date.parse(value)
|
358
|
+
when :String
|
359
|
+
value.to_s
|
360
|
+
when :Integer
|
361
|
+
value.to_i
|
362
|
+
when :Float
|
363
|
+
value.to_f
|
364
|
+
when :Boolean
|
365
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
366
|
+
true
|
367
|
+
else
|
368
|
+
false
|
369
|
+
end
|
370
|
+
when :Object
|
371
|
+
# generic object (usually a Hash), return directly
|
372
|
+
value
|
373
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
374
|
+
inner_type = Regexp.last_match[:inner_type]
|
375
|
+
value.map { |v| _deserialize(inner_type, v) }
|
376
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
377
|
+
k_type = Regexp.last_match[:k_type]
|
378
|
+
v_type = Regexp.last_match[:v_type]
|
379
|
+
{}.tap do |hash|
|
380
|
+
value.each do |k, v|
|
381
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
382
|
+
end
|
383
|
+
end
|
384
|
+
else # model
|
385
|
+
# models (e.g. Pet) or oneOf
|
386
|
+
klass = FinnhubRuby.const_get(type)
|
387
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
388
|
+
end
|
389
|
+
end
|
390
|
+
|
391
|
+
# Returns the string representation of the object
|
392
|
+
# @return [String] String presentation of the object
|
393
|
+
def to_s
|
394
|
+
to_hash.to_s
|
395
|
+
end
|
396
|
+
|
397
|
+
# to_body is an alias to to_hash (backward compatibility)
|
398
|
+
# @return [Hash] Returns the object in the form of hash
|
399
|
+
def to_body
|
400
|
+
to_hash
|
401
|
+
end
|
402
|
+
|
403
|
+
# Returns the object in the form of hash
|
404
|
+
# @return [Hash] Returns the object in the form of hash
|
405
|
+
def to_hash
|
406
|
+
hash = {}
|
407
|
+
self.class.attribute_map.each_pair do |attr, param|
|
408
|
+
value = self.send(attr)
|
409
|
+
if value.nil?
|
410
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
411
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
412
|
+
end
|
413
|
+
|
414
|
+
hash[param] = _to_hash(value)
|
415
|
+
end
|
416
|
+
hash
|
417
|
+
end
|
418
|
+
|
419
|
+
# Outputs non-array value in the form of hash
|
420
|
+
# For object, use to_hash. Otherwise, just return the value
|
421
|
+
# @param [Object] value Any valid value
|
422
|
+
# @return [Hash] Returns the value in the form of hash
|
423
|
+
def _to_hash(value)
|
424
|
+
if value.is_a?(Array)
|
425
|
+
value.compact.map { |v| _to_hash(v) }
|
426
|
+
elsif value.is_a?(Hash)
|
427
|
+
{}.tap do |hash|
|
428
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
429
|
+
end
|
430
|
+
elsif value.respond_to? :to_hash
|
431
|
+
value.to_hash
|
432
|
+
else
|
433
|
+
value
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
end
|
438
|
+
|
439
|
+
end
|
@@ -0,0 +1,231 @@
|
|
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 VisaApplicationResult
|
18
|
+
# Symbol.
|
19
|
+
attr_accessor :symbol
|
20
|
+
|
21
|
+
# Array of H1b and Permanent visa applications.
|
22
|
+
attr_accessor :data
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'symbol' => :'symbol',
|
28
|
+
:'data' => :'data'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'symbol' => :'String',
|
41
|
+
:'data' => :'Array<VisaApplication>'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FinnhubRuby::VisaApplicationResult` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FinnhubRuby::VisaApplicationResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'symbol')
|
67
|
+
self.symbol = attributes[:'symbol']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'data')
|
71
|
+
if (value = attributes[:'data']).is_a?(Array)
|
72
|
+
self.data = value
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks equality by comparing each attribute.
|
91
|
+
# @param [Object] Object to be compared
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
symbol == o.symbol &&
|
96
|
+
data == o.data
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Integer] Hash code
|
107
|
+
def hash
|
108
|
+
[symbol, data].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def self.build_from_hash(attributes)
|
115
|
+
new.build_from_hash(attributes)
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
self.class.openapi_types.each_pair do |key, type|
|
124
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
125
|
+
self.send("#{key}=", nil)
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
127
|
+
# check to ensure the input is an array given that the attribute
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :Time
|
147
|
+
Time.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :Boolean
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
# models (e.g. Pet) or oneOf
|
178
|
+
klass = FinnhubRuby.const_get(type)
|
179
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the string representation of the object
|
184
|
+
# @return [String] String presentation of the object
|
185
|
+
def to_s
|
186
|
+
to_hash.to_s
|
187
|
+
end
|
188
|
+
|
189
|
+
# to_body is an alias to to_hash (backward compatibility)
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_body
|
192
|
+
to_hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Returns the object in the form of hash
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_hash
|
198
|
+
hash = {}
|
199
|
+
self.class.attribute_map.each_pair do |attr, param|
|
200
|
+
value = self.send(attr)
|
201
|
+
if value.nil?
|
202
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
203
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
204
|
+
end
|
205
|
+
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
data/lib/finnhub_ruby/version.rb
CHANGED
data/lib/finnhub_ruby.rb
CHANGED
@@ -130,6 +130,8 @@ require 'finnhub_ruby/models/twitter_sentiment_content'
|
|
130
130
|
require 'finnhub_ruby/models/upgrade_downgrade'
|
131
131
|
require 'finnhub_ruby/models/uspto_patent'
|
132
132
|
require 'finnhub_ruby/models/uspto_patent_result'
|
133
|
+
require 'finnhub_ruby/models/visa_application'
|
134
|
+
require 'finnhub_ruby/models/visa_application_result'
|
133
135
|
|
134
136
|
# APIs
|
135
137
|
require 'finnhub_ruby/api/default_api'
|
@@ -0,0 +1,40 @@
|
|
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::VisaApplicationResult
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe FinnhubRuby::VisaApplicationResult do
|
21
|
+
let(:instance) { FinnhubRuby::VisaApplicationResult.new }
|
22
|
+
|
23
|
+
describe 'test an instance of VisaApplicationResult' do
|
24
|
+
it 'should create an instance of VisaApplicationResult' do
|
25
|
+
expect(instance).to be_instance_of(FinnhubRuby::VisaApplicationResult)
|
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 "data"' 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
|
+
end
|
@@ -0,0 +1,166 @@
|
|
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::VisaApplication
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe FinnhubRuby::VisaApplication do
|
21
|
+
let(:instance) { FinnhubRuby::VisaApplication.new }
|
22
|
+
|
23
|
+
describe 'test an instance of VisaApplication' do
|
24
|
+
it 'should create an instance of VisaApplication' do
|
25
|
+
expect(instance).to be_instance_of(FinnhubRuby::VisaApplication)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'test attribute "year"' 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 "quarter"' 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 "symbol"' 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 "case_number"' 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 "case_status"' 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 "received_date"' 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 "visa_class"' 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
|
+
describe 'test attribute "job_title"' do
|
71
|
+
it 'should work' do
|
72
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe 'test attribute "soc_code"' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe 'test attribute "full_time_position"' do
|
83
|
+
it 'should work' do
|
84
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe 'test attribute "begin_date"' do
|
89
|
+
it 'should work' do
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
describe 'test attribute "end_date"' do
|
95
|
+
it 'should work' do
|
96
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
describe 'test attribute "employer_name"' do
|
101
|
+
it 'should work' do
|
102
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
describe 'test attribute "worksite_address"' do
|
107
|
+
it 'should work' do
|
108
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
describe 'test attribute "worksite_city"' do
|
113
|
+
it 'should work' do
|
114
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
describe 'test attribute "worksite_county"' do
|
119
|
+
it 'should work' do
|
120
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
describe 'test attribute "worksite_state"' do
|
125
|
+
it 'should work' do
|
126
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
describe 'test attribute "worksite_postal_code"' do
|
131
|
+
it 'should work' do
|
132
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
describe 'test attribute "wage_range_from"' do
|
137
|
+
it 'should work' do
|
138
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
describe 'test attribute "wage_range_to"' do
|
143
|
+
it 'should work' do
|
144
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
describe 'test attribute "wave_unit_of_pay"' do
|
149
|
+
it 'should work' do
|
150
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
describe 'test attribute "wage_level"' do
|
155
|
+
it 'should work' do
|
156
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
describe 'test attribute "h1b_dependent"' do
|
161
|
+
it 'should work' do
|
162
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
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.
|
4
|
+
version: 1.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -177,8 +177,11 @@ files:
|
|
177
177
|
- docs/UpgradeDowngrade.md
|
178
178
|
- docs/UsptoPatent.md
|
179
179
|
- docs/UsptoPatentResult.md
|
180
|
+
- docs/VisaApplication.md
|
181
|
+
- docs/VisaApplicationResult.md
|
180
182
|
- finnhub_ruby-1.1.10.gem
|
181
183
|
- finnhub_ruby-1.1.11.gem
|
184
|
+
- finnhub_ruby-1.1.12.gem
|
182
185
|
- finnhub_ruby-1.1.7.gem
|
183
186
|
- finnhub_ruby-1.1.8.gem
|
184
187
|
- finnhub_ruby-1.1.9.gem
|
@@ -319,6 +322,8 @@ files:
|
|
319
322
|
- lib/finnhub_ruby/models/upgrade_downgrade.rb
|
320
323
|
- lib/finnhub_ruby/models/uspto_patent.rb
|
321
324
|
- lib/finnhub_ruby/models/uspto_patent_result.rb
|
325
|
+
- lib/finnhub_ruby/models/visa_application.rb
|
326
|
+
- lib/finnhub_ruby/models/visa_application_result.rb
|
322
327
|
- lib/finnhub_ruby/version.rb
|
323
328
|
- release.sh
|
324
329
|
- spec/api/default_api_spec.rb
|
@@ -439,6 +444,8 @@ files:
|
|
439
444
|
- spec/models/upgrade_downgrade_spec.rb
|
440
445
|
- spec/models/uspto_patent_result_spec.rb
|
441
446
|
- spec/models/uspto_patent_spec.rb
|
447
|
+
- spec/models/visa_application_result_spec.rb
|
448
|
+
- spec/models/visa_application_spec.rb
|
442
449
|
- spec/spec_helper.rb
|
443
450
|
homepage: https://openapi-generator.tech
|
444
451
|
licenses:
|
@@ -470,6 +477,7 @@ test_files:
|
|
470
477
|
- spec/models/support_resistance_spec.rb
|
471
478
|
- spec/models/mutual_fund_sector_exposure_spec.rb
|
472
479
|
- spec/models/economic_calendar_spec.rb
|
480
|
+
- spec/models/visa_application_spec.rb
|
473
481
|
- spec/models/economic_data_info_spec.rb
|
474
482
|
- spec/models/filing_spec.rb
|
475
483
|
- spec/models/supply_chain_relationships_spec.rb
|
@@ -524,6 +532,7 @@ test_files:
|
|
524
532
|
- spec/models/etfs_holdings_spec.rb
|
525
533
|
- spec/models/aggregate_indicators_spec.rb
|
526
534
|
- spec/models/similarity_index_spec.rb
|
535
|
+
- spec/models/visa_application_result_spec.rb
|
527
536
|
- spec/models/etf_profile_data_spec.rb
|
528
537
|
- spec/models/country_metadata_spec.rb
|
529
538
|
- spec/models/news_sentiment_spec.rb
|