intrinio-sdk 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -8
  3. data/docs/ApiResponseCompaniesSearch.md +8 -0
  4. data/docs/ApiResponseDataTagsSearch.md +8 -0
  5. data/docs/ApiResponseEconomicIndicesSearch.md +8 -0
  6. data/docs/ApiResponseMunicipalities.md +9 -0
  7. data/docs/ApiResponseMunicipalitiyFinancials.md +9 -0
  8. data/docs/ApiResponseSICIndicesSearch.md +8 -0
  9. data/docs/ApiResponseSecuritiesSearch.md +8 -0
  10. data/docs/ApiResponseSecurityIntradayPrices.md +11 -0
  11. data/docs/ApiResponseStockMarketIndicesSearch.md +8 -0
  12. data/docs/CompanyApi.md +44 -115
  13. data/docs/DataTagApi.md +15 -51
  14. data/docs/FilingApi.md +19 -97
  15. data/docs/FundamentalSummary.md +1 -1
  16. data/docs/HistoricalDataApi.md +2 -0
  17. data/docs/IndexApi.md +33 -9
  18. data/docs/IntradayStockPrice.md +15 -0
  19. data/docs/Municipality.md +26 -0
  20. data/docs/MunicipalityApi.md +158 -0
  21. data/docs/MunicipalityFinancial.md +49 -0
  22. data/docs/RealtimeStockPrice.md +1 -1
  23. data/docs/SecurityApi.md +71 -4
  24. data/docs/StockExchangeApi.md +17 -42
  25. data/intrinio-sdk.gemspec +1 -1
  26. data/lib/intrinio-sdk.rb +14 -1
  27. data/lib/intrinio-sdk/api/company_api.rb +97 -154
  28. data/lib/intrinio-sdk/api/data_point_api.rb +1 -1
  29. data/lib/intrinio-sdk/api/data_tag_api.rb +27 -63
  30. data/lib/intrinio-sdk/api/filing_api.rb +42 -121
  31. data/lib/intrinio-sdk/api/fundamentals_api.rb +1 -1
  32. data/lib/intrinio-sdk/api/historical_data_api.rb +8 -1
  33. data/lib/intrinio-sdk/api/index_api.rb +73 -10
  34. data/lib/intrinio-sdk/api/municipality_api.rb +221 -0
  35. data/lib/intrinio-sdk/api/security_api.rb +117 -4
  36. data/lib/intrinio-sdk/api/stock_exchange_api.rb +45 -57
  37. data/lib/intrinio-sdk/api_client.rb +1 -1
  38. data/lib/intrinio-sdk/api_error.rb +1 -1
  39. data/lib/intrinio-sdk/configuration.rb +1 -1
  40. data/lib/intrinio-sdk/models/api_response_companies.rb +1 -1
  41. data/lib/intrinio-sdk/models/api_response_companies_search.rb +190 -0
  42. data/lib/intrinio-sdk/models/api_response_company_filings.rb +1 -1
  43. data/lib/intrinio-sdk/models/api_response_company_fundamentals.rb +1 -1
  44. data/lib/intrinio-sdk/models/api_response_company_historical_data.rb +1 -1
  45. data/lib/intrinio-sdk/models/api_response_company_news.rb +1 -1
  46. data/lib/intrinio-sdk/models/api_response_company_securities.rb +1 -1
  47. data/lib/intrinio-sdk/models/api_response_data_tags.rb +1 -1
  48. data/lib/intrinio-sdk/models/api_response_data_tags_search.rb +190 -0
  49. data/lib/intrinio-sdk/models/api_response_economic_index_historical_data.rb +1 -1
  50. data/lib/intrinio-sdk/models/api_response_economic_indices.rb +1 -1
  51. data/lib/intrinio-sdk/models/api_response_economic_indices_search.rb +190 -0
  52. data/lib/intrinio-sdk/models/api_response_filing_notes.rb +1 -1
  53. data/lib/intrinio-sdk/models/api_response_filing_notes_search.rb +1 -1
  54. data/lib/intrinio-sdk/models/api_response_filings.rb +1 -1
  55. data/lib/intrinio-sdk/models/api_response_historical_data.rb +1 -1
  56. data/lib/intrinio-sdk/models/api_response_municipalities.rb +200 -0
  57. data/lib/intrinio-sdk/models/api_response_municipalitiy_financials.rb +199 -0
  58. data/lib/intrinio-sdk/models/api_response_news.rb +1 -1
  59. data/lib/intrinio-sdk/models/api_response_reported_financials.rb +1 -1
  60. data/lib/intrinio-sdk/models/api_response_securities.rb +1 -1
  61. data/lib/intrinio-sdk/models/api_response_securities_search.rb +190 -0
  62. data/lib/intrinio-sdk/models/api_response_security_historical_data.rb +1 -1
  63. data/lib/intrinio-sdk/models/api_response_security_intraday_prices.rb +254 -0
  64. data/lib/intrinio-sdk/models/api_response_security_stock_price_adjustments.rb +1 -1
  65. data/lib/intrinio-sdk/models/api_response_security_stock_prices.rb +1 -1
  66. data/lib/intrinio-sdk/models/api_response_sic_index_historical_data.rb +1 -1
  67. data/lib/intrinio-sdk/models/api_response_sic_indices.rb +1 -1
  68. data/lib/intrinio-sdk/models/api_response_sic_indices_search.rb +190 -0
  69. data/lib/intrinio-sdk/models/api_response_standardized_financials.rb +1 -1
  70. data/lib/intrinio-sdk/models/api_response_stock_exchange_realtime_stock_prices.rb +1 -1
  71. data/lib/intrinio-sdk/models/api_response_stock_exchange_securities.rb +1 -1
  72. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_price_adjustments.rb +1 -1
  73. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_prices.rb +1 -1
  74. data/lib/intrinio-sdk/models/api_response_stock_exchanges.rb +1 -1
  75. data/lib/intrinio-sdk/models/api_response_stock_market_index_historical_data.rb +1 -1
  76. data/lib/intrinio-sdk/models/api_response_stock_market_indices.rb +1 -1
  77. data/lib/intrinio-sdk/models/api_response_stock_market_indices_search.rb +190 -0
  78. data/lib/intrinio-sdk/models/company.rb +1 -1
  79. data/lib/intrinio-sdk/models/company_filing.rb +1 -1
  80. data/lib/intrinio-sdk/models/company_news.rb +1 -1
  81. data/lib/intrinio-sdk/models/company_news_summary.rb +1 -1
  82. data/lib/intrinio-sdk/models/company_summary.rb +1 -1
  83. data/lib/intrinio-sdk/models/data_tag.rb +1 -1
  84. data/lib/intrinio-sdk/models/data_tag_summary.rb +1 -1
  85. data/lib/intrinio-sdk/models/dividend_record.rb +1 -1
  86. data/lib/intrinio-sdk/models/earnings_record.rb +1 -1
  87. data/lib/intrinio-sdk/models/economic_index.rb +1 -1
  88. data/lib/intrinio-sdk/models/economic_index_summary.rb +1 -1
  89. data/lib/intrinio-sdk/models/filing.rb +1 -1
  90. data/lib/intrinio-sdk/models/filing_note.rb +1 -1
  91. data/lib/intrinio-sdk/models/filing_note_filing.rb +1 -1
  92. data/lib/intrinio-sdk/models/filing_note_summary.rb +1 -1
  93. data/lib/intrinio-sdk/models/filing_summary.rb +1 -1
  94. data/lib/intrinio-sdk/models/fundamental.rb +1 -1
  95. data/lib/intrinio-sdk/models/fundamental_summary.rb +2 -2
  96. data/lib/intrinio-sdk/models/historical_data.rb +1 -1
  97. data/lib/intrinio-sdk/models/intraday_stock_price.rb +259 -0
  98. data/lib/intrinio-sdk/models/municipality.rb +369 -0
  99. data/lib/intrinio-sdk/models/municipality_financial.rb +599 -0
  100. data/lib/intrinio-sdk/models/realtime_stock_price.rb +2 -2
  101. data/lib/intrinio-sdk/models/realtime_stock_price_security.rb +1 -1
  102. data/lib/intrinio-sdk/models/reported_financial.rb +1 -1
  103. data/lib/intrinio-sdk/models/reported_tag.rb +1 -1
  104. data/lib/intrinio-sdk/models/security.rb +1 -1
  105. data/lib/intrinio-sdk/models/security_screen_clause.rb +1 -1
  106. data/lib/intrinio-sdk/models/security_screen_group.rb +1 -1
  107. data/lib/intrinio-sdk/models/security_screen_result.rb +1 -1
  108. data/lib/intrinio-sdk/models/security_screen_result_data.rb +1 -1
  109. data/lib/intrinio-sdk/models/security_summary.rb +1 -1
  110. data/lib/intrinio-sdk/models/sic_index.rb +1 -1
  111. data/lib/intrinio-sdk/models/standardized_financial.rb +1 -1
  112. data/lib/intrinio-sdk/models/stock_exchange.rb +1 -1
  113. data/lib/intrinio-sdk/models/stock_market_index.rb +1 -1
  114. data/lib/intrinio-sdk/models/stock_market_index_summary.rb +1 -1
  115. data/lib/intrinio-sdk/models/stock_price.rb +1 -1
  116. data/lib/intrinio-sdk/models/stock_price_adjustment.rb +1 -1
  117. data/lib/intrinio-sdk/models/stock_price_adjustment_summary.rb +1 -1
  118. data/lib/intrinio-sdk/models/stock_price_summary.rb +1 -1
  119. data/lib/intrinio-sdk/version.rb +2 -2
  120. data/spec/api/company_api_spec.rb +37 -54
  121. data/spec/api/data_point_api_spec.rb +3 -3
  122. data/spec/api/data_tag_api_spec.rb +9 -19
  123. data/spec/api/filing_api_spec.rb +73 -12
  124. data/spec/api/fundamentals_api_spec.rb +6 -6
  125. data/spec/api/historical_data_api_spec.rb +3 -2
  126. data/spec/api/index_api_spec.rb +28 -19
  127. data/spec/api/municipality_api_spec.rb +84 -0
  128. data/spec/api/security_api_spec.rb +74 -13
  129. data/spec/api/stock_exchange_api_spec.rb +31 -23
  130. data/spec/api_client_spec.rb +1 -1
  131. data/spec/configuration_spec.rb +1 -1
  132. data/spec/models/api_response_companies_search_spec.rb +42 -0
  133. data/spec/models/api_response_companies_spec.rb +1 -1
  134. data/spec/models/api_response_company_filings_spec.rb +1 -1
  135. data/spec/models/api_response_company_fundamentals_spec.rb +1 -1
  136. data/spec/models/api_response_company_historical_data_spec.rb +1 -1
  137. data/spec/models/api_response_company_news_spec.rb +1 -1
  138. data/spec/models/api_response_company_securities_spec.rb +1 -1
  139. data/spec/models/api_response_data_tags_search_spec.rb +42 -0
  140. data/spec/models/api_response_data_tags_spec.rb +1 -1
  141. data/spec/models/api_response_economic_index_historical_data_spec.rb +1 -1
  142. data/spec/models/api_response_economic_indices_search_spec.rb +42 -0
  143. data/spec/models/api_response_economic_indices_spec.rb +1 -1
  144. data/spec/models/api_response_filings_spec.rb +1 -1
  145. data/spec/models/api_response_historical_data_spec.rb +1 -1
  146. data/spec/models/api_response_municipalities_spec.rb +48 -0
  147. data/spec/models/api_response_municipalitiy_financials_spec.rb +48 -0
  148. data/spec/models/api_response_news_spec.rb +1 -1
  149. data/spec/models/api_response_reported_financials_spec.rb +1 -1
  150. data/spec/models/api_response_securities_search_spec.rb +42 -0
  151. data/spec/models/api_response_securities_spec.rb +1 -1
  152. data/spec/models/api_response_security_historical_data_spec.rb +1 -1
  153. data/spec/models/api_response_security_intraday_prices_spec.rb +64 -0
  154. data/spec/models/api_response_security_stock_price_adjustments_spec.rb +1 -1
  155. data/spec/models/api_response_security_stock_prices_spec.rb +1 -1
  156. data/spec/models/api_response_sic_index_historical_data_spec.rb +1 -1
  157. data/spec/models/api_response_sic_indices_search_spec.rb +42 -0
  158. data/spec/models/api_response_sic_indices_spec.rb +1 -1
  159. data/spec/models/api_response_standardized_financials_spec.rb +1 -1
  160. data/spec/models/api_response_stock_exchange_securities_spec.rb +1 -1
  161. data/spec/models/api_response_stock_exchange_stock_price_adjustments_spec.rb +1 -1
  162. data/spec/models/api_response_stock_exchange_stock_prices_spec.rb +1 -1
  163. data/spec/models/api_response_stock_exchanges_spec.rb +1 -1
  164. data/spec/models/api_response_stock_market_index_historical_data_spec.rb +1 -1
  165. data/spec/models/api_response_stock_market_indices_search_spec.rb +42 -0
  166. data/spec/models/api_response_stock_market_indices_spec.rb +1 -1
  167. data/spec/models/company_filing_spec.rb +1 -1
  168. data/spec/models/company_news_spec.rb +1 -1
  169. data/spec/models/company_news_summary_spec.rb +1 -1
  170. data/spec/models/company_spec.rb +1 -1
  171. data/spec/models/company_summary_spec.rb +1 -1
  172. data/spec/models/data_tag_spec.rb +1 -1
  173. data/spec/models/data_tag_summary_spec.rb +1 -1
  174. data/spec/models/economic_index_spec.rb +1 -1
  175. data/spec/models/economic_index_summary_spec.rb +1 -1
  176. data/spec/models/filing_spec.rb +1 -1
  177. data/spec/models/filing_summary_spec.rb +1 -1
  178. data/spec/models/fundamental_spec.rb +1 -1
  179. data/spec/models/fundamental_summary_spec.rb +1 -1
  180. data/spec/models/historical_data_spec.rb +1 -1
  181. data/spec/models/intraday_stock_price_spec.rb +84 -0
  182. data/spec/models/municipality_financial_spec.rb +288 -0
  183. data/spec/models/municipality_spec.rb +150 -0
  184. data/spec/models/reported_financial_spec.rb +1 -1
  185. data/spec/models/reported_tag_spec.rb +1 -1
  186. data/spec/models/security_screen_clause_spec.rb +1 -1
  187. data/spec/models/security_screen_group_spec.rb +1 -1
  188. data/spec/models/security_screen_result_data_spec.rb +1 -1
  189. data/spec/models/security_screen_result_spec.rb +1 -1
  190. data/spec/models/security_spec.rb +1 -1
  191. data/spec/models/security_summary_spec.rb +1 -1
  192. data/spec/models/sic_index_spec.rb +1 -1
  193. data/spec/models/standardized_financial_spec.rb +1 -1
  194. data/spec/models/stock_exchange_spec.rb +1 -1
  195. data/spec/models/stock_market_index_spec.rb +1 -1
  196. data/spec/models/stock_market_index_summary_spec.rb +1 -1
  197. data/spec/models/stock_price_adjustment_spec.rb +7 -1
  198. data/spec/models/stock_price_adjustment_summary_spec.rb +1 -7
  199. data/spec/models/stock_price_spec.rb +1 -1
  200. data/spec/models/stock_price_summary_spec.rb +1 -1
  201. data/spec/spec_helper.rb +1 -1
  202. metadata +54 -3
  203. data/intrinio-sdk-1.1.0.gem +0 -0
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- OpenAPI spec version: 2.1.0
6
+ OpenAPI spec version: 2.1.1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- OpenAPI spec version: 2.1.0
6
+ OpenAPI spec version: 2.1.1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.0-SNAPSHOT
@@ -29,6 +29,7 @@ module Intrinio
29
29
  # @option opts [Date] :start_date Get historical data on or after this date
