Class: FinnhubRuby::MutualFundProfileData
- Inherits:
-
Object
- Object
- FinnhubRuby::MutualFundProfileData
- Defined in:
- lib/finnhub_ruby/models/mutual_fund_profile_data.rb
Instance Attribute Summary collapse
-
#benchmark ⇒ Object
Index benchmark.
-
#beta ⇒ Object
Beta.
-
#category ⇒ Object
Fund’s category.
-
#class_id ⇒ Object
Class ID.
-
#class_name ⇒ Object
Class name.
-
#currency ⇒ Object
Fund’s currency.
-
#cusip ⇒ Object
CUSIP.
-
#deferred_load ⇒ Object
Deferred load.
-
#description ⇒ Object
Fund’s description.
-
#expense_ratio ⇒ Object
Expense ratio.
-
#fee12b1 ⇒ Object
12B-1 fee.
-
#front_load ⇒ Object
Front Load.
-
#fund_family ⇒ Object
Fund Family.
-
#inception_date ⇒ Object
Inception date.
-
#investment_segment ⇒ Object
Investment Segment.
-
#ira_min_investment ⇒ Object
IRA minimum investment.
-
#isin ⇒ Object
ISIN.
-
#manager ⇒ Object
Fund’s managers.
-
#max_redemption_fee ⇒ Object
Max redemption fee.
-
#name ⇒ Object
Name.
-
#series_id ⇒ Object
Fund’s series ID.
-
#series_name ⇒ Object
Fund’s series name.
-
#sfdr_classification ⇒ Object
SFDR classification for EU funds.
-
#standard_min_investment ⇒ Object
Minimum investment for standard accounts.
-
#status ⇒ Object
Status.
-
#total_nav ⇒ Object
NAV.
-
#turnover ⇒ Object
Turnover.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_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 ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ MutualFundProfileData
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 = {}) ⇒ MutualFundProfileData
Initializes the object
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 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 178 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FinnhubRuby::MutualFundProfileData` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `FinnhubRuby::MutualFundProfileData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'category') self.category = attributes[:'category'] end if attributes.key?(:'investment_segment') self.investment_segment = attributes[:'investment_segment'] end if attributes.key?(:'total_nav') self.total_nav = attributes[:'total_nav'] end if attributes.key?(:'expense_ratio') self.expense_ratio = attributes[:'expense_ratio'] end if attributes.key?(:'benchmark') self.benchmark = attributes[:'benchmark'] end if attributes.key?(:'inception_date') self.inception_date = attributes[:'inception_date'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'fund_family') self.fund_family = attributes[:'fund_family'] end if attributes.key?(:'manager') self.manager = attributes[:'manager'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'beta') self.beta = attributes[:'beta'] end if attributes.key?(:'deferred_load') self.deferred_load = attributes[:'deferred_load'] end if attributes.key?(:'fee12b1') self.fee12b1 = attributes[:'fee12b1'] end if attributes.key?(:'front_load') self.front_load = attributes[:'front_load'] end if attributes.key?(:'ira_min_investment') self.ira_min_investment = attributes[:'ira_min_investment'] end if attributes.key?(:'isin') self.isin = attributes[:'isin'] end if attributes.key?(:'cusip') self.cusip = attributes[:'cusip'] end if attributes.key?(:'max_redemption_fee') self.max_redemption_fee = attributes[:'max_redemption_fee'] end if attributes.key?(:'standard_min_investment') self.standard_min_investment = attributes[:'standard_min_investment'] end if attributes.key?(:'turnover') self.turnover = attributes[:'turnover'] end if attributes.key?(:'series_id') self.series_id = attributes[:'series_id'] end if attributes.key?(:'series_name') self.series_name = attributes[:'series_name'] end if attributes.key?(:'class_id') self.class_id = attributes[:'class_id'] end if attributes.key?(:'class_name') self.class_name = attributes[:'class_name'] end if attributes.key?(:'sfdr_classification') self.sfdr_classification = attributes[:'sfdr_classification'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end end |
Instance Attribute Details
#benchmark ⇒ Object
Index benchmark.
34 35 36 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 34 def benchmark @benchmark end |
#beta ⇒ Object
Beta.
52 53 54 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 52 def beta @beta end |
#category ⇒ Object
Fund’s category.
22 23 24 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 22 def category @category end |
#class_id ⇒ Object
Class ID.
88 89 90 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 88 def class_id @class_id end |
#class_name ⇒ Object
Class name.
91 92 93 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 91 def class_name @class_name end |
#currency ⇒ Object
Fund’s currency
97 98 99 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 97 def currency @currency end |
#cusip ⇒ Object
CUSIP.
70 71 72 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 70 def cusip @cusip end |
#deferred_load ⇒ Object
Deferred load.
55 56 57 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 55 def deferred_load @deferred_load end |
#description ⇒ Object
Fund’s description.
40 41 42 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 40 def description @description end |
#expense_ratio ⇒ Object
Expense ratio.
31 32 33 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 31 def expense_ratio @expense_ratio end |
#fee12b1 ⇒ Object
12B-1 fee.
58 59 60 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 58 def fee12b1 @fee12b1 end |
#front_load ⇒ Object
Front Load.
61 62 63 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 61 def front_load @front_load end |
#fund_family ⇒ Object
Fund Family.
43 44 45 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 43 def fund_family @fund_family end |
#inception_date ⇒ Object
Inception date.
37 38 39 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 37 def inception_date @inception_date end |
#investment_segment ⇒ Object
Investment Segment.
25 26 27 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 25 def investment_segment @investment_segment end |
#ira_min_investment ⇒ Object
IRA minimum investment.
64 65 66 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 64 def ira_min_investment @ira_min_investment end |
#isin ⇒ Object
ISIN.
67 68 69 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 67 def isin @isin end |
#manager ⇒ Object
Fund’s managers.
46 47 48 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 46 def manager @manager end |
#max_redemption_fee ⇒ Object
Max redemption fee.
73 74 75 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 73 def max_redemption_fee @max_redemption_fee end |
#name ⇒ Object
Name
19 20 21 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 19 def name @name end |
#series_id ⇒ Object
Fund’s series ID. This field can be used to group multiple share classes into 1 unique fund.
82 83 84 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 82 def series_id @series_id end |
#series_name ⇒ Object
Fund’s series name.
85 86 87 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 85 def series_name @series_name end |
#sfdr_classification ⇒ Object
SFDR classification for EU funds. Under the new classifications, a fund’s strategy will labeled under either Article 6, 8 or 9. Article 6 covers funds which do not integrate any kind of sustainability into the investment process. Article 8, also known as ‘environmental and socially promoting’, applies “… where a financial product promotes, among other characteristics, environmental or social characteristics, or a combination of those characteristics, provided that the companies in which the investments are made follow good governance practices.”. Article 9, also known as ‘products targeting sustainable investments’, covers products targeting bespoke sustainable investments and applies “… where a financial product has sustainable investment as its objective and an index has been designated as a reference benchmark.”
94 95 96 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 94 def sfdr_classification @sfdr_classification end |
#standard_min_investment ⇒ Object
Minimum investment for standard accounts.
76 77 78 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 76 def standard_min_investment @standard_min_investment end |
#status ⇒ Object
Status.
49 50 51 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 49 def status @status end |
#total_nav ⇒ Object
NAV.
28 29 30 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 28 def total_nav @total_nav end |
#turnover ⇒ Object
Turnover.
79 80 81 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 79 def turnover @turnover end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
133 134 135 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 133 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 100 def self.attribute_map { :'name' => :'name', :'category' => :'category', :'investment_segment' => :'investmentSegment', :'total_nav' => :'totalNav', :'expense_ratio' => :'expenseRatio', :'benchmark' => :'benchmark', :'inception_date' => :'inceptionDate', :'description' => :'description', :'fund_family' => :'fundFamily', :'manager' => :'manager', :'status' => :'status', :'beta' => :'beta', :'deferred_load' => :'deferredLoad', :'fee12b1' => :'fee12b1', :'front_load' => :'frontLoad', :'ira_min_investment' => :'iraMinInvestment', :'isin' => :'isin', :'cusip' => :'cusip', :'max_redemption_fee' => :'maxRedemptionFee', :'standard_min_investment' => :'standardMinInvestment', :'turnover' => :'turnover', :'series_id' => :'seriesId', :'series_name' => :'seriesName', :'class_id' => :'classId', :'class_name' => :'className', :'sfdr_classification' => :'sfdrClassification', :'currency' => :'currency' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
362 363 364 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 362 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
171 172 173 174 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 171 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 138 def self.openapi_types { :'name' => :'String', :'category' => :'String', :'investment_segment' => :'String', :'total_nav' => :'Float', :'expense_ratio' => :'Float', :'benchmark' => :'String', :'inception_date' => :'Date', :'description' => :'String', :'fund_family' => :'String', :'manager' => :'String', :'status' => :'String', :'beta' => :'Float', :'deferred_load' => :'Float', :'fee12b1' => :'Float', :'front_load' => :'Float', :'ira_min_investment' => :'Float', :'isin' => :'String', :'cusip' => :'String', :'max_redemption_fee' => :'Float', :'standard_min_investment' => :'Float', :'turnover' => :'Float', :'series_id' => :'String', :'series_name' => :'String', :'class_id' => :'String', :'class_name' => :'String', :'sfdr_classification' => :'String', :'currency' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 315 def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && category == o.category && investment_segment == o.investment_segment && total_nav == o.total_nav && expense_ratio == o.expense_ratio && benchmark == o.benchmark && inception_date == o.inception_date && description == o.description && fund_family == o.fund_family && manager == o.manager && status == o.status && beta == o.beta && deferred_load == o.deferred_load && fee12b1 == o.fee12b1 && front_load == o.front_load && ira_min_investment == o.ira_min_investment && isin == o.isin && cusip == o.cusip && max_redemption_fee == o.max_redemption_fee && standard_min_investment == o.standard_min_investment && turnover == o.turnover && series_id == o.series_id && series_name == o.series_name && class_id == o.class_id && class_name == o.class_name && sfdr_classification == o.sfdr_classification && currency == o.currency end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 392 def _deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = FinnhubRuby.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 463 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
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 369 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that 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 end self end |
#eql?(o) ⇒ Boolean
349 350 351 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 349 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
355 356 357 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 355 def hash [name, category, investment_segment, total_nav, expense_ratio, benchmark, inception_date, description, fund_family, manager, status, beta, deferred_load, fee12b1, front_load, ira_min_investment, isin, cusip, max_redemption_fee, standard_min_investment, turnover, series_id, series_name, class_id, class_name, sfdr_classification, currency].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
302 303 304 305 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 302 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
439 440 441 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 439 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 445 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
433 434 435 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 433 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
309 310 311 |
# File 'lib/finnhub_ruby/models/mutual_fund_profile_data.rb', line 309 def valid? true end |