intrinio-sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +176 -0
  4. data/Rakefile +8 -0
  5. data/docs/ApiResponseCompanies.md +9 -0
  6. data/docs/ApiResponseCompanyFilings.md +10 -0
  7. data/docs/ApiResponseCompanyFundamentals.md +10 -0
  8. data/docs/ApiResponseCompanyHistoricalData.md +10 -0
  9. data/docs/ApiResponseCompanyNews.md +10 -0
  10. data/docs/ApiResponseCompanySecurities.md +10 -0
  11. data/docs/ApiResponseDataTags.md +9 -0
  12. data/docs/ApiResponseEconomicIndexHistoricalData.md +10 -0
  13. data/docs/ApiResponseEconomicIndices.md +9 -0
  14. data/docs/ApiResponseFilings.md +9 -0
  15. data/docs/ApiResponseHistoricalData.md +9 -0
  16. data/docs/ApiResponseNews.md +9 -0
  17. data/docs/ApiResponseReportedFinancials.md +10 -0
  18. data/docs/ApiResponseSICIndexHistoricalData.md +10 -0
  19. data/docs/ApiResponseSICIndices.md +9 -0
  20. data/docs/ApiResponseSecurities.md +9 -0
  21. data/docs/ApiResponseSecurityHistoricalData.md +10 -0
  22. data/docs/ApiResponseSecurityStockPriceAdjustments.md +10 -0
  23. data/docs/ApiResponseSecurityStockPrices.md +10 -0
  24. data/docs/ApiResponseStandardizedFinancials.md +10 -0
  25. data/docs/ApiResponseStockExchangeSecurities.md +10 -0
  26. data/docs/ApiResponseStockExchangeStockPriceAdjustments.md +10 -0
  27. data/docs/ApiResponseStockExchangeStockPrices.md +10 -0
  28. data/docs/ApiResponseStockExchanges.md +9 -0
  29. data/docs/ApiResponseStockMarketIndexHistoricalData.md +10 -0
  30. data/docs/ApiResponseStockMarketIndices.md +9 -0
  31. data/docs/Company.md +39 -0
  32. data/docs/CompanyApi.md +659 -0
  33. data/docs/CompanyFiling.md +17 -0
  34. data/docs/CompanyNews.md +13 -0
  35. data/docs/CompanyNewsSummary.md +12 -0
  36. data/docs/CompanySummary.md +12 -0
  37. data/docs/DataPointApi.md +96 -0
  38. data/docs/DataTag.md +17 -0
  39. data/docs/DataTagApi.md +184 -0
  40. data/docs/DataTagSummary.md +11 -0
  41. data/docs/EconomicIndex.md +19 -0
  42. data/docs/EconomicIndexSummary.md +18 -0
  43. data/docs/Filing.md +17 -0
  44. data/docs/FilingApi.md +142 -0
  45. data/docs/FilingSummary.md +16 -0
  46. data/docs/Fundamental.md +16 -0
  47. data/docs/FundamentalSummary.md +15 -0
  48. data/docs/FundamentalsApi.md +181 -0
  49. data/docs/HistoricalData.md +9 -0
  50. data/docs/HistoricalDataApi.md +64 -0
  51. data/docs/IndexApi.md +800 -0
  52. data/docs/ReportedFinancial.md +9 -0
  53. data/docs/ReportedTag.md +14 -0
  54. data/docs/SICIndex.md +12 -0
  55. data/docs/Security.md +34 -0
  56. data/docs/SecurityApi.md +420 -0
  57. data/docs/SecurityScreenClause.md +10 -0
  58. data/docs/SecurityScreenGroup.md +10 -0
  59. data/docs/SecurityScreenResult.md +9 -0
  60. data/docs/SecurityScreenResultData.md +10 -0
  61. data/docs/SecuritySummary.md +17 -0
  62. data/docs/StandardizedFinancial.md +9 -0
  63. data/docs/StockExchange.md +17 -0
  64. data/docs/StockExchangeApi.md +267 -0
  65. data/docs/StockMarketIndex.md +17 -0
  66. data/docs/StockMarketIndexSummary.md +16 -0
  67. data/docs/StockPrice.md +21 -0
  68. data/docs/StockPriceAdjustment.md +12 -0
  69. data/docs/StockPriceAdjustmentSummary.md +13 -0
  70. data/docs/StockPriceSummary.md +20 -0
  71. data/git_push.sh +55 -0
  72. data/intrinio-sdk.gemspec +45 -0
  73. data/lib/intrinio-sdk.rb +105 -0
  74. data/lib/intrinio-sdk/api/company_api.rb +885 -0
  75. data/lib/intrinio-sdk/api/data_point_api.rb +141 -0
  76. data/lib/intrinio-sdk/api/data_tag_api.rb +251 -0
  77. data/lib/intrinio-sdk/api/filing_api.rb +192 -0
  78. data/lib/intrinio-sdk/api/fundamentals_api.rb +261 -0
  79. data/lib/intrinio-sdk/api/historical_data_api.rb +100 -0
  80. data/lib/intrinio-sdk/api/index_api.rb +1079 -0
  81. data/lib/intrinio-sdk/api/security_api.rb +568 -0
  82. data/lib/intrinio-sdk/api/stock_exchange_api.rb +353 -0
  83. data/lib/intrinio-sdk/api_client.rb +389 -0
  84. data/lib/intrinio-sdk/api_error.rb +38 -0
  85. data/lib/intrinio-sdk/configuration.rb +209 -0
  86. data/lib/intrinio-sdk/models/api_response_companies.rb +200 -0
  87. data/lib/intrinio-sdk/models/api_response_company_filings.rb +209 -0
  88. data/lib/intrinio-sdk/models/api_response_company_fundamentals.rb +209 -0
  89. data/lib/intrinio-sdk/models/api_response_company_historical_data.rb +209 -0
  90. data/lib/intrinio-sdk/models/api_response_company_news.rb +209 -0
  91. data/lib/intrinio-sdk/models/api_response_company_securities.rb +209 -0
  92. data/lib/intrinio-sdk/models/api_response_data_tags.rb +200 -0
  93. data/lib/intrinio-sdk/models/api_response_economic_index_historical_data.rb +209 -0
  94. data/lib/intrinio-sdk/models/api_response_economic_indices.rb +200 -0
  95. data/lib/intrinio-sdk/models/api_response_filings.rb +200 -0
  96. data/lib/intrinio-sdk/models/api_response_historical_data.rb +200 -0
  97. data/lib/intrinio-sdk/models/api_response_news.rb +200 -0
  98. data/lib/intrinio-sdk/models/api_response_reported_financials.rb +209 -0
  99. data/lib/intrinio-sdk/models/api_response_securities.rb +200 -0
  100. data/lib/intrinio-sdk/models/api_response_security_historical_data.rb +209 -0
  101. data/lib/intrinio-sdk/models/api_response_security_stock_price_adjustments.rb +211 -0
  102. data/lib/intrinio-sdk/models/api_response_security_stock_prices.rb +211 -0
  103. data/lib/intrinio-sdk/models/api_response_sic_index_historical_data.rb +209 -0
  104. data/lib/intrinio-sdk/models/api_response_sic_indices.rb +200 -0
  105. data/lib/intrinio-sdk/models/api_response_standardized_financials.rb +209 -0
  106. data/lib/intrinio-sdk/models/api_response_stock_exchange_securities.rb +211 -0
  107. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_price_adjustments.rb +211 -0
  108. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_prices.rb +211 -0
  109. data/lib/intrinio-sdk/models/api_response_stock_exchanges.rb +200 -0
  110. data/lib/intrinio-sdk/models/api_response_stock_market_index_historical_data.rb +209 -0
  111. data/lib/intrinio-sdk/models/api_response_stock_market_indices.rb +200 -0
  112. data/lib/intrinio-sdk/models/company.rb +498 -0
  113. data/lib/intrinio-sdk/models/company_filing.rb +278 -0
  114. data/lib/intrinio-sdk/models/company_news.rb +239 -0
  115. data/lib/intrinio-sdk/models/company_news_summary.rb +229 -0
  116. data/lib/intrinio-sdk/models/company_summary.rb +229 -0
  117. data/lib/intrinio-sdk/models/data_tag.rb +312 -0
  118. data/lib/intrinio-sdk/models/data_tag_summary.rb +219 -0
  119. data/lib/intrinio-sdk/models/economic_index.rb +299 -0
  120. data/lib/intrinio-sdk/models/economic_index_summary.rb +289 -0
  121. data/lib/intrinio-sdk/models/filing.rb +278 -0
  122. data/lib/intrinio-sdk/models/filing_summary.rb +269 -0
  123. data/lib/intrinio-sdk/models/fundamental.rb +302 -0
  124. data/lib/intrinio-sdk/models/fundamental_summary.rb +292 -0
  125. data/lib/intrinio-sdk/models/historical_data.rb +199 -0
  126. data/lib/intrinio-sdk/models/reported_financial.rb +198 -0
  127. data/lib/intrinio-sdk/models/reported_tag.rb +249 -0
  128. data/lib/intrinio-sdk/models/security.rb +453 -0
  129. data/lib/intrinio-sdk/models/security_screen_clause.rb +242 -0
  130. data/lib/intrinio-sdk/models/security_screen_group.rb +213 -0
  131. data/lib/intrinio-sdk/models/security_screen_result.rb +199 -0
  132. data/lib/intrinio-sdk/models/security_screen_result_data.rb +209 -0
  133. data/lib/intrinio-sdk/models/security_summary.rb +279 -0
  134. data/lib/intrinio-sdk/models/sic_index.rb +229 -0
  135. data/lib/intrinio-sdk/models/standardized_financial.rb +198 -0
  136. data/lib/intrinio-sdk/models/stock_exchange.rb +279 -0
  137. data/lib/intrinio-sdk/models/stock_market_index.rb +279 -0
  138. data/lib/intrinio-sdk/models/stock_market_index_summary.rb +269 -0
  139. data/lib/intrinio-sdk/models/stock_price.rb +352 -0
  140. data/lib/intrinio-sdk/models/stock_price_adjustment.rb +229 -0
  141. data/lib/intrinio-sdk/models/stock_price_adjustment_summary.rb +239 -0
  142. data/lib/intrinio-sdk/models/stock_price_summary.rb +342 -0
  143. data/lib/intrinio-sdk/version.rb +15 -0
  144. data/spec/api/company_api_spec.rb +233 -0
  145. data/spec/api/data_point_api_spec.rb +61 -0
  146. data/spec/api/data_tag_api_spec.rb +88 -0
  147. data/spec/api/filing_api_spec.rb +75 -0
  148. data/spec/api/fundamentals_api_spec.rb +86 -0
  149. data/spec/api/historical_data_api_spec.rb +53 -0
  150. data/spec/api/index_api_spec.rb +275 -0
  151. data/spec/api/security_api_spec.rb +161 -0
  152. data/spec/api/stock_exchange_api_spec.rb +113 -0
  153. data/spec/api_client_spec.rb +226 -0
  154. data/spec/configuration_spec.rb +42 -0
  155. data/spec/models/api_response_companies_spec.rb +48 -0
  156. data/spec/models/api_response_company_filings_spec.rb +54 -0
  157. data/spec/models/api_response_company_fundamentals_spec.rb +54 -0
  158. data/spec/models/api_response_company_historical_data_spec.rb +54 -0
  159. data/spec/models/api_response_company_news_spec.rb +54 -0
  160. data/spec/models/api_response_company_securities_spec.rb +54 -0
  161. data/spec/models/api_response_data_tags_spec.rb +48 -0
  162. data/spec/models/api_response_economic_index_historical_data_spec.rb +54 -0
  163. data/spec/models/api_response_economic_indices_spec.rb +48 -0
  164. data/spec/models/api_response_filings_spec.rb +48 -0
  165. data/spec/models/api_response_historical_data_spec.rb +48 -0
  166. data/spec/models/api_response_news_spec.rb +48 -0
  167. data/spec/models/api_response_reported_financials_spec.rb +54 -0
  168. data/spec/models/api_response_securities_spec.rb +48 -0
  169. data/spec/models/api_response_security_historical_data_spec.rb +54 -0
  170. data/spec/models/api_response_security_stock_price_adjustments_spec.rb +54 -0
  171. data/spec/models/api_response_security_stock_prices_spec.rb +54 -0
  172. data/spec/models/api_response_sic_index_historical_data_spec.rb +54 -0
  173. data/spec/models/api_response_sic_indices_spec.rb +48 -0
  174. data/spec/models/api_response_standardized_financials_spec.rb +54 -0
  175. data/spec/models/api_response_stock_exchange_securities_spec.rb +54 -0
  176. data/spec/models/api_response_stock_exchange_stock_price_adjustments_spec.rb +54 -0
  177. data/spec/models/api_response_stock_exchange_stock_prices_spec.rb +54 -0
  178. data/spec/models/api_response_stock_exchanges_spec.rb +48 -0
  179. data/spec/models/api_response_stock_market_index_historical_data_spec.rb +54 -0
  180. data/spec/models/api_response_stock_market_indices_spec.rb +48 -0
  181. data/spec/models/company_filing_spec.rb +96 -0
  182. data/spec/models/company_news_spec.rb +72 -0
  183. data/spec/models/company_news_summary_spec.rb +66 -0
  184. data/spec/models/company_spec.rb +228 -0
  185. data/spec/models/company_summary_spec.rb +66 -0
  186. data/spec/models/data_tag_spec.rb +100 -0
  187. data/spec/models/data_tag_summary_spec.rb +60 -0
  188. data/spec/models/economic_index_spec.rb +108 -0
  189. data/spec/models/economic_index_summary_spec.rb +102 -0
  190. data/spec/models/filing_spec.rb +96 -0
  191. data/spec/models/filing_summary_spec.rb +90 -0
  192. data/spec/models/fundamental_spec.rb +94 -0
  193. data/spec/models/fundamental_summary_spec.rb +88 -0
  194. data/spec/models/historical_data_spec.rb +48 -0
  195. data/spec/models/reported_financial_spec.rb +48 -0
  196. data/spec/models/reported_tag_spec.rb +78 -0
  197. data/spec/models/security_screen_clause_spec.rb +58 -0
  198. data/spec/models/security_screen_group_spec.rb +54 -0
  199. data/spec/models/security_screen_result_data_spec.rb +54 -0
  200. data/spec/models/security_screen_result_spec.rb +48 -0
  201. data/spec/models/security_spec.rb +198 -0
  202. data/spec/models/security_summary_spec.rb +96 -0
  203. data/spec/models/sic_index_spec.rb +66 -0
  204. data/spec/models/standardized_financial_spec.rb +48 -0
  205. data/spec/models/stock_exchange_spec.rb +96 -0
  206. data/spec/models/stock_market_index_spec.rb +96 -0
  207. data/spec/models/stock_market_index_summary_spec.rb +90 -0
  208. data/spec/models/stock_price_adjustment_spec.rb +66 -0
  209. data/spec/models/stock_price_adjustment_summary_spec.rb +72 -0
  210. data/spec/models/stock_price_spec.rb +124 -0
  211. data/spec/models/stock_price_summary_spec.rb +118 -0
  212. data/spec/spec_helper.rb +111 -0
  213. metadata +509 -0
