lithic 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +73 -0
  3. data/README.md +10 -1
  4. data/lib/lithic/internal/transport/pooled_net_requester.rb +1 -1
  5. data/lib/lithic/internal/util.rb +1 -1
  6. data/lib/lithic/models/account_holder.rb +14 -5
  7. data/lib/lithic/models/account_holder_create_params.rb +10 -1
  8. data/lib/lithic/models/account_holder_simulate_enrollment_review_params.rb +1 -0
  9. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +14 -5
  10. data/lib/lithic/models/account_holder_update_params.rb +10 -1
  11. data/lib/lithic/models/account_holder_update_response.rb +14 -5
  12. data/lib/lithic/models/account_holder_updated_webhook_event.rb +10 -1
  13. data/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +3 -3
  14. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +47 -21
  15. data/lib/lithic/models/auth_rules/v2_list_results_params.rb +70 -0
  16. data/lib/lithic/models/auth_rules/v2_list_results_response.rb +740 -0
  17. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +21 -21
  18. data/lib/lithic/models/book_transfer_create_params.rb +9 -1
  19. data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +178 -25
  20. data/lib/lithic/models/card_create_params.rb +12 -5
  21. data/lib/lithic/models/card_updated_webhook_event.rb +40 -0
  22. data/lib/lithic/models/card_web_provision_response.rb +5 -5
  23. data/lib/lithic/models/event.rb +3 -0
  24. data/lib/lithic/models/event_list_params.rb +2 -0
  25. data/lib/lithic/models/event_subscription.rb +2 -0
  26. data/lib/lithic/models/events/subscription_create_params.rb +2 -0
  27. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
  28. data/lib/lithic/models/events/subscription_update_params.rb +2 -0
  29. data/lib/lithic/models/financial_transaction.rb +4 -2
  30. data/lib/lithic/models/kyb.rb +10 -1
  31. data/lib/lithic/models/non_pci_card.rb +8 -10
  32. data/lib/lithic/models/parsed_webhook_event.rb +13 -2
  33. data/lib/lithic/models/payment.rb +1 -1
  34. data/lib/lithic/models/payment_create_params.rb +1 -1
  35. data/lib/lithic/models/transaction.rb +10 -1
  36. data/lib/lithic/models/transaction_simulate_authorization_params.rb +25 -1
  37. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +25 -1
  38. data/lib/lithic/models.rb +2 -0
  39. data/lib/lithic/resources/account_holders.rb +6 -2
  40. data/lib/lithic/resources/auth_rules/v2.rb +42 -0
  41. data/lib/lithic/resources/book_transfers.rb +3 -1
  42. data/lib/lithic/resources/cards.rb +32 -22
  43. data/lib/lithic/resources/financial_accounts.rb +5 -5
  44. data/lib/lithic/resources/transactions.rb +14 -2
  45. data/lib/lithic/resources/webhooks.rb +1 -1
  46. data/lib/lithic/version.rb +1 -1
  47. data/lib/lithic.rb +3 -0
  48. data/rbi/lithic/internal/util.rbi +1 -1
  49. data/rbi/lithic/models/account_holder.rbi +19 -6
  50. data/rbi/lithic/models/account_holder_create_params.rbi +13 -0
  51. data/rbi/lithic/models/account_holder_simulate_enrollment_review_params.rbi +5 -0
  52. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +19 -6
  53. data/rbi/lithic/models/account_holder_update_params.rbi +13 -0
  54. data/rbi/lithic/models/account_holder_update_response.rbi +19 -6
  55. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +13 -0
  56. data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +3 -3
  57. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +69 -30
  58. data/rbi/lithic/models/auth_rules/v2_list_results_params.rbi +112 -0
  59. data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +1826 -0
  60. data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +47 -45
  61. data/rbi/lithic/models/book_transfer_create_params.rbi +11 -0
  62. data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +337 -36
  63. data/rbi/lithic/models/card_create_params.rbi +15 -6
  64. data/rbi/lithic/models/card_updated_webhook_event.rbi +61 -0
  65. data/rbi/lithic/models/card_web_provision_response.rbi +5 -10
  66. data/rbi/lithic/models/event.rbi +5 -0
  67. data/rbi/lithic/models/event_list_params.rbi +6 -0
  68. data/rbi/lithic/models/event_subscription.rbi +6 -0
  69. data/rbi/lithic/models/events/subscription_create_params.rbi +6 -0
  70. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
  71. data/rbi/lithic/models/events/subscription_update_params.rbi +6 -0
  72. data/rbi/lithic/models/financial_transaction.rbi +8 -4
  73. data/rbi/lithic/models/kyb.rbi +13 -0
  74. data/rbi/lithic/models/non_pci_card.rbi +12 -15
  75. data/rbi/lithic/models/parsed_webhook_event.rbi +14 -0
  76. data/rbi/lithic/models/payment.rbi +5 -2
  77. data/rbi/lithic/models/transaction.rbi +10 -0
  78. data/rbi/lithic/models/transaction_simulate_authorization_params.rbi +33 -0
  79. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +33 -0
  80. data/rbi/lithic/models.rbi +2 -0
  81. data/rbi/lithic/resources/account_holders.rbi +8 -0
  82. data/rbi/lithic/resources/auth_rules/v2.rbi +42 -0
  83. data/rbi/lithic/resources/book_transfers.rbi +3 -0
  84. data/rbi/lithic/resources/cards.rbi +51 -45
  85. data/rbi/lithic/resources/financial_accounts.rbi +5 -5
  86. data/rbi/lithic/resources/transactions.rbi +18 -0
  87. data/rbi/lithic/resources/webhooks.rbi +62 -1
  88. data/sig/lithic/models/account_holder.rbs +7 -0
  89. data/sig/lithic/models/account_holder_create_params.rbs +7 -0
  90. data/sig/lithic/models/account_holder_simulate_enrollment_review_params.rbs +2 -1
  91. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +7 -0
  92. data/sig/lithic/models/account_holder_update_params.rbs +7 -0
  93. data/sig/lithic/models/account_holder_update_response.rbs +7 -0
  94. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +7 -0
  95. data/sig/lithic/models/auth_rules/v2_list_results_params.rbs +65 -0
  96. data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +752 -0
  97. data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +20 -16
  98. data/sig/lithic/models/book_transfer_create_params.rbs +7 -0
  99. data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +96 -0
  100. data/sig/lithic/models/card_create_params.rbs +8 -1
  101. data/sig/lithic/models/card_updated_webhook_event.rbs +35 -0
  102. data/sig/lithic/models/card_web_provision_response.rbs +4 -10
  103. data/sig/lithic/models/event.rbs +2 -0
  104. data/sig/lithic/models/event_list_params.rbs +2 -0
  105. data/sig/lithic/models/event_subscription.rbs +2 -0
  106. data/sig/lithic/models/events/subscription_create_params.rbs +2 -0
  107. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +2 -0
  108. data/sig/lithic/models/events/subscription_update_params.rbs +2 -0
  109. data/sig/lithic/models/kyb.rbs +7 -0
  110. data/sig/lithic/models/parsed_webhook_event.rbs +8 -0
  111. data/sig/lithic/models/payment.rbs +2 -2
  112. data/sig/lithic/models/transaction.rbs +5 -0
  113. data/sig/lithic/models/transaction_simulate_authorization_params.rbs +21 -0
  114. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +22 -1
  115. data/sig/lithic/models.rbs +2 -0
  116. data/sig/lithic/resources/account_holders.rbs +2 -0
  117. data/sig/lithic/resources/auth_rules/v2.rbs +10 -0
  118. data/sig/lithic/resources/book_transfers.rbs +1 -0
  119. data/sig/lithic/resources/cards.rbs +1 -0
  120. data/sig/lithic/resources/transactions.rbs +6 -0
  121. data/sig/lithic/resources/webhooks.rbs +58 -1
  122. metadata +25 -2
