lithic 0.1.0.pre.alpha.30 → 0.1.0.pre.alpha.31

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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/internal/util.rb +8 -9
  5. data/lib/lithic/models/account_update_params.rb +4 -4
  6. data/lib/lithic/models/auth_rules/v2/backtest_results.rb +100 -28
  7. data/lib/lithic/models/auth_rules/v2_apply_response.rb +401 -10
  8. data/lib/lithic/models/auth_rules/v2_create_params.rb +205 -6
  9. data/lib/lithic/models/auth_rules/v2_create_response.rb +401 -10
  10. data/lib/lithic/models/auth_rules/v2_draft_params.rb +186 -3
  11. data/lib/lithic/models/auth_rules/v2_draft_response.rb +401 -10
  12. data/lib/lithic/models/auth_rules/v2_list_params.rb +27 -8
  13. data/lib/lithic/models/auth_rules/v2_list_response.rb +401 -10
  14. data/lib/lithic/models/auth_rules/v2_promote_response.rb +401 -10
  15. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +401 -10
  16. data/lib/lithic/models/auth_rules/v2_update_response.rb +401 -10
  17. data/lib/lithic/models/funding_event_list_response.rb +26 -22
  18. data/lib/lithic/models/funding_event_retrieve_response.rb +26 -22
  19. data/lib/lithic/models/payment.rb +2 -2
  20. data/lib/lithic/models/required_document.rb +2 -2
  21. data/lib/lithic/models/transaction.rb +2 -1
  22. data/lib/lithic/resources/auth_rules/v2/backtests.rb +12 -13
  23. data/lib/lithic/resources/auth_rules/v2.rb +43 -39
  24. data/lib/lithic/version.rb +1 -1
  25. data/rbi/lithic/internal/util.rbi +2 -0
  26. data/rbi/lithic/models/account_update_params.rbi +6 -6
  27. data/rbi/lithic/models/auth_rules/v2/backtest_results.rbi +186 -24
  28. data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +895 -7
  29. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +442 -8
  30. data/rbi/lithic/models/auth_rules/v2_create_response.rbi +895 -7
  31. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +414 -4
  32. data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +895 -7
  33. data/rbi/lithic/models/auth_rules/v2_list_params.rbi +60 -7
  34. data/rbi/lithic/models/auth_rules/v2_list_response.rbi +895 -7
  35. data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +895 -7
  36. data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +895 -7
  37. data/rbi/lithic/models/auth_rules/v2_update_response.rbi +895 -7
  38. data/rbi/lithic/models/funding_event_list_response.rbi +35 -28
  39. data/rbi/lithic/models/funding_event_retrieve_response.rbi +35 -28
  40. data/rbi/lithic/models/payment.rbi +3 -3
  41. data/rbi/lithic/models/required_document.rbi +2 -2
  42. data/rbi/lithic/models/transaction.rbi +4 -2
  43. data/rbi/lithic/resources/accounts.rbi +2 -2
  44. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +12 -13
  45. data/rbi/lithic/resources/auth_rules/v2.rbi +49 -38
  46. data/sig/lithic/models/auth_rules/v2/backtest_results.rbs +66 -2
  47. data/sig/lithic/models/auth_rules/v2_apply_response.rbs +280 -1
  48. data/sig/lithic/models/auth_rules/v2_create_params.rbs +135 -1
  49. data/sig/lithic/models/auth_rules/v2_create_response.rbs +280 -1
  50. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +129 -0
  51. data/sig/lithic/models/auth_rules/v2_draft_response.rbs +280 -1
  52. data/sig/lithic/models/auth_rules/v2_list_params.rbs +20 -0
  53. data/sig/lithic/models/auth_rules/v2_list_response.rbs +280 -1
  54. data/sig/lithic/models/auth_rules/v2_promote_response.rbs +280 -1
  55. data/sig/lithic/models/auth_rules/v2_retrieve_response.rbs +280 -1
  56. data/sig/lithic/models/auth_rules/v2_update_response.rbs +280 -1
  57. data/sig/lithic/models/funding_event_list_response.rbs +18 -11
  58. data/sig/lithic/models/funding_event_retrieve_response.rbs +18 -11
  59. data/sig/lithic/resources/auth_rules/v2.rbs +1 -0
  60. metadata +2 -2
