lithic 0.21.0 → 0.22.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 (148) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +1 -10
  4. data/lib/lithic/internal/type/union.rb +21 -7
  5. data/lib/lithic/models/account_holder_create_params.rb +4 -2
  6. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +120 -66
  7. data/lib/lithic/models/account_holder_update_params.rb +6 -3
  8. data/lib/lithic/models/account_holder_update_response.rb +156 -86
  9. data/lib/lithic/models/account_holder_updated_webhook_event.rb +120 -66
  10. data/lib/lithic/models/account_holders/account_holder_entity.rb +35 -19
  11. data/lib/lithic/models/account_holders/entity_create_params.rb +39 -21
  12. data/lib/lithic/models/address.rb +33 -19
  13. data/lib/lithic/models/address_update.rb +27 -11
  14. data/lib/lithic/models/auth_rules/auth_rule.rb +55 -27
  15. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +189 -6
  16. data/lib/lithic/models/auth_rules/auth_rule_entities.rb +47 -0
  17. data/lib/lithic/models/auth_rules/auth_rule_entities_response.rb +31 -0
  18. data/lib/lithic/models/auth_rules/auth_rule_entity.rb +150 -0
  19. data/lib/lithic/models/auth_rules/auth_rule_version.rb +3 -6
  20. data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +33 -6
  21. data/lib/lithic/models/auth_rules/conditional_attribute.rb +101 -5
  22. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +3 -439
  23. data/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb +7 -0
  24. data/lib/lithic/models/auth_rules/merchant_lock_parameters.rb +11 -1
  25. data/lib/lithic/models/auth_rules/v2_create_params.rb +203 -45
  26. data/lib/lithic/models/auth_rules/v2_draft_params.rb +3 -6
  27. data/lib/lithic/models/auth_rules/v2_list_params.rb +5 -3
  28. data/lib/lithic/models/auth_rules/v2_update_entities_params.rb +39 -0
  29. data/lib/lithic/models/auth_rules/v2_update_params.rb +133 -12
  30. data/lib/lithic/models/card_authorization.rb +11 -1
  31. data/lib/lithic/models/card_create_params.rb +11 -1
  32. data/lib/lithic/models/card_update_params.rb +12 -1
  33. data/lib/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rb +279 -0
  34. data/lib/lithic/models/financial_accounts/installment_plans/statement_list_params.rb +106 -0
  35. data/lib/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rb +42 -0
  36. data/lib/lithic/models/financial_accounts/loan_tape.rb +62 -1
  37. data/lib/lithic/models/kyb.rb +4 -2
  38. data/lib/lithic/models/kyb_business_entity.rb +35 -19
  39. data/lib/lithic/models/kyc.rb +2 -1
  40. data/lib/lithic/models/non_pci_card.rb +11 -1
  41. data/lib/lithic/models/parsed_webhook_event.rb +120 -66
  42. data/lib/lithic/models/payment.rb +2 -1
  43. data/lib/lithic/models/transaction.rb +2 -1
  44. data/lib/lithic/models/transaction_simulate_authorization_params.rb +28 -4
  45. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +11 -1
  46. data/lib/lithic/models/transaction_simulate_return_params.rb +24 -1
  47. data/lib/lithic/resources/auth_rules/v2/backtests.rb +8 -8
  48. data/lib/lithic/resources/auth_rules/v2.rb +44 -8
  49. data/lib/lithic/resources/cards.rb +6 -2
  50. data/lib/lithic/resources/financial_accounts/installment_plans/statements.rb +107 -0
  51. data/lib/lithic/resources/financial_accounts/installment_plans.rb +4 -0
  52. data/lib/lithic/resources/transactions.rb +17 -4
  53. data/lib/lithic/resources/webhooks.rb +18 -0
  54. data/lib/lithic/version.rb +1 -1
  55. data/lib/lithic.rb +8 -1
  56. data/rbi/lithic/models/account_holder_create_params.rbi +8 -4
  57. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +195 -90
  58. data/rbi/lithic/models/account_holder_update_params.rbi +12 -6
  59. data/rbi/lithic/models/account_holder_update_response.rbi +254 -117
  60. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +195 -90
  61. data/rbi/lithic/models/account_holders/account_holder_entity.rbi +59 -27
  62. data/rbi/lithic/models/account_holders/entity_create_params.rbi +65 -30
  63. data/rbi/lithic/models/address.rbi +57 -29
  64. data/rbi/lithic/models/address_update.rbi +50 -24
  65. data/rbi/lithic/models/auth_rules/auth_rule.rbi +53 -19
  66. data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +442 -13
  67. data/rbi/lithic/models/auth_rules/auth_rule_entities.rbi +163 -0
  68. data/rbi/lithic/models/auth_rules/auth_rule_entities_response.rbi +72 -0
  69. data/rbi/lithic/models/auth_rules/auth_rule_entity.rbi +199 -0
  70. data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +0 -2
  71. data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +67 -9
  72. data/rbi/lithic/models/auth_rules/conditional_attribute.rbi +193 -5
  73. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +3 -939
  74. data/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi +14 -0
  75. data/rbi/lithic/models/auth_rules/merchant_lock_parameters.rbi +14 -3
  76. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +325 -50
  77. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +0 -4
  78. data/rbi/lithic/models/auth_rules/v2_list_params.rbi +6 -3
  79. data/rbi/lithic/models/auth_rules/v2_update_entities_params.rbi +68 -0
  80. data/rbi/lithic/models/auth_rules/v2_update_params.rbi +198 -5
  81. data/rbi/lithic/models/card_authorization.rbi +12 -0
  82. data/rbi/lithic/models/card_create_params.rbi +15 -0
  83. data/rbi/lithic/models/card_update_params.rbi +17 -0
  84. data/rbi/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbi +452 -0
  85. data/rbi/lithic/models/financial_accounts/installment_plans/statement_list_params.rbi +191 -0
  86. data/rbi/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rbi +66 -0
  87. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +119 -0
  88. data/rbi/lithic/models/kyb.rbi +8 -4
  89. data/rbi/lithic/models/kyb_business_entity.rbi +59 -27
  90. data/rbi/lithic/models/kyc.rbi +4 -2
  91. data/rbi/lithic/models/non_pci_card.rbi +12 -0
  92. data/rbi/lithic/models/parsed_webhook_event.rbi +195 -90
  93. data/rbi/lithic/models/payment.rbi +4 -2
  94. data/rbi/lithic/models/transaction.rbi +4 -2
  95. data/rbi/lithic/models/transaction_simulate_authorization_params.rbi +42 -4
  96. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +15 -0
  97. data/rbi/lithic/models/transaction_simulate_return_params.rbi +30 -0
  98. data/rbi/lithic/resources/account_holders/entities.rbi +2 -1
  99. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +8 -8
  100. data/rbi/lithic/resources/auth_rules/v2.rbi +43 -8
  101. data/rbi/lithic/resources/cards.rbi +11 -0
  102. data/rbi/lithic/resources/financial_accounts/installment_plans/statements.rbi +86 -0
  103. data/rbi/lithic/resources/financial_accounts/installment_plans.rbi +7 -0
  104. data/rbi/lithic/resources/transactions.rbi +31 -2
  105. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +39 -39
  106. data/sig/lithic/models/account_holder_update_response.rbs +52 -52
  107. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +39 -39
  108. data/sig/lithic/models/account_holders/account_holder_entity.rbs +13 -13
  109. data/sig/lithic/models/account_holders/entity_create_params.rbs +13 -13
  110. data/sig/lithic/models/address.rbs +13 -13
  111. data/sig/lithic/models/address_update.rbs +8 -12
  112. data/sig/lithic/models/auth_rules/auth_rule.rbs +8 -7
  113. data/sig/lithic/models/auth_rules/auth_rule_condition.rbs +89 -3
  114. data/sig/lithic/models/auth_rules/auth_rule_entities.rbs +37 -0
  115. data/sig/lithic/models/auth_rules/auth_rule_entities_response.rbs +29 -0
  116. data/sig/lithic/models/auth_rules/auth_rule_entity.rbs +80 -0
  117. data/sig/lithic/models/auth_rules/auth_rule_version.rbs +1 -2
  118. data/sig/lithic/models/auth_rules/conditional_3ds_action_parameters.rbs +10 -0
  119. data/sig/lithic/models/auth_rules/conditional_attribute.rbs +46 -0
  120. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +4 -204
  121. data/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs +2 -0
  122. data/sig/lithic/models/auth_rules/merchant_lock_parameters.rbs +10 -3
  123. data/sig/lithic/models/auth_rules/v2_create_params.rbs +86 -16
  124. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -2
  125. data/sig/lithic/models/auth_rules/v2_update_entities_params.rbs +46 -0
  126. data/sig/lithic/models/auth_rules/v2_update_params.rbs +47 -1
  127. data/sig/lithic/models/card_authorization.rbs +5 -0
  128. data/sig/lithic/models/card_create_params.rbs +7 -0
  129. data/sig/lithic/models/card_update_params.rbs +8 -1
  130. data/sig/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbs +191 -0
  131. data/sig/lithic/models/financial_accounts/installment_plans/statement_list_params.rbs +90 -0
  132. data/sig/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rbs +40 -0
  133. data/sig/lithic/models/financial_accounts/loan_tape.rbs +47 -0
  134. data/sig/lithic/models/kyb_business_entity.rbs +13 -13
  135. data/sig/lithic/models/non_pci_card.rbs +5 -0
  136. data/sig/lithic/models/parsed_webhook_event.rbs +39 -39
  137. data/sig/lithic/models/transaction_simulate_authorization_params.rbs +14 -0
  138. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +7 -0
  139. data/sig/lithic/models/transaction_simulate_return_params.rbs +19 -1
  140. data/sig/lithic/resources/auth_rules/v2.rbs +7 -0
  141. data/sig/lithic/resources/cards.rbs +2 -0
  142. data/sig/lithic/resources/financial_accounts/installment_plans/statements.rbs +30 -0
  143. data/sig/lithic/resources/financial_accounts/installment_plans.rbs +2 -0
  144. data/sig/lithic/resources/transactions.rbs +5 -0
  145. metadata +26 -5
  146. data/lib/lithic/models/auth_rules/conditional_block_parameters.rb +0 -20
  147. data/rbi/lithic/models/auth_rules/conditional_block_parameters.rbi +0 -37
  148. data/sig/lithic/models/auth_rules/conditional_block_parameters.rbs +0 -20
