class Intrinio::CompanyApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/intrinio-sdk/api/company_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_all_companies(opts = {}) click to toggle source

All Companies Returns all Companies. When parameters are specified, returns matching companies. @param [Hash] opts the optional parameters @option opts [Date] :latest_filing_date Return companies whose latest 10-Q or 10-K was filed on or after this date @option opts [String] :sic Return companies with the given Standard Industrial Classification code @option opts [String] :template Return companies with the given financial statement template @option opts [String] :sector Return companies in the given industry sector @option opts [String] :industry_category Return companies in the given industry category @option opts [String] :industry_group Return companies in the given industry group @option opts [BOOLEAN] :has_fundamentals Return only companies that have fundamentals when true @option opts [BOOLEAN] :has_stock_prices Return only companies that have stock prices when true @option opts [BOOLEAN] :thea_enabled Return companies whose have been read by our Thea NLP and are ready for our company answers endpoint @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseCompanies]

# File lib/intrinio-sdk/api/company_api.rb, line 38
def get_all_companies(opts = {})
  data, _status_code, _headers = get_all_companies_with_http_info(opts)
  return data
end
get_all_companies_with_http_info(opts = {}) click to toggle source

All Companies Returns all Companies. When parameters are specified, returns matching companies. @param [Hash] opts the optional parameters @option opts [Date] :latest_filing_date Return companies whose latest 10-Q or 10-K was filed on or after this date @option opts [String] :sic Return companies with the given Standard Industrial Classification code @option opts [String] :template Return companies with the given financial statement template @option opts [String] :sector Return companies in the given industry sector @option opts [String] :industry_category Return companies in the given industry category @option opts [String] :industry_group Return companies in the given industry group @option opts [BOOLEAN] :has_fundamentals Return only companies that have fundamentals when true @option opts [BOOLEAN] :has_stock_prices Return only companies that have stock prices when true @option opts [BOOLEAN] :thea_enabled Return companies whose have been read by our Thea NLP and are ready for our company answers endpoint @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseCompanies, Fixnum, Hash)>] ApiResponseCompanies data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 58
def get_all_companies_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_all_companies ..."
  end
  if @api_client.config.client_side_validation && opts[:'template'] && !['indu', 'fin'].include?(opts[:'template'])
    fail ArgumentError, 'invalid value for "template", must be one of indu, fin'
  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 CompanyApi.get_all_companies, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies"

  # query parameters
  query_params = {}
  query_params[:'latest_filing_date'] = opts[:'latest_filing_date'] if !opts[:'latest_filing_date'].nil?
  query_params[:'sic'] = opts[:'sic'] if !opts[:'sic'].nil?
  query_params[:'template'] = opts[:'template'] if !opts[:'template'].nil?
  query_params[:'sector'] = opts[:'sector'] if !opts[:'sector'].nil?
  query_params[:'industry_category'] = opts[:'industry_category'] if !opts[:'industry_category'].nil?
  query_params[:'industry_group'] = opts[:'industry_group'] if !opts[:'industry_group'].nil?
  query_params[:'has_fundamentals'] = opts[:'has_fundamentals'] if !opts[:'has_fundamentals'].nil?
  query_params[:'has_stock_prices'] = opts[:'has_stock_prices'] if !opts[:'has_stock_prices'].nil?
  query_params[:'thea_enabled'] = opts[:'thea_enabled'] if !opts[:'thea_enabled'].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 => 'ApiResponseCompanies')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_all_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_all_company_news(opts = {}) click to toggle source

All News Returns all News for all Companies @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseNews]

# File lib/intrinio-sdk/api/company_api.rb, line 116
def get_all_company_news(opts = {})
  data, _status_code, _headers = get_all_company_news_with_http_info(opts)
  return data
end
get_all_company_news_with_http_info(opts = {}) click to toggle source

All News Returns all News for all Companies @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseNews, Fixnum, Hash)>] ApiResponseNews data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 127
def get_all_company_news_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_all_company_news ..."
  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 CompanyApi.get_all_company_news, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/news"

  # query parameters
  query_params = {}
  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 => 'ApiResponseNews')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_all_company_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company(identifier, opts = {}) click to toggle source

Lookup Company Returns the Company with the given `identifier` @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @return [Company]

# File lib/intrinio-sdk/api/company_api.rb, line 172
def get_company(identifier, opts = {})
  data, _status_code, _headers = get_company_with_http_info(identifier, opts)
  return data