@@ -33,6 +33,12 @@ module Lithic
33
33
  # @return [Lithic::Models::AuthRules::V2CreateResponse::DraftVersion, nil]
34
34
  required :draft_version, -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion }, nil?: true
35
35
 
36
+ # @!attribute event_stream
37
+ # The type of event stream the Auth rule applies to.
38
+ #
39
+ # @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::EventStream]
40
+ required :event_stream, enum: -> { Lithic::Models::AuthRules::V2CreateResponse::EventStream }
41
+
36
42
  # @!attribute name
37
43
  # Auth Rule Name
38
44
  #
@@ -52,7 +58,13 @@ module Lithic
52
58
  required :state, enum: -> { Lithic::Models::AuthRules::V2CreateResponse::State }
53
59
 
54
60
  # @!attribute type
55
- # The type of Auth Rule
61
+ # The type of Auth Rule. Effectively determines the event stream during which it
62
+ # will be evaluated.
63
+ #
64
+ # - `CONDITIONAL_BLOCK`: AUTHORIZATION event stream.
65
+ # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
66
+ # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
67
+ # - `CONDITIONAL_3DS_ACTION`: THREE_DS_AUTHENTICATION event stream.
56
68
  #
57
69
  # @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::Type]
58
70
  required :type, enum: -> { Lithic::Models::AuthRules::V2CreateResponse::Type }
@@ -63,7 +75,10 @@ module Lithic
63
75
  # @return [Array<String>, nil]
64
76
  optional :excluded_card_tokens, Lithic::Internal::Type::ArrayOf[String]
65
77
 
66
- # @!method initialize(token:, account_tokens:, card_tokens:, current_version:, draft_version:, name:, program_level:, state:, type:, excluded_card_tokens: nil)
78
+ # @!method initialize(token:, account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, name:, program_level:, state:, type:, excluded_card_tokens: nil)
79
+ # Some parameter documentations has been truncated, see
80
+ # {Lithic::Models::AuthRules::V2CreateResponse} for more details.
81
+ #
67
82
  # @param token [String] Auth Rule Token
68
83
  #
69
84
  # @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
@@ -74,13 +89,15 @@ module Lithic
74
89
  #
75
90
  # @param draft_version [Lithic::Models::AuthRules::V2CreateResponse::DraftVersion, nil]
76
91
  #
92
+ # @param event_stream [Symbol, Lithic::Models::AuthRules::V2CreateResponse::EventStream] The type of event stream the Auth rule applies to.
93
+ #
77
94
  # @param name [String, nil] Auth Rule Name
78
95
  #
79
96
  # @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program.
80
97
  #
81
98
  # @param state [Symbol, Lithic::Models::AuthRules::V2CreateResponse::State] The state of the Auth Rule
82
99
  #
83
- # @param type [Symbol, Lithic::Models::AuthRules::V2CreateResponse::Type] The type of Auth Rule
100
+ # @param type [Symbol, Lithic::Models::AuthRules::V2CreateResponse::Type] The type of Auth Rule. Effectively determines the event stream during which it w
84
101
  #
85
102
  # @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
86
103
 
@@ -89,7 +106,7 @@ module Lithic
89
106
  # @!attribute parameters
90
107
  # Parameters for the Auth Rule
91
108
  #
92
- # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters]
109
+ # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters]
93
110
  required :parameters,
94
111
  union: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters }
95
112
 
@@ -106,7 +123,7 @@ module Lithic
106
123
  # Some parameter documentations has been truncated, see
107
124
  # {Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion} for more details.
108
125
  #
109
- # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters] Parameters for the Auth Rule
126
+ # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters] Parameters for the Auth Rule
110
127
  #
111
128
  # @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan
112
129
 
@@ -122,6 +139,8 @@ module Lithic
122
139
 
123
140
  variant -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters }
124
141
 
142
+ variant -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters }
143
+
125
144
  class MerchantLockParameters < Lithic::Internal::Type::BaseModel
126
145
  # @!attribute merchants
127
146
  # A list of merchant locks defining specific merchants or groups of merchants
@@ -179,8 +198,183 @@ module Lithic
179
198
  end
180
199
  end
181
200
 
201
+ class Conditional3DSActionParameters < Lithic::Internal::Type::BaseModel
202
+ # @!attribute action
203
+ # The action to take if the conditions are met.
204
+ #
205
+ # @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Action]
206
+ required :action,
207
+ enum: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Action }
208
+
209
+ # @!attribute conditions
210
+ #
211
+ # @return [Array<Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition>]
212
+ required :conditions,
213
+ -> do
214
+ Lithic::Internal::Type::ArrayOf[
215
+ Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition
216
+ ]
217
+ end
218
+
219
+ # @!method initialize(action:, conditions:)
220
+ # @param action [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Action] The action to take if the conditions are met.
221
+ #
222
+ # @param conditions [Array<Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition>]
223
+
224
+ # The action to take if the conditions are met.
225
+ #
226
+ # @see Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters#action
227
+ module Action
228
+ extend Lithic::Internal::Type::Enum
229
+
230
+ DECLINE = :DECLINE
231
+ CHALLENGE = :CHALLENGE
232
+
233
+ # @!method self.values
234
+ # @return [Array<Symbol>]
235
+ end
236
+
237
+ class Condition < Lithic::Internal::Type::BaseModel
238
+ # @!attribute attribute
239
+ # The attribute to target.
240
+ #
241
+ # The following attributes may be targeted:
242
+ #
243
+ # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
244
+ # business by the types of goods or services it provides.
245
+ # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
246
+ # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
247
+ # Netherlands Antilles.
248
+ # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
249
+ # the transaction.
250
+ # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
251
+ # (merchant).
252
+ # - `DESCRIPTOR`: Short description of card acceptor.
253
+ # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
254
+ # fee field in the settlement/cardholder billing currency. This is the amount
255
+ # the issuer should authorize against unless the issuer is paying the acquirer
256
+ # fee on behalf of the cardholder.
257
+ # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
258
+ # given authentication. Scores are on a range of 0-999, with 0 representing the
259
+ # lowest risk and 999 representing the highest risk. For Visa transactions,
260
+ # where the raw score has a range of 0-99, Lithic will normalize the score by
261
+ # multiplying the raw score by 10x.
262
+ # - `MESSAGE_CATEGORY`: The category of the authentication being processed.
263
+ #
264
+ # @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition::Attribute, nil]
265
+ optional :attribute,
266
+ enum: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition::Attribute }
267
+
268
+ # @!attribute operation
269
+ # The operation to apply to the attribute
270
+ #
271
+ # @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition::Operation, nil]
272
+ optional :operation,
273
+ enum: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition::Operation }
274
+
275
+ # @!attribute value
276
+ # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
277
+ #
278
+ # @return [String, Integer, Array<String>, nil]
279
+ optional :value,
280
+ union: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition::Value }
281
+
282
+ # @!method initialize(attribute: nil, operation: nil, value: nil)
283
+ # Some parameter documentations has been truncated, see
284
+ # {Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition}
285
+ # for more details.
286
+ #
287
+ # @param attribute [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition::Attribute] The attribute to target.
288
+ #
289
+ # @param operation [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition::Operation] The operation to apply to the attribute
290
+ #
291
+ # @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
292
+
293
+ # The attribute to target.
294
+ #
295
+ # The following attributes may be targeted:
296
+ #
297
+ # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
298
+ # business by the types of goods or services it provides.
299
+ # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
300
+ # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
301
+ # Netherlands Antilles.
302
+ # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
303
+ # the transaction.
304
+ # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
305
+ # (merchant).
306
+ # - `DESCRIPTOR`: Short description of card acceptor.
307
+ # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
308
+ # fee field in the settlement/cardholder billing currency. This is the amount
309
+ # the issuer should authorize against unless the issuer is paying the acquirer
310
+ # fee on behalf of the cardholder.
311
+ # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
312
+ # given authentication. Scores are on a range of 0-999, with 0 representing the
313
+ # lowest risk and 999 representing the highest risk. For Visa transactions,
314
+ # where the raw score has a range of 0-99, Lithic will normalize the score by
315
+ # multiplying the raw score by 10x.
316
+ # - `MESSAGE_CATEGORY`: The category of the authentication being processed.
317
+ #
318
+ # @see Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition#attribute
319
+ module Attribute
320
+ extend Lithic::Internal::Type::Enum
321
+
322
+ MCC = :MCC
323
+ COUNTRY = :COUNTRY
324
+ CURRENCY = :CURRENCY
325
+ MERCHANT_ID = :MERCHANT_ID
326
+ DESCRIPTOR = :DESCRIPTOR
327
+ TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
328
+ RISK_SCORE = :RISK_SCORE
329
+ MESSAGE_CATEGORY = :MESSAGE_CATEGORY
330
+
331
+ # @!method self.values
332
+ # @return [Array<Symbol>]
333
+ end
334
+
335
+ # The operation to apply to the attribute
336
+ #
337
+ # @see Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition#operation
338
+ module Operation
339
+ extend Lithic::Internal::Type::Enum
340
+
341
+ IS_ONE_OF = :IS_ONE_OF
342
+ IS_NOT_ONE_OF = :IS_NOT_ONE_OF
343
+ MATCHES = :MATCHES
344
+ DOES_NOT_MATCH = :DOES_NOT_MATCH
345
+ IS_GREATER_THAN = :IS_GREATER_THAN
346
+ IS_LESS_THAN = :IS_LESS_THAN
347
+
348
+ # @!method self.values
349
+ # @return [Array<Symbol>]
350
+ end
351
+
352
+ # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
353
+ #
354
+ # @see Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition#value
355
+ module Value
356
+ extend Lithic::Internal::Type::Union
357
+
358
+ # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
359
+ variant String
360
+
361
+ # A number, to be used with `IS_GREATER_THAN` or `IS_LESS_THAN`
362
+ variant Integer
363
+
364
+ # An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF`
365
+ variant -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters::Condition::Value::StringArray }
366
+
367
+ # @!method self.variants
368
+ # @return [Array(String, Integer, Array<String>)]
369
+
370
+ # @type [Lithic::Internal::Type::Converter]
371
+ StringArray = Lithic::Internal::Type::ArrayOf[String]
372
+ end
373
+ end
374
+ end
375
+
182
376
  # @!method self.variants
