lithic 0.17.0 → 0.18.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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/models/auth_rules/rule_feature.rb +291 -2
  5. data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +2 -2
  6. data/lib/lithic/models/claim_created_webhook_event.rb +190 -0
  7. data/lib/lithic/models/claim_document_accepted_webhook_event.rb +175 -0
  8. data/lib/lithic/models/claim_document_rejected_webhook_event.rb +175 -0
  9. data/lib/lithic/models/claim_document_uploaded_webhook_event.rb +175 -0
  10. data/lib/lithic/models/claim_updated_webhook_event.rb +190 -0
  11. data/lib/lithic/models/event.rb +23 -0
  12. data/lib/lithic/models/event_list_params.rb +14 -0
  13. data/lib/lithic/models/event_subscription.rb +14 -0
  14. data/lib/lithic/models/events/subscription_create_params.rb +14 -0
  15. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +5 -0
  16. data/lib/lithic/models/events/subscription_update_params.rb +14 -0
  17. data/lib/lithic/models/parsed_webhook_event.rb +11 -1
  18. data/lib/lithic/models.rb +10 -0
  19. data/lib/lithic/resources/webhooks.rb +1 -1
  20. data/lib/lithic/version.rb +1 -1
  21. data/lib/lithic.rb +5 -0
  22. data/rbi/lithic/models/auth_rules/rule_feature.rbi +686 -2
  23. data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +15 -3
  24. data/rbi/lithic/models/claim_created_webhook_event.rbi +386 -0
  25. data/rbi/lithic/models/claim_document_accepted_webhook_event.rbi +315 -0
  26. data/rbi/lithic/models/claim_document_rejected_webhook_event.rbi +315 -0
  27. data/rbi/lithic/models/claim_document_uploaded_webhook_event.rbi +315 -0
  28. data/rbi/lithic/models/claim_updated_webhook_event.rbi +386 -0
  29. data/rbi/lithic/models/event.rbi +46 -0
  30. data/rbi/lithic/models/event_list_params.rbi +34 -0
  31. data/rbi/lithic/models/event_subscription.rbi +34 -0
  32. data/rbi/lithic/models/events/subscription_create_params.rbi +34 -0
  33. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +25 -0
  34. data/rbi/lithic/models/events/subscription_update_params.rbi +34 -0
  35. data/rbi/lithic/models/parsed_webhook_event.rbi +5 -0
  36. data/rbi/lithic/models.rbi +13 -0
  37. data/rbi/lithic/resources/webhooks.rbi +5 -0
  38. data/sig/lithic/models/auth_rules/rule_feature.rbs +252 -0
  39. data/sig/lithic/models/claim_created_webhook_event.rbs +169 -0
  40. data/sig/lithic/models/claim_document_accepted_webhook_event.rbs +131 -0
  41. data/sig/lithic/models/claim_document_rejected_webhook_event.rbs +131 -0
  42. data/sig/lithic/models/claim_document_uploaded_webhook_event.rbs +131 -0
  43. data/sig/lithic/models/claim_updated_webhook_event.rbs +169 -0
  44. data/sig/lithic/models/event.rbs +10 -0
  45. data/sig/lithic/models/event_list_params.rbs +10 -0
  46. data/sig/lithic/models/event_subscription.rbs +10 -0
  47. data/sig/lithic/models/events/subscription_create_params.rbs +10 -0
  48. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +10 -0
  49. data/sig/lithic/models/events/subscription_update_params.rbs +10 -0
  50. data/sig/lithic/models/parsed_webhook_event.rbs +5 -0
  51. data/sig/lithic/models.rbs +10 -0
  52. data/sig/lithic/resources/webhooks.rbs +5 -0
  53. metadata +17 -2
@@ -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
@@ -45,11 +57,15 @@ module Lithic
45
57
  Lithic::AuthRules::RuleFeature::ACHReceiptFeature,
46
58
  Lithic::AuthRules::RuleFeature::CardTransactionFeature,
47
59
  Lithic::AuthRules::RuleFeature::ACHPaymentFeature,
60
+ Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature,
48
61
  Lithic::AuthRules::RuleFeature::CardFeature,
49
62
  Lithic::AuthRules::RuleFeature::AccountHolderFeature,
50
63
  Lithic::AuthRules::RuleFeature::IPMetadataFeature,
51
64
  Lithic::AuthRules::RuleFeature::SpendVelocityFeature,
52
- Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature
65
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature,
66
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature,
67
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature,
68
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature
53
69
  )
54
70
  end
55
71
 
