lithic 0.17.0 → 0.18.1

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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/internal/type/union.rb +7 -21
  5. data/lib/lithic/models/auth_rules/rule_feature.rb +291 -2
  6. data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +2 -2
  7. data/lib/lithic/models/card_authorization.rb +7 -6
  8. data/lib/lithic/models/claim_created_webhook_event.rb +190 -0
  9. data/lib/lithic/models/claim_document_accepted_webhook_event.rb +175 -0
  10. data/lib/lithic/models/claim_document_rejected_webhook_event.rb +175 -0
  11. data/lib/lithic/models/claim_document_uploaded_webhook_event.rb +175 -0
  12. data/lib/lithic/models/claim_updated_webhook_event.rb +190 -0
  13. data/lib/lithic/models/event.rb +23 -0
  14. data/lib/lithic/models/event_list_params.rb +14 -0
  15. data/lib/lithic/models/event_subscription.rb +14 -0
  16. data/lib/lithic/models/events/subscription_create_params.rb +14 -0
  17. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +5 -0
  18. data/lib/lithic/models/events/subscription_update_params.rb +14 -0
  19. data/lib/lithic/models/parsed_webhook_event.rb +11 -1
  20. data/lib/lithic/models/transaction_monitoring/case_transaction.rb +120 -43
  21. data/lib/lithic/models.rb +10 -0
  22. data/lib/lithic/resources/transaction_monitoring/cases.rb +1 -1
  23. data/lib/lithic/resources/webhooks.rb +1 -1
  24. data/lib/lithic/version.rb +1 -1
  25. data/lib/lithic.rb +5 -0
  26. data/rbi/lithic/models/auth_rules/rule_feature.rbi +686 -2
  27. data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +15 -3
  28. data/rbi/lithic/models/card_authorization.rbi +12 -10
  29. data/rbi/lithic/models/claim_created_webhook_event.rbi +386 -0
  30. data/rbi/lithic/models/claim_document_accepted_webhook_event.rbi +315 -0
  31. data/rbi/lithic/models/claim_document_rejected_webhook_event.rbi +315 -0
  32. data/rbi/lithic/models/claim_document_uploaded_webhook_event.rbi +315 -0
  33. data/rbi/lithic/models/claim_updated_webhook_event.rbi +386 -0
  34. data/rbi/lithic/models/event.rbi +46 -0
  35. data/rbi/lithic/models/event_list_params.rbi +34 -0
  36. data/rbi/lithic/models/event_subscription.rbi +34 -0
  37. data/rbi/lithic/models/events/subscription_create_params.rbi +34 -0
  38. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +25 -0
  39. data/rbi/lithic/models/events/subscription_update_params.rbi +34 -0
  40. data/rbi/lithic/models/parsed_webhook_event.rbi +5 -0
  41. data/rbi/lithic/models/transaction_monitoring/case_transaction.rbi +151 -46
  42. data/rbi/lithic/models.rbi +13 -0
  43. data/rbi/lithic/resources/transaction_monitoring/cases.rbi +1 -1
  44. data/rbi/lithic/resources/webhooks.rbi +5 -0
  45. data/sig/lithic/models/auth_rules/rule_feature.rbs +252 -0
  46. data/sig/lithic/models/claim_created_webhook_event.rbs +169 -0
  47. data/sig/lithic/models/claim_document_accepted_webhook_event.rbs +131 -0
  48. data/sig/lithic/models/claim_document_rejected_webhook_event.rbs +131 -0
  49. data/sig/lithic/models/claim_document_uploaded_webhook_event.rbs +131 -0
  50. data/sig/lithic/models/claim_updated_webhook_event.rbs +169 -0
  51. data/sig/lithic/models/event.rbs +10 -0
  52. data/sig/lithic/models/event_list_params.rbs +10 -0
  53. data/sig/lithic/models/event_subscription.rbs +10 -0
  54. data/sig/lithic/models/events/subscription_create_params.rbs +10 -0
  55. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +10 -0
  56. data/sig/lithic/models/events/subscription_update_params.rbs +10 -0
  57. data/sig/lithic/models/parsed_webhook_event.rbs +5 -0
  58. data/sig/lithic/models/transaction_monitoring/case_transaction.rbs +93 -34
  59. data/sig/lithic/models.rbs +10 -0
  60. data/sig/lithic/resources/transaction_monitoring/cases.rbs +1 -1
  61. data/sig/lithic/resources/webhooks.rbs +5 -0
  62. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6422fc49a66116c5ba0ad2a2cf0a1ac7dccaa6c8c4790d37a3867bbaed2753d0