183
- # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters)]
377
+ # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Conditional3DSActionParameters)]
184
378
  end
185
379
  end
186
380
 
@@ -189,7 +383,7 @@ module Lithic
189
383
  # @!attribute parameters
190
384
  # Parameters for the Auth Rule
191
385
  #
192
- # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters]
386
+ # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters]
193
387
  required :parameters, union: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters }
194
388
 
195
389
  response_only do
@@ -205,7 +399,7 @@ module Lithic
205
399
  # Some parameter documentations has been truncated, see
206
400
  # {Lithic::Models::AuthRules::V2CreateResponse::DraftVersion} for more details.
207
401
  #
208
- # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters] Parameters for the Auth Rule
402
+ # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters] Parameters for the Auth Rule
209
403
  #
210
404
  # @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan
211
405
 
@@ -221,6 +415,8 @@ module Lithic
221
415
 
222
416
  variant -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters }
223
417
 
418
+ variant -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters }
419
+
224
420
  class MerchantLockParameters < Lithic::Internal::Type::BaseModel
225
421
  # @!attribute merchants
226
422
  # A list of merchant locks defining specific merchants or groups of merchants
@@ -278,11 +474,199 @@ module Lithic
278
474
  end
279
475
  end
280
476
 
477
+ class Conditional3DSActionParameters < Lithic::Internal::Type::BaseModel
478
+ # @!attribute action
479
+ # The action to take if the conditions are met.
480
+ #
481
+ # @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Action]
482
+ required :action,
483
+ enum: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Action }
484
+
485
+ # @!attribute conditions
486
+ #
487
+ # @return [Array<Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition>]
488
+ required :conditions,
489
+ -> do
490
+ Lithic::Internal::Type::ArrayOf[
491
+ Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition
492
+ ]
493
+ end
494
+
495
+ # @!method initialize(action:, conditions:)
496
+ # @param action [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Action] The action to take if the conditions are met.
497
+ #
498
+ # @param conditions [Array<Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition>]
499
+
500
+ # The action to take if the conditions are met.
501
+ #
502
+ # @see Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters#action
503
+ module Action
504
+ extend Lithic::Internal::Type::Enum
505
+
506
+ DECLINE = :DECLINE
507
+ CHALLENGE = :CHALLENGE
508
+
509
+ # @!method self.values
510
+ # @return [Array<Symbol>]
511
+ end
512
+
513
+ class Condition < Lithic::Internal::Type::BaseModel
514
+ # @!attribute attribute
515
+ # The attribute to target.
516
+ #
517
+ # The following attributes may be targeted:
518
+ #
519
+ # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
520
+ # business by the types of goods or services it provides.
521
+ # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
522
+ # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
523
+ # Netherlands Antilles.
524
+ # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
525
+ # the transaction.
526
+ # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
527
+ # (merchant).
528
+ # - `DESCRIPTOR`: Short description of card acceptor.
529
+ # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
530
+ # fee field in the settlement/cardholder billing currency. This is the amount
531
+ # the issuer should authorize against unless the issuer is paying the acquirer
532
+ # fee on behalf of the cardholder.
533
+ # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
534
+ # given authentication. Scores are on a range of 0-999, with 0 representing the
535
+ # lowest risk and 999 representing the highest risk. For Visa transactions,
536
+ # where the raw score has a range of 0-99, Lithic will normalize the score by
537
+ # multiplying the raw score by 10x.
538
+ # - `MESSAGE_CATEGORY`: The category of the authentication being processed.
539
+ #
540
+ # @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition::Attribute, nil]
541
+ optional :attribute,
542
+ enum: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition::Attribute }
543
+
544
+ # @!attribute operation
545
+ # The operation to apply to the attribute
546
+ #
547
+ # @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition::Operation, nil]
548
+ optional :operation,
549
+ enum: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition::Operation }
550
+
551
+ # @!attribute value
552
+ # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
553
+ #
554
+ # @return [String, Integer, Array<String>, nil]
555
+ optional :value,
556
+ union: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition::Value }
557
+
558
+ # @!method initialize(attribute: nil, operation: nil, value: nil)
559
+ # Some parameter documentations has been truncated, see
560
+ # {Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition}
561
+ # for more details.
562
+ #
563
+ # @param attribute [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition::Attribute] The attribute to target.
564
+ #
565
+ # @param operation [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition::Operation] The operation to apply to the attribute
566
+ #
567
+ # @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
568
+
569
+ # The attribute to target.
570
+ #
571
+ # The following attributes may be targeted:
572
+ #
573
+ # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
574
+ # business by the types of goods or services it provides.
575
+ # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
576
+ # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
577
+ # Netherlands Antilles.
578
+ # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
579
+ # the transaction.
580
+ # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
581
+ # (merchant).
582
+ # - `DESCRIPTOR`: Short description of card acceptor.
583
+ # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
584
+ # fee field in the settlement/cardholder billing currency. This is the amount
585
+ # the issuer should authorize against unless the issuer is paying the acquirer
586
+ # fee on behalf of the cardholder.
587
+ # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
588
+ # given authentication. Scores are on a range of 0-999, with 0 representing the
589
+ # lowest risk and 999 representing the highest risk. For Visa transactions,
590
+ # where the raw score has a range of 0-99, Lithic will normalize the score by
591
+ # multiplying the raw score by 10x.
592
+ # - `MESSAGE_CATEGORY`: The category of the authentication being processed.
593
+ #
594
+ # @see Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition#attribute
595
+ module Attribute
596
+ extend Lithic::Internal::Type::Enum
597
+
598
+ MCC = :MCC
599
+ COUNTRY = :COUNTRY
600
+ CURRENCY = :CURRENCY
601
+ MERCHANT_ID = :MERCHANT_ID
602
+ DESCRIPTOR = :DESCRIPTOR
603
+ TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
604
+ RISK_SCORE = :RISK_SCORE
605
+ MESSAGE_CATEGORY = :MESSAGE_CATEGORY
606
+
607
+ # @!method self.values
608
+ # @return [Array<Symbol>]
609
+ end
610
+
611
+ # The operation to apply to the attribute
612
+ #
613
+ # @see Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition#operation
614
+ module Operation
615
+ extend Lithic::Internal::Type::Enum
616
+
617
+ IS_ONE_OF = :IS_ONE_OF
618
+ IS_NOT_ONE_OF = :IS_NOT_ONE_OF
619
+ MATCHES = :MATCHES
620
+ DOES_NOT_MATCH = :DOES_NOT_MATCH
621
+ IS_GREATER_THAN = :IS_GREATER_THAN
622
+ IS_LESS_THAN = :IS_LESS_THAN
623
+
624
+ # @!method self.values
625
+ # @return [Array<Symbol>]
626
+ end
627
+
628
+ # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
629
+ #
630
+ # @see Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition#value
631
+ module Value
632
+ extend Lithic::Internal::Type::Union
633
+
634
+ # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
635
+ variant String
636
+
637
+ # A number, to be used with `IS_GREATER_THAN` or `IS_LESS_THAN`
638
+ variant Integer
639
+
640
+ # An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF`
641
+ variant -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters::Condition::Value::StringArray }
642
+
643
+ # @!method self.variants
644
+ # @return [Array(String, Integer, Array<String>)]
645
+
646
+ # @type [Lithic::Internal::Type::Converter]
647
+ StringArray = Lithic::Internal::Type::ArrayOf[String]
648
+ end
649
+ end
650
+ end
651
+
281
652
  # @!method self.variants
