Interface V2ServiceAsync
-
- All Implemented Interfaces:
public interface V2ServiceAsync
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceV2ServiceAsync.WithRawResponseA view of V2ServiceAsync that provides access to raw HTTP responses for each method.
-
Method Summary
Modifier and Type Method Description abstract V2ServiceAsync.WithRawResponsewithRawResponse()Returns a view of this service that provides access to raw HTTP responses for each method. abstract BacktestServiceAsyncbacktests()CompletableFuture<V2CreateResponse>create(AuthRuleV2CreateParams params)Creates a new V2 authorization rule in draft mode abstract CompletableFuture<V2CreateResponse>create(AuthRuleV2CreateParams params, RequestOptions requestOptions)CompletableFuture<V2RetrieveResponse>retrieve(AuthRuleV2RetrieveParams params)Fetches a V2 authorization rule by its token abstract CompletableFuture<V2RetrieveResponse>retrieve(AuthRuleV2RetrieveParams params, RequestOptions requestOptions)CompletableFuture<V2UpdateResponse>update(AuthRuleV2UpdateParams params)Updates a V2 authorization rule's propertiesIf account_tokens,card_tokens,program_level, orexcluded_card_tokensis provided, this will replace existing associations with the provided list of entities.abstract CompletableFuture<V2UpdateResponse>update(AuthRuleV2UpdateParams params, RequestOptions requestOptions)CompletableFuture<AuthRuleV2ListPageAsync>list()Lists V2 authorization rules abstract CompletableFuture<AuthRuleV2ListPageAsync>list(AuthRuleV2ListParams params, RequestOptions requestOptions)CompletableFuture<AuthRuleV2ListPageAsync>list(AuthRuleV2ListParams params)CompletableFuture<AuthRuleV2ListPageAsync>list(RequestOptions requestOptions)CompletableFuture<Void>delete(AuthRuleV2DeleteParams params)Deletes a V2 authorization rule abstract CompletableFuture<Void>delete(AuthRuleV2DeleteParams params, RequestOptions requestOptions)CompletableFuture<V2ApplyResponse>apply(AuthRuleV2ApplyParams params)Associates a V2 authorization rule with a card program, the provided account(s) or card(s). abstract CompletableFuture<V2ApplyResponse>apply(AuthRuleV2ApplyParams params, RequestOptions requestOptions)CompletableFuture<V2DraftResponse>draft(AuthRuleV2DraftParams params)Creates a new draft version of a rule that will be ran in shadow mode. abstract CompletableFuture<V2DraftResponse>draft(AuthRuleV2DraftParams params, RequestOptions requestOptions)CompletableFuture<V2PromoteResponse>promote(AuthRuleV2PromoteParams params)Promotes the draft version of an authorization rule to the currently active version such that it is enforced in the authorization stream. abstract CompletableFuture<V2PromoteResponse>promote(AuthRuleV2PromoteParams params, RequestOptions requestOptions)CompletableFuture<V2ReportResponse>report(AuthRuleV2ReportParams params)Requests a performance report of an authorization rule to be asynchronously generated. abstract CompletableFuture<V2ReportResponse>report(AuthRuleV2ReportParams params, RequestOptions requestOptions)-
-
Method Detail
-
withRawResponse
abstract V2ServiceAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
backtests
abstract BacktestServiceAsync backtests()
-
create
CompletableFuture<V2CreateResponse> create(AuthRuleV2CreateParams params)
Creates a new V2 authorization rule in draft mode
-
create
abstract CompletableFuture<V2CreateResponse> create(AuthRuleV2CreateParams params, RequestOptions requestOptions)
-
retrieve
CompletableFuture<V2RetrieveResponse> retrieve(AuthRuleV2RetrieveParams params)
Fetches a V2 authorization rule by its token
-
retrieve
abstract CompletableFuture<V2RetrieveResponse> retrieve(AuthRuleV2RetrieveParams params, RequestOptions requestOptions)
-
update
CompletableFuture<V2UpdateResponse> update(AuthRuleV2UpdateParams params)
Updates a V2 authorization rule's properties
If
account_tokens,card_tokens,program_level, orexcluded_card_tokensis provided, this will replace existing associations with the provided list of entities.
-
update
abstract CompletableFuture<V2UpdateResponse> update(AuthRuleV2UpdateParams params, RequestOptions requestOptions)
-
list
CompletableFuture<AuthRuleV2ListPageAsync> list()
Lists V2 authorization rules
-
list
abstract CompletableFuture<AuthRuleV2ListPageAsync> list(AuthRuleV2ListParams params, RequestOptions requestOptions)
-
list
CompletableFuture<AuthRuleV2ListPageAsync> list(AuthRuleV2ListParams params)
-
list
CompletableFuture<AuthRuleV2ListPageAsync> list(RequestOptions requestOptions)
-
delete
CompletableFuture<Void> delete(AuthRuleV2DeleteParams params)
Deletes a V2 authorization rule
-
delete
abstract CompletableFuture<Void> delete(AuthRuleV2DeleteParams params, RequestOptions requestOptions)
-
apply
CompletableFuture<V2ApplyResponse> apply(AuthRuleV2ApplyParams params)
Associates a V2 authorization rule with a card program, the provided account(s) or card(s).
Prefer using the
PATCHmethod for this operation.
-
apply
abstract CompletableFuture<V2ApplyResponse> apply(AuthRuleV2ApplyParams params, RequestOptions requestOptions)
-
draft
CompletableFuture<V2DraftResponse> draft(AuthRuleV2DraftParams params)
Creates a new draft version of a rule that will be ran in shadow mode.
This can also be utilized to reset the draft parameters, causing a draft version to no longer be ran in shadow mode.
-
draft
abstract CompletableFuture<V2DraftResponse> draft(AuthRuleV2DraftParams params, RequestOptions requestOptions)
-
promote
CompletableFuture<V2PromoteResponse> promote(AuthRuleV2PromoteParams params)
Promotes the draft version of an authorization rule to the currently active version such that it is enforced in the authorization stream.
-
promote
abstract CompletableFuture<V2PromoteResponse> promote(AuthRuleV2PromoteParams params, RequestOptions requestOptions)
-
report
CompletableFuture<V2ReportResponse> report(AuthRuleV2ReportParams params)
Requests a performance report of an authorization rule to be asynchronously generated. Reports can only be run on rules in draft or active mode and will included approved and declined statistics as well as examples. The generated report will be delivered asynchronously through a webhook with
event_type=auth_rules.performance_report.created. See the docs on setting up webhook subscriptions.Reports are generated based on data collected by Lithic's authorization processing system in the trailing week. The performance of the auth rule will be assessed on the configuration of the auth rule at the time the report is requested. This implies that if a performance report is requested, right after updating an auth rule, depending on the number of authorizations processed for a card program, it may be the case that no data is available for the report. Therefore Lithic recommends to decouple making updates to an Auth Rule, and requesting performance reports.
To make this concrete, consider the following example:
At time
t, a new Auth Rule is created, and applies to all authorizations on a card program. The Auth Rule has not yet been promoted, causing the draft version of the rule to be applied in shadow mode.At time
t + 1 houra performance report is requested for the Auth Rule. This performance report will only contain data for the Auth Rule being executed in the window betweentandt + 1 hour. This is because Lithic's transaction processing system will only start capturing data for the Auth Rule at the time it is created.At time
t + 2 hoursthe draft version of the Auth Rule is promoted to the active version of the Auth Rule by calling the/v2/auth_rules/{auth_rule_token}/promoteendpoint. If a performance report is requested at this moment it will still only contain data for this version of the rule, but the window of available data will now span fromttot + 2 hours.At time
t + 3 hoursa new version of the rule is drafted by calling the/v2/auth_rules/{auth_rule_token}/draftendpoint. If a performance report is requested right at this moment, it will only contain data for authorizations to which both the active version and the draft version is applied. Lithic does this to ensure that performance reports represent a fair comparison between rules. Because there may be no authorizations in this window, and because there may be some lag before data is available in a performance report, the requested performance report could contain no to little data.At time
t + 4 hoursanother performance report is requested: this time the performance report will contain data from the window betweent + 3 hoursandt + 4 hours, for any authorizations to which both the current version of the authorization rule (in enforcing mode) and the draft version of the authorization rule (in shadow mode) applied.
Note that generating a report may take up to 15 minutes and that delivery is not guaranteed. Customers are required to have created an event subscription to receive the webhook. Additionally, there is a delay of approximately 15 minutes between when Lithic's transaction processing systems have processed the transaction, and when a transaction will be included in the report.
-
report
abstract CompletableFuture<V2ReportResponse> report(AuthRuleV2ReportParams params, RequestOptions requestOptions)
-
-
-
-