30
30
  # @option opts [Date] :end_date Get historical date on or before this date
31
31
  # @option opts [String] :sort_order Sort by date `asc` or `desc` (default to desc)
32
+ # @option opts [Float] :page_size The number of results to return (default to 100)
32
33
  # @option opts [String] :next_page Gets the next page of data from a previous API call
33
34
  # @return [ApiResponseHistoricalData]
34
35
  def get_historical_data(identifier, tag, opts = {})
@@ -45,6 +46,7 @@ module Intrinio
45
46
  # @option opts [Date] :start_date Get historical data on or after this date
46
47
  # @option opts [Date] :end_date Get historical date on or before this date
47
48
  # @option opts [String] :sort_order Sort by date `asc` or `desc`
49
+ # @option opts [Float] :page_size The number of results to return
48
50
  # @option opts [String] :next_page Gets the next page of data from a previous API call
49
51
  # @return [Array<(ApiResponseHistoricalData, Fixnum, Hash)>] ApiResponseHistoricalData data, response status code and response headers
50
52
  def get_historical_data_with_http_info(identifier, tag, opts = {})
@@ -62,6 +64,10 @@ module Intrinio
62
64
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
63
65
  fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
64
66
  end
67
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
68
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling HistoricalDataApi.get_historical_data, must be smaller than or equal to 10000.'
69
+ end
70
+
65
71
  # resource path
