finnhub_ruby 1.1.5 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +48 -11
  3. data/docs/CompanyESG.md +28 -0
  4. data/docs/CompanyEarningsQualityScore.md +22 -0
  5. data/docs/CompanyEarningsQualityScoreData.md +30 -0
  6. data/docs/CompanyProfile.md +5 -5
  7. data/docs/CountryMetadata.md +5 -1
  8. data/docs/DefaultApi.md +155 -13
  9. data/docs/EarningRelease.md +2 -2
  10. data/docs/EarningsEstimates.md +1 -1
  11. data/docs/EarningsEstimatesInfo.md +26 -0
  12. data/docs/IPOEvent.md +2 -2
  13. data/docs/KeyCustomersSuppliers.md +13 -1
  14. data/docs/RevenueEstimates.md +1 -1
  15. data/docs/RevenueEstimatesInfo.md +26 -0
  16. data/docs/Sentiment.md +2 -2
  17. data/docs/SimilarityIndex.md +1 -1
  18. data/docs/SimilarityIndexInfo.md +40 -0
  19. data/docs/Transactions.md +1 -1
  20. data/finnhub_ruby-1.1.7.gem +0 -0
  21. data/finnhub_ruby-1.1.8.gem +0 -0
  22. data/finnhub_ruby.gemspec +1 -1
  23. data/lib/finnhub_ruby/api/default_api.rb +144 -12
  24. data/lib/finnhub_ruby/api_client.rb +1 -1
  25. data/lib/finnhub_ruby/api_error.rb +1 -1
  26. data/lib/finnhub_ruby/configuration.rb +1 -1
  27. data/lib/finnhub_ruby/models/aggregate_indicators.rb +1 -1
  28. data/lib/finnhub_ruby/models/basic_financials.rb +1 -1
  29. data/lib/finnhub_ruby/models/breakdown_item.rb +1 -1
  30. data/lib/finnhub_ruby/models/company.rb +1 -1
  31. data/lib/finnhub_ruby/models/company_earnings_quality_score.rb +241 -0
  32. data/lib/finnhub_ruby/models/company_earnings_quality_score_data.rb +279 -0
  33. data/lib/finnhub_ruby/models/company_esg.rb +268 -0
  34. data/lib/finnhub_ruby/models/company_executive.rb +1 -1
  35. data/lib/finnhub_ruby/models/company_news.rb +1 -1
  36. data/lib/finnhub_ruby/models/company_news_statistics.rb +1 -1
  37. data/lib/finnhub_ruby/models/company_profile.rb +6 -6
  38. data/lib/finnhub_ruby/models/company_profile2.rb +1 -1
  39. data/lib/finnhub_ruby/models/country_metadata.rb +25 -5
  40. data/lib/finnhub_ruby/models/covid_info.rb +1 -1
  41. data/lib/finnhub_ruby/models/crypto_candles.rb +1 -1
  42. data/lib/finnhub_ruby/models/crypto_symbol.rb +1 -1
  43. data/lib/finnhub_ruby/models/development.rb +1 -1
  44. data/lib/finnhub_ruby/models/dividends.rb +1 -1
  45. data/lib/finnhub_ruby/models/dividends2.rb +1 -1
  46. data/lib/finnhub_ruby/models/dividends2_info.rb +1 -1
  47. data/lib/finnhub_ruby/models/earning_release.rb +3 -3
  48. data/lib/finnhub_ruby/models/earning_result.rb +1 -1
  49. data/lib/finnhub_ruby/models/earnings_calendar.rb +1 -1
  50. data/lib/finnhub_ruby/models/earnings_call_transcripts.rb +1 -1
  51. data/lib/finnhub_ruby/models/earnings_call_transcripts_list.rb +1 -1
  52. data/lib/finnhub_ruby/models/earnings_estimates.rb +2 -2
  53. data/lib/finnhub_ruby/models/earnings_estimates_info.rb +259 -0
  54. data/lib/finnhub_ruby/models/economic_calendar.rb +1 -1
  55. data/lib/finnhub_ruby/models/economic_code.rb +1 -1
  56. data/lib/finnhub_ruby/models/economic_data.rb +1 -1
  57. data/lib/finnhub_ruby/models/economic_data_info.rb +1 -1
  58. data/lib/finnhub_ruby/models/economic_event.rb +1 -1
  59. data/lib/finnhub_ruby/models/etf_country_exposure_data.rb +1 -1
  60. data/lib/finnhub_ruby/models/etf_holdings_data.rb +1 -1
  61. data/lib/finnhub_ruby/models/etf_profile_data.rb +1 -1
  62. data/lib/finnhub_ruby/models/etf_sector_exposure_data.rb +1 -1
  63. data/lib/finnhub_ruby/models/etfs_country_exposure.rb +1 -1
  64. data/lib/finnhub_ruby/models/etfs_holdings.rb +1 -1
  65. data/lib/finnhub_ruby/models/etfs_profile.rb +1 -1
  66. data/lib/finnhub_ruby/models/etfs_sector_exposure.rb +1 -1
  67. data/lib/finnhub_ruby/models/fda_comittee_meeting.rb +1 -1
  68. data/lib/finnhub_ruby/models/filing.rb +1 -1
  69. data/lib/finnhub_ruby/models/filing_sentiment.rb +1 -1
  70. data/lib/finnhub_ruby/models/financial_statements.rb +1 -1
  71. data/lib/finnhub_ruby/models/financials_as_reported.rb +1 -1
  72. data/lib/finnhub_ruby/models/forex_candles.rb +1 -1
  73. data/lib/finnhub_ruby/models/forex_symbol.rb +1 -1
  74. data/lib/finnhub_ruby/models/forexrates.rb +1 -1
  75. data/lib/finnhub_ruby/models/fund_ownership.rb +1 -1
  76. data/lib/finnhub_ruby/models/fund_ownership_info.rb +1 -1
  77. data/lib/finnhub_ruby/models/historical_nbbo.rb +1 -1
  78. data/lib/finnhub_ruby/models/index_historical_constituent.rb +1 -1
  79. data/lib/finnhub_ruby/models/indicator.rb +1 -1
  80. data/lib/finnhub_ruby/models/indices_constituents.rb +1 -1
  81. data/lib/finnhub_ruby/models/indices_historical_constituents.rb +1 -1
  82. data/lib/finnhub_ruby/models/insider_transactions.rb +1 -1
  83. data/lib/finnhub_ruby/models/international_filing.rb +1 -1
  84. data/lib/finnhub_ruby/models/investment_theme_portfolio.rb +1 -1
  85. data/lib/finnhub_ruby/models/investment_themes.rb +1 -1
  86. data/lib/finnhub_ruby/models/ipo_calendar.rb +1 -1
  87. data/lib/finnhub_ruby/models/ipo_event.rb +3 -3
  88. data/lib/finnhub_ruby/models/key_customers_suppliers.rb +65 -5
  89. data/lib/finnhub_ruby/models/last_bid_ask.rb +1 -1
  90. data/lib/finnhub_ruby/models/market_news.rb +1 -1
  91. data/lib/finnhub_ruby/models/mutual_fund_country_exposure.rb +1 -1
  92. data/lib/finnhub_ruby/models/mutual_fund_country_exposure_data.rb +1 -1
  93. data/lib/finnhub_ruby/models/mutual_fund_holdings.rb +1 -1
  94. data/lib/finnhub_ruby/models/mutual_fund_holdings_data.rb +1 -1
  95. data/lib/finnhub_ruby/models/mutual_fund_profile.rb +1 -1
  96. data/lib/finnhub_ruby/models/mutual_fund_profile_data.rb +1 -1
  97. data/lib/finnhub_ruby/models/mutual_fund_sector_exposure.rb +1 -1
  98. data/lib/finnhub_ruby/models/mutual_fund_sector_exposure_data.rb +1 -1
  99. data/lib/finnhub_ruby/models/news_sentiment.rb +1 -1
  100. data/lib/finnhub_ruby/models/ownership.rb +1 -1
  101. data/lib/finnhub_ruby/models/ownership_info.rb +1 -1
  102. data/lib/finnhub_ruby/models/pattern_recognition.rb +1 -1
  103. data/lib/finnhub_ruby/models/press_release.rb +1 -1
  104. data/lib/finnhub_ruby/models/price_target.rb +1 -1
  105. data/lib/finnhub_ruby/models/quote.rb +1 -1
  106. data/lib/finnhub_ruby/models/recommendation_trend.rb +1 -1
  107. data/lib/finnhub_ruby/models/reddit_sentiment_content.rb +1 -1
  108. data/lib/finnhub_ruby/models/report.rb +1 -1
  109. data/lib/finnhub_ruby/models/revenue_breakdown.rb +1 -1
  110. data/lib/finnhub_ruby/models/revenue_estimates.rb +2 -2
  111. data/lib/finnhub_ruby/models/revenue_estimates_info.rb +259 -0
  112. data/lib/finnhub_ruby/models/sec_sentiment_analysis.rb +1 -1
  113. data/lib/finnhub_ruby/models/sentiment.rb +3 -3
  114. data/lib/finnhub_ruby/models/similarity_index.rb +2 -2
  115. data/lib/finnhub_ruby/models/similarity_index_info.rb +329 -0
  116. data/lib/finnhub_ruby/models/social_sentiment.rb +1 -1
  117. data/lib/finnhub_ruby/models/split.rb +1 -1
  118. data/lib/finnhub_ruby/models/stock_candles.rb +1 -1
  119. data/lib/finnhub_ruby/models/stock_symbol.rb +1 -1
  120. data/lib/finnhub_ruby/models/stock_transcripts.rb +1 -1
  121. data/lib/finnhub_ruby/models/supply_chain_relationships.rb +1 -1
  122. data/lib/finnhub_ruby/models/support_resistance.rb +1 -1
  123. data/lib/finnhub_ruby/models/symbol_lookup.rb +1 -1
  124. data/lib/finnhub_ruby/models/symbol_lookup_info.rb +1 -1
  125. data/lib/finnhub_ruby/models/technical_analysis.rb +1 -1
  126. data/lib/finnhub_ruby/models/tick_data.rb +1 -1
  127. data/lib/finnhub_ruby/models/transactions.rb +2 -2
  128. data/lib/finnhub_ruby/models/transcript_content.rb +1 -1
  129. data/lib/finnhub_ruby/models/transcript_participant.rb +1 -1
  130. data/lib/finnhub_ruby/models/trend.rb +1 -1
  131. data/lib/finnhub_ruby/models/twitter_sentiment_content.rb +1 -1
  132. data/lib/finnhub_ruby/models/upgrade_downgrade.rb +1 -1
  133. data/lib/finnhub_ruby/version.rb +2 -2
  134. data/lib/finnhub_ruby.rb +7 -3
  135. data/release.sh +12 -7
  136. data/spec/api_client_spec.rb +1 -1
  137. data/spec/configuration_spec.rb +1 -1
  138. data/spec/models/company_earnings_quality_score_data_spec.rb +70 -0
  139. data/spec/models/company_earnings_quality_score_spec.rb +46 -0
  140. data/spec/models/company_esg_spec.rb +64 -0
  141. data/spec/models/earnings_estimates_info_spec.rb +58 -0
  142. data/spec/models/revenue_estimates_info_spec.rb +58 -0
  143. data/spec/models/similarity_index_info_spec.rb +100 -0
  144. data/spec/spec_helper.rb +1 -1
  145. metadata +28 -3
  146. data/finnhub_ruby-1.1.4.gem +0 -0
@@ -0,0 +1,279 @@
1
+ =begin
2
+ #Finnhub API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FinnhubRuby
17
+ class CompanyEarningsQualityScoreData
18
+ # Period
19
+ attr_accessor :period
20
+
21
+ # Growth Score
22
+ attr_accessor :growth
23
+
24
+ # Profitability Score
25
+ attr_accessor :profitability
26
+
27
+ # Cash Generation and Capital Allocation
28
+ attr_accessor :cash_generation_capital_allocation
29
+
30
+ # Leverage Score
31
+ attr_accessor :leverage
32
+
33
+ # Total Score
34
+ attr_accessor :score
35
+
36
+ # Letter Score
37
+ attr_accessor :letter_score
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'period' => :'period',
43
+ :'growth' => :'growth',
44
+ :'profitability' => :'profitability',
45
+ :'cash_generation_capital_allocation' => :'cashGenerationCapitalAllocation',
46
+ :'leverage' => :'leverage',
47
+ :'score' => :'score',
48
+ :'letter_score' => :'letterScore'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'period' => :'String',
61
+ :'growth' => :'Float',
62
+ :'profitability' => :'Float',
63
+ :'cash_generation_capital_allocation' => :'Float',
64
+ :'leverage' => :'Float',
65
+ :'score' => :'Float',
66
+ :'letter_score' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FinnhubRuby::CompanyEarningsQualityScoreData` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FinnhubRuby::CompanyEarningsQualityScoreData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'period')
92
+ self.period = attributes[:'period']
93
+ end
94
+
95
+ if attributes.key?(:'growth')
96
+ self.growth = attributes[:'growth']
97
+ end
98
+
99
+ if attributes.key?(:'profitability')
100
+ self.profitability = attributes[:'profitability']
101
+ end
102
+
103
+ if attributes.key?(:'cash_generation_capital_allocation')
104
+ self.cash_generation_capital_allocation = attributes[:'cash_generation_capital_allocation']
105
+ end
106
+
107
+ if attributes.key?(:'leverage')
108
+ self.leverage = attributes[:'leverage']
109
+ end
110
+
111
+ if attributes.key?(:'score')
112
+ self.score = attributes[:'score']
113
+ end
114
+
115
+ if attributes.key?(:'letter_score')
116
+ self.letter_score = attributes[:'letter_score']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ period == o.period &&
139
+ growth == o.growth &&
140
+ profitability == o.profitability &&
141
+ cash_generation_capital_allocation == o.cash_generation_capital_allocation &&
142
+ leverage == o.leverage &&
143
+ score == o.score &&
144
+ letter_score == o.letter_score
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [period, growth, profitability, cash_generation_capital_allocation, leverage, score, letter_score].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ new.build_from_hash(attributes)
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def build_from_hash(attributes)
170
+ return nil unless attributes.is_a?(Hash)
171
+ self.class.openapi_types.each_pair do |key, type|
172
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
173
+ self.send("#{key}=", nil)
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
178
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
179
+ end
180
+ elsif !attributes[self.class.attribute_map[key]].nil?
181
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
182
+ end
183
+ end
184
+
185
+ self
186
+ end
187
+
188
+ # Deserializes the data based on type
189
+ # @param string type Data type
190
+ # @param string value Value to be deserialized
191
+ # @return [Object] Deserialized data
192
+ def _deserialize(type, value)
193
+ case type.to_sym
194
+ when :Time
195
+ Time.parse(value)
196
+ when :Date
197
+ Date.parse(value)
198
+ when :String
199
+ value.to_s
200
+ when :Integer
201
+ value.to_i
202
+ when :Float
203
+ value.to_f
204
+ when :Boolean
205
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
206
+ true
207
+ else
208
+ false
209
+ end
210
+ when :Object
211
+ # generic object (usually a Hash), return directly
212
+ value
213
+ when /\AArray<(?<inner_type>.+)>\z/
214
+ inner_type = Regexp.last_match[:inner_type]
215
+ value.map { |v| _deserialize(inner_type, v) }
216
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
217
+ k_type = Regexp.last_match[:k_type]
218
+ v_type = Regexp.last_match[:v_type]
219
+ {}.tap do |hash|
220
+ value.each do |k, v|
221
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
222
+ end
223
+ end
224
+ else # model
225
+ # models (e.g. Pet) or oneOf
226
+ klass = FinnhubRuby.const_get(type)
227
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
228
+ end
229
+ end
230
+
231
+ # Returns the string representation of the object
232
+ # @return [String] String presentation of the object
233
+ def to_s
234
+ to_hash.to_s
235
+ end
236
+
237
+ # to_body is an alias to to_hash (backward compatibility)
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_body
240
+ to_hash
241
+ end
242
+
243
+ # Returns the object in the form of hash
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_hash
246
+ hash = {}
247
+ self.class.attribute_map.each_pair do |attr, param|
248
+ value = self.send(attr)
249
+ if value.nil?
250
+ is_nullable = self.class.openapi_nullable.include?(attr)
251
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
252
+ end
253
+
254
+ hash[param] = _to_hash(value)
255
+ end
256
+ hash
257
+ end
258
+
259
+ # Outputs non-array value in the form of hash
260
+ # For object, use to_hash. Otherwise, just return the value
261
+ # @param [Object] value Any valid value
262
+ # @return [Hash] Returns the value in the form of hash
263
+ def _to_hash(value)
264
+ if value.is_a?(Array)
265
+ value.compact.map { |v| _to_hash(v) }
266
+ elsif value.is_a?(Hash)
267
+ {}.tap do |hash|
268
+ value.each { |k, v| hash[k] = _to_hash(v) }
269
+ end
270
+ elsif value.respond_to? :to_hash
271
+ value.to_hash
272
+ else
273
+ value
274
+ end
275
+ end
276
+
277
+ end
278
+
279
+ end
@@ -0,0 +1,268 @@
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 CompanyESG
18
+ # symbol
19
+ attr_accessor :symbol
20
+
21
+ # Total ESG Score
22
+ attr_accessor :total_esg_score
23
+
24
+ # Environment Score
25
+ attr_accessor :environment_score
26
+
27
+ # Governance Score
28
+ attr_accessor :governance_score
29
+
30
+ # Social Score
31
+ attr_accessor :social_score
32
+
33
+ attr_accessor :data
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'symbol' => :'symbol',
39
+ :'total_esg_score' => :'totalESGScore',
40
+ :'environment_score' => :'environmentScore',
41
+ :'governance_score' => :'governanceScore',
42
+ :'social_score' => :'socialScore',
43
+ :'data' => :'data'
44
+ }
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'symbol' => :'String',
56
+ :'total_esg_score' => :'Float',
57
+ :'environment_score' => :'Float',
58
+ :'governance_score' => :'Float',
59
+ :'social_score' => :'Float',
60
+ :'data' => :'Object'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FinnhubRuby::CompanyESG` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FinnhubRuby::CompanyESG`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'symbol')
86
+ self.symbol = attributes[:'symbol']
87
+ end
88
+
89
+ if attributes.key?(:'total_esg_score')
90
+ self.total_esg_score = attributes[:'total_esg_score']
91
+ end
92
+
93
+ if attributes.key?(:'environment_score')
94
+ self.environment_score = attributes[:'environment_score']
95
+ end
96
+
97
+ if attributes.key?(:'governance_score')
98
+ self.governance_score = attributes[:'governance_score']
99
+ end
100
+
101
+ if attributes.key?(:'social_score')
102
+ self.social_score = attributes[:'social_score']
103
+ end
104
+
105
+ if attributes.key?(:'data')
106
+ self.data = attributes[:'data']
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ invalid_properties = Array.new
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ true
121
+ end
122
+
123
+ # Checks equality by comparing each attribute.
124
+ # @param [Object] Object to be compared
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ symbol == o.symbol &&
129
+ total_esg_score == o.total_esg_score &&
130
+ environment_score == o.environment_score &&
131
+ governance_score == o.governance_score &&
132
+ social_score == o.social_score &&
133
+ data == o.data
134
+ end
135
+
136
+ # @see the `==` method
137
+ # @param [Object] Object to be compared
138
+ def eql?(o)
139
+ self == o
140
+ end
141
+
142
+ # Calculates hash code according to all attributes.
143
+ # @return [Integer] Hash code
144
+ def hash
145
+ [symbol, total_esg_score, environment_score, governance_score, social_score, data].hash
146
+ end
147
+
148
+ # Builds the object from hash
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ # @return [Object] Returns the model itself
151
+ def self.build_from_hash(attributes)
152
+ new.build_from_hash(attributes)
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+ self.class.openapi_types.each_pair do |key, type|
161
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
162
+ self.send("#{key}=", nil)
163
+ elsif type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the attribute
165
+ # is documented as an array but the input is not
166
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
167
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
168
+ end
169
+ elsif !attributes[self.class.attribute_map[key]].nil?
170
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
171
+ end
172
+ end
173
+
174
+ self
175
+ end
176
+
177
+ # Deserializes the data based on type
178
+ # @param string type Data type
179
+ # @param string value Value to be deserialized
180
+ # @return [Object] Deserialized data
181
+ def _deserialize(type, value)
182
+ case type.to_sym
183
+ when :Time
184
+ Time.parse(value)
185
+ when :Date
186
+ Date.parse(value)
187
+ when :String
188
+ value.to_s
189
+ when :Integer
190
+ value.to_i
191
+ when :Float
192
+ value.to_f
193
+ when :Boolean
194
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
195
+ true
196
+ else
197
+ false
198
+ end
199
+ when :Object
200
+ # generic object (usually a Hash), return directly
201
+ value
202
+ when /\AArray<(?<inner_type>.+)>\z/
203
+ inner_type = Regexp.last_match[:inner_type]
204
+ value.map { |v| _deserialize(inner_type, v) }
205
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
206
+ k_type = Regexp.last_match[:k_type]
207
+ v_type = Regexp.last_match[:v_type]
208
+ {}.tap do |hash|
209
+ value.each do |k, v|
210
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
211
+ end
212
+ end
213
+ else # model
214
+ # models (e.g. Pet) or oneOf
215
+ klass = FinnhubRuby.const_get(type)
216
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
217
+ end
218
+ end
219
+
220
+ # Returns the string representation of the object
221
+ # @return [String] String presentation of the object
222
+ def to_s
223
+ to_hash.to_s
224
+ end
225
+
226
+ # to_body is an alias to to_hash (backward compatibility)
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_body
229
+ to_hash
230
+ end
231
+
232
+ # Returns the object in the form of hash
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_hash
235
+ hash = {}
236
+ self.class.attribute_map.each_pair do |attr, param|
237
+ value = self.send(attr)
238
+ if value.nil?
239
+ is_nullable = self.class.openapi_nullable.include?(attr)
240
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
241
+ end
242
+
243
+ hash[param] = _to_hash(value)
244
+ end
245
+ hash
246
+ end
247
+
248
+ # Outputs non-array value in the form of hash
249
+ # For object, use to_hash. Otherwise, just return the value
250
+ # @param [Object] value Any valid value
251
+ # @return [Hash] Returns the value in the form of hash
252
+ def _to_hash(value)
253
+ if value.is_a?(Array)
254
+ value.compact.map { |v| _to_hash(v) }
255
+ elsif value.is_a?(Hash)
256
+ {}.tap do |hash|
257
+ value.each { |k, v| hash[k] = _to_hash(v) }
258
+ end
259
+ elsif value.respond_to? :to_hash
260
+ value.to_hash
261
+ else
262
+ value
263
+ end
264
+ end
265
+
266
+ end
267
+
268
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0
9
+ OpenAPI Generator version: 5.2.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0
9
+ OpenAPI Generator version: 5.2.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0
9
+ OpenAPI Generator version: 5.2.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0
9
+ OpenAPI Generator version: 5.2.1
10
10
 
11
11
  =end
12
12
 
@@ -39,16 +39,16 @@ module FinnhubRuby
39
39
  # Listed exchange.
40
40
  attr_accessor :exchange
41
41
 
42
- # GICS industry group.
42
+ # Industry group.
43
43
  attr_accessor :ggroup
44
44
 
45
- # GICS industry.
45
+ # Industry.
46
46
  attr_accessor :gind
47
47
 
48
- # GICS sector.
48
+ # Sector.
49
49
  attr_accessor :gsector
50
50
 
51
- # GICS sub-industry.
51
+ # Sub-industry.
52
52
  attr_accessor :gsubind
53
53
 
54
54
  # ISIN number.
@@ -166,7 +166,7 @@ module FinnhubRuby
166
166
  :'ipo' => :'Date',
167
167
  :'market_capitalization' => :'Float',
168
168
  :'share_outstanding' => :'Float',
169
- :'employee_total' => :'Integer',
169
+ :'employee_total' => :'Float',
170
170
  :'logo' => :'String',
171
171
  :'finnhub_industry' => :'String'
172
172
  }
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0
9
+ OpenAPI Generator version: 5.2.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0
9
+ OpenAPI Generator version: 5.2.1
10
10
 
11
11
  =end
12
12
 
@@ -33,6 +33,12 @@ module FinnhubRuby
33
33
  # Currency code
34
34
  attr_accessor :currency_code
35
35
 
36
+ # Region
37
+ attr_accessor :region
38
+
39
+ # Sub-Region
40
+ attr_accessor :sub_region
41
+
36
42
  # Attribute mapping from ruby-style variable name to JSON key.
37
43
  def self.attribute_map
38
44
  {
@@ -41,7 +47,9 @@ module FinnhubRuby
41
47
  :'code3' => :'code3',
42
48
  :'code_no' => :'codeNo',
43
49
  :'currency' => :'currency',
44
- :'currency_code' => :'currencyCode'
50
+ :'currency_code' => :'currencyCode',
51
+ :'region' => :'region',
52
+ :'sub_region' => :'subRegion'
45
53
  }
46
54
  end
47
55
 
@@ -58,7 +66,9 @@ module FinnhubRuby
58
66
  :'code3' => :'String',
59
67
  :'code_no' => :'String',
60
68
  :'currency' => :'String',
61
- :'currency_code' => :'String'
69
+ :'currency_code' => :'String',
70
+ :'region' => :'String',
71
+ :'sub_region' => :'String'
62
72
  }
63
73
  end
64
74
 
@@ -106,6 +116,14 @@ module FinnhubRuby
106
116
  if attributes.key?(:'currency_code')
107
117
  self.currency_code = attributes[:'currency_code']
108
118
  end
119
+
120
+ if attributes.key?(:'region')
121
+ self.region = attributes[:'region']
122
+ end
123
+
124
+ if attributes.key?(:'sub_region')
125
+ self.sub_region = attributes[:'sub_region']
126
+ end
109
127
  end
110
128
 
111
129
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -131,7 +149,9 @@ module FinnhubRuby
131
149
  code3 == o.code3 &&
132
150
  code_no == o.code_no &&
133
151
  currency == o.currency &&
134
- currency_code == o.currency_code
152
+ currency_code == o.currency_code &&
153
+ region == o.region &&
154
+ sub_region == o.sub_region
135
155
  end
136
156
 
137
157
  # @see the `==` method
@@ -143,7 +163,7 @@ module FinnhubRuby
143
163
  # Calculates hash code according to all attributes.
144
164
  # @return [Integer] Hash code
145
165
  def hash
146
- [country, code2, code3, code_no, currency, currency_code].hash
166
+ [country, code2, code3, code_no, currency, currency_code, region, sub_region].hash
147
167
  end
148
168
 
149
169
  # Builds the object from hash