Class: Lithic::Models::SignalsResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Lithic::Models::SignalsResponse
- Defined in:
- lib/lithic/models/signals_response.rb
Instance Attribute Summary collapse
-
#approved_txn_amount_m2 ⇒ Float?
The Welford M2 accumulator for lifetime approved transaction amounts.
-
#approved_txn_amount_m2_30d ⇒ Float?
The Welford M2 accumulator for approved transaction amounts over the last 30 days.
-
#approved_txn_amount_m2_7d ⇒ Float?
The Welford M2 accumulator for approved transaction amounts over the last 7 days.
-
#approved_txn_amount_m2_90d ⇒ Float?
The Welford M2 accumulator for approved transaction amounts over the last 90 days.
-
#approved_txn_count ⇒ Integer?
The total number of approved transactions over the entity’s lifetime.
-
#approved_txn_count_30d ⇒ Integer?
The number of approved transactions in the last 30 days.
-
#approved_txn_count_7d ⇒ Integer?
The number of approved transactions in the last 7 days.
-
#approved_txn_count_90d ⇒ Integer?
The number of approved transactions in the last 90 days.
-
#avg_transaction_amount ⇒ Float?
The average approved transaction amount over the entity’s lifetime, in cents.
-
#avg_transaction_amount_30d ⇒ Float?
The average approved transaction amount over the last 30 days, in cents.
-
#avg_transaction_amount_7d ⇒ Float?
The average approved transaction amount over the last 7 days, in cents.
-
#avg_transaction_amount_90d ⇒ Float?
The average approved transaction amount over the last 90 days, in cents.
-
#distinct_country_count ⇒ Integer?
The number of distinct merchant countries seen in the entity’s transaction history.
-
#distinct_mcc_count ⇒ Integer?
The number of distinct MCCs seen in the entity’s transaction history.
-
#first_txn_at ⇒ Time?
The timestamp of the first approved transaction for the entity, in ISO 8601 format.
-
#is_first_transaction ⇒ Boolean?
Whether the entity has no prior transaction history.
-
#last_cp_country ⇒ String?
The merchant country of the last card-present transaction.
-
#last_cp_postal_code ⇒ String?
The merchant postal code of the last card-present transaction.
-
#last_cp_timestamp ⇒ Time?
The timestamp of the last card-present transaction, in ISO 8601 format.
-
#last_txn_approved_at ⇒ Time?
The timestamp of the most recent approved transaction for the entity, in ISO 8601 format.
-
#seen_countries ⇒ Array<String>?
The set of merchant countries seen in the entity’s transaction history.
-
#seen_mccs ⇒ Array<String>?
The set of MCCs seen in the entity’s transaction history.
-
#seen_merchants ⇒ Array<String>?
The set of card acceptor IDs seen in the card’s approved transaction history, capped at the 1000 most recently seen.
-
#stdev_transaction_amount ⇒ Float?
The standard deviation of approved transaction amounts over the entity’s lifetime, in cents.
-
#stdev_transaction_amount_30d ⇒ Float?
The standard deviation of approved transaction amounts over the last 30 days, in cents.
-
#stdev_transaction_amount_7d ⇒ Float?
The standard deviation of approved transaction amounts over the last 7 days, in cents.
-
#stdev_transaction_amount_90d ⇒ Float?
The standard deviation of approved transaction amounts over the last 90 days, in cents.
-
#three_ds_success_count ⇒ Integer?
The number of successful 3DS authentications for the card.
-
#three_ds_success_rate ⇒ Float?
The 3DS authentication success rate for the card, as a percentage from 0.0 to 100.0.
-
#three_ds_total_count ⇒ Integer?
The total number of 3DS authentication attempts for the card.
-
#time_since_last_transaction_days ⇒ Float?
The number of days since the last approved transaction on the entity.
Instance Method Summary collapse
-
#initialize(approved_txn_amount_m2:, approved_txn_amount_m2_30d:, approved_txn_amount_m2_7d:, approved_txn_amount_m2_90d:, approved_txn_count:, approved_txn_count_30d:, approved_txn_count_7d:, approved_txn_count_90d:, avg_transaction_amount:, avg_transaction_amount_30d:, avg_transaction_amount_7d:, avg_transaction_amount_90d:, distinct_country_count:, distinct_mcc_count:, first_txn_at:, is_first_transaction:, last_cp_country:, last_cp_postal_code:, last_cp_timestamp:, last_txn_approved_at:, seen_countries:, seen_mccs:, seen_merchants:, stdev_transaction_amount:, stdev_transaction_amount_30d:, stdev_transaction_amount_7d:, stdev_transaction_amount_90d:, three_ds_success_count:, three_ds_success_rate:, three_ds_total_count:, time_since_last_transaction_days:) ⇒ Object
constructor
Some parameter documentations has been truncated, see SignalsResponse for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(approved_txn_amount_m2:, approved_txn_amount_m2_30d:, approved_txn_amount_m2_7d:, approved_txn_amount_m2_90d:, approved_txn_count:, approved_txn_count_30d:, approved_txn_count_7d:, approved_txn_count_90d:, avg_transaction_amount:, avg_transaction_amount_30d:, avg_transaction_amount_7d:, avg_transaction_amount_90d:, distinct_country_count:, distinct_mcc_count:, first_txn_at:, is_first_transaction:, last_cp_country:, last_cp_postal_code:, last_cp_timestamp:, last_txn_approved_at:, seen_countries:, seen_mccs:, seen_merchants:, stdev_transaction_amount:, stdev_transaction_amount_30d:, stdev_transaction_amount_7d:, stdev_transaction_amount_90d:, three_ds_success_count:, three_ds_success_rate:, three_ds_total_count:, time_since_last_transaction_days:) ⇒ Object
Some parameter documentations has been truncated, see Lithic::Models::SignalsResponse for more details.
Behavioral 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 in ‘seen_countries` to determine `is_new_country`, or computing a z-score using the raw mean and M2 values.
|
|
# File 'lib/lithic/models/signals_response.rb', line 221
|
Instance Attribute Details
#approved_txn_amount_m2 ⇒ Float?
The Welford M2 accumulator for lifetime approved transaction amounts. Used together with ‘avg_transaction_amount` and `approved_txn_count` to compute the z-score of a new transaction amount (variance = M2 / (count - 1)).
12 |
# File 'lib/lithic/models/signals_response.rb', line 12 required :approved_txn_amount_m2, Float, nil?: true |
#approved_txn_amount_m2_30d ⇒ Float?
The Welford M2 accumulator for approved transaction amounts over the last 30 days.
19 |
# File 'lib/lithic/models/signals_response.rb', line 19 required :approved_txn_amount_m2_30d, Float, nil?: true |
#approved_txn_amount_m2_7d ⇒ Float?
The Welford M2 accumulator for approved transaction amounts over the last 7 days.
26 |
# File 'lib/lithic/models/signals_response.rb', line 26 required :approved_txn_amount_m2_7d, Float, nil?: true |
#approved_txn_amount_m2_90d ⇒ Float?
The Welford M2 accumulator for approved transaction amounts over the last 90 days.
33 |
# File 'lib/lithic/models/signals_response.rb', line 33 required :approved_txn_amount_m2_90d, Float, nil?: true |
#approved_txn_count ⇒ Integer?
The total number of approved transactions over the entity’s lifetime.
39 |
# File 'lib/lithic/models/signals_response.rb', line 39 required :approved_txn_count, Integer, nil?: true |
#approved_txn_count_30d ⇒ Integer?
The number of approved transactions in the last 30 days.
45 |
# File 'lib/lithic/models/signals_response.rb', line 45 required :approved_txn_count_30d, Integer, nil?: true |
#approved_txn_count_7d ⇒ Integer?
The number of approved transactions in the last 7 days.
51 |
# File 'lib/lithic/models/signals_response.rb', line 51 required :approved_txn_count_7d, Integer, nil?: true |
#approved_txn_count_90d ⇒ Integer?
The number of approved transactions in the last 90 days.
57 |
# File 'lib/lithic/models/signals_response.rb', line 57 required :approved_txn_count_90d, Integer, nil?: true |
#avg_transaction_amount ⇒ Float?
The average approved transaction amount over the entity’s lifetime, in cents. Null if fewer than 5 approved transactions have been recorded.
64 |
# File 'lib/lithic/models/signals_response.rb', line 64 required :avg_transaction_amount, Float, nil?: true |
#avg_transaction_amount_30d ⇒ Float?
The average approved transaction amount over the last 30 days, in cents. Null if fewer than 5 approved transactions in window.
71 |
# File 'lib/lithic/models/signals_response.rb', line 71 required :avg_transaction_amount_30d, Float, nil?: true |
#avg_transaction_amount_7d ⇒ Float?
The average approved transaction amount over the last 7 days, in cents. Null if fewer than 5 approved transactions in window.
78 |
# File 'lib/lithic/models/signals_response.rb', line 78 required :avg_transaction_amount_7d, Float, nil?: true |
#avg_transaction_amount_90d ⇒ Float?
The average approved transaction amount over the last 90 days, in cents. Null if fewer than 5 approved transactions in window.
85 |
# File 'lib/lithic/models/signals_response.rb', line 85 required :avg_transaction_amount_90d, Float, nil?: true |
#distinct_country_count ⇒ Integer?
The number of distinct merchant countries seen in the entity’s transaction history.
92 |
# File 'lib/lithic/models/signals_response.rb', line 92 required :distinct_country_count, Integer, nil?: true |
#distinct_mcc_count ⇒ Integer?
The number of distinct MCCs seen in the entity’s transaction history.
98 |
# File 'lib/lithic/models/signals_response.rb', line 98 required :distinct_mcc_count, Integer, nil?: true |
#first_txn_at ⇒ Time?
The timestamp of the first approved transaction for the entity, in ISO 8601 format.
105 |
# File 'lib/lithic/models/signals_response.rb', line 105 required :first_txn_at, Time, nil?: true |
#is_first_transaction ⇒ Boolean?
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.
113 |
# File 'lib/lithic/models/signals_response.rb', line 113 required :is_first_transaction, Lithic::Internal::Type::Boolean, nil?: true |
#last_cp_country ⇒ String?
The merchant country of the last card-present transaction.
119 |
# File 'lib/lithic/models/signals_response.rb', line 119 required :last_cp_country, String, nil?: true |
#last_cp_postal_code ⇒ String?
The merchant postal code of the last card-present transaction.
125 |
# File 'lib/lithic/models/signals_response.rb', line 125 required :last_cp_postal_code, String, nil?: true |
#last_cp_timestamp ⇒ Time?
The timestamp of the last card-present transaction, in ISO 8601 format.
131 |
# File 'lib/lithic/models/signals_response.rb', line 131 required :last_cp_timestamp, Time, nil?: true |
#last_txn_approved_at ⇒ Time?
The timestamp of the most recent approved transaction for the entity, in ISO 8601 format.
138 |
# File 'lib/lithic/models/signals_response.rb', line 138 required :last_txn_approved_at, Time, nil?: true |
#seen_countries ⇒ Array<String>?
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`).
146 |
# File 'lib/lithic/models/signals_response.rb', line 146 required :seen_countries, Lithic::Internal::Type::ArrayOf[String], nil?: true |
#seen_mccs ⇒ Array<String>?
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`).
154 |
# File 'lib/lithic/models/signals_response.rb', line 154 required :seen_mccs, Lithic::Internal::Type::ArrayOf[String], nil?: true |
#seen_merchants ⇒ Array<String>?
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`).
163 |
# File 'lib/lithic/models/signals_response.rb', line 163 required :seen_merchants, Lithic::Internal::Type::ArrayOf[String], nil?: true |
#stdev_transaction_amount ⇒ Float?
The standard deviation of approved transaction amounts over the entity’s lifetime, in cents. Null if fewer than 30 approved transactions have been recorded.
171 |
# File 'lib/lithic/models/signals_response.rb', line 171 required :stdev_transaction_amount, Float, nil?: true |
#stdev_transaction_amount_30d ⇒ Float?
The standard deviation of approved transaction amounts over the last 30 days, in cents. Null if fewer than 30 approved transactions in window.
178 |
# File 'lib/lithic/models/signals_response.rb', line 178 required :stdev_transaction_amount_30d, Float, nil?: true |
#stdev_transaction_amount_7d ⇒ Float?
The standard deviation of approved transaction amounts over the last 7 days, in cents. Null if fewer than 30 approved transactions in window.
185 |
# File 'lib/lithic/models/signals_response.rb', line 185 required :stdev_transaction_amount_7d, Float, nil?: true |
#stdev_transaction_amount_90d ⇒ Float?
The standard deviation of approved transaction amounts over the last 90 days, in cents. Null if fewer than 30 approved transactions in window.
192 |
# File 'lib/lithic/models/signals_response.rb', line 192 required :stdev_transaction_amount_90d, Float, nil?: true |
#three_ds_success_count ⇒ Integer?
The number of successful 3DS authentications for the card. Null for account responses.
199 |
# File 'lib/lithic/models/signals_response.rb', line 199 required :three_ds_success_count, Integer, nil?: true |
#three_ds_success_rate ⇒ Float?
The 3DS authentication success rate for the card, as a percentage from 0.0 to 100.0. Null for account responses.
206 |
# File 'lib/lithic/models/signals_response.rb', line 206 required :three_ds_success_rate, Float, nil?: true |
#three_ds_total_count ⇒ Integer?
The total number of 3DS authentication attempts for the card. Null for account responses.
213 |
# File 'lib/lithic/models/signals_response.rb', line 213 required :three_ds_total_count, Integer, nil?: true |
#time_since_last_transaction_days ⇒ Float?
The number of days since the last approved transaction on the entity.
219 |
# File 'lib/lithic/models/signals_response.rb', line 219 required :time_since_last_transaction_days, Float, nil?: true |