66
72
  local_var_path = "/historical_data/{identifier}/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)
67
73
 
@@ -71,6 +77,7 @@ module Intrinio
71
77
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
72
78
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
73
79
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
80
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
74
81
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
75
82
 
76
83
  # header parameters
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- OpenAPI spec version: 2.1.0
6
+ OpenAPI spec version: 2.1.1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.0-SNAPSHOT
@@ -23,6 +23,7 @@ module Intrinio
23
23
  # All Economic Indices
24
24
  #
25
25
  # @param [Hash] opts the optional parameters
26
+ # @option opts [Float] :page_size The number of results to return (default to 100)
26
27
  # @option opts [String] :next_page Gets the next page of data from a previous API call
27
28
  # @return [ApiResponseEconomicIndices]
28
29
  def get_all_economic_indices(opts = {})
@@ -33,17 +34,23 @@ module Intrinio
33
34
  # All Economic Indices
34
35
  #
35
36
  # @param [Hash] opts the optional parameters
37
+ # @option opts [Float] :page_size The number of results to return
36
38
  # @option opts [String] :next_page Gets the next page of data from a previous API call
37
39
  # @return [Array<(ApiResponseEconomicIndices, Fixnum, Hash)>] ApiResponseEconomicIndices data, response status code and response headers
38
40
  def get_all_economic_indices_with_http_info(opts = {})