@@ -0,0 +1,20 @@
1
+ # Intrinio::StockPriceSummary
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **date** | **Date** | The calendar date that the stock price represents. For non-daily stock prices, this represents the last day in the period (end of the week, month, quarter, year, etc) | [optional]
7
+ **intraperiod** | **BOOLEAN** | If true, the stock price represents an unfinished period (be it day, week, quarter, month, or year), meaning that the close price is the latest price available, not the official close price for the period | [optional]
8
+ **frequency** | **String** | The type of period that the stock price represents | [optional]
9
+ **open** | **Float** | The price at the beginning of the period | [optional]
10
+ **high** | **Float** | The highest price over the span of the period | [optional]
11
+ **low** | **Float** | The lowest price over the span of the period | [optional]
12
+ **close** | **Float** | The price at the end of the period | [optional]
13
+ **volume** | **Float** | The number of shares exchanged during the period | [optional]
14
+ **adj_open** | **Float** | The price at the beginning of the period, adjusted for splits and dividends | [optional]
15
+ **adj_high** | **Float** | The highest price over the span of the period, adjusted for splits and dividends | [optional]
16
+ **adj_low** | **Float** | The lowest price over the span of the period, adjusted for splits and dividends | [optional]
17
+ **adj_close** | **Float** | The price at the end of the period, adjusted for splits and dividends | [optional]
18
+ **adj_volume** | **Float** | The number of shares exchanged during the period, adjusted for splits and dividends | [optional]
19
+
20
+
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="intrinio"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="ruby-sdk"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="No release notes for this build"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ =begin
4
+ #Intrinio API
5
+
6
+ #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.
7
+
8
+ OpenAPI spec version: 2.0.0
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.3.0-SNAPSHOT
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "intrinio-sdk/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "intrinio-sdk"
20
+ s.version = Intrinio::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Intrinio"]
23
+ s.email = ["success@intrinio.com"]
24
+ s.homepage = "https://github.com/intrinio/ruby-sdk"
25
+ s.summary = "Access the Intrinio API"
26
+ s.description = "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."
27
+ s.license = "GPL-3.0"
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
+
41
+ s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
42
+ s.test_files = `find spec/*`.split("\n")
43
+ s.executables = []
44
+ s.require_paths = ["lib"]
45
+ end
@@ -0,0 +1,105 @@
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.0.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
+ # Common files
14
+ require 'intrinio-sdk/api_client'
15
+ require 'intrinio-sdk/api_error'
16
+ require 'intrinio-sdk/version'
17
+ require 'intrinio-sdk/configuration'
18
+
19
+ # Models
20
+ require 'intrinio-sdk/models/api_response_companies'
21
+ require 'intrinio-sdk/models/api_response_company_filings'
22
+ require 'intrinio-sdk/models/api_response_company_fundamentals'
23
+ require 'intrinio-sdk/models/api_response_company_historical_data'
24
+ require 'intrinio-sdk/models/api_response_company_news'
25
+ require 'intrinio-sdk/models/api_response_company_securities'
26
+ require 'intrinio-sdk/models/api_response_data_tags'
27
+ require 'intrinio-sdk/models/api_response_economic_index_historical_data'
28
+ require 'intrinio-sdk/models/api_response_economic_indices'
29
+ require 'intrinio-sdk/models/api_response_filings'
30
+ require 'intrinio-sdk/models/api_response_historical_data'
31
+ require 'intrinio-sdk/models/api_response_news'
32
+ require 'intrinio-sdk/models/api_response_reported_financials'
33
+ require 'intrinio-sdk/models/api_response_sic_index_historical_data'
34
+ require 'intrinio-sdk/models/api_response_sic_indices'
35
+ require 'intrinio-sdk/models/api_response_securities'
36
+ require 'intrinio-sdk/models/api_response_security_historical_data'
37
+ require 'intrinio-sdk/models/api_response_security_stock_price_adjustments'
38
+ require 'intrinio-sdk/models/api_response_security_stock_prices'
39
+ require 'intrinio-sdk/models/api_response_standardized_financials'
40
+ require 'intrinio-sdk/models/api_response_stock_exchange_securities'
41
+ require 'intrinio-sdk/models/api_response_stock_exchange_stock_price_adjustments'
42
+ require 'intrinio-sdk/models/api_response_stock_exchange_stock_prices'
43
+ require 'intrinio-sdk/models/api_response_stock_exchanges'
44
+ require 'intrinio-sdk/models/api_response_stock_market_index_historical_data'
45
+ require 'intrinio-sdk/models/api_response_stock_market_indices'
46
+ require 'intrinio-sdk/models/company'
47
+ require 'intrinio-sdk/models/company_filing'
48
+ require 'intrinio-sdk/models/company_news'
49
+ require 'intrinio-sdk/models/company_news_summary'
50
+ require 'intrinio-sdk/models/company_summary'
51
+ require 'intrinio-sdk/models/data_tag'
52
+ require 'intrinio-sdk/models/data_tag_summary'
53
+ require 'intrinio-sdk/models/economic_index'
54
+ require 'intrinio-sdk/models/economic_index_summary'
55
+ require 'intrinio-sdk/models/filing'
56
+ require 'intrinio-sdk/models/filing_summary'
57
+ require 'intrinio-sdk/models/fundamental'
58
+ require 'intrinio-sdk/models/fundamental_summary'
59
+ require 'intrinio-sdk/models/historical_data'
60
+ require 'intrinio-sdk/models/reported_financial'
61
+ require 'intrinio-sdk/models/reported_tag'
62
+ require 'intrinio-sdk/models/sic_index'
63
+ require 'intrinio-sdk/models/security'
64
+ require 'intrinio-sdk/models/security_screen_clause'
65
+ require 'intrinio-sdk/models/security_screen_group'
66
+ require 'intrinio-sdk/models/security_screen_result'
67
+ require 'intrinio-sdk/models/security_screen_result_data'
68
+ require 'intrinio-sdk/models/security_summary'
69
+ require 'intrinio-sdk/models/standardized_financial'
70
+ require 'intrinio-sdk/models/stock_exchange'
71
+ require 'intrinio-sdk/models/stock_market_index'
72
+ require 'intrinio-sdk/models/stock_market_index_summary'
73
+ require 'intrinio-sdk/models/stock_price'
74
+ require 'intrinio-sdk/models/stock_price_adjustment'
75
+ require 'intrinio-sdk/models/stock_price_adjustment_summary'
76
+ require 'intrinio-sdk/models/stock_price_summary'
77
+
78
+ # APIs
79
+ require 'intrinio-sdk/api/company_api'
80
+ require 'intrinio-sdk/api/data_point_api'
81
+ require 'intrinio-sdk/api/data_tag_api'
82
+ require 'intrinio-sdk/api/filing_api'
83
+ require 'intrinio-sdk/api/fundamentals_api'
84
+ require 'intrinio-sdk/api/historical_data_api'
85
+ require 'intrinio-sdk/api/index_api'
86
+ require 'intrinio-sdk/api/security_api'
87
+ require 'intrinio-sdk/api/stock_exchange_api'
88
+
89
+ module Intrinio
90
+ class << self
91
+ # Customize default settings for the SDK using block.
92
+ # Intrinio.configure do |config|
93
+ # config.username = "xxx"
94
+ # config.password = "xxx"
95
+ # end
96
+ # If no block given, return the default Configuration object.
97
+ def configure
98
+ if block_given?
99
+ yield(Configuration.default)
100
+ else
101
+ Configuration.default
102
+ end
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,885 @@
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.0.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 "uri"
14
+
15
+ module Intrinio
16
+ class CompanyApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Filter Companies
24
+ # Returns Companies matching the specified filters
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Date] :last_filing_date Last filing date
27
+ # @option opts [String] :sic Standard Industrial Classification code
28
+ # @option opts [String] :template Template
29
+ # @option opts [String] :sector Industry sector
30
+ # @option opts [String] :industry_category Industry category
31
+ # @option opts [String] :industry_group Industry group
32
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
33
+ # @return [ApiResponseCompanies]
34
+ def filter_companies(opts = {})
35
+ data, _status_code, _headers = filter_companies_with_http_info(opts)
36
+ return data
37
+ end
38
+
39
+ # Filter Companies
40
+ # Returns Companies matching the specified filters
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [Date] :last_filing_date Last filing date
43
+ # @option opts [String] :sic Standard Industrial Classification code
44
+ # @option opts [String] :template Template
45
+ # @option opts [String] :sector Industry sector
46
+ # @option opts [String] :industry_category Industry category
47
+ # @option opts [String] :industry_group Industry group
48
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
49
+ # @return [Array<(ApiResponseCompanies, Fixnum, Hash)>] ApiResponseCompanies data, response status code and response headers
50
+ def filter_companies_with_http_info(opts = {})
51
+ if @api_client.config.debugging
52
+ @api_client.config.logger.debug "Calling API: CompanyApi.filter_companies ..."
53
+ end
54
+ if @api_client.config.client_side_validation && opts[:'template'] && !['industrial', 'financial'].include?(opts[:'template'])
55
+ fail ArgumentError, 'invalid value for "template", must be one of industrial, financial'
56
+ end
57
+ # resource path
58
+ local_var_path = "/companies/filter"
59
+
60
+ # query parameters
61
+ query_params = {}
62
+ query_params[:'last_filing_date'] = opts[:'last_filing_date'] if !opts[:'last_filing_date'].nil?
63
+ query_params[:'sic'] = opts[:'sic'] if !opts[:'sic'].nil?
64
+ query_params[:'template'] = opts[:'template'] if !opts[:'template'].nil?
65
+ query_params[:'sector'] = opts[:'sector'] if !opts[:'sector'].nil?
66
+ query_params[:'industry_category'] = opts[:'industry_category'] if !opts[:'industry_category'].nil?
67
+ query_params[:'industry_group'] = opts[:'industry_group'] if !opts[:'industry_group'].nil?
68
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
69
+
70
+ # header parameters
71
+ header_params = {}
72
+ # HTTP header 'Accept' (if needed)
73
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
74
+
75
+ # form parameters
76
+ form_params = {}
77
+
78
+ # http body (model)
79
+ post_body = nil
80
+ auth_names = ['ApiKeyAuth']
81
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => 'ApiResponseCompanies')
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: CompanyApi#filter_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ return data, status_code, headers
92
+ end
93
+
94
+ # Filter Fundamentals for a Company
95
+ # Returns Fundamentals for the Company with the given `identifier` and matching the specified filters
96
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
97
+ # @param [Hash] opts the optional parameters
98
+ # @option opts [Date] :filed_after Filed on or after this date
99
+ # @option opts [Date] :filed_before Filed on or before this date
100
+ # @option opts [BOOLEAN] :reported_only Only as-reported fundamentals
101
+ # @option opts [Integer] :fiscal_year Only for the given fiscal year
102
+ # @option opts [String] :statement_code Only of the given statement code
103
+ # @option opts [String] :type Only of the given type
104
+ # @option opts [Date] :start_date Only on or after the given date
105
+ # @option opts [Date] :end_date Only on or before the given date
106
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
107
+ # @return [ApiResponseCompanyFundamentals]
108
+ def filter_company_fundamentals(identifier, opts = {})
109
+ data, _status_code, _headers = filter_company_fundamentals_with_http_info(identifier, opts)
110
+ return data
111
+ end
112
+
113
+ # Filter Fundamentals for a Company
114
+ # Returns Fundamentals for the Company with the given &#x60;identifier&#x60; and matching the specified filters
115
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
116
+ # @param [Hash] opts the optional parameters
117
+ # @option opts [Date] :filed_after Filed on or after this date
118
+ # @option opts [Date] :filed_before Filed on or before this date
119
+ # @option opts [BOOLEAN] :reported_only Only as-reported fundamentals
120
+ # @option opts [Integer] :fiscal_year Only for the given fiscal year
121
+ # @option opts [String] :statement_code Only of the given statement code
122
+ # @option opts [String] :type Only of the given type
123
+ # @option opts [Date] :start_date Only on or after the given date
124
+ # @option opts [Date] :end_date Only on or before the given date
125
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
126
+ # @return [Array<(ApiResponseCompanyFundamentals, Fixnum, Hash)>] ApiResponseCompanyFundamentals data, response status code and response headers
127
+ def filter_company_fundamentals_with_http_info(identifier, opts = {})
128
+ if @api_client.config.debugging
129
+ @api_client.config.logger.debug "Calling API: CompanyApi.filter_company_fundamentals ..."
130
+ end
131
+ # verify the required parameter 'identifier' is set
132
+ if @api_client.config.client_side_validation && identifier.nil?
133
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.filter_company_fundamentals"
134
+ end
135
+ if @api_client.config.client_side_validation && opts[:'statement_code'] && !['income_statement', 'balance_sheet_statement', 'cash_flow_statement', 'calculations'].include?(opts[:'statement_code'])
136
+ fail ArgumentError, 'invalid value for "statement_code", must be one of income_statement, balance_sheet_statement, cash_flow_statement, calculations'
137
+ end
138
+ if @api_client.config.client_side_validation && opts[:'type'] && !['QTR', 'YTD', 'FY', 'TTM'].include?(opts[:'type'])
139
+ fail ArgumentError, 'invalid value for "type", must be one of QTR, YTD, FY, TTM'
140
+ end
141
+ # resource path
142
+ local_var_path = "/companies/{identifier}/fundamentals/filter".sub('{' + 'identifier' + '}', identifier.to_s)
143
+
144
+ # query parameters
145
+ query_params = {}
146
+ query_params[:'filed_after'] = opts[:'filed_after'] if !opts[:'filed_after'].nil?
147
+ query_params[:'filed_before'] = opts[:'filed_before'] if !opts[:'filed_before'].nil?
148
+ query_params[:'reported_only'] = opts[:'reported_only'] if !opts[:'reported_only'].nil?
149
+ query_params[:'fiscal_year'] = opts[:'fiscal_year'] if !opts[:'fiscal_year'].nil?
150
+ query_params[:'statement_code'] = opts[:'statement_code'] if !opts[:'statement_code'].nil?
151
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
152
+ query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
153
+ query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
154
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
155
+
156
+ # header parameters
157
+ header_params = {}
158
+ # HTTP header 'Accept' (if needed)
159
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
160
+
161
+ # form parameters
162
+ form_params = {}
163
+
164
+ # http body (model)
165
+ post_body = nil
166
+ auth_names = ['ApiKeyAuth']
167
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
168
+ :header_params => header_params,
169
+ :query_params => query_params,
170
+ :form_params => form_params,
171
+ :body => post_body,
172
+ :auth_names => auth_names,
173
+ :return_type => 'ApiResponseCompanyFundamentals')
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug "API called: CompanyApi#filter_company_fundamentals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
+ end
177
+ return data, status_code, headers
178
+ end
179
+
180
+ # Get All Companies
181
+ #
182
+ # @param [Hash] opts the optional parameters
183
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
184
+ # @return [ApiResponseCompanies]
185
+ def get_all_companies(opts = {})
186
+ data, _status_code, _headers = get_all_companies_with_http_info(opts)
187
+ return data
188
+ end
189
+
190
+ # Get All Companies
191
+ #
192
+ # @param [Hash] opts the optional parameters
193
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
194
+ # @return [Array<(ApiResponseCompanies, Fixnum, Hash)>] ApiResponseCompanies data, response status code and response headers
195
+ def get_all_companies_with_http_info(opts = {})
196
+ if @api_client.config.debugging
197
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_all_companies ..."
198
+ end
199
+ # resource path
200
+ local_var_path = "/companies"
201
+
202
+ # query parameters
203
+ query_params = {}
204
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
205
+
206
+ # header parameters
207
+ header_params = {}
208
+ # HTTP header 'Accept' (if needed)
209
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
210
+
211
+ # form parameters
212
+ form_params = {}
213
+
214
+ # http body (model)
215
+ post_body = nil
216
+ auth_names = ['ApiKeyAuth']
217
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
218
+ :header_params => header_params,
219
+ :query_params => query_params,
220
+ :form_params => form_params,
221
+ :body => post_body,
222
+ :auth_names => auth_names,
223
+ :return_type => 'ApiResponseCompanies')
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "API called: CompanyApi#get_all_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
+ end
227
+ return data, status_code, headers
228
+ end
229
+
230
+ # Get All Company News
231
+ # Returns all news for all companies
232
+ # @param [Hash] opts the optional parameters
233
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
234
+ # @return [ApiResponseNews]
235
+ def get_all_company_news(opts = {})
236
+ data, _status_code, _headers = get_all_company_news_with_http_info(opts)
237
+ return data
238
+ end
239
+
240
+ # Get All Company News
241
+ # Returns all news for all companies
242
+ # @param [Hash] opts the optional parameters
243
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
244
+ # @return [Array<(ApiResponseNews, Fixnum, Hash)>] ApiResponseNews data, response status code and response headers
245
+ def get_all_company_news_with_http_info(opts = {})
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_all_company_news ..."
248
+ end
249
+ # resource path
250
+ local_var_path = "/companies/news"
251
+
252
+ # query parameters
253
+ query_params = {}
254
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
255
+
256
+ # header parameters
257
+ header_params = {}
258
+ # HTTP header 'Accept' (if needed)
259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
260
+
261
+ # form parameters
262
+ form_params = {}
263
+
264
+ # http body (model)
265
+ post_body = nil
266
+ auth_names = ['ApiKeyAuth']
267
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
268
+ :header_params => header_params,
269
+ :query_params => query_params,
270
+ :form_params => form_params,
271
+ :body => post_body,
272
+ :auth_names => auth_names,
273
+ :return_type => 'ApiResponseNews')
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug "API called: CompanyApi#get_all_company_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
276
+ end
277
+ return data, status_code, headers
278
+ end
279
+
280
+ # Get a Company by ID
281
+ #
282
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
283
+ # @param [Hash] opts the optional parameters
284
+ # @return [Company]
285
+ def get_company(identifier, opts = {})
286
+ data, _status_code, _headers = get_company_with_http_info(identifier, opts)
287
+ return data
288
+ end
289
+
290
+ # Get a Company by ID
291
+ #
292
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
293
+ # @param [Hash] opts the optional parameters
294
+ # @return [Array<(Company, Fixnum, Hash)>] Company data, response status code and response headers
295
+ def get_company_with_http_info(identifier, opts = {})
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_company ..."
298
+ end
299
+ # verify the required parameter 'identifier' is set
300
+ if @api_client.config.client_side_validation && identifier.nil?
301
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company"
302
+ end
303
+ # resource path
304
+ local_var_path = "/companies/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s)
305
+
306
+ # query parameters
307
+ query_params = {}
308
+
309
+ # header parameters
310
+ header_params = {}
311
+ # HTTP header 'Accept' (if needed)
312
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
313
+
314
+ # form parameters
315
+ form_params = {}
316
+
317
+ # http body (model)
318
+ post_body = nil
319
+ auth_names = ['ApiKeyAuth']
320
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
321
+ :header_params => header_params,
322
+ :query_params => query_params,
323
+ :form_params => form_params,
324
+ :body => post_body,
325
+ :auth_names => auth_names,
326
+ :return_type => 'Company')
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug "API called: CompanyApi#get_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
329
+ end
330
+ return data, status_code, headers
331
+ end
332
+
333
+ # Get Company Data Point (Number)
334
+ # Returns a numeric value for the given `tag` for the Company with the given `identifier`
335
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
336
+ # @param tag An Intrinio data tag
337
+ # @param [Hash] opts the optional parameters
338
+ # @return [Float]
339
+ def get_company_data_point_number(identifier, tag, opts = {})
340
+ data, _status_code, _headers = get_company_data_point_number_with_http_info(identifier, tag, opts)
341
+ return data
342
+ end
343
+
344
+ # Get Company Data Point (Number)
345
+ # Returns a numeric value for the given &#x60;tag&#x60; for the Company with the given &#x60;identifier&#x60;
346
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
347
+ # @param tag An Intrinio data tag
348
+ # @param [Hash] opts the optional parameters
349
+ # @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers
350
+ def get_company_data_point_number_with_http_info(identifier, tag, opts = {})
351
+ if @api_client.config.debugging
352
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_company_data_point_number ..."
353
+ end
354
+ # verify the required parameter 'identifier' is set
355
+ if @api_client.config.client_side_validation && identifier.nil?
356
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_data_point_number"
357
+ end
358
+ # verify the required parameter 'tag' is set
359
+ if @api_client.config.client_side_validation && tag.nil?
360
+ fail ArgumentError, "Missing the required parameter 'tag' when calling CompanyApi.get_company_data_point_number"
361
+ end
362
+ # resource path
363
+ local_var_path = "/companies/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)
364
+
365
+ # query parameters
366
+ query_params = {}
367
+
368
+ # header parameters
369
+ header_params = {}
370
+ # HTTP header 'Accept' (if needed)
371
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])
372
+
373
+ # form parameters
374
+ form_params = {}
375
+
376
+ # http body (model)
377
+ post_body = nil
378
+ auth_names = ['ApiKeyAuth']
379
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
380
+ :header_params => header_params,
381
+ :query_params => query_params,
382
+ :form_params => form_params,
383
+ :body => post_body,
384
+ :auth_names => auth_names,
385
+ :return_type => 'Float')
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug "API called: CompanyApi#get_company_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
388
+ end
389
+ return data, status_code, headers
390
+ end
391
+
392
+ # Get Company Data Point (Text)
393
+ # Returns a text value for the given `tag` for the Company with the given `identifier`
394
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
395
+ # @param tag An Intrinio data tag
396
+ # @param [Hash] opts the optional parameters
397
+ # @return [String]
398
+ def get_company_data_point_text(identifier, tag, opts = {})
399
+ data, _status_code, _headers = get_company_data_point_text_with_http_info(identifier, tag, opts)
400
+ return data
401
+ end
402
+
403
+ # Get Company Data Point (Text)
404
+ # Returns a text value for the given &#x60;tag&#x60; for the Company with the given &#x60;identifier&#x60;
405
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
406
+ # @param tag An Intrinio data tag
407
+ # @param [Hash] opts the optional parameters
408
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
409
+ def get_company_data_point_text_with_http_info(identifier, tag, opts = {})
410
+ if @api_client.config.debugging
411
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_company_data_point_text ..."
412
+ end
413
+ # verify the required parameter 'identifier' is set
414
+ if @api_client.config.client_side_validation && identifier.nil?
415
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_data_point_text"
416
+ end
417
+ # verify the required parameter 'tag' is set
418
+ if @api_client.config.client_side_validation && tag.nil?
419
+ fail ArgumentError, "Missing the required parameter 'tag' when calling CompanyApi.get_company_data_point_text"
420
+ end
421
+ # resource path
422
+ local_var_path = "/companies/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)
423
+
424
+ # query parameters
425
+ query_params = {}
426
+
427
+ # header parameters
428
+ header_params = {}
429
+ # HTTP header 'Accept' (if needed)
430
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])
431
+
432
+ # form parameters
433
+ form_params = {}
434
+
435
+ # http body (model)
436
+ post_body = nil
437
+ auth_names = ['ApiKeyAuth']
438
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
439
+ :header_params => header_params,
440
+ :query_params => query_params,
441
+ :form_params => form_params,
442
+ :body => post_body,
443
+ :auth_names => auth_names,
444
+ :return_type => 'String')
445
+ if @api_client.config.debugging
446
+ @api_client.config.logger.debug "API called: CompanyApi#get_company_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
447
+ end
448
+ return data, status_code, headers
449
+ end
450
+
451
+ # Get Filings for a Company
452
+ # Returns a complete list of SEC filings for the Company with the given `identifier`
453
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
454
+ # @param [Hash] opts the optional parameters
455
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
456
+ # @return [ApiResponseCompanyFilings]
457
+ def get_company_filings(identifier, opts = {})
458
+ data, _status_code, _headers = get_company_filings_with_http_info(identifier, opts)
459
+ return data
460
+ end
461
+
462
+ # Get Filings for a Company
463
+ # Returns a complete list of SEC filings for the Company with the given &#x60;identifier&#x60;
464
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
465
+ # @param [Hash] opts the optional parameters
466
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
467
+ # @return [Array<(ApiResponseCompanyFilings, Fixnum, Hash)>] ApiResponseCompanyFilings data, response status code and response headers
468
+ def get_company_filings_with_http_info(identifier, opts = {})
469
+ if @api_client.config.debugging
470
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_company_filings ..."
471
+ end
472
+ # verify the required parameter 'identifier' is set
473
+ if @api_client.config.client_side_validation && identifier.nil?
474
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_filings"
475
+ end
476
+ # resource path
477
+ local_var_path = "/companies/{identifier}/filings".sub('{' + 'identifier' + '}', identifier.to_s)
478
+
479
+ # query parameters
480
+ query_params = {}
481
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
482
+
483
+ # header parameters
484
+ header_params = {}
485
+ # HTTP header 'Accept' (if needed)
486
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
487
+
488
+ # form parameters
489
+ form_params = {}
490
+
491
+ # http body (model)
492
+ post_body = nil
493
+ auth_names = ['ApiKeyAuth']
494
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
495
+ :header_params => header_params,
496
+ :query_params => query_params,
497
+ :form_params => form_params,
498
+ :body => post_body,
499
+ :auth_names => auth_names,
500
+ :return_type => 'ApiResponseCompanyFilings')
501
+ if @api_client.config.debugging
502
+ @api_client.config.logger.debug "API called: CompanyApi#get_company_filings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
503
+ end
504
+ return data, status_code, headers
505
+ end
506
+
507
+ # Get All Fundamentals for a Company
508
+ # Returns all Fundamentals for the Company with the given `identifier`
509
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
510
+ # @param [Hash] opts the optional parameters
511
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
512
+ # @return [ApiResponseCompanyFundamentals]
513
+ def get_company_fundamentals(identifier, opts = {})
514
+ data, _status_code, _headers = get_company_fundamentals_with_http_info(identifier, opts)
515
+ return data
516
+ end
517
+
518
+ # Get All Fundamentals for a Company
519
+ # Returns all Fundamentals for the Company with the given &#x60;identifier&#x60;
520
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
521
+ # @param [Hash] opts the optional parameters
522
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
523
+ # @return [Array<(ApiResponseCompanyFundamentals, Fixnum, Hash)>] ApiResponseCompanyFundamentals data, response status code and response headers
524
+ def get_company_fundamentals_with_http_info(identifier, opts = {})
525
+ if @api_client.config.debugging
526
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_company_fundamentals ..."
527
+ end
528
+ # verify the required parameter 'identifier' is set
529
+ if @api_client.config.client_side_validation && identifier.nil?
530
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_fundamentals"
531
+ end
532
+ # resource path
533
+ local_var_path = "/companies/{identifier}/fundamentals".sub('{' + 'identifier' + '}', identifier.to_s)
534
+
535
+ # query parameters
536
+ query_params = {}
537
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
538
+
539
+ # header parameters
540
+ header_params = {}
541
+ # HTTP header 'Accept' (if needed)
542
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
543
+
544
+ # form parameters
545
+ form_params = {}
546
+
547
+ # http body (model)
548
+ post_body = nil
549
+ auth_names = ['ApiKeyAuth']
550
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
551
+ :header_params => header_params,
552
+ :query_params => query_params,
553
+ :form_params => form_params,
554
+ :body => post_body,
555
+ :auth_names => auth_names,
556
+ :return_type => 'ApiResponseCompanyFundamentals')
557
+ if @api_client.config.debugging
558
+ @api_client.config.logger.debug "API called: CompanyApi#get_company_fundamentals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
559
+ end
560
+ return data, status_code, headers
561
+ end
562
+
563
+ # Get Company Historical Data
564
+ # Returns historical values for the given `tag` and the Company with the given `identifier`
565
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
566
+ # @param tag Item
567
+ # @param [Hash] opts the optional parameters
568
+ # @option opts [String] :type Filter by type, when applicable
569
+ # @option opts [Date] :start_date Get historical data on or after this date
570
+ # @option opts [Date] :end_date Get historical data on or before this date
571
+ # @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; (default to desc)
572
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
573
+ # @return [ApiResponseCompanyHistoricalData]
574
+ def get_company_historical_data(identifier, tag, opts = {})
575
+ data, _status_code, _headers = get_company_historical_data_with_http_info(identifier, tag, opts)
576
+ return data
577
+ end
578
+
579
+ # Get Company Historical Data
580
+ # Returns historical values for the given &#x60;tag&#x60; and the Company with the given &#x60;identifier&#x60;
581
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
582
+ # @param tag Item
583
+ # @param [Hash] opts the optional parameters
584
+ # @option opts [String] :type Filter by type, when applicable
585
+ # @option opts [Date] :start_date Get historical data on or after this date
586
+ # @option opts [Date] :end_date Get historical data on or before this date
587
+ # @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60;
588
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
589
+ # @return [Array<(ApiResponseCompanyHistoricalData, Fixnum, Hash)>] ApiResponseCompanyHistoricalData data, response status code and response headers
590
+ def get_company_historical_data_with_http_info(identifier, tag, opts = {})
591
+ if @api_client.config.debugging
592
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_company_historical_data ..."
593
+ end
594
+ # verify the required parameter 'identifier' is set
595
+ if @api_client.config.client_side_validation && identifier.nil?
596
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_historical_data"
597
+ end
598
+ # verify the required parameter 'tag' is set
599
+ if @api_client.config.client_side_validation && tag.nil?
600
+ fail ArgumentError, "Missing the required parameter 'tag' when calling CompanyApi.get_company_historical_data"
601
+ end
602
+ if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
603
+ fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
604
+ end
605
+ # resource path
606
+ local_var_path = "/companies/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)
607
+
608
+ # query parameters
609
+ query_params = {}
610
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
611
+ query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
612
+ query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
613
+ query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
614
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
615
+
616
+ # header parameters
617
+ header_params = {}
618
+ # HTTP header 'Accept' (if needed)
619
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
620
+
621
+ # form parameters
622
+ form_params = {}
623
+
624
+ # http body (model)
625
+ post_body = nil
626
+ auth_names = ['ApiKeyAuth']
627
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
628
+ :header_params => header_params,
629
+ :query_params => query_params,
630
+ :form_params => form_params,
631
+ :body => post_body,
632
+ :auth_names => auth_names,
633
+ :return_type => 'ApiResponseCompanyHistoricalData')
634
+ if @api_client.config.debugging
635
+ @api_client.config.logger.debug "API called: CompanyApi#get_company_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
636
+ end
637
+ return data, status_code, headers
638
+ end
639
+
640
+ # Get News for a Company
641
+ # Returns news for the Company with the given `identifier`
642
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
643
+ # @param [Hash] opts the optional parameters
644
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
645
+ # @return [ApiResponseCompanyNews]
646
+ def get_company_news(identifier, opts = {})
647
+ data, _status_code, _headers = get_company_news_with_http_info(identifier, opts)
648
+ return data
649
+ end
650
+
651
+ # Get News for a Company
652
+ # Returns news for the Company with the given &#x60;identifier&#x60;
653
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
654
+ # @param [Hash] opts the optional parameters
655
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
656
+ # @return [Array<(ApiResponseCompanyNews, Fixnum, Hash)>] ApiResponseCompanyNews data, response status code and response headers
657
+ def get_company_news_with_http_info(identifier, opts = {})
658
+ if @api_client.config.debugging
659
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_company_news ..."
660
+ end
661
+ # verify the required parameter 'identifier' is set
662
+ if @api_client.config.client_side_validation && identifier.nil?
663
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_news"
664
+ end
665
+ # resource path
666
+ local_var_path = "/companies/{identifier}/news".sub('{' + 'identifier' + '}', identifier.to_s)
667
+
668
+ # query parameters
669
+ query_params = {}
670
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
671
+
672
+ # header parameters
673
+ header_params = {}
674
+ # HTTP header 'Accept' (if needed)
675
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
676
+
677
+ # form parameters
678
+ form_params = {}
679
+
680
+ # http body (model)
681
+ post_body = nil
682
+ auth_names = ['ApiKeyAuth']
683
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
684
+ :header_params => header_params,
685
+ :query_params => query_params,
686
+ :form_params => form_params,
687
+ :body => post_body,
688
+ :auth_names => auth_names,
689
+ :return_type => 'ApiResponseCompanyNews')
690
+ if @api_client.config.debugging
691
+ @api_client.config.logger.debug "API called: CompanyApi#get_company_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
692
+ end
693
+ return data, status_code, headers
694
+ end
695
+
696
+ # Get Securities by Company
697
+ # Return Securities for the Company with `identifier`
698
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
699
+ # @param [Hash] opts the optional parameters
700
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
701
+ # @return [ApiResponseCompanySecurities]
702
+ def get_company_securities(identifier, opts = {})
703
+ data, _status_code, _headers = get_company_securities_with_http_info(identifier, opts)
704
+ return data
705
+ end
706
+
707
+ # Get Securities by Company
708
+ # Return Securities for the Company with &#x60;identifier&#x60;
709
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
710
+ # @param [Hash] opts the optional parameters
711
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
712
+ # @return [Array<(ApiResponseCompanySecurities, Fixnum, Hash)>] ApiResponseCompanySecurities data, response status code and response headers
713
+ def get_company_securities_with_http_info(identifier, opts = {})
714
+ if @api_client.config.debugging
715
+ @api_client.config.logger.debug "Calling API: CompanyApi.get_company_securities ..."
716
+ end
717
+ # verify the required parameter 'identifier' is set
718
+ if @api_client.config.client_side_validation && identifier.nil?
719
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_securities"
720
+ end
721
+ # resource path
722
+ local_var_path = "/companies/{identifier}/securities".sub('{' + 'identifier' + '}', identifier.to_s)
723
+
724
+ # query parameters
725
+ query_params = {}
726
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
727
+
728
+ # header parameters
729
+ header_params = {}
730
+ # HTTP header 'Accept' (if needed)
731
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
732
+
733
+ # form parameters
734
+ form_params = {}
735
+
736
+ # http body (model)
737
+ post_body = nil
738
+ auth_names = ['ApiKeyAuth']
739
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
740
+ :header_params => header_params,
741
+ :query_params => query_params,
742
+ :form_params => form_params,
743
+ :body => post_body,
744
+ :auth_names => auth_names,
745
+ :return_type => 'ApiResponseCompanySecurities')
746
+ if @api_client.config.debugging
747
+ @api_client.config.logger.debug "API called: CompanyApi#get_company_securities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
748
+ end
749
+ return data, status_code, headers
750
+ end
751
+
752
+ # Lookup a Fundamental for a Company
753
+ # Returns the Fundamental for the Company with the given `identifier` and with the given parameters
754
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
755
+ # @param statement_code The statement code
756
+ # @param fiscal_period The fiscal period
757
+ # @param fiscal_year The fiscal year
758
+ # @param [Hash] opts the optional parameters
759
+ # @return [Fundamental]
760
+ def lookup_company_fundamental(identifier, statement_code, fiscal_period, fiscal_year, opts = {})
761
+ data, _status_code, _headers = lookup_company_fundamental_with_http_info(identifier, statement_code, fiscal_period, fiscal_year, opts)
762
+ return data
763
+ end
764
+
765
+ # Lookup a Fundamental for a Company
766
+ # Returns the Fundamental for the Company with the given &#x60;identifier&#x60; and with the given parameters
767
+ # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID)
768
+ # @param statement_code The statement code
769
+ # @param fiscal_period The fiscal period
770
+ # @param fiscal_year The fiscal year
771
+ # @param [Hash] opts the optional parameters
772
+ # @return [Array<(Fundamental, Fixnum, Hash)>] Fundamental data, response status code and response headers
773
+ def lookup_company_fundamental_with_http_info(identifier, statement_code, fiscal_period, fiscal_year, opts = {})
774
+ if @api_client.config.debugging
775
+ @api_client.config.logger.debug "Calling API: CompanyApi.lookup_company_fundamental ..."
776
+ end
777
+ # verify the required parameter 'identifier' is set
778
+ if @api_client.config.client_side_validation && identifier.nil?
779
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.lookup_company_fundamental"
780
+ end
781
+ # verify the required parameter 'statement_code' is set
782
+ if @api_client.config.client_side_validation && statement_code.nil?
783
+ fail ArgumentError, "Missing the required parameter 'statement_code' when calling CompanyApi.lookup_company_fundamental"
784
+ end
785
+ # verify enum value
786
+ if @api_client.config.client_side_validation && !['income_statement', 'balance_sheet_statement', 'cash_flow_statement', 'calculations'].include?(statement_code)
787
+ fail ArgumentError, "invalid value for 'statement_code', must be one of income_statement, balance_sheet_statement, cash_flow_statement, calculations"
788
+ end
789
+ # verify the required parameter 'fiscal_period' is set
790
+ if @api_client.config.client_side_validation && fiscal_period.nil?
791
+ fail ArgumentError, "Missing the required parameter 'fiscal_period' when calling CompanyApi.lookup_company_fundamental"
792
+ end
793
+ # verify enum value
794
+ if @api_client.config.client_side_validation && !['Q1TTM', 'Q2TTM', 'Q3TTM', 'FY', 'Q1', 'Q2', 'Q3', 'Q4', 'Q2YTD', 'Q3YTD'].include?(fiscal_period)
795
+ fail ArgumentError, "invalid value for 'fiscal_period', must be one of Q1TTM, Q2TTM, Q3TTM, FY, Q1, Q2, Q3, Q4, Q2YTD, Q3YTD"
796
+ end
797
+ # verify the required parameter 'fiscal_year' is set
798
+ if @api_client.config.client_side_validation && fiscal_year.nil?
799
+ fail ArgumentError, "Missing the required parameter 'fiscal_year' when calling CompanyApi.lookup_company_fundamental"
800
+ end
801
+ # resource path
802
+ local_var_path = "/companies/{identifier}/fundamentals/lookup/{statement_code}/{fiscal_year}/{fiscal_period}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'statement_code' + '}', statement_code.to_s).sub('{' + 'fiscal_period' + '}', fiscal_period.to_s).sub('{' + 'fiscal_year' + '}', fiscal_year.to_s)
803
+
804
+ # query parameters
805
+ query_params = {}
806
+
807
+ # header parameters
808
+ header_params = {}
809
+ # HTTP header 'Accept' (if needed)
810
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
811
+
812
+ # form parameters
813
+ form_params = {}
814
+
815
+ # http body (model)
816
+ post_body = nil
817
+ auth_names = ['ApiKeyAuth']
818
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
819
+ :header_params => header_params,
820
+ :query_params => query_params,
821
+ :form_params => form_params,
822
+ :body => post_body,
823
+ :auth_names => auth_names,
824
+ :return_type => 'Fundamental')
825
+ if @api_client.config.debugging
826
+ @api_client.config.logger.debug "API called: CompanyApi#lookup_company_fundamental\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
827
+ end
828
+ return data, status_code, headers
829
+ end
830
+
831
+ # Search Companies
832
+ # Searches for Companies matching the text `query`
833
+ # @param query Search parameters
834
+ # @param [Hash] opts the optional parameters
835
+ # @return [ApiResponseCompanies]
836
+ def search_companies(query, opts = {})
837
+ data, _status_code, _headers = search_companies_with_http_info(query, opts)
838
+ return data
839
+ end
840
+
841
+ # Search Companies
842
+ # Searches for Companies matching the text &#x60;query&#x60;
843
+ # @param query Search parameters
844
+ # @param [Hash] opts the optional parameters
845
+ # @return [Array<(ApiResponseCompanies, Fixnum, Hash)>] ApiResponseCompanies data, response status code and response headers
846
+ def search_companies_with_http_info(query, opts = {})
847
+ if @api_client.config.debugging
848
+ @api_client.config.logger.debug "Calling API: CompanyApi.search_companies ..."
849
+ end
850
+ # verify the required parameter 'query' is set
851
+ if @api_client.config.client_side_validation && query.nil?
852
+ fail ArgumentError, "Missing the required parameter 'query' when calling CompanyApi.search_companies"
853
+ end
854
+ # resource path
855
+ local_var_path = "/companies/search"
856
+
857
+ # query parameters
858
+ query_params = {}
859
+ query_params[:'query'] = query
860
+
861
+ # header parameters
862
+ header_params = {}
863
+ # HTTP header 'Accept' (if needed)
864
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
865
+
866
+ # form parameters
867
+ form_params = {}
868
+
869
+ # http body (model)
870
+ post_body = nil
871
+ auth_names = ['ApiKeyAuth']
872
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
873
+ :header_params => header_params,
874
+ :query_params => query_params,
875
+ :form_params => form_params,
876
+ :body => post_body,
877
+ :auth_names => auth_names,
878
+ :return_type => 'ApiResponseCompanies')
879
+ if @api_client.config.debugging
880
+ @api_client.config.logger.debug "API called: CompanyApi#search_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
881
+ end
882
+ return data, status_code, headers
883
+ end
884
+ end
885
+ end