4
- data.tar.gz: 2e22b02922477bc98f07bd78b891b699974f715cd8b7e351ac6dbf8a26129f48
3
+ metadata.gz: 39c91f51cf5bdeac0ea066eb62ca454e3617be091bf90fbd2dc1a7880341dced
4
+ data.tar.gz: 70b13d4f29b3fe30a7ab75fc1d6a377cc15e557207918dacfe648eb186ec43dc
5
5
  SHA512:
6
- metadata.gz: 107f3c8df2824b8f4ffdc719cdf455abee3ebc7ecde125e0a1c8a1b4c83c527da7625c7fdfaa0528b9fb274c6371659fd64cb746ac71cf963e17a487d38e729f
7
- data.tar.gz: 9607fc762f7962dd12e4e43d592251ac01a6092146695f38ecf96d737ddf0ce1a9acab75ab9bb3535995be202231667335687e3d11aeea4fc8c9ba024c855779
6
+ metadata.gz: 5ff8da6ba6b878a6096cf5ccfd4c030fcc6caa496718179c7cf9cfcef478b1d36286439743780ec77259eab01773661f5aefdf48a79530893944ded3477a92fc
7
+ data.tar.gz: 13bc491847868ff70266b047604a387579271a3aae3a65e223b085d641ba1c59a0e261be1b4446f061440ecb9ecad46af7e76225913656bf8eb7ebfec5a9bab3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.1 (2026-06-29)
4
+
5
+ Full Changelog: [v0.18.0...v0.18.1](https://github.com/lithic-com/lithic-ruby/compare/v0.18.0...v0.18.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **types:** convert CaseTransaction to union with Card/Payment variants ([0d84634](https://github.com/lithic-com/lithic-ruby/commit/0d84634d5cf4e42f4270832089df3cdbd50deed2))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** bound formatter parallelism to CPU count ([acf4dc5](https://github.com/lithic-com/lithic-ruby/commit/acf4dc52c4d33ea1bce9b0544123caf6c2d764d2))
15
+
16
+
17
+ ### Documentation
18
+
19
+ * **types:** update cash_amount field description in CardAuthorization ([1385cde](https://github.com/lithic-com/lithic-ruby/commit/1385cde62aca3c83a7525150b535decc016c8ed4))
20
+
21
+ ## 0.18.0 (2026-06-23)
22
+
23
+ Full Changelog: [v0.17.0...v0.18.0](https://github.com/lithic-com/lithic-ruby/compare/v0.17.0...v0.18.0)
24
+
25
+ ### Features
26
+
27
+ * **api:** Register dispute intake webhook events ([a087b3b](https://github.com/lithic-com/lithic-ruby/commit/a087b3bddff381d51dc2c6fa89cadae9855ac6a9))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **api:** Sync templated rule features with authorizer external feature set ([2812623](https://github.com/lithic-com/lithic-ruby/commit/2812623bab59b68a8a1de32b149153567fa5d3ea))
33
+
3
34
  ## 0.17.0 (2026-06-22)
4
35
 
5
36
  Full Changelog: [v0.16.0...v0.17.0](https://github.com/lithic-com/lithic-ruby/compare/v0.16.0...v0.17.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "lithic", "~> 0.17.0"
27
+ gem "lithic", "~> 0.18.1"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -6,28 +6,14 @@ module Lithic
6
6
  # @api private
7
7
  #
8
8
  # @example
9
- # # `account_activity_list_response` is a `Lithic::Models::AccountActivityListResponse`
10
- # case account_activity_list_response
11
- # when Lithic::Models::AccountActivityListResponse::Internal
12
- # puts(account_activity_list_response.token)
13
- # when Lithic::BookTransferResponse
14
- # puts(account_activity_list_response.category)
15
- # when Lithic::Models::AccountActivityListResponse::Card
16
- # # ...
9
+ # # `case_transaction` is a `Lithic::TransactionMonitoring::CaseTransaction`
10
+ # case case_transaction
11
+ # when Lithic::TransactionMonitoring::CaseTransaction::CardCaseTransaction
12
+ # puts(case_transaction.token)
13
+ # when Lithic::TransactionMonitoring::CaseTransaction::PaymentCaseTransaction
14
+ # puts(case_transaction.added_at)
17
15
  # else
18
- # puts(account_activity_list_response)
19
- # end
20
- #
21
- # @example
22
- # case account_activity_list_response
23
- # in {family: :INTERNAL, token: token, category: category, created: created}
24
- # puts(token)
25
- # in {family: :TRANSFER, token: token, category: category, created: created}
26
- # puts(category)
27
- # in {family: :PAYMENT, token: token, category: category, created: created}
28
- # puts(created)
29
- # else
30
- # puts(account_activity_list_response)
16
+ # puts(case_transaction)
31
17
  # end
32
18
  module Union
33
19
  include Lithic::Internal::Type::Converter
@@ -19,6 +19,8 @@ module Lithic
19
19
  # CARD_TRANSACTION_UPDATE event stream rules.
20
20
  # - `ACH_PAYMENT`: The ACH payment being evaluated. Only available for
21
21
  # ACH_PAYMENT_UPDATE event stream rules.
22
+ # - `EXTERNAL_BANK_ACCOUNT`: The external bank account tied to the ACH payment
23
+ # being evaluated. Only available for ACH_PAYMENT_UPDATE event stream rules.
22
24
  # - `CARD`: The card associated with the event. Available for AUTHORIZATION,
23
25
  # THREE_DS_AUTHENTICATION, and CARD_TRANSACTION_UPDATE event stream rules.
24
26
  # - `ACCOUNT_HOLDER`: The account holder associated with the event. Available for
@@ -28,7 +30,17 @@ module Lithic
28
30
  # THREE_DS_AUTHENTICATION event stream rules.
29
31
  # - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires
30
32
  # `scope`, `period`, and optionally `filters` to configure the velocity
31
- # calculation. Available for AUTHORIZATION event stream rules.
33
+ # calculation. Available for AUTHORIZATION and CARD_TRANSACTION_UPDATE event
34
+ # stream rules.
35
+ # - `PAYMENT_VELOCITY`: ACH payment velocity data, aggregated over the given
36
+ # scope. Requires `scope`, `period`, and optionally `filters` to configure the
37
+ # velocity calculation. Available for ACH_PAYMENT_UPDATE event stream rules.
38
+ # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions since
39
+ # the last approval for the card or account. Requires `scope`. Available for
40
+ # AUTHORIZATION and CARD_TRANSACTION_UPDATE event stream rules.
41
+ # - `ACH_PAYMENT_HISTORY`: Windowed settled-amount statistics derived from the
42
+ # financial account's ACH payment history. Requires `scope`. Available for
43
+ # ACH_PAYMENT_UPDATE event stream rules.
32
44
  # - `TRANSACTION_HISTORY_SIGNALS`: Behavioral feature state derived from the
33
45
  # entity's transaction history. Requires `scope` to specify whether to load
34
46
  # card, account, or business account history. Available for AUTHORIZATION and
@@ -48,6 +60,8 @@ module Lithic
48
60
 
49
61
  variant -> { Lithic::AuthRules::RuleFeature::ACHPaymentFeature }
50
62
 
63
+ variant -> { Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature }
64
+
51
65
  variant -> { Lithic::AuthRules::RuleFeature::CardFeature }
52
66
 
53
67
  variant -> { Lithic::AuthRules::RuleFeature::AccountHolderFeature }
@@ -56,8 +70,14 @@ module Lithic
56
70
 
57
71
  variant -> { Lithic::AuthRules::RuleFeature::SpendVelocityFeature }
58
72
 
73
+ variant -> { Lithic::AuthRules::RuleFeature::PaymentVelocityFeature }
74
+
59
75
  variant -> { Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature }
60
76
 
77
+ variant -> { Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature }
78
+
79
+ variant -> { Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature }
80
+
61
81
  class AuthorizationFeature < Lithic::Internal::Type::BaseModel
62
82
  # @!attribute type
63
83
  #
@@ -166,6 +186,24 @@ module Lithic
166
186
  # @param type [Symbol, :ACH_PAYMENT]
167
187
  end
168
188
 
189
+ class ExternalBankAccountFeature < Lithic::Internal::Type::BaseModel
190
+ # @!attribute type
191
+ #
192
+ # @return [Symbol, :EXTERNAL_BANK_ACCOUNT]
193
+ required :type, const: :EXTERNAL_BANK_ACCOUNT
194
+
195
+ # @!attribute name
196
+ # The variable name for this feature in the rule function signature
197
+ #
198
+ # @return [String, nil]
199
+ optional :name, String
200
+
201
+ # @!method initialize(name: nil, type: :EXTERNAL_BANK_ACCOUNT)
202
+ # @param name [String] The variable name for this feature in the rule function signature
203
+ #
204
+ # @param type [Symbol, :EXTERNAL_BANK_ACCOUNT]
205
+ end
206
+
169
207
  class CardFeature < Lithic::Internal::Type::BaseModel
170
208
  # @!attribute type
171
209
  #
@@ -274,6 +312,180 @@ module Lithic
274
312
  end
275
313
  end
276
314
 
315
+ class PaymentVelocityFeature < Lithic::Internal::Type::BaseModel
316
+ # @!attribute period
317
+ # Velocity over the current day since 00:00 / 12 AM in Eastern Time
318
+ #
319
+ # @return [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear]
320
+ required :period, union: -> { Lithic::AuthRules::VelocityLimitPeriod }
321
+
322
+ # @!attribute scope
323
+ # The scope over which the ACH payment velocity is aggregated.
324
+ #
325
+ # @return [Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Scope]
326
+ required :scope, enum: -> { Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope }
327
+
328
+ # @!attribute type
329
+ #
330
+ # @return [Symbol, :PAYMENT_VELOCITY]
331
+ required :type, const: :PAYMENT_VELOCITY
332
+
333
+ # @!attribute filters
334
+ # Optional filters applied when aggregating ACH payment velocity. Payments not
335
+ # matching the provided filters are excluded from the calculated velocity.
336
+ #
337
+ # @return [Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters, nil]
338
+ optional :filters, -> { Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters }
339
+
340
+ # @!attribute name
341
+ # The variable name for this feature in the rule function signature
342
+ #
343
+ # @return [String, nil]
344
+ optional :name, String
345
+
346
+ # @!method initialize(period:, scope:, filters: nil, name: nil, type: :PAYMENT_VELOCITY)
347
+ # Some parameter documentations has been truncated, see
348
+ # {Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature} for more
349
+ # details.
350
+ #
351
+ # @param period [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] Velocity over the current day since 00:00 / 12 AM in Eastern Time
352
+ #
353
+ # @param scope [Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Scope] The scope over which the ACH payment velocity is aggregated.
354
+ #
355
+ # @param filters [Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters] Optional filters applied when aggregating ACH payment velocity. Payments not mat
356
+ #
357
+ # @param name [String] The variable name for this feature in the rule function signature
358
+ #
359
+ # @param type [Symbol, :PAYMENT_VELOCITY]
360
+
361
+ # The scope over which the ACH payment velocity is aggregated.
362
+ #
363
+ # @see Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature#scope
364
+ module Scope
365
+ extend Lithic::Internal::Type::Enum
366
+
367
+ FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT
368
+ GLOBAL = :GLOBAL
369
+
370
+ # @!method self.values
371
+ # @return [Array<Symbol>]
372
+ end
373
+
374
+ # @see Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature#filters
375
+ class Filters < Lithic::Internal::Type::BaseModel
376
+ # @!attribute exclude_tags
377
+ # Exclude payments matching any of the provided tag key-value pairs.
378
+ #
379
+ # @return [Hash{Symbol=>String}, nil]
380
+ optional :exclude_tags, Lithic::Internal::Type::HashOf[String], nil?: true
381
+
382
+ # @!attribute include_payment_types
383
+ # Payment types to include in the velocity calculation.
384
+ #
385
+ # @return [Array<Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType>, nil]
386
+ optional :include_payment_types,
387
+ -> {
388
+ Lithic::Internal::Type::ArrayOf[enum: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType]
389
+ },
390
+ nil?: true
391
+
392
+ # @!attribute include_polarities
393
+ # Payment polarities to include in the velocity calculation.
394
+ #
395
+ # @return [Array<Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity>, nil]
396
+ optional :include_polarities,
397
+ -> {
398
+ Lithic::Internal::Type::ArrayOf[enum: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity]
399
+ },
400
+ nil?: true
401
+
402
+ # @!attribute include_statuses
403
+ # Payment statuses to include in the velocity calculation.
404
+ #
405
+ # @return [Array<Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus>, nil]
406
+ optional :include_statuses,
407
+ -> {
408
+ Lithic::Internal::Type::ArrayOf[enum: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus]
409
+ },
410
+ nil?: true
411
+
412
+ # @!attribute include_tags
413
+ # Only include payments matching all of the provided tag key-value pairs.
414
+ #
415
+ # @return [Hash{Symbol=>String}, nil]
416
+ optional :include_tags, Lithic::Internal::Type::HashOf[String], nil?: true
417
+
418
+ # @!attribute result
419
+ # Only include payments with the given result.
420
+ #
421
+ # @return [Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result, nil]
422
+ optional :result, enum: -> { Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result }
423
+
424
+ # @!method initialize(exclude_tags: nil, include_payment_types: nil, include_polarities: nil, include_statuses: nil, include_tags: nil, result: nil)
425
+ # Optional filters applied when aggregating ACH payment velocity. Payments not
426
+ # matching the provided filters are excluded from the calculated velocity.
427
+ #
428
+ # @param exclude_tags [Hash{Symbol=>String}, nil] Exclude payments matching any of the provided tag key-value pairs.
429
+ #
430
+ # @param include_payment_types [Array<Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType>, nil] Payment types to include in the velocity calculation.
431
+ #
432
+ # @param include_polarities [Array<Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity>, nil] Payment polarities to include in the velocity calculation.
433
+ #
434
+ # @param include_statuses [Array<Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus>, nil] Payment statuses to include in the velocity calculation.
435
+ #
436
+ # @param include_tags [Hash{Symbol=>String}, nil] Only include payments matching all of the provided tag key-value pairs.
437
+ #
438
+ # @param result [Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result] Only include payments with the given result.
439
+
440
+ module IncludePaymentType
441
+ extend Lithic::Internal::Type::Enum
442
+
443
+ ORIGINATION = :ORIGINATION
444
+ RECEIPT = :RECEIPT
445
+
446
+ # @!method self.values
447
+ # @return [Array<Symbol>]
448
+ end
449
+
450
+ module IncludePolarity
451
+ extend Lithic::Internal::Type::Enum
452
+
453
+ CREDIT = :CREDIT
454
+ DEBIT = :DEBIT
455
+
456
+ # @!method self.values
457
+ # @return [Array<Symbol>]
458
+ end
459
+
460
+ module IncludeStatus
461
+ extend Lithic::Internal::Type::Enum
462
+
463
+ PENDING = :PENDING
464
+ SETTLED = :SETTLED
465
+ DECLINED = :DECLINED
466
+ REVERSED = :REVERSED
467
+ CANCELED = :CANCELED
468
+ RETURNED = :RETURNED
469
+
470
+ # @!method self.values
471
+ # @return [Array<Symbol>]
472
+ end
473
+
474
+ # Only include payments with the given result.
475
+ #
476
+ # @see Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters#result
477
+ module Result
478
+ extend Lithic::Internal::Type::Enum
479
+
480
+ APPROVED = :APPROVED
481
+ DECLINED = :DECLINED
482
+
483
+ # @!method self.values
484
+ # @return [Array<Symbol>]
485
+ end
486
+ end
487
+ end
488
+
277
489
  class TransactionHistorySignalsFeature < Lithic::Internal::Type::BaseModel
278
490
  # @!attribute scope
279
491
  # The entity scope to load transaction history signals for.
@@ -314,8 +526,85 @@ module Lithic
314
526
  end
315
527
  end
316
528
 
529
+ class ConsecutiveDeclinesFeature < Lithic::Internal::Type::BaseModel
530
+ # @!attribute scope
531
+ # The entity scope to count consecutive declines for.
532
+ #
533
+ # @return [Symbol, Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope]
534
+ required :scope, enum: -> { Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope }
535
+
536
+ # @!attribute type
537
+ #
538
+ # @return [Symbol, :CONSECUTIVE_DECLINES]
539
+ required :type, const: :CONSECUTIVE_DECLINES
540
+
541
+ # @!attribute name
542
+ # The variable name for this feature in the rule function signature
543
+ #
544
+ # @return [String, nil]
545
+ optional :name, String
546
+
547
+ # @!method initialize(scope:, name: nil, type: :CONSECUTIVE_DECLINES)
548
+ # @param scope [Symbol, Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope] The entity scope to count consecutive declines for.
549
+ #
550
+ # @param name [String] The variable name for this feature in the rule function signature
551
+ #
552
+ # @param type [Symbol, :CONSECUTIVE_DECLINES]
553
+
554
+ # The entity scope to count consecutive declines for.
555
+ #
556
+ # @see Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature#scope
557
+ module Scope
558
+ extend Lithic::Internal::Type::Enum
559
+
560
+ CARD = :CARD
561
+ ACCOUNT = :ACCOUNT
562
+
563
+ # @!method self.values
564
+ # @return [Array<Symbol>]
565
+ end
566
+ end
567
+
568
+ class ACHPaymentHistoryFeature < Lithic::Internal::Type::BaseModel
569
+ # @!attribute scope
570
+ # The entity scope to load ACH payment history for.
571
+ #
572
+ # @return [Symbol, Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope]
573
+ required :scope, enum: -> { Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope }
574
+
575
+ # @!attribute type
576
+ #
577
+ # @return [Symbol, :ACH_PAYMENT_HISTORY]
578
+ required :type, const: :ACH_PAYMENT_HISTORY
579
+
580
+ # @!attribute name
581
+ # The variable name for this feature in the rule function signature
582
+ #
583
+ # @return [String, nil]
584
+ optional :name, String
585
+
586
+ # @!method initialize(scope:, name: nil, type: :ACH_PAYMENT_HISTORY)
587
+ # @param scope [Symbol, Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope] The entity scope to load ACH payment history for.
588
+ #
589
+ # @param name [String] The variable name for this feature in the rule function signature
590
+ #
591
+ # @param type [Symbol, :ACH_PAYMENT_HISTORY]
592
+
593
+ # The entity scope to load ACH payment history for.
594
+ #
595
+ # @see Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature#scope
596
+ module Scope
597
+ extend Lithic::Internal::Type::Enum
598
+
599
+ FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT
600
+
601
+ # @!method self.values
602
+ # @return [Array<Symbol>]
603
+ end
604
+ end
605
+
317
606
  # @!method self.variants
318
- # @return [Array(Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature)]
607
+ # @return [Array(Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::Models::AuthRules::RuleFeature::ExternalBankAccountFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature, Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature)]
319
608
  end
320
609
  end
321
610
  end
@@ -15,7 +15,7 @@ module Lithic
15
15
  # @!attribute features
16
16
  # Features available to the TypeScript code at evaluation time
17
17
  #
18
- # @return [Array<Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature>]
18
+ # @return [Array<Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::Models::AuthRules::RuleFeature::ExternalBankAccountFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature, Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature>]
19
19
  required :features, -> { Lithic::Internal::Type::ArrayOf[union: Lithic::AuthRules::RuleFeature] }
20
20
 
21
21
  # @!method initialize(code:, features:)
@@ -26,7 +26,7 @@ module Lithic
26
26
  #
27
27
  # @param code [String] The TypeScript source code of the rule. Must define a `rule()` function that acc
28
28
  #
29
- # @param features [Array<Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature>] Features available to the TypeScript code at evaluation time
29
+ # @param features [Array<Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::Models::AuthRules::RuleFeature::ExternalBankAccountFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature, Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature>] Features available to the TypeScript code at evaluation time
30
30
  end
31
31
  end
32
32
  end
@@ -68,12 +68,13 @@ module Lithic
68
68
  required :cardholder_currency, String
69
69
 
70
70
  # @!attribute cash_amount
71
- # The portion of the transaction requested as cash back by the cardholder, and
72
- # does not include any acquirer fees. The amount field includes the purchase
73
- # amount, the requested cash back amount, and any acquirer fees.
71
+ # The amount of cash requested by the cardholder, in the cardholder billing
72
+ # currency's smallest unit. For purchase-with-cashback transactions this is the
73
+ # cashback portion only; for ATM transactions this is the full amount. This amount
74
+ # includes all acquirer fees.
74
75
  #
75
- # If no cash back was requested, the value of this field will be 0, and the field
76
- # will always be present.
76
+ # If no cash was requested, the value of this field will be 0, and the field will
77
+ # always be present.
77
78
  #
78
79
  # @return [Integer]
79
80
  required :cash_amount, Integer
@@ -263,7 +264,7 @@ module Lithic
263
264
  #
264
265
  # @param cardholder_currency [String] Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
265
266
  #
266
- # @param cash_amount [Integer] The portion of the transaction requested as cash back by the cardholder, and doe
267
+ # @param cash_amount [Integer] The amount of cash requested by the cardholder, in the cardholder billing curren
267
268
  #
268
269
  # @param created [Time] Date and time when the transaction first occurred in UTC.
269
270
  #