lithic 0.1.0.pre.alpha.53 → 0.1.0.pre.alpha.55

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 (157) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/internal/transport/base_client.rb +7 -1
  5. data/lib/lithic/internal/transport/pooled_net_requester.rb +6 -2
  6. data/lib/lithic/models/account_activity_list_response.rb +1 -0
  7. data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +1 -0
  8. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +2 -2
  9. data/lib/lithic/models/account_holder_update_response.rb +4 -4
  10. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +252 -0
  11. data/lib/lithic/models/auth_rules/v2_create_params.rb +38 -284
  12. data/lib/lithic/models/auth_rules/v2_create_response.rb +8 -508
  13. data/lib/lithic/models/auth_rules/v2_draft_params.rb +4 -250
  14. data/lib/lithic/models/auth_rules/v2_draft_response.rb +8 -508
  15. data/lib/lithic/models/auth_rules/v2_list_response.rb +8 -508
  16. data/lib/lithic/models/auth_rules/v2_promote_response.rb +8 -508
  17. data/lib/lithic/models/auth_rules/v2_retrieve_features_response.rb +4 -11
  18. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +8 -508
  19. data/lib/lithic/models/auth_rules/v2_update_response.rb +8 -508
  20. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +4 -7
  21. data/lib/lithic/models/auth_rules/velocity_limit_period.rb +154 -0
  22. data/lib/lithic/models/book_transfer_response.rb +5 -5
  23. data/lib/lithic/models/dispute.rb +510 -242
  24. data/lib/lithic/models/dispute_create_response.rb +326 -0
  25. data/lib/lithic/models/dispute_delete_response.rb +326 -0
  26. data/lib/lithic/models/dispute_list_response.rb +326 -0
  27. data/lib/lithic/models/dispute_retrieve_response.rb +326 -0
  28. data/lib/lithic/models/dispute_update_response.rb +326 -0
  29. data/lib/lithic/models/event.rb +213 -69
  30. data/lib/lithic/models/event_list_params.rb +112 -6
  31. data/lib/lithic/models/event_subscription.rb +112 -6
  32. data/lib/lithic/models/events/subscription_create_params.rb +112 -6
  33. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +12 -6
  34. data/lib/lithic/models/events/subscription_update_params.rb +112 -6
  35. data/lib/lithic/models/financial_account.rb +1 -65
  36. data/lib/lithic/models/financial_accounts/financial_account_credit_config.rb +1 -64
  37. data/lib/lithic/models/financial_accounts/loan_tape.rb +99 -3
  38. data/lib/lithic/models/financial_accounts/statement.rb +66 -2
  39. data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +1 -0
  40. data/lib/lithic/models/financial_transaction.rb +1 -0
  41. data/lib/lithic/models/payment.rb +29 -18
  42. data/lib/lithic/models/payment_simulate_action_params.rb +17 -1
  43. data/lib/lithic/models/tokenization.rb +189 -23
  44. data/lib/lithic/models/transaction.rb +12 -116
  45. data/lib/lithic/models/transactions/events/enhanced_data.rb +9 -9
  46. data/lib/lithic/models/transfer.rb +1 -0
  47. data/lib/lithic/resources/auth_rules/v2/backtests.rb +3 -5
  48. data/lib/lithic/resources/auth_rules/v2.rb +13 -56
  49. data/lib/lithic/resources/disputes.rb +10 -10
  50. data/lib/lithic/resources/payments.rb +5 -1
  51. data/lib/lithic/version.rb +1 -1
  52. data/lib/lithic.rb +8 -3
  53. data/manifest.yaml +1 -0
  54. data/rbi/lithic/internal/transport/base_client.rbi +5 -0
  55. data/rbi/lithic/internal/transport/pooled_net_requester.rbi +6 -2
  56. data/rbi/lithic/internal/type/base_model.rbi +8 -4
  57. data/rbi/lithic/models/account_activity_list_response.rbi +5 -0
  58. data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +5 -0
  59. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +3 -6
  60. data/rbi/lithic/models/account_holder_update_response.rbi +6 -12
  61. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +577 -0
  62. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +85 -679
  63. data/rbi/lithic/models/auth_rules/v2_create_response.rbi +4 -1146
  64. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +4 -575
  65. data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +4 -1146
  66. data/rbi/lithic/models/auth_rules/v2_list_response.rbi +4 -1146
  67. data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +4 -1146
  68. data/rbi/lithic/models/auth_rules/v2_retrieve_features_response.rbi +9 -22
  69. data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +4 -1146
  70. data/rbi/lithic/models/auth_rules/v2_update_response.rbi +4 -1146
  71. data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +17 -29
  72. data/rbi/lithic/models/auth_rules/velocity_limit_period.rbi +223 -0
  73. data/rbi/lithic/models/book_transfer_response.rbi +14 -11
  74. data/rbi/lithic/models/dispute.rbi +942 -395
  75. data/rbi/lithic/models/dispute_create_response.rbi +599 -0
  76. data/rbi/lithic/models/dispute_delete_response.rbi +599 -0
  77. data/rbi/lithic/models/dispute_list_response.rbi +582 -0
  78. data/rbi/lithic/models/dispute_retrieve_response.rbi +601 -0
  79. data/rbi/lithic/models/dispute_update_response.rbi +599 -0
  80. data/rbi/lithic/models/event.rbi +348 -111
  81. data/rbi/lithic/models/event_list_params.rbi +155 -25
  82. data/rbi/lithic/models/event_subscription.rbi +155 -25
  83. data/rbi/lithic/models/events/subscription_create_params.rbi +155 -25
  84. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +55 -25
  85. data/rbi/lithic/models/events/subscription_update_params.rbi +155 -25
  86. data/rbi/lithic/models/financial_account.rbi +3 -132
  87. data/rbi/lithic/models/financial_accounts/financial_account_credit_config.rbi +3 -136
  88. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +132 -9
  89. data/rbi/lithic/models/financial_accounts/statement.rbi +88 -6
  90. data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +5 -0
  91. data/rbi/lithic/models/financial_transaction.rbi +5 -0
  92. data/rbi/lithic/models/payment.rbi +52 -28
  93. data/rbi/lithic/models/payment_simulate_action_params.rbi +22 -0
  94. data/rbi/lithic/models/tokenization.rbi +429 -34
  95. data/rbi/lithic/models/transaction.rbi +22 -246
  96. data/rbi/lithic/models/transactions/events/enhanced_data.rbi +12 -12
  97. data/rbi/lithic/models/transfer.rbi +5 -0
  98. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +0 -3
  99. data/rbi/lithic/resources/auth_rules/v2.rbi +24 -72
  100. data/rbi/lithic/resources/disputes.rbi +7 -5
  101. data/rbi/lithic/resources/payments.rbi +6 -0
  102. data/sig/lithic/internal/transport/base_client.rbs +2 -0
  103. data/sig/lithic/internal/transport/pooled_net_requester.rbs +4 -1
  104. data/sig/lithic/models/account_activity_list_response.rbs +2 -0
  105. data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +2 -0
  106. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +4 -6
  107. data/sig/lithic/models/account_holder_update_response.rbs +8 -12
  108. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +163 -0
  109. data/sig/lithic/models/auth_rules/v2_create_params.rbs +22 -188
  110. data/sig/lithic/models/auth_rules/v2_create_response.rbs +2 -318
  111. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -159
  112. data/sig/lithic/models/auth_rules/v2_draft_response.rbs +2 -318
  113. data/sig/lithic/models/auth_rules/v2_list_response.rbs +2 -318
  114. data/sig/lithic/models/auth_rules/v2_promote_response.rbs +2 -318
  115. data/sig/lithic/models/auth_rules/v2_retrieve_features_response.rbs +4 -4
  116. data/sig/lithic/models/auth_rules/v2_retrieve_response.rbs +2 -318
  117. data/sig/lithic/models/auth_rules/v2_update_response.rbs +2 -318
  118. data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +4 -4
  119. data/sig/lithic/models/auth_rules/velocity_limit_period.rbs +91 -0
  120. data/sig/lithic/models/book_transfer_response.rbs +7 -7
  121. data/sig/lithic/models/dispute.rbs +417 -157
  122. data/sig/lithic/models/dispute_create_response.rbs +210 -0
  123. data/sig/lithic/models/dispute_delete_response.rbs +210 -0
  124. data/sig/lithic/models/dispute_list_response.rbs +210 -0
  125. data/sig/lithic/models/dispute_retrieve_response.rbs +210 -0
  126. data/sig/lithic/models/dispute_update_response.rbs +210 -0
  127. data/sig/lithic/models/event.rbs +25 -13
  128. data/sig/lithic/models/event_list_params.rbs +25 -13
  129. data/sig/lithic/models/event_subscription.rbs +25 -13
  130. data/sig/lithic/models/events/subscription_create_params.rbs +25 -13
  131. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +25 -13
  132. data/sig/lithic/models/events/subscription_update_params.rbs +25 -13
  133. data/sig/lithic/models/financial_account.rbs +3 -45
  134. data/sig/lithic/models/financial_accounts/financial_account_credit_config.rbs +3 -49
  135. data/sig/lithic/models/financial_accounts/loan_tape.rbs +87 -9
  136. data/sig/lithic/models/financial_accounts/statement.rbs +58 -6
  137. data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +2 -0
  138. data/sig/lithic/models/financial_transaction.rbs +2 -0
  139. data/sig/lithic/models/payment.rbs +16 -12
  140. data/sig/lithic/models/payment_simulate_action_params.rbs +14 -0
  141. data/sig/lithic/models/tokenization.rbs +160 -13
  142. data/sig/lithic/models/transaction.rbs +13 -94
  143. data/sig/lithic/models/transactions/events/enhanced_data.rbs +15 -15
  144. data/sig/lithic/models/transfer.rbs +2 -0
  145. data/sig/lithic/resources/auth_rules/v2.rbs +2 -12
  146. data/sig/lithic/resources/disputes.rbs +5 -5
  147. data/sig/lithic/resources/payments.rbs +2 -0
  148. metadata +23 -11
  149. data/lib/lithic/models/auth_rules/v2_apply_params.rb +0 -56
  150. data/lib/lithic/models/auth_rules/v2_apply_response.rb +0 -766
  151. data/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb +0 -248
  152. data/rbi/lithic/models/auth_rules/v2_apply_params.rbi +0 -86
  153. data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +0 -1638
  154. data/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi +0 -557
  155. data/sig/lithic/models/auth_rules/v2_apply_params.rbs +0 -54
  156. data/sig/lithic/models/auth_rules/v2_apply_response.rbs +0 -509
  157. data/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs +0 -223