39
41
  if @api_client.config.debugging
40
42
  @api_client.config.logger.debug "Calling API: IndexApi.get_all_economic_indices ..."
41
43
  end
44
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
45
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_economic_indices, must be smaller than or equal to 10000.'
46
+ end
47
+
42
48
  # resource path
43
49
  local_var_path = "/indices/economic"
44
50
 
45
51
  # query parameters
46
52
  query_params = {}
53
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
47
54
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
48
55
 
49
56
  # header parameters
@@ -73,6 +80,7 @@ module Intrinio
73
80
  # All SIC Indices
74
81
  #
75
82
  # @param [Hash] opts the optional parameters
83
+ # @option opts [Float] :page_size The number of results to return (default to 100)
76
84
  # @option opts [String] :next_page Gets the next page of data from a previous API call
77
85
  # @return [ApiResponseSICIndices]
78
86
  def get_all_sic_indices(opts = {})
@@ -83,17 +91,23 @@ module Intrinio
83
91
  # All SIC Indices
84
92
  #
85
93
  # @param [Hash] opts the optional parameters
94
+ # @option opts [Float] :page_size The number of results to return
86
95
  # @option opts [String] :next_page Gets the next page of data from a previous API call
87
96
  # @return [Array<(ApiResponseSICIndices, Fixnum, Hash)>] ApiResponseSICIndices data, response status code and response headers
88
97
  def get_all_sic_indices_with_http_info(opts = {})
89
98
  if @api_client.config.debugging
90
99
  @api_client.config.logger.debug "Calling API: IndexApi.get_all_sic_indices ..."
91
100
  end
101
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
102
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_sic_indices, must be smaller than or equal to 10000.'
103
+ end
104
+
92
105
  # resource path
93
106
  local_var_path = "/indices/sic"
94
107
 
95
108
  # query parameters
96
109
  query_params = {}
110
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
97
111
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
98
112
 
99
113
  # header parameters
@@ -123,6 +137,7 @@ module Intrinio
123
137
  # All Stock Market Indices
124
138
  #
125
139
  # @param [Hash] opts the optional parameters
140
+ # @option opts [Float] :page_size The number of results to return (default to 100)
126
141
  # @option opts [String] :next_page Gets the next page of data from a previous API call
127
142
  # @return [ApiResponseStockMarketIndices]
128
143
  def get_all_stock_market_indices(opts = {})
@@ -133,17 +148,23 @@ module Intrinio
133
148
  # All Stock Market Indices
134
149
  #
135
150
  # @param [Hash] opts the optional parameters
151
+ # @option opts [Float] :page_size The number of results to return
136
152
  # @option opts [String] :next_page Gets the next page of data from a previous API call
137
153
  # @return [Array<(ApiResponseStockMarketIndices, Fixnum, Hash)>] ApiResponseStockMarketIndices data, response status code and response headers
138
154
  def get_all_stock_market_indices_with_http_info(opts = {})
139
155
  if @api_client.config.debugging
140
156
  @api_client.config.logger.debug "Calling API: IndexApi.get_all_stock_market_indices ..."
141
157
  end
158
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
159
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_stock_market_indices, must be smaller than or equal to 10000.'
160
+ end
161
+
142
162
  # resource path
143
163
  local_var_path = "/indices/stock_market"
144
164
 
145
165
  # query parameters
146
166
  query_params = {}
167
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
147
168
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
148
169
 
149
170
  # header parameters
@@ -350,6 +371,7 @@ module Intrinio
350
371
  # @option opts [Date] :start_date Get historical data on or after this date
351
372
  # @option opts [Date] :end_date Get historical data on or before this date