282
- # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters)]
653
+ # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Conditional3DSActionParameters)]
283
654
  end
284
655
  end
285
656
 
657
+ # The type of event stream the Auth rule applies to.
658
+ #
659
+ # @see Lithic::Models::AuthRules::V2CreateResponse#event_stream
660
+ module EventStream
661
+ extend Lithic::Internal::Type::Enum
662
+
663
+ AUTHORIZATION = :AUTHORIZATION
664
+ THREE_DS_AUTHENTICATION = :THREE_DS_AUTHENTICATION
665
+
666
+ # @!method self.values
667
+ # @return [Array<Symbol>]
668
+ end
669
+
286
670
  # The state of the Auth Rule
287
671
  #
288
672
  # @see Lithic::Models::AuthRules::V2CreateResponse#state
@@ -296,7 +680,13 @@ module Lithic
296
680
  # @return [Array<Symbol>]
297
681
  end
298
682
 
299
- # The type of Auth Rule
683
+ # The type of Auth Rule. Effectively determines the event stream during which it
684
+ # will be evaluated.
685
+ #
686
+ # - `CONDITIONAL_BLOCK`: AUTHORIZATION event stream.
687
+ # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
688
+ # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
689
+ # - `CONDITIONAL_3DS_ACTION`: THREE_DS_AUTHENTICATION event stream.
300
690
  #
301
691
  # @see Lithic::Models::AuthRules::V2CreateResponse#type
302
692
  module Type
@@ -305,6 +695,7 @@ module Lithic
305
695
  CONDITIONAL_BLOCK = :CONDITIONAL_BLOCK
306
696
  VELOCITY_LIMIT = :VELOCITY_LIMIT
307
697
  MERCHANT_LOCK = :MERCHANT_LOCK
698
+ CONDITIONAL_3DS_ACTION = :CONDITIONAL_3DS_ACTION
308
699
 
309
700
  # @!method self.values
310
701
  # @return [Array<Symbol>]