end
get_company_answers(identifier, query, opts = {}) click to toggle source

Company Answers Returns answers for a question about the Company with the given `identifier` @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param query The query to ask the Thea API @param [Hash] opts the optional parameters @return [ApiResponseCompanyAnswers]

# File lib/intrinio-sdk/api/company_api.rb, line 226
def get_company_answers(identifier, query, opts = {})
  data, _status_code, _headers = get_company_answers_with_http_info(identifier, query, opts)
  return data
end
get_company_answers_with_http_info(identifier, query, opts = {}) click to toggle source

Company Answers Returns answers for a question about the Company with the given &#x60;identifier&#x60; @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param query The query to ask the Thea API @param [Hash] opts the optional parameters @return [Array<(ApiResponseCompanyAnswers, Fixnum, Hash)>] ApiResponseCompanyAnswers data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 237
def get_company_answers_with_http_info(identifier, query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_answers ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_answers"
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling CompanyApi.get_company_answers"
  end
  # resource path
  local_var_path = "/companies/{identifier}/answers".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'query'] = query

  # 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 => 'ApiResponseCompanyAnswers')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_answers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company_data_point_number(identifier, tag, opts = {}) click to toggle source

Data Point (Number) for Company Returns a numeric value for the given `tag` for the Company with the given `identifier` @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param tag An Intrinio data tag ID or code (&lt;a href&#x3D;&#39;data.intrinio.com/data-tags'>reference</a>;) @param [Hash] opts the optional parameters @return [Float]

# File lib/intrinio-sdk/api/company_api.rb, line 286
def get_company_data_point_number(identifier, tag, opts = {})
  data, _status_code, _headers = get_company_data_point_number_with_http_info(identifier, tag, opts)
  return data
end
get_company_data_point_number_with_http_info(identifier, tag, opts = {}) click to toggle source

Data Point (Number) for Company Returns a numeric value for the given &#x60;tag&#x60; for the Company with the given &#x60;identifier&#x60; @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param tag An Intrinio data tag ID or code (&lt;a href&#x3D;&#39;data.intrinio.com/data-tags'>reference</a>;) @param [Hash] opts the optional parameters @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 297
def get_company_data_point_number_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_data_point_number ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_data_point_number"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling CompanyApi.get_company_data_point_number"
  end
  # resource path
  local_var_path = "/companies/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # 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 => 'Float')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company_data_point_text(identifier, tag, opts = {}) click to toggle source

Data Point (Text) for Company Returns a text value for the given `tag` for the Company with the given `identifier` @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param tag An Intrinio data tag ID or code (&lt;a href&#x3D;&#39;data.intrinio.com/data-tags'>reference</a>;) @param [Hash] opts the optional parameters @return [String]

# File lib/intrinio-sdk/api/company_api.rb, line 345
def get_company_data_point_text(identifier, tag, opts = {})
  data, _status_code, _headers = get_company_data_point_text_with_http_info(identifier, tag, opts)
  return data
end
get_company_data_point_text_with_http_info(identifier, tag, opts = {}) click to toggle source

Data Point (Text) for Company Returns a text value for the given &#x60;tag&#x60; for the Company with the given &#x60;identifier&#x60; @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param tag An Intrinio data tag ID or code (&lt;a href&#x3D;&#39;data.intrinio.com/data-tags'>reference</a>;) @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 356
def get_company_data_point_text_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_data_point_text ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_data_point_text"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling CompanyApi.get_company_data_point_text"
  end
  # resource path
  local_var_path = "/companies/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # 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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company_filings(identifier, opts = {}) click to toggle source

All Filings by Company Returns a complete list of SEC filings for the Company with the given `identifier` @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [String] :report_type Filter by &lt;a href&#x3D;&quot;docs.intrinio.com/documentation/sec_filing_report_types"; target&#x3D;&quot;_blank&quot;&gt;report type&lt;/a&gt;. Separate values with commas to return multiple report types. @option opts [Date] :start_date Filed on or after the given date @option opts [Date] :end_date Filed before or after the given date @option opts [BOOLEAN] :thea_enabled Return filings that have been read by our Thea NLP and are ready for our answers endpoint @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseCompanyFilings]

# File lib/intrinio-sdk/api/company_api.rb, line 409
def get_company_filings(identifier, opts = {})
  data, _status_code, _headers = get_company_filings_with_http_info(identifier, opts)
  return data
end
get_company_filings_with_http_info(identifier, opts = {}) click to toggle source

All Filings by Company Returns a complete list of SEC filings for the Company with the given &#x60;identifier&#x60; @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [String] :report_type Filter by &lt;a href&#x3D;&quot;docs.intrinio.com/documentation/sec_filing_report_types"; target&#x3D;&quot;_blank&quot;&gt;report type&lt;/a&gt;. Separate values with commas to return multiple report types. @option opts [Date] :start_date Filed on or after the given date @option opts [Date] :end_date Filed before or after the given date @option opts [BOOLEAN] :thea_enabled Return filings that have been read by our Thea NLP and are ready for our answers endpoint @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseCompanyFilings, Fixnum, Hash)>] ApiResponseCompanyFilings data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 425
def get_company_filings_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_filings ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_filings"
  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 CompanyApi.get_company_filings, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/{identifier}/filings".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'report_type'] = opts[:'report_type'] if !opts[:'report_type'].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[:'thea_enabled'] = opts[:'thea_enabled'] if !opts[:'thea_enabled'].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 => 'ApiResponseCompanyFilings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_filings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company_fundamentals(identifier, opts = {}) click to toggle source

All Fundamentals by Company Returns all Fundamentals for the Company with the given `identifier`. Returns Fundamentals matching parameters when supplied. @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [Date] :filed_after Filed on or after this date @option opts [Date] :filed_before Filed on or before this date @option opts [BOOLEAN] :reported_only Only as-reported fundamentals @option opts [Integer] :fiscal_year Only for the given fiscal year @option opts [String] :statement_code Only of the given statement code @option opts [String] :type Only of the given type @option opts [Date] :start_date Only on or after the given date @option opts [Date] :end_date Only on or before the given date @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseCompanyFundamentals]

# File lib/intrinio-sdk/api/company_api.rb, line 488
def get_company_fundamentals(identifier, opts = {})
  data, _status_code, _headers = get_company_fundamentals_with_http_info(identifier, opts)
  return data
end
get_company_fundamentals_with_http_info(identifier, opts = {}) click to toggle source

All Fundamentals by Company Returns all Fundamentals for the Company with the given &#x60;identifier&#x60;. Returns Fundamentals matching parameters when supplied. @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [Date] :filed_after Filed on or after this date @option opts [Date] :filed_before Filed on or before this date @option opts [BOOLEAN] :reported_only Only as-reported fundamentals @option opts [Integer] :fiscal_year Only for the given fiscal year @option opts [String] :statement_code Only of the given statement code @option opts [String] :type Only of the given type @option opts [Date] :start_date Only on or after the given date @option opts [Date] :end_date Only on or before the given date @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseCompanyFundamentals, Fixnum, Hash)>] ApiResponseCompanyFundamentals data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 508
def get_company_fundamentals_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_fundamentals ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_fundamentals"
  end
  if @api_client.config.client_side_validation && opts[:'statement_code'] && !['income_statement', 'balance_sheet_statement', 'cash_flow_statement', 'calculations'].include?(opts[:'statement_code'])
    fail ArgumentError, 'invalid value for "statement_code", must be one of income_statement, balance_sheet_statement, cash_flow_statement, calculations'
  end
  if @api_client.config.client_side_validation && opts[:'type'] && !['QTR', 'YTD', 'FY', 'TTM'].include?(opts[:'type'])
    fail ArgumentError, 'invalid value for "type", must be one of QTR, YTD, FY, TTM'
  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 CompanyApi.get_company_fundamentals, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/{identifier}/fundamentals".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'filed_after'] = opts[:'filed_after'] if !opts[:'filed_after'].nil?
  query_params[:'filed_before'] = opts[:'filed_before'] if !opts[:'filed_before'].nil?
  query_params[:'reported_only'] = opts[:'reported_only'] if !opts[:'reported_only'].nil?
  query_params[:'fiscal_year'] = opts[:'fiscal_year'] if !opts[:'fiscal_year'].nil?
  query_params[:'statement_code'] = opts[:'statement_code'] if !opts[:'statement_code'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].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[:'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 => 'ApiResponseCompanyFundamentals')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_fundamentals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company_historical_data(identifier, tag, opts = {}) click to toggle source

Historical Data for Company Returns historical values for the given `tag` and the Company with the given `identifier` @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param tag An Intrinio data tag ID or code (&lt;a href&#x3D;&#39;data.intrinio.com/data-tags'>reference</a>;) @param [Hash] opts the optional parameters @option opts [String] :frequency Return historical data in the given frequency (default to daily) @option opts [String] :type Return historical data for given fiscal period type @option opts [Date] :start_date Return historical data on or after this date @option opts [Date] :end_date Return historical data on or before this date @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; (default to desc) @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseCompanyHistoricalData]

# File lib/intrinio-sdk/api/company_api.rb, line 579
def get_company_historical_data(identifier, tag, opts = {})
  data, _status_code, _headers = get_company_historical_data_with_http_info(identifier, tag, opts)
  return data
end
get_company_historical_data_with_http_info(identifier, tag, opts = {}) click to toggle source

Historical Data for Company Returns historical values for the given &#x60;tag&#x60; and the Company with the given &#x60;identifier&#x60; @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param tag An Intrinio data tag ID or code (&lt;a href&#x3D;&#39;data.intrinio.com/data-tags'>reference</a>;) @param [Hash] opts the optional parameters @option opts [String] :frequency Return historical data in the given frequency @option opts [String] :type Return historical data for given fiscal period type @option opts [Date] :start_date Return historical data on or after this date @option opts [Date] :end_date Return historical data on or before this date @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseCompanyHistoricalData, Fixnum, Hash)>] ApiResponseCompanyHistoricalData data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 597
def get_company_historical_data_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_historical_data ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_historical_data"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling CompanyApi.get_company_historical_data"
  end
  if @api_client.config.client_side_validation && opts[:'frequency'] && !['daily', 'weekly', 'monthly', 'quarterly', 'yearly'].include?(opts[:'frequency'])
    fail ArgumentError, 'invalid value for "frequency", must be one of daily, weekly, monthly, quarterly, yearly'
  end
  if @api_client.config.client_side_validation && opts[:'type'] && !['FY', 'QTR', 'TTM'].include?(opts[:'type'])
    fail ArgumentError, 'invalid value for "type", must be one of FY, QTR, TTM'
  end
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
  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 CompanyApi.get_company_historical_data, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}
  query_params[:'frequency'] = opts[:'frequency'] if !opts[:'frequency'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].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[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].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 => 'ApiResponseCompanyHistoricalData')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company_ipos(opts = {}) click to toggle source

IPOs Returns initial public offerings (IPOs). An IPO is a public offering of private company stock. The act of "going public" is initiated by an IPO, at which point the company's stock trades on a major stock exchange (such as NYSE or NASDAQ). Intrinio covers all upcoming and recent IPOs for US exchanges. @param [Hash] opts the optional parameters @option opts [String] :ticker Return IPOs with the given ticker (typically the IPO for the company) @option opts [String] :status Return IPOs with the given status. Upcoming IPOs are scheduled to occur in the future. Priced IPOs have occured and the company should be trading publicly. Withdrawn IPOs were planned to occurr but were withdrawn beforehand @option opts [Date] :start_date Return IPOs on or after the given date @option opts [Date] :end_date Return IPOs on or before the given date @option opts [Integer] :offer_amount_greater_than Return IPOs with an offer dollar amount greater than the given amount @option opts [Integer] :offer_amount_less_than Return IPOs with an offer dollar amount less than the given amount @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseInitialPublicOfferings]

# File lib/intrinio-sdk/api/company_api.rb, line 671
def get_company_ipos(opts = {})
  data, _status_code, _headers = get_company_ipos_with_http_info(opts)
  return data
end
get_company_ipos_with_http_info(opts = {}) click to toggle source

IPOs Returns initial public offerings (IPOs). An IPO is a public offering of private company stock. The act of "going public&quot; is initiated by an IPO, at which point the company&#39;s stock trades on a major stock exchange (such as NYSE or NASDAQ). Intrinio covers all upcoming and recent IPOs for US exchanges. @param [Hash] opts the optional parameters @option opts [String] :ticker Return IPOs with the given ticker (typically the IPO for the company) @option opts [String] :status Return IPOs with the given status. Upcoming IPOs are scheduled to occur in the future. Priced IPOs have occured and the company should be trading publicly. Withdrawn IPOs were planned to occurr but were withdrawn beforehand @option opts [Date] :start_date Return IPOs on or after the given date @option opts [Date] :end_date Return IPOs on or before the given date @option opts [Integer] :offer_amount_greater_than Return IPOs with an offer dollar amount greater than the given amount @option opts [Integer] :offer_amount_less_than Return IPOs with an offer dollar amount less than the given amount @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseInitialPublicOfferings, Fixnum, Hash)>] ApiResponseInitialPublicOfferings data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 688
def get_company_ipos_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_ipos ..."
  end
  if @api_client.config.client_side_validation && opts[:'status'] && !['upcoming', 'priced', 'withdrawn'].include?(opts[:'status'])
    fail ArgumentError, 'invalid value for "status", must be one of upcoming, priced, withdrawn'
  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 CompanyApi.get_company_ipos, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/ipos"

  # query parameters
  query_params = {}
  query_params[:'ticker'] = opts[:'ticker'] if !opts[:'ticker'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].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[:'offer_amount_greater_than'] = opts[:'offer_amount_greater_than'] if !opts[:'offer_amount_greater_than'].nil?
  query_params[:'offer_amount_less_than'] = opts[:'offer_amount_less_than'] if !opts[:'offer_amount_less_than'].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 => 'ApiResponseInitialPublicOfferings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_ipos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company_news(identifier, opts = {}) click to toggle source

All News by Company Returns news for the Company with the given `identifier` @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseCompanyNews]