352
373
  # @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; (default to desc)
374
+ # @option opts [Float] :page_size The number of results to return (default to 100)
353
375
  # @option opts [String] :next_page Gets the next page of data from a previous API call
354
376
  # @return [ApiResponseEconomicIndexHistoricalData]
355
377
  def get_economic_index_historical_data(identifier, tag, opts = {})
@@ -366,6 +388,7 @@ module Intrinio
366
388
  # @option opts [Date] :start_date Get historical data on or after this date
367
389
  # @option opts [Date] :end_date Get historical data on or before this date
368
390
  # @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60;
391
+ # @option opts [Float] :page_size The number of results to return
369
392
  # @option opts [String] :next_page Gets the next page of data from a previous API call
370
393
  # @return [Array<(ApiResponseEconomicIndexHistoricalData, Fixnum, Hash)>] ApiResponseEconomicIndexHistoricalData data, response status code and response headers
371
394
  def get_economic_index_historical_data_with_http_info(identifier, tag, opts = {})
@@ -383,6 +406,10 @@ module Intrinio
383
406
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
384
407
  fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
385
408
  end
409
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
410
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_economic_index_historical_data, must be smaller than or equal to 10000.'
411
+ end
412
+
386
413
  # resource path
387
414
  local_var_path = "/indices/economic/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)
388
415
 
@@ -392,6 +419,7 @@ module Intrinio
392
419
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
393
420
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
394
421
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
422
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
395
423
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
396
424
 
397
425
  # header parameters
@@ -598,6 +626,7 @@ module Intrinio
598
626
  # @option opts [Date] :start_date Get historical data on or after this date
599
627
  # @option opts [Date] :end_date Get historical data on or before this date
600
628
  # @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; (default to desc)
629
+ # @option opts [Float] :page_size The number of results to return (default to 100)
601
630
  # @option opts [String] :next_page Gets the next page of data from a previous API call
602
631
  # @return [ApiResponseSICIndexHistoricalData]
603
632
  def get_sic_index_historical_data(identifier, tag, opts = {})
@@ -614,6 +643,7 @@ module Intrinio
614
643
  # @option opts [Date] :start_date Get historical data on or after this date
615
644
  # @option opts [Date] :end_date Get historical data on or before this date
616
645
  # @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60;
646
+ # @option opts [Float] :page_size The number of results to return
617
647
  # @option opts [String] :next_page Gets the next page of data from a previous API call
618
648
  # @return [Array<(ApiResponseSICIndexHistoricalData, Fixnum, Hash)>] ApiResponseSICIndexHistoricalData data, response status code and response headers
619
649
  def get_sic_index_historical_data_with_http_info(identifier, tag, opts = {})
@@ -631,6 +661,10 @@ module Intrinio
631
661
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
632
662
  fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
633
663
  end
664
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
665
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_sic_index_historical_data, must be smaller than or equal to 10000.'
666
+ end
667
+
634
668
  # resource path
635
669
  local_var_path = "/indices/sic/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)
636
670
 
@@ -640,6 +674,7 @@ module Intrinio
640
674
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
641
675
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
642
676
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
677
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
643
678
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
644
679
 
645
680
  # header parameters
@@ -846,6 +881,7 @@ module Intrinio
846
881
  # @option opts [Date] :start_date Get historical data on or after this date
847
882
  # @option opts [Date] :end_date Get historical data on or before this date
848
883
  # @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; (default to desc)
884
+ # @option opts [Float] :page_size The number of results to return (default to 100)
849
885
  # @option opts [String] :next_page Gets the next page of data from a previous API call
850
886
  # @return [ApiResponseStockMarketIndexHistoricalData]
851
887
  def get_stock_market_index_historical_data(identifier, tag, opts = {})
@@ -862,6 +898,7 @@ module Intrinio
862
898
  # @option opts [Date] :start_date Get historical data on or after this date
863
899
  # @option opts [Date] :end_date Get historical data on or before this date
864
900
  # @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60;
901
+ # @option opts [Float] :page_size The number of results to return
865
902
  # @option opts [String] :next_page Gets the next page of data from a previous API call
866
903
  # @return [Array<(ApiResponseStockMarketIndexHistoricalData, Fixnum, Hash)>] ApiResponseStockMarketIndexHistoricalData data, response status code and response headers
867
904
  def get_stock_market_index_historical_data_with_http_info(identifier, tag, opts = {})
@@ -879,6 +916,10 @@ module Intrinio
879
916
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
880
917
  fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
881
918
  end
919
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
920
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_stock_market_index_historical_data, must be smaller than or equal to 10000.'
921
+ end
922
+
882
923
  # resource path
883
924
  local_var_path = "/indices/stock_market/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)
884
925
 
@@ -888,6 +929,7 @@ module Intrinio
888
929
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
889
930
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
890
931
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
932
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
891
933
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
892
934
 
893
935
  # header parameters
@@ -918,7 +960,8 @@ module Intrinio
918
960
  # Searches for indices using the text in `query`
919
961
  # @param query Search query
920
962
  # @param [Hash] opts the optional parameters
921
- # @return [ApiResponseEconomicIndices]
963
+ # @option opts [Float] :page_size The number of results to return (default to 100)
964
+ # @return [ApiResponseEconomicIndicesSearch]
922
965
  def search_economic_indices(query, opts = {})
923
966
  data, _status_code, _headers = search_economic_indices_with_http_info(query, opts)
924
967
  return data
@@ -928,7 +971,8 @@ module Intrinio
928
971
  # Searches for indices using the text in &#x60;query&#x60;
929
972
  # @param query Search query
