=begin
#FinFeedAPI Stock REST API

#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: v1
Contact: support@apibricks.io
Generated by: https://openapi-generator.tech
Generator version: 7.14.0

=end

require 'cgi'

module OpenapiClient
  class NativeIEXApi
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end
    # Get Admin Messages
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<AdminAdminMessageModel>]
    def v1_native_iex_admin_messages_symbol_get(symbol, date, opts = {})
      data, _status_code, _headers = v1_native_iex_admin_messages_symbol_get_with_http_info(symbol, date, opts)
      data
    end

    # Get Admin Messages
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<AdminAdminMessageModel>, Integer, Hash)>] Array<AdminAdminMessageModel> data, response status code and response headers
    def v1_native_iex_admin_messages_symbol_get_with_http_info(symbol, date, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: NativeIEXApi.v1_native_iex_admin_messages_symbol_get ...'
      end
      # verify the required parameter 'symbol' is set
      if @api_client.config.client_side_validation && symbol.nil?
        fail ArgumentError, "Missing the required parameter 'symbol' when calling NativeIEXApi.v1_native_iex_admin_messages_symbol_get"
      end
      # verify the required parameter 'date' is set
      if @api_client.config.client_side_validation && date.nil?
        fail ArgumentError, "Missing the required parameter 'date' when calling NativeIEXApi.v1_native_iex_admin_messages_symbol_get"
      end
      # resource path
      local_var_path = '/v1/native/iex/admin/messages/{symbol}'.sub('{' + 'symbol' + '}', CGI.escape(symbol.to_s))

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'date'] = date

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

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<AdminAdminMessageModel>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"NativeIEXApi.v1_native_iex_admin_messages_symbol_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: NativeIEXApi#v1_native_iex_admin_messages_symbol_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get System Events
    # @param date [Time] Date in format YYYY-MM-DD
    # @param [Hash] opts the optional parameters
    # @return [Array<AdminSystemEventModel>]
    def v1_native_iex_admin_system_event_get(date, opts = {})
      data, _status_code, _headers = v1_native_iex_admin_system_event_get_with_http_info(date, opts)
      data
    end

    # Get System Events
    # @param date [Time] Date in format YYYY-MM-DD
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<AdminSystemEventModel>, Integer, Hash)>] Array<AdminSystemEventModel> data, response status code and response headers
    def v1_native_iex_admin_system_event_get_with_http_info(date, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: NativeIEXApi.v1_native_iex_admin_system_event_get ...'
      end
      # verify the required parameter 'date' is set
      if @api_client.config.client_side_validation && date.nil?
        fail ArgumentError, "Missing the required parameter 'date' when calling NativeIEXApi.v1_native_iex_admin_system_event_get"
      end
      # resource path
      local_var_path = '/v1/native/iex/admin/system-event'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'date'] = date

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

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<AdminSystemEventModel>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"NativeIEXApi.v1_native_iex_admin_system_event_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: NativeIEXApi#v1_native_iex_admin_system_event_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get Level-1 Quotes
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<Level1QuoteUpdateModel>]
    def v1_native_iex_level1_quote_symbol_get(symbol, date, opts = {})
      data, _status_code, _headers = v1_native_iex_level1_quote_symbol_get_with_http_info(symbol, date, opts)
      data
    end

    # Get Level-1 Quotes
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<Level1QuoteUpdateModel>, Integer, Hash)>] Array<Level1QuoteUpdateModel> data, response status code and response headers
    def v1_native_iex_level1_quote_symbol_get_with_http_info(symbol, date, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: NativeIEXApi.v1_native_iex_level1_quote_symbol_get ...'
      end
      # verify the required parameter 'symbol' is set
      if @api_client.config.client_side_validation && symbol.nil?
        fail ArgumentError, "Missing the required parameter 'symbol' when calling NativeIEXApi.v1_native_iex_level1_quote_symbol_get"
      end
      # verify the required parameter 'date' is set
      if @api_client.config.client_side_validation && date.nil?
        fail ArgumentError, "Missing the required parameter 'date' when calling NativeIEXApi.v1_native_iex_level1_quote_symbol_get"
      end
      # resource path
      local_var_path = '/v1/native/iex/level1-quote/{symbol}'.sub('{' + 'symbol' + '}', CGI.escape(symbol.to_s))

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'date'] = date

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

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<Level1QuoteUpdateModel>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"NativeIEXApi.v1_native_iex_level1_quote_symbol_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: NativeIEXApi#v1_native_iex_level1_quote_symbol_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get Level-2 Price Level Book
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<Level2PriceLevelUpdateModel>]
    def v1_native_iex_level2_price_level_update_symbol_get(symbol, date, opts = {})
      data, _status_code, _headers = v1_native_iex_level2_price_level_update_symbol_get_with_http_info(symbol, date, opts)
      data
    end

    # Get Level-2 Price Level Book
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<Level2PriceLevelUpdateModel>, Integer, Hash)>] Array<Level2PriceLevelUpdateModel> data, response status code and response headers
    def v1_native_iex_level2_price_level_update_symbol_get_with_http_info(symbol, date, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: NativeIEXApi.v1_native_iex_level2_price_level_update_symbol_get ...'
      end
      # verify the required parameter 'symbol' is set
      if @api_client.config.client_side_validation && symbol.nil?
        fail ArgumentError, "Missing the required parameter 'symbol' when calling NativeIEXApi.v1_native_iex_level2_price_level_update_symbol_get"
      end
      # verify the required parameter 'date' is set
      if @api_client.config.client_side_validation && date.nil?
        fail ArgumentError, "Missing the required parameter 'date' when calling NativeIEXApi.v1_native_iex_level2_price_level_update_symbol_get"
      end
      # resource path
      local_var_path = '/v1/native/iex/level2-price-level-update/{symbol}'.sub('{' + 'symbol' + '}', CGI.escape(symbol.to_s))

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'date'] = date

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

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<Level2PriceLevelUpdateModel>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"NativeIEXApi.v1_native_iex_level2_price_level_update_symbol_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: NativeIEXApi#v1_native_iex_level2_price_level_update_symbol_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get Level-3 Order Book
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<Level3OrderBookModel>]
    def v1_native_iex_level3_order_book_symbol_get(symbol, date, opts = {})
      data, _status_code, _headers = v1_native_iex_level3_order_book_symbol_get_with_http_info(symbol, date, opts)
      data
    end

    # Get Level-3 Order Book
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<Level3OrderBookModel>, Integer, Hash)>] Array<Level3OrderBookModel> data, response status code and response headers
    def v1_native_iex_level3_order_book_symbol_get_with_http_info(symbol, date, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: NativeIEXApi.v1_native_iex_level3_order_book_symbol_get ...'
      end
      # verify the required parameter 'symbol' is set
      if @api_client.config.client_side_validation && symbol.nil?
        fail ArgumentError, "Missing the required parameter 'symbol' when calling NativeIEXApi.v1_native_iex_level3_order_book_symbol_get"
      end
      # verify the required parameter 'date' is set
      if @api_client.config.client_side_validation && date.nil?
        fail ArgumentError, "Missing the required parameter 'date' when calling NativeIEXApi.v1_native_iex_level3_order_book_symbol_get"
      end
      # resource path
      local_var_path = '/v1/native/iex/level3-order-book/{symbol}'.sub('{' + 'symbol' + '}', CGI.escape(symbol.to_s))

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'date'] = date

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

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<Level3OrderBookModel>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"NativeIEXApi.v1_native_iex_level3_order_book_symbol_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: NativeIEXApi#v1_native_iex_level3_order_book_symbol_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get Trades
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<TradeTradeModel>]
    def v1_native_iex_trade_symbol_get(symbol, date, opts = {})
      data, _status_code, _headers = v1_native_iex_trade_symbol_get_with_http_info(symbol, date, opts)
      data
    end

    # Get Trades
    # @param symbol [String] The symbol identifier
    # @param date [Time] Optional date in format YYYY-MM-DD (defaults to latest available data)
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<TradeTradeModel>, Integer, Hash)>] Array<TradeTradeModel> data, response status code and response headers
    def v1_native_iex_trade_symbol_get_with_http_info(symbol, date, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: NativeIEXApi.v1_native_iex_trade_symbol_get ...'
      end
      # verify the required parameter 'symbol' is set
      if @api_client.config.client_side_validation && symbol.nil?
        fail ArgumentError, "Missing the required parameter 'symbol' when calling NativeIEXApi.v1_native_iex_trade_symbol_get"
      end
      # verify the required parameter 'date' is set
      if @api_client.config.client_side_validation && date.nil?
        fail ArgumentError, "Missing the required parameter 'date' when calling NativeIEXApi.v1_native_iex_trade_symbol_get"
      end
      # resource path
      local_var_path = '/v1/native/iex/trade/{symbol}'.sub('{' + 'symbol' + '}', CGI.escape(symbol.to_s))

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'date'] = date

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

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<TradeTradeModel>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"NativeIEXApi.v1_native_iex_trade_symbol_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: NativeIEXApi#v1_native_iex_trade_symbol_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
