lithic 0.21.0 → 0.22.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 (148) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +1 -10
  4. data/lib/lithic/internal/type/union.rb +21 -7
  5. data/lib/lithic/models/account_holder_create_params.rb +4 -2
  6. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +120 -66
  7. data/lib/lithic/models/account_holder_update_params.rb +6 -3
  8. data/lib/lithic/models/account_holder_update_response.rb +156 -86
  9. data/lib/lithic/models/account_holder_updated_webhook_event.rb +120 -66
  10. data/lib/lithic/models/account_holders/account_holder_entity.rb +35 -19
  11. data/lib/lithic/models/account_holders/entity_create_params.rb +39 -21
  12. data/lib/lithic/models/address.rb +33 -19
  13. data/lib/lithic/models/address_update.rb +27 -11
  14. data/lib/lithic/models/auth_rules/auth_rule.rb +55 -27
  15. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +189 -6
  16. data/lib/lithic/models/auth_rules/auth_rule_entities.rb +47 -0
  17. data/lib/lithic/models/auth_rules/auth_rule_entities_response.rb +31 -0
  18. data/lib/lithic/models/auth_rules/auth_rule_entity.rb +150 -0
  19. data/lib/lithic/models/auth_rules/auth_rule_version.rb +3 -6
  20. data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +33 -6
  21. data/lib/lithic/models/auth_rules/conditional_attribute.rb +101 -5
  22. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +3 -439
  23. data/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb +7 -0
  24. data/lib/lithic/models/auth_rules/merchant_lock_parameters.rb +11 -1
  25. data/lib/lithic/models/auth_rules/v2_create_params.rb +203 -45
  26. data/lib/lithic/models/auth_rules/v2_draft_params.rb +3 -6
  27. data/lib/lithic/models/auth_rules/v2_list_params.rb +5 -3
  28. data/lib/lithic/models/auth_rules/v2_update_entities_params.rb +39 -0
  29. data/lib/lithic/models/auth_rules/v2_update_params.rb +133 -12
  30. data/lib/lithic/models/card_authorization.rb +11 -1
  31. data/lib/lithic/models/card_create_params.rb +11 -1
  32. data/lib/lithic/models/card_update_params.rb +12 -1
  33. data/lib/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rb +279 -0
  34. data/lib/lithic/models/financial_accounts/installment_plans/statement_list_params.rb +106 -0
  35. data/lib/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rb +42 -0
  36. data/lib/lithic/models/financial_accounts/loan_tape.rb +62 -1
  37. data/lib/lithic/models/kyb.rb +4 -2
  38. data/lib/lithic/models/kyb_business_entity.rb +35 -19
  39. data/lib/lithic/models/kyc.rb +2 -1
  40. data/lib/lithic/models/non_pci_card.rb +11 -1
  41. data/lib/lithic/models/parsed_webhook_event.rb +120 -66
  42. data/lib/lithic/models/payment.rb +2 -1
  43. data/lib/lithic/models/transaction.rb +2 -1
  44. data/lib/lithic/models/transaction_simulate_authorization_params.rb +28 -4
  45. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +11 -1
  46. data/lib/lithic/models/transaction_simulate_return_params.rb +24 -1
  47. data/lib/lithic/resources/auth_rules/v2/backtests.rb +8 -8
  48. data/lib/lithic/resources/auth_rules/v2.rb +44 -8
  49. data/lib/lithic/resources/cards.rb +6 -2
  50. data/lib/lithic/resources/financial_accounts/installment_plans/statements.rb +107 -0
  51. data/lib/lithic/resources/financial_accounts/installment_plans.rb +4 -0
  52. data/lib/lithic/resources/transactions.rb +17 -4
  53. data/lib/lithic/resources/webhooks.rb +18 -0
  54. data/lib/lithic/version.rb +1 -1
  55. data/lib/lithic.rb +8 -1
  56. data/rbi/lithic/models/account_holder_create_params.rbi +8 -4
  57. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +195 -90
  58. data/rbi/lithic/models/account_holder_update_params.rbi +12 -6
  59. data/rbi/lithic/models/account_holder_update_response.rbi +254 -117
  60. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +195 -90
  61. data/rbi/lithic/models/account_holders/account_holder_entity.rbi +59 -27
  62. data/rbi/lithic/models/account_holders/entity_create_params.rbi +65 -30
  63. data/rbi/lithic/models/address.rbi +57 -29
  64. data/rbi/lithic/models/address_update.rbi +50 -24
  65. data/rbi/lithic/models/auth_rules/auth_rule.rbi +53 -19
  66. data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +442 -13
  67. data/rbi/lithic/models/auth_rules/auth_rule_entities.rbi +163 -0
  68. data/rbi/lithic/models/auth_rules/auth_rule_entities_response.rbi +72 -0
  69. data/rbi/lithic/models/auth_rules/auth_rule_entity.rbi +199 -0
  70. data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +0 -2
  71. data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +67 -9
  72. data/rbi/lithic/models/auth_rules/conditional_attribute.rbi +193 -5
  73. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +3 -939
  74. data/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi +14 -0
  75. data/rbi/lithic/models/auth_rules/merchant_lock_parameters.rbi +14 -3
  76. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +325 -50
  77. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +0 -4
  78. data/rbi/lithic/models/auth_rules/v2_list_params.rbi +6 -3
  79. data/rbi/lithic/models/auth_rules/v2_update_entities_params.rbi +68 -0
  80. data/rbi/lithic/models/auth_rules/v2_update_params.rbi +198 -5
  81. data/rbi/lithic/models/card_authorization.rbi +12 -0
  82. data/rbi/lithic/models/card_create_params.rbi +15 -0
  83. data/rbi/lithic/models/card_update_params.rbi +17 -0
  84. data/rbi/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbi +452 -0
  85. data/rbi/lithic/models/financial_accounts/installment_plans/statement_list_params.rbi +191 -0
  86. data/rbi/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rbi +66 -0
  87. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +119 -0
  88. data/rbi/lithic/models/kyb.rbi +8 -4
  89. data/rbi/lithic/models/kyb_business_entity.rbi +59 -27
  90. data/rbi/lithic/models/kyc.rbi +4 -2
  91. data/rbi/lithic/models/non_pci_card.rbi +12 -0
  92. data/rbi/lithic/models/parsed_webhook_event.rbi +195 -90
  93. data/rbi/lithic/models/payment.rbi +4 -2
  94. data/rbi/lithic/models/transaction.rbi +4 -2
  95. data/rbi/lithic/models/transaction_simulate_authorization_params.rbi +42 -4
  96. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +15 -0
  97. data/rbi/lithic/models/transaction_simulate_return_params.rbi +30 -0
  98. data/rbi/lithic/resources/account_holders/entities.rbi +2 -1
  99. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +8 -8
  100. data/rbi/lithic/resources/auth_rules/v2.rbi +43 -8
  101. data/rbi/lithic/resources/cards.rbi +11 -0
  102. data/rbi/lithic/resources/financial_accounts/installment_plans/statements.rbi +86 -0
  103. data/rbi/lithic/resources/financial_accounts/installment_plans.rbi +7 -0
  104. data/rbi/lithic/resources/transactions.rbi +31 -2
  105. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +39 -39
  106. data/sig/lithic/models/account_holder_update_response.rbs +52 -52
  107. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +39 -39
  108. data/sig/lithic/models/account_holders/account_holder_entity.rbs +13 -13
  109. data/sig/lithic/models/account_holders/entity_create_params.rbs +13 -13
  110. data/sig/lithic/models/address.rbs +13 -13
  111. data/sig/lithic/models/address_update.rbs +8 -12
  112. data/sig/lithic/models/auth_rules/auth_rule.rbs +8 -7
  113. data/sig/lithic/models/auth_rules/auth_rule_condition.rbs +89 -3
  114. data/sig/lithic/models/auth_rules/auth_rule_entities.rbs +37 -0
  115. data/sig/lithic/models/auth_rules/auth_rule_entities_response.rbs +29 -0
  116. data/sig/lithic/models/auth_rules/auth_rule_entity.rbs +80 -0
  117. data/sig/lithic/models/auth_rules/auth_rule_version.rbs +1 -2
  118. data/sig/lithic/models/auth_rules/conditional_3ds_action_parameters.rbs +10 -0
  119. data/sig/lithic/models/auth_rules/conditional_attribute.rbs +46 -0
  120. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +4 -204
  121. data/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs +2 -0
  122. data/sig/lithic/models/auth_rules/merchant_lock_parameters.rbs +10 -3
  123. data/sig/lithic/models/auth_rules/v2_create_params.rbs +86 -16
  124. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -2
  125. data/sig/lithic/models/auth_rules/v2_update_entities_params.rbs +46 -0
  126. data/sig/lithic/models/auth_rules/v2_update_params.rbs +47 -1
  127. data/sig/lithic/models/card_authorization.rbs +5 -0
  128. data/sig/lithic/models/card_create_params.rbs +7 -0
  129. data/sig/lithic/models/card_update_params.rbs +8 -1
  130. data/sig/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbs +191 -0
  131. data/sig/lithic/models/financial_accounts/installment_plans/statement_list_params.rbs +90 -0
  132. data/sig/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rbs +40 -0
  133. data/sig/lithic/models/financial_accounts/loan_tape.rbs +47 -0
  134. data/sig/lithic/models/kyb_business_entity.rbs +13 -13
  135. data/sig/lithic/models/non_pci_card.rbs +5 -0
  136. data/sig/lithic/models/parsed_webhook_event.rbs +39 -39
  137. data/sig/lithic/models/transaction_simulate_authorization_params.rbs +14 -0
  138. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +7 -0
  139. data/sig/lithic/models/transaction_simulate_return_params.rbs +19 -1
  140. data/sig/lithic/resources/auth_rules/v2.rbs +7 -0
  141. data/sig/lithic/resources/cards.rbs +2 -0
  142. data/sig/lithic/resources/financial_accounts/installment_plans/statements.rbs +30 -0
  143. data/sig/lithic/resources/financial_accounts/installment_plans.rbs +2 -0
  144. data/sig/lithic/resources/transactions.rbs +5 -0
  145. metadata +26 -5
  146. data/lib/lithic/models/auth_rules/conditional_block_parameters.rb +0 -20
  147. data/rbi/lithic/models/auth_rules/conditional_block_parameters.rbi +0 -37
  148. data/sig/lithic/models/auth_rules/conditional_block_parameters.rbs +0 -20
