lithic 0.1.0.pre.alpha.40 → 0.1.0.pre.alpha.42

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