RiskFeatures class

Feature vector extracted from a request for anomaly scoring. Exposed publicly so consumers can inspect why a score was assigned.

Constructors

RiskFeatures({required double amount, required int requestFrequency, required bool isNewDevice, required bool isIpAnomaly})
Creates a feature vector for anomaly scoring.
const

Properties

amount double
The transaction amount extracted from the request body, or 0.0 when no amount field is present.
final
hashCode int
The hash code for this object.
no setterinherited
isIpAnomaly bool
Whether this is the first time this IP address has been seen for the requesting user.
final
isNewDevice bool
Whether this is the first time this device has been seen for the requesting user.
final
requestFrequency int
How many requests this key (user/IP) has made within the current rate-limit window, as populated by RateLimitLayer via metadata.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this feature vector to a JSON-compatible map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited