Class SignalsResponse
-
- All Implemented Interfaces:
public final class SignalsResponseBehavioral feature state for a card or account derived from its transaction history.
Derived statistical features (averages, standard deviations, z-scores) are computed using Welford's online algorithm over approved transactions. Average fields are null when fewer than 5 approved transactions have been recorded. Standard deviation fields are null when fewer than 30 approved transactions have been recorded.
3DS fields (
three_ds_success_rate,three_ds_success_count,three_ds_total_count) are card-scoped and will be null for account responses.Raw fields (
seen_countries,seen_mccs,approved_txn_amount_m2, etc.) are included so clients can compute their own transaction-specific derivations, such as checking whether a new transaction's country is inseen_countriesto determineis_new_country, or computing a z-score using the raw mean and M2 values.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classSignalsResponse.BuilderA builder for SignalsResponse.
-
Method Summary
Modifier and Type Method Description final Optional<Double>approvedTxnAmountM2()The Welford M2 accumulator for lifetime approved transaction amounts. final Optional<Double>approvedTxnAmountM2_30d()The Welford M2 accumulator for approved transaction amounts over the last 30 days. final Optional<Double>approvedTxnAmountM2_7d()The Welford M2 accumulator for approved transaction amounts over the last 7 days. final Optional<Double>approvedTxnAmountM2_90d()The Welford M2 accumulator for approved transaction amounts over the last 90 days. final Optional<Long>approvedTxnCount()The total number of approved transactions over the entity's lifetime. final Optional<Long>approvedTxnCount30d()The number of approved transactions in the last 30 days. final Optional<Long>approvedTxnCount7d()The number of approved transactions in the last 7 days. final Optional<Long>approvedTxnCount90d()The number of approved transactions in the last 90 days. final Optional<Double>avgTransactionAmount()The average approved transaction amount over the entity's lifetime, in cents. final Optional<Double>avgTransactionAmount30d()The average approved transaction amount over the last 30 days, in cents. final Optional<Double>avgTransactionAmount7d()The average approved transaction amount over the last 7 days, in cents. final Optional<Double>avgTransactionAmount90d()The average approved transaction amount over the last 90 days, in cents. final Optional<Long>distinctCountryCount()The number of distinct merchant countries seen in the entity's transaction history. final Optional<Long>distinctMccCount()The number of distinct MCCs seen in the entity's transaction history. final Optional<OffsetDateTime>firstTxnAt()The timestamp of the first approved transaction for the entity, in ISO 8601 format. final Optional<Boolean>isFirstTransaction()Whether the entity has no prior transaction history. final Optional<String>lastCpCountry()The merchant country of the last card-present transaction. final Optional<String>lastCpPostalCode()The merchant postal code of the last card-present transaction. final Optional<OffsetDateTime>lastCpTimestamp()The timestamp of the last card-present transaction, in ISO 8601 format. final Optional<OffsetDateTime>lastTxnApprovedAt()The timestamp of the most recent approved transaction for the entity, in ISO 8601 format. final Optional<List<String>>seenCountries()The set of merchant countries seen in the entity's transaction history. final Optional<List<String>>seenMccs()The set of MCCs seen in the entity's transaction history. final Optional<List<String>>seenMerchants()The set of card acceptor IDs seen in the card's approved transaction history, capped at the 1000 most recently seen. final Optional<Double>stdevTransactionAmount()The standard deviation of approved transaction amounts over the entity's lifetime, in cents. final Optional<Double>stdevTransactionAmount30d()The standard deviation of approved transaction amounts over the last 30 days, in cents. final Optional<Double>stdevTransactionAmount7d()The standard deviation of approved transaction amounts over the last 7 days, in cents. final Optional<Double>stdevTransactionAmount90d()The standard deviation of approved transaction amounts over the last 90 days, in cents. final Optional<Long>threeDSSuccessCount()The number of successful 3DS authentications for the card. final Optional<Double>threeDSSuccessRate()The 3DS authentication success rate for the card, as a percentage from 0.0 to 100.0. final Optional<Long>threeDSTotalCount()The total number of 3DS authentication attempts for the card. final Optional<Double>timeSinceLastTransactionDays()The number of days since the last approved transaction on the entity. final JsonField<Double>_approvedTxnAmountM2()Returns the raw JSON value of approvedTxnAmountM2. final JsonField<Double>_approvedTxnAmountM2_30d()Returns the raw JSON value of approvedTxnAmountM2_30d. final JsonField<Double>_approvedTxnAmountM2_7d()Returns the raw JSON value of approvedTxnAmountM2_7d. final JsonField<Double>_approvedTxnAmountM2_90d()Returns the raw JSON value of approvedTxnAmountM2_90d. final JsonField<Long>_approvedTxnCount()Returns the raw JSON value of approvedTxnCount. final JsonField<Long>_approvedTxnCount30d()Returns the raw JSON value of approvedTxnCount30d. final JsonField<Long>_approvedTxnCount7d()Returns the raw JSON value of approvedTxnCount7d. final JsonField<Long>_approvedTxnCount90d()Returns the raw JSON value of approvedTxnCount90d. final JsonField<Double>_avgTransactionAmount()Returns the raw JSON value of avgTransactionAmount. final JsonField<Double>_avgTransactionAmount30d()Returns the raw JSON value of avgTransactionAmount30d. final JsonField<Double>_avgTransactionAmount7d()Returns the raw JSON value of avgTransactionAmount7d. final JsonField<Double>_avgTransactionAmount90d()Returns the raw JSON value of avgTransactionAmount90d. final JsonField<Long>_distinctCountryCount()Returns the raw JSON value of distinctCountryCount. final JsonField<Long>_distinctMccCount()Returns the raw JSON value of distinctMccCount. final JsonField<OffsetDateTime>_firstTxnAt()Returns the raw JSON value of firstTxnAt. final JsonField<Boolean>_isFirstTransaction()Returns the raw JSON value of isFirstTransaction. final JsonField<String>_lastCpCountry()Returns the raw JSON value of lastCpCountry. final JsonField<String>_lastCpPostalCode()Returns the raw JSON value of lastCpPostalCode. final JsonField<OffsetDateTime>_lastCpTimestamp()Returns the raw JSON value of lastCpTimestamp. final JsonField<OffsetDateTime>_lastTxnApprovedAt()Returns the raw JSON value of lastTxnApprovedAt. final JsonField<List<String>>_seenCountries()Returns the raw JSON value of seenCountries. final JsonField<List<String>>_seenMccs()Returns the raw JSON value of seenMccs. final JsonField<List<String>>_seenMerchants()Returns the raw JSON value of seenMerchants. final JsonField<Double>_stdevTransactionAmount()Returns the raw JSON value of stdevTransactionAmount. final JsonField<Double>_stdevTransactionAmount30d()Returns the raw JSON value of stdevTransactionAmount30d. final JsonField<Double>_stdevTransactionAmount7d()Returns the raw JSON value of stdevTransactionAmount7d. final JsonField<Double>_stdevTransactionAmount90d()Returns the raw JSON value of stdevTransactionAmount90d. final JsonField<Long>_threeDSSuccessCount()Returns the raw JSON value of threeDSSuccessCount. final JsonField<Double>_threeDSSuccessRate()Returns the raw JSON value of threeDSSuccessRate. final JsonField<Long>_threeDSTotalCount()Returns the raw JSON value of threeDSTotalCount. final JsonField<Double>_timeSinceLastTransactionDays()Returns the raw JSON value of timeSinceLastTransactionDays. final Map<String, JsonValue>_additionalProperties()final SignalsResponse.BuildertoBuilder()final SignalsResponsevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static SignalsResponse.Builderbuilder()Returns a mutable builder for constructing an instance of SignalsResponse. -
-
Method Detail
-
approvedTxnAmountM2
final Optional<Double> approvedTxnAmountM2()
The Welford M2 accumulator for lifetime approved transaction amounts. Used together with
avg_transaction_amountandapproved_txn_countto compute the z-score of a new transaction amount (variance = M2 / (count - 1)).
-
approvedTxnAmountM2_30d
final Optional<Double> approvedTxnAmountM2_30d()
The Welford M2 accumulator for approved transaction amounts over the last 30 days.
-
approvedTxnAmountM2_7d
final Optional<Double> approvedTxnAmountM2_7d()
The Welford M2 accumulator for approved transaction amounts over the last 7 days.
-
approvedTxnAmountM2_90d
final Optional<Double> approvedTxnAmountM2_90d()
The Welford M2 accumulator for approved transaction amounts over the last 90 days.
-
approvedTxnCount
final Optional<Long> approvedTxnCount()
The total number of approved transactions over the entity's lifetime.
-
approvedTxnCount30d
final Optional<Long> approvedTxnCount30d()
The number of approved transactions in the last 30 days.
-
approvedTxnCount7d
final Optional<Long> approvedTxnCount7d()
The number of approved transactions in the last 7 days.
-
approvedTxnCount90d
final Optional<Long> approvedTxnCount90d()
The number of approved transactions in the last 90 days.
-
avgTransactionAmount
final Optional<Double> avgTransactionAmount()
The average approved transaction amount over the entity's lifetime, in cents. Null if fewer than 5 approved transactions have been recorded.
-
avgTransactionAmount30d
final Optional<Double> avgTransactionAmount30d()
The average approved transaction amount over the last 30 days, in cents. Null if fewer than 5 approved transactions in window.
-
avgTransactionAmount7d
final Optional<Double> avgTransactionAmount7d()
The average approved transaction amount over the last 7 days, in cents. Null if fewer than 5 approved transactions in window.
-
avgTransactionAmount90d
final Optional<Double> avgTransactionAmount90d()
The average approved transaction amount over the last 90 days, in cents. Null if fewer than 5 approved transactions in window.
-
distinctCountryCount
final Optional<Long> distinctCountryCount()
The number of distinct merchant countries seen in the entity's transaction history.
-
distinctMccCount
final Optional<Long> distinctMccCount()
The number of distinct MCCs seen in the entity's transaction history.
-
firstTxnAt
final Optional<OffsetDateTime> firstTxnAt()
The timestamp of the first approved transaction for the entity, in ISO 8601 format.
-
isFirstTransaction
final Optional<Boolean> isFirstTransaction()
Whether the entity has no prior transaction history. Returns true if no history is found. Null if transaction history exists but a first transaction timestamp is unavailable.
-
lastCpCountry
final Optional<String> lastCpCountry()
The merchant country of the last card-present transaction.
-
lastCpPostalCode
final Optional<String> lastCpPostalCode()
The merchant postal code of the last card-present transaction.
-
lastCpTimestamp
final Optional<OffsetDateTime> lastCpTimestamp()
The timestamp of the last card-present transaction, in ISO 8601 format.
-
lastTxnApprovedAt
final Optional<OffsetDateTime> lastTxnApprovedAt()
The timestamp of the most recent approved transaction for the entity, in ISO 8601 format.
-
seenCountries
final Optional<List<String>> seenCountries()
The set of merchant countries seen in the entity's transaction history. Clients can use this to determine whether a new transaction's country is novel (i.e. compute
is_new_country).
-
seenMccs
final Optional<List<String>> seenMccs()
The set of MCCs seen in the entity's transaction history. Clients can use this to determine whether a new transaction's MCC is novel (i.e. compute
is_new_mcc).
-
seenMerchants
final Optional<List<String>> seenMerchants()
The set of card acceptor IDs seen in the card's approved transaction history, capped at the 1000 most recently seen. Null for account responses. Clients can use this to determine whether a new transaction's merchant is novel (i.e. compute
is_new_merchant).
-
stdevTransactionAmount
final Optional<Double> stdevTransactionAmount()
The standard deviation of approved transaction amounts over the entity's lifetime, in cents. Null if fewer than 30 approved transactions have been recorded.
-
stdevTransactionAmount30d
final Optional<Double> stdevTransactionAmount30d()
The standard deviation of approved transaction amounts over the last 30 days, in cents. Null if fewer than 30 approved transactions in window.
-
stdevTransactionAmount7d
final Optional<Double> stdevTransactionAmount7d()
The standard deviation of approved transaction amounts over the last 7 days, in cents. Null if fewer than 30 approved transactions in window.
-
stdevTransactionAmount90d
final Optional<Double> stdevTransactionAmount90d()
The standard deviation of approved transaction amounts over the last 90 days, in cents. Null if fewer than 30 approved transactions in window.
-
threeDSSuccessCount
final Optional<Long> threeDSSuccessCount()
The number of successful 3DS authentications for the card. Null for account responses.
-
threeDSSuccessRate
final Optional<Double> threeDSSuccessRate()
The 3DS authentication success rate for the card, as a percentage from 0.0 to 100.0. Null for account responses.
-
threeDSTotalCount
final Optional<Long> threeDSTotalCount()
The total number of 3DS authentication attempts for the card. Null for account responses.
-
timeSinceLastTransactionDays
final Optional<Double> timeSinceLastTransactionDays()
The number of days since the last approved transaction on the entity.
-
_approvedTxnAmountM2
final JsonField<Double> _approvedTxnAmountM2()
Returns the raw JSON value of approvedTxnAmountM2.
Unlike approvedTxnAmountM2, this method doesn't throw if the JSON field has an unexpected type.
-
_approvedTxnAmountM2_30d
final JsonField<Double> _approvedTxnAmountM2_30d()
Returns the raw JSON value of approvedTxnAmountM2_30d.
Unlike approvedTxnAmountM2_30d, this method doesn't throw if the JSON field has an unexpected type.
-
_approvedTxnAmountM2_7d
final JsonField<Double> _approvedTxnAmountM2_7d()
Returns the raw JSON value of approvedTxnAmountM2_7d.
Unlike approvedTxnAmountM2_7d, this method doesn't throw if the JSON field has an unexpected type.
-
_approvedTxnAmountM2_90d
final JsonField<Double> _approvedTxnAmountM2_90d()
Returns the raw JSON value of approvedTxnAmountM2_90d.
Unlike approvedTxnAmountM2_90d, this method doesn't throw if the JSON field has an unexpected type.
-
_approvedTxnCount
final JsonField<Long> _approvedTxnCount()
Returns the raw JSON value of approvedTxnCount.
Unlike approvedTxnCount, this method doesn't throw if the JSON field has an unexpected type.
-
_approvedTxnCount30d
final JsonField<Long> _approvedTxnCount30d()
Returns the raw JSON value of approvedTxnCount30d.
Unlike approvedTxnCount30d, this method doesn't throw if the JSON field has an unexpected type.
-
_approvedTxnCount7d
final JsonField<Long> _approvedTxnCount7d()
Returns the raw JSON value of approvedTxnCount7d.
Unlike approvedTxnCount7d, this method doesn't throw if the JSON field has an unexpected type.
-
_approvedTxnCount90d
final JsonField<Long> _approvedTxnCount90d()
Returns the raw JSON value of approvedTxnCount90d.
Unlike approvedTxnCount90d, this method doesn't throw if the JSON field has an unexpected type.
-
_avgTransactionAmount
final JsonField<Double> _avgTransactionAmount()
Returns the raw JSON value of avgTransactionAmount.
Unlike avgTransactionAmount, this method doesn't throw if the JSON field has an unexpected type.
-
_avgTransactionAmount30d
final JsonField<Double> _avgTransactionAmount30d()
Returns the raw JSON value of avgTransactionAmount30d.
Unlike avgTransactionAmount30d, this method doesn't throw if the JSON field has an unexpected type.
-
_avgTransactionAmount7d
final JsonField<Double> _avgTransactionAmount7d()
Returns the raw JSON value of avgTransactionAmount7d.
Unlike avgTransactionAmount7d, this method doesn't throw if the JSON field has an unexpected type.
-
_avgTransactionAmount90d
final JsonField<Double> _avgTransactionAmount90d()
Returns the raw JSON value of avgTransactionAmount90d.
Unlike avgTransactionAmount90d, this method doesn't throw if the JSON field has an unexpected type.
-
_distinctCountryCount
final JsonField<Long> _distinctCountryCount()
Returns the raw JSON value of distinctCountryCount.
Unlike distinctCountryCount, this method doesn't throw if the JSON field has an unexpected type.
-
_distinctMccCount
final JsonField<Long> _distinctMccCount()
Returns the raw JSON value of distinctMccCount.
Unlike distinctMccCount, this method doesn't throw if the JSON field has an unexpected type.
-
_firstTxnAt
final JsonField<OffsetDateTime> _firstTxnAt()
Returns the raw JSON value of firstTxnAt.
Unlike firstTxnAt, this method doesn't throw if the JSON field has an unexpected type.
-
_isFirstTransaction
final JsonField<Boolean> _isFirstTransaction()
Returns the raw JSON value of isFirstTransaction.
Unlike isFirstTransaction, this method doesn't throw if the JSON field has an unexpected type.
-
_lastCpCountry
final JsonField<String> _lastCpCountry()
Returns the raw JSON value of lastCpCountry.
Unlike lastCpCountry, this method doesn't throw if the JSON field has an unexpected type.
-
_lastCpPostalCode
final JsonField<String> _lastCpPostalCode()
Returns the raw JSON value of lastCpPostalCode.
Unlike lastCpPostalCode, this method doesn't throw if the JSON field has an unexpected type.
-
_lastCpTimestamp
final JsonField<OffsetDateTime> _lastCpTimestamp()
Returns the raw JSON value of lastCpTimestamp.
Unlike lastCpTimestamp, this method doesn't throw if the JSON field has an unexpected type.
-
_lastTxnApprovedAt
final JsonField<OffsetDateTime> _lastTxnApprovedAt()
Returns the raw JSON value of lastTxnApprovedAt.
Unlike lastTxnApprovedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_seenCountries
final JsonField<List<String>> _seenCountries()
Returns the raw JSON value of seenCountries.
Unlike seenCountries, this method doesn't throw if the JSON field has an unexpected type.
-
_seenMccs
final JsonField<List<String>> _seenMccs()
Returns the raw JSON value of seenMccs.
Unlike seenMccs, this method doesn't throw if the JSON field has an unexpected type.
-
_seenMerchants
final JsonField<List<String>> _seenMerchants()
Returns the raw JSON value of seenMerchants.
Unlike seenMerchants, this method doesn't throw if the JSON field has an unexpected type.
-
_stdevTransactionAmount
final JsonField<Double> _stdevTransactionAmount()
Returns the raw JSON value of stdevTransactionAmount.
Unlike stdevTransactionAmount, this method doesn't throw if the JSON field has an unexpected type.
-
_stdevTransactionAmount30d
final JsonField<Double> _stdevTransactionAmount30d()
Returns the raw JSON value of stdevTransactionAmount30d.
Unlike stdevTransactionAmount30d, this method doesn't throw if the JSON field has an unexpected type.
-
_stdevTransactionAmount7d
final JsonField<Double> _stdevTransactionAmount7d()
Returns the raw JSON value of stdevTransactionAmount7d.
Unlike stdevTransactionAmount7d, this method doesn't throw if the JSON field has an unexpected type.
-
_stdevTransactionAmount90d
final JsonField<Double> _stdevTransactionAmount90d()
Returns the raw JSON value of stdevTransactionAmount90d.
Unlike stdevTransactionAmount90d, this method doesn't throw if the JSON field has an unexpected type.
-
_threeDSSuccessCount
final JsonField<Long> _threeDSSuccessCount()
Returns the raw JSON value of threeDSSuccessCount.
Unlike threeDSSuccessCount, this method doesn't throw if the JSON field has an unexpected type.
-
_threeDSSuccessRate
final JsonField<Double> _threeDSSuccessRate()
Returns the raw JSON value of threeDSSuccessRate.
Unlike threeDSSuccessRate, this method doesn't throw if the JSON field has an unexpected type.
-
_threeDSTotalCount
final JsonField<Long> _threeDSTotalCount()
Returns the raw JSON value of threeDSTotalCount.
Unlike threeDSTotalCount, this method doesn't throw if the JSON field has an unexpected type.
-
_timeSinceLastTransactionDays
final JsonField<Double> _timeSinceLastTransactionDays()
Returns the raw JSON value of timeSinceLastTransactionDays.
Unlike timeSinceLastTransactionDays, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final SignalsResponse.Builder toBuilder()
-
validate
final SignalsResponse validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static SignalsResponse.Builder builder()
Returns a mutable builder for constructing an instance of SignalsResponse.
The following fields are required:
.approvedTxnAmountM2() .approvedTxnAmountM2_30d() .approvedTxnAmountM2_7d() .approvedTxnAmountM2_90d() .approvedTxnCount() .approvedTxnCount30d() .approvedTxnCount7d() .approvedTxnCount90d() .avgTransactionAmount() .avgTransactionAmount30d() .avgTransactionAmount7d() .avgTransactionAmount90d() .distinctCountryCount() .distinctMccCount() .firstTxnAt() .isFirstTransaction() .lastCpCountry() .lastCpPostalCode() .lastCpTimestamp() .lastTxnApprovedAt() .seenCountries() .seenMccs() .seenMerchants() .stdevTransactionAmount() .stdevTransactionAmount30d() .stdevTransactionAmount7d() .stdevTransactionAmount90d() .threeDSSuccessCount() .threeDSSuccessRate() .threeDSTotalCount() .timeSinceLastTransactionDays()
-
-
-
-