@@ -20,23 +20,14 @@ module Lithic
20
20
  end
21
21
  attr_accessor :action
22
22
 
23
- sig do
24
- returns(
25
- T::Array[
26
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition
27
- ]
28
- )
29
- end
23
+ sig { returns(T::Array[Lithic::AuthRules::AuthRuleCondition]) }
30
24
  attr_accessor :conditions
31
25
 
32
26
  sig do
33
27
  params(
34
28
  action:
35
29
  Lithic::AuthRules::ConditionalAuthorizationActionParameters::Action::OrSymbol,
36
- conditions:
37
- T::Array[
38
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::OrHash
39
- ]
30
+ conditions: T::Array[Lithic::AuthRules::AuthRuleCondition::OrHash]
40
31
  ).returns(T.attached_class)
41
32
  end
42
33
  def self.new(
@@ -51,10 +42,7 @@ module Lithic
51
42
  {
52
43
  action:
53
44
  Lithic::AuthRules::ConditionalAuthorizationActionParameters::Action::OrSymbol,
54
- conditions:
55
- T::Array[
56
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition
57
- ]
45
+ conditions: T::Array[Lithic::AuthRules::AuthRuleCondition]
58
46
  }
59
47
  )
60
48
  end
@@ -95,930 +83,6 @@ module Lithic
95
83
  def self.values
