intrinio-sdk 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
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,199 @@
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 date_time and obv_mean values of a On-balance Volume Mean technical indicator calculation
17
+ class OnBalanceVolumeMeanTechnicalValue
18
+ # The date_time of the observation
19
+ attr_accessor :date_time
20
+
21
+ # The On-balance Volume Mean calculation value
22
+ attr_accessor :obv_mean
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'date_time' => :'date_time',
29
+ :'obv_mean' => :'obv_mean'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'date_time' => :'DateTime',
37
+ :'obv_mean' => :'Float'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes.has_key?(:'date_time')
50
+ self.date_time = attributes[:'date_time']
51
+ end
52
+
53
+ if attributes.has_key?(:'obv_mean')
54
+ self.obv_mean = attributes[:'obv_mean']
55
+ end
56
+
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ return invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ date_time == o.date_time &&
78
+ obv_mean == o.obv_mean
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [date_time, obv_mean].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.swagger_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :String
124
+ value.to_s
125
+ when :Integer
126
+ value.to_i
127
+ when :Float
128
+ value.to_f
129
+ when :BOOLEAN
130
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
131
+ true
132
+ else
133
+ false
134
+ end
135
+ when :Object
136
+ # generic object (usually a Hash), return directly
137
+ value
138
+ when /\AArray<(?<inner_type>.+)>\z/
139
+ inner_type = Regexp.last_match[:inner_type]
140
+ value.map { |v| _deserialize(inner_type, v) }
141
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
142
+ k_type = Regexp.last_match[:k_type]
143
+ v_type = Regexp.last_match[:v_type]
144
+ {}.tap do |hash|
145
+ value.each do |k, v|
146
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ end
148
+ end
149
+ else # model
150
+ temp_model = Intrinio.const_get(type).new
151
+ temp_model.build_from_hash(value)
152
+ end
153
+ end
154
+
155
+ # Returns the string representation of the object
156
+ # @return [String] String presentation of the object
157
+ def to_s
158
+ to_hash.to_s
159
+ end
160
+
161
+ # to_body is an alias to to_hash (backward compatibility)
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_body
164
+ to_hash
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ next if value.nil?
174
+ hash[param] = _to_hash(value)
175
+ end
176
+ hash
177
+ end
178
+
179
+ # Outputs non-array value in the form of hash
180
+ # For object, use to_hash. Otherwise, just return the value
181
+ # @param [Object] value Any valid value
182
+ # @return [Hash] Returns the value in the form of hash
183
+ def _to_hash(value)
184
+ if value.is_a?(Array)
185
+ value.compact.map{ |v| _to_hash(v) }
186
+ elsif value.is_a?(Hash)
187
+ {}.tap do |hash|
188
+ value.each { |k, v| hash[k] = _to_hash(v) }
189
+ end
190
+ elsif value.respond_to? :to_hash
191
+ value.to_hash
192
+ else
193
+ value
194
+ end
195
+ end
196
+
197
+ end
198
+
199
+ end
@@ -0,0 +1,199 @@
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 date_time and obv values of a On-balance Volume technical indicator calculation
17
+ class OnBalanceVolumeTechnicalValue
18
+ # The date_time of the observation
19
+ attr_accessor :date_time
20
+
21
+ # The On-balance Volume calculation value
22
+ attr_accessor :obv
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'date_time' => :'date_time',
29
+ :'obv' => :'obv'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'date_time' => :'DateTime',
37
+ :'obv' => :'Float'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes.has_key?(:'date_time')
50
+ self.date_time = attributes[:'date_time']
51
+ end
52
+
53
+ if attributes.has_key?(:'obv')
54
+ self.obv = attributes[:'obv']
55
+ end
56
+
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ return invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ date_time == o.date_time &&
78
+ obv == o.obv
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [date_time, obv].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.swagger_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :String
124
+ value.to_s
125
+ when :Integer
126
+ value.to_i
127
+ when :Float
128
+ value.to_f
129
+ when :BOOLEAN
130
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
131
+ true
132
+ else
133
+ false
134
+ end
135
+ when :Object
136
+ # generic object (usually a Hash), return directly
137
+ value
138
+ when /\AArray<(?<inner_type>.+)>\z/
139
+ inner_type = Regexp.last_match[:inner_type]
140
+ value.map { |v| _deserialize(inner_type, v) }
141
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
142
+ k_type = Regexp.last_match[:k_type]
143
+ v_type = Regexp.last_match[:v_type]
144
+ {}.tap do |hash|
145
+ value.each do |k, v|
146
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ end
148
+ end
149
+ else # model
150
+ temp_model = Intrinio.const_get(type).new
151
+ temp_model.build_from_hash(value)
152
+ end
153
+ end
154
+
155
+ # Returns the string representation of the object
156
+ # @return [String] String presentation of the object
157
+ def to_s
158
+ to_hash.to_s
159
+ end
160
+
161
+ # to_body is an alias to to_hash (backward compatibility)
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_body
164
+ to_hash
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ next if value.nil?
174
+ hash[param] = _to_hash(value)
175
+ end
176
+ hash
177
+ end
178
+
179
+ # Outputs non-array value in the form of hash
180
+ # For object, use to_hash. Otherwise, just return the value
181
+ # @param [Object] value Any valid value
182
+ # @return [Hash] Returns the value in the form of hash
183
+ def _to_hash(value)
184
+ if value.is_a?(Array)
185
+ value.compact.map{ |v| _to_hash(v) }
186
+ elsif value.is_a?(Hash)
187
+ {}.tap do |hash|
188
+ value.each { |k, v| hash[k] = _to_hash(v) }
189
+ end
190
+ elsif value.respond_to? :to_hash
191
+ value.to_hash
192
+ else
193
+ value
194
+ end
195
+ end
196
+
197
+ end
198
+
199
+ end
@@ -0,0 +1,239 @@
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
+ # An option contract gives the buyer of a contract the right to buy or sell a particular asset at a later date at an agreed upon price.
17
+ class Option
18
+ # The Intrinio ID for the Option.
19
+ attr_accessor :id
20
+
21
+ # The Intrinio Code for the Option.
22
+ attr_accessor :code
23
+
24
+ # The ticker symbol of the Security for the Option.
25
+ attr_accessor :ticker
26
+
27
+ # The date on which the Option expires. The Option becomes invalid after this date and cannot be exercised.
28
+ attr_accessor :expiration
29
+
30
+ # The strike price is the fixed price at which a derivative can be exercised, and refers to the price of the derivative’s underlying asset. In a call option, the strike price is the price at which the option holder can purchase the underlying security. For a put option, the strike price is the price at which the option holder can sell the underlying security.
31
+ attr_accessor :strike
32
+
33
+ # The type of Option (put or call). A put option is an option contract giving the owner the right, but not the obligation, to sell a specified amount of an underlying asset at a specified price before the option's expiration date. A call option gives the holder the right to buy an underlying asset at a specified price, before the option's expiration date.
34
+ attr_accessor :type
35
+
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'id' => :'id',
41
+ :'code' => :'code',
42
+ :'ticker' => :'ticker',
43
+ :'expiration' => :'expiration',
44
+ :'strike' => :'strike',
45
+ :'type' => :'type'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+ :'id' => :'String',
53
+ :'code' => :'String',
54
+ :'ticker' => :'String',
55
+ :'expiration' => :'String',
56
+ :'strike' => :'Float',
57
+ :'type' => :'String'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
68
+
69
+ if attributes.has_key?(:'id')
70
+ self.id = attributes[:'id']
71
+ end
72
+
73
+ if attributes.has_key?(:'code')
74
+ self.code = attributes[:'code']
75
+ end
76
+
77
+ if attributes.has_key?(:'ticker')
78
+ self.ticker = attributes[:'ticker']
79
+ end
80
+
81
+ if attributes.has_key?(:'expiration')
82
+ self.expiration = attributes[:'expiration']
83
+ end
84
+
85
+ if attributes.has_key?(:'strike')
86
+ self.strike = attributes[:'strike']
87
+ end
88
+
89
+ if attributes.has_key?(:'type')
90
+ self.type = attributes[:'type']
91
+ end
92
+
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ return invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ return true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ id == o.id &&
114
+ code == o.code &&
115
+ ticker == o.ticker &&
116
+ expiration == o.expiration &&
117
+ strike == o.strike &&
118
+ type == o.type
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Fixnum] Hash code
129
+ def hash
130
+ [id, code, ticker, expiration, strike, type].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ self.class.swagger_types.each_pair do |key, type|
139
+ if type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
143
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
144
+ end
145
+ elsif !attributes[self.class.attribute_map[key]].nil?
146
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
147
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
148
+ end
149
+
150
+ self
151
+ end
152
+
153
+ # Deserializes the data based on type
154
+ # @param string type Data type
155
+ # @param string value Value to be deserialized
156
+ # @return [Object] Deserialized data
157
+ def _deserialize(type, value)
158
+ case type.to_sym
159
+ when :DateTime
160
+ DateTime.parse(value)
161
+ when :Date
162
+ Date.parse(value)
163
+ when :String
164
+ value.to_s
165
+ when :Integer
166
+ value.to_i
167
+ when :Float
168
+ value.to_f
169
+ when :BOOLEAN
170
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
+ true
172
+ else
173
+ false
174
+ end
175
+ when :Object
176
+ # generic object (usually a Hash), return directly
177
+ value
178
+ when /\AArray<(?<inner_type>.+)>\z/
179
+ inner_type = Regexp.last_match[:inner_type]
180
+ value.map { |v| _deserialize(inner_type, v) }
181
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
182
+ k_type = Regexp.last_match[:k_type]
183
+ v_type = Regexp.last_match[:v_type]
184
+ {}.tap do |hash|
185
+ value.each do |k, v|
186
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
187
+ end
188
+ end
189
+ else # model
190
+ temp_model = Intrinio.const_get(type).new
191
+ temp_model.build_from_hash(value)
192
+ end
193
+ end
194
+
195
+ # Returns the string representation of the object
196
+ # @return [String] String presentation of the object
197
+ def to_s
198
+ to_hash.to_s
199
+ end
200
+
201
+ # to_body is an alias to to_hash (backward compatibility)
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_body
204
+ to_hash
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ next if value.nil?
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map{ |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+
239
+ end