Class: Intrinio::ZacksLongTermGrowthRate
- Inherits:
-
Object
- Object
- Intrinio::ZacksLongTermGrowthRate
- Defined in:
- lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb
Overview
Zacks long term growth rates from analysts for thousands of stocks. Zacks storied research team aggregates and validates the estimates. Each Growth Rate includes metadata about the corresponding Security.
Instance Attribute Summary collapse
-
#count ⇒ Object
The number of long term growth estimates.
-
#high ⇒ Object
The high long term growth estimate.
-
#low ⇒ Object
The low long term growth estimate.
-
#mean ⇒ Object
The mean long term growth estimate.
-
#mean_30_days_ago ⇒ Object
The mean long term growth estimate 30 days ago.
-
#mean_60_days_ago ⇒ Object
The mean long term growth estimate 60 days ago.
-
#mean_7_days_ago ⇒ Object
The mean long term growth estimate 7 days ago.
-
#mean_90_days_ago ⇒ Object
The mean long term growth estimate 90 days ago.
-
#median ⇒ Object
The median long term growth estimate.
-
#revisions_downward ⇒ Object
The number of long term growth estimate revisions downward.
-
#revisions_downward_last_120_days ⇒ Object
The number of long term growth estimate revisions downward in the last 120 days.
-
#revisions_downward_last_150_days ⇒ Object
The number of long term growth estimate revisions downward in the last 150 days.
-
#revisions_downward_last_30_days ⇒ Object
The number of long term growth estimate revisions downward in the last 30 days.
-
#revisions_downward_last_60_days ⇒ Object
The number of long term growth estimate revisions downward in the last 60 days.
-
#revisions_downward_last_7_days ⇒ Object
The number of long term growth estimate revisions downward in the last 7 days.
-
#revisions_downward_last_90_days ⇒ Object
The number of long term growth estimate revisions downward in the last 90 days.
-
#revisions_upward ⇒ Object
The number of long term growth estimate revisions upward.
-
#revisions_upward_last_120_days ⇒ Object
The number of long term growth estimate revisions upward in the last 120 days.
-
#revisions_upward_last_150_days ⇒ Object
The number of long term growth estimate revisions upward in the last 150 days.
-
#revisions_upward_last_30_days ⇒ Object
The number of long term growth estimate revisions upward in the last 30 days.
-
#revisions_upward_last_60_days ⇒ Object
The number of long term growth estimate revisions upward in the last 60 days.
-
#revisions_upward_last_7_days ⇒ Object
The number of long term growth estimate revisions upward in the last 7 days.
-
#revisions_upward_last_90_days ⇒ Object
The number of long term growth estimate revisions upward in the last 90 days.
-
#security ⇒ Object
The Security of the Zacks long term growth estimate.
-
#std_dev ⇒ Object
The standard deviation long term growth estimate.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ZacksLongTermGrowthRate
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ZacksLongTermGrowthRate
Initializes the object
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 158 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'mean') self.mean = attributes[:'mean'] end if attributes.has_key?(:'median') self.median = attributes[:'median'] end if attributes.has_key?(:'count') self.count = attributes[:'count'] end if attributes.has_key?(:'high') self.high = attributes[:'high'] end if attributes.has_key?(:'low') self.low = attributes[:'low'] end if attributes.has_key?(:'std_dev') self.std_dev = attributes[:'std_dev'] end if attributes.has_key?(:'revisions_upward') self.revisions_upward = attributes[:'revisions_upward'] end if attributes.has_key?(:'revisions_downward') self.revisions_downward = attributes[:'revisions_downward'] end if attributes.has_key?(:'mean_7_days_ago') self.mean_7_days_ago = attributes[:'mean_7_days_ago'] end if attributes.has_key?(:'mean_30_days_ago') self.mean_30_days_ago = attributes[:'mean_30_days_ago'] end if attributes.has_key?(:'mean_60_days_ago') self.mean_60_days_ago = attributes[:'mean_60_days_ago'] end if attributes.has_key?(:'mean_90_days_ago') self.mean_90_days_ago = attributes[:'mean_90_days_ago'] end if attributes.has_key?(:'revisions_upward_last_7_days') self.revisions_upward_last_7_days = attributes[:'revisions_upward_last_7_days'] end if attributes.has_key?(:'revisions_downward_last_7_days') self.revisions_downward_last_7_days = attributes[:'revisions_downward_last_7_days'] end if attributes.has_key?(:'revisions_upward_last_30_days') self.revisions_upward_last_30_days = attributes[:'revisions_upward_last_30_days'] end if attributes.has_key?(:'revisions_downward_last_30_days') self.revisions_downward_last_30_days = attributes[:'revisions_downward_last_30_days'] end if attributes.has_key?(:'revisions_upward_last_60_days') self.revisions_upward_last_60_days = attributes[:'revisions_upward_last_60_days'] end if attributes.has_key?(:'revisions_downward_last_60_days') self.revisions_downward_last_60_days = attributes[:'revisions_downward_last_60_days'] end if attributes.has_key?(:'revisions_upward_last_90_days') self.revisions_upward_last_90_days = attributes[:'revisions_upward_last_90_days'] end if attributes.has_key?(:'revisions_downward_last_90_days') self.revisions_downward_last_90_days = attributes[:'revisions_downward_last_90_days'] end if attributes.has_key?(:'revisions_upward_last_120_days') self.revisions_upward_last_120_days = attributes[:'revisions_upward_last_120_days'] end if attributes.has_key?(:'revisions_downward_last_120_days') self.revisions_downward_last_120_days = attributes[:'revisions_downward_last_120_days'] end if attributes.has_key?(:'revisions_upward_last_150_days') self.revisions_upward_last_150_days = attributes[:'revisions_upward_last_150_days'] end if attributes.has_key?(:'revisions_downward_last_150_days') self.revisions_downward_last_150_days = attributes[:'revisions_downward_last_150_days'] end if attributes.has_key?(:'security') self.security = attributes[:'security'] end end |
Instance Attribute Details
#count ⇒ Object
The number of long term growth estimates
25 26 27 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 25 def count @count end |
#high ⇒ Object
The high long term growth estimate
28 29 30 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 28 def high @high end |
#low ⇒ Object
The low long term growth estimate
31 32 33 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 31 def low @low end |
#mean ⇒ Object
The mean long term growth estimate
19 20 21 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 19 def mean @mean end |
#mean_30_days_ago ⇒ Object
The mean long term growth estimate 30 days ago
46 47 48 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 46 def mean_30_days_ago @mean_30_days_ago end |
#mean_60_days_ago ⇒ Object
The mean long term growth estimate 60 days ago
49 50 51 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 49 def mean_60_days_ago @mean_60_days_ago end |
#mean_7_days_ago ⇒ Object
The mean long term growth estimate 7 days ago
43 44 45 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 43 def mean_7_days_ago @mean_7_days_ago end |
#mean_90_days_ago ⇒ Object
The mean long term growth estimate 90 days ago
52 53 54 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 52 def mean_90_days_ago @mean_90_days_ago end |
#median ⇒ Object
The median long term growth estimate
22 23 24 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 22 def median @median end |
#revisions_downward ⇒ Object
The number of long term growth estimate revisions downward
40 41 42 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 40 def revisions_downward @revisions_downward end |
#revisions_downward_last_120_days ⇒ Object
The number of long term growth estimate revisions downward in the last 120 days
82 83 84 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 82 def revisions_downward_last_120_days @revisions_downward_last_120_days end |
#revisions_downward_last_150_days ⇒ Object
The number of long term growth estimate revisions downward in the last 150 days
88 89 90 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 88 def revisions_downward_last_150_days @revisions_downward_last_150_days end |
#revisions_downward_last_30_days ⇒ Object
The number of long term growth estimate revisions downward in the last 30 days
64 65 66 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 64 def revisions_downward_last_30_days @revisions_downward_last_30_days end |
#revisions_downward_last_60_days ⇒ Object
The number of long term growth estimate revisions downward in the last 60 days
70 71 72 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 70 def revisions_downward_last_60_days @revisions_downward_last_60_days end |
#revisions_downward_last_7_days ⇒ Object
The number of long term growth estimate revisions downward in the last 7 days
58 59 60 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 58 def revisions_downward_last_7_days @revisions_downward_last_7_days end |
#revisions_downward_last_90_days ⇒ Object
The number of long term growth estimate revisions downward in the last 90 days
76 77 78 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 76 def revisions_downward_last_90_days @revisions_downward_last_90_days end |
#revisions_upward ⇒ Object
The number of long term growth estimate revisions upward
37 38 39 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 37 def revisions_upward @revisions_upward end |
#revisions_upward_last_120_days ⇒ Object
The number of long term growth estimate revisions upward in the last 120 days
79 80 81 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 79 def revisions_upward_last_120_days @revisions_upward_last_120_days end |
#revisions_upward_last_150_days ⇒ Object
The number of long term growth estimate revisions upward in the last 150 days
85 86 87 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 85 def revisions_upward_last_150_days @revisions_upward_last_150_days end |
#revisions_upward_last_30_days ⇒ Object
The number of long term growth estimate revisions upward in the last 30 days
61 62 63 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 61 def revisions_upward_last_30_days @revisions_upward_last_30_days end |
#revisions_upward_last_60_days ⇒ Object
The number of long term growth estimate revisions upward in the last 60 days
67 68 69 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 67 def revisions_upward_last_60_days @revisions_upward_last_60_days end |
#revisions_upward_last_7_days ⇒ Object
The number of long term growth estimate revisions upward in the last 7 days
55 56 57 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 55 def revisions_upward_last_7_days @revisions_upward_last_7_days end |
#revisions_upward_last_90_days ⇒ Object
The number of long term growth estimate revisions upward in the last 90 days
73 74 75 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 73 def revisions_upward_last_90_days @revisions_upward_last_90_days end |
#security ⇒ Object
The Security of the Zacks long term growth estimate
91 92 93 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 91 def security @security end |
#std_dev ⇒ Object
The standard deviation long term growth estimate
34 35 36 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 34 def std_dev @std_dev end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 95 def self.attribute_map { :'mean' => :'mean', :'median' => :'median', :'count' => :'count', :'high' => :'high', :'low' => :'low', :'std_dev' => :'std_dev', :'revisions_upward' => :'revisions_upward', :'revisions_downward' => :'revisions_downward', :'mean_7_days_ago' => :'mean_7_days_ago', :'mean_30_days_ago' => :'mean_30_days_ago', :'mean_60_days_ago' => :'mean_60_days_ago', :'mean_90_days_ago' => :'mean_90_days_ago', :'revisions_upward_last_7_days' => :'revisions_upward_last_7_days', :'revisions_downward_last_7_days' => :'revisions_downward_last_7_days', :'revisions_upward_last_30_days' => :'revisions_upward_last_30_days', :'revisions_downward_last_30_days' => :'revisions_downward_last_30_days', :'revisions_upward_last_60_days' => :'revisions_upward_last_60_days', :'revisions_downward_last_60_days' => :'revisions_downward_last_60_days', :'revisions_upward_last_90_days' => :'revisions_upward_last_90_days', :'revisions_downward_last_90_days' => :'revisions_downward_last_90_days', :'revisions_upward_last_120_days' => :'revisions_upward_last_120_days', :'revisions_downward_last_120_days' => :'revisions_downward_last_120_days', :'revisions_upward_last_150_days' => :'revisions_upward_last_150_days', :'revisions_downward_last_150_days' => :'revisions_downward_last_150_days', :'security' => :'security' } end |
.swagger_types ⇒ Object
Attribute type mapping.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 126 def self.swagger_types { :'mean' => :'Float', :'median' => :'Float', :'count' => :'Integer', :'high' => :'Float', :'low' => :'Float', :'std_dev' => :'String', :'revisions_upward' => :'Integer', :'revisions_downward' => :'Integer', :'mean_7_days_ago' => :'String', :'mean_30_days_ago' => :'String', :'mean_60_days_ago' => :'String', :'mean_90_days_ago' => :'String', :'revisions_upward_last_7_days' => :'String', :'revisions_downward_last_7_days' => :'String', :'revisions_upward_last_30_days' => :'String', :'revisions_downward_last_30_days' => :'String', :'revisions_upward_last_60_days' => :'String', :'revisions_downward_last_60_days' => :'String', :'revisions_upward_last_90_days' => :'String', :'revisions_downward_last_90_days' => :'String', :'revisions_upward_last_120_days' => :'String', :'revisions_downward_last_120_days' => :'String', :'revisions_upward_last_150_days' => :'String', :'revisions_downward_last_150_days' => :'String', :'security' => :'SecuritySummary' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 281 def ==(o) return true if self.equal?(o) self.class == o.class && mean == o.mean && median == o.median && count == o.count && high == o.high && low == o.low && std_dev == o.std_dev && revisions_upward == o.revisions_upward && revisions_downward == o.revisions_downward && mean_7_days_ago == o.mean_7_days_ago && mean_30_days_ago == o.mean_30_days_ago && mean_60_days_ago == o.mean_60_days_ago && mean_90_days_ago == o.mean_90_days_ago && revisions_upward_last_7_days == o.revisions_upward_last_7_days && revisions_downward_last_7_days == o.revisions_downward_last_7_days && revisions_upward_last_30_days == o.revisions_upward_last_30_days && revisions_downward_last_30_days == o.revisions_downward_last_30_days && revisions_upward_last_60_days == o.revisions_upward_last_60_days && revisions_downward_last_60_days == o.revisions_downward_last_60_days && revisions_upward_last_90_days == o.revisions_upward_last_90_days && revisions_downward_last_90_days == o.revisions_downward_last_90_days && revisions_upward_last_120_days == o.revisions_upward_last_120_days && revisions_downward_last_120_days == o.revisions_downward_last_120_days && revisions_upward_last_150_days == o.revisions_upward_last_150_days && revisions_downward_last_150_days == o.revisions_downward_last_150_days && security == o.security end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 347 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = Intrinio.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 413 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 326 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
313 314 315 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 313 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
319 320 321 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 319 def hash [mean, median, count, high, low, std_dev, revisions_upward, revisions_downward, mean_7_days_ago, mean_30_days_ago, mean_60_days_ago, mean_90_days_ago, revisions_upward_last_7_days, revisions_downward_last_7_days, revisions_upward_last_30_days, revisions_downward_last_30_days, revisions_upward_last_60_days, revisions_downward_last_60_days, revisions_upward_last_90_days, revisions_downward_last_90_days, revisions_upward_last_120_days, revisions_downward_last_120_days, revisions_upward_last_150_days, revisions_downward_last_150_days, security].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
268 269 270 271 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 268 def list_invalid_properties invalid_properties = Array.new return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
393 394 395 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 393 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
399 400 401 402 403 404 405 406 407 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 399 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
387 388 389 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 387 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
275 276 277 |
# File 'lib/intrinio-sdk/models/zacks_long_term_growth_rate.rb', line 275 def valid? return true end |