lithic 0.13.0 → 0.15.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.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +4 -0
  5. data/lib/lithic/internal/transport/base_client.rb +2 -0
  6. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +4 -4
  7. data/lib/lithic/models/account_retrieve_signals_params.rb +20 -0
  8. data/lib/lithic/models/auth_rules/auth_rule.rb +10 -6
  9. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +2 -2
  10. data/lib/lithic/models/auth_rules/auth_rule_version.rb +5 -3
  11. data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +8 -6
  12. data/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +4 -4
  13. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +119 -44
  14. data/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb +533 -0
  15. data/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb +18 -14
  16. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +6 -6
  17. data/lib/lithic/models/auth_rules/conditional_value.rb +3 -2
  18. data/lib/lithic/models/auth_rules/v2_create_params.rb +15 -9
  19. data/lib/lithic/models/auth_rules/v2_draft_params.rb +5 -3
  20. data/lib/lithic/models/balance.rb +8 -6
  21. data/lib/lithic/models/card_authorization.rb +1266 -0
  22. data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +3 -1253
  23. data/lib/lithic/models/card_authorization_challenge_response_params.rb +40 -0
  24. data/lib/lithic/models/card_authorization_challenge_response_webhook_event.rb +1 -0
  25. data/lib/lithic/models/card_authorization_challenge_webhook_event.rb +67 -0
  26. data/lib/lithic/models/card_program.rb +2 -2
  27. data/lib/lithic/models/card_retrieve_signals_params.rb +20 -0
  28. data/lib/lithic/models/event.rb +13 -4
  29. data/lib/lithic/models/event_list_params.rb +7 -2
  30. data/lib/lithic/models/event_subscription.rb +7 -2
  31. data/lib/lithic/models/events/subscription_create_params.rb +7 -2
  32. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
  33. data/lib/lithic/models/events/subscription_update_params.rb +7 -2
  34. data/lib/lithic/models/external_bank_account.rb +1 -1
  35. data/lib/lithic/models/external_bank_account_pause_params.rb +20 -0
  36. data/lib/lithic/models/financial_accounts/statement.rb +4 -4
  37. data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +3 -2
  38. data/lib/lithic/models/financial_event.rb +1 -0
  39. data/lib/lithic/models/kyb_business_entity.rb +2 -2
  40. data/lib/lithic/models/parsed_webhook_event.rb +4 -1
  41. data/lib/lithic/models/settlement_detail.rb +14 -14
  42. data/lib/lithic/models/signals_response.rb +306 -0
  43. data/lib/lithic/models/statement_totals.rb +6 -6
  44. data/lib/lithic/models/tokenization_decline_reason.rb +1 -0
  45. data/lib/lithic/models/transaction.rb +2 -2
  46. data/lib/lithic/models/transfer_limits_response.rb +12 -12
  47. data/lib/lithic/models.rb +14 -0
  48. data/lib/lithic/resources/accounts.rb +27 -0
  49. data/lib/lithic/resources/auth_rules/v2.rb +1 -1
  50. data/lib/lithic/resources/card_authorizations.rb +45 -0
  51. data/lib/lithic/resources/cards.rb +25 -0
  52. data/lib/lithic/resources/external_bank_accounts.rb +19 -0
  53. data/lib/lithic/resources/webhooks.rb +1 -1
  54. data/lib/lithic/version.rb +1 -1
  55. data/lib/lithic.rb +9 -0
  56. data/rbi/lithic/client.rbi +3 -0
  57. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +6 -12
  58. data/rbi/lithic/models/account_retrieve_signals_params.rbi +35 -0
  59. data/rbi/lithic/models/auth_rules/auth_rule.rbi +8 -4
  60. data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +4 -2
  61. data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +9 -6
  62. data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +3 -3
  63. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +214 -63
  64. data/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi +1147 -0
  65. data/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi +24 -18
  66. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +6 -6
  67. data/rbi/lithic/models/auth_rules/conditional_value.rbi +1 -1
  68. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +24 -12
  69. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +8 -4
  70. data/rbi/lithic/models/balance.rbi +12 -6
  71. data/rbi/lithic/models/card_authorization.rbi +2540 -0
  72. data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +5 -2758
  73. data/rbi/lithic/models/card_authorization_challenge_response_params.rbi +93 -0
  74. data/rbi/lithic/models/card_authorization_challenge_response_webhook_event.rbi +5 -0
  75. data/rbi/lithic/models/card_authorization_challenge_webhook_event.rbi +119 -0
  76. data/rbi/lithic/models/card_program.rbi +3 -6
  77. data/rbi/lithic/models/card_retrieve_signals_params.rbi +35 -0
  78. data/rbi/lithic/models/event.rbi +23 -6
  79. data/rbi/lithic/models/event_list_params.rbi +11 -2
  80. data/rbi/lithic/models/event_subscription.rbi +11 -2
  81. data/rbi/lithic/models/events/subscription_create_params.rbi +11 -2
  82. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
  83. data/rbi/lithic/models/events/subscription_update_params.rbi +11 -2
  84. data/rbi/lithic/models/external_bank_account_pause_params.rbi +41 -0
  85. data/rbi/lithic/models/financial_accounts/statement.rbi +6 -12
  86. data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +8 -6
  87. data/rbi/lithic/models/financial_event.rbi +2 -0
  88. data/rbi/lithic/models/kyb_business_entity.rbi +3 -6
  89. data/rbi/lithic/models/parsed_webhook_event.rbi +1 -0
  90. data/rbi/lithic/models/settlement_detail.rbi +15 -15
  91. data/rbi/lithic/models/signals_response.rbi +352 -0
  92. data/rbi/lithic/models/statement_totals.rbi +9 -18
  93. data/rbi/lithic/models/tokenization_decline_reason.rbi +2 -0
  94. data/rbi/lithic/models/transaction.rbi +3 -3
  95. data/rbi/lithic/models/transfer_limits_response.rbi +48 -48
  96. data/rbi/lithic/models.rbi +17 -0
  97. data/rbi/lithic/resources/accounts.rbi +21 -0
  98. data/rbi/lithic/resources/auth_rules/v2.rbi +2 -1
  99. data/rbi/lithic/resources/card_authorizations.rbi +35 -0
  100. data/rbi/lithic/resources/cards.rbi +19 -0
  101. data/rbi/lithic/resources/external_bank_accounts.rbi +10 -0
  102. data/rbi/lithic/resources/webhooks.rbi +4 -1
  103. data/sig/lithic/client.rbs +2 -0
  104. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +8 -12
  105. data/sig/lithic/models/account_retrieve_signals_params.rbs +23 -0
  106. data/sig/lithic/models/auth_rules/auth_rule.rbs +2 -0
  107. data/sig/lithic/models/auth_rules/auth_rule_version.rbs +1 -0
  108. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +29 -3
  109. data/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs +276 -0
  110. data/sig/lithic/models/auth_rules/conditional_value.rbs +1 -1
  111. data/sig/lithic/models/auth_rules/v2_create_params.rbs +3 -0
  112. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -0
  113. data/sig/lithic/models/balance.rbs +17 -9
  114. data/sig/lithic/models/card_authorization.rbs +1038 -0
  115. data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +7 -1013
  116. data/sig/lithic/models/card_authorization_challenge_response_params.rbs +42 -0
  117. data/sig/lithic/models/card_authorization_challenge_response_webhook_event.rbs +2 -1
  118. data/sig/lithic/models/card_authorization_challenge_webhook_event.rbs +53 -0
  119. data/sig/lithic/models/card_program.rbs +4 -6
  120. data/sig/lithic/models/card_retrieve_signals_params.rbs +23 -0
  121. data/sig/lithic/models/event.rbs +2 -0
  122. data/sig/lithic/models/event_list_params.rbs +2 -0
  123. data/sig/lithic/models/event_subscription.rbs +2 -0
  124. data/sig/lithic/models/events/subscription_create_params.rbs +2 -0
  125. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +2 -0
  126. data/sig/lithic/models/events/subscription_update_params.rbs +2 -0
  127. data/sig/lithic/models/external_bank_account_pause_params.rbs +24 -0
  128. data/sig/lithic/models/financial_accounts/statement.rbs +8 -12
  129. data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +6 -6
  130. data/sig/lithic/models/financial_event.rbs +2 -0
  131. data/sig/lithic/models/kyb_business_entity.rbs +4 -6
  132. data/sig/lithic/models/parsed_webhook_event.rbs +1 -0
  133. data/sig/lithic/models/settlement_detail.rbs +18 -18
  134. data/sig/lithic/models/signals_response.rbs +170 -0
  135. data/sig/lithic/models/statement_totals.rbs +12 -18
  136. data/sig/lithic/models/tokenization_decline_reason.rbs +2 -0
  137. data/sig/lithic/models/transaction.rbs +4 -8
  138. data/sig/lithic/models/transfer_limits_response.rbs +24 -36
  139. data/sig/lithic/models.rbs +14 -0
  140. data/sig/lithic/resources/accounts.rbs +5 -0
  141. data/sig/lithic/resources/card_authorizations.rbs +13 -0
  142. data/sig/lithic/resources/cards.rbs +5 -0
  143. data/sig/lithic/resources/external_bank_accounts.rbs +5 -0
  144. data/sig/lithic/resources/webhooks.rbs +1 -0
  145. metadata +29 -2
