Class: Intrinio::ZacksApi

Inherits:
Object
  • Object
show all
Defined in:
lib/intrinio-sdk/api/zacks_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ZacksApi

Returns a new instance of ZacksApi.



19
20
21
# File 'lib/intrinio-sdk/api/zacks_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/intrinio-sdk/api/zacks_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_zacks_analyst_ratings(opts = {}) ⇒ ApiResponseZacksAnalystRatings

Zacks Analyst Ratings Returns buy, sell, and hold recommendations from analysts at brokerages for all companies in the Zacks universe. Zack’s storied research team aggregates and validates the ratings from professional analysts.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :identifier (String)

    A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)

  • :start_date (String)

    Limit ratings to those on or after this date

  • :end_date (String)

    Limit ratings to those on or before this date

  • :mean_greater (Float)

    Return only records with a mean (average) higher than this value

  • :mean_less (Float)

    Return only records with a mean (average) lower than this value

  • :strong_buys_greater (Integer)

    Return only records with more than this many Strong Buy recommendations

  • :strong_buys_less (Integer)

    Return only records with fewer than this many Strong Buy recommendations

  • :buys_greater (Integer)

    Return only records with more than this many Buy recommendations

  • :buys_less (Integer)

    Return only records with fewer than this many Buy recommendations

  • :holds_greater (Integer)

    Return only records with more than this many Hold recommendations

  • :holds_less (Integer)

    Return only records with fewer than this many Hold recommendations

  • :sells_greater (Integer)

    Return only records with more than this many Sell recommendations

  • :sells_less (Integer)

    Return only records with fewer than this many Sell recommendations

  • :strong_sells_greater (Integer)

    Return only records with more than this many Strong Sell recommendations

  • :strong_sells_less (Integer)

    Return only records with fewer than this many Strong Sell recommendations

  • :total_greater (Integer)

    Return only records with more than this many recommendations, regardless of type

  • :total_less (Integer)

    Return only records with fewer than this many recommendations, regardless of type

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



46
47
48
49
# File 'lib/intrinio-sdk/api/zacks_api.rb', line 46

def get_zacks_analyst_ratings(opts = {})
  data, _status_code, _headers = get_zacks_analyst_ratings_with_http_info(opts)
  return data
end

#get_zacks_analyst_ratings_with_http_info(opts = {}) ⇒ Array<(ApiResponseZacksAnalystRatings, Fixnum, Hash)>

Zacks Analyst Ratings Returns buy, sell, and hold recommendations from analysts at brokerages for all companies in the Zacks universe. Zack’s storied research team aggregates and validates the ratings from professional analysts.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :identifier (String)

    A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)

  • :start_date (String)

    Limit ratings to those on or after this date

  • :end_date (String)

    Limit ratings to those on or before this date

  • :mean_greater (Float)

    Return only records with a mean (average) higher than this value

  • :mean_less (Float)

    Return only records with a mean (average) lower than this value

  • :strong_buys_greater (Integer)

    Return only records with more than this many Strong Buy recommendations

  • :strong_buys_less (Integer)

    Return only records with fewer than this many Strong Buy recommendations

  • :buys_greater (Integer)

    Return only records with more than this many Buy recommendations

  • :buys_less (Integer)

    Return only records with fewer than this many Buy recommendations

  • :holds_greater (Integer)

    Return only records with more than this many Hold recommendations

  • :holds_less (Integer)

    Return only records with fewer than this many Hold recommendations

  • :sells_greater (Integer)

    Return only records with more than this many Sell recommendations

  • :sells_less (Integer)

    Return only records with fewer than this many Sell recommendations

  • :strong_sells_greater (Integer)

    Return only records with more than this many Strong Sell recommendations

  • :strong_sells_less (Integer)

    Return only records with fewer than this many Strong Sell recommendations

  • :total_greater (Integer)

    Return only records with more than this many recommendations, regardless of type

  • :total_less (Integer)

    Return only records with fewer than this many recommendations, regardless of type

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/intrinio-sdk/api/zacks_api.rb', line 74