@@ -245,6 +261,38 @@ module Lithic
245
261
  end
246
262
  end
247
263
 
264
+ class ExternalBankAccountFeature < Lithic::Internal::Type::BaseModel
265
+ OrHash =
266
+ T.type_alias do
267
+ T.any(
268
+ Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature,
269
+ Lithic::Internal::AnyHash
270
+ )
271
+ end
272
+
273
+ sig { returns(Symbol) }
274
+ attr_accessor :type
275
+
276
+ # The variable name for this feature in the rule function signature
277
+ sig { returns(T.nilable(String)) }
278
+ attr_reader :name
279
+
280
+ sig { params(name: String).void }
281
+ attr_writer :name
282
+
283
+ sig { params(name: String, type: Symbol).returns(T.attached_class) }
284
+ def self.new(
285
+ # The variable name for this feature in the rule function signature
286
+ name: nil,
287
+ type: :EXTERNAL_BANK_ACCOUNT
288
+ )
289
+ end
290
+
291
+ sig { override.returns({ type: Symbol, name: String }) }
292
+ def to_hash
293
+ end
294
+ end
295
+
248
296
  class CardFeature < Lithic::Internal::Type::BaseModel
249
297
  OrHash =
250
298
  T.type_alias do
@@ -479,6 +527,461 @@ module Lithic
479
527
  end
480
528
  end
481
529
 