@@ -61,26 +61,27 @@ module Lithic
61
61
  # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
62
62
  # fee field in the settlement/cardholder billing currency. This is the amount
63
63
  # the issuer should authorize against unless the issuer is paying the acquirer
64
- # fee on behalf of the cardholder.
64
+ # fee on behalf of the cardholder. Use an integer value.
65
65
  # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
66
- # represents the amount of cash being withdrawn or advanced.
66
+ # represents the amount of cash being withdrawn or advanced. Use an integer
67
+ # value.
67
68
  # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
68
69
  # given authorization. Scores are on a range of 0-999, with 0 representing the
69
70
  # lowest risk and 999 representing the highest risk. For Visa transactions,
70
71
  # where the raw score has a range of 0-99, Lithic will normalize the score by
71
- # multiplying the raw score by 10x.
72
+ # multiplying the raw score by 10x. Use an integer value.
72
73
  # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
73
- # trailing 15 minutes before the authorization.
74
+ # trailing 15 minutes before the authorization. Use an integer value.
74
75
  # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
75
- # trailing hour up and until the authorization.
76
+ # trailing hour up and until the authorization. Use an integer value.
76
77
  # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
77
- # trailing 24 hours up and until the authorization.
78
+ # trailing 24 hours up and until the authorization. Use an integer value.
78
79
  # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in