930
973
  # @param [Hash] opts the optional parameters
931
- # @return [Array<(ApiResponseEconomicIndices, Fixnum, Hash)>] ApiResponseEconomicIndices data, response status code and response headers
974
+ # @option opts [Float] :page_size The number of results to return
975
+ # @return [Array<(ApiResponseEconomicIndicesSearch, Fixnum, Hash)>] ApiResponseEconomicIndicesSearch data, response status code and response headers
932
976
  def search_economic_indices_with_http_info(query, opts = {})
933
977
  if @api_client.config.debugging
934
978
  @api_client.config.logger.debug "Calling API: IndexApi.search_economic_indices ..."
@@ -937,12 +981,17 @@ module Intrinio
937
981
  if @api_client.config.client_side_validation && query.nil?
938
982
  fail ArgumentError, "Missing the required parameter 'query' when calling IndexApi.search_economic_indices"
939
983
  end
984
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
985
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.search_economic_indices, must be smaller than or equal to 10000.'
986
+ end
987
+
940
988
  # resource path
941
989
  local_var_path = "/indices/economic/search"
942
990
 
943
991
  # query parameters
944
992
  query_params = {}
945
993
  query_params[:'query'] = query
994
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
946
995
 
947
996
  # header parameters
948
997
  header_params = {}
@@ -961,7 +1010,7 @@ module Intrinio
961
1010
  :form_params => form_params,
962
1011
  :body => post_body,
963
1012
  :auth_names => auth_names,
964
- :return_type => 'ApiResponseEconomicIndices')
1013
+ :return_type => 'ApiResponseEconomicIndicesSearch')
965
1014
  if @api_client.config.debugging
966
1015
  @api_client.config.logger.debug "API called: IndexApi#search_economic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
967
1016
  end
@@ -972,7 +1021,8 @@ module Intrinio
972
1021
  # Searches for indices using the text in `query`
973
1022
  # @param query Search query
974
1023
  # @param [Hash] opts the optional parameters
975
- # @return [ApiResponseSICIndices]
1024
+ # @option opts [Float] :page_size The number of results to return (default to 100)
1025
+ # @return [ApiResponseSICIndicesSearch]
976
1026
  def search_sic_indices(query, opts = {})
977
1027
  data, _status_code, _headers = search_sic_indices_with_http_info(query, opts)
978
1028
  return data
@@ -982,7 +1032,8 @@ module Intrinio
982
1032
  # Searches for indices using the text in &#x60;query&#x60;
983
1033
  # @param query Search query
984
1034
  # @param [Hash] opts the optional parameters
985
- # @return [Array<(ApiResponseSICIndices, Fixnum, Hash)>] ApiResponseSICIndices data, response status code and response headers
1035
+ # @option opts [Float] :page_size The number of results to return
1036
+ # @return [Array<(ApiResponseSICIndicesSearch, Fixnum, Hash)>] ApiResponseSICIndicesSearch data, response status code and response headers
986
1037
  def search_sic_indices_with_http_info(query, opts = {})
987
1038
  if @api_client.config.debugging
988
1039
  @api_client.config.logger.debug "Calling API: IndexApi.search_sic_indices ..."
@@ -991,12 +1042,17 @@ module Intrinio
991
1042
  if @api_client.config.client_side_validation && query.nil?
992
1043
  fail ArgumentError, "Missing the required parameter 'query' when calling IndexApi.search_sic_indices"
993
1044
  end
1045
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
1046
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.search_sic_indices, must be smaller than or equal to 10000.'
1047
+ end
1048
+
994
1049
  # resource path
995
1050
  local_var_path = "/indices/sic/search"
996
1051
 
997
1052
  # query parameters
998
1053
  query_params = {}
999
1054
  query_params[:'query'] = query
1055
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
1000
1056
 
1001
1057
  # header parameters
1002
1058
  header_params = {}
@@ -1015,7 +1071,7 @@ module Intrinio
1015
1071
  :form_params => form_params,
1016
1072
  :body => post_body,
1017
1073
  :auth_names => auth_names,
1018
- :return_type => 'ApiResponseSICIndices')
1074
+ :return_type => 'ApiResponseSICIndicesSearch')
1019
1075
  if @api_client.config.debugging
1020
1076
  @api_client.config.logger.debug "API called: IndexApi#search_sic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1021
1077
  end
@@ -1026,7 +1082,8 @@ module Intrinio
1026
1082
  # Searches for indices using the text in `query`
1027
1083
  # @param query Search query
1028
1084
  # @param [Hash] opts the optional parameters
1029
- # @return [ApiResponseStockMarketIndices]
1085
+ # @option opts [Float] :page_size The number of results to return (default to 100)
1086
+ # @return [ApiResponseStockMarketIndicesSearch]
1030
1087
  def search_stock_markets_indices(query, opts = {})
1031
1088
  data, _status_code, _headers = search_stock_markets_indices_with_http_info(query, opts)
1032
1089
  return data
@@ -1036,7 +1093,8 @@ module Intrinio
1036
1093
  # Searches for indices using the text in &#x60;query&#x60;
1037
1094
  # @param query Search query
1038
1095
  # @param [Hash] opts the optional parameters
1039
- # @return [Array<(ApiResponseStockMarketIndices, Fixnum, Hash)>] ApiResponseStockMarketIndices data, response status code and response headers
1096
+ # @option opts [Float] :page_size The number of results to return
1097
+ # @return [Array<(ApiResponseStockMarketIndicesSearch, Fixnum, Hash)>] ApiResponseStockMarketIndicesSearch data, response status code and response headers
1040
1098
  def search_stock_markets_indices_with_http_info(query, opts = {})