@@ -0,0 +1,163 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ AuthRuleEntities = AuthRules::AuthRuleEntities
6
+
7
+ module AuthRules
8
+ class AuthRuleEntities < Lithic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Lithic::AuthRules::AuthRuleEntities,
13
+ Lithic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Entities the Auth Rule does not apply to. Defaults to an empty list in requests.
18
+ sig do
19
+ returns(
20
+ T.nilable(
21
+ T::Array[
22
+ T.any(
23
+ Lithic::AuthRules::AuthRuleEntity::Program,
24
+ Lithic::AuthRules::AuthRuleEntity::Card,
25
+ Lithic::AuthRules::AuthRuleEntity::Account,
26
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount,
27
+ Lithic::AuthRules::AuthRuleEntity::CardTag
28
+ )
29
+ ]
30
+ )
31
+ )
32
+ end
33
+ attr_reader :exclude
34
+
35
+ sig do
36
+ params(
37
+ exclude:
38
+ T::Array[
39
+ T.any(
40
+ Lithic::AuthRules::AuthRuleEntity::Program::OrHash,
41
+ Lithic::AuthRules::AuthRuleEntity::Card::OrHash,
42
+ Lithic::AuthRules::AuthRuleEntity::Account::OrHash,
43
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount::OrHash,
44
+ Lithic::AuthRules::AuthRuleEntity::CardTag::OrHash
45
+ )
46
+ ]
47
+ ).void
48
+ end
49
+ attr_writer :exclude
50
+
51
+ # Entities the Auth Rule applies to. Defaults to an empty list in requests.
52
+ sig do
53
+ returns(
54
+ T.nilable(
55
+ T::Array[
56
+ T.any(
57
+ Lithic::AuthRules::AuthRuleEntity::Program,
58
+ Lithic::AuthRules::AuthRuleEntity::Card,
59
+ Lithic::AuthRules::AuthRuleEntity::Account,
60
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount,
61
+ Lithic::AuthRules::AuthRuleEntity::CardTag
62
+ )
63
+ ]
64
+ )
65
+ )
66
+ end
67
+ attr_reader :include
68
+
69
+ sig do
70
+ params(
71
+ include:
72
+ T::Array[
73
+ T.any(
74
+ Lithic::AuthRules::AuthRuleEntity::Program::OrHash,
75
+ Lithic::AuthRules::AuthRuleEntity::Card::OrHash,
76
+ Lithic::AuthRules::AuthRuleEntity::Account::OrHash,
77
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount::OrHash,
78
+ Lithic::AuthRules::AuthRuleEntity::CardTag::OrHash
79
+ )
80
+ ]
81
+ ).void
82
+ end
83
+ attr_writer :include
84
+
85
+ # The entities an Auth Rule applies to (`include`) and does not apply to
86
+ # (`exclude`). An exclusion overrides an inclusion, so a card excluded here is
87
+ # skipped even when the program, its account or one of its tags is included.
88
+ #
89
+ # The rule's resulting entities must satisfy these constraints after any write:
90
+ #
91
+ # - `include` must contain at least one entity.
92
+ # - If `PROGRAM` is included, it must be the only included entity.
93
+ # - `PROGRAM` cannot be excluded.
94
+ # - An entity cannot appear in both `include` and `exclude`, or twice in the same
95
+ # list.
96
+ # - A rule can have at most 1,000 entities across `include` and `exclude`, not
97
+ # counting `PROGRAM`.
98
+ # - Entity types must be valid for the rule's event stream.
99
+ # - `CARD`, `ACCOUNT` and `BUSINESS_ACCOUNT` tokens must belong to your program.
100
+ sig do
101
+ params(
102
+ exclude:
103
+ T::Array[
104
+ T.any(
105
+ Lithic::AuthRules::AuthRuleEntity::Program::OrHash,
106
+ Lithic::AuthRules::AuthRuleEntity::Card::OrHash,
107
+ Lithic::AuthRules::AuthRuleEntity::Account::OrHash,
108
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount::OrHash,
109
+ Lithic::AuthRules::AuthRuleEntity::CardTag::OrHash
110
+ )
111
+ ],
112
+ include:
113
+ T::Array[
114
+ T.any(
115
+ Lithic::AuthRules::AuthRuleEntity::Program::OrHash,
116
+ Lithic::AuthRules::AuthRuleEntity::Card::OrHash,
117
+ Lithic::AuthRules::AuthRuleEntity::Account::OrHash,
118
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount::OrHash,
119
+ Lithic::AuthRules::AuthRuleEntity::CardTag::OrHash
120
+ )
121
+ ]
122
+ ).returns(T.attached_class)
123
+ end
124
+ def self.new(
125
+ # Entities the Auth Rule does not apply to. Defaults to an empty list in requests.
126
+ exclude: nil,
127
+ # Entities the Auth Rule applies to. Defaults to an empty list in requests.
128
+ include: nil
129
+ )
130
+ end
131
+
132
+ sig do
133
+ override.returns(
134
+ {
135
+ exclude:
136
+ T::Array[
137
+ T.any(
138
+ Lithic::AuthRules::AuthRuleEntity::Program,
139
+ Lithic::AuthRules::AuthRuleEntity::Card,
140
+ Lithic::AuthRules::AuthRuleEntity::Account,
141
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount,
142
+ Lithic::AuthRules::AuthRuleEntity::CardTag
143
+ )
144
+ ],
145
+ include:
146
+ T::Array[
147
+ T.any(
148
+ Lithic::AuthRules::AuthRuleEntity::Program,
149
+ Lithic::AuthRules::AuthRuleEntity::Card,
150
+ Lithic::AuthRules::AuthRuleEntity::Account,
151
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount,
152
+ Lithic::AuthRules::AuthRuleEntity::CardTag
153
+ )
154
+ ]
155
+ }
156
+ )
157
+ end
158
+ def to_hash
159
+ end
160
+ end
161
+ end
162
+ end
163
+ end
@@ -0,0 +1,72 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ AuthRuleEntitiesResponse = AuthRules::AuthRuleEntitiesResponse
6
+
7
+ module AuthRules
8
+ class AuthRuleEntitiesResponse < Lithic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Lithic::AuthRules::AuthRuleEntitiesResponse,
13
+ Lithic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Entities the Auth Rule does not apply to
18
+ sig { returns(T::Array[Lithic::AuthRules::AuthRuleEntity::Variants]) }
19
+ attr_accessor :exclude
20
+
21
+ # Entities the Auth Rule applies to
22
+ sig { returns(T::Array[Lithic::AuthRules::AuthRuleEntity::Variants]) }
23
+ attr_accessor :include
24
+
25
+ # The entities the Auth Rule applies to (`include`) and does not apply to
26
+ # (`exclude`). An exclusion overrides an inclusion.
27
+ sig do
28
+ params(
29
+ exclude:
30
+ T::Array[
31
+ T.any(
32
+ Lithic::AuthRules::AuthRuleEntity::Program::OrHash,
33
+ Lithic::AuthRules::AuthRuleEntity::Card::OrHash,
34
+ Lithic::AuthRules::AuthRuleEntity::Account::OrHash,
35
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount::OrHash,
36
+ Lithic::AuthRules::AuthRuleEntity::CardTag::OrHash
37
+ )
38
+ ],
39
+ include:
40
+ T::Array[
41
+ T.any(
42
+ Lithic::AuthRules::AuthRuleEntity::Program::OrHash,
43
+ Lithic::AuthRules::AuthRuleEntity::Card::OrHash,
44
+ Lithic::AuthRules::AuthRuleEntity::Account::OrHash,
45
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount::OrHash,
46
+ Lithic::AuthRules::AuthRuleEntity::CardTag::OrHash
47
+ )
48
+ ]
49
+ ).returns(T.attached_class)
50
+ end
51
+ def self.new(
52
+ # Entities the Auth Rule does not apply to
53
+ exclude:,
54
+ # Entities the Auth Rule applies to
55
+ include:
56
+ )
57
+ end
58
+
59
+ sig do
60
+ override.returns(
61
+ {
62
+ exclude: T::Array[Lithic::AuthRules::AuthRuleEntity::Variants],
63
+ include: T::Array[Lithic::AuthRules::AuthRuleEntity::Variants]
64
+ }
65
+ )
66
+ end
67
+ def to_hash
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,199 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ AuthRuleEntity = AuthRules::AuthRuleEntity
6
+
7
+ module AuthRules
8
+ # An entity that an Auth Rule can apply to. The `type` field determines which
9
+ # other fields are present.
10
+ #
11
+ # - `PROGRAM`: the entire card program.
12
+ # - `CARD`: a single card.
13
+ # - `ACCOUNT`: a single account.
14
+ # - `BUSINESS_ACCOUNT`: a single business account.
15
+ # - `CARD_TAG`: every card that carries the given tag (`key` and `value`).
16
+ #
17
+ # `CARD` and `CARD_TAG` entities can only be used with rules on the
18
+ # `AUTHORIZATION`, `THREE_DS_AUTHENTICATION`, `TOKENIZATION` and
19
+ # `CARD_TRANSACTION_UPDATE` event streams. Rules on the other event streams accept
20
+ # `PROGRAM`, `ACCOUNT` and `BUSINESS_ACCOUNT` only.
21
+ module AuthRuleEntity
22
+ extend Lithic::Internal::Type::Union
23
+
24
+ Variants =
25
+ T.type_alias do
26
+ T.any(
27
+ Lithic::AuthRules::AuthRuleEntity::Program,
28
+ Lithic::AuthRules::AuthRuleEntity::Card,
29
+ Lithic::AuthRules::AuthRuleEntity::Account,
30
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount,
31
+ Lithic::AuthRules::AuthRuleEntity::CardTag
32
+ )
33
+ end
34
+
35
+ class Program < Lithic::Internal::Type::BaseModel
36
+ OrHash =
37
+ T.type_alias do
38
+ T.any(
39
+ Lithic::AuthRules::AuthRuleEntity::Program,
40
+ Lithic::Internal::AnyHash
41
+ )
42
+ end
43
+
44
+ sig { returns(Symbol) }
45
+ attr_accessor :type
46
+
47
+ # The entire card program. Takes no other fields.
48
+ sig { params(type: Symbol).returns(T.attached_class) }
49
+ def self.new(type: :PROGRAM)
50
+ end
51
+
52
+ sig { override.returns({ type: Symbol }) }
53
+ def to_hash
54
+ end
55
+ end
56
+
57
+ class Card < Lithic::Internal::Type::BaseModel
58
+ OrHash =
59
+ T.type_alias do
60
+ T.any(
61
+ Lithic::AuthRules::AuthRuleEntity::Card,
62
+ Lithic::Internal::AnyHash
63
+ )
64
+ end
65
+
66
+ # Token of the card
67
+ sig { returns(String) }
68
+ attr_accessor :token
69
+
70
+ sig { returns(Symbol) }
71
+ attr_accessor :type
72
+
73
+ # A single card.
74
+ sig { params(token: String, type: Symbol).returns(T.attached_class) }
75
+ def self.new(
76
+ # Token of the card
77
+ token:,
78
+ type: :CARD
79
+ )
80
+ end
81
+
82
+ sig { override.returns({ token: String, type: Symbol }) }
83
+ def to_hash
84
+ end
85
+ end
86
+
87
+ class Account < Lithic::Internal::Type::BaseModel
88
+ OrHash =
89
+ T.type_alias do
90
+ T.any(
91
+ Lithic::AuthRules::AuthRuleEntity::Account,
92
+ Lithic::Internal::AnyHash
93
+ )
94
+ end
95
+
96
+ # Token of the account
97
+ sig { returns(String) }
98
+ attr_accessor :token
99
+
100
+ sig { returns(Symbol) }
101
+ attr_accessor :type
102
+
103
+ # A single account.
104
+ sig { params(token: String, type: Symbol).returns(T.attached_class) }
105
+ def self.new(
106
+ # Token of the account
107
+ token:,
108
+ type: :ACCOUNT
109
+ )
110
+ end
111
+
112
+ sig { override.returns({ token: String, type: Symbol }) }
113
+ def to_hash
114
+ end
115
+ end
116
+
117
+ class BusinessAccount < Lithic::Internal::Type::BaseModel
118
+ OrHash =
119
+ T.type_alias do
120
+ T.any(
121
+ Lithic::AuthRules::AuthRuleEntity::BusinessAccount,
122
+ Lithic::Internal::AnyHash
123
+ )
124
+ end
125
+
126
+ # Token of the business account
127
+ sig { returns(String) }
128
+ attr_accessor :token
129
+
130
+ sig { returns(Symbol) }
131
+ attr_accessor :type
132
+
133
+ # A single business account.
134
+ sig { params(token: String, type: Symbol).returns(T.attached_class) }
135
+ def self.new(
136
+ # Token of the business account
137
+ token:,
138
+ type: :BUSINESS_ACCOUNT
139
+ )
140
+ end
141
+
142
+ sig { override.returns({ token: String, type: Symbol }) }
143
+ def to_hash
144
+ end
145
+ end
146
+
147
+ class CardTag < Lithic::Internal::Type::BaseModel
148
+ OrHash =
149
+ T.type_alias do
150
+ T.any(
151
+ Lithic::AuthRules::AuthRuleEntity::CardTag,
152
+ Lithic::Internal::AnyHash
153
+ )
154
+ end
155
+
156
+ # Tag key. Keys starting with `lithic.` (case-insensitive) are reserved and
157
+ # rejected.
158
+ sig { returns(String) }
159
+ attr_accessor :key
160
+
161
+ sig { returns(Symbol) }
162
+ attr_accessor :type
163
+
164
+ # Tag value
165
+ sig { returns(String) }
166
+ attr_accessor :value
167
+
168
+ # Every card whose `tags` contain `key` set to `value`.
169
+ sig do
170
+ params(key: String, value: String, type: Symbol).returns(
171
+ T.attached_class
172
+ )
173
+ end
174
+ def self.new(
175
+ # Tag key. Keys starting with `lithic.` (case-insensitive) are reserved and
176
+ # rejected.
177
+ key:,
178
+ # Tag value
179
+ value:,
180
+ type: :CARD_TAG
181
+ )
182
+ end
183
+
184
+ sig { override.returns({ key: String, type: Symbol, value: String }) }
185
+ def to_hash
186
+ end
187
+ end
188
+
189
+ sig do
190
+ override.returns(
191
+ T::Array[Lithic::AuthRules::AuthRuleEntity::Variants]
192
+ )
193
+ end
194
+ def self.variants
195
+ end
196
+ end
197
+ end
198
+ end
199
+ end
@@ -35,7 +35,6 @@ module Lithic
35
35
  created: Time,