79
- # the trailing 15 minutes before the authorization.
80
+ # the trailing 15 minutes before the authorization. Use an integer value.
80
81
  # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in
81
- # the trailing hour up and until the authorization.
82
+ # the trailing hour up and until the authorization. Use an integer value.
82
83
  # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in
83
- # the trailing 24 hours up and until the authorization.
84
+ # the trailing 24 hours up and until the authorization. Use an integer value.
84
85
  # - `CARD_STATE`: The current state of the card associated with the transaction.
85
86
  # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
86
87
  # `PENDING_FULFILLMENT`.
@@ -105,18 +106,21 @@ module Lithic
105
106
  # data, the service location postal code is used. Otherwise, falls back to the
106
107
  # card acceptor postal code.
107
108
  # - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
109
+ # Use an integer value.
108
110
  # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
109
- # of the authorization.
111
+ # of the authorization. Use an integer value. For programs where Lithic does not
112
+ # manage or retain account holder data, this attribute does not evaluate.
110
113
  # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the
111
114
  # entity's transaction history. Null if fewer than 30 approved transactions in
112
115
  # the specified window. Requires `parameters.scope` and `parameters.interval`.
116
+ # Use a decimal value.
113
117
  # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the
114
118
  # entity over the specified window, in cents. Requires `parameters.scope` and