1041
1099
  if @api_client.config.debugging
1042
1100
  @api_client.config.logger.debug "Calling API: IndexApi.search_stock_markets_indices ..."
@@ -1045,12 +1103,17 @@ module Intrinio
1045
1103
  if @api_client.config.client_side_validation && query.nil?
1046
1104
  fail ArgumentError, "Missing the required parameter 'query' when calling IndexApi.search_stock_markets_indices"
1047
1105
  end
1106
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
1107
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.search_stock_markets_indices, must be smaller than or equal to 10000.'
1108
+ end
1109
+
1048
1110
  # resource path
1049
1111
  local_var_path = "/indices/stock_market/search"
1050
1112
 
1051
1113
  # query parameters
1052
1114
  query_params = {}
1053
1115
  query_params[:'query'] = query
1116
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
1054
1117
 
1055
1118
  # header parameters
1056
1119
  header_params = {}
@@ -1069,7 +1132,7 @@ module Intrinio
1069
1132
  :form_params => form_params,
1070
1133
  :body => post_body,
1071
1134
  :auth_names => auth_names,
1072
- :return_type => 'ApiResponseStockMarketIndices')
1135
+ :return_type => 'ApiResponseStockMarketIndicesSearch')
1073
1136
  if @api_client.config.debugging
1074
1137
  @api_client.config.logger.debug "API called: IndexApi#search_stock_markets_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1075
1138
  end