530
+ class PaymentVelocityFeature < Lithic::Internal::Type::BaseModel
531
+ OrHash =
532
+ T.type_alias do
533
+ T.any(
534
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature,
535
+ Lithic::Internal::AnyHash
536
+ )
537
+ end
538
+
539
+ # Velocity over the current day since 00:00 / 12 AM in Eastern Time
540
+ sig do
541
+ returns(
542
+ T.any(
543
+ Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject,
544
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay,
545
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek,
546
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth,
547
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear
548
+ )
549
+ )
550
+ end
551
+ attr_accessor :period
552
+
553
+ # The scope over which the ACH payment velocity is aggregated.
554
+ sig do
555
+ returns(
556
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::OrSymbol
557
+ )
558
+ end
559
+ attr_accessor :scope
560
+
561
+ sig { returns(Symbol) }
562
+ attr_accessor :type
563
+
564
+ # Optional filters applied when aggregating ACH payment velocity. Payments not
565
+ # matching the provided filters are excluded from the calculated velocity.
566
+ sig do
567
+ returns(
568
+ T.nilable(
569
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters
570
+ )
571
+ )
572
+ end
573
+ attr_reader :filters
574
+
575
+ sig do
576
+ params(
577
+ filters:
578
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::OrHash
579
+ ).void
580
+ end
581
+ attr_writer :filters
582
+
583
+ # The variable name for this feature in the rule function signature
584
+ sig { returns(T.nilable(String)) }
585
+ attr_reader :name
586
+
587
+ sig { params(name: String).void }
588
+ attr_writer :name
589
+
590
+ sig do
591
+ params(
592
+ period:
593
+ T.any(
594
+ Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash,
595
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay::OrHash,
596
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek::OrHash,
597
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth::OrHash,
598
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash
599
+ ),
600
+ scope:
601
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::OrSymbol,
602
+ filters:
603
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::OrHash,
604
+ name: String,
605
+ type: Symbol
606
+ ).returns(T.attached_class)
607
+ end
608
+ def self.new(
609
+ # Velocity over the current day since 00:00 / 12 AM in Eastern Time
610
+ period:,
611
+ # The scope over which the ACH payment velocity is aggregated.
612
+ scope:,
613
+ # Optional filters applied when aggregating ACH payment velocity. Payments not
614
+ # matching the provided filters are excluded from the calculated velocity.
615
+ filters: nil,
616
+ # The variable name for this feature in the rule function signature
617
+ name: nil,
618
+ type: :PAYMENT_VELOCITY
619
+ )
620
+ end
621
+
622
+ sig do
623
+ override.returns(
624
+ {
625
+ period:
626
+ T.any(
627
+ Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject,
628
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay,
629
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek,
630
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth,
631
+ Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear
632
+ ),
633
+ scope:
634
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::OrSymbol,
635
+ type: Symbol,
636
+ filters:
637
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters,
638
+ name: String
639
+ }
640
+ )
641
+ end
642
+ def to_hash
643
+ end
644
+
645
+ # The scope over which the ACH payment velocity is aggregated.
646
+ module Scope
647
+ extend Lithic::Internal::Type::Enum
648
+
649
+ TaggedSymbol =
650
+ T.type_alias do
651
+ T.all(
652
+ Symbol,
653
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope
654
+ )
655
+ end
656
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
657
+
658
+ FINANCIAL_ACCOUNT =
659
+ T.let(
660
+ :FINANCIAL_ACCOUNT,
661
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::TaggedSymbol
662
+ )
663
+ GLOBAL =
664
+ T.let(
665
+ :GLOBAL,
666
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::TaggedSymbol
667
+ )
668
+
669
+ sig do
670
+ override.returns(
671
+ T::Array[
672
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::TaggedSymbol
673
+ ]
674
+ )
675
+ end
676
+ def self.values
677
+ end
678
+ end
679
+
680
+ class Filters < Lithic::Internal::Type::BaseModel
681
+ OrHash =
682
+ T.type_alias do
683
+ T.any(
684
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters,
685
+ Lithic::Internal::AnyHash
686
+ )
687
+ end
688
+
689
+ # Exclude payments matching any of the provided tag key-value pairs.
690
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
691
+ attr_accessor :exclude_tags
692
+
693
+ # Payment types to include in the velocity calculation.
694
+ sig do
695
+ returns(
696
+ T.nilable(
697
+ T::Array[
698
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::OrSymbol
699
+ ]
700
+ )
701
+ )
702
+ end
703
+ attr_accessor :include_payment_types
704
+
705
+ # Payment polarities to include in the velocity calculation.
706
+ sig do
707
+ returns(
708
+ T.nilable(
709
+ T::Array[
710
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::OrSymbol
711
+ ]
712
+ )
713
+ )
714
+ end
715
+ attr_accessor :include_polarities
716
+
717
+ # Payment statuses to include in the velocity calculation.
718
+ sig do
719
+ returns(
720
+ T.nilable(
721
+ T::Array[
722
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::OrSymbol
723
+ ]
724
+ )
725
+ )
726
+ end
727
+ attr_accessor :include_statuses
728
+
729
+ # Only include payments matching all of the provided tag key-value pairs.
730
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
731
+ attr_accessor :include_tags
732
+
733
+ # Only include payments with the given result.
734
+ sig do
735
+ returns(
736
+ T.nilable(
737
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::OrSymbol
738
+ )
739
+ )
740
+ end
741
+ attr_reader :result
742
+
743
+ sig do
744
+ params(
745
+ result:
746
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::OrSymbol
747
+ ).void
748
+ end
749
+ attr_writer :result
750
+
751
+ # Optional filters applied when aggregating ACH payment velocity. Payments not
752
+ # matching the provided filters are excluded from the calculated velocity.
753
+ sig do
754
+ params(
755
+ exclude_tags: T.nilable(T::Hash[Symbol, String]),
756
+ include_payment_types:
757
+ T.nilable(
758
+ T::Array[
759
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::OrSymbol
760
+ ]
761
+ ),
762
+ include_polarities:
763
+ T.nilable(
764
+ T::Array[
765
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::OrSymbol
766
+ ]
767
+ ),
768
+ include_statuses:
769
+ T.nilable(
770
+ T::Array[
771
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::OrSymbol
772
+ ]
773
+ ),
774
+ include_tags: T.nilable(T::Hash[Symbol, String]),
775
+ result:
776
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::OrSymbol
777
+ ).returns(T.attached_class)
778
+ end
779
+ def self.new(
780
+ # Exclude payments matching any of the provided tag key-value pairs.
781
+ exclude_tags: nil,
782
+ # Payment types to include in the velocity calculation.
783
+ include_payment_types: nil,
784
+ # Payment polarities to include in the velocity calculation.
785
+ include_polarities: nil,
786
+ # Payment statuses to include in the velocity calculation.
787
+ include_statuses: nil,
788
+ # Only include payments matching all of the provided tag key-value pairs.
789
+ include_tags: nil,
790
+ # Only include payments with the given result.
791
+ result: nil
792
+ )
793
+ end
794
+
795
+ sig do
796
+ override.returns(
797
+ {
798
+ exclude_tags: T.nilable(T::Hash[Symbol, String]),
799
+ include_payment_types:
800
+ T.nilable(
801
+ T::Array[
802
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::OrSymbol
803
+ ]
804
+ ),
805
+ include_polarities:
806
+ T.nilable(
807
+ T::Array[
808
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::OrSymbol
809
+ ]
810
+ ),
811
+ include_statuses:
812
+ T.nilable(
813
+ T::Array[
814
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::OrSymbol
815
+ ]
816
+ ),
817
+ include_tags: T.nilable(T::Hash[Symbol, String]),
818
+ result:
819
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::OrSymbol
820
+ }
821
+ )
822
+ end
823
+ def to_hash
824
+ end
825
+
826
+ module IncludePaymentType
827
+ extend Lithic::Internal::Type::Enum
828
+
829
+ TaggedSymbol =
830
+ T.type_alias do
831
+ T.all(
832
+ Symbol,
833
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType
834
+ )
835
+ end
836
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
837
+
838
+ ORIGINATION =
839
+ T.let(
840
+ :ORIGINATION,
841
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::TaggedSymbol
842
+ )
843
+ RECEIPT =
844
+ T.let(
845
+ :RECEIPT,
846
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::TaggedSymbol
847
+ )
848
+
849
+ sig do
850
+ override.returns(
851
+ T::Array[
852
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::TaggedSymbol
853
+ ]
854
+ )
855
+ end
856
+ def self.values
857
+ end
858
+ end
859
+
860
+ module IncludePolarity
861
+ extend Lithic::Internal::Type::Enum
862
+
863
+ TaggedSymbol =
864
+ T.type_alias do
865
+ T.all(
866
+ Symbol,
867
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity
868
+ )
869
+ end
870
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
871
+
872
+ CREDIT =
873
+ T.let(
874
+ :CREDIT,
875
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::TaggedSymbol
876
+ )
877
+ DEBIT =
878
+ T.let(
879
+ :DEBIT,
880
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::TaggedSymbol
881
+ )
882
+
883
+ sig do
884
+ override.returns(
885
+ T::Array[
886
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::TaggedSymbol
887
+ ]
888
+ )
889
+ end
890
+ def self.values
891
+ end
892
+ end
893
+
894
+ module IncludeStatus
895
+ extend Lithic::Internal::Type::Enum
896
+
897
+ TaggedSymbol =
898
+ T.type_alias do
899
+ T.all(
900
+ Symbol,
901
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus
902
+ )
903
+ end
904
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
905
+
906
+ PENDING =
907
+ T.let(
908
+ :PENDING,
909
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol
910
+ )
911
+ SETTLED =
912
+ T.let(
913
+ :SETTLED,
914
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol
915
+ )
916
+ DECLINED =
917
+ T.let(
918
+ :DECLINED,
919
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol
920
+ )
921
+ REVERSED =
922
+ T.let(
923
+ :REVERSED,
924
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol
925
+ )
926
+ CANCELED =
927
+ T.let(
928
+ :CANCELED,
929
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol
930
+ )
931
+ RETURNED =
932
+ T.let(
933
+ :RETURNED,
934
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol
935
+ )
936
+
937
+ sig do
938
+ override.returns(
939
+ T::Array[
940
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol
941
+ ]
942
+ )
943
+ end
944
+ def self.values
945
+ end
946
+ end
947
+
948
+ # Only include payments with the given result.
949
+ module Result
950
+ extend Lithic::Internal::Type::Enum
951
+
952
+ TaggedSymbol =
953
+ T.type_alias do
954
+ T.all(
955
+ Symbol,
956
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result
957
+ )
958
+ end
959
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
960
+
961
+ APPROVED =
962
+ T.let(
963
+ :APPROVED,
964
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::TaggedSymbol
965
+ )
966
+ DECLINED =
967
+ T.let(
968
+ :DECLINED,
969
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::TaggedSymbol
970
+ )
971
+
972
+ sig do
973
+ override.returns(
974
+ T::Array[
975
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::TaggedSymbol
976
+ ]
977
+ )
978
+ end
979
+ def self.values
980
+ end
981
+ end
982
+ end
983
+ end
984
+
482
985
  class TransactionHistorySignalsFeature < Lithic::Internal::Type::BaseModel
