lithic 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/README.md +1 -1
- data/lib/lithic/client.rb +15 -1
- data/lib/lithic/models/account.rb +2 -2
- data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +5 -4
- data/lib/lithic/models/account_holder_update_response.rb +3 -3
- data/lib/lithic/models/account_update_params.rb +2 -2
- data/lib/lithic/models/auth_rules/auth_rule.rb +14 -8
- data/lib/lithic/models/auth_rules/auth_rule_version.rb +5 -3
- data/lib/lithic/models/auth_rules/card_transaction_update_action.rb +109 -0
- data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +9 -0
- data/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb +244 -0
- data/lib/lithic/models/auth_rules/event_stream.rb +1 -0
- data/lib/lithic/models/auth_rules/spend_velocity_filters.rb +33 -0
- data/lib/lithic/models/auth_rules/v2_create_params.rb +27 -15
- data/lib/lithic/models/auth_rules/v2_draft_params.rb +5 -3
- data/lib/lithic/models/card_create_params.rb +4 -2
- data/lib/lithic/models/card_renew_params.rb +4 -2
- data/lib/lithic/models/non_pci_card.rb +13 -13
- data/lib/lithic/models/reports/settlement/network_total_list_params.rb +1 -0
- data/lib/lithic/models/settlement_detail.rb +11 -4
- data/lib/lithic/models/settlement_summary_details.rb +1 -0
- data/lib/lithic/resources/accounts.rb +1 -1
- data/lib/lithic/resources/auth_rules/v2.rb +1 -1
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +4 -1
- data/rbi/lithic/models/account.rbi +3 -6
- data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +10 -14
- data/rbi/lithic/models/account_holder_update_response.rbi +3 -3
- data/rbi/lithic/models/account_update_params.rbi +5 -8
- data/rbi/lithic/models/auth_rules/auth_rule.rbi +10 -3
- data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +2 -0
- data/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi +242 -0
- data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +17 -0
- data/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi +573 -0
- data/rbi/lithic/models/auth_rules/event_stream.rbi +5 -0
- data/rbi/lithic/models/auth_rules/spend_velocity_filters.rbi +58 -0
- data/rbi/lithic/models/auth_rules/v2_create_params.rbi +30 -9
- data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +4 -0
- data/rbi/lithic/models/card_create_params.rbi +8 -4
- data/rbi/lithic/models/card_renew_params.rbi +8 -4
- data/rbi/lithic/models/non_pci_card.rbi +21 -31
- data/rbi/lithic/models/reports/settlement/network_total_list_params.rbi +5 -0
- data/rbi/lithic/models/settlement_detail.rbi +17 -4
- data/rbi/lithic/models/settlement_summary_details.rbi +2 -0
- data/rbi/lithic/resources/accounts.rbi +2 -1
- data/rbi/lithic/resources/auth_rules/v2.rbi +1 -0
- data/rbi/lithic/resources/cards.rbi +8 -4
- data/sig/lithic/models/account.rbs +4 -8
- data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +4 -8
- data/sig/lithic/models/account_update_params.rbs +4 -8
- data/sig/lithic/models/auth_rules/auth_rule.rbs +2 -0
- data/sig/lithic/models/auth_rules/auth_rule_version.rbs +1 -0
- data/sig/lithic/models/auth_rules/card_transaction_update_action.rbs +100 -0
- data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +2 -0
- data/sig/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbs +155 -0
- data/sig/lithic/models/auth_rules/event_stream.rbs +2 -0
- data/sig/lithic/models/auth_rules/spend_velocity_filters.rbs +35 -0
- data/sig/lithic/models/auth_rules/v2_create_params.rbs +3 -0
- data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -0
- data/sig/lithic/models/non_pci_card.rbs +20 -30
- data/sig/lithic/models/reports/settlement/network_total_list_params.rbs +2 -1
- data/sig/lithic/models/settlement_detail.rbs +3 -1
- data/sig/lithic/models/settlement_summary_details.rbs +3 -1
- data/sig/lithic/resources/accounts.rbs +1 -1
- metadata +11 -2
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Models
|
|
5
|
+
module AuthRules
|
|
6
|
+
class ConditionalCardTransactionUpdateActionParameters < Lithic::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
|
|
11
|
+
Lithic::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The action to take if the conditions are met.
|
|
16
|
+
sig do
|
|
17
|
+
returns(
|
|
18
|
+
T.any(
|
|
19
|
+
Lithic::AuthRules::CardTransactionUpdateAction::TagAction,
|
|
20
|
+
Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction
|
|
21
|
+
)
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
attr_accessor :action
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
returns(
|
|
28
|
+
T::Array[
|
|
29
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition
|
|
30
|
+
]
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
attr_accessor :conditions
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
action:
|
|
38
|
+
T.any(
|
|
39
|
+
Lithic::AuthRules::CardTransactionUpdateAction::TagAction::OrHash,
|
|
40
|
+
Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::OrHash
|
|
41
|
+
),
|
|
42
|
+
conditions:
|
|
43
|
+
T::Array[
|
|
44
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::OrHash
|
|
45
|
+
]
|
|
46
|
+
).returns(T.attached_class)
|
|
47
|
+
end
|
|
48
|
+
def self.new(
|
|
49
|
+
# The action to take if the conditions are met.
|
|
50
|
+
action:,
|
|
51
|
+
conditions:
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
override.returns(
|
|
57
|
+
{
|
|
58
|
+
action:
|
|
59
|
+
T.any(
|
|
60
|
+
Lithic::AuthRules::CardTransactionUpdateAction::TagAction,
|
|
61
|
+
Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction
|
|
62
|
+
),
|
|
63
|
+
conditions:
|
|
64
|
+
T::Array[
|
|
65
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
def to_hash
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
class Condition < Lithic::Internal::Type::BaseModel
|
|
74
|
+
OrHash =
|
|
75
|
+
T.type_alias do
|
|
76
|
+
T.any(
|
|
77
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition,
|
|
78
|
+
Lithic::Internal::AnyHash
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# The attribute to target.
|
|
83
|
+
#
|
|
84
|
+
# The following attributes may be targeted:
|
|
85
|
+
#
|
|
86
|
+
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
|
|
87
|
+
# business by the types of goods or services it provides.
|
|
88
|
+
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
|
|
89
|
+
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
|
|
90
|
+
# Netherlands Antilles.
|
|
91
|
+
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
|
|
92
|
+
# the transaction.
|
|
93
|
+
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
|
|
94
|
+
# (merchant).
|
|
95
|
+
# - `DESCRIPTOR`: Short description of card acceptor.
|
|
96
|
+
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
|
|
97
|
+
# fee field in the settlement/cardholder billing currency. This is the amount
|
|
98
|
+
# the issuer should authorize against unless the issuer is paying the acquirer
|
|
99
|
+
# fee on behalf of the cardholder.
|
|
100
|
+
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
|
|
101
|
+
# given authorization. Scores are on a range of 0-999, with 0 representing the
|
|
102
|
+
# lowest risk and 999 representing the highest risk. For Visa transactions,
|
|
103
|
+
# where the raw score has a range of 0-99, Lithic will normalize the score by
|
|
104
|
+
# multiplying the raw score by 10x.
|
|
105
|
+
# - `TRANSACTION_STATUS`: The status of the transaction. Valid values are
|
|
106
|
+
# `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`,
|
|
107
|
+
# `EXPIRED`.
|
|
108
|
+
# - `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid
|
|
109
|
+
# values are `AUTHORIZATION`, `AUTHORIZATION_ADVICE`, `AUTHORIZATION_EXPIRY`,
|
|
110
|
+
# `AUTHORIZATION_REVERSAL`, `BALANCE_INQUIRY`, `CLEARING`, `CORRECTION_CREDIT`,
|
|
111
|
+
# `CORRECTION_DEBIT`, `CREDIT_AUTHORIZATION`, `CREDIT_AUTHORIZATION_ADVICE`,
|
|
112
|
+
# `FINANCIAL_AUTHORIZATION`, `FINANCIAL_CREDIT_AUTHORIZATION`, `RETURN`,
|
|
113
|
+
# `RETURN_REVERSAL`.
|
|
114
|
+
# - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
|
|
115
|
+
# applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
|
|
116
|
+
# `TOKEN_AUTHENTICATED`.
|
|
117
|
+
# - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
|
|
118
|
+
# (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
|
|
119
|
+
# `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
|
|
120
|
+
# `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
|
|
121
|
+
# `UNKNOWN`, or `CREDENTIAL_ON_FILE`.
|
|
122
|
+
# - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
|
|
123
|
+
# source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
|
|
124
|
+
# `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
|
|
125
|
+
# - `CARD_AGE`: The age of the card in seconds at the time of the transaction.
|
|
126
|
+
# - `ACCOUNT_AGE`: The age of the account in seconds at the time of the
|
|
127
|
+
# transaction.
|
|
128
|
+
# - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified
|
|
129
|
+
# filters within the given period. Requires `parameters` with `scope`, `period`,
|
|
130
|
+
# and optional `filters`.
|
|
131
|
+
# - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions
|
|
132
|
+
# matching the specified filters within the given period. Requires `parameters`
|
|
133
|
+
# with `scope`, `period`, and optional `filters`.
|
|
134
|
+
sig do
|
|
135
|
+
returns(
|
|
136
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::OrSymbol
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
attr_accessor :attribute
|
|
140
|
+
|
|
141
|
+
# The operation to apply to the attribute
|
|
142
|
+
sig { returns(Lithic::AuthRules::ConditionalOperation::OrSymbol) }
|
|
143
|
+
attr_accessor :operation
|
|
144
|
+
|
|
145
|
+
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
|
|
146
|
+
sig { returns(Lithic::AuthRules::ConditionalValue::Variants) }
|
|
147
|
+
attr_accessor :value
|
|
148
|
+
|
|
149
|
+
# Additional parameters for spend velocity attributes. Required when `attribute`
|
|
150
|
+
# is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other
|
|
151
|
+
# attributes.
|
|
152
|
+
sig do
|
|
153
|
+
returns(
|
|
154
|
+
T.nilable(
|
|
155
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters
|
|
156
|
+
)
|
|
157
|
+
)
|
|
158
|
+
end
|
|
159
|
+
attr_reader :parameters
|
|
160
|
+
|
|
161
|
+
sig do
|
|
162
|
+
params(
|
|
163
|
+
parameters:
|
|
164
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::OrHash
|
|
165
|
+
).void
|
|
166
|
+
end
|
|
167
|
+
attr_writer :parameters
|
|
168
|
+
|
|
169
|
+
sig do
|
|
170
|
+
params(
|
|
171
|
+
attribute:
|
|
172
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::OrSymbol,
|
|
173
|
+
operation: Lithic::AuthRules::ConditionalOperation::OrSymbol,
|
|
174
|
+
value: Lithic::AuthRules::ConditionalValue::Variants,
|
|
175
|
+
parameters:
|
|
176
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::OrHash
|
|
177
|
+
).returns(T.attached_class)
|
|
178
|
+
end
|
|
179
|
+
def self.new(
|
|
180
|
+
# The attribute to target.
|
|
181
|
+
#
|
|
182
|
+
# The following attributes may be targeted:
|
|
183
|
+
#
|
|
184
|
+
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
|
|
185
|
+
# business by the types of goods or services it provides.
|
|
186
|
+
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
|
|
187
|
+
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
|
|
188
|
+
# Netherlands Antilles.
|
|
189
|
+
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
|
|
190
|
+
# the transaction.
|
|
191
|
+
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
|
|
192
|
+
# (merchant).
|
|
193
|
+
# - `DESCRIPTOR`: Short description of card acceptor.
|
|
194
|
+
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
|
|
195
|
+
# fee field in the settlement/cardholder billing currency. This is the amount
|
|
196
|
+
# the issuer should authorize against unless the issuer is paying the acquirer
|
|
197
|
+
# fee on behalf of the cardholder.
|
|
198
|
+
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
|
|
199
|
+
# given authorization. Scores are on a range of 0-999, with 0 representing the
|
|
200
|
+
# lowest risk and 999 representing the highest risk. For Visa transactions,
|
|
201
|
+
# where the raw score has a range of 0-99, Lithic will normalize the score by
|
|
202
|
+
# multiplying the raw score by 10x.
|
|
203
|
+
# - `TRANSACTION_STATUS`: The status of the transaction. Valid values are
|
|
204
|
+
# `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`,
|
|
205
|
+
# `EXPIRED`.
|
|
206
|
+
# - `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid
|
|
207
|
+
# values are `AUTHORIZATION`, `AUTHORIZATION_ADVICE`, `AUTHORIZATION_EXPIRY`,
|
|
208
|
+
# `AUTHORIZATION_REVERSAL`, `BALANCE_INQUIRY`, `CLEARING`, `CORRECTION_CREDIT`,
|
|
209
|
+
# `CORRECTION_DEBIT`, `CREDIT_AUTHORIZATION`, `CREDIT_AUTHORIZATION_ADVICE`,
|
|
210
|
+
# `FINANCIAL_AUTHORIZATION`, `FINANCIAL_CREDIT_AUTHORIZATION`, `RETURN`,
|
|
211
|
+
# `RETURN_REVERSAL`.
|
|
212
|
+
# - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
|
|
213
|
+
# applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
|
|
214
|
+
# `TOKEN_AUTHENTICATED`.
|
|
215
|
+
# - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
|
|
216
|
+
# (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
|
|
217
|
+
# `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
|
|
218
|
+
# `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
|
|
219
|
+
# `UNKNOWN`, or `CREDENTIAL_ON_FILE`.
|
|
220
|
+
# - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
|
|
221
|
+
# source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
|
|
222
|
+
# `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
|
|
223
|
+
# - `CARD_AGE`: The age of the card in seconds at the time of the transaction.
|
|
224
|
+
# - `ACCOUNT_AGE`: The age of the account in seconds at the time of the
|
|
225
|
+
# transaction.
|
|
226
|
+
# - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified
|
|
227
|
+
# filters within the given period. Requires `parameters` with `scope`, `period`,
|
|
228
|
+
# and optional `filters`.
|
|
229
|
+
# - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions
|
|
230
|
+
# matching the specified filters within the given period. Requires `parameters`
|
|
231
|
+
# with `scope`, `period`, and optional `filters`.
|
|
232
|
+
attribute:,
|
|
233
|
+
# The operation to apply to the attribute
|
|
234
|
+
operation:,
|
|
235
|
+
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
|
|
236
|
+
value:,
|
|
237
|
+
# Additional parameters for spend velocity attributes. Required when `attribute`
|
|
238
|
+
# is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other
|
|
239
|
+
# attributes.
|
|
240
|
+
parameters: nil
|
|
241
|
+
)
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
sig do
|
|
245
|
+
override.returns(
|
|
246
|
+
{
|
|
247
|
+
attribute:
|
|
248
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::OrSymbol,
|
|
249
|
+
operation: Lithic::AuthRules::ConditionalOperation::OrSymbol,
|
|
250
|
+
value: Lithic::AuthRules::ConditionalValue::Variants,
|
|
251
|
+
parameters:
|
|
252
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
end
|
|
256
|
+
def to_hash
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# The attribute to target.
|
|
260
|
+
#
|
|
261
|
+
# The following attributes may be targeted:
|
|
262
|
+
#
|
|
263
|
+
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
|
|
264
|
+
# business by the types of goods or services it provides.
|
|
265
|
+
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
|
|
266
|
+
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
|
|
267
|
+
# Netherlands Antilles.
|
|
268
|
+
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
|
|
269
|
+
# the transaction.
|
|
270
|
+
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
|
|
271
|
+
# (merchant).
|
|
272
|
+
# - `DESCRIPTOR`: Short description of card acceptor.
|
|
273
|
+
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
|
|
274
|
+
# fee field in the settlement/cardholder billing currency. This is the amount
|
|
275
|
+
# the issuer should authorize against unless the issuer is paying the acquirer
|
|
276
|
+
# fee on behalf of the cardholder.
|
|
277
|
+
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
|
|
278
|
+
# given authorization. Scores are on a range of 0-999, with 0 representing the
|
|
279
|
+
# lowest risk and 999 representing the highest risk. For Visa transactions,
|
|
280
|
+
# where the raw score has a range of 0-99, Lithic will normalize the score by
|
|
281
|
+
# multiplying the raw score by 10x.
|
|
282
|
+
# - `TRANSACTION_STATUS`: The status of the transaction. Valid values are
|
|
283
|
+
# `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`,
|
|
284
|
+
# `EXPIRED`.
|
|
285
|
+
# - `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid
|
|
286
|
+
# values are `AUTHORIZATION`, `AUTHORIZATION_ADVICE`, `AUTHORIZATION_EXPIRY`,
|
|
287
|
+
# `AUTHORIZATION_REVERSAL`, `BALANCE_INQUIRY`, `CLEARING`, `CORRECTION_CREDIT`,
|
|
288
|
+
# `CORRECTION_DEBIT`, `CREDIT_AUTHORIZATION`, `CREDIT_AUTHORIZATION_ADVICE`,
|
|
289
|
+
# `FINANCIAL_AUTHORIZATION`, `FINANCIAL_CREDIT_AUTHORIZATION`, `RETURN`,
|
|
290
|
+
# `RETURN_REVERSAL`.
|
|
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`, or `CREDENTIAL_ON_FILE`.
|
|
299
|
+
# - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
|
|
300
|
+
# source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
|
|
301
|
+
# `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
|
|
302
|
+
# - `CARD_AGE`: The age of the card in seconds at the time of the transaction.
|
|
303
|
+
# - `ACCOUNT_AGE`: The age of the account in seconds at the time of the
|
|
304
|
+
# transaction.
|
|
305
|
+
# - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified
|
|
306
|
+
# filters within the given period. Requires `parameters` with `scope`, `period`,
|
|
307
|
+
# and optional `filters`.
|
|
308
|
+
# - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions
|
|
309
|
+
# matching the specified filters within the given period. Requires `parameters`
|
|
310
|
+
# with `scope`, `period`, and optional `filters`.
|
|
311
|
+
module Attribute
|
|
312
|
+
extend Lithic::Internal::Type::Enum
|
|
313
|
+
|
|
314
|
+
TaggedSymbol =
|
|
315
|
+
T.type_alias do
|
|
316
|
+
T.all(
|
|
317
|
+
Symbol,
|
|
318
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute
|
|
319
|
+
)
|
|
320
|
+
end
|
|
321
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
322
|
+
|
|
323
|
+
MCC =
|
|
324
|
+
T.let(
|
|
325
|
+
:MCC,
|
|
326
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
327
|
+
)
|
|
328
|
+
COUNTRY =
|
|
329
|
+
T.let(
|
|
330
|
+
:COUNTRY,
|
|
331
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
332
|
+
)
|
|
333
|
+
CURRENCY =
|
|
334
|
+
T.let(
|
|
335
|
+
:CURRENCY,
|
|
336
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
337
|
+
)
|
|
338
|
+
MERCHANT_ID =
|
|
339
|
+
T.let(
|
|
340
|
+
:MERCHANT_ID,
|
|
341
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
342
|
+
)
|
|
343
|
+
DESCRIPTOR =
|
|
344
|
+
T.let(
|
|
345
|
+
:DESCRIPTOR,
|
|
346
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
347
|
+
)
|
|
348
|
+
TRANSACTION_AMOUNT =
|
|
349
|
+
T.let(
|
|
350
|
+
:TRANSACTION_AMOUNT,
|
|
351
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
352
|
+
)
|
|
353
|
+
RISK_SCORE =
|
|
354
|
+
T.let(
|
|
355
|
+
:RISK_SCORE,
|
|
356
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
357
|
+
)
|
|
358
|
+
TRANSACTION_STATUS =
|
|
359
|
+
T.let(
|
|
360
|
+
:TRANSACTION_STATUS,
|
|
361
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
362
|
+
)
|
|
363
|
+
LAST_EVENT_TYPE =
|
|
364
|
+
T.let(
|
|
365
|
+
:LAST_EVENT_TYPE,
|
|
366
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
367
|
+
)
|
|
368
|
+
LIABILITY_SHIFT =
|
|
369
|
+
T.let(
|
|
370
|
+
:LIABILITY_SHIFT,
|
|
371
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
372
|
+
)
|
|
373
|
+
PAN_ENTRY_MODE =
|
|
374
|
+
T.let(
|
|
375
|
+
:PAN_ENTRY_MODE,
|
|
376
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
377
|
+
)
|
|
378
|
+
WALLET_TYPE =
|
|
379
|
+
T.let(
|
|
380
|
+
:WALLET_TYPE,
|
|
381
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
382
|
+
)
|
|
383
|
+
CARD_AGE =
|
|
384
|
+
T.let(
|
|
385
|
+
:CARD_AGE,
|
|
386
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
387
|
+
)
|
|
388
|
+
ACCOUNT_AGE =
|
|
389
|
+
T.let(
|
|
390
|
+
:ACCOUNT_AGE,
|
|
391
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
392
|
+
)
|
|
393
|
+
SPEND_VELOCITY_COUNT =
|
|
394
|
+
T.let(
|
|
395
|
+
:SPEND_VELOCITY_COUNT,
|
|
396
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
397
|
+
)
|
|
398
|
+
SPEND_VELOCITY_AMOUNT =
|
|
399
|
+
T.let(
|
|
400
|
+
:SPEND_VELOCITY_AMOUNT,
|
|
401
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
402
|
+
)
|
|
403
|
+
|
|
404
|
+
sig do
|
|
405
|
+
override.returns(
|
|
406
|
+
T::Array[
|
|
407
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol
|
|
408
|
+
]
|
|
409
|
+
)
|
|
410
|
+
end
|
|
411
|
+
def self.values
|
|
412
|
+
end
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
class Parameters < Lithic::Internal::Type::BaseModel
|
|
416
|
+
OrHash =
|
|
417
|
+
T.type_alias do
|
|
418
|
+
T.any(
|
|
419
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters,
|
|
420
|
+
Lithic::Internal::AnyHash
|
|
421
|
+
)
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
sig { returns(T.nilable(Lithic::AuthRules::SpendVelocityFilters)) }
|
|
425
|
+
attr_reader :filters
|
|
426
|
+
|
|
427
|
+
sig do
|
|
428
|
+
params(
|
|
429
|
+
filters: Lithic::AuthRules::SpendVelocityFilters::OrHash
|
|
430
|
+
).void
|
|
431
|
+
end
|
|
432
|
+
attr_writer :filters
|
|
433
|
+
|
|
434
|
+
# The time period over which to calculate the spend velocity.
|
|
435
|
+
sig do
|
|
436
|
+
returns(
|
|
437
|
+
T.nilable(
|
|
438
|
+
T.any(
|
|
439
|
+
Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject,
|
|
440
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay,
|
|
441
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek,
|
|
442
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth,
|
|
443
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear
|
|
444
|
+
)
|
|
445
|
+
)
|
|
446
|
+
)
|
|
447
|
+
end
|
|
448
|
+
attr_reader :period
|
|
449
|
+
|
|
450
|
+
sig do
|
|
451
|
+
params(
|
|
452
|
+
period:
|
|
453
|
+
T.any(
|
|
454
|
+
Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash,
|
|
455
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay::OrHash,
|
|
456
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek::OrHash,
|
|
457
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth::OrHash,
|
|
458
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash
|
|
459
|
+
)
|
|
460
|
+
).void
|
|
461
|
+
end
|
|
462
|
+
attr_writer :period
|
|
463
|
+
|
|
464
|
+
# The entity scope to evaluate the attribute against.
|
|
465
|
+
sig do
|
|
466
|
+
returns(
|
|
467
|
+
T.nilable(
|
|
468
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::OrSymbol
|
|
469
|
+
)
|
|
470
|
+
)
|
|
471
|
+
end
|
|
472
|
+
attr_reader :scope
|
|
473
|
+
|
|
474
|
+
sig do
|
|
475
|
+
params(
|
|
476
|
+
scope:
|
|
477
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::OrSymbol
|
|
478
|
+
).void
|
|
479
|
+
end
|
|
480
|
+
attr_writer :scope
|
|
481
|
+
|
|
482
|
+
# Additional parameters for spend velocity attributes. Required when `attribute`
|
|
483
|
+
# is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other
|
|
484
|
+
# attributes.
|
|
485
|
+
sig do
|
|
486
|
+
params(
|
|
487
|
+
filters: Lithic::AuthRules::SpendVelocityFilters::OrHash,
|
|
488
|
+
period:
|
|
489
|
+
T.any(
|
|
490
|
+
Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash,
|
|
491
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay::OrHash,
|
|
492
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek::OrHash,
|
|
493
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth::OrHash,
|
|
494
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash
|
|
495
|
+
),
|
|
496
|
+
scope:
|
|
497
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::OrSymbol
|
|
498
|
+
).returns(T.attached_class)
|
|
499
|
+
end
|
|
500
|
+
def self.new(
|
|
501
|
+
filters: nil,
|
|
502
|
+
# The time period over which to calculate the spend velocity.
|
|
503
|
+
period: nil,
|
|
504
|
+
# The entity scope to evaluate the attribute against.
|
|
505
|
+
scope: nil
|
|
506
|
+
)
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
sig do
|
|
510
|
+
override.returns(
|
|
511
|
+
{
|
|
512
|
+
filters: Lithic::AuthRules::SpendVelocityFilters,
|
|
513
|
+
period:
|
|
514
|
+
T.any(
|
|
515
|
+
Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject,
|
|
516
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay,
|
|
517
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek,
|
|
518
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth,
|
|
519
|
+
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear
|
|
520
|
+
),
|
|
521
|
+
scope:
|
|
522
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::OrSymbol
|
|
523
|
+
}
|
|
524
|
+
)
|
|
525
|
+
end
|
|
526
|
+
def to_hash
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# The entity scope to evaluate the attribute against.
|
|
530
|
+
module Scope
|
|
531
|
+
extend Lithic::Internal::Type::Enum
|
|
532
|
+
|
|
533
|
+
TaggedSymbol =
|
|
534
|
+
T.type_alias do
|
|
535
|
+
T.all(
|
|
536
|
+
Symbol,
|
|
537
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope
|
|
538
|
+
)
|
|
539
|
+
end
|
|
540
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
541
|
+
|
|
542
|
+
CARD =
|
|
543
|
+
T.let(
|
|
544
|
+
:CARD,
|
|
545
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::TaggedSymbol
|
|
546
|
+
)
|
|
547
|
+
ACCOUNT =
|
|
548
|
+
T.let(
|
|
549
|
+
:ACCOUNT,
|
|
550
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::TaggedSymbol
|
|
551
|
+
)
|
|
552
|
+
GLOBAL =
|
|
553
|
+
T.let(
|
|
554
|
+
:GLOBAL,
|
|
555
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::TaggedSymbol
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
sig do
|
|
559
|
+
override.returns(
|
|
560
|
+
T::Array[
|
|
561
|
+
Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::TaggedSymbol
|
|
562
|
+
]
|
|
563
|
+
)
|
|
564
|
+
end
|
|
565
|
+
def self.values
|
|
566
|
+
end
|
|
567
|
+
end
|
|
568
|
+
end
|
|
569
|
+
end
|
|
570
|
+
end
|
|
571
|
+
end
|
|
572
|
+
end
|
|
573
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Models
|
|
5
|
+
module AuthRules
|
|
6
|
+
class SpendVelocityFilters < Lithic::Models::AuthRules::VelocityLimitFilters
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Lithic::AuthRules::SpendVelocityFilters,
|
|
11
|
+
Lithic::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Tag key-value pairs to exclude from the velocity calculation. Transactions
|
|
16
|
+
# matching all specified tag key-value pairs will be excluded from the calculated
|
|
17
|
+
# velocity.
|
|
18
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
19
|
+
attr_accessor :exclude_tags
|
|
20
|
+
|
|
21
|
+
# Tag key-value pairs to include in the velocity calculation. Only transactions
|
|
22
|
+
# matching all specified tag key-value pairs will be included in the calculated
|
|
23
|
+
# velocity.
|
|
24
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
25
|
+
attr_accessor :include_tags
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
exclude_tags: T.nilable(T::Hash[Symbol, String]),
|
|
30
|
+
include_tags: T.nilable(T::Hash[Symbol, String])
|
|
31
|
+
).returns(T.attached_class)
|
|
32
|
+
end
|
|
33
|
+
def self.new(
|
|
34
|
+
# Tag key-value pairs to exclude from the velocity calculation. Transactions
|
|
35
|
+
# matching all specified tag key-value pairs will be excluded from the calculated
|
|
36
|
+
# velocity.
|
|
37
|
+
exclude_tags: nil,
|
|
38
|
+
# Tag key-value pairs to include in the velocity calculation. Only transactions
|
|
39
|
+
# matching all specified tag key-value pairs will be included in the calculated
|
|
40
|
+
# velocity.
|
|
41
|
+
include_tags: nil
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
override.returns(
|
|
47
|
+
{
|
|
48
|
+
exclude_tags: T.nilable(T::Hash[Symbol, String]),
|
|
49
|
+
include_tags: T.nilable(T::Hash[Symbol, String])
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
def to_hash
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|