lithic 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +15 -1
  5. data/lib/lithic/models/account.rb +2 -2
  6. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +5 -4
  7. data/lib/lithic/models/account_holder_update_response.rb +3 -3
  8. data/lib/lithic/models/account_update_params.rb +2 -2
  9. data/lib/lithic/models/auth_rules/auth_rule.rb +14 -8
  10. data/lib/lithic/models/auth_rules/auth_rule_version.rb +5 -3
  11. data/lib/lithic/models/auth_rules/card_transaction_update_action.rb +109 -0
  12. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +152 -1
  13. data/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb +244 -0
  14. data/lib/lithic/models/auth_rules/event_stream.rb +1 -0
  15. data/lib/lithic/models/auth_rules/rule_feature.rb +47 -1
  16. data/lib/lithic/models/auth_rules/spend_velocity_filters.rb +33 -0
  17. data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +2 -2
  18. data/lib/lithic/models/auth_rules/v2_create_params.rb +27 -15
  19. data/lib/lithic/models/auth_rules/v2_draft_params.rb +5 -3
  20. data/lib/lithic/models/card_authorization_challenge_response_webhook_event.rb +103 -0
  21. data/lib/lithic/models/card_create_params.rb +4 -2
  22. data/lib/lithic/models/card_renew_params.rb +4 -2
  23. data/lib/lithic/models/event.rb +5 -0
  24. data/lib/lithic/models/event_list_params.rb +3 -0
  25. data/lib/lithic/models/event_subscription.rb +3 -0
  26. data/lib/lithic/models/events/subscription_create_params.rb +3 -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 +3 -0
  29. data/lib/lithic/models/external_bank_account_set_verification_method_params.rb +55 -0
  30. data/lib/lithic/models/non_pci_card.rb +13 -13
  31. data/lib/lithic/models/parsed_webhook_event.rb +3 -1
  32. data/lib/lithic/models/reports/settlement/network_total_list_params.rb +1 -0
  33. data/lib/lithic/models/settlement_detail.rb +11 -4
  34. data/lib/lithic/models/settlement_summary_details.rb +1 -0
  35. data/lib/lithic/models.rb +6 -0
  36. data/lib/lithic/resources/accounts.rb +1 -1
  37. data/lib/lithic/resources/auth_rules/v2.rb +1 -1
  38. data/lib/lithic/resources/external_bank_accounts.rb +31 -0
  39. data/lib/lithic/resources/webhooks.rb +1 -1
  40. data/lib/lithic/version.rb +1 -1
  41. data/lib/lithic.rb +6 -1
  42. data/rbi/lithic/models/account.rbi +3 -6
  43. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +10 -14
  44. data/rbi/lithic/models/account_holder_update_response.rbi +3 -3
  45. data/rbi/lithic/models/account_update_params.rbi +5 -8
  46. data/rbi/lithic/models/auth_rules/auth_rule.rbi +10 -3
  47. data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +2 -0
  48. data/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi +242 -0
  49. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +354 -3
  50. data/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi +573 -0
  51. data/rbi/lithic/models/auth_rules/event_stream.rbi +5 -0
  52. data/rbi/lithic/models/auth_rules/rule_feature.rbi +104 -1
  53. data/rbi/lithic/models/auth_rules/spend_velocity_filters.rbi +58 -0
  54. data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +6 -3
  55. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +30 -9
  56. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +4 -0
  57. data/rbi/lithic/models/card_authorization_challenge_response_webhook_event.rbi +175 -0
  58. data/rbi/lithic/models/card_create_params.rbi +8 -4
  59. data/rbi/lithic/models/card_renew_params.rbi +8 -4
  60. data/rbi/lithic/models/event.rbi +11 -0
  61. data/rbi/lithic/models/event_list_params.rbi +7 -0
  62. data/rbi/lithic/models/event_subscription.rbi +7 -0
  63. data/rbi/lithic/models/events/subscription_create_params.rbi +7 -0
  64. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
  65. data/rbi/lithic/models/events/subscription_update_params.rbi +7 -0
  66. data/rbi/lithic/models/external_bank_account_set_verification_method_params.rbi +111 -0
  67. data/rbi/lithic/models/non_pci_card.rbi +21 -31
  68. data/rbi/lithic/models/parsed_webhook_event.rbi +1 -0
  69. data/rbi/lithic/models/reports/settlement/network_total_list_params.rbi +5 -0
  70. data/rbi/lithic/models/settlement_detail.rbi +17 -4
  71. data/rbi/lithic/models/settlement_summary_details.rbi +2 -0
  72. data/rbi/lithic/models.rbi +6 -0
  73. data/rbi/lithic/resources/accounts.rbi +2 -1
  74. data/rbi/lithic/resources/auth_rules/v2.rbi +1 -0
  75. data/rbi/lithic/resources/cards.rbi +8 -4
  76. data/rbi/lithic/resources/external_bank_accounts.rbi +22 -0
  77. data/rbi/lithic/resources/webhooks.rbi +1 -0
  78. data/sig/lithic/models/account.rbs +4 -8
  79. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +4 -8
  80. data/sig/lithic/models/account_update_params.rbs +4 -8
  81. data/sig/lithic/models/auth_rules/auth_rule.rbs +2 -0
  82. data/sig/lithic/models/auth_rules/auth_rule_version.rbs +1 -0
  83. data/sig/lithic/models/auth_rules/card_transaction_update_action.rbs +100 -0
  84. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +89 -3
  85. data/sig/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbs +155 -0
  86. data/sig/lithic/models/auth_rules/event_stream.rbs +2 -0
  87. data/sig/lithic/models/auth_rules/rule_feature.rbs +42 -0
  88. data/sig/lithic/models/auth_rules/spend_velocity_filters.rbs +35 -0
  89. data/sig/lithic/models/auth_rules/v2_create_params.rbs +3 -0
  90. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -0
  91. data/sig/lithic/models/card_authorization_challenge_response_webhook_event.rbs +76 -0
  92. data/sig/lithic/models/event.rbs +2 -0
  93. data/sig/lithic/models/event_list_params.rbs +2 -0
  94. data/sig/lithic/models/event_subscription.rbs +2 -0
  95. data/sig/lithic/models/events/subscription_create_params.rbs +2 -0
  96. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +2 -0
  97. data/sig/lithic/models/events/subscription_update_params.rbs +2 -0
  98. data/sig/lithic/models/external_bank_account_set_verification_method_params.rbs +51 -0
  99. data/sig/lithic/models/non_pci_card.rbs +20 -30
  100. data/sig/lithic/models/parsed_webhook_event.rbs +1 -0
  101. data/sig/lithic/models/reports/settlement/network_total_list_params.rbs +2 -1
  102. data/sig/lithic/models/settlement_detail.rbs +3 -1
  103. data/sig/lithic/models/settlement_summary_details.rbs +3 -1
  104. data/sig/lithic/models.rbs +4 -0
  105. data/sig/lithic/resources/accounts.rbs +1 -1
  106. data/sig/lithic/resources/external_bank_accounts.rbs +7 -0
  107. data/sig/lithic/resources/webhooks.rbs +1 -0
  108. metadata +17 -2
@@ -24,6 +24,10 @@ module Lithic
24
24
  # - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires
25
25
  # `scope`, `period`, and optionally `filters` to configure the velocity
26
26
  # calculation. Available for AUTHORIZATION event stream rules.
27
+ # - `TRANSACTION_HISTORY_SIGNALS`: Behavioral feature state derived from the
28
+ # entity's transaction history. Requires `scope` to specify whether to load
29
+ # card, account, or business account history. Available for AUTHORIZATION event
30
+ # stream rules.
27
31
  module RuleFeature
28
32
  extend Lithic::Internal::Type::Union
29
33
 
@@ -37,7 +41,8 @@ module Lithic
37
41
  Lithic::AuthRules::RuleFeature::CardFeature,
38
42
  Lithic::AuthRules::RuleFeature::AccountHolderFeature,
39
43
  Lithic::AuthRules::RuleFeature::IPMetadataFeature,
40
- Lithic::AuthRules::RuleFeature::SpendVelocityFeature
44
+ Lithic::AuthRules::RuleFeature::SpendVelocityFeature,
45
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature
41
46
  )
42
47
  end
43
48
 
@@ -403,6 +408,104 @@ module Lithic
403
408
  end
404
409
  end
405
410
 
411
+ class TransactionHistorySignalsFeature < Lithic::Internal::Type::BaseModel
412
+ OrHash =
413
+ T.type_alias do
414
+ T.any(
415
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature,
416
+ Lithic::Internal::AnyHash
417
+ )
418
+ end
419
+
420
+ # The entity scope to load transaction history signals for.
421
+ sig do
422
+ returns(
423
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope::OrSymbol
424
+ )
425
+ end
426
+ attr_accessor :scope
427
+
428
+ sig { returns(Symbol) }
429
+ attr_accessor :type
430
+
431
+ # The variable name for this feature in the rule function signature
432
+ sig { returns(T.nilable(String)) }
433
+ attr_reader :name
434
+
435
+ sig { params(name: String).void }
436
+ attr_writer :name
437
+
438
+ sig do
439
+ params(
440
+ scope:
441
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope::OrSymbol,
442
+ name: String,
443
+ type: Symbol
444
+ ).returns(T.attached_class)
445
+ end
446
+ def self.new(
447
+ # The entity scope to load transaction history signals for.
448
+ scope:,
449
+ # The variable name for this feature in the rule function signature
450
+ name: nil,
451
+ type: :TRANSACTION_HISTORY_SIGNALS
452
+ )
453
+ end
454
+
455
+ sig do
456
+ override.returns(
457
+ {
458
+ scope:
459
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope::OrSymbol,
460
+ type: Symbol,
461
+ name: String
462
+ }
463
+ )
464
+ end
465
+ def to_hash
466
+ end
467
+
468
+ # The entity scope to load transaction history signals for.
469
+ module Scope
470
+ extend Lithic::Internal::Type::Enum
471
+
472
+ TaggedSymbol =
473
+ T.type_alias do
474
+ T.all(
475
+ Symbol,
476
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope
477
+ )
478
+ end
479
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
480
+
481
+ CARD =
482
+ T.let(
483
+ :CARD,
484
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope::TaggedSymbol
485
+ )
486
+ ACCOUNT =
487
+ T.let(
488
+ :ACCOUNT,
489
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope::TaggedSymbol
490
+ )
491
+ BUSINESS_ACCOUNT =
492
+ T.let(
493
+ :BUSINESS_ACCOUNT,
494
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope::TaggedSymbol
495
+ )
496
+
497
+ sig do
498
+ override.returns(
499
+ T::Array[
500
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope::TaggedSymbol
501
+ ]
502
+ )
503
+ end
504
+ def self.values
505
+ end
506
+ end
507
+ end
508
+
406
509
  sig do
407
510
  override.returns(T::Array[Lithic::AuthRules::RuleFeature::Variants])
408
511
  end
@@ -0,0 +1,58 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ module AuthRules
6
+ class SpendVelocityFilters < Lithic::Models::AuthRules::VelocityLimitFilters
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Lithic::AuthRules::SpendVelocityFilters,
11
+ Lithic::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Tag key-value pairs to exclude from the velocity calculation. Transactions
16
+ # matching all specified tag key-value pairs will be excluded from the calculated
17
+ # velocity.
18
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
19
+ attr_accessor :exclude_tags
20
+
21
+ # Tag key-value pairs to include in the velocity calculation. Only transactions
22
+ # matching all specified tag key-value pairs will be included in the calculated
23
+ # velocity.
24
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
25
+ attr_accessor :include_tags
26
+
27
+ sig do
28
+ params(
29
+ exclude_tags: T.nilable(T::Hash[Symbol, String]),
30
+ include_tags: T.nilable(T::Hash[Symbol, String])
31
+ ).returns(T.attached_class)
32
+ end
33
+ def self.new(
34
+ # Tag key-value pairs to exclude from the velocity calculation. Transactions
35
+ # matching all specified tag key-value pairs will be excluded from the calculated
36
+ # velocity.
37
+ exclude_tags: nil,
38
+ # Tag key-value pairs to include in the velocity calculation. Only transactions
39
+ # matching all specified tag key-value pairs will be included in the calculated
40
+ # velocity.
41
+ include_tags: nil
42
+ )
43
+ end
44
+
45
+ sig do
46
+ override.returns(
47
+ {
48
+ exclude_tags: T.nilable(T::Hash[Symbol, String]),
49
+ include_tags: T.nilable(T::Hash[Symbol, String])
50
+ }
51
+ )
52
+ end
53
+ def to_hash
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -30,7 +30,8 @@ module Lithic
30
30
  Lithic::AuthRules::RuleFeature::CardFeature,
31
31
  Lithic::AuthRules::RuleFeature::AccountHolderFeature,
32
32
  Lithic::AuthRules::RuleFeature::IPMetadataFeature,
33
- Lithic::AuthRules::RuleFeature::SpendVelocityFeature
33
+ Lithic::AuthRules::RuleFeature::SpendVelocityFeature,
34
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature
34
35
  )
35
36
  ]
36
37
  )
@@ -51,7 +52,8 @@ module Lithic
51
52
  Lithic::AuthRules::RuleFeature::CardFeature::OrHash,
52
53
  Lithic::AuthRules::RuleFeature::AccountHolderFeature::OrHash,
53
54
  Lithic::AuthRules::RuleFeature::IPMetadataFeature::OrHash,
54
- Lithic::AuthRules::RuleFeature::SpendVelocityFeature::OrHash
55
+ Lithic::AuthRules::RuleFeature::SpendVelocityFeature::OrHash,
56
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::OrHash
55
57
  )
56
58
  ]
57
59
  ).returns(T.attached_class)
@@ -80,7 +82,8 @@ module Lithic
80
82
  Lithic::AuthRules::RuleFeature::CardFeature,
81
83
  Lithic::AuthRules::RuleFeature::AccountHolderFeature,
82
84
  Lithic::AuthRules::RuleFeature::IPMetadataFeature,
83
- Lithic::AuthRules::RuleFeature::SpendVelocityFeature
85
+ Lithic::AuthRules::RuleFeature::SpendVelocityFeature,
86
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature
84
87
  )
85
88
  ]
86
89
  }
@@ -85,6 +85,7 @@ module Lithic
85
85
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
86
86
  Lithic::AuthRules::ConditionalACHActionParameters,
87
87
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
88
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
88
89
  Lithic::AuthRules::TypescriptCodeParameters
89
90
  )
90
91
  )
@@ -101,7 +102,8 @@ module Lithic
101
102
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
102
103
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
103
104
  # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
104
- # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
105
+ # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
106
+ # stream.
105
107
  # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
106
108
  # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
107
109
  sig do
@@ -151,6 +153,7 @@ module Lithic
151
153
  Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash,
152
154
  Lithic::AuthRules::ConditionalACHActionParameters::OrHash,
153
155
  Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash,
156
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash,
154
157
  Lithic::AuthRules::TypescriptCodeParameters::OrHash
155
158
  ),
156
159
  type:
@@ -174,7 +177,8 @@ module Lithic
174
177
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
175
178
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
176
179
  # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
177
- # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
180
+ # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
181
+ # stream.
178
182
  # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
179
183
  # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
180
184
  type:,
@@ -201,6 +205,7 @@ module Lithic
201
205
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
202
206
  Lithic::AuthRules::ConditionalACHActionParameters,
203
207
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
208
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
204
209
  Lithic::AuthRules::TypescriptCodeParameters
205
210
  ),
206
211
  type:
@@ -229,6 +234,7 @@ module Lithic
229
234
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
230
235
  Lithic::AuthRules::ConditionalACHActionParameters,
231
236
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
237
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
232
238
  Lithic::AuthRules::TypescriptCodeParameters
233
239
  )
234
240
  end
@@ -254,7 +260,8 @@ module Lithic
254
260
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
255
261
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
256
262
  # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
257
- # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
263
+ # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
264
+ # stream.
258
265
  # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
259
266
  # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
260
267
  module Type
@@ -331,6 +338,7 @@ module Lithic
331
338
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
332
339
  Lithic::AuthRules::ConditionalACHActionParameters,
333
340
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
341
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
334
342
  Lithic::AuthRules::TypescriptCodeParameters
335
343
  )
336
344
  )
@@ -347,7 +355,8 @@ module Lithic
347
355
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
348
356
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
349
357
  # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
350
- # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
358
+ # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
359
+ # stream.
351
360
  # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
352
361
  # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
353
362
  sig do
@@ -384,6 +393,7 @@ module Lithic
384
393
  Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash,
385
394
  Lithic::AuthRules::ConditionalACHActionParameters::OrHash,
386
395
  Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash,
396
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash,
387
397
  Lithic::AuthRules::TypescriptCodeParameters::OrHash
388
398
  ),
389
399
  type:
@@ -407,7 +417,8 @@ module Lithic
407
417
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
408
418
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
409
419
  # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
410
- # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
420
+ # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
421
+ # stream.
411
422
  # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
412
423
  # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
413
424
  type:,
@@ -431,6 +442,7 @@ module Lithic
431
442
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
432
443
  Lithic::AuthRules::ConditionalACHActionParameters,
433
444
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
445
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
434
446
  Lithic::AuthRules::TypescriptCodeParameters
435
447
  ),
436
448
  type:
@@ -457,6 +469,7 @@ module Lithic
457
469
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
458
470
  Lithic::AuthRules::ConditionalACHActionParameters,
459
471
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
472
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
460
473
  Lithic::AuthRules::TypescriptCodeParameters
461
474
  )
462
475
  end
@@ -482,7 +495,8 @@ module Lithic
482
495
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
483
496
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
484
497
  # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
485
- # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
498
+ # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
499
+ # stream.
486
500
  # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
487
501
  # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
488
502
  module Type
@@ -555,6 +569,7 @@ module Lithic
555
569
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
556
570
  Lithic::AuthRules::ConditionalACHActionParameters,
557
571
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
572
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
558
573
  Lithic::AuthRules::TypescriptCodeParameters
559
574
  )
560
575
  )
@@ -575,7 +590,8 @@ module Lithic
575
590
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
576
591
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
577
592
  # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
578
- # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
593
+ # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
594
+ # stream.
579
595
  # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
580
596
  # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
581
597
  sig do
@@ -634,6 +650,7 @@ module Lithic
634
650
  Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash,
635
651
  Lithic::AuthRules::ConditionalACHActionParameters::OrHash,
636
652
  Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash,
653
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash,
637
654
  Lithic::AuthRules::TypescriptCodeParameters::OrHash
638
655
  ),
639
656
  program_level: T::Boolean,
@@ -661,7 +678,8 @@ module Lithic
661
678
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
662
679
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
663
680
  # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
664
- # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
681
+ # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
682
+ # stream.
665
683
  # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
666
684
  # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
667
685
  type:,
@@ -690,6 +708,7 @@ module Lithic
690
708
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
691
709
  Lithic::AuthRules::ConditionalACHActionParameters,
692
710
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
711
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
693
712
  Lithic::AuthRules::TypescriptCodeParameters
694
713
  ),
695
714
  program_level: T::Boolean,
@@ -720,6 +739,7 @@ module Lithic
720
739
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
721
740
  Lithic::AuthRules::ConditionalACHActionParameters,
722
741
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
742
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
723
743
  Lithic::AuthRules::TypescriptCodeParameters
724
744
  )
725
745
  end
@@ -745,7 +765,8 @@ module Lithic
745
765
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
746
766
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
747
767
  # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
748
- # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
768
+ # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
769
+ # stream.
749
770
  # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
750
771
  # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
751
772
  module Type
@@ -27,6 +27,7 @@ module Lithic
27
27
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
28
28
  Lithic::AuthRules::ConditionalACHActionParameters,
29
29
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
30
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
30
31
  Lithic::AuthRules::TypescriptCodeParameters
31
32
  )
32
33
  )
@@ -47,6 +48,7 @@ module Lithic
47
48
  Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash,
48
49
  Lithic::AuthRules::ConditionalACHActionParameters::OrHash,
49
50
  Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash,
51
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash,
50
52
  Lithic::AuthRules::TypescriptCodeParameters::OrHash
51
53
  )
52
54
  ),
@@ -75,6 +77,7 @@ module Lithic
75
77
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
76
78
  Lithic::AuthRules::ConditionalACHActionParameters,
77
79
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
80
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
78
81
  Lithic::AuthRules::TypescriptCodeParameters
79
82
  )
80
83
  ),
@@ -99,6 +102,7 @@ module Lithic
99
102
  Lithic::AuthRules::ConditionalAuthorizationActionParameters,
100
103
  Lithic::AuthRules::ConditionalACHActionParameters,
101
104
  Lithic::AuthRules::ConditionalTokenizationActionParameters,
105
+ Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters,
102
106
  Lithic::AuthRules::TypescriptCodeParameters
103
107
  )
104
108
  end
@@ -0,0 +1,175 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ class CardAuthorizationChallengeResponseWebhookEvent < Lithic::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent,
10
+ Lithic::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The token of the card associated with the challenge
15
+ sig { returns(T.nilable(String)) }
16
+ attr_accessor :card_token
17
+
18
+ # The method used to deliver the challenge to the cardholder
19
+ sig do
20
+ returns(
21
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod::TaggedSymbol
22
+ )
23
+ end
24
+ attr_accessor :challenge_method
25
+
26
+ # The timestamp of when the challenge was completed
27
+ sig { returns(T.nilable(Time)) }
28
+ attr_accessor :completed
29
+
30
+ # The timestamp of when the challenge was created
31
+ sig { returns(Time) }
32
+ attr_accessor :created
33
+
34
+ # Globally unique identifier for the event
35
+ sig { returns(String) }
36
+ attr_accessor :event_token
37
+
38
+ # Event type
39
+ sig { returns(Symbol) }
40
+ attr_accessor :event_type
41
+
42
+ # The cardholder's response to the challenge
43
+ sig do
44
+ returns(
45
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::Response::TaggedSymbol
46
+ )
47
+ end
48
+ attr_accessor :response
49
+
50
+ # The token of the transaction associated with the authorization event being
51
+ # challenged
52
+ sig { returns(T.nilable(String)) }
53
+ attr_accessor :transaction_token
54
+
55
+ sig do
56
+ params(
57
+ card_token: T.nilable(String),
58
+ challenge_method:
59
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod::OrSymbol,
60
+ completed: T.nilable(Time),
61
+ created: Time,
62
+ event_token: String,
63
+ response:
64
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::Response::OrSymbol,
65
+ transaction_token: T.nilable(String),
66
+ event_type: Symbol
67
+ ).returns(T.attached_class)
68
+ end
69
+ def self.new(
70
+ # The token of the card associated with the challenge
71
+ card_token:,
72
+ # The method used to deliver the challenge to the cardholder
73
+ challenge_method:,
74
+ # The timestamp of when the challenge was completed
75
+ completed:,
76
+ # The timestamp of when the challenge was created
77
+ created:,
78
+ # Globally unique identifier for the event
79
+ event_token:,
80
+ # The cardholder's response to the challenge
81
+ response:,
82
+ # The token of the transaction associated with the authorization event being
83
+ # challenged
84
+ transaction_token:,
85
+ # Event type
86
+ event_type: :"card_authorization.challenge_response"
87
+ )
88
+ end
89
+
90
+ sig do
91
+ override.returns(
92
+ {
93
+ card_token: T.nilable(String),
94
+ challenge_method:
95
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod::TaggedSymbol,
96
+ completed: T.nilable(Time),
97
+ created: Time,
98
+ event_token: String,
99
+ event_type: Symbol,
100
+ response:
101
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::Response::TaggedSymbol,
102
+ transaction_token: T.nilable(String)
103
+ }
104
+ )
105
+ end
106
+ def to_hash
107
+ end
108
+
109
+ # The method used to deliver the challenge to the cardholder
110
+ module ChallengeMethod
111
+ extend Lithic::Internal::Type::Enum
112
+
113
+ TaggedSymbol =
114
+ T.type_alias do
115
+ T.all(
116
+ Symbol,
117
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod
118
+ )
119
+ end
120
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
121
+
122
+ SMS =
123
+ T.let(
124
+ :SMS,
125
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod::TaggedSymbol
126
+ )
127
+
128
+ sig do
129
+ override.returns(
130
+ T::Array[
131
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod::TaggedSymbol
132
+ ]
133
+ )
134
+ end
135
+ def self.values
136
+ end
137
+ end
138
+
139
+ # The cardholder's response to the challenge
140
+ module Response
141
+ extend Lithic::Internal::Type::Enum
142
+
143
+ TaggedSymbol =
144
+ T.type_alias do
145
+ T.all(
146
+ Symbol,
147
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::Response
148
+ )
149
+ end
150
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
151
+
152
+ APPROVE =
153
+ T.let(
154
+ :APPROVE,
155
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::Response::TaggedSymbol
156
+ )
157
+ DECLINE =
158
+ T.let(
159
+ :DECLINE,
160
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::Response::TaggedSymbol
161
+ )
162
+
163
+ sig do
164
+ override.returns(
165
+ T::Array[
166
+ Lithic::CardAuthorizationChallengeResponseWebhookEvent::Response::TaggedSymbol
167
+ ]
168
+ )
169
+ end
170
+ def self.values
171
+ end
172
+ end
173
+ end
174
+ end
175
+ end
@@ -78,7 +78,8 @@ module Lithic
78
78
  attr_writer :digital_card_art_token
79
79
 
80
80
  # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
81
- # an expiration date will be generated.
81
+ # an expiration date five years in the future will be generated. Five years is the
82
+ # maximum expiration date.
82
83
  sig { returns(T.nilable(String)) }
83
84
  attr_reader :exp_month
84
85
 
@@ -86,7 +87,8 @@ module Lithic
86
87
  attr_writer :exp_month
87
88
 
88
89
  # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
89
- # provided, an expiration date will be generated.
90
+ # provided, an expiration date five years in the future will be generated. Five
91
+ # years is the maximum expiration date.
90
92
  sig { returns(T.nilable(String)) }
91
93
  attr_reader :exp_year
92
94
 
@@ -339,10 +341,12 @@ module Lithic
339
341
  # [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).
340
342
  digital_card_art_token: nil,
341
343
  # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
342
- # an expiration date will be generated.
344
+ # an expiration date five years in the future will be generated. Five years is the
345
+ # maximum expiration date.
343
346
  exp_month: nil,
344
347
  # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
345
- # provided, an expiration date will be generated.
348
+ # provided, an expiration date five years in the future will be generated. Five
349
+ # years is the maximum expiration date.
346
350
  exp_year: nil,
347
351
  # Friendly name to identify the card.
348
352
  memo: nil,
@@ -29,7 +29,8 @@ module Lithic
29
29
  attr_writer :carrier
30
30
 
31
31
  # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
32
- # an expiration date six years in the future will be generated.
32
+ # an expiration date five years in the future will be generated. Five years is the
33
+ # maximum expiration date.
33
34
  sig { returns(T.nilable(String)) }
34
35
  attr_reader :exp_month
35
36
 
@@ -37,7 +38,8 @@ module Lithic
37
38
  attr_writer :exp_month
38
39
 
39
40
  # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
40
- # provided, an expiration date six years in the future will be generated.
41
+ # provided, an expiration date five years in the future will be generated. Five
42
+ # years is the maximum expiration date.
41
43
  sig { returns(T.nilable(String)) }
42
44
  attr_reader :exp_year
43
45
 
@@ -100,10 +102,12 @@ module Lithic
100
102
  # If omitted, the previous carrier will be used.
101
103
  carrier: nil,
102
104
  # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
103
- # an expiration date six years in the future will be generated.
105
+ # an expiration date five years in the future will be generated. Five years is the
106
+ # maximum expiration date.
104
107
  exp_month: nil,
105
108
  # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
106
- # provided, an expiration date six years in the future will be generated.
109
+ # provided, an expiration date five years in the future will be generated. Five
110
+ # years is the maximum expiration date.
107
111
  exp_year: nil,
108
112
  # Specifies the configuration (e.g. physical card art) that the card should be
109
113
  # manufactured with, and only applies to cards of type `PHYSICAL`. This must be