483
986
  OrHash =
484
987
  T.type_alias do
@@ -577,6 +1080,187 @@ module Lithic
577
1080
  end
578
1081
  end
579
1082
 
1083
+ class ConsecutiveDeclinesFeature < Lithic::Internal::Type::BaseModel
1084
+ OrHash =
1085
+ T.type_alias do
1086
+ T.any(
1087
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature,
1088
+ Lithic::Internal::AnyHash
1089
+ )
1090
+ end
1091
+
1092
+ # The entity scope to count consecutive declines for.
1093
+ sig do
1094
+ returns(
1095
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::OrSymbol
1096
+ )
1097
+ end
1098
+ attr_accessor :scope
1099
+
1100
+ sig { returns(Symbol) }
1101
+ attr_accessor :type
1102
+
1103
+ # The variable name for this feature in the rule function signature
1104
+ sig { returns(T.nilable(String)) }
1105
+ attr_reader :name
1106
+
1107
+ sig { params(name: String).void }
1108
+ attr_writer :name
1109
+
1110
+ sig do
1111
+ params(
1112
+ scope:
1113
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::OrSymbol,
1114
+ name: String,
1115
+ type: Symbol
1116
+ ).returns(T.attached_class)
1117
+ end
1118
+ def self.new(
1119
+ # The entity scope to count consecutive declines for.
1120
+ scope:,
1121
+ # The variable name for this feature in the rule function signature
1122
+ name: nil,
1123
+ type: :CONSECUTIVE_DECLINES
1124
+ )
1125
+ end
1126
+
1127
+ sig do
1128
+ override.returns(
1129
+ {
1130
+ scope:
1131
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::OrSymbol,
1132
+ type: Symbol,
1133
+ name: String
1134
+ }
1135
+ )
1136
+ end
1137
+ def to_hash
1138
+ end
1139
+
1140
+ # The entity scope to count consecutive declines for.
1141
+ module Scope
1142
+ extend Lithic::Internal::Type::Enum
1143
+
1144
+ TaggedSymbol =
1145
+ T.type_alias do
1146
+ T.all(
1147
+ Symbol,
1148
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope
1149
+ )
1150
+ end
1151
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1152
+
1153
+ CARD =
1154
+ T.let(
1155
+ :CARD,
1156
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::TaggedSymbol
1157
+ )
1158
+ ACCOUNT =
1159
+ T.let(
1160
+ :ACCOUNT,
1161
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::TaggedSymbol
1162
+ )
1163
+
1164
+ sig do
1165
+ override.returns(
1166
+ T::Array[
1167
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::TaggedSymbol
1168
+ ]
1169
+ )
1170
+ end
1171
+ def self.values
1172
+ end
1173
+ end
1174
+ end
1175
+
1176
+ class ACHPaymentHistoryFeature < Lithic::Internal::Type::BaseModel
1177
+ OrHash =
1178
+ T.type_alias do
1179
+ T.any(
1180
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature,
1181
+ Lithic::Internal::AnyHash
1182
+ )
1183
+ end
1184
+
1185
+ # The entity scope to load ACH payment history for.
1186
+ sig do
1187
+ returns(
1188
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::OrSymbol
1189
+ )
1190
+ end
1191
+ attr_accessor :scope
1192
+
1193
+ sig { returns(Symbol) }
1194
+ attr_accessor :type
1195
+
1196
+ # The variable name for this feature in the rule function signature
1197
+ sig { returns(T.nilable(String)) }
1198
+ attr_reader :name
1199
+
1200
+ sig { params(name: String).void }
1201
+ attr_writer :name
1202
+
1203
+ sig do
1204
+ params(
1205
+ scope:
1206
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::OrSymbol,
1207
+ name: String,
1208
+ type: Symbol
1209
+ ).returns(T.attached_class)
1210
+ end
1211
+ def self.new(
1212
+ # The entity scope to load ACH payment history for.
1213
+ scope:,
1214
+ # The variable name for this feature in the rule function signature
1215
+ name: nil,
1216
+ type: :ACH_PAYMENT_HISTORY
1217
+ )
1218
+ end
1219
+
1220
+ sig do
1221
+ override.returns(
1222
+ {
1223
+ scope:
1224
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::OrSymbol,
1225
+ type: Symbol,
1226
+ name: String
1227
+ }
1228
+ )
1229
+ end
1230
+ def to_hash
1231
+ end
1232
+
1233
+ # The entity scope to load ACH payment history for.
1234
+ module Scope
1235
+ extend Lithic::Internal::Type::Enum
1236
+
1237
+ TaggedSymbol =
1238
+ T.type_alias do
1239
+ T.all(
1240
+ Symbol,
1241
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope
1242
+ )
1243
+ end
1244
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1245
+
1246
+ FINANCIAL_ACCOUNT =
1247
+ T.let(
1248
+ :FINANCIAL_ACCOUNT,
1249
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::TaggedSymbol
1250
+ )
1251
+
1252
+ sig do
1253
+ override.returns(
1254
+ T::Array[
1255
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::TaggedSymbol
1256
+ ]
1257
+ )
1258
+ end
1259
+ def self.values
1260
+ end
1261
+ end
1262
+ end
1263
+
580
1264
  sig do
581
1265
  override.returns(T::Array[Lithic::AuthRules::RuleFeature::Variants])
582
1266
  end