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