class Lithic::Resources::AuthRules::V2::Backtests

def create(auth_rule_token, params = {})

Other tags:
    See: Lithic::Models::AuthRules::V2::BacktestCreateParams -

Returns:
  • (Lithic::Models::AuthRules::V2::BacktestCreateResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • start (Time) -- The start time of the backtest.
  • end_ (Time) -- The end time of the backtest.
  • auth_rule_token (String) -- Globally unique identifier for the Auth Rule.

Overloads:
  • create(auth_rule_token, end_: nil, start: nil, request_options: {})
def create(auth_rule_token, params = {})
  parsed, options = Lithic::AuthRules::V2::BacktestCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["v2/auth_rules/%1$s/backtests", auth_rule_token],
    body: parsed,
    model: Lithic::Models::AuthRules::V2::BacktestCreateResponse,
    options: options
  )
end

def initialize(client:)

Parameters:
  • client (Lithic::Client) --

Other tags:
    Api: - private
def initialize(client:)
  @client = client
end

def retrieve(auth_rule_backtest_token, params)

Other tags:
    See: Lithic::Models::AuthRules::V2::BacktestRetrieveParams -

Returns:
  • (Lithic::AuthRules::V2::BacktestResults) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • auth_rule_token (String) -- Globally unique identifier for the Auth Rule.
  • auth_rule_backtest_token (String) -- Globally unique identifier for an Auth Rule backtest.

Overloads:
  • retrieve(auth_rule_backtest_token, auth_rule_token:, request_options: {})
def retrieve(auth_rule_backtest_token, params)
  parsed, options = Lithic::AuthRules::V2::BacktestRetrieveParams.dump_request(params)
  auth_rule_token =
    parsed.delete(:auth_rule_token) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["v2/auth_rules/%1$s/backtests/%2$s", auth_rule_token, auth_rule_backtest_token],
    model: Lithic::AuthRules::V2::BacktestResults,
    options: options
  )
end