finnhub_ruby 1.1.11 → 1.1.12
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 +6 -3
- data/docs/DefaultApi.md +77 -1
- data/docs/StockSymbol.md +7 -1
- data/docs/UsptoPatent.md +34 -0
- data/docs/UsptoPatentResult.md +20 -0
- data/finnhub_ruby-1.1.11.gem +0 -0
- data/lib/finnhub_ruby/api/default_api.rb +80 -2
- data/lib/finnhub_ruby/models/stock_symbol.rb +34 -4
- data/lib/finnhub_ruby/models/uspto_patent.rb +301 -0
- data/lib/finnhub_ruby/models/uspto_patent_result.rb +231 -0
- data/lib/finnhub_ruby/version.rb +1 -1
- data/lib/finnhub_ruby.rb +2 -0
- data/spec/models/uspto_patent_result_spec.rb +40 -0
- data/spec/models/uspto_patent_spec.rb +82 -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: 673dff85fca4569468c9266af247714554296a6417f18caa8fb652de5cd35ca3
|
4
|
+
data.tar.gz: '06890889ff4f66e2c4675ff20b7d9912dcaccff1172d28b6093c47e2f1e892df'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d30aefb33b9d6fc51c68fa17cea7fb700da02491e1280491f847664d8b337365168eac933cf27725cb4488094a08e0d68d4bbf454dfe1d43f6740e8e42acc563
|
7
|
+
data.tar.gz: b2f491a4a784874ef91512b8384ac1d855ff03780a4ffad62e045aa23fd69229a3157cadb1ebe8df093ce94fe7c3eeac5fbd8a13ef9c0dba90a86b1f1bcdad90
|
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.12
|
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.12'
|
17
17
|
```
|
18
18
|
|
19
19
|
## Getting Started
|
@@ -67,7 +67,6 @@ puts(finnhub_client.company_eps_estimates('AMZN', {freq: 'quarterly'}))
|
|
67
67
|
puts(finnhub_client.company_executive('AAPL'))
|
68
68
|
|
69
69
|
# Company News
|
70
|
-
# Need to use _from instead of from to avoid conflict
|
71
70
|
puts(finnhub_client.company_news('AAPL', "2020-06-01", "2020-06-10"))
|
72
71
|
|
73
72
|
# Company Peers
|
@@ -251,6 +250,10 @@ puts(finnhub_client.company_ebitda_estimates('AAPL', {freq: 'quarterly'}))
|
|
251
250
|
|
252
251
|
# EBIT Estimates
|
253
252
|
puts(finnhub_client.company_ebit_estimates('TSLA', {freq: 'quarterly'}))
|
253
|
+
|
254
|
+
# USPTO
|
255
|
+
puts(finnhub_client.stock_uspto_patent('NVDA', "2020-06-01", "2021-06-10"))
|
256
|
+
|
254
257
|
```
|
255
258
|
|
256
259
|
## License
|
data/docs/DefaultApi.md
CHANGED
@@ -71,6 +71,7 @@ All URIs are relative to *https://finnhub.io/api/v1*
|
|
71
71
|
| [**stock_splits**](DefaultApi.md#stock_splits) | **GET** /stock/split | Splits |
|
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
|
+
| [**stock_uspto_patent**](DefaultApi.md#stock_uspto_patent) | **GET** /stock/uspto-patent | USPTO Patents |
|
74
75
|
| [**supply_chain_relationships**](DefaultApi.md#supply_chain_relationships) | **GET** /stock/supply-chain | Supply Chain Relationships |
|
75
76
|
| [**support_resistance**](DefaultApi.md#support_resistance) | **GET** /scan/support-resistance | Support/Resistance |
|
76
77
|
| [**symbol_search**](DefaultApi.md#symbol_search) | **GET** /search | Symbol Lookup |
|
@@ -3091,7 +3092,7 @@ end
|
|
3091
3092
|
|
3092
3093
|
International Filings
|
3093
3094
|
|
3094
|
-
List filings for international companies
|
3095
|
+
List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
|
3095
3096
|
|
3096
3097
|
### Examples
|
3097
3098
|
|
@@ -5013,6 +5014,81 @@ end
|
|
5013
5014
|
- **Accept**: application/json
|
5014
5015
|
|
5015
5016
|
|
5017
|
+
## stock_uspto_patent
|
5018
|
+
|
5019
|
+
> <UsptoPatentResult> stock_uspto_patent(symbol, from, to)
|
5020
|
+
|
5021
|
+
USPTO Patents
|
5022
|
+
|
5023
|
+
List USPTO patents for companies. Limit to 250 records per API call.
|
5024
|
+
|
5025
|
+
### Examples
|
5026
|
+
|
5027
|
+
```ruby
|
5028
|
+
require 'time'
|
5029
|
+
require 'finnhub_ruby'
|
5030
|
+
# setup authorization
|
5031
|
+
FinnhubRuby.configure do |config|
|
5032
|
+
# Configure API key authorization: api_key
|
5033
|
+
config.api_key['api_key'] = 'YOUR API KEY'
|
5034
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
5035
|
+
# config.api_key_prefix['api_key'] = 'Bearer'
|
5036
|
+
end
|
5037
|
+
|
5038
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
5039
|
+
symbol = 'symbol_example' # String | Symbol.
|
5040
|
+
from = Date.parse('2013-10-20') # Date | From date <code>YYYY-MM-DD</code>.
|
5041
|
+
to = Date.parse('2013-10-20') # Date | To date <code>YYYY-MM-DD</code>.
|
5042
|
+
|
5043
|
+
begin
|
5044
|
+
# USPTO Patents
|
5045
|
+
result = api_instance.stock_uspto_patent(symbol, from, to)
|
5046
|
+
p result
|
5047
|
+
rescue FinnhubRuby::ApiError => e
|
5048
|
+
puts "Error when calling DefaultApi->stock_uspto_patent: #{e}"
|
5049
|
+
end
|
5050
|
+
```
|
5051
|
+
|
5052
|
+
#### Using the stock_uspto_patent_with_http_info variant
|
5053
|
+
|
5054
|
+
This returns an Array which contains the response data, status code and headers.
|
5055
|
+
|
5056
|
+
> <Array(<UsptoPatentResult>, Integer, Hash)> stock_uspto_patent_with_http_info(symbol, from, to)
|
5057
|
+
|
5058
|
+
```ruby
|
5059
|
+
begin
|
5060
|
+
# USPTO Patents
|
5061
|
+
data, status_code, headers = api_instance.stock_uspto_patent_with_http_info(symbol, from, to)
|
5062
|
+
p status_code # => 2xx
|
5063
|
+
p headers # => { ... }
|
5064
|
+
p data # => <UsptoPatentResult>
|
5065
|
+
rescue FinnhubRuby::ApiError => e
|
5066
|
+
puts "Error when calling DefaultApi->stock_uspto_patent_with_http_info: #{e}"
|
5067
|
+
end
|
5068
|
+
```
|
5069
|
+
|
5070
|
+
### Parameters
|
5071
|
+
|
5072
|
+
| Name | Type | Description | Notes |
|
5073
|
+
| ---- | ---- | ----------- | ----- |
|
5074
|
+
| **symbol** | **String** | Symbol. | |
|
5075
|
+
| **from** | **Date** | From date <code>YYYY-MM-DD</code>. | |
|
5076
|
+
| **to** | **Date** | To date <code>YYYY-MM-DD</code>. | |
|
5077
|
+
|
5078
|
+
### Return type
|
5079
|
+
|
5080
|
+
[**UsptoPatentResult**](UsptoPatentResult.md)
|
5081
|
+
|
5082
|
+
### Authorization
|
5083
|
+
|
5084
|
+
[api_key](../README.md#api_key)
|
5085
|
+
|
5086
|
+
### HTTP request headers
|
5087
|
+
|
5088
|
+
- **Content-Type**: Not defined
|
5089
|
+
- **Accept**: application/json
|
5090
|
+
|
5091
|
+
|
5016
5092
|
## supply_chain_relationships
|
5017
5093
|
|
5018
5094
|
> <SupplyChainRelationships> supply_chain_relationships(symbol)
|
data/docs/StockSymbol.md
CHANGED
@@ -10,7 +10,10 @@
|
|
10
10
|
| **type** | **String** | Security type. | [optional] |
|
11
11
|
| **mic** | **String** | Primary exchange's MIC. | [optional] |
|
12
12
|
| **figi** | **String** | FIGI identifier. | [optional] |
|
13
|
+
| **share_class_figi** | **String** | Global Share Class FIGI. | [optional] |
|
13
14
|
| **currency** | **String** | Price's currency. This might be different from the reporting currency of fundamental data. | [optional] |
|
15
|
+
| **symbol2** | **String** | Alternative ticker for exchanges with multiple tickers for 1 stock such as BSE. | [optional] |
|
16
|
+
| **isin** | **String** | ISIN. This field is only available for EU stocks and selected Asian markets. Entitlement from Finnhub is required to access this field. | [optional] |
|
14
17
|
|
15
18
|
## Example
|
16
19
|
|
@@ -24,7 +27,10 @@ instance = FinnhubRuby::StockSymbol.new(
|
|
24
27
|
type: null,
|
25
28
|
mic: null,
|
26
29
|
figi: null,
|
27
|
-
|
30
|
+
share_class_figi: null,
|
31
|
+
currency: null,
|
32
|
+
symbol2: null,
|
33
|
+
isin: null
|
28
34
|
)
|
29
35
|
```
|
30
36
|
|
data/docs/UsptoPatent.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# FinnhubRuby::UsptoPatent
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **application_number** | **String** | Application Number. | [optional] |
|
8
|
+
| **company_filing_name** | **Array<String>** | Array of companies' name on the patent. | [optional] |
|
9
|
+
| **filing_date** | **String** | Filing date. | [optional] |
|
10
|
+
| **description** | **String** | Description. | [optional] |
|
11
|
+
| **filing_status** | **String** | Filing status. | [optional] |
|
12
|
+
| **patent_number** | **String** | Patent number. | [optional] |
|
13
|
+
| **publication_date** | **String** | Filing date. | [optional] |
|
14
|
+
| **patent_type** | **String** | Patent's type. | [optional] |
|
15
|
+
| **url** | **String** | URL of the original article. | [optional] |
|
16
|
+
|
17
|
+
## Example
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'finnhub_ruby'
|
21
|
+
|
22
|
+
instance = FinnhubRuby::UsptoPatent.new(
|
23
|
+
application_number: null,
|
24
|
+
company_filing_name: null,
|
25
|
+
filing_date: null,
|
26
|
+
description: null,
|
27
|
+
filing_status: null,
|
28
|
+
patent_number: null,
|
29
|
+
publication_date: null,
|
30
|
+
patent_type: null,
|
31
|
+
url: null
|
32
|
+
)
|
33
|
+
```
|
34
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# FinnhubRuby::UsptoPatentResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **symbol** | **String** | Symbol. | [optional] |
|
8
|
+
| **data** | [**Array<UsptoPatent>**](UsptoPatent.md) | Array of patents. | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'finnhub_ruby'
|
14
|
+
|
15
|
+
instance = FinnhubRuby::UsptoPatentResult.new(
|
16
|
+
symbol: null,
|
17
|
+
data: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
Binary file
|
@@ -2738,7 +2738,7 @@ module FinnhubRuby
|
|
2738
2738
|
end
|
2739
2739
|
|
2740
2740
|
# International Filings
|
2741
|
-
# List filings for international companies
|
2741
|
+
# List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
|
2742
2742
|
# @param [Hash] opts the optional parameters
|
2743
2743
|
# @option opts [String] :symbol Symbol. Leave empty to list latest filings.
|
2744
2744
|
# @option opts [String] :country Filter by country using country's 2-letter code.
|
@@ -2749,7 +2749,7 @@ module FinnhubRuby
|
|
2749
2749
|
end
|
2750
2750
|
|
2751
2751
|
# International Filings
|
2752
|
-
# List filings for international companies
|
2752
|
+
# List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
|
2753
2753
|
# @param [Hash] opts the optional parameters
|
2754
2754
|
# @option opts [String] :symbol Symbol. Leave empty to list latest filings.
|
2755
2755
|
# @option opts [String] :country Filter by country using country's 2-letter code.
|
@@ -4534,6 +4534,84 @@ module FinnhubRuby
|
|
4534
4534
|
return data, status_code, headers
|
4535
4535
|
end
|
4536
4536
|
|
4537
|
+
# USPTO Patents
|
4538
|
+
# List USPTO patents for companies. Limit to 250 records per API call.
|
4539
|
+
# @param symbol [String] Symbol.
|
4540
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>.
|
4541
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>.
|
4542
|
+
# @param [Hash] opts the optional parameters
|
4543
|
+
# @return [UsptoPatentResult]
|
4544
|
+
def stock_uspto_patent(symbol, from, to, opts = {})
|
4545
|
+
data, _status_code, _headers = stock_uspto_patent_with_http_info(symbol, from, to, opts)
|
4546
|
+
data
|
4547
|
+
end
|
4548
|
+
|
4549
|
+
# USPTO Patents
|
4550
|
+
# List USPTO patents for companies. Limit to 250 records per API call.
|
4551
|
+
# @param symbol [String] Symbol.
|
4552
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>.
|
4553
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>.
|
4554
|
+
# @param [Hash] opts the optional parameters
|
4555
|
+
# @return [Array<(UsptoPatentResult, Integer, Hash)>] UsptoPatentResult data, response status code and response headers
|
4556
|
+
def stock_uspto_patent_with_http_info(symbol, from, to, opts = {})
|
4557
|
+
if @api_client.config.debugging
|
4558
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.stock_uspto_patent ...'
|
4559
|
+
end
|
4560
|
+
# verify the required parameter 'symbol' is set
|
4561
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
4562
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_uspto_patent"
|
4563
|
+
end
|
4564
|
+
# verify the required parameter 'from' is set
|
4565
|
+
if @api_client.config.client_side_validation && from.nil?
|
4566
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_uspto_patent"
|
4567
|
+
end
|
4568
|
+
# verify the required parameter 'to' is set
|
4569
|
+
if @api_client.config.client_side_validation && to.nil?
|
4570
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_uspto_patent"
|
4571
|
+
end
|
4572
|
+
# resource path
|
4573
|
+
local_var_path = '/stock/uspto-patent'
|
4574
|
+
|
4575
|
+
# query parameters
|
4576
|
+
query_params = opts[:query_params] || {}
|
4577
|
+
query_params[:'symbol'] = symbol
|
4578
|
+
query_params[:'from'] = from
|
4579
|
+
query_params[:'to'] = to
|
4580
|
+
|
4581
|
+
# header parameters
|
4582
|
+
header_params = opts[:header_params] || {}
|
4583
|
+
# HTTP header 'Accept' (if needed)
|
4584
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4585
|
+
|
4586
|
+
# form parameters
|
4587
|
+
form_params = opts[:form_params] || {}
|
4588
|
+
|
4589
|
+
# http body (model)
|
4590
|
+
post_body = opts[:debug_body]
|
4591
|
+
|
4592
|
+
# return_type
|
4593
|
+
return_type = opts[:debug_return_type] || 'UsptoPatentResult'
|
4594
|
+
|
4595
|
+
# auth_names
|
4596
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
4597
|
+
|
4598
|
+
new_options = opts.merge(
|
4599
|
+
:operation => :"DefaultApi.stock_uspto_patent",
|
4600
|
+
:header_params => header_params,
|
4601
|
+
:query_params => query_params,
|
4602
|
+
:form_params => form_params,
|
4603
|
+
:body => post_body,
|
4604
|
+
:auth_names => auth_names,
|
4605
|
+
:return_type => return_type
|
4606
|
+
)
|
4607
|
+
|
4608
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
4609
|
+
if @api_client.config.debugging
|
4610
|
+
@api_client.config.logger.debug "API called: DefaultApi#stock_uspto_patent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4611
|
+
end
|
4612
|
+
return data, status_code, headers
|
4613
|
+
end
|
4614
|
+
|
4537
4615
|
# Supply Chain Relationships
|
4538
4616
|
# <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>
|
4539
4617
|
# @param symbol [String] Symbol.
|
@@ -33,9 +33,18 @@ module FinnhubRuby
|
|
33
33
|
# FIGI identifier.
|
34
34
|
attr_accessor :figi
|
35
35
|
|
36
|
+
# Global Share Class FIGI.
|
37
|
+
attr_accessor :share_class_figi
|
38
|
+
|
36
39
|
# Price's currency. This might be different from the reporting currency of fundamental data.
|
37
40
|
attr_accessor :currency
|
38
41
|
|
42
|
+
# Alternative ticker for exchanges with multiple tickers for 1 stock such as BSE.
|
43
|
+
attr_accessor :symbol2
|
44
|
+
|
45
|
+
# ISIN. This field is only available for EU stocks and selected Asian markets. Entitlement from Finnhub is required to access this field.
|
46
|
+
attr_accessor :isin
|
47
|
+
|
39
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
49
|
def self.attribute_map
|
41
50
|
{
|
@@ -45,7 +54,10 @@ module FinnhubRuby
|
|
45
54
|
:'type' => :'type',
|
46
55
|
:'mic' => :'mic',
|
47
56
|
:'figi' => :'figi',
|
48
|
-
:'
|
57
|
+
:'share_class_figi' => :'shareClassFIGI',
|
58
|
+
:'currency' => :'currency',
|
59
|
+
:'symbol2' => :'symbol2',
|
60
|
+
:'isin' => :'isin'
|
49
61
|
}
|
50
62
|
end
|
51
63
|
|
@@ -63,7 +75,10 @@ module FinnhubRuby
|
|
63
75
|
:'type' => :'String',
|
64
76
|
:'mic' => :'String',
|
65
77
|
:'figi' => :'String',
|
66
|
-
:'
|
78
|
+
:'share_class_figi' => :'String',
|
79
|
+
:'currency' => :'String',
|
80
|
+
:'symbol2' => :'String',
|
81
|
+
:'isin' => :'String'
|
67
82
|
}
|
68
83
|
end
|
69
84
|
|
@@ -112,9 +127,21 @@ module FinnhubRuby
|
|
112
127
|
self.figi = attributes[:'figi']
|
113
128
|
end
|
114
129
|
|
130
|
+
if attributes.key?(:'share_class_figi')
|
131
|
+
self.share_class_figi = attributes[:'share_class_figi']
|
132
|
+
end
|
133
|
+
|
115
134
|
if attributes.key?(:'currency')
|
116
135
|
self.currency = attributes[:'currency']
|
117
136
|
end
|
137
|
+
|
138
|
+
if attributes.key?(:'symbol2')
|
139
|
+
self.symbol2 = attributes[:'symbol2']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.key?(:'isin')
|
143
|
+
self.isin = attributes[:'isin']
|
144
|
+
end
|
118
145
|
end
|
119
146
|
|
120
147
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -141,7 +168,10 @@ module FinnhubRuby
|
|
141
168
|
type == o.type &&
|
142
169
|
mic == o.mic &&
|
143
170
|
figi == o.figi &&
|
144
|
-
|
171
|
+
share_class_figi == o.share_class_figi &&
|
172
|
+
currency == o.currency &&
|
173
|
+
symbol2 == o.symbol2 &&
|
174
|
+
isin == o.isin
|
145
175
|
end
|
146
176
|
|
147
177
|
# @see the `==` method
|
@@ -153,7 +183,7 @@ module FinnhubRuby
|
|
153
183
|
# Calculates hash code according to all attributes.
|
154
184
|
# @return [Integer] Hash code
|
155
185
|
def hash
|
156
|
-
[description, display_symbol, symbol, type, mic, figi, currency].hash
|
186
|
+
[description, display_symbol, symbol, type, mic, figi, share_class_figi, currency, symbol2, isin].hash
|
157
187
|
end
|
158
188
|
|
159
189
|
# Builds the object from hash
|
@@ -0,0 +1,301 @@
|
|
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 UsptoPatent
|
18
|
+
# Application Number.
|
19
|
+
attr_accessor :application_number
|
20
|
+
|
21
|
+
# Array of companies' name on the patent.
|
22
|
+
attr_accessor :company_filing_name
|
23
|
+
|
24
|
+
# Filing date.
|
25
|
+
attr_accessor :filing_date
|
26
|
+
|
27
|
+
# Description.
|
28
|
+
attr_accessor :description
|
29
|
+
|
30
|
+
# Filing status.
|
31
|
+
attr_accessor :filing_status
|
32
|
+
|
33
|
+
# Patent number.
|
34
|
+
attr_accessor :patent_number
|
35
|
+
|
36
|
+
# Filing date.
|
37
|
+
attr_accessor :publication_date
|
38
|
+
|
39
|
+
# Patent's type.
|
40
|
+
attr_accessor :patent_type
|
41
|
+
|
42
|
+
# URL of the original article.
|
43
|
+
attr_accessor :url
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
:'application_number' => :'applicationNumber',
|
49
|
+
:'company_filing_name' => :'companyFilingName',
|
50
|
+
:'filing_date' => :'filingDate',
|
51
|
+
:'description' => :'description',
|
52
|
+
:'filing_status' => :'filingStatus',
|
53
|
+
:'patent_number' => :'patentNumber',
|
54
|
+
:'publication_date' => :'publicationDate',
|
55
|
+
:'patent_type' => :'patentType',
|
56
|
+
:'url' => :'url'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Returns all the JSON keys this model knows about
|
61
|
+
def self.acceptable_attributes
|
62
|
+
attribute_map.values
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute type mapping.
|
66
|
+
def self.openapi_types
|
67
|
+
{
|
68
|
+
:'application_number' => :'String',
|
69
|
+
:'company_filing_name' => :'Array<String>',
|
70
|
+
:'filing_date' => :'String',
|
71
|
+
:'description' => :'String',
|
72
|
+
:'filing_status' => :'String',
|
73
|
+
:'patent_number' => :'String',
|
74
|
+
:'publication_date' => :'String',
|
75
|
+
:'patent_type' => :'String',
|
76
|
+
:'url' => :'String'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# List of attributes with nullable: true
|
81
|
+
def self.openapi_nullable
|
82
|
+
Set.new([
|
83
|
+
])
|
84
|
+
end
|
85
|
+
|
86
|
+
# Initializes the object
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
88
|
+
def initialize(attributes = {})
|
89
|
+
if (!attributes.is_a?(Hash))
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FinnhubRuby::UsptoPatent` initialize method"
|
91
|
+
end
|
92
|
+
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
94
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
95
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
96
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FinnhubRuby::UsptoPatent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
97
|
+
end
|
98
|
+
h[k.to_sym] = v
|
99
|
+
}
|
100
|
+
|
101
|
+
if attributes.key?(:'application_number')
|
102
|
+
self.application_number = attributes[:'application_number']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'company_filing_name')
|
106
|
+
if (value = attributes[:'company_filing_name']).is_a?(Array)
|
107
|
+
self.company_filing_name = value
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'filing_date')
|
112
|
+
self.filing_date = attributes[:'filing_date']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'description')
|
116
|
+
self.description = attributes[:'description']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'filing_status')
|
120
|
+
self.filing_status = attributes[:'filing_status']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'patent_number')
|
124
|
+
self.patent_number = attributes[:'patent_number']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'publication_date')
|
128
|
+
self.publication_date = attributes[:'publication_date']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'patent_type')
|
132
|
+
self.patent_type = attributes[:'patent_type']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'url')
|
136
|
+
self.url = attributes[:'url']
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
141
|
+
# @return Array for valid properties with the reasons
|
142
|
+
def list_invalid_properties
|
143
|
+
invalid_properties = Array.new
|
144
|
+
invalid_properties
|
145
|
+
end
|
146
|
+
|
147
|
+
# Check to see if the all the properties in the model are valid
|
148
|
+
# @return true if the model is valid
|
149
|
+
def valid?
|
150
|
+
true
|
151
|
+
end
|
152
|
+
|
153
|
+
# Checks equality by comparing each attribute.
|
154
|
+
# @param [Object] Object to be compared
|
155
|
+
def ==(o)
|
156
|
+
return true if self.equal?(o)
|
157
|
+
self.class == o.class &&
|
158
|
+
application_number == o.application_number &&
|
159
|
+
company_filing_name == o.company_filing_name &&
|
160
|
+
filing_date == o.filing_date &&
|
161
|
+
description == o.description &&
|
162
|
+
filing_status == o.filing_status &&
|
163
|
+
patent_number == o.patent_number &&
|
164
|
+
publication_date == o.publication_date &&
|
165
|
+
patent_type == o.patent_type &&
|
166
|
+
url == o.url
|
167
|
+
end
|
168
|
+
|
169
|
+
# @see the `==` method
|
170
|
+
# @param [Object] Object to be compared
|
171
|
+
def eql?(o)
|
172
|
+
self == o
|
173
|
+
end
|
174
|
+
|
175
|
+
# Calculates hash code according to all attributes.
|
176
|
+
# @return [Integer] Hash code
|
177
|
+
def hash
|
178
|
+
[application_number, company_filing_name, filing_date, description, filing_status, patent_number, publication_date, patent_type, url].hash
|
179
|
+
end
|
180
|
+
|
181
|
+
# Builds the object from hash
|
182
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
183
|
+
# @return [Object] Returns the model itself
|
184
|
+
def self.build_from_hash(attributes)
|
185
|
+
new.build_from_hash(attributes)
|
186
|
+
end
|
187
|
+
|
188
|
+
# Builds the object from hash
|
189
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
190
|
+
# @return [Object] Returns the model itself
|
191
|
+
def build_from_hash(attributes)
|
192
|
+
return nil unless attributes.is_a?(Hash)
|
193
|
+
self.class.openapi_types.each_pair do |key, type|
|
194
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
195
|
+
self.send("#{key}=", nil)
|
196
|
+
elsif type =~ /\AArray<(.*)>/i
|
197
|
+
# check to ensure the input is an array given that the attribute
|
198
|
+
# is documented as an array but the input is not
|
199
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
200
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
201
|
+
end
|
202
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
203
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
self
|
208
|
+
end
|
209
|
+
|
210
|
+
# Deserializes the data based on type
|
211
|
+
# @param string type Data type
|
212
|
+
# @param string value Value to be deserialized
|
213
|
+
# @return [Object] Deserialized data
|
214
|
+
def _deserialize(type, value)
|
215
|
+
case type.to_sym
|
216
|
+
when :Time
|
217
|
+
Time.parse(value)
|
218
|
+
when :Date
|
219
|
+
Date.parse(value)
|
220
|
+
when :String
|
221
|
+
value.to_s
|
222
|
+
when :Integer
|
223
|
+
value.to_i
|
224
|
+
when :Float
|
225
|
+
value.to_f
|
226
|
+
when :Boolean
|
227
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
228
|
+
true
|
229
|
+
else
|
230
|
+
false
|
231
|
+
end
|
232
|
+
when :Object
|
233
|
+
# generic object (usually a Hash), return directly
|
234
|
+
value
|
235
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
236
|
+
inner_type = Regexp.last_match[:inner_type]
|
237
|
+
value.map { |v| _deserialize(inner_type, v) }
|
238
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
239
|
+
k_type = Regexp.last_match[:k_type]
|
240
|
+
v_type = Regexp.last_match[:v_type]
|
241
|
+
{}.tap do |hash|
|
242
|
+
value.each do |k, v|
|
243
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
else # model
|
247
|
+
# models (e.g. Pet) or oneOf
|
248
|
+
klass = FinnhubRuby.const_get(type)
|
249
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
# Returns the string representation of the object
|
254
|
+
# @return [String] String presentation of the object
|
255
|
+
def to_s
|
256
|
+
to_hash.to_s
|
257
|
+
end
|
258
|
+
|
259
|
+
# to_body is an alias to to_hash (backward compatibility)
|
260
|
+
# @return [Hash] Returns the object in the form of hash
|
261
|
+
def to_body
|
262
|
+
to_hash
|
263
|
+
end
|
264
|
+
|
265
|
+
# Returns the object in the form of hash
|
266
|
+
# @return [Hash] Returns the object in the form of hash
|
267
|
+
def to_hash
|
268
|
+
hash = {}
|
269
|
+
self.class.attribute_map.each_pair do |attr, param|
|
270
|
+
value = self.send(attr)
|
271
|
+
if value.nil?
|
272
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
273
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
274
|
+
end
|
275
|
+
|
276
|
+
hash[param] = _to_hash(value)
|
277
|
+
end
|
278
|
+
hash
|
279
|
+
end
|
280
|
+
|
281
|
+
# Outputs non-array value in the form of hash
|
282
|
+
# For object, use to_hash. Otherwise, just return the value
|
283
|
+
# @param [Object] value Any valid value
|
284
|
+
# @return [Hash] Returns the value in the form of hash
|
285
|
+
def _to_hash(value)
|
286
|
+
if value.is_a?(Array)
|
287
|
+
value.compact.map { |v| _to_hash(v) }
|
288
|
+
elsif value.is_a?(Hash)
|
289
|
+
{}.tap do |hash|
|
290
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
291
|
+
end
|
292
|
+
elsif value.respond_to? :to_hash
|
293
|
+
value.to_hash
|
294
|
+
else
|
295
|
+
value
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
end
|
300
|
+
|
301
|
+
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 UsptoPatentResult
|
18
|
+
# Symbol.
|
19
|
+
attr_accessor :symbol
|
20
|
+
|
21
|
+
# Array of patents.
|
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<UsptoPatent>'
|
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::UsptoPatentResult` 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::UsptoPatentResult`. 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
@@ -128,6 +128,8 @@ require 'finnhub_ruby/models/transcript_participant'
|
|
128
128
|
require 'finnhub_ruby/models/trend'
|
129
129
|
require 'finnhub_ruby/models/twitter_sentiment_content'
|
130
130
|
require 'finnhub_ruby/models/upgrade_downgrade'
|
131
|
+
require 'finnhub_ruby/models/uspto_patent'
|
132
|
+
require 'finnhub_ruby/models/uspto_patent_result'
|
131
133
|
|
132
134
|
# APIs
|
133
135
|
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::UsptoPatentResult
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe FinnhubRuby::UsptoPatentResult do
|
21
|
+
let(:instance) { FinnhubRuby::UsptoPatentResult.new }
|
22
|
+
|
23
|
+
describe 'test an instance of UsptoPatentResult' do
|
24
|
+
it 'should create an instance of UsptoPatentResult' do
|
25
|
+
expect(instance).to be_instance_of(FinnhubRuby::UsptoPatentResult)
|
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,82 @@
|
|
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::UsptoPatent
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe FinnhubRuby::UsptoPatent do
|
21
|
+
let(:instance) { FinnhubRuby::UsptoPatent.new }
|
22
|
+
|
23
|
+
describe 'test an instance of UsptoPatent' do
|
24
|
+
it 'should create an instance of UsptoPatent' do
|
25
|
+
expect(instance).to be_instance_of(FinnhubRuby::UsptoPatent)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'test attribute "application_number"' 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 "company_filing_name"' 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 "filing_date"' 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 "description"' 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 "filing_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 "patent_number"' 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 "publication_date"' 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 "patent_type"' 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 "url"' 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
|
+
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.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -175,7 +175,10 @@ files:
|
|
175
175
|
- docs/Trend.md
|
176
176
|
- docs/TwitterSentimentContent.md
|
177
177
|
- docs/UpgradeDowngrade.md
|
178
|
+
- docs/UsptoPatent.md
|
179
|
+
- docs/UsptoPatentResult.md
|
178
180
|
- finnhub_ruby-1.1.10.gem
|
181
|
+
- finnhub_ruby-1.1.11.gem
|
179
182
|
- finnhub_ruby-1.1.7.gem
|
180
183
|
- finnhub_ruby-1.1.8.gem
|
181
184
|
- finnhub_ruby-1.1.9.gem
|
@@ -314,6 +317,8 @@ files:
|
|
314
317
|
- lib/finnhub_ruby/models/trend.rb
|
315
318
|
- lib/finnhub_ruby/models/twitter_sentiment_content.rb
|
316
319
|
- lib/finnhub_ruby/models/upgrade_downgrade.rb
|
320
|
+
- lib/finnhub_ruby/models/uspto_patent.rb
|
321
|
+
- lib/finnhub_ruby/models/uspto_patent_result.rb
|
317
322
|
- lib/finnhub_ruby/version.rb
|
318
323
|
- release.sh
|
319
324
|
- spec/api/default_api_spec.rb
|
@@ -432,6 +437,8 @@ files:
|
|
432
437
|
- spec/models/trend_spec.rb
|
433
438
|
- spec/models/twitter_sentiment_content_spec.rb
|
434
439
|
- spec/models/upgrade_downgrade_spec.rb
|
440
|
+
- spec/models/uspto_patent_result_spec.rb
|
441
|
+
- spec/models/uspto_patent_spec.rb
|
435
442
|
- spec/spec_helper.rb
|
436
443
|
homepage: https://openapi-generator.tech
|
437
444
|
licenses:
|
@@ -567,7 +574,9 @@ test_files:
|
|
567
574
|
- spec/models/dividends_spec.rb
|
568
575
|
- spec/models/transcript_content_spec.rb
|
569
576
|
- spec/models/international_filing_spec.rb
|
577
|
+
- spec/models/uspto_patent_result_spec.rb
|
570
578
|
- spec/models/reddit_sentiment_content_spec.rb
|
579
|
+
- spec/models/uspto_patent_spec.rb
|
571
580
|
- spec/models/fund_ownership_spec.rb
|
572
581
|
- spec/models/sec_sentiment_analysis_spec.rb
|
573
582
|
- spec/models/twitter_sentiment_content_spec.rb
|