lithic 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/README.md +1 -1
- data/lib/lithic/client.rb +15 -1
- data/lib/lithic/models/account.rb +2 -2
- data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +5 -4
- data/lib/lithic/models/account_holder_update_response.rb +3 -3
- data/lib/lithic/models/account_retrieve_signals_params.rb +20 -0
- data/lib/lithic/models/account_update_params.rb +2 -2
- data/lib/lithic/models/auth_rules/auth_rule.rb +14 -8
- data/lib/lithic/models/auth_rules/auth_rule_version.rb +5 -3
- data/lib/lithic/models/auth_rules/card_transaction_update_action.rb +109 -0
- data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +78 -12
- data/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb +244 -0
- data/lib/lithic/models/auth_rules/event_stream.rb +1 -0
- data/lib/lithic/models/auth_rules/spend_velocity_filters.rb +33 -0
- data/lib/lithic/models/auth_rules/v2_create_params.rb +27 -15
- data/lib/lithic/models/auth_rules/v2_draft_params.rb +5 -3
- data/lib/lithic/models/card_create_params.rb +4 -2
- data/lib/lithic/models/card_renew_params.rb +4 -2
- data/lib/lithic/models/card_retrieve_signals_params.rb +20 -0
- data/lib/lithic/models/non_pci_card.rb +13 -13
- data/lib/lithic/models/reports/settlement/network_total_list_params.rb +1 -0
- data/lib/lithic/models/settlement_detail.rb +11 -4
- data/lib/lithic/models/settlement_summary_details.rb +1 -0
- data/lib/lithic/models/signals_response.rb +306 -0
- data/lib/lithic/models.rb +6 -0
- data/lib/lithic/resources/accounts.rb +28 -1
- data/lib/lithic/resources/auth_rules/v2.rb +1 -1
- data/lib/lithic/resources/cards.rb +25 -0
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +7 -1
- data/rbi/lithic/models/account.rbi +3 -6
- data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +10 -14
- data/rbi/lithic/models/account_holder_update_response.rbi +3 -3
- data/rbi/lithic/models/account_retrieve_signals_params.rbi +35 -0
- data/rbi/lithic/models/account_update_params.rbi +5 -8
- data/rbi/lithic/models/auth_rules/auth_rule.rbi +10 -3
- data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +2 -0
- data/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi +242 -0
- data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +159 -18
- data/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi +573 -0
- data/rbi/lithic/models/auth_rules/event_stream.rbi +5 -0
- data/rbi/lithic/models/auth_rules/spend_velocity_filters.rbi +58 -0
- data/rbi/lithic/models/auth_rules/v2_create_params.rbi +30 -9
- data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +4 -0
- data/rbi/lithic/models/card_create_params.rbi +8 -4
- data/rbi/lithic/models/card_renew_params.rbi +8 -4
- data/rbi/lithic/models/card_retrieve_signals_params.rbi +35 -0
- data/rbi/lithic/models/non_pci_card.rbi +21 -31
- data/rbi/lithic/models/reports/settlement/network_total_list_params.rbi +5 -0
- data/rbi/lithic/models/settlement_detail.rbi +17 -4
- data/rbi/lithic/models/settlement_summary_details.rbi +2 -0
- data/rbi/lithic/models/signals_response.rbi +352 -0
- data/rbi/lithic/models.rbi +6 -0
- data/rbi/lithic/resources/accounts.rbi +23 -1
- data/rbi/lithic/resources/auth_rules/v2.rbi +1 -0
- data/rbi/lithic/resources/cards.rbi +27 -4
- data/sig/lithic/models/account.rbs +4 -8
- data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +4 -8
- data/sig/lithic/models/account_retrieve_signals_params.rbs +23 -0
- data/sig/lithic/models/account_update_params.rbs +4 -8
- data/sig/lithic/models/auth_rules/auth_rule.rbs +2 -0
- data/sig/lithic/models/auth_rules/auth_rule_version.rbs +1 -0
- data/sig/lithic/models/auth_rules/card_transaction_update_action.rbs +100 -0
- data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +31 -3
- data/sig/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbs +155 -0
- data/sig/lithic/models/auth_rules/event_stream.rbs +2 -0
- data/sig/lithic/models/auth_rules/spend_velocity_filters.rbs +35 -0
- data/sig/lithic/models/auth_rules/v2_create_params.rbs +3 -0
- data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -0
- data/sig/lithic/models/card_retrieve_signals_params.rbs +23 -0
- data/sig/lithic/models/non_pci_card.rbs +20 -30
- data/sig/lithic/models/reports/settlement/network_total_list_params.rbs +2 -1
- data/sig/lithic/models/settlement_detail.rbs +3 -1
- data/sig/lithic/models/settlement_summary_details.rbs +3 -1
- data/sig/lithic/models/signals_response.rbs +170 -0
- data/sig/lithic/models.rbs +6 -0
- data/sig/lithic/resources/accounts.rbs +6 -1
- data/sig/lithic/resources/cards.rbs +5 -0
- metadata +20 -2
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Models
|
|
5
|
+
class SignalsResponse < Lithic::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Lithic::SignalsResponse, Lithic::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The Welford M2 accumulator for lifetime approved transaction amounts. Used
|
|
12
|
+
# together with `avg_transaction_amount` and `approved_txn_count` to compute the
|
|
13
|
+
# z-score of a new transaction amount (variance = M2 / (count - 1)).
|
|
14
|
+
sig { returns(T.nilable(Float)) }
|
|
15
|
+
attr_accessor :approved_txn_amount_m2
|
|
16
|
+
|
|
17
|
+
# The Welford M2 accumulator for approved transaction amounts over the last 30
|
|
18
|
+
# days.
|
|
19
|
+
sig { returns(T.nilable(Float)) }
|
|
20
|
+
attr_accessor :approved_txn_amount_m2_30d
|
|
21
|
+
|
|
22
|
+
# The Welford M2 accumulator for approved transaction amounts over the last 7
|
|
23
|
+
# days.
|
|
24
|
+
sig { returns(T.nilable(Float)) }
|
|
25
|
+
attr_accessor :approved_txn_amount_m2_7d
|
|
26
|
+
|
|
27
|
+
# The Welford M2 accumulator for approved transaction amounts over the last 90
|
|
28
|
+
# days.
|
|
29
|
+
sig { returns(T.nilable(Float)) }
|
|
30
|
+
attr_accessor :approved_txn_amount_m2_90d
|
|
31
|
+
|
|
32
|
+
# The total number of approved transactions over the entity's lifetime.
|
|
33
|
+
sig { returns(T.nilable(Integer)) }
|
|
34
|
+
attr_accessor :approved_txn_count
|
|
35
|
+
|
|
36
|
+
# The number of approved transactions in the last 30 days.
|
|
37
|
+
sig { returns(T.nilable(Integer)) }
|
|
38
|
+
attr_accessor :approved_txn_count_30d
|
|
39
|
+
|
|
40
|
+
# The number of approved transactions in the last 7 days.
|
|
41
|
+
sig { returns(T.nilable(Integer)) }
|
|
42
|
+
attr_accessor :approved_txn_count_7d
|
|
43
|
+
|
|
44
|
+
# The number of approved transactions in the last 90 days.
|
|
45
|
+
sig { returns(T.nilable(Integer)) }
|
|
46
|
+
attr_accessor :approved_txn_count_90d
|
|
47
|
+
|
|
48
|
+
# The average approved transaction amount over the entity's lifetime, in cents.
|
|
49
|
+
# Null if fewer than 5 approved transactions have been recorded.
|
|
50
|
+
sig { returns(T.nilable(Float)) }
|
|
51
|
+
attr_accessor :avg_transaction_amount
|
|
52
|
+
|
|
53
|
+
# The average approved transaction amount over the last 30 days, in cents. Null if
|
|
54
|
+
# fewer than 5 approved transactions in window.
|
|
55
|
+
sig { returns(T.nilable(Float)) }
|
|
56
|
+
attr_accessor :avg_transaction_amount_30d
|
|
57
|
+
|
|
58
|
+
# The average approved transaction amount over the last 7 days, in cents. Null if
|
|
59
|
+
# fewer than 5 approved transactions in window.
|
|
60
|
+
sig { returns(T.nilable(Float)) }
|
|
61
|
+
attr_accessor :avg_transaction_amount_7d
|
|
62
|
+
|
|
63
|
+
# The average approved transaction amount over the last 90 days, in cents. Null if
|
|
64
|
+
# fewer than 5 approved transactions in window.
|
|
65
|
+
sig { returns(T.nilable(Float)) }
|
|
66
|
+
attr_accessor :avg_transaction_amount_90d
|
|
67
|
+
|
|
68
|
+
# The number of distinct merchant countries seen in the entity's transaction
|
|
69
|
+
# history.
|
|
70
|
+
sig { returns(T.nilable(Integer)) }
|
|
71
|
+
attr_accessor :distinct_country_count
|
|
72
|
+
|
|
73
|
+
# The number of distinct MCCs seen in the entity's transaction history.
|
|
74
|
+
sig { returns(T.nilable(Integer)) }
|
|
75
|
+
attr_accessor :distinct_mcc_count
|
|
76
|
+
|
|
77
|
+
# The timestamp of the first approved transaction for the entity, in ISO 8601
|
|
78
|
+
# format.
|
|
79
|
+
sig { returns(T.nilable(Time)) }
|
|
80
|
+
attr_accessor :first_txn_at
|
|
81
|
+
|
|
82
|
+
# Whether the entity has no prior transaction history. Returns true if no history
|
|
83
|
+
# is found. Null if transaction history exists but a first transaction timestamp
|
|
84
|
+
# is unavailable.
|
|
85
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
86
|
+
attr_accessor :is_first_transaction
|
|
87
|
+
|
|
88
|
+
# The merchant country of the last card-present transaction.
|
|
89
|
+
sig { returns(T.nilable(String)) }
|
|
90
|
+
attr_accessor :last_cp_country
|
|
91
|
+
|
|
92
|
+
# The merchant postal code of the last card-present transaction.
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :last_cp_postal_code
|
|
95
|
+
|
|
96
|
+
# The timestamp of the last card-present transaction, in ISO 8601 format.
|
|
97
|
+
sig { returns(T.nilable(Time)) }
|
|
98
|
+
attr_accessor :last_cp_timestamp
|
|
99
|
+
|
|
100
|
+
# The timestamp of the most recent approved transaction for the entity, in ISO
|
|
101
|
+
# 8601 format.
|
|
102
|
+
sig { returns(T.nilable(Time)) }
|
|
103
|
+
attr_accessor :last_txn_approved_at
|
|
104
|
+
|
|
105
|
+
# The set of merchant countries seen in the entity's transaction history. Clients
|
|
106
|
+
# can use this to determine whether a new transaction's country is novel (i.e.
|
|
107
|
+
# compute `is_new_country`).
|
|
108
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
109
|
+
attr_accessor :seen_countries
|
|
110
|
+
|
|
111
|
+
# The set of MCCs seen in the entity's transaction history. Clients can use this
|
|
112
|
+
# to determine whether a new transaction's MCC is novel (i.e. compute
|
|
113
|
+
# `is_new_mcc`).
|
|
114
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
115
|
+
attr_accessor :seen_mccs
|
|
116
|
+
|
|
117
|
+
# The set of card acceptor IDs seen in the card's approved transaction history,
|
|
118
|
+
# capped at the 1000 most recently seen. Null for account responses. Clients can
|
|
119
|
+
# use this to determine whether a new transaction's merchant is novel (i.e.
|
|
120
|
+
# compute `is_new_merchant`).
|
|
121
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
122
|
+
attr_accessor :seen_merchants
|
|
123
|
+
|
|
124
|
+
# The standard deviation of approved transaction amounts over the entity's
|
|
125
|
+
# lifetime, in cents. Null if fewer than 30 approved transactions have been
|
|
126
|
+
# recorded.
|
|
127
|
+
sig { returns(T.nilable(Float)) }
|
|
128
|
+
attr_accessor :stdev_transaction_amount
|
|
129
|
+
|
|
130
|
+
# The standard deviation of approved transaction amounts over the last 30 days, in
|
|
131
|
+
# cents. Null if fewer than 30 approved transactions in window.
|
|
132
|
+
sig { returns(T.nilable(Float)) }
|
|
133
|
+
attr_accessor :stdev_transaction_amount_30d
|
|
134
|
+
|
|
135
|
+
# The standard deviation of approved transaction amounts over the last 7 days, in
|
|
136
|
+
# cents. Null if fewer than 30 approved transactions in window.
|
|
137
|
+
sig { returns(T.nilable(Float)) }
|
|
138
|
+
attr_accessor :stdev_transaction_amount_7d
|
|
139
|
+
|
|
140
|
+
# The standard deviation of approved transaction amounts over the last 90 days, in
|
|
141
|
+
# cents. Null if fewer than 30 approved transactions in window.
|
|
142
|
+
sig { returns(T.nilable(Float)) }
|
|
143
|
+
attr_accessor :stdev_transaction_amount_90d
|
|
144
|
+
|
|
145
|
+
# The number of successful 3DS authentications for the card. Null for account
|
|
146
|
+
# responses.
|
|
147
|
+
sig { returns(T.nilable(Integer)) }
|
|
148
|
+
attr_accessor :three_ds_success_count
|
|
149
|
+
|
|
150
|
+
# The 3DS authentication success rate for the card, as a percentage from 0.0 to
|
|
151
|
+
# 100.0. Null for account responses.
|
|
152
|
+
sig { returns(T.nilable(Float)) }
|
|
153
|
+
attr_accessor :three_ds_success_rate
|
|
154
|
+
|
|
155
|
+
# The total number of 3DS authentication attempts for the card. Null for account
|
|
156
|
+
# responses.
|
|
157
|
+
sig { returns(T.nilable(Integer)) }
|
|
158
|
+
attr_accessor :three_ds_total_count
|
|
159
|
+
|
|
160
|
+
# The number of days since the last approved transaction on the entity.
|
|
161
|
+
sig { returns(T.nilable(Float)) }
|
|
162
|
+
attr_accessor :time_since_last_transaction_days
|
|
163
|
+
|
|
164
|
+
# Behavioral feature state for a card or account derived from its transaction
|
|
165
|
+
# history.
|
|
166
|
+
#
|
|
167
|
+
# Derived statistical features (averages, standard deviations, z-scores) are
|
|
168
|
+
# computed using Welford's online algorithm over approved transactions. Average
|
|
169
|
+
# fields are null when fewer than 5 approved transactions have been recorded.
|
|
170
|
+
# Standard deviation fields are null when fewer than 30 approved transactions have
|
|
171
|
+
# been recorded.
|
|
172
|
+
#
|
|
173
|
+
# 3DS fields (`three_ds_success_rate`, `three_ds_success_count`,
|
|
174
|
+
# `three_ds_total_count`) are card-scoped and will be null for account responses.
|
|
175
|
+
#
|
|
176
|
+
# Raw fields (`seen_countries`, `seen_mccs`, `approved_txn_amount_m2`, etc.) are
|
|
177
|
+
# included so clients can compute their own transaction-specific derivations, such
|
|
178
|
+
# as checking whether a new transaction's country is in `seen_countries` to
|
|
179
|
+
# determine `is_new_country`, or computing a z-score using the raw mean and M2
|
|
180
|
+
# values.
|
|
181
|
+
sig do
|
|
182
|
+
params(
|
|
183
|
+
approved_txn_amount_m2: T.nilable(Float),
|
|
184
|
+
approved_txn_amount_m2_30d: T.nilable(Float),
|
|
185
|
+
approved_txn_amount_m2_7d: T.nilable(Float),
|
|
186
|
+
approved_txn_amount_m2_90d: T.nilable(Float),
|
|
187
|
+
approved_txn_count: T.nilable(Integer),
|
|
188
|
+
approved_txn_count_30d: T.nilable(Integer),
|
|
189
|
+
approved_txn_count_7d: T.nilable(Integer),
|
|
190
|
+
approved_txn_count_90d: T.nilable(Integer),
|
|
191
|
+
avg_transaction_amount: T.nilable(Float),
|
|
192
|
+
avg_transaction_amount_30d: T.nilable(Float),
|
|
193
|
+
avg_transaction_amount_7d: T.nilable(Float),
|
|
194
|
+
avg_transaction_amount_90d: T.nilable(Float),
|
|
195
|
+
distinct_country_count: T.nilable(Integer),
|
|
196
|
+
distinct_mcc_count: T.nilable(Integer),
|
|
197
|
+
first_txn_at: T.nilable(Time),
|
|
198
|
+
is_first_transaction: T.nilable(T::Boolean),
|
|
199
|
+
last_cp_country: T.nilable(String),
|
|
200
|
+
last_cp_postal_code: T.nilable(String),
|
|
201
|
+
last_cp_timestamp: T.nilable(Time),
|
|
202
|
+
last_txn_approved_at: T.nilable(Time),
|
|
203
|
+
seen_countries: T.nilable(T::Array[String]),
|
|
204
|
+
seen_mccs: T.nilable(T::Array[String]),
|
|
205
|
+
seen_merchants: T.nilable(T::Array[String]),
|
|
206
|
+
stdev_transaction_amount: T.nilable(Float),
|
|
207
|
+
stdev_transaction_amount_30d: T.nilable(Float),
|
|
208
|
+
stdev_transaction_amount_7d: T.nilable(Float),
|
|
209
|
+
stdev_transaction_amount_90d: T.nilable(Float),
|
|
210
|
+
three_ds_success_count: T.nilable(Integer),
|
|
211
|
+
three_ds_success_rate: T.nilable(Float),
|
|
212
|
+
three_ds_total_count: T.nilable(Integer),
|
|
213
|
+
time_since_last_transaction_days: T.nilable(Float)
|
|
214
|
+
).returns(T.attached_class)
|
|
215
|
+
end
|
|
216
|
+
def self.new(
|
|
217
|
+
# The Welford M2 accumulator for lifetime approved transaction amounts. Used
|
|
218
|
+
# together with `avg_transaction_amount` and `approved_txn_count` to compute the
|
|
219
|
+
# z-score of a new transaction amount (variance = M2 / (count - 1)).
|
|
220
|
+
approved_txn_amount_m2:,
|
|
221
|
+
# The Welford M2 accumulator for approved transaction amounts over the last 30
|
|
222
|
+
# days.
|
|
223
|
+
approved_txn_amount_m2_30d:,
|
|
224
|
+
# The Welford M2 accumulator for approved transaction amounts over the last 7
|
|
225
|
+
# days.
|
|
226
|
+
approved_txn_amount_m2_7d:,
|
|
227
|
+
# The Welford M2 accumulator for approved transaction amounts over the last 90
|
|
228
|
+
# days.
|
|
229
|
+
approved_txn_amount_m2_90d:,
|
|
230
|
+
# The total number of approved transactions over the entity's lifetime.
|
|
231
|
+
approved_txn_count:,
|
|
232
|
+
# The number of approved transactions in the last 30 days.
|
|
233
|
+
approved_txn_count_30d:,
|
|
234
|
+
# The number of approved transactions in the last 7 days.
|
|
235
|
+
approved_txn_count_7d:,
|
|
236
|
+
# The number of approved transactions in the last 90 days.
|
|
237
|
+
approved_txn_count_90d:,
|
|
238
|
+
# The average approved transaction amount over the entity's lifetime, in cents.
|
|
239
|
+
# Null if fewer than 5 approved transactions have been recorded.
|
|
240
|
+
avg_transaction_amount:,
|
|
241
|
+
# The average approved transaction amount over the last 30 days, in cents. Null if
|
|
242
|
+
# fewer than 5 approved transactions in window.
|
|
243
|
+
avg_transaction_amount_30d:,
|
|
244
|
+
# The average approved transaction amount over the last 7 days, in cents. Null if
|
|
245
|
+
# fewer than 5 approved transactions in window.
|
|
246
|
+
avg_transaction_amount_7d:,
|
|
247
|
+
# The average approved transaction amount over the last 90 days, in cents. Null if
|
|
248
|
+
# fewer than 5 approved transactions in window.
|
|
249
|
+
avg_transaction_amount_90d:,
|
|
250
|
+
# The number of distinct merchant countries seen in the entity's transaction
|
|
251
|
+
# history.
|
|
252
|
+
distinct_country_count:,
|
|
253
|
+
# The number of distinct MCCs seen in the entity's transaction history.
|
|
254
|
+
distinct_mcc_count:,
|
|
255
|
+
# The timestamp of the first approved transaction for the entity, in ISO 8601
|
|
256
|
+
# format.
|
|
257
|
+
first_txn_at:,
|
|
258
|
+
# Whether the entity has no prior transaction history. Returns true if no history
|
|
259
|
+
# is found. Null if transaction history exists but a first transaction timestamp
|
|
260
|
+
# is unavailable.
|
|
261
|
+
is_first_transaction:,
|
|
262
|
+
# The merchant country of the last card-present transaction.
|
|
263
|
+
last_cp_country:,
|
|
264
|
+
# The merchant postal code of the last card-present transaction.
|
|
265
|
+
last_cp_postal_code:,
|
|
266
|
+
# The timestamp of the last card-present transaction, in ISO 8601 format.
|
|
267
|
+
last_cp_timestamp:,
|
|
268
|
+
# The timestamp of the most recent approved transaction for the entity, in ISO
|
|
269
|
+
# 8601 format.
|
|
270
|
+
last_txn_approved_at:,
|
|
271
|
+
# The set of merchant countries seen in the entity's transaction history. Clients
|
|
272
|
+
# can use this to determine whether a new transaction's country is novel (i.e.
|
|
273
|
+
# compute `is_new_country`).
|
|
274
|
+
seen_countries:,
|
|
275
|
+
# The set of MCCs seen in the entity's transaction history. Clients can use this
|
|
276
|
+
# to determine whether a new transaction's MCC is novel (i.e. compute
|
|
277
|
+
# `is_new_mcc`).
|
|
278
|
+
seen_mccs:,
|
|
279
|
+
# The set of card acceptor IDs seen in the card's approved transaction history,
|
|
280
|
+
# capped at the 1000 most recently seen. Null for account responses. Clients can
|
|
281
|
+
# use this to determine whether a new transaction's merchant is novel (i.e.
|
|
282
|
+
# compute `is_new_merchant`).
|
|
283
|
+
seen_merchants:,
|
|
284
|
+
# The standard deviation of approved transaction amounts over the entity's
|
|
285
|
+
# lifetime, in cents. Null if fewer than 30 approved transactions have been
|
|
286
|
+
# recorded.
|
|
287
|
+
stdev_transaction_amount:,
|
|
288
|
+
# The standard deviation of approved transaction amounts over the last 30 days, in
|
|
289
|
+
# cents. Null if fewer than 30 approved transactions in window.
|
|
290
|
+
stdev_transaction_amount_30d:,
|
|
291
|
+
# The standard deviation of approved transaction amounts over the last 7 days, in
|
|
292
|
+
# cents. Null if fewer than 30 approved transactions in window.
|
|
293
|
+
stdev_transaction_amount_7d:,
|
|
294
|
+
# The standard deviation of approved transaction amounts over the last 90 days, in
|
|
295
|
+
# cents. Null if fewer than 30 approved transactions in window.
|
|
296
|
+
stdev_transaction_amount_90d:,
|
|
297
|
+
# The number of successful 3DS authentications for the card. Null for account
|
|
298
|
+
# responses.
|
|
299
|
+
three_ds_success_count:,
|
|
300
|
+
# The 3DS authentication success rate for the card, as a percentage from 0.0 to
|
|
301
|
+
# 100.0. Null for account responses.
|
|
302
|
+
three_ds_success_rate:,
|
|
303
|
+
# The total number of 3DS authentication attempts for the card. Null for account
|
|
304
|
+
# responses.
|
|
305
|
+
three_ds_total_count:,
|
|
306
|
+
# The number of days since the last approved transaction on the entity.
|
|
307
|
+
time_since_last_transaction_days:
|
|
308
|
+
)
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
sig do
|
|
312
|
+
override.returns(
|
|
313
|
+
{
|
|
314
|
+
approved_txn_amount_m2: T.nilable(Float),
|
|
315
|
+
approved_txn_amount_m2_30d: T.nilable(Float),
|
|
316
|
+
approved_txn_amount_m2_7d: T.nilable(Float),
|
|
317
|
+
approved_txn_amount_m2_90d: T.nilable(Float),
|
|
318
|
+
approved_txn_count: T.nilable(Integer),
|
|
319
|
+
approved_txn_count_30d: T.nilable(Integer),
|
|
320
|
+
approved_txn_count_7d: T.nilable(Integer),
|
|
321
|
+
approved_txn_count_90d: T.nilable(Integer),
|
|
322
|
+
avg_transaction_amount: T.nilable(Float),
|
|
323
|
+
avg_transaction_amount_30d: T.nilable(Float),
|
|
324
|
+
avg_transaction_amount_7d: T.nilable(Float),
|
|
325
|
+
avg_transaction_amount_90d: T.nilable(Float),
|
|
326
|
+
distinct_country_count: T.nilable(Integer),
|
|
327
|
+
distinct_mcc_count: T.nilable(Integer),
|
|
328
|
+
first_txn_at: T.nilable(Time),
|
|
329
|
+
is_first_transaction: T.nilable(T::Boolean),
|
|
330
|
+
last_cp_country: T.nilable(String),
|
|
331
|
+
last_cp_postal_code: T.nilable(String),
|
|
332
|
+
last_cp_timestamp: T.nilable(Time),
|
|
333
|
+
last_txn_approved_at: T.nilable(Time),
|
|
334
|
+
seen_countries: T.nilable(T::Array[String]),
|
|
335
|
+
seen_mccs: T.nilable(T::Array[String]),
|
|
336
|
+
seen_merchants: T.nilable(T::Array[String]),
|
|
337
|
+
stdev_transaction_amount: T.nilable(Float),
|
|
338
|
+
stdev_transaction_amount_30d: T.nilable(Float),
|
|
339
|
+
stdev_transaction_amount_7d: T.nilable(Float),
|
|
340
|
+
stdev_transaction_amount_90d: T.nilable(Float),
|
|
341
|
+
three_ds_success_count: T.nilable(Integer),
|
|
342
|
+
three_ds_success_rate: T.nilable(Float),
|
|
343
|
+
three_ds_total_count: T.nilable(Integer),
|
|
344
|
+
time_since_last_transaction_days: T.nilable(Float)
|
|
345
|
+
}
|
|
346
|
+
)
|
|
347
|
+
end
|
|
348
|
+
def to_hash
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
end
|
data/rbi/lithic/models.rbi
CHANGED
|
@@ -53,6 +53,8 @@ module Lithic
|
|
|
53
53
|
|
|
54
54
|
AccountRetrieveParams = Lithic::Models::AccountRetrieveParams
|
|
55
55
|
|
|
56
|
+
AccountRetrieveSignalsParams = Lithic::Models::AccountRetrieveSignalsParams
|
|
57
|
+
|
|
56
58
|
AccountRetrieveSpendLimitsParams =
|
|
57
59
|
Lithic::Models::AccountRetrieveSpendLimitsParams
|
|
58
60
|
|
|
@@ -153,6 +155,8 @@ module Lithic
|
|
|
153
155
|
|
|
154
156
|
CardRetrieveParams = Lithic::Models::CardRetrieveParams
|
|
155
157
|
|
|
158
|
+
CardRetrieveSignalsParams = Lithic::Models::CardRetrieveSignalsParams
|
|
159
|
+
|
|
156
160
|
CardRetrieveSpendLimitsParams = Lithic::Models::CardRetrieveSpendLimitsParams
|
|
157
161
|
|
|
158
162
|
Cards = Lithic::Models::Cards
|
|
@@ -501,6 +505,8 @@ module Lithic
|
|
|
501
505
|
|
|
502
506
|
ShippingAddress = Lithic::Models::ShippingAddress
|
|
503
507
|
|
|
508
|
+
SignalsResponse = Lithic::Models::SignalsResponse
|
|
509
|
+
|
|
504
510
|
SpendLimitDuration = Lithic::Models::SpendLimitDuration
|
|
505
511
|
|
|
506
512
|
StatementsCreatedWebhookEvent = Lithic::Models::StatementsCreatedWebhookEvent
|
|
@@ -28,7 +28,8 @@ module Lithic
|
|
|
28
28
|
lifetime_spend_limit: Integer,
|
|
29
29
|
monthly_spend_limit: Integer,
|
|
30
30
|
state: Lithic::AccountUpdateParams::State::OrSymbol,
|
|
31
|
-
substatus:
|
|
31
|
+
substatus:
|
|
32
|
+
T.nilable(Lithic::AccountUpdateParams::Substatus::OrSymbol),
|
|
32
33
|
verification_address:
|
|
33
34
|
Lithic::AccountUpdateParams::VerificationAddress::OrHash,
|
|
34
35
|
request_options: Lithic::RequestOptions::OrHash
|
|
@@ -122,6 +123,27 @@ module Lithic
|
|
|
122
123
|
)
|
|
123
124
|
end
|
|
124
125
|
|
|
126
|
+
# Returns behavioral feature state derived from an account's transaction history.
|
|
127
|
+
#
|
|
128
|
+
# These signals expose the same data used by behavioral rule attributes (e.g.
|
|
129
|
+
# `AMOUNT_Z_SCORE` with `scope: ACCOUNT`, `IS_NEW_COUNTRY` with `scope: ACCOUNT`)
|
|
130
|
+
# and custom code `TRANSACTION_HISTORY_SIGNALS` features, allowing clients to
|
|
131
|
+
# inspect feature values before writing rules and debug rule behavior.
|
|
132
|
+
#
|
|
133
|
+
# Note: 3DS fields are not available at the account scope and will be null.
|
|
134
|
+
sig do
|
|
135
|
+
params(
|
|
136
|
+
account_token: String,
|
|
137
|
+
request_options: Lithic::RequestOptions::OrHash
|
|
138
|
+
).returns(Lithic::SignalsResponse)
|
|
139
|
+
end
|
|
140
|
+
def retrieve_signals(
|
|
141
|
+
# The token of the account to fetch signals for.
|
|
142
|
+
account_token,
|
|
143
|
+
request_options: {}
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
125
147
|
# Get an Account's available spend limits, which is based on the spend limit
|
|
126
148
|
# configured on the Account and the amount already spent over the spend limit's
|
|
127
149
|
# duration. For example, if the Account has a daily spend limit of $1000
|
|
@@ -122,6 +122,7 @@ module Lithic
|
|
|
122
122
|
Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash,
|
|
123
123
|
Lithic::AuthRules::ConditionalACHActionParameters::OrHash,
|
|
124
124
|
Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash,
|
|
125
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash,
|
|
125
126
|
Lithic::AuthRules::TypescriptCodeParameters::OrHash
|
|
126
127
|
)
|
|
127
128
|
),
|
|
@@ -80,10 +80,12 @@ module Lithic
|
|
|
80
80
|
# [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).
|
|
81
81
|
digital_card_art_token: nil,
|
|
82
82
|
# Body param: Two digit (MM) expiry month. If neither `exp_month` nor `exp_year`
|
|
83
|
-
# is provided, an expiration date will be generated.
|
|
83
|
+
# is provided, an expiration date five years in the future will be generated. Five
|
|
84
|
+
# years is the maximum expiration date.
|
|
84
85
|
exp_month: nil,
|
|
85
86
|
# Body param: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year`
|
|
86
|
-
# is provided, an expiration date will be generated.
|
|
87
|
+
# is provided, an expiration date five years in the future will be generated. Five
|
|
88
|
+
# years is the maximum expiration date.
|
|
87
89
|
exp_year: nil,
|
|
88
90
|
# Body param: Friendly name to identify the card.
|
|
89
91
|
memo: nil,
|
|
@@ -556,10 +558,12 @@ module Lithic
|
|
|
556
558
|
# If omitted, the previous carrier will be used.
|
|
557
559
|
carrier: nil,
|
|
558
560
|
# Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
|
|
559
|
-
# an expiration date
|
|
561
|
+
# an expiration date five years in the future will be generated. Five years is the
|
|
562
|
+
# maximum expiration date.
|
|
560
563
|
exp_month: nil,
|
|
561
564
|
# Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
|
|
562
|
-
# provided, an expiration date
|
|
565
|
+
# provided, an expiration date five years in the future will be generated. Five
|
|
566
|
+
# years is the maximum expiration date.
|
|
563
567
|
exp_year: nil,
|
|
564
568
|
# Specifies the configuration (e.g. physical card art) that the card should be
|
|
565
569
|
# manufactured with, and only applies to cards of type `PHYSICAL`. This must be
|
|
@@ -586,6 +590,25 @@ module Lithic
|
|
|
586
590
|
)
|
|
587
591
|
end
|
|
588
592
|
|
|
593
|
+
# Returns behavioral feature state derived from a card's transaction history.
|
|
594
|
+
#
|
|
595
|
+
# These signals expose the same data used by behavioral rule attributes (e.g.
|
|
596
|
+
# `AMOUNT_Z_SCORE` with `scope: CARD`, `IS_NEW_COUNTRY` with `scope: CARD`) and
|
|
597
|
+
# custom code `TRANSACTION_HISTORY_SIGNALS` features, allowing clients to inspect
|
|
598
|
+
# feature values before writing rules and debug rule behavior.
|
|
599
|
+
sig do
|
|
600
|
+
params(
|
|
601
|
+
card_token: String,
|
|
602
|
+
request_options: Lithic::RequestOptions::OrHash
|
|
603
|
+
).returns(Lithic::SignalsResponse)
|
|
604
|
+
end
|
|
605
|
+
def retrieve_signals(
|
|
606
|
+
# The token of the card to fetch signals for.
|
|
607
|
+
card_token,
|
|
608
|
+
request_options: {}
|
|
609
|
+
)
|
|
610
|
+
end
|
|
611
|
+
|
|
589
612
|
# Get a Card's available spend limit, which is based on the spend limit configured
|
|
590
613
|
# on the Card and the amount already spent over the spend limit's duration. For
|
|
591
614
|
# example, if the Card has a monthly spend limit of $1000 configured, and has
|
|
@@ -10,7 +10,7 @@ module Lithic
|
|
|
10
10
|
auth_rule_tokens: ::Array[String],
|
|
11
11
|
cardholder_currency: String,
|
|
12
12
|
comment: String,
|
|
13
|
-
substatus: Lithic::Models::Account::substatus
|
|
13
|
+
substatus: Lithic::Models::Account::substatus?,
|
|
14
14
|
verification_address: Lithic::Account::VerificationAddress
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -41,11 +41,7 @@ module Lithic
|
|
|
41
41
|
|
|
42
42
|
def comment=: (String) -> String
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def substatus=: (
|
|
47
|
-
Lithic::Models::Account::substatus
|
|
48
|
-
) -> Lithic::Models::Account::substatus
|
|
44
|
+
attr_accessor substatus: Lithic::Models::Account::substatus?
|
|
49
45
|
|
|
50
46
|
attr_reader verification_address: Lithic::Account::VerificationAddress?
|
|
51
47
|
|
|
@@ -62,7 +58,7 @@ module Lithic
|
|
|
62
58
|
?auth_rule_tokens: ::Array[String],
|
|
63
59
|
?cardholder_currency: String,
|
|
64
60
|
?comment: String,
|
|
65
|
-
?substatus: Lithic::Models::Account::substatus
|
|
61
|
+
?substatus: Lithic::Models::Account::substatus?,
|
|
66
62
|
?verification_address: Lithic::Account::VerificationAddress
|
|
67
63
|
) -> void
|
|
68
64
|
|
|
@@ -75,7 +71,7 @@ module Lithic
|
|
|
75
71
|
auth_rule_tokens: ::Array[String],
|
|
76
72
|
cardholder_currency: String,
|
|
77
73
|
comment: String,
|
|
78
|
-
substatus: Lithic::Models::Account::substatus
|
|
74
|
+
substatus: Lithic::Models::Account::substatus?,
|
|
79
75
|
verification_address: Lithic::Account::VerificationAddress
|
|
80
76
|
}
|
|
81
77
|
|
|
@@ -10,7 +10,7 @@ module Lithic
|
|
|
10
10
|
control_person: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson,
|
|
11
11
|
created: Time,
|
|
12
12
|
email: String,
|
|
13
|
-
exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type
|
|
13
|
+
exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?,
|
|
14
14
|
external_id: String,
|
|
15
15
|
individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual,
|
|
16
16
|
naics_code: String,
|
|
@@ -61,11 +61,7 @@ module Lithic
|
|
|
61
61
|
|
|
62
62
|
def email=: (String) -> String
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
def exemption_type=: (
|
|
67
|
-
Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type
|
|
68
|
-
) -> Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type
|
|
64
|
+
attr_accessor exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?
|
|
69
65
|
|
|
70
66
|
attr_reader external_id: String?
|
|
71
67
|
|
|
@@ -132,7 +128,7 @@ module Lithic
|
|
|
132
128
|
?control_person: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson,
|
|
133
129
|
?created: Time,
|
|
134
130
|
?email: String,
|
|
135
|
-
?exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type
|
|
131
|
+
?exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?,
|
|
136
132
|
?external_id: String,
|
|
137
133
|
?individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual,
|
|
138
134
|
?naics_code: String,
|
|
@@ -155,7 +151,7 @@ module Lithic
|
|
|
155
151
|
control_person: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson,
|
|
156
152
|
created: Time,
|
|
157
153
|
email: String,
|
|
158
|
-
exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type
|
|
154
|
+
exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?,
|
|
159
155
|
external_id: String,
|
|
160
156
|
individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual,
|
|
161
157
|
naics_code: String,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Lithic
|
|
2
|
+
module Models
|
|
3
|
+
type account_retrieve_signals_params =
|
|
4
|
+
{ account_token: String } & Lithic::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class AccountRetrieveSignalsParams < Lithic::Internal::Type::BaseModel
|
|
7
|
+
extend Lithic::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Lithic::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor account_token: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
account_token: String,
|
|
14
|
+
?request_options: Lithic::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
account_token: String,
|
|
19
|
+
request_options: Lithic::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -8,7 +8,7 @@ module Lithic
|
|
|
8
8
|
lifetime_spend_limit: Integer,
|
|
9
9
|
monthly_spend_limit: Integer,
|
|
10
10
|
state: Lithic::Models::AccountUpdateParams::state,
|
|
11
|
-
substatus: Lithic::Models::AccountUpdateParams::substatus
|
|
11
|
+
substatus: Lithic::Models::AccountUpdateParams::substatus?,
|
|
12
12
|
verification_address: Lithic::AccountUpdateParams::VerificationAddress
|
|
13
13
|
}
|
|
14
14
|
& Lithic::Internal::Type::request_parameters
|
|
@@ -41,11 +41,7 @@ module Lithic
|
|
|
41
41
|
Lithic::Models::AccountUpdateParams::state
|
|
42
42
|
) -> Lithic::Models::AccountUpdateParams::state
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def substatus=: (
|
|
47
|
-
Lithic::Models::AccountUpdateParams::substatus
|
|
48
|
-
) -> Lithic::Models::AccountUpdateParams::substatus
|
|
44
|
+
attr_accessor substatus: Lithic::Models::AccountUpdateParams::substatus?
|
|
49
45
|
|
|
50
46
|
attr_reader verification_address: Lithic::AccountUpdateParams::VerificationAddress?
|
|
51
47
|
|
|
@@ -60,7 +56,7 @@ module Lithic
|
|
|
60
56
|
?lifetime_spend_limit: Integer,
|
|
61
57
|
?monthly_spend_limit: Integer,
|
|
62
58
|
?state: Lithic::Models::AccountUpdateParams::state,
|
|
63
|
-
?substatus: Lithic::Models::AccountUpdateParams::substatus
|
|
59
|
+
?substatus: Lithic::Models::AccountUpdateParams::substatus?,
|
|
64
60
|
?verification_address: Lithic::AccountUpdateParams::VerificationAddress,
|
|
65
61
|
?request_options: Lithic::request_opts
|
|
66
62
|
) -> void
|
|
@@ -72,7 +68,7 @@ module Lithic
|
|
|
72
68
|
lifetime_spend_limit: Integer,
|
|
73
69
|
monthly_spend_limit: Integer,
|
|
74
70
|
state: Lithic::Models::AccountUpdateParams::state,
|
|
75
|
-
substatus: Lithic::Models::AccountUpdateParams::substatus
|
|
71
|
+
substatus: Lithic::Models::AccountUpdateParams::substatus?,
|
|
76
72
|
verification_address: Lithic::AccountUpdateParams::VerificationAddress,
|
|
77
73
|
request_options: Lithic::RequestOptions
|
|
78
74
|
}
|
|
@@ -126,6 +126,7 @@ module Lithic
|
|
|
126
126
|
| Lithic::AuthRules::ConditionalAuthorizationActionParameters
|
|
127
127
|
| Lithic::AuthRules::ConditionalACHActionParameters
|
|
128
128
|
| Lithic::AuthRules::ConditionalTokenizationActionParameters
|
|
129
|
+
| Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters
|
|
129
130
|
| Lithic::AuthRules::TypescriptCodeParameters
|
|
130
131
|
|
|
131
132
|
module Parameters
|
|
@@ -174,6 +175,7 @@ module Lithic
|
|
|
174
175
|
| Lithic::AuthRules::ConditionalAuthorizationActionParameters
|
|
175
176
|
| Lithic::AuthRules::ConditionalACHActionParameters
|
|
176
177
|
| Lithic::AuthRules::ConditionalTokenizationActionParameters
|
|
178
|
+
| Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters
|
|
177
179
|
| Lithic::AuthRules::TypescriptCodeParameters
|
|
178
180
|
|
|
179
181
|
module Parameters
|
|
@@ -42,6 +42,7 @@ module Lithic
|
|
|
42
42
|
| Lithic::AuthRules::ConditionalAuthorizationActionParameters
|
|
43
43
|
| Lithic::AuthRules::ConditionalACHActionParameters
|
|
44
44
|
| Lithic::AuthRules::ConditionalTokenizationActionParameters
|
|
45
|
+
| Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters
|
|
45
46
|
| Lithic::AuthRules::TypescriptCodeParameters
|
|
46
47
|
|
|
47
48
|
module Parameters
|