36
36
  parameters:
37
37
  T.any(
38
- Lithic::AuthRules::ConditionalBlockParameters::OrHash,
39
38
  Lithic::AuthRules::VelocityLimitParams::OrHash,
40
39
  Lithic::AuthRules::MerchantLockParameters::OrHash,
41
40
  Lithic::AuthRules::Conditional3DSActionParameters::OrHash,
@@ -85,7 +84,6 @@ module Lithic
85
84
  Variants =
86
85
  T.type_alias do
87
86
  T.any(
88
- Lithic::AuthRules::ConditionalBlockParameters,
89
87
  Lithic::AuthRules::VelocityLimitParams,
90
88
  Lithic::AuthRules::MerchantLockParameters,
91
89
  Lithic::AuthRules::Conditional3DSActionParameters,
@@ -123,13 +123,24 @@ module Lithic
123
123
  # fee field in the settlement/cardholder billing currency. This is the amount
124
124
  # the issuer should authorize against unless the issuer is paying the acquirer
125
125
  # fee on behalf of the cardholder. Use an integer value.
126
- # - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication
127
- # risk level, with a higher value indicating a higher amount of risk. Use an
128
- # integer value.
126
+ # - `RISK_SCORE`: Mastercard, and Visa in some markets: Assessment by the network
127
+ # of the authentication risk level, with a higher value indicating a higher
128
+ # amount of risk. Use an integer value.
129
129
  # - `MESSAGE_CATEGORY`: The category of the authentication being processed.
130
130
  # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
131
131
  # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
132
132
  # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
133
+ # - `CARD_STATE`: The current state of the card associated with the
134
+ # authentication. Valid values are `CLOSED`, `OPEN`, `PAUSED`,
135
+ # `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
136
+ # - `CARD_TYPE`: The type of the card associated with the authentication. Valid
137
+ # values are `MERCHANT_LOCKED`, `PHYSICAL`, `SINGLE_USE`, `VIRTUAL`.
138
+ # - `CARD_PROGRAM_FAMILY`: The program family of the card associated with the
139
+ # authentication. Valid values are `CONSUMER`, `COMMERCIAL`.
140
+ # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
141
+ # `OK`, `BLOCKED`.
142
+ # - `CARD_AGE`: The age of the card in seconds at the time of the authentication.
143
+ # Use an integer value.
133
144
  sig do
134
145
  returns(
135
146
  Lithic::AuthRules::Conditional3DSActionParameters::Condition::Attribute::OrSymbol
@@ -172,13 +183,24 @@ module Lithic
172
183
  # fee field in the settlement/cardholder billing currency. This is the amount
173
184
  # the issuer should authorize against unless the issuer is paying the acquirer
174
185
  # fee on behalf of the cardholder. Use an integer value.
175
- # - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication
176
- # risk level, with a higher value indicating a higher amount of risk. Use an
177
- # integer value.
186
+ # - `RISK_SCORE`: Mastercard, and Visa in some markets: Assessment by the network
187
+ # of the authentication risk level, with a higher value indicating a higher
188
+ # amount of risk. Use an integer value.
178
189
  # - `MESSAGE_CATEGORY`: The category of the authentication being processed.
179
190
  # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
180
191
  # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
181
192
  # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
193
+ # - `CARD_STATE`: The current state of the card associated with the
194
+ # authentication. Valid values are `CLOSED`, `OPEN`, `PAUSED`,
195
+ # `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
196
+ # - `CARD_TYPE`: The type of the card associated with the authentication. Valid
197
+ # values are `MERCHANT_LOCKED`, `PHYSICAL`, `SINGLE_USE`, `VIRTUAL`.
198
+ # - `CARD_PROGRAM_FAMILY`: The program family of the card associated with the
199
+ # authentication. Valid values are `CONSUMER`, `COMMERCIAL`.
200
+ # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
201
+ # `OK`, `BLOCKED`.
202
+ # - `CARD_AGE`: The age of the card in seconds at the time of the authentication.
203
+ # Use an integer value.
182
204
  attribute:,
183
205
  # The operation to apply to the attribute
184
206
  operation:,
@@ -218,13 +240,24 @@ module Lithic
218
240
  # fee field in the settlement/cardholder billing currency. This is the amount
219
241
  # the issuer should authorize against unless the issuer is paying the acquirer
220
242
  # fee on behalf of the cardholder. Use an integer value.
221
- # - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication
222
- # risk level, with a higher value indicating a higher amount of risk. Use an
223
- # integer value.
243
+ # - `RISK_SCORE`: Mastercard, and Visa in some markets: Assessment by the network
244
+ # of the authentication risk level, with a higher value indicating a higher
245
+ # amount of risk. Use an integer value.
224
246
  # - `MESSAGE_CATEGORY`: The category of the authentication being processed.
225
247
  # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
226
248
  # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
227
249
  # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
250
+ # - `CARD_STATE`: The current state of the card associated with the
251
+ # authentication. Valid values are `CLOSED`, `OPEN`, `PAUSED`,
252
+ # `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
253
+ # - `CARD_TYPE`: The type of the card associated with the authentication. Valid
254
+ # values are `MERCHANT_LOCKED`, `PHYSICAL`, `SINGLE_USE`, `VIRTUAL`.
255
+ # - `CARD_PROGRAM_FAMILY`: The program family of the card associated with the
256
+ # authentication. Valid values are `CONSUMER`, `COMMERCIAL`.
257
+ # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
258
+ # `OK`, `BLOCKED`.
259
+ # - `CARD_AGE`: The age of the card in seconds at the time of the authentication.
260
+ # Use an integer value.
228
261
  module Attribute
229
262
  extend Lithic::Internal::Type::Enum
230
263
 
@@ -282,6 +315,31 @@ module Lithic
282
315
  :ADDRESS_MATCH,
283
316
  Lithic::AuthRules::Conditional3DSActionParameters::Condition::Attribute::TaggedSymbol
284
317
  )
318
+ CARD_STATE =
319
+ T.let(
320
+ :CARD_STATE,
321
+ Lithic::AuthRules::Conditional3DSActionParameters::Condition::Attribute::TaggedSymbol
322
+ )
323
+ CARD_TYPE =
324
+ T.let(
325
+ :CARD_TYPE,
326
+ Lithic::AuthRules::Conditional3DSActionParameters::Condition::Attribute::TaggedSymbol
327
+ )
328
+ CARD_PROGRAM_FAMILY =
329
+ T.let(
330
+ :CARD_PROGRAM_FAMILY,
331
+ Lithic::AuthRules::Conditional3DSActionParameters::Condition::Attribute::TaggedSymbol
332
+ )
333
+ PIN_STATUS =
334
+ T.let(
335
+ :PIN_STATUS,
336
+ Lithic::AuthRules::Conditional3DSActionParameters::Condition::Attribute::TaggedSymbol
337
+ )
338
+ CARD_AGE =
339
+ T.let(
340
+ :CARD_AGE,
341
+ Lithic::AuthRules::Conditional3DSActionParameters::Condition::Attribute::TaggedSymbol
342
+ )
285
343
 
286
344
  sig do
287
345
  override.returns(