eodhd 0.19.5

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.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +195 -0
  3. data/Gemfile +3 -0
  4. data/README.md +160 -0
  5. data/Rakefile +28 -0
  6. data/eodhd.gemspec +52 -0
  7. data/lib/Eodhd/Client.rb +143 -0
  8. data/lib/Eodhd/DefaultLogger.rb +30 -0
  9. data/lib/Eodhd/EodBulkLastDay.rb +56 -0
  10. data/lib/Eodhd/EodData.rb +56 -0
  11. data/lib/Eodhd/Error.rb +16 -0
  12. data/lib/Eodhd/Exchange.rb +50 -0
  13. data/lib/Eodhd/ExchangeSymbol.rb +50 -0
  14. data/lib/Eodhd/Fundamentals/AnalystRatings.rb +29 -0
  15. data/lib/Eodhd/Fundamentals/ESGScores.rb +37 -0
  16. data/lib/Eodhd/Fundamentals/Earnings/AnnualEntry.rb +21 -0
  17. data/lib/Eodhd/Fundamentals/Earnings/HistoryEntry.rb +33 -0
  18. data/lib/Eodhd/Fundamentals/Earnings/TrendEntry.rb +65 -0
  19. data/lib/Eodhd/Fundamentals/Earnings.rb +30 -0
  20. data/lib/Eodhd/Fundamentals/Financials/BalanceSheet/Entry.rb +147 -0
  21. data/lib/Eodhd/Fundamentals/Financials/BalanceSheet.rb +28 -0
  22. data/lib/Eodhd/Fundamentals/Financials/CashFlow/Entry.rb +83 -0
  23. data/lib/Eodhd/Fundamentals/Financials/CashFlow.rb +28 -0
  24. data/lib/Eodhd/Fundamentals/Financials/IncomeStatement/Entry.rb +87 -0
  25. data/lib/Eodhd/Fundamentals/Financials/IncomeStatement.rb +28 -0
  26. data/lib/Eodhd/Fundamentals/Financials.rb +25 -0
  27. data/lib/Eodhd/Fundamentals/General.rb +85 -0
  28. data/lib/Eodhd/Fundamentals/Highlights.rb +63 -0
  29. data/lib/Eodhd/Fundamentals/Holders/Fund.rb +31 -0
  30. data/lib/Eodhd/Fundamentals/Holders/Institution.rb +31 -0
  31. data/lib/Eodhd/Fundamentals/Holders.rb +27 -0
  32. data/lib/Eodhd/Fundamentals/InsiderTransaction.rb +35 -0
  33. data/lib/Eodhd/Fundamentals/OutstandingShares/Entry.rb +25 -0
  34. data/lib/Eodhd/Fundamentals/OutstandingShares.rb +26 -0
  35. data/lib/Eodhd/Fundamentals/SharesStats.rb +33 -0
  36. data/lib/Eodhd/Fundamentals/SplitsDividends.rb +31 -0
  37. data/lib/Eodhd/Fundamentals/Technicals.rb +33 -0
  38. data/lib/Eodhd/Fundamentals/Valuation.rb +29 -0
  39. data/lib/Eodhd/Fundamentals.rb +92 -0
  40. data/lib/Eodhd/Intraday.rb +76 -0
  41. data/lib/Eodhd/VERSION.rb +3 -0
  42. data/lib/Eodhd/Validations.rb +78 -0
  43. data/lib/Eodhd/WebSocketClient.rb +130 -0
  44. data/lib/Hash/x_www_form_urlencode.rb +7 -0
  45. data/lib/Thoran/Hash/XWwwFormUrlencode/x_www_form_urlencode.rb +27 -0
  46. data/lib/Thoran/String/Urlencode/urlencode.rb +29 -0
  47. data/lib/eodhd.rb +78 -0
  48. data/test/Eodhd/Client_test.rb +111 -0
  49. data/test/Eodhd/Fundamentals_test.rb +163 -0
  50. data/test/Eodhd/VERSION_test.rb +20 -0
  51. data/test/Eodhd/Validations_test.rb +135 -0
  52. data/test/Eodhd/WebSocketClient_test.rb +99 -0
  53. data/test/Eodhd_test.rb +73 -0
  54. data/test/helper.rb +17 -0
  55. metadata +218 -0
@@ -0,0 +1,87 @@
1
+ # Eodhd/Fundamentals/Financials/IncomeStatement/Entry.rb
2
+ # Eodhd::Fundamentals::Financials::IncomeStatement::Entry
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class Financials
7
+ class IncomeStatement
8
+ class Entry
9
+ attr_reader\
10
+ :date,
11
+ :filing_date,
12
+ :currency_symbol,
13
+ :research_development,
14
+ :effect_of_accounting_charges,
15
+ :income_before_tax,
16
+ :minority_interest,
17
+ :net_income,
18
+ :selling_general_administrative,
19
+ :selling_and_marketing_expenses,
20
+ :gross_profit,
21
+ :reconciled_depreciation,
22
+ :ebit,
23
+ :ebitda,
24
+ :depreciation_and_amortization,
25
+ :non_operating_income_net_other,
26
+ :operating_income,
27
+ :other_operating_expenses,
28
+ :interest_expense,
29
+ :tax_provision,
30
+ :interest_income,
31
+ :net_interest_income,
32
+ :extraordinary_items,
33
+ :non_recurring,
34
+ :other_items,
35
+ :income_tax_expense,
36
+ :total_revenue,
37
+ :total_operating_expenses,
38
+ :cost_of_revenue,
39
+ :total_other_income_expense_net,
40
+ :discontinued_operations,
41
+ :net_income_from_continuing_operations,
42
+ :net_income_applicable_to_common_shares,
43
+ :preferred_stock_and_other_adjustments
44
+
45
+ private
46
+
47
+ def initialize(data)
48
+ @date = data['date']
49
+ @filing_date = data['filing_date']
50
+ @currency_symbol = data['currency_symbol']
51
+ @research_development = data['researchDevelopment']
52
+ @effect_of_accounting_charges = data['effectOfAccountingCharges']
53
+ @income_before_tax = data['incomeBeforeTax']
54
+ @minority_interest = data['minorityInterest']
55
+ @net_income = data['netIncome']
56
+ @selling_general_administrative = data['sellingGeneralAdministrative']
57
+ @selling_and_marketing_expenses = data['sellingAndMarketingExpenses']
58
+ @gross_profit = data['grossProfit']
59
+ @reconciled_depreciation = data['reconciledDepreciation']
60
+ @ebit = data['ebit']
61
+ @ebitda = data['ebitda']
62
+ @depreciation_and_amortization = data['depreciationAndAmortization']
63
+ @non_operating_income_net_other = data['nonOperatingIncomeNetOther']
64
+ @operating_income = data['operatingIncome']
65
+ @other_operating_expenses = data['otherOperatingExpenses']
66
+ @interest_expense = data['interestExpense']
67
+ @tax_provision = data['taxProvision']
68
+ @interest_income = data['interestIncome']
69
+ @net_interest_income = data['netInterestIncome']
70
+ @extraordinary_items = data['extraordinaryItems']
71
+ @non_recurring = data['nonRecurring']
72
+ @other_items = data['otherItems']
73
+ @income_tax_expense = data['incomeTaxExpense']
74
+ @total_revenue = data['totalRevenue']
75
+ @total_operating_expenses = data['totalOperatingExpenses']
76
+ @cost_of_revenue = data['costOfRevenue']
77
+ @total_other_income_expense_net = data['totalOtherIncomeExpenseNet']
78
+ @discontinued_operations = data['discontinuedOperations']
79
+ @net_income_from_continuing_operations = data['netIncomeFromContinuingOps']
80
+ @net_income_applicable_to_common_shares = data['netIncomeApplicableToCommonShares']
81
+ @preferred_stock_and_other_adjustments = data['preferredStockAndOtherAdjustments']
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,28 @@
1
+ # Eodhd/Fundamentals/Financials/IncomeStatement.rb
2
+ # Eodhd::Fundamentals::Financials::IncomeStatement
3
+
4
+ require_relative './IncomeStatement/Entry'
5
+
6
+ class Eodhd
7
+ class Fundamentals
8
+ class Financials
9
+ class IncomeStatement
10
+ attr_reader\
11
+ :quarterly,
12
+ :yearly
13
+
14
+ private
15
+
16
+ def initialize(data)
17
+ @yearly = wrap(data['yearly'])
18
+ @quarterly = wrap(data['quarterly'])
19
+ end
20
+
21
+ def wrap(entries)
22
+ return [] unless entries
23
+ entries.values.map{|entry| Entry.new(entry)}.sort_by(&:date)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,25 @@
1
+ # Eodhd/Fundamentals/Financials.rb
2
+ # Eodhd::Fundamentals::Financials
3
+
4
+ require_relative './Financials/BalanceSheet'
5
+ require_relative './Financials/CashFlow'
6
+ require_relative './Financials/IncomeStatement'
7
+
8
+ class Eodhd
9
+ class Fundamentals
10
+ class Financials
11
+ attr_reader\
12
+ :income_statement,
13
+ :balance_sheet,
14
+ :cash_flow
15
+
16
+ private
17
+
18
+ def initialize(data)
19
+ @income_statement = IncomeStatement.new(data['Income_Statement']) if data['Income_Statement']
20
+ @balance_sheet = BalanceSheet.new(data['Balance_Sheet']) if data['Balance_Sheet']
21
+ @cash_flow = CashFlow.new(data['Cash_Flow']) if data['Cash_Flow']
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,85 @@
1
+ # Eodhd/Fundamentals/General.rb
2
+ # Eodhd::Fundamentals::General
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class General
7
+ attr_reader\
8
+ :code,
9
+ :type,
10
+ :name,
11
+ :exchange,
12
+ :currency_code,
13
+ :currency_name,
14
+ :currency_symbol,
15
+ :country_name,
16
+ :country_iso,
17
+ :isin,
18
+ :lei,
19
+ :cusip,
20
+ :cik,
21
+ :employer_id_number,
22
+ :fiscal_year_end,
23
+ :ipo_date,
24
+ :international_domestic,
25
+ :sector,
26
+ :industry,
27
+ :gic_sector,
28
+ :gic_group,
29
+ :gic_industry,
30
+ :gic_sub_industry,
31
+ :home_category,
32
+ :is_delisted,
33
+ :description,
34
+ :address,
35
+ :address_data,
36
+ :listings,
37
+ :officers,
38
+ :phone,
39
+ :web_url,
40
+ :logo_url,
41
+ :full_time_employees,
42
+ :updated_at
43
+
44
+ private
45
+
46
+ def initialize(data)
47
+ @code = data['Code']
48
+ @type = data['Type']
49
+ @name = data['Name']
50
+ @exchange = data['Exchange']
51
+ @currency_code = data['CurrencyCode']
52
+ @currency_name = data['CurrencyName']
53
+ @currency_symbol = data['CurrencySymbol']
54
+ @country_name = data['CountryName']
55
+ @country_iso = data['CountryISO']
56
+ @isin = data['ISIN']
57
+ @lei = data['LEI']
58
+ @cusip = data['CUSIP']
59
+ @cik = data['CIK']
60
+ @employer_id_number = data['EmployerIdNumber']
61
+ @fiscal_year_end = data['FiscalYearEnd']
62
+ @ipo_date = data['IPODate']
63
+ @international_domestic = data['InternationalDomestic']
64
+ @sector = data['Sector']
65
+ @industry = data['Industry']
66
+ @gic_sector = data['GicSector']
67
+ @gic_group = data['GicGroup']
68
+ @gic_industry = data['GicIndustry']
69
+ @gic_sub_industry = data['GicSubIndustry']
70
+ @home_category = data['HomeCategory']
71
+ @is_delisted = data['IsDelisted']
72
+ @description = data['Description']
73
+ @address = data['Address']
74
+ @address_data = data['AddressData']
75
+ @listings = data['Listings']
76
+ @officers = data['Officers']
77
+ @phone = data['Phone']
78
+ @web_url = data['WebURL']
79
+ @logo_url = data['LogoURL']
80
+ @full_time_employees = data['FullTimeEmployees']
81
+ @updated_at = data['UpdatedAt']
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,63 @@
1
+ # Eodhd/Fundamentals/Highlights.rb
2
+ # Eodhd::Fundamentals::Highlights
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class Highlights
7
+ attr_reader\
8
+ :market_capitalization,
9
+ :ebitda,
10
+ :pe_ratio,
11
+ :peg_ratio,
12
+ :wall_street_target_price,
13
+ :book_value,
14
+ :dividend_share,
15
+ :dividend_yield,
16
+ :earnings_share,
17
+ :eps_estimate_current_year,
18
+ :eps_estimate_next_year,
19
+ :eps_estimate_next_quarter,
20
+ :eps_estimate_current_quarter,
21
+ :most_recent_quarter,
22
+ :profit_margin,
23
+ :operating_margin_ttm,
24
+ :return_on_assets_ttm,
25
+ :return_on_equity_ttm,
26
+ :revenue_ttm,
27
+ :revenue_per_share_ttm,
28
+ :quarterly_revenue_growth_yoy,
29
+ :gross_profit_ttm,
30
+ :diluted_eps_ttm,
31
+ :quarterly_earnings_growth_yoy
32
+
33
+ private
34
+
35
+ def initialize(data)
36
+ @market_capitalization = data['MarketCapitalization']
37
+ @ebitda = data['EBITDA']
38
+ @pe_ratio = data['PERatio']
39
+ @peg_ratio = data['PEGRatio']
40
+ @wall_street_target_price = data['WallStreetTargetPrice']
41
+ @book_value = data['BookValue']
42
+ @dividend_share = data['DividendShare']
43
+ @dividend_yield = data['DividendYield']
44
+ @earnings_share = data['EarningsShare']
45
+ @eps_estimate_current_year = data['EPSEstimateCurrentYear']
46
+ @eps_estimate_next_year = data['EPSEstimateNextYear']
47
+ @eps_estimate_next_quarter = data['EPSEstimateNextQuarter']
48
+ @eps_estimate_current_quarter = data['EPSEstimateCurrentQuarter']
49
+ @most_recent_quarter = data['MostRecentQuarter']
50
+ @profit_margin = data['ProfitMargin']
51
+ @operating_margin_ttm = data['OperatingMarginTTM']
52
+ @return_on_assets_ttm = data['ReturnOnAssetsTTM']
53
+ @return_on_equity_ttm = data['ReturnOnEquityTTM']
54
+ @revenue_ttm = data['RevenueTTM']
55
+ @revenue_per_share_ttm = data['RevenuePerShareTTM']
56
+ @quarterly_revenue_growth_yoy = data['QuarterlyRevenueGrowthYOY']
57
+ @gross_profit_ttm = data['GrossProfitTTM']
58
+ @diluted_eps_ttm = data['DilutedEpsTTM']
59
+ @quarterly_earnings_growth_yoy = data['QuarterlyEarningsGrowthYOY']
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,31 @@
1
+ # Eodhd/Fundamentals/Holders/Fund.rb
2
+ # Eodhd::Fundamentals::Holders::Fund
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class Holders
7
+ class Fund
8
+ attr_reader\
9
+ :name,
10
+ :date,
11
+ :total_shares,
12
+ :total_assets,
13
+ :current_shares,
14
+ :change,
15
+ :change_percent
16
+
17
+ private
18
+
19
+ def initialize(data)
20
+ @name = data['name']
21
+ @date = data['date']
22
+ @total_shares = data['totalShares']
23
+ @total_assets = data['totalAssets']
24
+ @current_shares = data['currentShares']
25
+ @change = data['change']
26
+ @change_percent = data['change_p']
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,31 @@
1
+ # Eodhd/Fundamentals/Holders/Institution.rb
2
+ # Eodhd::Fundamentals::Holders::Institution
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class Holders
7
+ class Institution
8
+ attr_reader\
9
+ :name,
10
+ :date,
11
+ :total_shares,
12
+ :total_assets,
13
+ :current_shares,
14
+ :change,
15
+ :change_percent
16
+
17
+ private
18
+
19
+ def initialize(data)
20
+ @name = data['name']
21
+ @date = data['date']
22
+ @total_shares = data['totalShares']
23
+ @total_assets = data['totalAssets']
24
+ @current_shares = data['currentShares']
25
+ @change = data['change']
26
+ @change_percent = data['change_p']
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,27 @@
1
+ # Eodhd/Fundamentals/Holders.rb
2
+ # Eodhd::Fundamentals::Holders
3
+
4
+ require_relative './Holders/Institution'
5
+ require_relative './Holders/Fund'
6
+
7
+ class Eodhd
8
+ class Fundamentals
9
+ class Holders
10
+ attr_reader\
11
+ :institutions,
12
+ :funds
13
+
14
+ private
15
+
16
+ def initialize(data)
17
+ @institutions = wrap(data['Institutions'], Institution)
18
+ @funds = wrap(data['Funds'], Fund)
19
+ end
20
+
21
+ def wrap(entries, entry_class)
22
+ return [] unless entries
23
+ entries.values.map{|entry| entry_class.new(entry)}
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,35 @@
1
+ # Eodhd/Fundamentals/InsiderTransaction.rb
2
+ # Eodhd::Fundamentals::InsiderTransaction
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class InsiderTransaction
7
+ attr_reader\
8
+ :date,
9
+ :owner_cik,
10
+ :owner_name,
11
+ :transaction_date,
12
+ :transaction_code,
13
+ :transaction_amount,
14
+ :transaction_price,
15
+ :transaction_acquired_disposed,
16
+ :post_transaction_amount,
17
+ :sec_link
18
+
19
+ private
20
+
21
+ def initialize(data)
22
+ @date = data['date']
23
+ @owner_cik = data['ownerCik']
24
+ @owner_name = data['ownerName']
25
+ @transaction_date = data['transactionDate']
26
+ @transaction_code = data['transactionCode']
27
+ @transaction_amount = data['transactionAmount']
28
+ @transaction_price = data['transactionPrice']
29
+ @transaction_acquired_disposed = data['transactionAcquiredDisposed']
30
+ @post_transaction_amount = data['postTransactionAmount']
31
+ @sec_link = data['secLink']
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,25 @@
1
+ # Eodhd/Fundamentals/OutstandingShares/Entry.rb
2
+ # Eodhd::Fundamentals::OutstandingShares::Entry
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class OutstandingShares
7
+ class Entry
8
+ attr_reader\
9
+ :date,
10
+ :date_formatted,
11
+ :shares_mln,
12
+ :shares
13
+
14
+ private
15
+
16
+ def initialize(data)
17
+ @date = data['date']
18
+ @date_formatted = data['dateFormatted']
19
+ @shares_mln = data['sharesMln']
20
+ @shares = data['shares']
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,26 @@
1
+ # Eodhd/Fundamentals/OutstandingShares.rb
2
+ # Eodhd::Fundamentals::OutstandingShares
3
+
4
+ require_relative './OutstandingShares/Entry'
5
+
6
+ class Eodhd
7
+ class Fundamentals
8
+ class OutstandingShares
9
+ attr_reader\
10
+ :annual,
11
+ :quarterly
12
+
13
+ private
14
+
15
+ def initialize(data)
16
+ @annual = wrap(data['annual'])
17
+ @quarterly = wrap(data['quarterly'])
18
+ end
19
+
20
+ def wrap(entries)
21
+ return [] unless entries
22
+ entries.values.map{|entry| Entry.new(entry)}.sort_by(&:date)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,33 @@
1
+ # Eodhd/Fundamentals/SharesStats.rb
2
+ # Eodhd::Fundamentals::SharesStats
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class SharesStats
7
+ attr_reader\
8
+ :shares_outstanding,
9
+ :shares_float,
10
+ :percent_insiders,
11
+ :percent_institutions,
12
+ :shares_short,
13
+ :shares_short_prior_month,
14
+ :short_ratio,
15
+ :short_percent_outstanding,
16
+ :short_percent_float
17
+
18
+ private
19
+
20
+ def initialize(data)
21
+ @shares_outstanding = data['SharesOutstanding']
22
+ @shares_float = data['SharesFloat']
23
+ @percent_insiders = data['PercentInsiders']
24
+ @percent_institutions = data['PercentInstitutions']
25
+ @shares_short = data['SharesShort']
26
+ @shares_short_prior_month = data['SharesShortPriorMonth']
27
+ @short_ratio = data['ShortRatio']
28
+ @short_percent_outstanding = data['ShortPercentOutstanding']
29
+ @short_percent_float = data['ShortPercentFloat']
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,31 @@
1
+ # Eodhd/Fundamentals/SplitsDividends.rb
2
+ # Eodhd::Fundamentals::SplitsDividends
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class SplitsDividends
7
+ attr_reader\
8
+ :forward_annual_dividend_rate,
9
+ :forward_annual_dividend_yield,
10
+ :payout_ratio,
11
+ :dividend_date,
12
+ :ex_dividend_date,
13
+ :last_split_factor,
14
+ :last_split_date,
15
+ :number_dividends_by_year
16
+
17
+ private
18
+
19
+ def initialize(data)
20
+ @forward_annual_dividend_rate = data['ForwardAnnualDividendRate']
21
+ @forward_annual_dividend_yield = data['ForwardAnnualDividendYield']
22
+ @payout_ratio = data['PayoutRatio']
23
+ @dividend_date = data['DividendDate']
24
+ @ex_dividend_date = data['ExDividendDate']
25
+ @last_split_factor = data['LastSplitFactor']
26
+ @last_split_date = data['LastSplitDate']
27
+ @number_dividends_by_year = data['NumberDividendsByYear']
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,33 @@
1
+ # Eodhd/Fundamentals/Technicals.rb
2
+ # Eodhd::Fundamentals::Technicals
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class Technicals
7
+ attr_reader\
8
+ :beta,
9
+ :fifty_two_week_high,
10
+ :fifty_two_week_low,
11
+ :fifty_day_ma,
12
+ :two_hundred_day_ma,
13
+ :shares_short,
14
+ :shares_short_prior_month,
15
+ :short_ratio,
16
+ :short_percent
17
+
18
+ private
19
+
20
+ def initialize(data)
21
+ @beta = data['Beta']
22
+ @fifty_two_week_high = data['52WeekHigh']
23
+ @fifty_two_week_low = data['52WeekLow']
24
+ @fifty_day_ma = data['50DayMA']
25
+ @two_hundred_day_ma = data['200DayMA']
26
+ @shares_short = data['SharesShort']
27
+ @shares_short_prior_month = data['SharesShortPriorMonth']
28
+ @short_ratio = data['ShortRatio']
29
+ @short_percent = data['ShortPercent']
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,29 @@
1
+ # Eodhd/Fundamentals/Valuation.rb
2
+ # Eodhd::Fundamentals::Valuation
3
+
4
+ class Eodhd
5
+ class Fundamentals
6
+ class Valuation
7
+ attr_reader\
8
+ :trailing_pe,
9
+ :forward_pe,
10
+ :price_sales_ttm,
11
+ :price_book_mrq,
12
+ :enterprise_value,
13
+ :enterprise_value_revenue,
14
+ :enterprise_value_ebitda
15
+
16
+ private
17
+
18
+ def initialize(data)
19
+ @trailing_pe = data['TrailingPE']
20
+ @forward_pe = data['ForwardPE']
21
+ @price_sales_ttm = data['PriceSalesTTM']
22
+ @price_book_mrq = data['PriceBookMRQ']
23
+ @enterprise_value = data['EnterpriseValue']
24
+ @enterprise_value_revenue = data['EnterpriseValueRevenue']
25
+ @enterprise_value_ebitda = data['EnterpriseValueEbitda']
26
+ end
27
+ end
28
+ end
29
+ end