# File lib/intrinio-sdk/api/company_api.rb, line 744
def get_company_news(identifier, opts = {})
  data, _status_code, _headers = get_company_news_with_http_info(identifier, opts)
  return data
end
get_company_news_with_http_info(identifier, opts = {}) click to toggle source

All News by Company Returns news for the Company with the given &#x60;identifier&#x60; @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseCompanyNews, Fixnum, Hash)>] ApiResponseCompanyNews data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 756
def get_company_news_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_news ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_news"
  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 CompanyApi.get_company_news, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/{identifier}/news".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  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 => 'ApiResponseCompanyNews')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company_securities(identifier, opts = {}) click to toggle source

All Securities by Company Returns Securities for the Company with the given `identifier` @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseCompanySecurities]

# File lib/intrinio-sdk/api/company_api.rb, line 806
def get_company_securities(identifier, opts = {})
  data, _status_code, _headers = get_company_securities_with_http_info(identifier, opts)
  return data
end
get_company_securities_with_http_info(identifier, opts = {}) click to toggle source

All Securities by Company Returns Securities for the Company with the given &#x60;identifier&#x60; @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseCompanySecurities, Fixnum, Hash)>] ApiResponseCompanySecurities data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 817
def get_company_securities_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_securities ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_securities"
  end
  # resource path
  local_var_path = "/companies/{identifier}/securities".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  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 => 'ApiResponseCompanySecurities')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_securities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_company_with_http_info(identifier, opts = {}) click to toggle source