115
- # `parameters.interval`.
119
+ # `parameters.interval`. Use a decimal value.
116
120
  # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction
117
121
  # amounts for the entity over the specified window, in cents. Null if fewer than
118
122
  # 30 approved transactions in the specified window. Requires `parameters.scope`
119
- # and `parameters.interval`.
123
+ # and `parameters.interval`. Use a decimal value.
120
124
  # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen
121
125
  # in the entity's transaction history. Valid values are `TRUE`, `FALSE`.
122
126
  # Requires `parameters.scope`.
@@ -127,17 +131,31 @@ module Lithic
127
131
  # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`.
128
132
  # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for
129
133
  # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not
130
- # supported for `BUSINESS_ACCOUNT` scope.
134
+ # supported for `BUSINESS_ACCOUNT` scope. Use an integer value.
131
135
  # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved
132
- # transaction for the entity. Requires `parameters.scope`.
136
+ # transaction for the entity, rounded to the nearest whole day. Requires
137
+ # `parameters.scope`. Use an integer value.
133
138
  # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in
134
- # the entity's transaction history. Requires `parameters.scope`.
139
+ # the entity's transaction history. Requires `parameters.scope`. Use an integer
140
+ # value.
135
141
  # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the
136
142
  # card's approved transaction history (capped at the 1000 most recently seen
137
143
  # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no
138
144
  # `parameters` required.
139
145
  # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as
140
146
  # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required.
147
+ # Use a decimal value.
148
+ # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
149
+ # between the postal code centers of the last card-present transaction and the
150
+ # current transaction, divided by the elapsed time. Null if there is no prior
151
+ # card-present transaction, if either postal code cannot be geocoded, or if
152
+ # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a
153
+ # decimal value.
154
+ # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
155
+ # code centers of the last card-present transaction and the current transaction.
156
+ # Null if there is no prior card-present transaction or if either postal code
157
+ # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
158
+ # Use a decimal value.
141
159
  #
142
160
  # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute]
143
161
  required :attribute,
@@ -152,15 +170,16 @@ module Lithic
152
170
  # @!attribute value
153
171
  # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
154
172
  #
155
- # @return [String, Integer, Array<String>, Time]
173
+ # @return [String, Integer, Float, Array<String>, Time]
156
174
  required :value, union: -> { Lithic::AuthRules::ConditionalValue }
157
175
 
158
176
  # @!attribute parameters
159
- # Additional parameters required for transaction history signal attributes.
160
- # Required when `attribute` is one of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`,
161
- # `STDEV_TRANSACTION_AMOUNT`, `IS_NEW_COUNTRY`, `IS_NEW_MCC`,
162
- # `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`, `TIME_SINCE_LAST_TRANSACTION`,
163
- # or `DISTINCT_COUNTRY_COUNT`. Not used for other attributes.
177
+ # Additional parameters for certain attributes. Required when `attribute` is one
178
+ # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
179
+ # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
180
+ # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or
181
+ # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used
182
+ # for other attributes.
164
183
  #
165
184
  # @return [Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters, nil]
166
185
  optional :parameters,
@@ -175,9 +194,9 @@ module Lithic
175
194
  #
176
195
  # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute
177
196
  #
178
- # @param value [String, Integer, Array<String>, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
197
+ # @param value [String, Integer, Float, Array<String>, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
179
198
  #
180
- # @param parameters [Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters] Additional parameters required for transaction history signal attributes. Requir
199
+ # @param parameters [Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters] Additional parameters for certain attributes. Required when `attribute` is one o
181
200
 
182
201
  # The attribute to target.
183
202
  #
@@ -204,26 +223,27 @@ module Lithic
204
223
  # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