96
84
  end
97
85
  end
98
-
99
- class Condition < Lithic::Internal::Type::BaseModel
100
- OrHash =
101
- T.type_alias do
102
- T.any(
103
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition,
104
- Lithic::Internal::AnyHash
105
- )
106
- end
107
-
108
- # The attribute to target.
109
- #
110
- # The following attributes may be targeted:
111
- #
112
- # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
113
- # business by the types of goods or services it provides.
114
- # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
115
- # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
116
- # Netherlands Antilles.
117
- # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
118
- # the transaction.
119
- # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
120
- # (merchant).
121
- # - `DESCRIPTOR`: Short description of card acceptor.
122
- # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
123
- # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
124
- # `TOKEN_AUTHENTICATED`.
125
- # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
126
- # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
127
- # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
128
- # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
129
- # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
130
- # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
131
- # fee field in the settlement/cardholder billing currency. This is the amount
132
- # the issuer should authorize against unless the issuer is paying the acquirer
133
- # fee on behalf of the cardholder. Use an integer value.
134
- # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
135
- # represents the amount of cash being withdrawn or advanced. Use an integer
136
- # value.
137
- # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
138
- # given authorization. Scores are on a range of 0-999, with 0 representing the
139
- # lowest risk and 999 representing the highest risk. For Visa transactions,
140
- # where the raw score has a range of 0-99, Lithic will normalize the score by
141
- # multiplying the raw score by 10x. Use an integer value.
142
- # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
143
- # trailing 15 minutes before the authorization. Use an integer value.
144
- # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
145
- # trailing hour up and until the authorization. Use an integer value.
146
- # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
147
- # trailing 24 hours up and until the authorization. Use an integer value.
148
- # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in
149
- # the trailing 15 minutes before the authorization. Use an integer value.
150
- # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in
151
- # the trailing hour up and until the authorization. Use an integer value.
152
- # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in
153
- # the trailing 24 hours up and until the authorization. Use an integer value.
154
- # - `CARD_STATE`: The current state of the card associated with the transaction.
155
- # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
156
- # `PENDING_FULFILLMENT`.
157
- # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
158
- # Valid values are `TRUE`, `FALSE`.
159
- # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
160
- # `OK`, `BLOCKED`.
161
- # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
162
- # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
163
- # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
164
- # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
165
- # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
166
- # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
167
- # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
168
- # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
169
- # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the
170
- # cardholder received the service, e.g. "NY". When a service location is present
171
- # in the network data, the service location state is used. Otherwise, falls back
172
- # to the card acceptor state.
173
- # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received
174
- # the service, e.g. "10001". When a service location is present in the network
175
- # data, the service location postal code is used. Otherwise, falls back to the
176
- # card acceptor postal code.
177
- # - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
178
- # Use an integer value.
179
- # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
180
- # of the authorization. Use an integer value. For programs where Lithic does not
181
- # manage or retain account holder data, this attribute does not evaluate.
182
- # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the
183
- # entity's transaction history. Null if fewer than 30 approved transactions in
184
- # the specified window. Requires `parameters.scope` and `parameters.interval`.
185
- # Use a decimal value.
186
- # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the
187
- # entity over the specified window, in cents. Requires `parameters.scope` and
188
- # `parameters.interval`. Use a decimal value.
189
- # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction
190
- # amounts for the entity over the specified window, in cents. Null if fewer than
191
- # 30 approved transactions in the specified window. Requires `parameters.scope`
192
- # and `parameters.interval`. Use a decimal value.
193
- # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen
194
- # in the entity's transaction history. Valid values are `TRUE`, `FALSE`.
195
- # Requires `parameters.scope`.
196
- # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's
197
- # transaction history. Valid values are `TRUE`, `FALSE`. Requires
198
- # `parameters.scope`.
199
- # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity.
200
- # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`.
201
- # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for
202
- # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not
203
- # supported for `BUSINESS_ACCOUNT` scope. Use an integer value.
204
- # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved
205
- # transaction for the entity, rounded to the nearest whole day. Requires
206
- # `parameters.scope`. Use an integer value.
207
- # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in
208
- # the entity's transaction history. Requires `parameters.scope`. Use an integer
209
- # value.
210
- # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the
211
- # card's approved transaction history (capped at the 1000 most recently seen
212
- # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no
213
- # `parameters` required.
214
- # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as
215
- # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required.
216
- # Use a decimal value.
217
- # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
218
- # between the postal code centers of the last card-present transaction and the
219
- # current transaction, divided by the elapsed time. Null if there is no prior
220
- # card-present transaction, if either postal code cannot be geocoded, or if
221
- # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a
222
- # decimal value.
223
- # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
224
- # code centers of the last card-present transaction and the current transaction.
225
- # Null if there is no prior card-present transaction or if either postal code
226
- # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
227
- # Use a decimal value.
228
- sig do
229
- returns(
230
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::OrSymbol
231
- )
232
- end
233
- attr_accessor :attribute
234
-
235
- # The operation to apply to the attribute
236
- sig { returns(Lithic::AuthRules::ConditionalOperation::OrSymbol) }
237
- attr_accessor :operation
238
-
239
- # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
240
- sig { returns(Lithic::AuthRules::ConditionalValue::Variants) }
241
- attr_accessor :value
242
-
243
- # Additional parameters for certain attributes. Required when `attribute` is one
244
- # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
245
- # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
246
- # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or
247
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used
248
- # for other attributes.
249
- sig do
250
- returns(
251
- T.nilable(
252
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters
253
- )
254
- )
255
- end
256
- attr_reader :parameters
257
-
258
- sig do
259
- params(
260
- parameters:
261
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::OrHash
262
- ).void
263
- end
264
- attr_writer :parameters
265
-
266
- sig do
267
- params(
268
- attribute:
269
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::OrSymbol,
270
- operation: Lithic::AuthRules::ConditionalOperation::OrSymbol,
271
- value: Lithic::AuthRules::ConditionalValue::Variants,
272
- parameters:
273
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::OrHash
274
- ).returns(T.attached_class)
275
- end
276
- def self.new(
277
- # The attribute to target.
278
- #
279
- # The following attributes may be targeted:
280
- #
281
- # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
282
- # business by the types of goods or services it provides.
283
- # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
284
- # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
285
- # Netherlands Antilles.
286
- # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
287
- # the transaction.
288
- # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
289
- # (merchant).
290
- # - `DESCRIPTOR`: Short description of card acceptor.
291
- # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
292
- # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
293
- # `TOKEN_AUTHENTICATED`.
294
- # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
295
- # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
296
- # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
297
- # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
298
- # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
299
- # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
300
- # fee field in the settlement/cardholder billing currency. This is the amount
301
- # the issuer should authorize against unless the issuer is paying the acquirer
302
- # fee on behalf of the cardholder. Use an integer value.
303
- # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
304
- # represents the amount of cash being withdrawn or advanced. Use an integer
305
- # value.
306
- # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
307
- # given authorization. Scores are on a range of 0-999, with 0 representing the
308
- # lowest risk and 999 representing the highest risk. For Visa transactions,
309
- # where the raw score has a range of 0-99, Lithic will normalize the score by
310
- # multiplying the raw score by 10x. Use an integer value.
311
- # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
312
- # trailing 15 minutes before the authorization. Use an integer value.
313
- # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
314
- # trailing hour up and until the authorization. Use an integer value.
315
- # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
316
- # trailing 24 hours up and until the authorization. Use an integer value.
317
- # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in
318
- # the trailing 15 minutes before the authorization. Use an integer value.
319
- # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in
320
- # the trailing hour up and until the authorization. Use an integer value.
321
- # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in
322
- # the trailing 24 hours up and until the authorization. Use an integer value.
323
- # - `CARD_STATE`: The current state of the card associated with the transaction.
324
- # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
325
- # `PENDING_FULFILLMENT`.
326
- # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
327
- # Valid values are `TRUE`, `FALSE`.
328
- # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
329
- # `OK`, `BLOCKED`.
330
- # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
331
- # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
332
- # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
333
- # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
334
- # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
335
- # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
336
- # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
337
- # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
338
- # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the
339
- # cardholder received the service, e.g. "NY". When a service location is present
340
- # in the network data, the service location state is used. Otherwise, falls back
341
- # to the card acceptor state.
342
- # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received
343
- # the service, e.g. "10001". When a service location is present in the network
344
- # data, the service location postal code is used. Otherwise, falls back to the
345
- # card acceptor postal code.
346
- # - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
347
- # Use an integer value.
348
- # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
349
- # of the authorization. Use an integer value. For programs where Lithic does not
350
- # manage or retain account holder data, this attribute does not evaluate.
351
- # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the
352
- # entity's transaction history. Null if fewer than 30 approved transactions in
353
- # the specified window. Requires `parameters.scope` and `parameters.interval`.
354
- # Use a decimal value.
355
- # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the
356
- # entity over the specified window, in cents. Requires `parameters.scope` and
357
- # `parameters.interval`. Use a decimal value.
358
- # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction
359
- # amounts for the entity over the specified window, in cents. Null if fewer than
360
- # 30 approved transactions in the specified window. Requires `parameters.scope`
361
- # and `parameters.interval`. Use a decimal value.
362
- # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen
363
- # in the entity's transaction history. Valid values are `TRUE`, `FALSE`.
364
- # Requires `parameters.scope`.
365
- # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's
366
- # transaction history. Valid values are `TRUE`, `FALSE`. Requires
367
- # `parameters.scope`.
368
- # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity.
369
- # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`.
370
- # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for
371
- # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not
372
- # supported for `BUSINESS_ACCOUNT` scope. Use an integer value.
373
- # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved
374
- # transaction for the entity, rounded to the nearest whole day. Requires
375
- # `parameters.scope`. Use an integer value.
376
- # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in
377
- # the entity's transaction history. Requires `parameters.scope`. Use an integer
378
- # value.
379
- # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the
380
- # card's approved transaction history (capped at the 1000 most recently seen
381
- # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no
382
- # `parameters` required.
383
- # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as
384
- # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required.
385
- # Use a decimal value.
386
- # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
387
- # between the postal code centers of the last card-present transaction and the
388
- # current transaction, divided by the elapsed time. Null if there is no prior
389
- # card-present transaction, if either postal code cannot be geocoded, or if
390
- # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a
391
- # decimal value.
392
- # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
393
- # code centers of the last card-present transaction and the current transaction.
394
- # Null if there is no prior card-present transaction or if either postal code
395
- # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
396
- # Use a decimal value.
397
- attribute:,
398
- # The operation to apply to the attribute
399
- operation:,
400
- # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
401
- value:,
402
- # Additional parameters for certain attributes. Required when `attribute` is one
403
- # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
404
- # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
405
- # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or
406
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used
407
- # for other attributes.
408
- parameters: nil
409
- )
410
- end
411
-
412
- sig do
413
- override.returns(
414
- {
415
- attribute:
416
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::OrSymbol,
417
- operation: Lithic::AuthRules::ConditionalOperation::OrSymbol,
418
- value: Lithic::AuthRules::ConditionalValue::Variants,
419
- parameters:
420
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters
421
- }
422
- )
423
- end
424
- def to_hash
425
- end
426
-
427
- # The attribute to target.
428
- #
429
- # The following attributes may be targeted:
430
- #
431
- # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
432
- # business by the types of goods or services it provides.
433
- # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
434
- # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
435
- # Netherlands Antilles.
436
- # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
437
- # the transaction.
438
- # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
439
- # (merchant).
440
- # - `DESCRIPTOR`: Short description of card acceptor.
441
- # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
442
- # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
443
- # `TOKEN_AUTHENTICATED`.
444
- # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
445
- # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
446
- # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
447
- # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
448
- # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
449
- # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
450
- # fee field in the settlement/cardholder billing currency. This is the amount
451
- # the issuer should authorize against unless the issuer is paying the acquirer
452
- # fee on behalf of the cardholder. Use an integer value.
453
- # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
454
- # represents the amount of cash being withdrawn or advanced. Use an integer
455
- # value.
456
- # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
457
- # given authorization. Scores are on a range of 0-999, with 0 representing the
458
- # lowest risk and 999 representing the highest risk. For Visa transactions,
459
- # where the raw score has a range of 0-99, Lithic will normalize the score by
460
- # multiplying the raw score by 10x. Use an integer value.
461
- # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
462
- # trailing 15 minutes before the authorization. Use an integer value.
463
- # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
464
- # trailing hour up and until the authorization. Use an integer value.
465
- # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
466
- # trailing 24 hours up and until the authorization. Use an integer value.
467
- # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in
468
- # the trailing 15 minutes before the authorization. Use an integer value.
469
- # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in
470
- # the trailing hour up and until the authorization. Use an integer value.
471
- # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in
472
- # the trailing 24 hours up and until the authorization. Use an integer value.
473
- # - `CARD_STATE`: The current state of the card associated with the transaction.
474
- # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
475
- # `PENDING_FULFILLMENT`.
476
- # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
477
- # Valid values are `TRUE`, `FALSE`.
478
- # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
479
- # `OK`, `BLOCKED`.
480
- # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
481
- # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
482
- # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
483
- # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
484
- # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
485
- # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
486
- # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
487
- # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
488
- # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the
489
- # cardholder received the service, e.g. "NY". When a service location is present
490
- # in the network data, the service location state is used. Otherwise, falls back
491
- # to the card acceptor state.
492
- # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received
493
- # the service, e.g. "10001". When a service location is present in the network
494
- # data, the service location postal code is used. Otherwise, falls back to the
495
- # card acceptor postal code.
496
- # - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
497
- # Use an integer value.
498
- # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
499
- # of the authorization. Use an integer value. For programs where Lithic does not
500
- # manage or retain account holder data, this attribute does not evaluate.
501
- # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the
502
- # entity's transaction history. Null if fewer than 30 approved transactions in
503
- # the specified window. Requires `parameters.scope` and `parameters.interval`.
504
- # Use a decimal value.
505
- # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the
506
- # entity over the specified window, in cents. Requires `parameters.scope` and
507
- # `parameters.interval`. Use a decimal value.
508
- # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction
509
- # amounts for the entity over the specified window, in cents. Null if fewer than
510
- # 30 approved transactions in the specified window. Requires `parameters.scope`
511
- # and `parameters.interval`. Use a decimal value.
512
- # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen
513
- # in the entity's transaction history. Valid values are `TRUE`, `FALSE`.
514
- # Requires `parameters.scope`.
515
- # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's
516
- # transaction history. Valid values are `TRUE`, `FALSE`. Requires
517
- # `parameters.scope`.
518
- # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity.
519
- # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`.
520
- # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for
521
- # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not
522
- # supported for `BUSINESS_ACCOUNT` scope. Use an integer value.
523
- # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved
524
- # transaction for the entity, rounded to the nearest whole day. Requires
525
- # `parameters.scope`. Use an integer value.
526
- # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in
527
- # the entity's transaction history. Requires `parameters.scope`. Use an integer
528
- # value.
529
- # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the
530
- # card's approved transaction history (capped at the 1000 most recently seen
531
- # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no
532
- # `parameters` required.
533
- # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as
534
- # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required.
535
- # Use a decimal value.
536
- # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
537
- # between the postal code centers of the last card-present transaction and the
538
- # current transaction, divided by the elapsed time. Null if there is no prior
539
- # card-present transaction, if either postal code cannot be geocoded, or if
540
- # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a
541
- # decimal value.
542
- # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
543
- # code centers of the last card-present transaction and the current transaction.
544
- # Null if there is no prior card-present transaction or if either postal code
545
- # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
546
- # Use a decimal value.
547
- module Attribute
548
- extend Lithic::Internal::Type::Enum
549
-
550
- TaggedSymbol =
551
- T.type_alias do
552
- T.all(
553
- Symbol,
554
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute
555
- )
556
- end
557
- OrSymbol = T.type_alias { T.any(Symbol, String) }
558
-
559
- MCC =
560
- T.let(
561
- :MCC,
562
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
563
- )
564
- COUNTRY =
565
- T.let(
566
- :COUNTRY,
567
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
568
- )
569
- CURRENCY =
570
- T.let(
571
- :CURRENCY,
572
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
573
- )
574
- MERCHANT_ID =
575
- T.let(
576
- :MERCHANT_ID,
577
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
578
- )
579
- DESCRIPTOR =
580
- T.let(
581
- :DESCRIPTOR,
582
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
583
- )
584
- LIABILITY_SHIFT =
585
- T.let(
586
- :LIABILITY_SHIFT,
587
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
588
- )
589
- PAN_ENTRY_MODE =
590
- T.let(
591
- :PAN_ENTRY_MODE,
592
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
593
- )
594
- TRANSACTION_AMOUNT =
595
- T.let(
596
- :TRANSACTION_AMOUNT,
597
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
598
- )
599
- CASH_AMOUNT =
600
- T.let(
601
- :CASH_AMOUNT,
602
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
603
- )
604
- RISK_SCORE =
605
- T.let(
606
- :RISK_SCORE,
607
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
608
- )
609
- CARD_TRANSACTION_COUNT_15_M =
610
- T.let(
611
- :CARD_TRANSACTION_COUNT_15M,
612
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
613
- )
614
- CARD_TRANSACTION_COUNT_1_H =
615
- T.let(
616
- :CARD_TRANSACTION_COUNT_1H,
617
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
618
- )
619
- CARD_TRANSACTION_COUNT_24_H =
620
- T.let(
621
- :CARD_TRANSACTION_COUNT_24H,
622
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
623
- )
624
- CARD_DECLINE_COUNT_15_M =
625
- T.let(
626
- :CARD_DECLINE_COUNT_15M,
627
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
628
- )
629
- CARD_DECLINE_COUNT_1_H =
630
- T.let(
631
- :CARD_DECLINE_COUNT_1H,
632
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
633
- )
634
- CARD_DECLINE_COUNT_24_H =
635
- T.let(
636
- :CARD_DECLINE_COUNT_24H,
637
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
638
- )
639
- CARD_STATE =
640
- T.let(
641
- :CARD_STATE,
642
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
643
- )
644
- PIN_ENTERED =
645
- T.let(
646
- :PIN_ENTERED,
647
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
648
- )
649
- PIN_STATUS =
650
- T.let(
651
- :PIN_STATUS,
652
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
653
- )
654
- WALLET_TYPE =
655
- T.let(
656
- :WALLET_TYPE,
657
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
658
- )
659
- TRANSACTION_INITIATOR =
660
- T.let(
661
- :TRANSACTION_INITIATOR,
662
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
663
- )
664
- ADDRESS_MATCH =
665
- T.let(
666
- :ADDRESS_MATCH,
667
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
668
- )
669
- SERVICE_LOCATION_STATE =
670
- T.let(
671
- :SERVICE_LOCATION_STATE,
672
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
673
- )
674
- SERVICE_LOCATION_POSTAL_CODE =
675
- T.let(
676
- :SERVICE_LOCATION_POSTAL_CODE,
677
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
678
- )
679
- CARD_AGE =
680
- T.let(
681
- :CARD_AGE,
682
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
683
- )
684
- ACCOUNT_AGE =
685
- T.let(
686
- :ACCOUNT_AGE,
687
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
688
- )
689
- AMOUNT_Z_SCORE =
690
- T.let(
691
- :AMOUNT_Z_SCORE,
692
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
693
- )
694
- AVG_TRANSACTION_AMOUNT =
695
- T.let(
696
- :AVG_TRANSACTION_AMOUNT,
697
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
698
- )
699
- STDEV_TRANSACTION_AMOUNT =
700
- T.let(
701
- :STDEV_TRANSACTION_AMOUNT,
702
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
703
- )
704
- IS_NEW_COUNTRY =
705
- T.let(
706
- :IS_NEW_COUNTRY,
707
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
708
- )
709
- IS_NEW_MCC =
710
- T.let(
711
- :IS_NEW_MCC,
712
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
713
- )
714
- IS_FIRST_TRANSACTION =
715
- T.let(
716
- :IS_FIRST_TRANSACTION,
717
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
718
- )
719
- CONSECUTIVE_DECLINES =
720
- T.let(
721
- :CONSECUTIVE_DECLINES,
722
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
723
- )
724
- TIME_SINCE_LAST_TRANSACTION =
725
- T.let(
726
- :TIME_SINCE_LAST_TRANSACTION,
727
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
728
- )
729
- DISTINCT_COUNTRY_COUNT =
730
- T.let(
731
- :DISTINCT_COUNTRY_COUNT,
732
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
733
- )
734
- IS_NEW_MERCHANT =
735
- T.let(
736
- :IS_NEW_MERCHANT,
737
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
738
- )
739
- THREE_DS_SUCCESS_RATE =
740
- T.let(
741
- :THREE_DS_SUCCESS_RATE,
742
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
743
- )
744
- TRAVEL_SPEED =
745
- T.let(
746
- :TRAVEL_SPEED,
747
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
748
- )
749
- DISTANCE_FROM_LAST_TRANSACTION =
750
- T.let(
751
- :DISTANCE_FROM_LAST_TRANSACTION,
752
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
753
- )
754
-
755
- sig do
756
- override.returns(
757
- T::Array[
758
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
759
- ]
760
- )
761
- end
762
- def self.values
763
- end
764
- end
765
-
766
- class Parameters < Lithic::Internal::Type::BaseModel
767
- OrHash =
768
- T.type_alias do
769
- T.any(
770
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters,
771
- Lithic::Internal::AnyHash
772
- )
773
- end
774
-
775
- # The time window for statistical attributes (`AMOUNT_Z_SCORE`,
776
- # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for
777
- # all-time history or a specific window (`7D`, `30D`, `90D`).
778
- sig do
779
- returns(
780
- T.nilable(
781
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval::OrSymbol
782
- )
783
- )
784
- end
785
- attr_reader :interval
786
-
787
- sig do
788
- params(
789
- interval:
790
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval::OrSymbol
791
- ).void
792
- end
793
- attr_writer :interval
794
-
795
- # The entity scope to evaluate the attribute against.
796
- sig do
797
- returns(
798
- T.nilable(
799
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope::OrSymbol
800
- )
801
- )
802
- end
803
- attr_reader :scope
804
-
805
- sig do
806
- params(
807
- scope:
808
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope::OrSymbol
809
- ).void
810
- end
811
- attr_writer :scope
812
-
813
- # The unit for impossible travel attributes. Required when `attribute` is
814
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.
815
- #
816
- # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).
817
- #
818
- # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
819
- sig do
820
- returns(
821
- T.nilable(
822
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit::OrSymbol
823
- )
824
- )
825
- end
826
- attr_reader :unit
827
-
828
- sig do
829
- params(
830
- unit:
831
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit::OrSymbol
832
- ).void
833
- end
834
- attr_writer :unit
835
-
836
- # Additional parameters for certain attributes. Required when `attribute` is one
837
- # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
838
- # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
839
- # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or
840
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used
841
- # for other attributes.
842
- sig do
843
- params(
844
- interval:
845
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval::OrSymbol,
846
- scope:
847
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope::OrSymbol,
848
- unit:
849
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit::OrSymbol
850
- ).returns(T.attached_class)
851
- end
852
- def self.new(
853
- # The time window for statistical attributes (`AMOUNT_Z_SCORE`,
854
- # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for
855
- # all-time history or a specific window (`7D`, `30D`, `90D`).
856
- interval: nil,
857
- # The entity scope to evaluate the attribute against.
858
- scope: nil,
859
- # The unit for impossible travel attributes. Required when `attribute` is
860
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.
861
- #
862
- # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).
863
- #
864
- # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
865
- unit: nil
866
- )
867
- end
868
-
869
- sig do
870
- override.returns(
871
- {
872
- interval:
873
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval::OrSymbol,
874
- scope:
875
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope::OrSymbol,
876
- unit:
877
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit::OrSymbol
878
- }
879
- )
880
- end
881
- def to_hash
882
- end
883
-
884
- # The time window for statistical attributes (`AMOUNT_Z_SCORE`,
885
- # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for
886
- # all-time history or a specific window (`7D`, `30D`, `90D`).
887
- module Interval
888
- extend Lithic::Internal::Type::Enum
889
-
890
- TaggedSymbol =
891
- T.type_alias do
892
- T.all(
893
- Symbol,
894
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval
895
- )
896
- end
897
- OrSymbol = T.type_alias { T.any(Symbol, String) }
898
-
899
- LIFETIME =
900
- T.let(
901
- :LIFETIME,
902
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval::TaggedSymbol
903
- )
904
- INTERVAL_7_D =
905
- T.let(
906
- :"7D",
907
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval::TaggedSymbol
908
- )
909
- INTERVAL_30_D =
910
- T.let(
911
- :"30D",
912
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval::TaggedSymbol
913
- )
914
- INTERVAL_90_D =
915
- T.let(
916
- :"90D",
917
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval::TaggedSymbol
918
- )
919
-
920
- sig do
921
- override.returns(
922
- T::Array[
923
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Interval::TaggedSymbol
924
- ]
925
- )
926
- end
927
- def self.values
928
- end
929
- end
930
-
931
- # The entity scope to evaluate the attribute against.
932
- module Scope
933
- extend Lithic::Internal::Type::Enum
934
-
935
- TaggedSymbol =
936
- T.type_alias do
937
- T.all(
938
- Symbol,
939
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope
940
- )
941
- end
942
- OrSymbol = T.type_alias { T.any(Symbol, String) }
943
-
944
- CARD =
945
- T.let(
946
- :CARD,
947
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope::TaggedSymbol
948
- )
949
- ACCOUNT =
950
- T.let(
951
- :ACCOUNT,
952
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope::TaggedSymbol
953
- )
954
- BUSINESS_ACCOUNT =
955
- T.let(
956
- :BUSINESS_ACCOUNT,
957
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope::TaggedSymbol
958
- )
959
-
960
- sig do
961
- override.returns(
962
- T::Array[
963
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Scope::TaggedSymbol
964
- ]
965
- )
966
- end
967
- def self.values
968
- end
969
- end
970
-
971
- # The unit for impossible travel attributes. Required when `attribute` is
972
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.
973
- #
974
- # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).
975
- #
976
- # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
977
- module Unit
978
- extend Lithic::Internal::Type::Enum
979
-
980
- TaggedSymbol =
981
- T.type_alias do
982
- T.all(
983
- Symbol,
984
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit
985
- )
986
- end
987
- OrSymbol = T.type_alias { T.any(Symbol, String) }
988
-
989
- MPH =
990
- T.let(
991
- :MPH,
992
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit::TaggedSymbol
993
- )
994
- KPH =
995
- T.let(
996
- :KPH,
997
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit::TaggedSymbol
998
- )
999
- MILES =
1000
- T.let(
1001
- :MILES,
1002
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit::TaggedSymbol
1003
- )
1004
- KILOMETERS =
1005
- T.let(
1006
- :KILOMETERS,
1007
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit::TaggedSymbol
1008
- )
1009
-
1010
- sig do
1011
- override.returns(
1012
- T::Array[
1013
- Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters::Unit::TaggedSymbol
1014
- ]
1015
- )
1016
- end
1017
- def self.values
1018
- end
1019
- end
1020
- end
1021
- end
1022
86
  end
1023
87
  end
1024
88
  end