@@ -0,0 +1,740 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ module AuthRules
6
+ # Result of an Auth Rule evaluation
7
+ #
8
+ # @see Lithic::Resources::AuthRules::V2#list_results
9
+ module V2ListResultsResponse
10
+ extend Lithic::Internal::Type::Union
11
+
12
+ variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult }
13
+
14
+ variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult }
15
+
16
+ variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult }
17
+
18
+ variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult }
19
+
20
+ class AuthorizationResult < Lithic::Internal::Type::BaseModel
21
+ # @!attribute token
22
+ # Globally unique identifier for the evaluation
23
+ #
24
+ # @return [String]
25
+ required :token, String
26
+
27
+ # @!attribute actions
28
+ # Actions returned by the rule evaluation
29
+ #
30
+ # @return [Array<Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action>]
31
+ required :actions,
32
+ -> { Lithic::Internal::Type::ArrayOf[Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action] }
33
+
34
+ # @!attribute auth_rule_token
35
+ # The Auth Rule token
36
+ #
37
+ # @return [String]
38
+ required :auth_rule_token, String
39
+
40
+ # @!attribute evaluation_time
41
+ # Timestamp of the rule evaluation
42
+ #
43
+ # @return [Time]
44
+ required :evaluation_time, Time
45
+
46
+ # @!attribute event_stream
47
+ # The event stream during which the rule was evaluated
48
+ #
49
+ # @return [Symbol, :AUTHORIZATION]
50
+ required :event_stream, const: :AUTHORIZATION
51
+
52
+ # @!attribute event_token
53
+ # Token of the event that triggered the evaluation
54
+ #
55
+ # @return [String]
56
+ required :event_token, String
57
+
58
+ # @!attribute mode
59
+ # The state of the Auth Rule
60
+ #
61
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode]
62
+ required :mode, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode }
63
+
64
+ # @!attribute rule_version
65
+ # Version of the rule that was evaluated
66
+ #
67
+ # @return [Integer]
68
+ required :rule_version, Integer
69
+
70
+ # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, event_stream: :AUTHORIZATION)
71
+ # @param token [String] Globally unique identifier for the evaluation
72
+ #
73
+ # @param actions [Array<Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action>] Actions returned by the rule evaluation
74
+ #
75
+ # @param auth_rule_token [String] The Auth Rule token
76
+ #
77
+ # @param evaluation_time [Time] Timestamp of the rule evaluation
78
+ #
79
+ # @param event_token [String] Token of the event that triggered the evaluation
80
+ #
81
+ # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode] The state of the Auth Rule
82
+ #
83
+ # @param rule_version [Integer] Version of the rule that was evaluated
84
+ #
85
+ # @param event_stream [Symbol, :AUTHORIZATION] The event stream during which the rule was evaluated
86
+
87
+ class Action < Lithic::Internal::Type::BaseModel
88
+ # @!attribute type
89
+ #
90
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type]
91
+ required :type,
92
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type }
93
+
94
+ # @!attribute explanation
95
+ # Optional explanation for why this action was taken
96
+ #
97
+ # @return [String, nil]
98
+ optional :explanation, String
99
+
100
+ # @!method initialize(type:, explanation: nil)
101
+ # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type]
102
+ #
103
+ # @param explanation [String] Optional explanation for why this action was taken
104
+
105
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action#type
106
+ module Type
107
+ extend Lithic::Internal::Type::Enum
108
+
109
+ DECLINE = :DECLINE
110
+ CHALLENGE = :CHALLENGE
111
+
112
+ # @!method self.values
113
+ # @return [Array<Symbol>]
114
+ end
115
+ end
116
+
117
+ # The state of the Auth Rule
118
+ #
119
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult#mode
120
+ module Mode
121
+ extend Lithic::Internal::Type::Enum
122
+
123
+ ACTIVE = :ACTIVE
124
+ INACTIVE = :INACTIVE
125
+
126
+ # @!method self.values
127
+ # @return [Array<Symbol>]
128
+ end
129
+ end
130
+
131
+ class Authentication3DSResult < Lithic::Internal::Type::BaseModel
132
+ # @!attribute token
133
+ # Globally unique identifier for the evaluation
134
+ #
135
+ # @return [String]
136
+ required :token, String
137
+
138
+ # @!attribute actions
139
+ # Actions returned by the rule evaluation
140
+ #
141
+ # @return [Array<Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action>]
142
+ required :actions,
143
+ -> { Lithic::Internal::Type::ArrayOf[Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action] }
144
+
145
+ # @!attribute auth_rule_token
146
+ # The Auth Rule token
147
+ #
148
+ # @return [String]
149
+ required :auth_rule_token, String
150
+
151
+ # @!attribute evaluation_time
152
+ # Timestamp of the rule evaluation
153
+ #
154
+ # @return [Time]
155
+ required :evaluation_time, Time
156
+
157
+ # @!attribute event_stream
158
+ # The event stream during which the rule was evaluated
159
+ #
160
+ # @return [Symbol, :THREE_DS_AUTHENTICATION]
161
+ required :event_stream, const: :THREE_DS_AUTHENTICATION
162
+
163
+ # @!attribute event_token
164
+ # Token of the event that triggered the evaluation
165
+ #
166
+ # @return [String]
167
+ required :event_token, String
168
+
169
+ # @!attribute mode
170
+ # The state of the Auth Rule
171
+ #
172
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode]
173
+ required :mode,
174
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode }
175
+
176
+ # @!attribute rule_version
177
+ # Version of the rule that was evaluated
178
+ #
179
+ # @return [Integer]
180
+ required :rule_version, Integer
181
+
182
+ # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, event_stream: :THREE_DS_AUTHENTICATION)
183
+ # @param token [String] Globally unique identifier for the evaluation
184
+ #
185
+ # @param actions [Array<Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action>] Actions returned by the rule evaluation
186
+ #
187
+ # @param auth_rule_token [String] The Auth Rule token
188
+ #
189
+ # @param evaluation_time [Time] Timestamp of the rule evaluation
190
+ #
191
+ # @param event_token [String] Token of the event that triggered the evaluation
192
+ #
193
+ # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode] The state of the Auth Rule
194
+ #
195
+ # @param rule_version [Integer] Version of the rule that was evaluated
196
+ #
197
+ # @param event_stream [Symbol, :THREE_DS_AUTHENTICATION] The event stream during which the rule was evaluated
198
+
199
+ class Action < Lithic::Internal::Type::BaseModel
200
+ # @!attribute type
201
+ #
202
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type]
203
+ required :type,
204
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type }
205
+
206
+ # @!attribute explanation
207
+ # Optional explanation for why this action was taken
208
+ #
209
+ # @return [String, nil]
210
+ optional :explanation, String
211
+
212
+ # @!method initialize(type:, explanation: nil)
213
+ # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type]
214
+ #
215
+ # @param explanation [String] Optional explanation for why this action was taken
216
+
217
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action#type
218
+ module Type
219
+ extend Lithic::Internal::Type::Enum
220
+
221
+ DECLINE = :DECLINE
222
+ CHALLENGE = :CHALLENGE
223
+
224
+ # @!method self.values
225
+ # @return [Array<Symbol>]
226
+ end
227
+ end
228
+
229
+ # The state of the Auth Rule
230
+ #
231
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult#mode
232
+ module Mode
233
+ extend Lithic::Internal::Type::Enum
234
+
235
+ ACTIVE = :ACTIVE
236
+ INACTIVE = :INACTIVE
237
+
238
+ # @!method self.values
239
+ # @return [Array<Symbol>]
240
+ end
241
+ end
242
+
243
+ class TokenizationResult < Lithic::Internal::Type::BaseModel
244
+ # @!attribute token
245
+ # Globally unique identifier for the evaluation
246
+ #
247
+ # @return [String]
248
+ required :token, String
249
+
250
+ # @!attribute actions
251
+ # Actions returned by the rule evaluation
252
+ #
253
+ # @return [Array<Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction>]
254
+ required :actions,
255
+ -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action] }
256
+
257
+ # @!attribute auth_rule_token
258
+ # The Auth Rule token
259
+ #
260
+ # @return [String]
261
+ required :auth_rule_token, String
262
+
263
+ # @!attribute evaluation_time
264
+ # Timestamp of the rule evaluation
265
+ #
266
+ # @return [Time]
267
+ required :evaluation_time, Time
268
+
269
+ # @!attribute event_stream
270
+ # The event stream during which the rule was evaluated
271
+ #
272
+ # @return [Symbol, :TOKENIZATION]
273
+ required :event_stream, const: :TOKENIZATION
274
+
275
+ # @!attribute event_token
276
+ # Token of the event that triggered the evaluation
277
+ #
278
+ # @return [String]
279
+ required :event_token, String
280
+
281
+ # @!attribute mode
282
+ # The state of the Auth Rule
283
+ #
284
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode]
285
+ required :mode, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode }
286
+
287
+ # @!attribute rule_version
288
+ # Version of the rule that was evaluated
289
+ #
290
+ # @return [Integer]
291
+ required :rule_version, Integer
292
+
293
+ # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, event_stream: :TOKENIZATION)
294
+ # @param token [String] Globally unique identifier for the evaluation
295
+ #
296
+ # @param actions [Array<Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction>] Actions returned by the rule evaluation
297
+ #
298
+ # @param auth_rule_token [String] The Auth Rule token
299
+ #
300
+ # @param evaluation_time [Time] Timestamp of the rule evaluation
301
+ #
302
+ # @param event_token [String] Token of the event that triggered the evaluation
303
+ #
304
+ # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode] The state of the Auth Rule
305
+ #
306
+ # @param rule_version [Integer] Version of the rule that was evaluated
307
+ #
308
+ # @param event_stream [Symbol, :TOKENIZATION] The event stream during which the rule was evaluated
309
+
310
+ module Action
311
+ extend Lithic::Internal::Type::Union
312
+
313
+ variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction }
314
+
315
+ variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction }
316
+
317
+ class DeclineAction < Lithic::Internal::Type::BaseModel
318
+ # @!attribute type
319
+ # Decline the tokenization request
320
+ #
321
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type]
322
+ required :type,
323
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type }
324
+
325
+ # @!attribute explanation
326
+ # Optional explanation for why this action was taken
327
+ #
328
+ # @return [String, nil]
329
+ optional :explanation, String
330
+
331
+ # @!attribute reason
332
+ # Reason code for declining the tokenization request
333
+ #
334
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason, nil]
335
+ optional :reason,
336
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason }
337
+
338
+ # @!method initialize(type:, explanation: nil, reason: nil)
339
+ # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type] Decline the tokenization request
340
+ #
341
+ # @param explanation [String] Optional explanation for why this action was taken
342
+ #
343
+ # @param reason [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason] Reason code for declining the tokenization request
344
+
345
+ # Decline the tokenization request
346
+ #
347
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction#type
348
+ module Type
349
+ extend Lithic::Internal::Type::Enum
350
+
351
+ DECLINE = :DECLINE
352
+
353
+ # @!method self.values
354
+ # @return [Array<Symbol>]
355
+ end
356
+
357
+ # Reason code for declining the tokenization request
358
+ #
359
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction#reason
360
+ module Reason
361
+ extend Lithic::Internal::Type::Enum
362
+
363
+ ACCOUNT_SCORE_1 = :ACCOUNT_SCORE_1
364
+ DEVICE_SCORE_1 = :DEVICE_SCORE_1
365
+ ALL_WALLET_DECLINE_REASONS_PRESENT = :ALL_WALLET_DECLINE_REASONS_PRESENT
366
+ WALLET_RECOMMENDED_DECISION_RED = :WALLET_RECOMMENDED_DECISION_RED
367
+ CVC_MISMATCH = :CVC_MISMATCH
368
+ CARD_EXPIRY_MONTH_MISMATCH = :CARD_EXPIRY_MONTH_MISMATCH
369
+ CARD_EXPIRY_YEAR_MISMATCH = :CARD_EXPIRY_YEAR_MISMATCH
370
+ CARD_INVALID_STATE = :CARD_INVALID_STATE
371
+ CUSTOMER_RED_PATH = :CUSTOMER_RED_PATH
372
+ INVALID_CUSTOMER_RESPONSE = :INVALID_CUSTOMER_RESPONSE
373
+ NETWORK_FAILURE = :NETWORK_FAILURE
374
+ GENERIC_DECLINE = :GENERIC_DECLINE
375
+ DIGITAL_CARD_ART_REQUIRED = :DIGITAL_CARD_ART_REQUIRED
376
+
377
+ # @!method self.values
378
+ # @return [Array<Symbol>]
379
+ end
380
+ end
381
+
382
+ class RequireTfaAction < Lithic::Internal::Type::BaseModel
383
+ # @!attribute type
384
+ # Require two-factor authentication for the tokenization request
385
+ #
386
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type]
387
+ required :type,
388
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type }
389
+
390
+ # @!attribute explanation
391
+ # Optional explanation for why this action was taken
392
+ #
393
+ # @return [String, nil]
394
+ optional :explanation, String
395
+
396
+ # @!attribute reason
397
+ # Reason code for requiring two-factor authentication
398
+ #
399
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason, nil]
400
+ optional :reason,
401
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason }
402
+
403
+ # @!method initialize(type:, explanation: nil, reason: nil)
404
+ # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type] Require two-factor authentication for the tokenization request
405
+ #
406
+ # @param explanation [String] Optional explanation for why this action was taken
407
+ #
408
+ # @param reason [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason] Reason code for requiring two-factor authentication
409
+
410
+ # Require two-factor authentication for the tokenization request
411
+ #
412
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction#type
413
+ module Type
414
+ extend Lithic::Internal::Type::Enum
415
+
416
+ REQUIRE_TFA = :REQUIRE_TFA
417
+
418
+ # @!method self.values
419
+ # @return [Array<Symbol>]
420
+ end
421
+
422
+ # Reason code for requiring two-factor authentication
423
+ #
424
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction#reason
425
+ module Reason
426
+ extend Lithic::Internal::Type::Enum
427
+
428
+ WALLET_RECOMMENDED_TFA = :WALLET_RECOMMENDED_TFA
429
+ SUSPICIOUS_ACTIVITY = :SUSPICIOUS_ACTIVITY
430
+ DEVICE_RECENTLY_LOST = :DEVICE_RECENTLY_LOST
431
+ TOO_MANY_RECENT_ATTEMPTS = :TOO_MANY_RECENT_ATTEMPTS
432
+ TOO_MANY_RECENT_TOKENS = :TOO_MANY_RECENT_TOKENS
433
+ TOO_MANY_DIFFERENT_CARDHOLDERS = :TOO_MANY_DIFFERENT_CARDHOLDERS
434
+ OUTSIDE_HOME_TERRITORY = :OUTSIDE_HOME_TERRITORY
435
+ HAS_SUSPENDED_TOKENS = :HAS_SUSPENDED_TOKENS
436
+ HIGH_RISK = :HIGH_RISK
437
+ ACCOUNT_SCORE_LOW = :ACCOUNT_SCORE_LOW
438
+ DEVICE_SCORE_LOW = :DEVICE_SCORE_LOW
439
+ CARD_STATE_TFA = :CARD_STATE_TFA
440
+ HARDCODED_TFA = :HARDCODED_TFA
441
+ CUSTOMER_RULE_TFA = :CUSTOMER_RULE_TFA
442
+ DEVICE_HOST_CARD_EMULATION = :DEVICE_HOST_CARD_EMULATION
443
+
444
+ # @!method self.values
445
+ # @return [Array<Symbol>]
446
+ end
447
+ end
448
+
449
+ # @!method self.variants
450
+ # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction)]
451
+ end
452
+
453
+ # The state of the Auth Rule
454
+ #
455
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult#mode
456
+ module Mode
457
+ extend Lithic::Internal::Type::Enum
458
+
459
+ ACTIVE = :ACTIVE
460
+ INACTIVE = :INACTIVE
461
+
462
+ # @!method self.values
463
+ # @return [Array<Symbol>]
464
+ end
465
+ end
466
+
467
+ class ACHResult < Lithic::Internal::Type::BaseModel
468
+ # @!attribute token
469
+ # Globally unique identifier for the evaluation
470
+ #
471
+ # @return [String]
472
+ required :token, String
473
+
474
+ # @!attribute actions
475
+ # Actions returned by the rule evaluation
476
+ #
477
+ # @return [Array<Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction>]
478
+ required :actions,
479
+ -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action] }
480
+
481
+ # @!attribute auth_rule_token
482
+ # The Auth Rule token
483
+ #
484
+ # @return [String]
485
+ required :auth_rule_token, String
486
+
487
+ # @!attribute evaluation_time
488
+ # Timestamp of the rule evaluation
489
+ #
490
+ # @return [Time]
491
+ required :evaluation_time, Time
492
+
493
+ # @!attribute event_stream
494
+ # The event stream during which the rule was evaluated
495
+ #
496
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream]
497
+ required :event_stream,
498
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream }
499
+
500
+ # @!attribute event_token
501
+ # Token of the event that triggered the evaluation
502
+ #
503
+ # @return [String]
504
+ required :event_token, String
505
+
506
+ # @!attribute mode
507
+ # The state of the Auth Rule
508
+ #
509
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode]
510
+ required :mode, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode }
511
+
512
+ # @!attribute rule_version
513
+ # Version of the rule that was evaluated
514
+ #
515
+ # @return [Integer]
516
+ required :rule_version, Integer
517
+
518
+ # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_stream:, event_token:, mode:, rule_version:)
519
+ # @param token [String] Globally unique identifier for the evaluation
520
+ #
521
+ # @param actions [Array<Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction>] Actions returned by the rule evaluation
522
+ #
523
+ # @param auth_rule_token [String] The Auth Rule token
524
+ #
525
+ # @param evaluation_time [Time] Timestamp of the rule evaluation
526
+ #
527
+ # @param event_stream [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream] The event stream during which the rule was evaluated
528
+ #
529
+ # @param event_token [String] Token of the event that triggered the evaluation
530
+ #
531
+ # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode] The state of the Auth Rule
532
+ #
533
+ # @param rule_version [Integer] Version of the rule that was evaluated
534
+
535
+ module Action
536
+ extend Lithic::Internal::Type::Union
537
+
538
+ variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction }
539
+
540
+ variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction }
541
+
542
+ class ApproveAction < Lithic::Internal::Type::BaseModel
543
+ # @!attribute type
544
+ # Approve the ACH transaction
545
+ #
546
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type]
547
+ required :type,
548
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type }
549
+
550
+ # @!attribute explanation
551
+ # Optional explanation for why this action was taken
552
+ #
553
+ # @return [String, nil]
554
+ optional :explanation, String
555
+
556
+ # @!method initialize(type:, explanation: nil)
557
+ # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type] Approve the ACH transaction
558
+ #
559
+ # @param explanation [String] Optional explanation for why this action was taken
560
+
561
+ # Approve the ACH transaction
562
+ #
563
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction#type
564
+ module Type
565
+ extend Lithic::Internal::Type::Enum
566
+
567
+ APPROVE = :APPROVE
568
+
569
+ # @!method self.values
570
+ # @return [Array<Symbol>]
571
+ end
572
+ end
573
+
574
+ class ReturnAction < Lithic::Internal::Type::BaseModel
575
+ # @!attribute code
576
+ # NACHA return code to use when returning the transaction. Note that the list of
577
+ # available return codes is subject to an allowlist configured at the program
578
+ # level
579
+ #
580
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code]
581
+ required :code,
582
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code }
583
+
584
+ # @!attribute type
585
+ # Return the ACH transaction
586
+ #
587
+ # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type]
588
+ required :type,
589
+ enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type }
590
+
591
+ # @!attribute explanation
592
+ # Optional explanation for why this action was taken
593
+ #
594
+ # @return [String, nil]
595
+ optional :explanation, String
596
+
597
+ # @!method initialize(code:, type:, explanation: nil)
598
+ # Some parameter documentations has been truncated, see
599
+ # {Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction}
600
+ # for more details.
601
+ #
602
+ # @param code [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code] NACHA return code to use when returning the transaction. Note that the list of a
603
+ #
604
+ # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type] Return the ACH transaction
605
+ #
606
+ # @param explanation [String] Optional explanation for why this action was taken
607
+
608
+ # NACHA return code to use when returning the transaction. Note that the list of
609
+ # available return codes is subject to an allowlist configured at the program
610
+ # level
611
+ #
612
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction#code
613
+ module Code
614
+ extend Lithic::Internal::Type::Enum
615
+
616
+ R01 = :R01
617
+ R02 = :R02
618
+ R03 = :R03
619
+ R04 = :R04
620
+ R05 = :R05
621
+ R06 = :R06
622
+ R07 = :R07
623
+ R08 = :R08
624
+ R09 = :R09
625
+ R10 = :R10
626
+ R11 = :R11
627
+ R12 = :R12
628
+ R13 = :R13
629
+ R14 = :R14
630
+ R15 = :R15
631
+ R16 = :R16
632
+ R17 = :R17
633
+ R18 = :R18
634
+ R19 = :R19
635
+ R20 = :R20
636
+ R21 = :R21
637
+ R22 = :R22
638
+ R23 = :R23
639
+ R24 = :R24
640
+ R25 = :R25
641
+ R26 = :R26
642
+ R27 = :R27
643
+ R28 = :R28
644
+ R29 = :R29
645
+ R30 = :R30
646
+ R31 = :R31
647
+ R32 = :R32
648
+ R33 = :R33
649
+ R34 = :R34
650
+ R35 = :R35
651
+ R36 = :R36
652
+ R37 = :R37
653
+ R38 = :R38
654
+ R39 = :R39
655
+ R40 = :R40
656
+ R41 = :R41
657
+ R42 = :R42
658
+ R43 = :R43
659
+ R44 = :R44
660
+ R45 = :R45
661
+ R46 = :R46
662
+ R47 = :R47
663
+ R50 = :R50
664
+ R51 = :R51
665
+ R52 = :R52
666
+ R53 = :R53
667
+ R61 = :R61
668
+ R62 = :R62
669
+ R67 = :R67
670
+ R68 = :R68
671
+ R69 = :R69
672
+ R70 = :R70
673
+ R71 = :R71
674
+ R72 = :R72
675
+ R73 = :R73
676
+ R74 = :R74
677
+ R75 = :R75
678
+ R76 = :R76
679
+ R77 = :R77
680
+ R80 = :R80
681
+ R81 = :R81
682
+ R82 = :R82
683
+ R83 = :R83
684
+ R84 = :R84
685
+ R85 = :R85
686
+
687
+ # @!method self.values
688
+ # @return [Array<Symbol>]
689
+ end
690
+
691
+ # Return the ACH transaction
692
+ #
693
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction#type
694
+ module Type
695
+ extend Lithic::Internal::Type::Enum
696
+
697
+ RETURN = :RETURN
698
+
699
+ # @!method self.values
700
+ # @return [Array<Symbol>]
701
+ end
702
+ end
703
+
704
+ # @!method self.variants
705
+ # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction)]
706
+ end
707
+
708
+ # The event stream during which the rule was evaluated
709
+ #
710
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult#event_stream
711
+ module EventStream
712
+ extend Lithic::Internal::Type::Enum
713
+
714
+ ACH_CREDIT_RECEIPT = :ACH_CREDIT_RECEIPT
715
+ ACH_DEBIT_RECEIPT = :ACH_DEBIT_RECEIPT
716
+
717
+ # @!method self.values
718
+ # @return [Array<Symbol>]
719
+ end
720
+
721
+ # The state of the Auth Rule
722
+ #
723
+ # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult#mode
724
+ module Mode
725
+ extend Lithic::Internal::Type::Enum
726
+
727
+ ACTIVE = :ACTIVE
728
+ INACTIVE = :INACTIVE
729
+
730
+ # @!method self.values
731
+ # @return [Array<Symbol>]
732
+ end
733
+ end
734
+
735
+ # @!method self.variants
736
+ # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult)]
737
+ end
738
+ end
739
+ end
740
+ end