205
224
  # fee field in the settlement/cardholder billing currency. This is the amount
206
225
  # the issuer should authorize against unless the issuer is paying the acquirer
207
- # fee on behalf of the cardholder.
226
+ # fee on behalf of the cardholder. Use an integer value.
208
227
  # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
209
- # represents the amount of cash being withdrawn or advanced.
228
+ # represents the amount of cash being withdrawn or advanced. Use an integer
229
+ # value.
210
230
  # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
211
231
  # given authorization. Scores are on a range of 0-999, with 0 representing the
212
232
  # lowest risk and 999 representing the highest risk. For Visa transactions,
213
233
  # where the raw score has a range of 0-99, Lithic will normalize the score by
214
- # multiplying the raw score by 10x.
234
+ # multiplying the raw score by 10x. Use an integer value.
215
235
  # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
216
- # trailing 15 minutes before the authorization.
236
+ # trailing 15 minutes before the authorization. Use an integer value.
217
237
  # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
218
- # trailing hour up and until the authorization.
238
+ # trailing hour up and until the authorization. Use an integer value.
219
239
  # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
220
- # trailing 24 hours up and until the authorization.
240
+ # trailing 24 hours up and until the authorization. Use an integer value.
221
241
  # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in
222
- # the trailing 15 minutes before the authorization.
242
+ # the trailing 15 minutes before the authorization. Use an integer value.
223
243
  # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in
224
- # the trailing hour up and until the authorization.
244
+ # the trailing hour up and until the authorization. Use an integer value.
225
245
  # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in
226
- # the trailing 24 hours up and until the authorization.
246
+ # the trailing 24 hours up and until the authorization. Use an integer value.
227
247
  # - `CARD_STATE`: The current state of the card associated with the transaction.
228
248
  # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
229
249
  # `PENDING_FULFILLMENT`.
@@ -248,18 +268,21 @@ module Lithic
248
268
  # data, the service location postal code is used. Otherwise, falls back to the
249
269
  # card acceptor postal code.
250
270
  # - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
271
+ # Use an integer value.
251
272
  # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
252
- # of the authorization.
273
+ # of the authorization. Use an integer value. For programs where Lithic does not
274
+ # manage or retain account holder data, this attribute does not evaluate.
253
275
  # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the
254
276
  # entity's transaction history. Null if fewer than 30 approved transactions in
255
277
  # the specified window. Requires `parameters.scope` and `parameters.interval`.
278
+ # Use a decimal value.
256
279
  # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the
257
280
  # entity over the specified window, in cents. Requires `parameters.scope` and
258
- # `parameters.interval`.
281
+ # `parameters.interval`. Use a decimal value.
259
282
  # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction
260
283
  # amounts for the entity over the specified window, in cents. Null if fewer than
261
284
  # 30 approved transactions in the specified window. Requires `parameters.scope`
262
- # and `parameters.interval`.
285
+ # and `parameters.interval`. Use a decimal value.
263
286
  # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen
264
287
  # in the entity's transaction history. Valid values are `TRUE`, `FALSE`.
265
288
  # Requires `parameters.scope`.
@@ -270,17 +293,31 @@ module Lithic
270
293
  # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`.
271
294
  # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for
272
295
  # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not
273
- # supported for `BUSINESS_ACCOUNT` scope.
296
+ # supported for `BUSINESS_ACCOUNT` scope. Use an integer value.
274
297
  # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved
275
- # transaction for the entity. Requires `parameters.scope`.
298
+ # transaction for the entity, rounded to the nearest whole day. Requires
299
+ # `parameters.scope`. Use an integer value.
276
300
  # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in
277
- # the entity's transaction history. Requires `parameters.scope`.
301
+ # the entity's transaction history. Requires `parameters.scope`. Use an integer
302
+ # value.
278
303
  # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the
279
304
  # card's approved transaction history (capped at the 1000 most recently seen
280
305
  # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no