def get_zacks_analyst_ratings_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ZacksApi.get_zacks_analyst_ratings ..."
  end
  if @api_client.config.client_side_validation && !opts[:'mean_greater'].nil? && opts[:'mean_greater'] > 5
    fail ArgumentError, 'invalid value for "opts[:"mean_greater"]" when calling ZacksApi.get_zacks_analyst_ratings, must be smaller than or equal to 5.'
  end

  if @api_client.config.client_side_validation && !opts[:'mean_greater'].nil? && opts[:'mean_greater'] < 1
    fail ArgumentError, 'invalid value for "opts[:"mean_greater"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'mean_less'].nil? && opts[:'mean_less'] > 5
    fail ArgumentError, 'invalid value for "opts[:"mean_less"]" when calling ZacksApi.get_zacks_analyst_ratings, must be smaller than or equal to 5.'
  end

  if @api_client.config.client_side_validation && !opts[:'mean_less'].nil? && opts[:'mean_less'] < 1
    fail ArgumentError, 'invalid value for "opts[:"mean_less"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'strong_buys_greater'].nil? && opts[:'strong_buys_greater'] < 0
    fail ArgumentError, 'invalid value for "opts[:"strong_buys_greater"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'strong_buys_less'].nil? && opts[:'strong_buys_less'] < 0
    fail ArgumentError, 'invalid value for "opts[:"strong_buys_less"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'buys_greater'].nil? && opts[:'buys_greater'] < 0
    fail ArgumentError, 'invalid value for "opts[:"buys_greater"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'buys_less'].nil? && opts[:'buys_less'] < 0
    fail ArgumentError, 'invalid value for "opts[:"buys_less"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'holds_greater'].nil? && opts[:'holds_greater'] < 0
    fail ArgumentError, 'invalid value for "opts[:"holds_greater"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'holds_less'].nil? && opts[:'holds_less'] < 0
    fail ArgumentError, 'invalid value for "opts[:"holds_less"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'sells_greater'].nil? && opts[:'sells_greater'] < 0
    fail ArgumentError, 'invalid value for "opts[:"sells_greater"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'sells_less'].nil? && opts[:'sells_less'] < 0
    fail ArgumentError, 'invalid value for "opts[:"sells_less"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'strong_sells_greater'].nil? && opts[:'strong_sells_greater'] < 0
    fail ArgumentError, 'invalid value for "opts[:"strong_sells_greater"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'strong_sells_less'].nil? && opts[:'strong_sells_less'] < 0
    fail ArgumentError, 'invalid value for "opts[:"strong_sells_less"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'total_greater'].nil? && opts[:'total_greater'] < 0
    fail ArgumentError, 'invalid value for "opts[:"total_greater"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'total_less'].nil? && opts[:'total_less'] < 0
    fail ArgumentError, 'invalid value for "opts[:"total_less"]" when calling ZacksApi.get_zacks_analyst_ratings, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ZacksApi.get_zacks_analyst_ratings, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/zacks/analyst_ratings"

  # query parameters
  query_params = {}
  query_params[:'identifier'] = opts[:'identifier'] if !opts[:'identifier'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'mean_greater'] = opts[:'mean_greater'] if !opts[:'mean_greater'].nil?
  query_params[:'mean_less'] = opts[:'mean_less'] if !opts[:'mean_less'].nil?
  query_params[:'strong_buys_greater'] = opts[:'strong_buys_greater'] if !opts[:'strong_buys_greater'].nil?
  query_params[:'strong_buys_less'] = opts[:'strong_buys_less'] if !opts[:'strong_buys_less'].nil?
  query_params[:'buys_greater'] = opts[:'buys_greater'] if !opts[:'buys_greater'].nil?
  query_params[:'buys_less'] = opts[:'buys_less'] if !opts[:'buys_less'].nil?
  query_params[:'holds_greater'] = opts[:'holds_greater'] if !opts[:'holds_greater'].nil?
  query_params[:'holds_less'] = opts[:'holds_less'] if !opts[:'holds_less'].nil?
  query_params[:'sells_greater'] = opts[:'sells_greater'] if !opts[:'sells_greater'].nil?
  query_params[:'sells_less'] = opts[:'sells_less'] if !opts[:'sells_less'].nil?
  query_params[:'strong_sells_greater'] = opts[:'strong_sells_greater'] if !opts[:'strong_sells_greater'].nil?
  query_params[:'strong_sells_less'] = opts[:'strong_sells_less'] if !opts[:'strong_sells_less'].nil?
  query_params[:'total_greater'] = opts[:'total_greater'] if !opts[:'total_greater'].nil?
  query_params[:'total_less'] = opts[:'total_less'] if !opts[:'total_less'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseZacksAnalystRatings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ZacksApi#get_zacks_analyst_ratings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_zacks_eps_surprises(opts = {}) ⇒ ApiResponseZacksEPSSurprises

Zacks EPS Surprises Returns Zacks eps surprise data for all Securities.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_date (String)

    Limit EPS surprises to those on or after this date

  • :end_date (String)

    Limit EPS surprises to those on or before this date

  • :eps_actual_greater (Float)

    Return only records with an actual EPS higher than this value

  • :eps_actual_less (Float)

    Return only records with an actual EPS lower than this value

  • :eps_mean_estimate_greater (Float)

    Return only records with an EPS mean estimate greater than this value

  • :eps_mean_estimate_less (Float)

    Return only records with an EPS mean estimate lower than this value

  • :eps_amount_diff_greater (Float)

    Return only records with an EPS amount difference greater than this value

  • :eps_amount_diff_less (Float)

    Return only records with an EPS amount difference less than this value

  • :eps_percent_diff_greater (Float)

    Return only records with an EPS percent difference greater than this value

  • :eps_percent_diff_less (Float)

    Return only records with an EPS percent difference less than this value

  • :eps_count_estimate_greater (Float)

    Return only records with an EPS count estimate greater than this value

  • :eps_count_estimate_less (Float)

    Return only records with an EPS count estimate less than this value

  • :eps_std_dev_estimate_greater (Float)

    Return only records with an EPS standard deviation greater than this value

  • :eps_std_dev_estimate_less (Float)

    Return only records with an EPS standard deviation less than this value

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



215
216
217
218
# File 'lib/intrinio-sdk/api/zacks_api.rb', line 215

def get_zacks_eps_surprises(opts = {})
  data, _status_code, _headers = get_zacks_eps_surprises_with_http_info(opts)
  return data
end

#get_zacks_eps_surprises_with_http_info(opts = {}) ⇒ Array<(ApiResponseZacksEPSSurprises, Fixnum, Hash)>

Zacks EPS Surprises Returns Zacks eps surprise data for all Securities.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_date (String)

    Limit EPS surprises to those on or after this date

  • :end_date (String)

    Limit EPS surprises to those on or before this date

  • :eps_actual_greater (Float)

    Return only records with an actual EPS higher than this value

  • :eps_actual_less (Float)

    Return only records with an actual EPS lower than this value

  • :eps_mean_estimate_greater (Float)

    Return only records with an EPS mean estimate greater than this value

  • :eps_mean_estimate_less (Float)

    Return only records with an EPS mean estimate lower than this value

  • :eps_amount_diff_greater (Float)

    Return only records with an EPS amount difference greater than this value

  • :eps_amount_diff_less (Float)

    Return only records with an EPS amount difference less than this value

  • :eps_percent_diff_greater (Float)

    Return only records with an EPS percent difference greater than this value

  • :eps_percent_diff_less (Float)

    Return only records with an EPS percent difference less than this value

  • :eps_count_estimate_greater (Float)

    Return only records with an EPS count estimate greater than this value

  • :eps_count_estimate_less (Float)

    Return only records with an EPS count estimate less than this value

  • :eps_std_dev_estimate_greater (Float)

    Return only records with an EPS standard deviation greater than this value

  • :eps_std_dev_estimate_less (Float)

    Return only records with an EPS standard deviation less than this value

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/intrinio-sdk/api/zacks_api.rb', line 240

def get_zacks_eps_surprises_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ZacksApi.get_zacks_eps_surprises ..."
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ZacksApi.get_zacks_eps_surprises, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/zacks/eps_surprises"

  # query parameters
  query_params = {}
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'eps_actual_greater'] = opts[:'eps_actual_greater'] if !opts[:'eps_actual_greater'].nil?
  query_params[:'eps_actual_less'] = opts[:'eps_actual_less'] if !opts[:'eps_actual_less'].nil?
  query_params[:'eps_mean_estimate_greater'] = opts[:'eps_mean_estimate_greater'] if !opts[:'eps_mean_estimate_greater'].nil?
  query_params[:'eps_mean_estimate_less'] = opts[:'eps_mean_estimate_less'] if !opts[:'eps_mean_estimate_less'].nil?
  query_params[:'eps_amount_diff_greater'] = opts[:'eps_amount_diff_greater'] if !opts[:'eps_amount_diff_greater'].nil?
  query_params[:'eps_amount_diff_less'] = opts[:'eps_amount_diff_less'] if !opts[:'eps_amount_diff_less'].nil?
  query_params[:'eps_percent_diff_greater'] = opts[:'eps_percent_diff_greater'] if !opts[:'eps_percent_diff_greater'].nil?
  query_params[:'eps_percent_diff_less'] = opts[:'eps_percent_diff_less'] if !opts[:'eps_percent_diff_less'].nil?
  query_params[:'eps_count_estimate_greater'] = opts[:'eps_count_estimate_greater'] if !opts[:'eps_count_estimate_greater'].nil?
  query_params[:'eps_count_estimate_less'] = opts[:'eps_count_estimate_less'] if !opts[:'eps_count_estimate_less'].nil?
  query_params[:'eps_std_dev_estimate_greater'] = opts[:'eps_std_dev_estimate_greater'] if !opts[:'eps_std_dev_estimate_greater'].nil?
  query_params[:'eps_std_dev_estimate_less'] = opts[:'eps_std_dev_estimate_less'] if !opts[:'eps_std_dev_estimate_less'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseZacksEPSSurprises')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ZacksApi#get_zacks_eps_surprises\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_zacks_sales_surprises(opts = {}) ⇒ ApiResponseZacksSalesSurprises

Zacks Sales Surprises Returns Zacks sales surprise data for all Securities.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_date (String)

    Limit sales surprises to those on or after this date

  • :end_date (String)

    Limit sales surprises to those on or before this date

  • :sales_actual_greater (Float)

    Return only records with an actual sales higher than this value

  • :sales_actual_less (Float)

    Return only records with an actual sales lower than this value

  • :sales_mean_estimate_greater (Float)

    Return only records with a sales mean estimate greater than this value

  • :sales_mean_estimate_less (Float)

    Return only records with a sales mean estimate lower than this value

  • :sales_amount_diff_greater (Float)

    Return only records with a sales amount difference greater than this value

  • :sales_amount_diff_less (Float)

    Return only records with a sales amount difference less than this value

  • :sales_percent_diff_greater (Float)

    Return only records with a sales percent difference greater than this value

  • :sales_percent_diff_less (Float)

    Return only records with a sales percent difference less than this value

  • :sales_count_estimate_greater (Float)

    Return only records with a sales count estimate greater than this value

  • :sales_count_estimate_less (Float)

    Return only records with a sales count estimate less than this value

  • :sales_std_dev_estimate_greater (Float)

    Return only records with a sales standard deviation greater than this value

  • :sales_std_dev_estimate_less (Float)

    Return only records with a sales standard deviation less than this value

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



314
315
316
317
# File 'lib/intrinio-sdk/api/zacks_api.rb', line 314

def get_zacks_sales_surprises(opts = {})
  data, _status_code, _headers = get_zacks_sales_surprises_with_http_info(opts)
  return data
end

#get_zacks_sales_surprises_with_http_info(opts = {}) ⇒ Array<(ApiResponseZacksSalesSurprises, Fixnum, Hash)>

Zacks Sales Surprises Returns Zacks sales surprise data for all Securities.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_date (String)

    Limit sales surprises to those on or after this date

  • :end_date (String)

    Limit sales surprises to those on or before this date

  • :sales_actual_greater (Float)

    Return only records with an actual sales higher than this value

  • :sales_actual_less (Float)

    Return only records with an actual sales lower than this value

  • :sales_mean_estimate_greater (Float)

    Return only records with a sales mean estimate greater than this value

  • :sales_mean_estimate_less (Float)

    Return only records with a sales mean estimate lower than this value

  • :sales_amount_diff_greater (Float)

    Return only records with a sales amount difference greater than this value

  • :sales_amount_diff_less (Float)

    Return only records with a sales amount difference less than this value

  • :sales_percent_diff_greater (Float)

    Return only records with a sales percent difference greater than this value

  • :sales_percent_diff_less (Float)

    Return only records with a sales percent difference less than this value

  • :sales_count_estimate_greater (Float)

    Return only records with a sales count estimate greater than this value

  • :sales_count_estimate_less (Float)

    Return only records with a sales count estimate less than this value

  • :sales_std_dev_estimate_greater (Float)

    Return only records with a sales standard deviation greater than this value

  • :sales_std_dev_estimate_less (Float)

    Return only records with a sales standard deviation less than this value

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/intrinio-sdk/api/zacks_api.rb', line 339

def get_zacks_sales_surprises_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ZacksApi.get_zacks_sales_surprises ..."
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ZacksApi.get_zacks_sales_surprises, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/zacks/sales_surprises"

  # query parameters
  query_params = {}
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'sales_actual_greater'] = opts[:'sales_actual_greater'] if !opts[:'sales_actual_greater'].nil?
  query_params[:'sales_actual_less'] = opts[:'sales_actual_less'] if !opts[:'sales_actual_less'].nil?
  query_params[:'sales_mean_estimate_greater'] = opts[:'sales_mean_estimate_greater'] if !opts[:'sales_mean_estimate_greater'].nil?
  query_params[:'sales_mean_estimate_less'] = opts[:'sales_mean_estimate_less'] if !opts[:'sales_mean_estimate_less'].nil?
  query_params[:'sales_amount_diff_greater'] = opts[:'sales_amount_diff_greater'] if !opts[:'sales_amount_diff_greater'].nil?
  query_params[:'sales_amount_diff_less'] = opts[:'sales_amount_diff_less'] if !opts[:'sales_amount_diff_less'].nil?
  query_params[:'sales_percent_diff_greater'] = opts[:'sales_percent_diff_greater'] if !opts[:'sales_percent_diff_greater'].nil?
  query_params[:'sales_percent_diff_less'] = opts[:'sales_percent_diff_less'] if !opts[:'sales_percent_diff_less'].nil?
  query_params[:'sales_count_estimate_greater'] = opts[:'sales_count_estimate_greater'] if !opts[:'sales_count_estimate_greater'].nil?
  query_params[:'sales_count_estimate_less'] = opts[:'sales_count_estimate_less'] if !opts[:'sales_count_estimate_less'].nil?
  query_params[:'sales_std_dev_estimate_greater'] = opts[:'sales_std_dev_estimate_greater'] if !opts[:'sales_std_dev_estimate_greater'].nil?
  query_params[:'sales_std_dev_estimate_less'] = opts[:'sales_std_dev_estimate_less'] if !opts[:'sales_std_dev_estimate_less'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseZacksSalesSurprises')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ZacksApi#get_zacks_sales_surprises\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end