=begin #Intrinio API #Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://docs.intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner. OpenAPI spec version: 2.62.1 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: unset =end require 'spec_helper' require 'json' # Unit tests for Intrinio::CompanyApi # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) # Please update as you see appropriate describe 'CompanyApi' do before do # run before each test @instance = Intrinio::CompanyApi.new end after do # run after each test end describe 'test an instance of CompanyApi' do it 'should create an instance of CompanyApi' do expect(@instance).to be_instance_of(Intrinio::CompanyApi) end end # unit tests for get_all_companies # 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 [ApiResponseCompanies] describe 'get_all_companies test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_all_companies_daily_metrics # All Companies daily metrics # Returns the company metrics for a date. # @param [Hash] opts the optional parameters # @option opts [Date] :on_date Date of the metric # @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 # @option opts [String] :next_page2 Gets the next page of data from a previous API call # @return [ApiResponseCompanyDailyMetrics] describe 'get_all_companies_daily_metrics test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_all_company_news # All News # Returns the latest news article links, headlines and summaries for all US traded companies allowing you to keep a pulse on companies and their business operations. # @param [Hash] opts the optional parameters # @option opts [String] :specific_source Only news from this source. Defaults to highest available if not present. # @option opts [Integer] :page_size The maximum number of results to return. # @option opts [String] :sentiment Filter by sentiment. Unsupported for yahoo source. # @option opts [String] :topic Filter by topic. Unsupported for yahoo source. # @option opts [String] :company Filter by `company` identifier (ticker, CIK, LEI, Intrinio ID) # @option opts [String] :security Filter by `security` identifier (ticker, figi, isin, cusip, Intrinio ID). Unsupported for yahoo source. # @option opts [Date] :start_date Limit news stories to those on or after this date. # @option opts [Date] :end_date Limit news stories to those on or before this date. # @option opts [String] :language Filter by language. Unsupported for yahoo source. Unsupported for yahoo source. # @option opts [Integer] :word_count_greater_than News stories will have a word count greater than this value. Unsupported for yahoo source. # @option opts [Integer] :word_count_less_than News stories will have a word count less than this value. Unsupported for yahoo source. # @option opts [BOOLEAN] :is_spam Filter whether it is marked as spam or not. Unsupported for yahoo source. # @option opts [Float] :business_relevance_greater_than News stories will have a business relevance score more than this value. Unsupported for yahoo source. # @option opts [Float] :business_relevance_less_than News stories will have a business relevance score less than this value. Unsupported for yahoo source. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseNews] describe 'get_all_company_news test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company # Lookup Company # Returns company reference and metadata such as tickers, CIK, and a unique company identifier, as well as company metadata such as business description, employee count, and company URL. # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) # @param [Hash] opts the optional parameters # @return [Company] describe 'get_company test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_answers # 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] describe 'get_company_answers test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_daily_metrics # Company metrics by Company # Returns the latest company metrics. # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Date] :on_date Date of the metric # @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 # @option opts [String] :next_page2 Gets the next page of data from a previous API call # @return [ApiResponseCompanyDailyMetrics] describe 'get_company_daily_metrics test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_data_point_number # Data Point (Number) for Company # Returns latest value for calculations, metrics, and financial data points for a company. # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) # @param tag An Intrinio data tag ID or code (<a href='https://data.intrinio.com/data-tags'>reference</a>) # @param [Hash] opts the optional parameters # @return [Float] describe 'get_company_data_point_number test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_data_point_text # Data Point (Text) for Company # Returns latest value for metadata items for a company. # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) # @param tag An Intrinio data tag ID or code (<a href='https://data.intrinio.com/data-tags'>reference</a>) # @param [Hash] opts the optional parameters # @return [String] describe 'get_company_data_point_text test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_filings # 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 <a href=\"https://docs.intrinio.com/documentation/sec_filing_report_types\" target=\"_blank\">report type</a>. 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 [ApiResponseCompanyFilings] describe 'get_company_filings test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_fundamentals # All Fundamentals by Company # Returns a list of fundamentals with unique fundamental IDs associated with a particular company. Useful to obtain all historical and/or latest fundamental IDs for a given company to then use to loop through and pull all fundamental data available. # @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 [Date] :updated_after Only include fundamentals where it was updated after this date. # @option opts [Date] :updated_before Only include fundamentals where it was updated before this 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 [ApiResponseCompanyFundamentals] describe 'get_company_fundamentals test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_historical_data # 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 (<a href='https://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 `asc` or `desc` # @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 [ApiResponseCompanyHistoricalData] describe 'get_company_historical_data test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_ipos # IPOs # Returns a list of historical, current, and upcoming initial public offerings (IPOs) across the major US Exchanges. Includes relevant information such as the IPO status, the offer amount, the total share count and target share price. # @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 occurred 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 [ApiResponseInitialPublicOfferings] describe 'get_company_ipos test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_news # All News by Company # Returns the latest and historical news article links, headlines and summaries for a specified US traded company. # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :specific_source Only news from this source. Defaults to highest available if not present. # @option opts [Integer] :page_size The maximum number of results to return # @option opts [String] :sentiment Filter by sentiment. Unsupported for yahoo source. # @option opts [String] :topic Filter by topic. Unsupported for yahoo source. # @option opts [String] :security Filter by `security` identifier (ticker, figi, isin, cusip, Intrinio ID). Unsupported for yahoo source. # @option opts [Date] :start_date Limit news stories to those on or after this date # @option opts [Date] :end_date Limit news stories to those on or before this date # @option opts [String] :language Filter by language. Unsupported for yahoo source. # @option opts [Integer] :word_count_greater_than News stories will have a word count greater than this value. Unsupported for yahoo source. # @option opts [Integer] :word_count_less_than News stories will have a word count less than this value. Unsupported for yahoo source. # @option opts [BOOLEAN] :is_spam Filter whether it is marked as spam or not. Unsupported for yahoo source. # @option opts [Float] :business_relevance_greater_than News stories will have a business relevance score more than this value. Unsupported for yahoo source. # @option opts [Float] :business_relevance_less_than News stories will have a business relevance score less than this value. Unsupported for yahoo source. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseCompanyNews] describe 'get_company_news test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_news_body # The body of a news article # Returns the news article body. # @param news_story_id The identifier of the news story. # @param publication_date The DateTime of the story. # @param [Hash] opts the optional parameters # @option opts [String] :specific_source Only news from this source. Defaults to highest available if not present. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseCompanyNewsBody] describe 'get_company_news_body test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_public_float # Get Company's public float # Returns a list of public float data tied to a given company identifier. # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Date] :float_date_greater_than The lower-bound date for the data being requested. # @option opts [Date] :float_date_less_than The upper-bound date for the data being requested. # @option opts [String] :next_page Gets the next page of data from a previous API call # @option opts [String] :next_page2 Gets the next page of data from a previous API call # @return [ApiResponseCompanyPublicFloatResult] describe 'get_company_public_float test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_company_securities # All Securities by Company # Returns a list of underlying securities with associated reference data tied to a given company 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] describe 'get_company_securities test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for insider_transaction_filings_by_company # 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's insider transaction filings on or after this date # @option opts [Date] :end_date Return Company's insider transaction filings on or before this date # @option opts [String] :ownership_type The type of ownership to return transaction filings for. 'D' is for direct transactions. 'I' is for indirect transactions. Omit for both types. # @option opts [String] :next_page Gets the next page of data from a previous API call # @option opts [Integer] :page_size The number of results to return # @option opts [String] :sort_by The field to sort by. Default is 'filing_date'. # @option opts [String] :next_page2 Gets the next page of data from a previous API call # @return [ApiResponseInsiderTransactionFilings] describe 'insider_transaction_filings_by_company test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for latest_insider_transaction_filing_by_company # 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] describe 'latest_insider_transaction_filing_by_company test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for lookup_company_fundamental # 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] describe 'lookup_company_fundamental test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for recognize_company # 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] describe 'recognize_company test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for search_companies # Search Companies # Search the companies database and return a list of companies matching the text query parameter passed through. Query parameter searches across the company ticker and name. # @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. Not setting this value returns all. Not used when mode is set. # @option opts [String] :mode When set, changes search mode to the specified mode. # @option opts [Integer] :page_size The number of results to return # @return [ApiResponseCompaniesSearch] describe 'search_companies test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for shares_outstanding_by_company # Shares Outstanding by Company # Returns the shares outstanding reported on the front cover of the SEC 10-K and 10-Q filings. # @param identifier A Company identifier (Ticker, CIK, LEI, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Date] :end_date_greater_than Returns shares outstanding after this date. # @option opts [Date] :end_date_less_than Returns shares outstanding before this date. # @return [ApiResponseCompanySharesOutstanding] describe 'shares_outstanding_by_company test' do it "should work" do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end