-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathv2_create_response.rb
More file actions
753 lines (666 loc) · 43.7 KB
/
Copy pathv2_create_response.rb
File metadata and controls
753 lines (666 loc) · 43.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
# frozen_string_literal: true
module Lithic
module Models
module AuthRules
# @see Lithic::Resources::AuthRules::V2#create
class V2CreateResponse < Lithic::Internal::Type::BaseModel
# @!attribute token
# Auth Rule Token
#
# @return [String]
required :token, String
# @!attribute account_tokens
# Account tokens to which the Auth Rule applies.
#
# @return [Array<String>]
required :account_tokens, Lithic::Internal::Type::ArrayOf[String]
# @!attribute business_account_tokens
# Business Account tokens to which the Auth Rule applies.
#
# @return [Array<String>]
required :business_account_tokens, Lithic::Internal::Type::ArrayOf[String]
# @!attribute card_tokens
# Card tokens to which the Auth Rule applies.
#
# @return [Array<String>]
required :card_tokens, Lithic::Internal::Type::ArrayOf[String]
# @!attribute current_version
#
# @return [Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion, nil]
required :current_version, -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion }, nil?: true
# @!attribute draft_version
#
# @return [Lithic::Models::AuthRules::V2CreateResponse::DraftVersion, nil]
required :draft_version, -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion }, nil?: true
# @!attribute event_stream
# The event stream during which the rule will be evaluated.
#
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::EventStream]
required :event_stream, enum: -> { Lithic::Models::AuthRules::V2CreateResponse::EventStream }
# @!attribute lithic_managed
# Indicates whether this auth rule is managed by Lithic. If true, the rule cannot
# be modified or deleted by the user
#
# @return [Boolean]
required :lithic_managed, Lithic::Internal::Type::Boolean
# @!attribute name
# Auth Rule Name
#
# @return [String, nil]
required :name, String, nil?: true
# @!attribute program_level
# Whether the Auth Rule applies to all authorizations on the card program.
#
# @return [Boolean]
required :program_level, Lithic::Internal::Type::Boolean
# @!attribute state
# The state of the Auth Rule
#
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::State]
required :state, enum: -> { Lithic::Models::AuthRules::V2CreateResponse::State }
# @!attribute type
# The type of Auth Rule. For certain rule types, this determines the event stream
# during which it will be evaluated. For rules that can be applied to one of
# several event streams, the effective one is defined by the separate
# `event_stream` field.
#
# - `CONDITIONAL_BLOCK`: AUTHORIZATION event stream.
# - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
# - `MERCHANT_LOCK`: AUTHORIZATION event stream.
# - `CONDITIONAL_ACTION`: AUTHORIZATION or THREE_DS_AUTHENTICATION event stream.
#
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::Type]
required :type, enum: -> { Lithic::Models::AuthRules::V2CreateResponse::Type }
# @!attribute excluded_card_tokens
# Card tokens to which the Auth Rule does not apply.
#
# @return [Array<String>, nil]
optional :excluded_card_tokens, Lithic::Internal::Type::ArrayOf[String]
# @!method initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, lithic_managed:, name:, program_level:, state:, type:, excluded_card_tokens: nil)
# Some parameter documentations has been truncated, see
# {Lithic::Models::AuthRules::V2CreateResponse} for more details.
#
# @param token [String] Auth Rule Token
#
# @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
#
# @param business_account_tokens [Array<String>] Business Account tokens to which the Auth Rule applies.
#
# @param card_tokens [Array<String>] Card tokens to which the Auth Rule applies.
#
# @param current_version [Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion, nil]
#
# @param draft_version [Lithic::Models::AuthRules::V2CreateResponse::DraftVersion, nil]
#
# @param event_stream [Symbol, Lithic::Models::AuthRules::V2CreateResponse::EventStream] The event stream during which the rule will be evaluated.
#
# @param lithic_managed [Boolean] Indicates whether this auth rule is managed by Lithic. If true, the rule cannot
#
# @param name [String, nil] Auth Rule Name
#
# @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program.
#
# @param state [Symbol, Lithic::Models::AuthRules::V2CreateResponse::State] The state of the Auth Rule
#
# @param type [Symbol, Lithic::Models::AuthRules::V2CreateResponse::Type] The type of Auth Rule. For certain rule types, this determines the event stream
#
# @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
# @see Lithic::Models::AuthRules::V2CreateResponse#current_version
class CurrentVersion < Lithic::Internal::Type::BaseModel
# @!attribute parameters
# Parameters for the Auth Rule
#
# @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters]
required :parameters,
union: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters }
response_only do
# @!attribute version
# The version of the rule, this is incremented whenever the rule's parameters
# change.
#
# @return [Integer]
required :version, Integer
end
# @!method initialize(parameters:, version:)
# Some parameter documentations has been truncated, see
# {Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion} for more details.
#
# @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters] Parameters for the Auth Rule
#
# @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan
# Parameters for the Auth Rule
#
# @see Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion#parameters
module Parameters
extend Lithic::Internal::Type::Union
variant -> { Lithic::AuthRules::ConditionalBlockParameters }
variant -> { Lithic::AuthRules::VelocityLimitParams }
variant -> { Lithic::AuthRules::MerchantLockParameters }
variant -> { Lithic::AuthRules::Conditional3DSActionParameters }
variant -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters }
class ConditionalAuthorizationActionParameters < Lithic::Internal::Type::BaseModel
# @!attribute action
# The action to take if the conditions are met.
#
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Action]
required :action,
enum: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Action }
# @!attribute conditions
#
# @return [Array<Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition>]
required :conditions,
-> do
Lithic::Internal::Type::ArrayOf[
Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition
]
end
# @!method initialize(action:, conditions:)
# @param action [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Action] The action to take if the conditions are met.
#
# @param conditions [Array<Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition>]
# The action to take if the conditions are met.
#
# @see Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters#action
module Action
extend Lithic::Internal::Type::Enum
DECLINE = :DECLINE
CHALLENGE = :CHALLENGE
# @!method self.values
# @return [Array<Symbol>]
end
class Condition < Lithic::Internal::Type::BaseModel
# @!attribute attribute
# The attribute to target.
#
# The following attributes may be targeted:
#
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
# business by the types of goods or services it provides.
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
# Netherlands Antilles.
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
# the transaction.
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
# (merchant).
# - `DESCRIPTOR`: Short description of card acceptor.
# - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
# applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
# `TOKEN_AUTHENTICATED`.
# - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
# (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
# `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
# `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
# `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
# fee field in the settlement/cardholder billing currency. This is the amount
# the issuer should authorize against unless the issuer is paying the acquirer
# fee on behalf of the cardholder.
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
# represents the amount of cash being withdrawn or advanced.
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
# given authorization. Scores are on a range of 0-999, with 0 representing the
# lowest risk and 999 representing the highest risk. For Visa transactions,
# where the raw score has a range of 0-99, Lithic will normalize the score by
# multiplying the raw score by 10x.
# - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
# trailing 15 minutes before the authorization.
# - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
# trailing hour up and until the authorization.
# - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
# trailing 24 hours up and until the authorization.
# - `CARD_STATE`: The current state of the card associated with the transaction.
# Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
# `PENDING_FULFILLMENT`.
# - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
# Valid values are `TRUE`, `FALSE`.
# - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
# `OK`, `BLOCKED`.
# - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
# source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
# `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
# - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
# the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
#
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Attribute, nil]
optional :attribute,
enum: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Attribute }
# @!attribute operation
# The operation to apply to the attribute
#
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Operation, nil]
optional :operation,
enum: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Operation }
# @!attribute value
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
#
# @return [String, Integer, Array<String>, nil]
optional :value,
union: -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Value }
# @!method initialize(attribute: nil, operation: nil, value: nil)
# Some parameter documentations has been truncated, see
# {Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition}
# for more details.
#
# @param attribute [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Attribute] The attribute to target.
#
# @param operation [Symbol, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Operation] The operation to apply to the attribute
#
# @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
# The attribute to target.
#
# The following attributes may be targeted:
#
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
# business by the types of goods or services it provides.
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
# Netherlands Antilles.
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
# the transaction.
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
# (merchant).
# - `DESCRIPTOR`: Short description of card acceptor.
# - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
# applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
# `TOKEN_AUTHENTICATED`.
# - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
# (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
# `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
# `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
# `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
# fee field in the settlement/cardholder billing currency. This is the amount
# the issuer should authorize against unless the issuer is paying the acquirer
# fee on behalf of the cardholder.
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
# represents the amount of cash being withdrawn or advanced.
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
# given authorization. Scores are on a range of 0-999, with 0 representing the
# lowest risk and 999 representing the highest risk. For Visa transactions,
# where the raw score has a range of 0-99, Lithic will normalize the score by
# multiplying the raw score by 10x.
# - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
# trailing 15 minutes before the authorization.
# - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
# trailing hour up and until the authorization.
# - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
# trailing 24 hours up and until the authorization.
# - `CARD_STATE`: The current state of the card associated with the transaction.
# Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
# `PENDING_FULFILLMENT`.
# - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
# Valid values are `TRUE`, `FALSE`.
# - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
# `OK`, `BLOCKED`.
# - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
# source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
# `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
# - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
# the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
#
# @see Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition#attribute
module Attribute
extend Lithic::Internal::Type::Enum
MCC = :MCC
COUNTRY = :COUNTRY
CURRENCY = :CURRENCY
MERCHANT_ID = :MERCHANT_ID
DESCRIPTOR = :DESCRIPTOR
LIABILITY_SHIFT = :LIABILITY_SHIFT
PAN_ENTRY_MODE = :PAN_ENTRY_MODE
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
CASH_AMOUNT = :CASH_AMOUNT
RISK_SCORE = :RISK_SCORE
CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M
CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H
CARD_TRANSACTION_COUNT_24_H = :CARD_TRANSACTION_COUNT_24H
CARD_STATE = :CARD_STATE
PIN_ENTERED = :PIN_ENTERED
PIN_STATUS = :PIN_STATUS
WALLET_TYPE = :WALLET_TYPE
TRANSACTION_INITIATOR = :TRANSACTION_INITIATOR
# @!method self.values
# @return [Array<Symbol>]
end
# The operation to apply to the attribute
#
# @see Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition#operation
module Operation
extend Lithic::Internal::Type::Enum
IS_ONE_OF = :IS_ONE_OF
IS_NOT_ONE_OF = :IS_NOT_ONE_OF
MATCHES = :MATCHES
DOES_NOT_MATCH = :DOES_NOT_MATCH
IS_EQUAL_TO = :IS_EQUAL_TO
IS_NOT_EQUAL_TO = :IS_NOT_EQUAL_TO
IS_GREATER_THAN = :IS_GREATER_THAN
IS_GREATER_THAN_OR_EQUAL_TO = :IS_GREATER_THAN_OR_EQUAL_TO
IS_LESS_THAN = :IS_LESS_THAN
IS_LESS_THAN_OR_EQUAL_TO = :IS_LESS_THAN_OR_EQUAL_TO
# @!method self.values
# @return [Array<Symbol>]
end
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
#
# @see Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition#value
module Value
extend Lithic::Internal::Type::Union
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
variant String
# A number, to be used with `IS_GREATER_THAN`, `IS_GREATER_THAN_OR_EQUAL_TO`, `IS_LESS_THAN`, `IS_LESS_THAN_OR_EQUAL_TO`, `IS_EQUAL_TO`, or `IS_NOT_EQUAL_TO`
variant Integer
# An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF`
variant -> { Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Value::StringArray }
# @!method self.variants
# @return [Array(String, Integer, Array<String>)]
# @type [Lithic::Internal::Type::Converter]
StringArray = Lithic::Internal::Type::ArrayOf[String]
end
end
end
# @!method self.variants
# @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::ConditionalAuthorizationActionParameters)]
end
end
# @see Lithic::Models::AuthRules::V2CreateResponse#draft_version
class DraftVersion < Lithic::Internal::Type::BaseModel
# @!attribute parameters
# Parameters for the Auth Rule
#
# @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters]
required :parameters, union: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters }
response_only do
# @!attribute version
# The version of the rule, this is incremented whenever the rule's parameters
# change.
#
# @return [Integer]
required :version, Integer
end
# @!method initialize(parameters:, version:)
# Some parameter documentations has been truncated, see
# {Lithic::Models::AuthRules::V2CreateResponse::DraftVersion} for more details.
#
# @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters] Parameters for the Auth Rule
#
# @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan
# Parameters for the Auth Rule
#
# @see Lithic::Models::AuthRules::V2CreateResponse::DraftVersion#parameters
module Parameters
extend Lithic::Internal::Type::Union
variant -> { Lithic::AuthRules::ConditionalBlockParameters }
variant -> { Lithic::AuthRules::VelocityLimitParams }
variant -> { Lithic::AuthRules::MerchantLockParameters }
variant -> { Lithic::AuthRules::Conditional3DSActionParameters }
variant -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters }
class ConditionalAuthorizationActionParameters < Lithic::Internal::Type::BaseModel
# @!attribute action
# The action to take if the conditions are met.
#
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Action]
required :action,
enum: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Action }
# @!attribute conditions
#
# @return [Array<Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition>]
required :conditions,
-> do
Lithic::Internal::Type::ArrayOf[
Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition
]
end
# @!method initialize(action:, conditions:)
# @param action [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Action] The action to take if the conditions are met.
#
# @param conditions [Array<Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition>]
# The action to take if the conditions are met.
#
# @see Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters#action
module Action
extend Lithic::Internal::Type::Enum
DECLINE = :DECLINE
CHALLENGE = :CHALLENGE
# @!method self.values
# @return [Array<Symbol>]
end
class Condition < Lithic::Internal::Type::BaseModel
# @!attribute attribute
# The attribute to target.
#
# The following attributes may be targeted:
#
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
# business by the types of goods or services it provides.
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
# Netherlands Antilles.
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
# the transaction.
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
# (merchant).
# - `DESCRIPTOR`: Short description of card acceptor.
# - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
# applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
# `TOKEN_AUTHENTICATED`.
# - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
# (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
# `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
# `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
# `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
# fee field in the settlement/cardholder billing currency. This is the amount
# the issuer should authorize against unless the issuer is paying the acquirer
# fee on behalf of the cardholder.
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
# represents the amount of cash being withdrawn or advanced.
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
# given authorization. Scores are on a range of 0-999, with 0 representing the
# lowest risk and 999 representing the highest risk. For Visa transactions,
# where the raw score has a range of 0-99, Lithic will normalize the score by
# multiplying the raw score by 10x.
# - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
# trailing 15 minutes before the authorization.
# - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
# trailing hour up and until the authorization.
# - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
# trailing 24 hours up and until the authorization.
# - `CARD_STATE`: The current state of the card associated with the transaction.
# Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
# `PENDING_FULFILLMENT`.
# - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
# Valid values are `TRUE`, `FALSE`.
# - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
# `OK`, `BLOCKED`.
# - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
# source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
# `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
# - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
# the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
#
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Attribute, nil]
optional :attribute,
enum: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Attribute }
# @!attribute operation
# The operation to apply to the attribute
#
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Operation, nil]
optional :operation,
enum: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Operation }
# @!attribute value
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
#
# @return [String, Integer, Array<String>, nil]
optional :value,
union: -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Value }
# @!method initialize(attribute: nil, operation: nil, value: nil)
# Some parameter documentations has been truncated, see
# {Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition}
# for more details.
#
# @param attribute [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Attribute] The attribute to target.
#
# @param operation [Symbol, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Operation] The operation to apply to the attribute
#
# @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
# The attribute to target.
#
# The following attributes may be targeted:
#
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
# business by the types of goods or services it provides.
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
# Netherlands Antilles.
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
# the transaction.
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
# (merchant).
# - `DESCRIPTOR`: Short description of card acceptor.
# - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
# applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
# `TOKEN_AUTHENTICATED`.
# - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
# (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
# `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
# `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
# `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
# fee field in the settlement/cardholder billing currency. This is the amount
# the issuer should authorize against unless the issuer is paying the acquirer
# fee on behalf of the cardholder.
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
# represents the amount of cash being withdrawn or advanced.
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
# given authorization. Scores are on a range of 0-999, with 0 representing the
# lowest risk and 999 representing the highest risk. For Visa transactions,
# where the raw score has a range of 0-99, Lithic will normalize the score by
# multiplying the raw score by 10x.
# - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
# trailing 15 minutes before the authorization.
# - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
# trailing hour up and until the authorization.
# - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
# trailing 24 hours up and until the authorization.
# - `CARD_STATE`: The current state of the card associated with the transaction.
# Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
# `PENDING_FULFILLMENT`.
# - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
# Valid values are `TRUE`, `FALSE`.
# - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
# `OK`, `BLOCKED`.
# - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
# source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
# `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
# - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
# the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
#
# @see Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition#attribute
module Attribute
extend Lithic::Internal::Type::Enum
MCC = :MCC
COUNTRY = :COUNTRY
CURRENCY = :CURRENCY
MERCHANT_ID = :MERCHANT_ID
DESCRIPTOR = :DESCRIPTOR
LIABILITY_SHIFT = :LIABILITY_SHIFT
PAN_ENTRY_MODE = :PAN_ENTRY_MODE
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
CASH_AMOUNT = :CASH_AMOUNT
RISK_SCORE = :RISK_SCORE
CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M
CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H
CARD_TRANSACTION_COUNT_24_H = :CARD_TRANSACTION_COUNT_24H
CARD_STATE = :CARD_STATE
PIN_ENTERED = :PIN_ENTERED
PIN_STATUS = :PIN_STATUS
WALLET_TYPE = :WALLET_TYPE
TRANSACTION_INITIATOR = :TRANSACTION_INITIATOR
# @!method self.values
# @return [Array<Symbol>]
end
# The operation to apply to the attribute
#
# @see Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition#operation
module Operation
extend Lithic::Internal::Type::Enum
IS_ONE_OF = :IS_ONE_OF
IS_NOT_ONE_OF = :IS_NOT_ONE_OF
MATCHES = :MATCHES
DOES_NOT_MATCH = :DOES_NOT_MATCH
IS_EQUAL_TO = :IS_EQUAL_TO
IS_NOT_EQUAL_TO = :IS_NOT_EQUAL_TO
IS_GREATER_THAN = :IS_GREATER_THAN
IS_GREATER_THAN_OR_EQUAL_TO = :IS_GREATER_THAN_OR_EQUAL_TO
IS_LESS_THAN = :IS_LESS_THAN
IS_LESS_THAN_OR_EQUAL_TO = :IS_LESS_THAN_OR_EQUAL_TO
# @!method self.values
# @return [Array<Symbol>]
end
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
#
# @see Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition#value
module Value
extend Lithic::Internal::Type::Union
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
variant String
# A number, to be used with `IS_GREATER_THAN`, `IS_GREATER_THAN_OR_EQUAL_TO`, `IS_LESS_THAN`, `IS_LESS_THAN_OR_EQUAL_TO`, `IS_EQUAL_TO`, or `IS_NOT_EQUAL_TO`
variant Integer
# An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF`
variant -> { Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters::Condition::Value::StringArray }
# @!method self.variants
# @return [Array(String, Integer, Array<String>)]
# @type [Lithic::Internal::Type::Converter]
StringArray = Lithic::Internal::Type::ArrayOf[String]
end
end
end
# @!method self.variants
# @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::ConditionalAuthorizationActionParameters)]
end
end
# The event stream during which the rule will be evaluated.
#
# @see Lithic::Models::AuthRules::V2CreateResponse#event_stream
module EventStream
extend Lithic::Internal::Type::Enum
AUTHORIZATION = :AUTHORIZATION
THREE_DS_AUTHENTICATION = :THREE_DS_AUTHENTICATION
# @!method self.values
# @return [Array<Symbol>]
end
# The state of the Auth Rule
#
# @see Lithic::Models::AuthRules::V2CreateResponse#state
module State
extend Lithic::Internal::Type::Enum
ACTIVE = :ACTIVE
INACTIVE = :INACTIVE
# @!method self.values
# @return [Array<Symbol>]
end
# The type of Auth Rule. For certain rule types, this determines the event stream
# during which it will be evaluated. For rules that can be applied to one of
# several event streams, the effective one is defined by the separate
# `event_stream` field.
#
# - `CONDITIONAL_BLOCK`: AUTHORIZATION event stream.
# - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
# - `MERCHANT_LOCK`: AUTHORIZATION event stream.
# - `CONDITIONAL_ACTION`: AUTHORIZATION or THREE_DS_AUTHENTICATION event stream.
#
# @see Lithic::Models::AuthRules::V2CreateResponse#type
module Type
extend Lithic::Internal::Type::Enum
CONDITIONAL_BLOCK = :CONDITIONAL_BLOCK
VELOCITY_LIMIT = :VELOCITY_LIMIT
MERCHANT_LOCK = :MERCHANT_LOCK
CONDITIONAL_ACTION = :CONDITIONAL_ACTION
# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
end