intrinio-sdk 2.1.0 → 2.2.0

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 (403) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +168 -2
  3. data/docs/AccumulationDistributionIndexTechnicalValue.md +9 -0
  4. data/docs/ApiResponseCryptoBook.md +12 -0
  5. data/docs/ApiResponseCryptoBookAsks.md +11 -0
  6. data/docs/ApiResponseCryptoBookBids.md +11 -0
  7. data/docs/ApiResponseCryptoCurrencies.md +8 -0
  8. data/docs/ApiResponseCryptoExchanges.md +8 -0
  9. data/docs/ApiResponseCryptoPairs.md +9 -0
  10. data/docs/ApiResponseCryptoPrices.md +12 -0
  11. data/docs/ApiResponseCryptoSnapshot.md +10 -0
  12. data/docs/ApiResponseCryptoStats.md +8 -0
  13. data/docs/ApiResponseOptionPrices.md +10 -0
  14. data/docs/ApiResponseOptions.md +9 -0
  15. data/docs/ApiResponseOptionsChain.md +8 -0
  16. data/docs/ApiResponseOptionsExpirations.md +8 -0
  17. data/docs/ApiResponseSecurityAccumulationDistributionIndex.md +11 -0
  18. data/docs/ApiResponseSecurityAverageDailyTradingVolume.md +11 -0
  19. data/docs/ApiResponseSecurityAverageDirectionalIndex.md +11 -0
  20. data/docs/ApiResponseSecurityAverageTrueRange.md +11 -0
  21. data/docs/ApiResponseSecurityAwesomeOscillator.md +11 -0
  22. data/docs/ApiResponseSecurityBollingerBands.md +11 -0
  23. data/docs/ApiResponseSecurityChaikinMoneyFlow.md +11 -0
  24. data/docs/ApiResponseSecurityCommodityChannelIndex.md +11 -0
  25. data/docs/ApiResponseSecurityDetrendedPriceOscillator.md +11 -0
  26. data/docs/ApiResponseSecurityDonchianChannel.md +11 -0
  27. data/docs/ApiResponseSecurityEaseOfMovement.md +11 -0
  28. data/docs/ApiResponseSecurityForceIndex.md +11 -0
  29. data/docs/ApiResponseSecurityIchimokuKinkoHyo.md +11 -0
  30. data/docs/ApiResponseSecurityKeltnerChannel.md +11 -0
  31. data/docs/ApiResponseSecurityKnowSureThing.md +11 -0
  32. data/docs/ApiResponseSecurityMassIndex.md +11 -0
  33. data/docs/ApiResponseSecurityMoneyFlowIndex.md +11 -0
  34. data/docs/ApiResponseSecurityMovingAverageConvergenceDivergence.md +11 -0
  35. data/docs/ApiResponseSecurityNegativeVolumeIndex.md +11 -0
  36. data/docs/ApiResponseSecurityOnBalanceVolume.md +11 -0
  37. data/docs/ApiResponseSecurityOnBalanceVolumeMean.md +11 -0
  38. data/docs/ApiResponseSecurityRelativeStrengthIndex.md +11 -0
  39. data/docs/ApiResponseSecuritySimpleMovingAverage.md +11 -0
  40. data/docs/ApiResponseSecurityStochasticOscillator.md +11 -0
  41. data/docs/ApiResponseSecurityTripleExponentialAverage.md +11 -0
  42. data/docs/ApiResponseSecurityTrueStrengthIndex.md +11 -0
  43. data/docs/ApiResponseSecurityUltimateOscillator.md +11 -0
  44. data/docs/ApiResponseSecurityVolumePriceTrend.md +11 -0
  45. data/docs/ApiResponseSecurityVolumeWeightedAveragePrice.md +11 -0
  46. data/docs/ApiResponseSecurityVortexIndicator.md +11 -0
  47. data/docs/ApiResponseSecurityWilliamsR.md +11 -0
  48. data/docs/AverageDailyTradingVolumeTechnicalValue.md +9 -0
  49. data/docs/AverageDirectionalIndexTechnicalValue.md +11 -0
  50. data/docs/AverageTrueRangeTechnicalValue.md +9 -0
  51. data/docs/AwesomeOscillatorTechnicalValue.md +9 -0
  52. data/docs/BollingerBandsTechnicalValue.md +11 -0
  53. data/docs/ChaikinMoneyFlowTechnicalValue.md +9 -0
  54. data/docs/CommodityChannelIndexTechnicalValue.md +9 -0
  55. data/docs/CompanyApi.md +15 -15
  56. data/docs/CryptoApi.md +433 -0
  57. data/docs/CryptoAsk.md +9 -0
  58. data/docs/CryptoBid.md +9 -0
  59. data/docs/CryptoBookEntry.md +9 -0
  60. data/docs/CryptoCurrency.md +12 -0
  61. data/docs/CryptoExchange.md +13 -0
  62. data/docs/CryptoExchangeSummary.md +9 -0
  63. data/docs/CryptoPair.md +15 -0
  64. data/docs/CryptoPairSummary.md +9 -0
  65. data/docs/CryptoPrice.md +13 -0
  66. data/docs/CryptoSnapshot.md +22 -0
  67. data/docs/CryptoStat.md +15 -0
  68. data/docs/DataPointApi.md +10 -10
  69. data/docs/DetrendedPriceOscillatorTechnicalValue.md +9 -0
  70. data/docs/DonchianChannelTechnicalValue.md +10 -0
  71. data/docs/EaseOfMovementTechnicalValue.md +9 -0
  72. data/docs/ForceIndexTechnicalValue.md +9 -0
  73. data/docs/FundamentalsApi.md +4 -4
  74. data/docs/HistoricalDataApi.md +7 -5
  75. data/docs/IchimokuKinkoHyoTechnicalValue.md +13 -0
  76. data/docs/KeltnerChannelTechnicalValue.md +11 -0
  77. data/docs/KnowSureThingTechnicalValue.md +9 -0
  78. data/docs/MassIndexTechnicalValue.md +9 -0
  79. data/docs/MoneyFlowIndexTechnicalValue.md +9 -0
  80. data/docs/MovingAverageConvergenceDivergenceTechnicalValue.md +11 -0
  81. data/docs/NegativeVolumeIndexTechnicalValue.md +9 -0
  82. data/docs/OnBalanceVolumeMeanTechnicalValue.md +9 -0
  83. data/docs/OnBalanceVolumeTechnicalValue.md +9 -0
  84. data/docs/Option.md +13 -0
  85. data/docs/OptionChain.md +9 -0
  86. data/docs/OptionPrice.md +21 -0
  87. data/docs/OptionsApi.md +225 -0
  88. data/docs/RelativeStrengthIndexTechnicalValue.md +9 -0
  89. data/docs/ReportedFinancial.md +1 -0
  90. data/docs/ReportedFinancialDimension.md +9 -0
  91. data/docs/Security.md +1 -0
  92. data/docs/SecurityApi.md +1717 -22
  93. data/docs/SimpleMovingAverageTechnicalValue.md +9 -0
  94. data/docs/StochasticOscillatorTechnicalValue.md +10 -0
  95. data/docs/StockExchangeApi.md +6 -6
  96. data/docs/TechnicalApi.md +1701 -0
  97. data/docs/TechnicalIndicator.md +9 -0
  98. data/docs/TripleExponentialAverageTechnicalValue.md +9 -0
  99. data/docs/TrueStrengthIndexTechnicalValue.md +9 -0
  100. data/docs/UltimateOscillatorTechnicalValue.md +9 -0
  101. data/docs/VolumePriceTrendTechnicalValue.md +9 -0
  102. data/docs/VolumeWeightedAveragePriceValue.md +9 -0
  103. data/docs/VortexIndicatorTechnicalValue.md +10 -0
  104. data/docs/WilliamsRTechnicalValue.md +9 -0
  105. data/intrinio-sdk.gemspec +1 -1
  106. data/lib/intrinio-sdk.rb +95 -1
  107. data/lib/intrinio-sdk/api/company_api.rb +19 -19
  108. data/lib/intrinio-sdk/api/crypto_api.rb +560 -0
  109. data/lib/intrinio-sdk/api/data_point_api.rb +13 -13
  110. data/lib/intrinio-sdk/api/data_tag_api.rb +1 -1
  111. data/lib/intrinio-sdk/api/filing_api.rb +1 -1
  112. data/lib/intrinio-sdk/api/forex_api.rb +1 -1
  113. data/lib/intrinio-sdk/api/fundamentals_api.rb +5 -5
  114. data/lib/intrinio-sdk/api/historical_data_api.rb +13 -7
  115. data/lib/intrinio-sdk/api/index_api.rb +1 -1
  116. data/lib/intrinio-sdk/api/municipality_api.rb +1 -1
  117. data/lib/intrinio-sdk/api/options_api.rb +325 -0
  118. data/lib/intrinio-sdk/api/security_api.rb +2472 -21
  119. data/lib/intrinio-sdk/api/stock_exchange_api.rb +3 -3
  120. data/lib/intrinio-sdk/api/technical_api.rb +2474 -0
  121. data/lib/intrinio-sdk/api_client.rb +1 -1
  122. data/lib/intrinio-sdk/api_error.rb +1 -1
  123. data/lib/intrinio-sdk/configuration.rb +1 -1
  124. data/lib/intrinio-sdk/models/accumulation_distribution_index_technical_value.rb +199 -0
  125. data/lib/intrinio-sdk/models/api_response_companies.rb +1 -1
  126. data/lib/intrinio-sdk/models/api_response_companies_search.rb +1 -1
  127. data/lib/intrinio-sdk/models/api_response_company_filings.rb +1 -1
  128. data/lib/intrinio-sdk/models/api_response_company_fundamentals.rb +1 -1
  129. data/lib/intrinio-sdk/models/api_response_company_historical_data.rb +1 -1
  130. data/lib/intrinio-sdk/models/api_response_company_news.rb +1 -1
  131. data/lib/intrinio-sdk/models/api_response_company_securities.rb +1 -1
  132. data/lib/intrinio-sdk/models/api_response_crypto_book.rb +231 -0
  133. data/lib/intrinio-sdk/models/api_response_crypto_book_asks.rb +219 -0
  134. data/lib/intrinio-sdk/models/api_response_crypto_book_bids.rb +219 -0
  135. data/lib/intrinio-sdk/models/api_response_crypto_currencies.rb +191 -0
  136. data/lib/intrinio-sdk/models/api_response_crypto_exchanges.rb +191 -0
  137. data/lib/intrinio-sdk/models/api_response_crypto_pairs.rb +201 -0
  138. data/lib/intrinio-sdk/models/api_response_crypto_prices.rb +229 -0
  139. data/lib/intrinio-sdk/models/api_response_crypto_snapshot.rb +206 -0
  140. data/lib/intrinio-sdk/models/api_response_crypto_stats.rb +191 -0
  141. data/lib/intrinio-sdk/models/api_response_data_tags.rb +1 -1
  142. data/lib/intrinio-sdk/models/api_response_data_tags_search.rb +1 -1
  143. data/lib/intrinio-sdk/models/api_response_economic_index_historical_data.rb +1 -1
  144. data/lib/intrinio-sdk/models/api_response_economic_indices.rb +1 -1
  145. data/lib/intrinio-sdk/models/api_response_economic_indices_search.rb +1 -1
  146. data/lib/intrinio-sdk/models/api_response_filing_notes.rb +1 -1
  147. data/lib/intrinio-sdk/models/api_response_filing_notes_search.rb +1 -1
  148. data/lib/intrinio-sdk/models/api_response_filings.rb +1 -1
  149. data/lib/intrinio-sdk/models/api_response_forex_currencies.rb +1 -1
  150. data/lib/intrinio-sdk/models/api_response_forex_pairs.rb +1 -1
  151. data/lib/intrinio-sdk/models/api_response_forex_prices.rb +1 -1
  152. data/lib/intrinio-sdk/models/api_response_historical_data.rb +1 -1
  153. data/lib/intrinio-sdk/models/api_response_municipalities.rb +1 -1
  154. data/lib/intrinio-sdk/models/api_response_municipalitiy_financials.rb +1 -1
  155. data/lib/intrinio-sdk/models/api_response_news.rb +1 -1
  156. data/lib/intrinio-sdk/models/api_response_option_prices.rb +210 -0
  157. data/lib/intrinio-sdk/models/api_response_options.rb +201 -0
  158. data/lib/intrinio-sdk/models/api_response_options_chain.rb +191 -0
  159. data/lib/intrinio-sdk/models/api_response_options_expirations.rb +191 -0
  160. data/lib/intrinio-sdk/models/api_response_reported_financials.rb +1 -1
  161. data/lib/intrinio-sdk/models/api_response_securities.rb +1 -1
  162. data/lib/intrinio-sdk/models/api_response_securities_search.rb +1 -1
  163. data/lib/intrinio-sdk/models/api_response_security_accumulation_distribution_index.rb +220 -0
  164. data/lib/intrinio-sdk/models/api_response_security_average_daily_trading_volume.rb +220 -0
  165. data/lib/intrinio-sdk/models/api_response_security_average_directional_index.rb +220 -0
  166. data/lib/intrinio-sdk/models/api_response_security_average_true_range.rb +220 -0
  167. data/lib/intrinio-sdk/models/api_response_security_awesome_oscillator.rb +220 -0
  168. data/lib/intrinio-sdk/models/api_response_security_bollinger_bands.rb +220 -0
  169. data/lib/intrinio-sdk/models/api_response_security_chaikin_money_flow.rb +220 -0
  170. data/lib/intrinio-sdk/models/api_response_security_commodity_channel_index.rb +220 -0
  171. data/lib/intrinio-sdk/models/api_response_security_detrended_price_oscillator.rb +220 -0
  172. data/lib/intrinio-sdk/models/api_response_security_donchian_channel.rb +220 -0
  173. data/lib/intrinio-sdk/models/api_response_security_ease_of_movement.rb +220 -0
  174. data/lib/intrinio-sdk/models/api_response_security_force_index.rb +220 -0
  175. data/lib/intrinio-sdk/models/api_response_security_historical_data.rb +1 -1
  176. data/lib/intrinio-sdk/models/api_response_security_ichimoku_kinko_hyo.rb +220 -0
  177. data/lib/intrinio-sdk/models/api_response_security_intraday_prices.rb +1 -1
  178. data/lib/intrinio-sdk/models/api_response_security_keltner_channel.rb +220 -0
  179. data/lib/intrinio-sdk/models/api_response_security_know_sure_thing.rb +220 -0
  180. data/lib/intrinio-sdk/models/api_response_security_mass_index.rb +220 -0
  181. data/lib/intrinio-sdk/models/api_response_security_money_flow_index.rb +220 -0
  182. data/lib/intrinio-sdk/models/api_response_security_moving_average_convergence_divergence.rb +220 -0
  183. data/lib/intrinio-sdk/models/api_response_security_negative_volume_index.rb +220 -0
  184. data/lib/intrinio-sdk/models/api_response_security_on_balance_volume.rb +220 -0
  185. data/lib/intrinio-sdk/models/api_response_security_on_balance_volume_mean.rb +220 -0
  186. data/lib/intrinio-sdk/models/api_response_security_relative_strength_index.rb +220 -0
  187. data/lib/intrinio-sdk/models/api_response_security_simple_moving_average.rb +220 -0
  188. data/lib/intrinio-sdk/models/api_response_security_stochastic_oscillator.rb +220 -0
  189. data/lib/intrinio-sdk/models/api_response_security_stock_price_adjustments.rb +1 -1
  190. data/lib/intrinio-sdk/models/api_response_security_stock_prices.rb +1 -1
  191. data/lib/intrinio-sdk/models/api_response_security_triple_exponential_average.rb +220 -0
  192. data/lib/intrinio-sdk/models/api_response_security_true_strength_index.rb +220 -0
  193. data/lib/intrinio-sdk/models/api_response_security_ultimate_oscillator.rb +220 -0
  194. data/lib/intrinio-sdk/models/api_response_security_volume_price_trend.rb +220 -0
  195. data/lib/intrinio-sdk/models/api_response_security_volume_weighted_average_price.rb +220 -0
  196. data/lib/intrinio-sdk/models/api_response_security_vortex_indicator.rb +220 -0
  197. data/lib/intrinio-sdk/models/api_response_security_williams_r.rb +220 -0
  198. data/lib/intrinio-sdk/models/api_response_sic_index_historical_data.rb +1 -1
  199. data/lib/intrinio-sdk/models/api_response_sic_indices.rb +1 -1
  200. data/lib/intrinio-sdk/models/api_response_sic_indices_search.rb +1 -1
  201. data/lib/intrinio-sdk/models/api_response_standardized_financials.rb +1 -1
  202. data/lib/intrinio-sdk/models/api_response_stock_exchange_realtime_stock_prices.rb +1 -1
  203. data/lib/intrinio-sdk/models/api_response_stock_exchange_securities.rb +1 -1
  204. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_price_adjustments.rb +1 -1
  205. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_prices.rb +1 -1
  206. data/lib/intrinio-sdk/models/api_response_stock_exchanges.rb +1 -1
  207. data/lib/intrinio-sdk/models/api_response_stock_market_index_historical_data.rb +1 -1
  208. data/lib/intrinio-sdk/models/api_response_stock_market_indices.rb +1 -1
  209. data/lib/intrinio-sdk/models/api_response_stock_market_indices_search.rb +1 -1
  210. data/lib/intrinio-sdk/models/average_daily_trading_volume_technical_value.rb +199 -0
  211. data/lib/intrinio-sdk/models/average_directional_index_technical_value.rb +219 -0
  212. data/lib/intrinio-sdk/models/average_true_range_technical_value.rb +199 -0
  213. data/lib/intrinio-sdk/models/awesome_oscillator_technical_value.rb +199 -0
  214. data/lib/intrinio-sdk/models/bollinger_bands_technical_value.rb +219 -0
  215. data/lib/intrinio-sdk/models/chaikin_money_flow_technical_value.rb +199 -0
  216. data/lib/intrinio-sdk/models/commodity_channel_index_technical_value.rb +199 -0
  217. data/lib/intrinio-sdk/models/company.rb +1 -1
  218. data/lib/intrinio-sdk/models/company_filing.rb +1 -1
  219. data/lib/intrinio-sdk/models/company_news.rb +1 -1
  220. data/lib/intrinio-sdk/models/company_news_summary.rb +1 -1
  221. data/lib/intrinio-sdk/models/company_summary.rb +1 -1
  222. data/lib/intrinio-sdk/models/crypto_ask.rb +199 -0
  223. data/lib/intrinio-sdk/models/crypto_bid.rb +199 -0
  224. data/lib/intrinio-sdk/models/crypto_book_entry.rb +199 -0
  225. data/lib/intrinio-sdk/models/crypto_currency.rb +229 -0
  226. data/lib/intrinio-sdk/models/crypto_exchange.rb +239 -0
  227. data/lib/intrinio-sdk/models/crypto_exchange_summary.rb +199 -0
  228. data/lib/intrinio-sdk/models/crypto_pair.rb +259 -0
  229. data/lib/intrinio-sdk/models/crypto_pair_summary.rb +199 -0
  230. data/lib/intrinio-sdk/models/crypto_price.rb +239 -0
  231. data/lib/intrinio-sdk/models/crypto_snapshot.rb +329 -0
  232. data/lib/intrinio-sdk/models/crypto_stat.rb +259 -0
  233. data/lib/intrinio-sdk/models/data_tag.rb +1 -1
  234. data/lib/intrinio-sdk/models/data_tag_summary.rb +1 -1
  235. data/lib/intrinio-sdk/models/detrended_price_oscillator_technical_value.rb +199 -0
  236. data/lib/intrinio-sdk/models/dividend_record.rb +1 -1
  237. data/lib/intrinio-sdk/models/donchian_channel_technical_value.rb +209 -0
  238. data/lib/intrinio-sdk/models/earnings_record.rb +1 -1
  239. data/lib/intrinio-sdk/models/ease_of_movement_technical_value.rb +199 -0
  240. data/lib/intrinio-sdk/models/economic_index.rb +1 -1
  241. data/lib/intrinio-sdk/models/economic_index_summary.rb +1 -1
  242. data/lib/intrinio-sdk/models/filing.rb +1 -1
  243. data/lib/intrinio-sdk/models/filing_note.rb +1 -1
  244. data/lib/intrinio-sdk/models/filing_note_filing.rb +1 -1
  245. data/lib/intrinio-sdk/models/filing_note_summary.rb +1 -1
  246. data/lib/intrinio-sdk/models/filing_summary.rb +1 -1
  247. data/lib/intrinio-sdk/models/force_index_technical_value.rb +199 -0
  248. data/lib/intrinio-sdk/models/forex_currency.rb +1 -1
  249. data/lib/intrinio-sdk/models/forex_pair.rb +1 -1
  250. data/lib/intrinio-sdk/models/forex_price.rb +1 -1
  251. data/lib/intrinio-sdk/models/fundamental.rb +1 -1
  252. data/lib/intrinio-sdk/models/fundamental_summary.rb +1 -1
  253. data/lib/intrinio-sdk/models/historical_data.rb +1 -1
  254. data/lib/intrinio-sdk/models/ichimoku_kinko_hyo_technical_value.rb +239 -0
  255. data/lib/intrinio-sdk/models/intraday_stock_price.rb +1 -1
  256. data/lib/intrinio-sdk/models/keltner_channel_technical_value.rb +219 -0
  257. data/lib/intrinio-sdk/models/know_sure_thing_technical_value.rb +199 -0
  258. data/lib/intrinio-sdk/models/mass_index_technical_value.rb +199 -0
  259. data/lib/intrinio-sdk/models/money_flow_index_technical_value.rb +199 -0
  260. data/lib/intrinio-sdk/models/moving_average_convergence_divergence_technical_value.rb +219 -0
  261. data/lib/intrinio-sdk/models/municipality.rb +1 -1
  262. data/lib/intrinio-sdk/models/municipality_financial.rb +1 -1
  263. data/lib/intrinio-sdk/models/negative_volume_index_technical_value.rb +199 -0
  264. data/lib/intrinio-sdk/models/on_balance_volume_mean_technical_value.rb +199 -0
  265. data/lib/intrinio-sdk/models/on_balance_volume_technical_value.rb +199 -0
  266. data/lib/intrinio-sdk/models/option.rb +239 -0
  267. data/lib/intrinio-sdk/models/option_chain.rb +197 -0
  268. data/lib/intrinio-sdk/models/option_price.rb +319 -0
  269. data/lib/intrinio-sdk/models/realtime_stock_price.rb +1 -1
  270. data/lib/intrinio-sdk/models/realtime_stock_price_security.rb +1 -1
  271. data/lib/intrinio-sdk/models/relative_strength_index_technical_value.rb +199 -0
  272. data/lib/intrinio-sdk/models/reported_financial.rb +18 -6
  273. data/lib/intrinio-sdk/models/reported_financial_dimension.rb +199 -0
  274. data/lib/intrinio-sdk/models/reported_tag.rb +1 -1
  275. data/lib/intrinio-sdk/models/security.rb +15 -5
  276. data/lib/intrinio-sdk/models/security_screen_clause.rb +1 -1
  277. data/lib/intrinio-sdk/models/security_screen_group.rb +1 -1
  278. data/lib/intrinio-sdk/models/security_screen_result.rb +1 -1
  279. data/lib/intrinio-sdk/models/security_screen_result_data.rb +1 -1
  280. data/lib/intrinio-sdk/models/security_summary.rb +1 -1
  281. data/lib/intrinio-sdk/models/sic_index.rb +1 -1
  282. data/lib/intrinio-sdk/models/simple_moving_average_technical_value.rb +199 -0
  283. data/lib/intrinio-sdk/models/standardized_financial.rb +1 -1
  284. data/lib/intrinio-sdk/models/stochastic_oscillator_technical_value.rb +209 -0
  285. data/lib/intrinio-sdk/models/stock_exchange.rb +1 -1
  286. data/lib/intrinio-sdk/models/stock_market_index.rb +1 -1
  287. data/lib/intrinio-sdk/models/stock_market_index_summary.rb +1 -1
  288. data/lib/intrinio-sdk/models/stock_price.rb +1 -1
  289. data/lib/intrinio-sdk/models/stock_price_adjustment.rb +1 -1
  290. data/lib/intrinio-sdk/models/stock_price_adjustment_summary.rb +1 -1
  291. data/lib/intrinio-sdk/models/stock_price_summary.rb +1 -1
  292. data/lib/intrinio-sdk/models/technical_indicator.rb +199 -0
  293. data/lib/intrinio-sdk/models/triple_exponential_average_technical_value.rb +199 -0
  294. data/lib/intrinio-sdk/models/true_strength_index_technical_value.rb +199 -0
  295. data/lib/intrinio-sdk/models/ultimate_oscillator_technical_value.rb +199 -0
  296. data/lib/intrinio-sdk/models/volume_price_trend_technical_value.rb +199 -0
  297. data/lib/intrinio-sdk/models/volume_weighted_average_price_value.rb +199 -0
  298. data/lib/intrinio-sdk/models/vortex_indicator_technical_value.rb +209 -0
  299. data/lib/intrinio-sdk/models/williams_r_technical_value.rb +199 -0
  300. data/lib/intrinio-sdk/version.rb +2 -2
  301. data/spec/api/company_api_spec.rb +9 -9
  302. data/spec/api/crypto_api_spec.rb +166 -0
  303. data/spec/api/data_point_api_spec.rb +6 -6
  304. data/spec/api/fundamentals_api_spec.rb +2 -2
  305. data/spec/api/historical_data_api_spec.rb +4 -3
  306. data/spec/api/options_api_spec.rb +105 -0
  307. data/spec/api/security_api_spec.rb +562 -10
  308. data/spec/api/stock_exchange_api_spec.rb +1 -1
  309. data/spec/api/technical_api_spec.rb +587 -0
  310. data/spec/models/accumulation_distribution_index_technical_value_spec.rb +48 -0
  311. data/spec/models/api_response_crypto_book_asks_spec.rb +60 -0
  312. data/spec/models/api_response_crypto_book_bids_spec.rb +60 -0
  313. data/spec/models/api_response_crypto_book_spec.rb +66 -0
  314. data/spec/models/api_response_crypto_currencies_spec.rb +42 -0
  315. data/spec/models/api_response_crypto_exchanges_spec.rb +42 -0
  316. data/spec/models/api_response_crypto_pairs_spec.rb +48 -0
  317. data/spec/models/api_response_crypto_prices_spec.rb +66 -0
  318. data/spec/models/api_response_crypto_snapshot_spec.rb +54 -0
  319. data/spec/models/api_response_crypto_stats_spec.rb +42 -0
  320. data/spec/models/api_response_option_prices_spec.rb +54 -0
  321. data/spec/models/api_response_options_chain_spec.rb +42 -0
  322. data/spec/models/api_response_options_expirations_spec.rb +42 -0
  323. data/spec/models/api_response_options_spec.rb +48 -0
  324. data/spec/models/api_response_security_accumulation_distribution_index_spec.rb +60 -0
  325. data/spec/models/api_response_security_average_daily_trading_volume_spec.rb +60 -0
  326. data/spec/models/api_response_security_average_directional_index_spec.rb +60 -0
  327. data/spec/models/api_response_security_average_true_range_spec.rb +60 -0
  328. data/spec/models/api_response_security_awesome_oscillator_spec.rb +60 -0
  329. data/spec/models/api_response_security_bollinger_bands_spec.rb +60 -0
  330. data/spec/models/api_response_security_chaikin_money_flow_spec.rb +60 -0
  331. data/spec/models/api_response_security_commodity_channel_index_spec.rb +60 -0
  332. data/spec/models/api_response_security_detrended_price_oscillator_spec.rb +60 -0
  333. data/spec/models/api_response_security_donchian_channel_spec.rb +60 -0
  334. data/spec/models/api_response_security_ease_of_movement_spec.rb +60 -0
  335. data/spec/models/api_response_security_force_index_spec.rb +60 -0
  336. data/spec/models/api_response_security_ichimoku_kinko_hyo_spec.rb +60 -0
  337. data/spec/models/api_response_security_keltner_channel_spec.rb +60 -0
  338. data/spec/models/api_response_security_know_sure_thing_spec.rb +60 -0
  339. data/spec/models/api_response_security_mass_index_spec.rb +60 -0
  340. data/spec/models/api_response_security_money_flow_index_spec.rb +60 -0
  341. data/spec/models/api_response_security_moving_average_convergence_divergence_spec.rb +60 -0
  342. data/spec/models/api_response_security_negative_volume_index_spec.rb +60 -0
  343. data/spec/models/api_response_security_on_balance_volume_mean_spec.rb +60 -0
  344. data/spec/models/api_response_security_on_balance_volume_spec.rb +60 -0
  345. data/spec/models/api_response_security_relative_strength_index_spec.rb +60 -0
  346. data/spec/models/api_response_security_simple_moving_average_spec.rb +60 -0
  347. data/spec/models/api_response_security_stochastic_oscillator_spec.rb +60 -0
  348. data/spec/models/api_response_security_triple_exponential_average_spec.rb +60 -0
  349. data/spec/models/api_response_security_true_strength_index_spec.rb +60 -0
  350. data/spec/models/api_response_security_ultimate_oscillator_spec.rb +60 -0
  351. data/spec/models/api_response_security_volume_price_trend_spec.rb +60 -0
  352. data/spec/models/api_response_security_volume_weighted_average_price_spec.rb +60 -0
  353. data/spec/models/api_response_security_vortex_indicator_spec.rb +60 -0
  354. data/spec/models/api_response_security_williams_r_spec.rb +60 -0
  355. data/spec/models/average_daily_trading_volume_technical_value_spec.rb +48 -0
  356. data/spec/models/average_directional_index_technical_value_spec.rb +60 -0
  357. data/spec/models/average_true_range_technical_value_spec.rb +48 -0
  358. data/spec/models/awesome_oscillator_technical_value_spec.rb +48 -0
  359. data/spec/models/bollinger_bands_technical_value_spec.rb +60 -0
  360. data/spec/models/chaikin_money_flow_technical_value_spec.rb +48 -0
  361. data/spec/models/commodity_channel_index_technical_value_spec.rb +48 -0
  362. data/spec/models/crypto_ask_spec.rb +48 -0
  363. data/spec/models/crypto_bid_spec.rb +48 -0
  364. data/spec/models/crypto_book_entry_spec.rb +48 -0
  365. data/spec/models/crypto_currency_spec.rb +66 -0
  366. data/spec/models/crypto_exchange_spec.rb +72 -0
  367. data/spec/models/crypto_exchange_summary_spec.rb +48 -0
  368. data/spec/models/crypto_pair_spec.rb +84 -0
  369. data/spec/models/crypto_pair_summary_spec.rb +48 -0
  370. data/spec/models/crypto_price_spec.rb +72 -0
  371. data/spec/models/crypto_snapshot_spec.rb +126 -0
  372. data/spec/models/crypto_stat_spec.rb +84 -0
  373. data/spec/models/detrended_price_oscillator_technical_value_spec.rb +48 -0
  374. data/spec/models/donchian_channel_technical_value_spec.rb +54 -0
  375. data/spec/models/ease_of_movement_technical_value_spec.rb +48 -0
  376. data/spec/models/force_index_technical_value_spec.rb +48 -0
  377. data/spec/models/ichimoku_kinko_hyo_technical_value_spec.rb +72 -0
  378. data/spec/models/keltner_channel_technical_value_spec.rb +60 -0
  379. data/spec/models/know_sure_thing_technical_value_spec.rb +48 -0
  380. data/spec/models/mass_index_technical_value_spec.rb +48 -0
  381. data/spec/models/money_flow_index_technical_value_spec.rb +48 -0
  382. data/spec/models/moving_average_convergence_divergence_technical_value_spec.rb +60 -0
  383. data/spec/models/negative_volume_index_technical_value_spec.rb +48 -0
  384. data/spec/models/on_balance_volume_mean_technical_value_spec.rb +48 -0
  385. data/spec/models/on_balance_volume_technical_value_spec.rb +48 -0
  386. data/spec/models/option_chain_spec.rb +48 -0
  387. data/spec/models/option_price_spec.rb +120 -0
  388. data/spec/models/option_spec.rb +72 -0
  389. data/spec/models/relative_strength_index_technical_value_spec.rb +48 -0
  390. data/spec/models/reported_financial_dimension_spec.rb +48 -0
  391. data/spec/models/reported_financial_spec.rb +6 -0
  392. data/spec/models/security_spec.rb +6 -0
  393. data/spec/models/simple_moving_average_technical_value_spec.rb +48 -0
  394. data/spec/models/stochastic_oscillator_technical_value_spec.rb +54 -0
  395. data/spec/models/technical_indicator_spec.rb +48 -0
  396. data/spec/models/triple_exponential_average_technical_value_spec.rb +48 -0
  397. data/spec/models/true_strength_index_technical_value_spec.rb +48 -0
  398. data/spec/models/ultimate_oscillator_technical_value_spec.rb +48 -0
  399. data/spec/models/volume_price_trend_technical_value_spec.rb +48 -0
  400. data/spec/models/volume_weighted_average_price_value_spec.rb +48 -0
  401. data/spec/models/vortex_indicator_technical_value_spec.rb +54 -0
  402. data/spec/models/williams_r_technical_value_spec.rb +48 -0
  403. metadata +378 -2
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Intrinio API
3
+
4
+ #Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
5
+
6
+ OpenAPI spec version: 2.5.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Intrinio
16
+ # The Commodity Channel Index calculations for the Stock Prices of the given Security
17
+ class ApiResponseSecurityCommodityChannelIndex
18
+ attr_accessor :technicals
19
+
20
+ # The name and symbol of the technical indicator
21
+ attr_accessor :indicator
22
+
23
+ # The Security of the Stock Price
24
+ attr_accessor :security
25
+
26
+ # The token required to request the next page of the data
27
+ attr_accessor :next_page
28
+
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'technicals' => :'technicals',
34
+ :'indicator' => :'indicator',
35
+ :'security' => :'security',
36
+ :'next_page' => :'next_page'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'technicals' => :'Array<CommodityChannelIndexTechnicalValue>',
44
+ :'indicator' => :'TechnicalIndicator',
45
+ :'security' => :'SecuritySummary',
46
+ :'next_page' => :'String'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
57
+
58
+ if attributes.has_key?(:'technicals')
59
+ if (value = attributes[:'technicals']).is_a?(Array)
60
+ self.technicals = value
61
+ end
62
+ end
63
+
64
+ if attributes.has_key?(:'indicator')
65
+ self.indicator = attributes[:'indicator']
66
+ end
67
+
68
+ if attributes.has_key?(:'security')
69
+ self.security = attributes[:'security']
70
+ end
71
+
72
+ if attributes.has_key?(:'next_page')
73
+ self.next_page = attributes[:'next_page']
74
+ end
75
+
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ return invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ return true
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] Object to be compared
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ technicals == o.technicals &&
97
+ indicator == o.indicator &&
98
+ security == o.security &&
99
+ next_page == o.next_page
100
+ end
101
+
102
+ # @see the `==` method
103
+ # @param [Object] Object to be compared
104
+ def eql?(o)
105
+ self == o
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Fixnum] Hash code
110
+ def hash
111
+ [technicals, indicator, security, next_page].hash
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.swagger_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ DateTime.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :BOOLEAN
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ temp_model = Intrinio.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ next if value.nil?
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map{ |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Intrinio API
3
+
4
+ #Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
5
+
6
+ OpenAPI spec version: 2.5.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Intrinio
16
+ # The Detrended Price Oscillator calculations for the Stock Prices of the given Security
17
+ class ApiResponseSecurityDetrendedPriceOscillator
18
+ attr_accessor :technicals
19
+
20
+ # The name and symbol of the technical indicator
21
+ attr_accessor :indicator
22
+
23
+ # The Security of the Stock Price
24
+ attr_accessor :security
25
+
26
+ # The token required to request the next page of the data
27
+ attr_accessor :next_page
28
+
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'technicals' => :'technicals',
34
+ :'indicator' => :'indicator',
35
+ :'security' => :'security',
36
+ :'next_page' => :'next_page'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'technicals' => :'Array<DetrendedPriceOscillatorTechnicalValue>',
44
+ :'indicator' => :'TechnicalIndicator',
45
+ :'security' => :'SecuritySummary',
46
+ :'next_page' => :'String'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
57
+
58
+ if attributes.has_key?(:'technicals')
59
+ if (value = attributes[:'technicals']).is_a?(Array)
60
+ self.technicals = value
61
+ end
62
+ end
63
+
64
+ if attributes.has_key?(:'indicator')
65
+ self.indicator = attributes[:'indicator']
66
+ end
67
+
68
+ if attributes.has_key?(:'security')
69
+ self.security = attributes[:'security']
70
+ end
71
+
72
+ if attributes.has_key?(:'next_page')
73
+ self.next_page = attributes[:'next_page']
74
+ end
75
+
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ return invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ return true
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] Object to be compared
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ technicals == o.technicals &&
97
+ indicator == o.indicator &&
98
+ security == o.security &&
99
+ next_page == o.next_page
100
+ end
101
+
102
+ # @see the `==` method
103
+ # @param [Object] Object to be compared
104
+ def eql?(o)
105
+ self == o
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Fixnum] Hash code
110
+ def hash
111
+ [technicals, indicator, security, next_page].hash
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.swagger_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ DateTime.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :BOOLEAN
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ temp_model = Intrinio.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ next if value.nil?
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map{ |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Intrinio API
3
+
4
+ #Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
5
+
6
+ OpenAPI spec version: 2.5.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Intrinio
16
+ # The Donchian Channel calculations for the Stock Prices of the given Security
17
+ class ApiResponseSecurityDonchianChannel
18
+ attr_accessor :technicals
19
+
20
+ # The name and symbol of the technical indicator
21
+ attr_accessor :indicator
22
+
23
+ # The Security of the Stock Price
24
+ attr_accessor :security
25
+
26
+ # The token required to request the next page of the data
27
+ attr_accessor :next_page
28
+
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'technicals' => :'technicals',
34
+ :'indicator' => :'indicator',
35
+ :'security' => :'security',
36
+ :'next_page' => :'next_page'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'technicals' => :'Array<DonchianChannelTechnicalValue>',
44
+ :'indicator' => :'TechnicalIndicator',
45
+ :'security' => :'SecuritySummary',
46
+ :'next_page' => :'String'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
57
+
58
+ if attributes.has_key?(:'technicals')
59
+ if (value = attributes[:'technicals']).is_a?(Array)
60
+ self.technicals = value
61
+ end
62
+ end
63
+
64
+ if attributes.has_key?(:'indicator')
65
+ self.indicator = attributes[:'indicator']
66
+ end
67
+
68
+ if attributes.has_key?(:'security')
69
+ self.security = attributes[:'security']
70
+ end
71
+
72
+ if attributes.has_key?(:'next_page')
73
+ self.next_page = attributes[:'next_page']
74
+ end
75
+
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ return invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ return true
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] Object to be compared
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ technicals == o.technicals &&
97
+ indicator == o.indicator &&
98
+ security == o.security &&
99
+ next_page == o.next_page
100
+ end
101
+
102
+ # @see the `==` method
103
+ # @param [Object] Object to be compared
104
+ def eql?(o)
105
+ self == o
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Fixnum] Hash code
110
+ def hash
111
+ [technicals, indicator, security, next_page].hash
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.swagger_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ DateTime.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :BOOLEAN
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ temp_model = Intrinio.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ next if value.nil?
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map{ |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end