Lookup Company Returns the Company with the given &#x60;identifier&#x60; @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @return [Array<(Company, Fixnum, Hash)>] Company data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 182
def get_company_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company"
  end
  # resource path
  local_var_path = "/companies/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}

  # 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 => 'Company')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
insider_transaction_filings_by_company(identifier, opts = {}) click to toggle source

Insider Transaction Filings by Company Returns a list of all insider transaction filings in a company. Criteria for being an insider include being a director, officer, or 10%+ owner in the company. Transactions are detailed for both non-derivative and derivative transactions by the insider. @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [Date] :start_date Return Company&#39;s insider transaction filings on or after this date @option opts [Date] :end_date Return Company&#39;s insider transaction filings on or before this date @option opts [String] :ownership_type The type of ownership to return transaction filings for. &#39;D&#39; is for direct transactions. &#39;I&#39; is for indirect transactions. Omit for both types. @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseInsiderTransactionFilings]

# File lib/intrinio-sdk/api/company_api.rb, line 866
def insider_transaction_filings_by_company(identifier, opts = {})
  data, _status_code, _headers = insider_transaction_filings_by_company_with_http_info(identifier, opts)
  return data
end
insider_transaction_filings_by_company_with_http_info(identifier, opts = {}) click to toggle source

Insider Transaction Filings by Company Returns a list of all insider transaction filings in a company. Criteria for being an insider include being a director, officer, or 10%+ owner in the company. Transactions are detailed for both non-derivative and derivative transactions by the insider. @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [Date] :start_date Return Company&#39;s insider transaction filings on or after this date @option opts [Date] :end_date Return Company&#39;s insider transaction filings on or before this date @option opts [String] :ownership_type The type of ownership to return transaction filings for. &#39;D&#39; is for direct transactions. &#39;I&#39; is for indirect transactions. Omit for both types. @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseInsiderTransactionFilings, Fixnum, Hash)>] ApiResponseInsiderTransactionFilings data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 881
def insider_transaction_filings_by_company_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.insider_transaction_filings_by_company ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.insider_transaction_filings_by_company"
  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 CompanyApi.insider_transaction_filings_by_company, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/{identifier}/insider_transaction_filings".sub('{' + 'identifier' + '}', identifier.to_s)

  # 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[:'ownership_type'] = opts[:'ownership_type'] if !opts[:'ownership_type'].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 => 'ApiResponseInsiderTransactionFilings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#insider_transaction_filings_by_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