281
306
  # `parameters` required.
282
307
  # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as
283
308
  # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required.
309
+ # Use a decimal value.
310
+ # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
311
+ # between the postal code centers of the last card-present transaction and the
312
+ # current transaction, divided by the elapsed time. Null if there is no prior
313
+ # card-present transaction, if either postal code cannot be geocoded, or if
314
+ # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a
315
+ # decimal value.
316
+ # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
317
+ # code centers of the last card-present transaction and the current transaction.
318
+ # Null if there is no prior card-present transaction or if either postal code
319
+ # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
320
+ # Use a decimal value.
284
321
  #
285
322
  # @see Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition#attribute
286
323
  module Attribute
@@ -323,6 +360,8 @@ module Lithic
323
360
  DISTINCT_COUNTRY_COUNT = :DISTINCT_COUNTRY_COUNT
324
361
  IS_NEW_MERCHANT = :IS_NEW_MERCHANT
325
362
  THREE_DS_SUCCESS_RATE = :THREE_DS_SUCCESS_RATE
363
+ TRAVEL_SPEED = :TRAVEL_SPEED
364
+ DISTANCE_FROM_LAST_TRANSACTION = :DISTANCE_FROM_LAST_TRANSACTION
326
365
 
327
366
  # @!method self.values
328
367
  # @return [Array<Symbol>]
@@ -346,20 +385,36 @@ module Lithic
346
385
  optional :scope,
347
386
  enum: -> { Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope }
348
387
 
349
- # @!method initialize(interval: nil, scope: nil)
388
+ # @!attribute unit
389
+ # The unit for impossible travel attributes. Required when `attribute` is
390
+ # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.
391
+ #
392
+ # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).
393
+ #
394
+ # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
395
+ #
396
+ # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit, nil]
397
+ optional :unit,
398
+ enum: -> { Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit }
399
+
400
+ # @!method initialize(interval: nil, scope: nil, unit: nil)
350
401
  # Some parameter documentations has been truncated, see
351
402
  # {Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters}
352
403
  # for more details.
353
404
  #
354
- # Additional parameters required for transaction history signal attributes.
355
- # Required when `attribute` is one of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`,
356
- # `STDEV_TRANSACTION_AMOUNT`, `IS_NEW_COUNTRY`, `IS_NEW_MCC`,
357
- # `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`, `TIME_SINCE_LAST_TRANSACTION`,
358
- # or `DISTINCT_COUNTRY_COUNT`. Not used for other attributes.
405
+ # Additional parameters for certain attributes. Required when `attribute` is one
406
+ # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
407
+ # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
408
+ # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or
409
+ # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used
410
+ # for other attributes.
359
411
  #
360
412
  # @param interval [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval] The time window for statistical attributes (`AMOUNT_Z_SCORE`, `AVG_TRANSACTION_A
361
413
  #
362
414
  # @param scope [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope] The entity scope to evaluate the attribute against.
415
+ #
416
+ # @param unit [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit] The unit for impossible travel attributes. Required when `attribute` is
417
+ # `TRAVEL\_
363
418
 
364
419
  # The time window for statistical attributes (`AMOUNT_Z_SCORE`,
365
420
  # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for
@@ -391,6 +446,26 @@ module Lithic
391
446
  # @!method self.values
392
447
  # @return [Array<Symbol>]
393
448
  end
449
+
450
+ # The unit for impossible travel attributes. Required when `attribute` is
451
+ # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.
452
+ #
453
+ # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).
454
+ #
455
+ # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
456
+ #
457
+ # @see Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters#unit
458
+ module Unit
459
+ extend Lithic::Internal::Type::Enum
460
+
461
+ MPH = :MPH
462
+ KPH = :KPH
463
+ MILES = :MILES
464
+ KILOMETERS = :KILOMETERS
465
+
466
+ # @!method self.values
467
+ # @return [Array<Symbol>]
468
+ end
394
469
  end
395
470
  end
396
471
  end