@@ -0,0 +1,221 @@
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.1.1
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 MunicipalityApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # All Municipalities
24
+ #
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [BOOLEAN] :has_financials Return municipalities with financials
27
+ # @option opts [String] :government_name Return municipalities with a government name matching the given query
28
+ # @option opts [String] :government_type Return municipalities with the given government type
29
+ # @option opts [String] :area_name Return municipalities with an area name matching the given query
30
+ # @option opts [String] :area_type Return municipalities with the given area type
31
+ # @option opts [String] :city Return municipalities in the given city
32
+ # @option opts [String] :state Return municipalities in the given state
33
+ # @option opts [Float] :zipcode Return municipalities in the given zipcode
34
+ # @option opts [Float] :population_greater_than Return municipalities with a population greater than the given number
35
+ # @option opts [Float] :population_less_than Return municipalities with a population less than the given number
36
+ # @option opts [Float] :enrollment_greater_than Return municipalities with an enrollment greater than the given number
37
+ # @option opts [Float] :enrollment_less_than Return municipalities with an enrollment less than the given number
38
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
39
+ # @return [ApiResponseMunicipalities]
40
+ def get_all_municipalities(opts = {})
41
+ data, _status_code, _headers = get_all_municipalities_with_http_info(opts)
42
+ return data
43
+ end
44
+
45
+ # All Municipalities
46
+ #
47
+ # @param [Hash] opts the optional parameters
48
+ # @option opts [BOOLEAN] :has_financials Return municipalities with financials
49
+ # @option opts [String] :government_name Return municipalities with a government name matching the given query
50
+ # @option opts [String] :government_type Return municipalities with the given government type
51
+ # @option opts [String] :area_name Return municipalities with an area name matching the given query
52
+ # @option opts [String] :area_type Return municipalities with the given area type
53
+ # @option opts [String] :city Return municipalities in the given city
54
+ # @option opts [String] :state Return municipalities in the given state
55
+ # @option opts [Float] :zipcode Return municipalities in the given zipcode
56
+ # @option opts [Float] :population_greater_than Return municipalities with a population greater than the given number
57
+ # @option opts [Float] :population_less_than Return municipalities with a population less than the given number
58
+ # @option opts [Float] :enrollment_greater_than Return municipalities with an enrollment greater than the given number
59
+ # @option opts [Float] :enrollment_less_than Return municipalities with an enrollment less than the given number
60
+ # @option opts [String] :next_page Gets the next page of data from a previous API call
61
+ # @return [Array<(ApiResponseMunicipalities, Fixnum, Hash)>] ApiResponseMunicipalities data, response status code and response headers
62
+ def get_all_municipalities_with_http_info(opts = {})
63
+ if @api_client.config.debugging
64
+ @api_client.config.logger.debug "Calling API: MunicipalityApi.get_all_municipalities ..."
65
+ end
66
+ if @api_client.config.client_side_validation && opts[:'area_type'] && !['Borough', 'Census Borough', 'Census County', 'Census Division', 'Census Parish', 'City', 'City And County', 'County', 'Municipality', 'Parish'].include?(opts[:'area_type'])
67
+ fail ArgumentError, 'invalid value for "area_type", must be one of Borough, Census Borough, Census County, Census Division, Census Parish, City, City And County, County, Municipality, Parish'
68
+ end
69
+ # resource path
70
+ local_var_path = "/municipalities"
71
+
72
+ # query parameters
73
+ query_params = {}
74
+ query_params[:'has_financials'] = opts[:'has_financials'] if !opts[:'has_financials'].nil?
75
+ query_params[:'government_name'] = opts[:'government_name'] if !opts[:'government_name'].nil?
76
+ query_params[:'government_type'] = opts[:'government_type'] if !opts[:'government_type'].nil?
77
+ query_params[:'area_name'] = opts[:'area_name'] if !opts[:'area_name'].nil?
78
+ query_params[:'area_type'] = opts[:'area_type'] if !opts[:'area_type'].nil?
79
+ query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil?
80
+ query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
81
+ query_params[:'zipcode'] = opts[:'zipcode'] if !opts[:'zipcode'].nil?
82
+ query_params[:'population_greater_than'] = opts[:'population_greater_than'] if !opts[:'population_greater_than'].nil?
83
+ query_params[:'population_less_than'] = opts[:'population_less_than'] if !opts[:'population_less_than'].nil?
84
+ query_params[:'enrollment_greater_than'] = opts[:'enrollment_greater_than'] if !opts[:'enrollment_greater_than'].nil?
85
+ query_params[:'enrollment_less_than'] = opts[:'enrollment_less_than'] if !opts[:'enrollment_less_than'].nil?
86
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
87
+
88
+ # header parameters
89
+ header_params = {}
90
+ # HTTP header 'Accept' (if needed)
91
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
92
+
93
+ # form parameters
94
+ form_params = {}
95
+
96
+ # http body (model)
97
+ post_body = nil
98
+ auth_names = ['ApiKeyAuth']
99
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
100
+ :header_params => header_params,
101
+ :query_params => query_params,
102
+ :form_params => form_params,
103
+ :body => post_body,
104
+ :auth_names => auth_names,
105
+ :return_type => 'ApiResponseMunicipalities')
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "API called: MunicipalityApi#get_all_municipalities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
108
+ end
109
+ return data, status_code, headers
110
+ end
111
+
112
+ # Municipality by ID
113
+ # Returns the Municipality with the given ID
114
+ # @param id An Intrinio ID of a Municipality
115
+ # @param [Hash] opts the optional parameters
116
+ # @return [Municipality]
117
+ def get_municipality_by_id(id, opts = {})
118
+ data, _status_code, _headers = get_municipality_by_id_with_http_info(id, opts)
119
+ return data
120
+ end
121
+
122
+ # Municipality by ID
123
+ # Returns the Municipality with the given ID
124
+ # @param id An Intrinio ID of a Municipality
125
+ # @param [Hash] opts the optional parameters
126
+ # @return [Array<(Municipality, Fixnum, Hash)>] Municipality data, response status code and response headers
127
+ def get_municipality_by_id_with_http_info(id, opts = {})
128
+ if @api_client.config.debugging
129
+ @api_client.config.logger.debug "Calling API: MunicipalityApi.get_municipality_by_id ..."
130
+ end
131
+ # verify the required parameter 'id' is set
132
+ if @api_client.config.client_side_validation && id.nil?
133
+ fail ArgumentError, "Missing the required parameter 'id' when calling MunicipalityApi.get_municipality_by_id"
134
+ end
135
+ # resource path
136
+ local_var_path = "/municipalities/{id}".sub('{' + 'id' + '}', id.to_s)
137
+
138
+ # query parameters
139
+ query_params = {}
140
+
141
+ # header parameters
142
+ header_params = {}
143
+ # HTTP header 'Accept' (if needed)
144
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
145
+
146
+ # form parameters
147
+ form_params = {}
148
+
149
+ # http body (model)
150
+ post_body = nil
151
+ auth_names = ['ApiKeyAuth']
152
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
153
+ :header_params => header_params,
154
+ :query_params => query_params,
155
+ :form_params => form_params,
156
+ :body => post_body,
157
+ :auth_names => auth_names,
158
+ :return_type => 'Municipality')
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug "API called: MunicipalityApi#get_municipality_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
161
+ end
162
+ return data, status_code, headers
163
+ end
164
+
165
+ # Financials for a Municipality
166
+ # Returns financial statement data for the Municipality with the given ID
167
+ # @param id An Intrinio ID of a Municipality
168
+ # @param [Hash] opts the optional parameters
169
+ # @option opts [Float] :fiscal_year Return financials for the given fiscal year
170
+ # @return [ApiResponseMunicipalitiyFinancials]
171
+ def get_municipality_financials(id, opts = {})
172
+ data, _status_code, _headers = get_municipality_financials_with_http_info(id, opts)
173
+ return data
174
+ end
175
+
176
+ # Financials for a Municipality
177
+ # Returns financial statement data for the Municipality with the given ID
178
+ # @param id An Intrinio ID of a Municipality
179
+ # @param [Hash] opts the optional parameters
180
+ # @option opts [Float] :fiscal_year Return financials for the given fiscal year
181
+ # @return [Array<(ApiResponseMunicipalitiyFinancials, Fixnum, Hash)>] ApiResponseMunicipalitiyFinancials data, response status code and response headers
182
+ def get_municipality_financials_with_http_info(id, opts = {})
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug "Calling API: MunicipalityApi.get_municipality_financials ..."
185
+ end
186
+ # verify the required parameter 'id' is set
187
+ if @api_client.config.client_side_validation && id.nil?
188
+ fail ArgumentError, "Missing the required parameter 'id' when calling MunicipalityApi.get_municipality_financials"
189
+ end
190
+ # resource path
191
+ local_var_path = "/municipalities/{id}/financials".sub('{' + 'id' + '}', id.to_s)
192
+
193
+ # query parameters
194
+ query_params = {}
195
+ query_params[:'fiscal_year'] = opts[:'fiscal_year'] if !opts[:'fiscal_year'].nil?
196
+
197
+ # header parameters
198
+ header_params = {}
199
+ # HTTP header 'Accept' (if needed)
200
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
201
+
202
+ # form parameters
203
+ form_params = {}
204
+
205
+ # http body (model)
206
+ post_body = nil
207
+ auth_names = ['ApiKeyAuth']
208
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
209
+ :header_params => header_params,
210
+ :query_params => query_params,
211
+ :form_params => form_params,
212
+ :body => post_body,
213
+ :auth_names => auth_names,
214
+ :return_type => 'ApiResponseMunicipalitiyFinancials')
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: MunicipalityApi#get_municipality_financials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+ end
221
+ end