latest_insider_transaction_filing_by_company(identifier, opts = {}) click to toggle source

Latest Insider Transaction Filing by Company Returns the latest insider transaction filing for a company. @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [String] :next_page Gets the next page of data from a previous API call @return [InsiderTransactionFiling]

# File lib/intrinio-sdk/api/company_api.rb, line 934
def latest_insider_transaction_filing_by_company(identifier, opts = {})
  data, _status_code, _headers = latest_insider_transaction_filing_by_company_with_http_info(identifier, opts)
  return data
end
latest_insider_transaction_filing_by_company_with_http_info(identifier, opts = {}) click to toggle source

Latest Insider Transaction Filing by Company Returns the latest insider transaction filing for a company. @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(InsiderTransactionFiling, Fixnum, Hash)>] InsiderTransactionFiling data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 945
def latest_insider_transaction_filing_by_company_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.latest_insider_transaction_filing_by_company ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.latest_insider_transaction_filing_by_company"
  end
  # resource path
  local_var_path = "/companies/{identifier}/insider_transaction_filings/latest".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  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 => 'InsiderTransactionFiling')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#latest_insider_transaction_filing_by_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
lookup_company_fundamental(identifier, statement_code, fiscal_period, fiscal_year, opts = {}) click to toggle source

Lookup Fundamental by Company Returns the Fundamental for the Company with the given `identifier` and with the given parameters @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param statement_code The statement code @param fiscal_period The fiscal period @param fiscal_year The fiscal year @param [Hash] opts the optional parameters @return [Fundamental]

# File lib/intrinio-sdk/api/company_api.rb, line 992
def lookup_company_fundamental(identifier, statement_code, fiscal_period, fiscal_year, opts = {})
  data, _status_code, _headers = lookup_company_fundamental_with_http_info(identifier, statement_code, fiscal_period, fiscal_year, opts)
  return data
end
lookup_company_fundamental_with_http_info(identifier, statement_code, fiscal_period, fiscal_year, opts = {}) click to toggle source

Lookup Fundamental by Company Returns the Fundamental for the Company with the given &#x60;identifier&#x60; and with the given parameters @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param statement_code The statement code @param fiscal_period The fiscal period @param fiscal_year The fiscal year @param [Hash] opts the optional parameters @return [Array<(Fundamental, Fixnum, Hash)>] Fundamental data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 1005
def lookup_company_fundamental_with_http_info(identifier, statement_code, fiscal_period, fiscal_year, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.lookup_company_fundamental ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.lookup_company_fundamental"
  end
  # verify the required parameter 'statement_code' is set
  if @api_client.config.client_side_validation && statement_code.nil?
    fail ArgumentError, "Missing the required parameter 'statement_code' when calling CompanyApi.lookup_company_fundamental"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['income_statement', 'balance_sheet_statement', 'cash_flow_statement', 'calculations'].include?(statement_code)
    fail ArgumentError, "invalid value for 'statement_code', must be one of income_statement, balance_sheet_statement, cash_flow_statement, calculations"
  end
  # verify the required parameter 'fiscal_period' is set
  if @api_client.config.client_side_validation && fiscal_period.nil?
    fail ArgumentError, "Missing the required parameter 'fiscal_period' when calling CompanyApi.lookup_company_fundamental"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['Q1TTM', 'Q2TTM', 'Q3TTM', 'FY', 'Q1', 'Q2', 'Q3', 'Q4', 'Q2YTD', 'Q3YTD'].include?(fiscal_period)
    fail ArgumentError, "invalid value for 'fiscal_period', must be one of Q1TTM, Q2TTM, Q3TTM, FY, Q1, Q2, Q3, Q4, Q2YTD, Q3YTD"
  end
  # verify the required parameter 'fiscal_year' is set
  if @api_client.config.client_side_validation && fiscal_year.nil?
    fail ArgumentError, "Missing the required parameter 'fiscal_year' when calling CompanyApi.lookup_company_fundamental"
  end
  # resource path
  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)

  # query parameters
  query_params = {}

  # 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 => 'Fundamental')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#lookup_company_fundamental\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
recognize_company(text, opts = {}) click to toggle source

Recognize Company Returns a list of companies recognized by the Thea API in the given `text` query string parameter. @param text The text sent to the Thea API to analyze @param [Hash] opts the optional parameters @return [ApiResponseCompanyRecognize]

# File lib/intrinio-sdk/api/company_api.rb, line 1068
def recognize_company(text, opts = {})
  data, _status_code, _headers = recognize_company_with_http_info(text, opts)
  return data
end
recognize_company_with_http_info(text, opts = {}) click to toggle source

Recognize Company Returns a list of companies recognized by the Thea API in the given &#x60;text&#x60; query string parameter. @param text The text sent to the Thea API to analyze @param [Hash] opts the optional parameters @return [Array<(ApiResponseCompanyRecognize, Fixnum, Hash)>] ApiResponseCompanyRecognize data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 1078
def recognize_company_with_http_info(text, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.recognize_company ..."
  end
  # verify the required parameter 'text' is set
  if @api_client.config.client_side_validation && text.nil?
    fail ArgumentError, "Missing the required parameter 'text' when calling CompanyApi.recognize_company"
  end
  # resource path
  local_var_path = "/companies/recognize"

  # query parameters
  query_params = {}
  query_params[:'text'] = text

  # 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 => 'ApiResponseCompanyRecognize')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#recognize_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_companies(query, opts = {}) click to toggle source

Search Companies Searches for Companies matching the text `query` @param query Search parameters @param [Hash] opts the optional parameters @option opts [BOOLEAN] :active When true, return companies that are actively traded (having stock prices within the past 14 days). When false, return companies that are not actively traded or never have been traded. @option opts [Integer] :page_size The number of results to return (default to 100) @return [ApiResponseCompaniesSearch]

# File lib/intrinio-sdk/api/company_api.rb, line 1124
def search_companies(query, opts = {})
  data, _status_code, _headers = search_companies_with_http_info(query, opts)
  return data
end
search_companies_with_http_info(query, opts = {}) click to toggle source

Search Companies Searches for Companies matching the text &#x60;query&#x60; @param query Search parameters @param [Hash] opts the optional parameters @option opts [BOOLEAN] :active When true, return companies that are actively traded (having stock prices within the past 14 days). When false, return companies that are not actively traded or never have been traded. @option opts [Integer] :page_size The number of results to return @return [Array<(ApiResponseCompaniesSearch, Fixnum, Hash)>] ApiResponseCompaniesSearch data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 1136
def search_companies_with_http_info(query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.search_companies ..."
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling CompanyApi.search_companies"
  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 CompanyApi.search_companies, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/search"

  # query parameters
  query_params = {}
  query_params[:'query'] = query
  query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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 => 'ApiResponseCompaniesSearch')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#search_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
shares_outstanding_by_company(identifier, opts = {}) click to toggle source

Shares Outstanding by Company Returns shares outstanding for the Company with the given `identifier` @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @return [ApiResponseCompanySharesOutstanding]

# File lib/intrinio-sdk/api/company_api.rb, line 1186
def shares_outstanding_by_company(identifier, opts = {})
  data, _status_code, _headers = shares_outstanding_by_company_with_http_info(identifier, opts)
  return data
end
shares_outstanding_by_company_with_http_info(identifier, opts = {}) click to toggle source

Shares Outstanding by Company Returns shares outstanding for the Company with the given &#x60;identifier&#x60; @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) @param [Hash] opts the optional parameters @return [Array<(ApiResponseCompanySharesOutstanding, Fixnum, Hash)>] ApiResponseCompanySharesOutstanding data, response status code and response headers

# File lib/intrinio-sdk/api/company_api.rb, line 1196
def shares_outstanding_by_company_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.shares_outstanding_by_company ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.shares_outstanding_by_company"
  end
  # resource path
  local_var_path = "/companies/{identifier}/shares_outstanding".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}

  # 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 => 'ApiResponseCompanySharesOutstanding')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#shares_outstanding_by_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end