Interface BacktestService
-
- All Implemented Interfaces:
public interface BacktestService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBacktestService.WithRawResponseA view of BacktestService that provides access to raw HTTP responses for each method.
-
Method Summary
-
-
Method Detail
-
withRawResponse
abstract BacktestService.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract BacktestService withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
create
BacktestCreateResponse create(String authRuleToken)
Initiates a request to asynchronously generate a backtest for an Auth rule. During backtesting, both the active version (if one exists) and the draft version of the Auth Rule are evaluated by replaying historical transaction data against the rule's conditions. This process allows customers to simulate and understand the effects of proposed rule changes before deployment. The generated backtest report provides detailed results showing whether the draft version of the Auth Rule would have approved or declined historical transactions which were processed during the backtest period. These reports help evaluate how changes to rule configurations might affect overall transaction approval rates.
The generated backtest report will be delivered asynchronously through a webhook with
event_type=auth_rules.backtest_report.created. See the docs on setting up webhook subscriptions. It is also possible to request backtest reports on-demand through the/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}endpoint.Lithic currently supports backtesting for
CONDITIONAL_BLOCK/CONDITIONAL_ACTIONrules. Backtesting forVELOCITY_LIMITrules is generally not supported. In specific cases (i.e. where Lithic has pre-calculated the requested velocity metrics for historical transactions), a backtest may be feasible. However, such cases are uncommon and customers should not anticipate support for velocity backtests under most configurations. If a historical transaction does not feature the required inputs to evaluate the rule, then it will not be included in the final backtest report.
-
create
BacktestCreateResponse create(String authRuleToken, AuthRuleV2BacktestCreateParams params, RequestOptions requestOptions)
-
create
BacktestCreateResponse create(String authRuleToken, AuthRuleV2BacktestCreateParams params)
-
create
abstract BacktestCreateResponse create(AuthRuleV2BacktestCreateParams params, RequestOptions requestOptions)
-
create
BacktestCreateResponse create(AuthRuleV2BacktestCreateParams params)
-
create
BacktestCreateResponse create(String authRuleToken, RequestOptions requestOptions)
-
retrieve
BacktestResults retrieve(String authRuleBacktestToken, AuthRuleV2BacktestRetrieveParams params)
Returns the backtest results of an Auth rule (if available).
Backtesting is an asynchronous process that requires time to complete. If a customer retrieves the backtest results using this endpoint before the report is fully generated, the response will return null for
results.current_versionandresults.draft_version. Customers are advised to wait for the backtest creation process to complete (as indicated by the webhook event auth_rules.backtest_report.created) before retrieving results from this endpoint.Backtesting is an asynchronous process, while the backtest is being processed, results will not be available which will cause
results.current_versionandresults.draft_versionobjects to containnull. The entries inresultswill also always represent the configuration of the rule at the time requests are made to this endpoint. For example, the results forcurrent_versionin the served backtest report will be consistent with which version of the rule is currently activated in the respective event stream, regardless of which version of the rule was active in the event stream at the time a backtest is requested.
-
retrieve
BacktestResults retrieve(String authRuleBacktestToken, AuthRuleV2BacktestRetrieveParams params, RequestOptions requestOptions)
-
retrieve
BacktestResults retrieve(AuthRuleV2BacktestRetrieveParams params)
-
retrieve
abstract BacktestResults retrieve(AuthRuleV2BacktestRetrieveParams params, RequestOptions requestOptions)
-
-
-
-