@@ -0,0 +1,577 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ module AuthRules
6
+ class ConditionalAuthorizationActionParameters < Lithic::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters,
11
+ Lithic::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The action to take if the conditions are met.
16
+ sig do
17
+ returns(
18
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Action::OrSymbol
19
+ )
20
+ end
21
+ attr_accessor :action
22
+
23
+ sig do
24
+ returns(
25
+ T::Array[
26
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition
27
+ ]
28
+ )
29
+ end
30
+ attr_accessor :conditions
31
+
32
+ sig do
33
+ params(
34
+ action:
35
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Action::OrSymbol,
36
+ conditions:
37
+ T::Array[
38
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::OrHash
39
+ ]
40
+ ).returns(T.attached_class)
41
+ end
42
+ def self.new(
43
+ # The action to take if the conditions are met.
44
+ action:,
45
+ conditions:
46
+ )
47
+ end
48
+
49
+ sig do
50
+ override.returns(
51
+ {
52
+ action:
53
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Action::OrSymbol,
54
+ conditions:
55
+ T::Array[
56
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition
57
+ ]
58
+ }
59
+ )
60
+ end
61
+ def to_hash
62
+ end
63
+
64
+ # The action to take if the conditions are met.
65
+ module Action
66
+ extend Lithic::Internal::Type::Enum
67
+
68
+ TaggedSymbol =
69
+ T.type_alias do
70
+ T.all(
71
+ Symbol,
72
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Action
73
+ )
74
+ end
75
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
76
+
77
+ DECLINE =
78
+ T.let(
79
+ :DECLINE,
80
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Action::TaggedSymbol
81
+ )
82
+ CHALLENGE =
83
+ T.let(
84
+ :CHALLENGE,
85
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Action::TaggedSymbol
86
+ )
87
+
88
+ sig do
89
+ override.returns(
90
+ T::Array[
91
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Action::TaggedSymbol
92
+ ]
93
+ )
94
+ end
95
+ def self.values
96
+ end
97
+ end
98
+
99
+ class Condition < Lithic::Internal::Type::BaseModel
100
+ OrHash =
101
+ T.type_alias do
102
+ T.any(
103
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition,
104
+ Lithic::Internal::AnyHash
105
+ )
106
+ end
107
+
108
+ # The attribute to target.
109
+ #
110
+ # The following attributes may be targeted:
111
+ #
112
+ # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
113
+ # business by the types of goods or services it provides.
114
+ # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
115
+ # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
116
+ # Netherlands Antilles.
117
+ # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
118
+ # the transaction.
119
+ # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
120
+ # (merchant).
121
+ # - `DESCRIPTOR`: Short description of card acceptor.
122
+ # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
123
+ # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
124
+ # `TOKEN_AUTHENTICATED`.
125
+ # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
126
+ # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
127
+ # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
128
+ # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
129
+ # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
130
+ # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
131
+ # fee field in the settlement/cardholder billing currency. This is the amount
132
+ # the issuer should authorize against unless the issuer is paying the acquirer
133
+ # fee on behalf of the cardholder.
134
+ # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
135
+ # represents the amount of cash being withdrawn or advanced.
136
+ # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
137
+ # given authorization. Scores are on a range of 0-999, with 0 representing the
138
+ # lowest risk and 999 representing the highest risk. For Visa transactions,
139
+ # where the raw score has a range of 0-99, Lithic will normalize the score by
140
+ # multiplying the raw score by 10x.
141
+ # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
142
+ # trailing 15 minutes before the authorization.
143
+ # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
144
+ # trailing hour up and until the authorization.
145
+ # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
146
+ # trailing 24 hours up and until the authorization.
147
+ # - `CARD_STATE`: The current state of the card associated with the transaction.
148
+ # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
149
+ # `PENDING_FULFILLMENT`.
150
+ # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
151
+ # Valid values are `TRUE`, `FALSE`.
152
+ # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
153
+ # `OK`, `BLOCKED`.
154
+ # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
155
+ # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
156
+ # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
157
+ # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
158
+ # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
159
+ # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
160
+ # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
161
+ # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
162
+ sig do
163
+ returns(
164
+ T.nilable(
165
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::OrSymbol
166
+ )
167
+ )
168
+ end
169
+ attr_reader :attribute
170
+
171
+ sig do
172
+ params(
173
+ attribute:
174
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::OrSymbol
175
+ ).void
176
+ end
177
+ attr_writer :attribute
178
+
179
+ # The operation to apply to the attribute
180
+ sig do
181
+ returns(
182
+ T.nilable(
183
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::OrSymbol
184
+ )
185
+ )
186
+ end
187
+ attr_reader :operation
188
+
189
+ sig do
190
+ params(
191
+ operation:
192
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::OrSymbol
193
+ ).void
194
+ end
195
+ attr_writer :operation
196
+
197
+ # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
198
+ sig do
199
+ returns(
200
+ T.nilable(
201
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Value::Variants
202
+ )
203
+ )
204
+ end
205
+ attr_reader :value
206
+
207
+ sig do
208
+ params(
209
+ value:
210
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Value::Variants
211
+ ).void
212
+ end
213
+ attr_writer :value
214
+
215
+ sig do
216
+ params(
217
+ attribute:
218
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::OrSymbol,
219
+ operation:
220
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::OrSymbol,
221
+ value:
222
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Value::Variants
223
+ ).returns(T.attached_class)
224
+ end
225
+ def self.new(
226
+ # The attribute to target.
227
+ #
228
+ # The following attributes may be targeted:
229
+ #
230
+ # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
231
+ # business by the types of goods or services it provides.
232
+ # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
233
+ # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
234
+ # Netherlands Antilles.
235
+ # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
236
+ # the transaction.
237
+ # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
238
+ # (merchant).
239
+ # - `DESCRIPTOR`: Short description of card acceptor.
240
+ # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
241
+ # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
242
+ # `TOKEN_AUTHENTICATED`.
243
+ # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
244
+ # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
245
+ # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
246
+ # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
247
+ # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
248
+ # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
249
+ # fee field in the settlement/cardholder billing currency. This is the amount
250
+ # the issuer should authorize against unless the issuer is paying the acquirer
251
+ # fee on behalf of the cardholder.
252
+ # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
253
+ # represents the amount of cash being withdrawn or advanced.
254
+ # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
255
+ # given authorization. Scores are on a range of 0-999, with 0 representing the
256
+ # lowest risk and 999 representing the highest risk. For Visa transactions,
257
+ # where the raw score has a range of 0-99, Lithic will normalize the score by
258
+ # multiplying the raw score by 10x.
259
+ # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
260
+ # trailing 15 minutes before the authorization.
261
+ # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
262
+ # trailing hour up and until the authorization.
263
+ # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
264
+ # trailing 24 hours up and until the authorization.
265
+ # - `CARD_STATE`: The current state of the card associated with the transaction.
266
+ # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
267
+ # `PENDING_FULFILLMENT`.
268
+ # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
269
+ # Valid values are `TRUE`, `FALSE`.
270
+ # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
271
+ # `OK`, `BLOCKED`.
272
+ # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
273
+ # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
274
+ # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
275
+ # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
276
+ # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
277
+ # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
278
+ # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
279
+ # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
280
+ attribute: nil,
281
+ # The operation to apply to the attribute
282
+ operation: nil,
283
+ # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
284
+ value: nil
285
+ )
286
+ end
287
+
288
+ sig do
289
+ override.returns(
290
+ {
291
+ attribute:
292
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::OrSymbol,
293
+ operation:
294
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::OrSymbol,
295
+ value:
296
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Value::Variants
297
+ }
298
+ )
299
+ end
300
+ def to_hash
301
+ end
302
+
303
+ # The attribute to target.
304
+ #
305
+ # The following attributes may be targeted:
306
+ #
307
+ # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
308
+ # business by the types of goods or services it provides.
309
+ # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
310
+ # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
311
+ # Netherlands Antilles.
312
+ # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
313
+ # the transaction.
314
+ # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
315
+ # (merchant).
316
+ # - `DESCRIPTOR`: Short description of card acceptor.
317
+ # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
318
+ # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
319
+ # `TOKEN_AUTHENTICATED`.
320
+ # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
321
+ # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
322
+ # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
323
+ # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
324
+ # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
325
+ # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
326
+ # fee field in the settlement/cardholder billing currency. This is the amount
327
+ # the issuer should authorize against unless the issuer is paying the acquirer
328
+ # fee on behalf of the cardholder.
329
+ # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
330
+ # represents the amount of cash being withdrawn or advanced.
331
+ # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
332
+ # given authorization. Scores are on a range of 0-999, with 0 representing the
333
+ # lowest risk and 999 representing the highest risk. For Visa transactions,
334
+ # where the raw score has a range of 0-99, Lithic will normalize the score by
335
+ # multiplying the raw score by 10x.
336
+ # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
337
+ # trailing 15 minutes before the authorization.
338
+ # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
339
+ # trailing hour up and until the authorization.
340
+ # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
341
+ # trailing 24 hours up and until the authorization.
342
+ # - `CARD_STATE`: The current state of the card associated with the transaction.
343
+ # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
344
+ # `PENDING_FULFILLMENT`.
345
+ # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
346
+ # Valid values are `TRUE`, `FALSE`.
347
+ # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
348
+ # `OK`, `BLOCKED`.
349
+ # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
350
+ # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
351
+ # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
352
+ # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
353
+ # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
354
+ # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
355
+ # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
356
+ # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
357
+ module Attribute
358
+ extend Lithic::Internal::Type::Enum
359
+
360
+ TaggedSymbol =
361
+ T.type_alias do
362
+ T.all(
363
+ Symbol,
364
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute
365
+ )
366
+ end
367
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
368
+
369
+ MCC =
370
+ T.let(
371
+ :MCC,
372
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
373
+ )
374
+ COUNTRY =
375
+ T.let(
376
+ :COUNTRY,
377
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
378
+ )
379
+ CURRENCY =
380
+ T.let(
381
+ :CURRENCY,
382
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
383
+ )
384
+ MERCHANT_ID =
385
+ T.let(
386
+ :MERCHANT_ID,
387
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
388
+ )
389
+ DESCRIPTOR =
390
+ T.let(
391
+ :DESCRIPTOR,
392
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
393
+ )
394
+ LIABILITY_SHIFT =
395
+ T.let(
396
+ :LIABILITY_SHIFT,
397
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
398
+ )
399
+ PAN_ENTRY_MODE =
400
+ T.let(
401
+ :PAN_ENTRY_MODE,
402
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
403
+ )
404
+ TRANSACTION_AMOUNT =
405
+ T.let(
406
+ :TRANSACTION_AMOUNT,
407
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
408
+ )
409
+ CASH_AMOUNT =
410
+ T.let(
411
+ :CASH_AMOUNT,
412
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
413
+ )
414
+ RISK_SCORE =
415
+ T.let(
416
+ :RISK_SCORE,
417
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
418
+ )
419
+ CARD_TRANSACTION_COUNT_15_M =
420
+ T.let(
421
+ :CARD_TRANSACTION_COUNT_15M,
422
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
423
+ )
424
+ CARD_TRANSACTION_COUNT_1_H =
425
+ T.let(
426
+ :CARD_TRANSACTION_COUNT_1H,
427
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
428
+ )
429
+ CARD_TRANSACTION_COUNT_24_H =
430
+ T.let(
431
+ :CARD_TRANSACTION_COUNT_24H,
432
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
433
+ )
434
+ CARD_STATE =
435
+ T.let(
436
+ :CARD_STATE,
437
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
438
+ )
439
+ PIN_ENTERED =
440
+ T.let(
441
+ :PIN_ENTERED,
442
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
443
+ )
444
+ PIN_STATUS =
445
+ T.let(
446
+ :PIN_STATUS,
447
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
448
+ )
449
+ WALLET_TYPE =
450
+ T.let(
451
+ :WALLET_TYPE,
452
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
453
+ )
454
+ TRANSACTION_INITIATOR =
455
+ T.let(
456
+ :TRANSACTION_INITIATOR,
457
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
458
+ )
459
+ ADDRESS_MATCH =
460
+ T.let(
461
+ :ADDRESS_MATCH,
462
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
463
+ )
464
+
465
+ sig do
466
+ override.returns(
467
+ T::Array[
468
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
469
+ ]
470
+ )
471
+ end
472
+ def self.values
473
+ end
474
+ end
475
+
476
+ # The operation to apply to the attribute
477
+ module Operation
478
+ extend Lithic::Internal::Type::Enum
479
+
480
+ TaggedSymbol =
481
+ T.type_alias do
482
+ T.all(
483
+ Symbol,
484
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation
485
+ )
486
+ end
487
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
488
+
489
+ IS_ONE_OF =
490
+ T.let(
491
+ :IS_ONE_OF,
492
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
493
+ )
494
+ IS_NOT_ONE_OF =
495
+ T.let(
496
+ :IS_NOT_ONE_OF,
497
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
498
+ )
499
+ MATCHES =
500
+ T.let(
501
+ :MATCHES,
502
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
503
+ )
504
+ DOES_NOT_MATCH =
505
+ T.let(
506
+ :DOES_NOT_MATCH,
507
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
508
+ )
509
+ IS_EQUAL_TO =
510
+ T.let(
511
+ :IS_EQUAL_TO,
512
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
513
+ )
514
+ IS_NOT_EQUAL_TO =
515
+ T.let(
516
+ :IS_NOT_EQUAL_TO,
517
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
518
+ )
519
+ IS_GREATER_THAN =
520
+ T.let(
521
+ :IS_GREATER_THAN,
522
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
523
+ )
524
+ IS_GREATER_THAN_OR_EQUAL_TO =
525
+ T.let(
526
+ :IS_GREATER_THAN_OR_EQUAL_TO,
527
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
528
+ )
529
+ IS_LESS_THAN =
530
+ T.let(
531
+ :IS_LESS_THAN,
532
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
533
+ )
534
+ IS_LESS_THAN_OR_EQUAL_TO =
535
+ T.let(
536
+ :IS_LESS_THAN_OR_EQUAL_TO,
537
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
538
+ )
539
+
540
+ sig do
541
+ override.returns(
542
+ T::Array[
543
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Operation::TaggedSymbol
544
+ ]
545
+ )
546
+ end
547
+ def self.values
548
+ end
549
+ end
550
+
551
+ # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
552
+ module Value
553
+ extend Lithic::Internal::Type::Union
554
+
555
+ Variants = T.type_alias { T.any(String, Integer, T::Array[String]) }
556
+
557
+ sig do
558
+ override.returns(
559
+ T::Array[
560
+ Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Value::Variants
561
+ ]
562
+ )
563
+ end
564
+ def self.variants
565
+ end
566
+
567
+ StringArray =
568
+ T.let(
569
+ Lithic::Internal::Type::ArrayOf[String],
570
+ Lithic::Internal::Type::Converter
571
+ )
572
+ end
573
+ end
574
+ end
575
+ end
576
+ end
577
+ end