lithic 0.18.1 → 0.20.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 (174) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +66 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +4 -0
  5. data/lib/lithic/models/account_activity_list_params.rb +2 -0
  6. data/lib/lithic/models/account_activity_list_response.rb +2 -0
  7. data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +2 -0
  8. data/lib/lithic/models/auth_rules/ach_payment_update_action.rb +1 -0
  9. data/lib/lithic/models/auth_rules/card_transaction_update_action.rb +1 -0
  10. data/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +3 -0
  11. data/lib/lithic/models/auth_rules/v2_list_results_response.rb +2 -0
  12. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +24 -1
  13. data/lib/lithic/models/auth_rules/velocity_limit_period.rb +1 -1
  14. data/lib/lithic/models/blockchain_recipient.rb +148 -0
  15. data/lib/lithic/models/blockchain_recipient_create_params.rb +74 -0
  16. data/lib/lithic/models/book_transfer_create_params.rb +4 -0
  17. data/lib/lithic/models/book_transfer_list_params.rb +1 -0
  18. data/lib/lithic/models/book_transfer_response.rb +4 -0
  19. data/lib/lithic/models/card.rb +2 -2
  20. data/lib/lithic/models/card_provision_params.rb +10 -8
  21. data/lib/lithic/models/card_reassign_account_params.rb +29 -0
  22. data/lib/lithic/models/dispute_v2.rb +178 -130
  23. data/lib/lithic/models/disputes_v2_list_params.rb +10 -1
  24. data/lib/lithic/models/embed_session_generated_webhook_event.rb +83 -0
  25. data/lib/lithic/models/embed_viewed_webhook_event.rb +85 -0
  26. data/lib/lithic/models/event.rb +44 -12
  27. data/lib/lithic/models/event_list_params.rb +23 -6
  28. data/lib/lithic/models/event_subscription.rb +23 -6
  29. data/lib/lithic/models/events/subscription_create_params.rb +23 -6
  30. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +2 -0
  31. data/lib/lithic/models/events/subscription_update_params.rb +23 -6
  32. data/lib/lithic/models/external_payment_list_params.rb +3 -3
  33. data/lib/lithic/models/financial_account.rb +14 -1
  34. data/lib/lithic/models/financial_accounts/balance_list_params.rb +4 -3
  35. data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +10 -0
  36. data/lib/lithic/models/financial_event.rb +8 -0
  37. data/lib/lithic/models/fraud/transaction_report_response.rb +8 -8
  38. data/lib/lithic/models/fraud/transaction_retrieve_response.rb +10 -8
  39. data/lib/lithic/models/parsed_webhook_event.rb +5 -1
  40. data/lib/lithic/models/payment.rb +91 -6
  41. data/lib/lithic/models/payment_list_params.rb +1 -0
  42. data/lib/lithic/models/tokenization_simulate_params.rb +2 -2
  43. data/lib/lithic/models/transaction_monitoring/case_entity.rb +13 -4
  44. data/lib/lithic/models/transaction_monitoring/case_list_params.rb +4 -2
  45. data/lib/lithic/models/transaction_monitoring/case_update_params.rb +5 -11
  46. data/lib/lithic/models/transaction_monitoring/monitoring_case.rb +5 -11
  47. data/lib/lithic/models/transaction_monitoring/queue.rb +10 -1
  48. data/lib/lithic/models/transaction_monitoring/queue_create_params.rb +14 -1
  49. data/lib/lithic/models/transaction_monitoring/queue_update_params.rb +15 -1
  50. data/lib/lithic/models/transaction_simulate_clearing_params.rb +4 -3
  51. data/lib/lithic/models.rb +10 -0
  52. data/lib/lithic/resources/blockchain_recipients.rb +57 -0
  53. data/lib/lithic/resources/card_authorizations.rb +1 -1
  54. data/lib/lithic/resources/cards.rb +34 -2
  55. data/lib/lithic/resources/disputes_v2.rb +3 -1
  56. data/lib/lithic/resources/external_payments.rb +1 -1
  57. data/lib/lithic/resources/three_ds/decisioning.rb +1 -1
  58. data/lib/lithic/resources/tokenizations.rb +1 -1
  59. data/lib/lithic/resources/transaction_monitoring/cases.rb +2 -2
  60. data/lib/lithic/resources/transaction_monitoring/queues.rb +12 -2
  61. data/lib/lithic/resources/transactions.rb +4 -3
  62. data/lib/lithic/resources/webhooks.rb +1 -1
  63. data/lib/lithic/version.rb +1 -1
  64. data/lib/lithic.rb +6 -1
  65. data/rbi/lithic/client.rbi +3 -0
  66. data/rbi/lithic/models/account_activity_list_params.rbi +10 -0
  67. data/rbi/lithic/models/account_activity_list_response.rbi +10 -0
  68. data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +10 -0
  69. data/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi +5 -0
  70. data/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi +5 -0
  71. data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +8 -0
  72. data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +10 -0
  73. data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +30 -0
  74. data/rbi/lithic/models/auth_rules/velocity_limit_period.rbi +2 -2
  75. data/rbi/lithic/models/blockchain_recipient.rbi +209 -0
  76. data/rbi/lithic/models/blockchain_recipient_create_params.rbi +102 -0
  77. data/rbi/lithic/models/book_transfer_create_params.rbi +20 -0
  78. data/rbi/lithic/models/book_transfer_list_params.rbi +5 -0
  79. data/rbi/lithic/models/book_transfer_response.rbi +20 -0
  80. data/rbi/lithic/models/card.rbi +2 -2
  81. data/rbi/lithic/models/card_provision_params.rbi +16 -12
  82. data/rbi/lithic/models/card_reassign_account_params.rbi +49 -0
  83. data/rbi/lithic/models/dispute_v2.rbi +285 -181
  84. data/rbi/lithic/models/disputes_v2_list_params.rbi +13 -0
  85. data/rbi/lithic/models/embed_session_generated_webhook_event.rbi +157 -0
  86. data/rbi/lithic/models/embed_viewed_webhook_event.rbi +146 -0
  87. data/rbi/lithic/models/event.rbi +70 -18
  88. data/rbi/lithic/models/event_list_params.rbi +31 -6
  89. data/rbi/lithic/models/event_subscription.rbi +31 -6
  90. data/rbi/lithic/models/events/subscription_create_params.rbi +31 -6
  91. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +10 -0
  92. data/rbi/lithic/models/events/subscription_update_params.rbi +31 -6
  93. data/rbi/lithic/models/external_payment_list_params.rbi +3 -3
  94. data/rbi/lithic/models/financial_account.rbi +12 -0
  95. data/rbi/lithic/models/financial_accounts/balance_list_params.rbi +8 -6
  96. data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +50 -0
  97. data/rbi/lithic/models/financial_event.rbi +34 -0
  98. data/rbi/lithic/models/fraud/transaction_report_response.rbi +16 -29
  99. data/rbi/lithic/models/fraud/transaction_retrieve_response.rbi +16 -29
  100. data/rbi/lithic/models/parsed_webhook_event.rbi +2 -0
  101. data/rbi/lithic/models/payment.rbi +147 -4
  102. data/rbi/lithic/models/payment_list_params.rbi +2 -0
  103. data/rbi/lithic/models/tokenization_simulate_params.rbi +2 -2
  104. data/rbi/lithic/models/transaction_monitoring/case_entity.rbi +27 -5
  105. data/rbi/lithic/models/transaction_monitoring/case_list_params.rbi +6 -2
  106. data/rbi/lithic/models/transaction_monitoring/case_update_params.rbi +8 -33
  107. data/rbi/lithic/models/transaction_monitoring/monitoring_case.rbi +7 -31
  108. data/rbi/lithic/models/transaction_monitoring/queue.rbi +10 -0
  109. data/rbi/lithic/models/transaction_monitoring/queue_create_params.rbi +12 -0
  110. data/rbi/lithic/models/transaction_monitoring/queue_update_params.rbi +14 -0
  111. data/rbi/lithic/models/transaction_simulate_clearing_params.rbi +8 -6
  112. data/rbi/lithic/models.rbi +12 -0
  113. data/rbi/lithic/resources/blockchain_recipients.rbi +51 -0
  114. data/rbi/lithic/resources/card_authorizations.rbi +1 -1
  115. data/rbi/lithic/resources/cards.rbi +30 -6
  116. data/rbi/lithic/resources/disputes_v2.rbi +4 -0
  117. data/rbi/lithic/resources/external_payments.rbi +1 -1
  118. data/rbi/lithic/resources/financial_accounts/balances.rbi +4 -3
  119. data/rbi/lithic/resources/three_ds/decisioning.rbi +1 -1
  120. data/rbi/lithic/resources/tokenizations.rbi +1 -1
  121. data/rbi/lithic/resources/transaction_monitoring/cases.rbi +6 -11
  122. data/rbi/lithic/resources/transaction_monitoring/queues.rbi +11 -0
  123. data/rbi/lithic/resources/transactions.rbi +8 -6
  124. data/rbi/lithic/resources/webhooks.rbi +2 -0
  125. data/sig/lithic/client.rbs +2 -0
  126. data/sig/lithic/models/account_activity_list_params.rbs +4 -0
  127. data/sig/lithic/models/account_activity_list_response.rbs +4 -0
  128. data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +4 -0
  129. data/sig/lithic/models/auth_rules/ach_payment_update_action.rbs +2 -1
  130. data/sig/lithic/models/auth_rules/card_transaction_update_action.rbs +2 -1
  131. data/sig/lithic/models/auth_rules/conditional_ach_action_parameters.rbs +2 -0
  132. data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +4 -2
  133. data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +10 -0
  134. data/sig/lithic/models/blockchain_recipient.rbs +106 -0
  135. data/sig/lithic/models/blockchain_recipient_create_params.rbs +60 -0
  136. data/sig/lithic/models/book_transfer_create_params.rbs +8 -0
  137. data/sig/lithic/models/book_transfer_list_params.rbs +2 -0
  138. data/sig/lithic/models/book_transfer_response.rbs +8 -0
  139. data/sig/lithic/models/card_reassign_account_params.rbs +28 -0
  140. data/sig/lithic/models/dispute_v2.rbs +145 -101
  141. data/sig/lithic/models/disputes_v2_list_params.rbs +7 -0
  142. data/sig/lithic/models/embed_session_generated_webhook_event.rbs +66 -0
  143. data/sig/lithic/models/embed_viewed_webhook_event.rbs +68 -0
  144. data/sig/lithic/models/event.rbs +4 -0
  145. data/sig/lithic/models/event_list_params.rbs +4 -0
  146. data/sig/lithic/models/event_subscription.rbs +4 -0
  147. data/sig/lithic/models/events/subscription_create_params.rbs +4 -0
  148. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +4 -0
  149. data/sig/lithic/models/events/subscription_update_params.rbs +4 -0
  150. data/sig/lithic/models/financial_account.rbs +5 -0
  151. data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +20 -0
  152. data/sig/lithic/models/financial_event.rbs +16 -0
  153. data/sig/lithic/models/fraud/transaction_report_response.rbs +16 -26
  154. data/sig/lithic/models/fraud/transaction_retrieve_response.rbs +16 -26
  155. data/sig/lithic/models/parsed_webhook_event.rbs +2 -0
  156. data/sig/lithic/models/payment.rbs +46 -1
  157. data/sig/lithic/models/payment_list_params.rbs +2 -1
  158. data/sig/lithic/models/transaction_monitoring/case_entity.rbs +7 -5
  159. data/sig/lithic/models/transaction_monitoring/case_update_params.rbs +5 -7
  160. data/sig/lithic/models/transaction_monitoring/monitoring_case.rbs +4 -4
  161. data/sig/lithic/models/transaction_monitoring/queue.rbs +5 -0
  162. data/sig/lithic/models/transaction_monitoring/queue_create_params.rbs +9 -1
  163. data/sig/lithic/models/transaction_monitoring/queue_update_params.rbs +10 -1
  164. data/sig/lithic/models.rbs +10 -0
  165. data/sig/lithic/resources/blockchain_recipients.rbs +18 -0
  166. data/sig/lithic/resources/cards.rbs +6 -0
  167. data/sig/lithic/resources/disputes_v2.rbs +1 -0
  168. data/sig/lithic/resources/transaction_monitoring/cases.rbs +1 -1
  169. data/sig/lithic/resources/transaction_monitoring/queues.rbs +2 -0
  170. data/sig/lithic/resources/webhooks.rbs +2 -0
  171. metadata +20 -5
  172. data/lib/lithic/models/transaction_monitoring/resolution_outcome.rb +0 -28
  173. data/rbi/lithic/models/transaction_monitoring/resolution_outcome.rbi +0 -61
  174. data/sig/lithic/models/transaction_monitoring/resolution_outcome.rbs +0 -24
@@ -22,6 +22,11 @@ module Lithic
22
22
  sig { returns(T.nilable(String)) }
23
23
  attr_accessor :case_id
24
24
 
25
+ # Token for the claim this dispute was filed under, in UUID format. Null for
26
+ # disputes not initiated through the Dispute Intake API.
27
+ sig { returns(T.nilable(String)) }
28
+ attr_accessor :claim_token
29
+
25
30
  # When the dispute was created.
26
31
  sig { returns(Time) }
27
32
  attr_accessor :created
@@ -35,7 +40,7 @@ module Lithic
35
40
  attr_accessor :disposition
36
41
 
37
42
  # Chronological list of events that have occurred in the dispute lifecycle
38
- sig { returns(T::Array[Lithic::DisputeV2::Event]) }
43
+ sig { returns(T::Array[Lithic::DisputeV2::Event::Variants]) }
39
44
  attr_accessor :events
40
45
 
41
46
  # Current breakdown of how liability is allocated for the disputed amount
@@ -87,10 +92,18 @@ module Lithic
87
92
  account_token: String,
88
93
  card_token: String,
89
94
  case_id: T.nilable(String),
95
+ claim_token: T.nilable(String),
90
96
  created: Time,
91
97
  currency: String,
92
98
  disposition: T.nilable(Lithic::DisputeV2::Disposition::OrSymbol),
93
- events: T::Array[Lithic::DisputeV2::Event::OrHash],
99
+ events:
100
+ T::Array[
101
+ T.any(
102
+ Lithic::DisputeV2::Event::Workflow::OrHash,
103
+ Lithic::DisputeV2::Event::Financial::OrHash,
104
+ Lithic::DisputeV2::Event::CardholderLiability::OrHash
105
+ )
106
+ ],
94
107
  liability_allocation: Lithic::DisputeV2::LiabilityAllocation::OrHash,
95
108
  merchant: Lithic::Merchant::OrHash,
96
109
  network: Lithic::DisputeV2::Network::OrSymbol,
@@ -109,6 +122,9 @@ module Lithic
109
122
  card_token:,
110
123
  # Identifier assigned by the network for this dispute.
111
124
  case_id:,
125
+ # Token for the claim this dispute was filed under, in UUID format. Null for
126
+ # disputes not initiated through the Dispute Intake API.
127
+ claim_token:,
112
128
  # When the dispute was created.
113
129
  created:,
114
130
  # Three-letter ISO 4217 currency code.
@@ -139,11 +155,12 @@ module Lithic
139
155
  account_token: String,
140
156
  card_token: String,
141
157
  case_id: T.nilable(String),
158
+ claim_token: T.nilable(String),
142
159
  created: Time,
143
160
  currency: String,
144
161
  disposition:
145
162
  T.nilable(Lithic::DisputeV2::Disposition::TaggedSymbol),
146
- events: T::Array[Lithic::DisputeV2::Event],
163
+ events: T::Array[Lithic::DisputeV2::Event::Variants],
147
164
  liability_allocation: Lithic::DisputeV2::LiabilityAllocation,
148
165
  merchant: Lithic::Merchant,
149
166
  network: Lithic::DisputeV2::Network::TaggedSymbol,
@@ -181,85 +198,89 @@ module Lithic
181
198
  end
182
199
  end
183
200
 
184
- class Event < Lithic::Internal::Type::BaseModel
185
- OrHash =
201
+ # Event that occurred in the dispute lifecycle. The `type` field identifies the
202
+ # event variant and determines the shape of `data`
203
+ module Event
204
+ extend Lithic::Internal::Type::Union
205
+
206
+ Variants =
186
207
  T.type_alias do
187
- T.any(Lithic::DisputeV2::Event, Lithic::Internal::AnyHash)
208
+ T.any(
209
+ Lithic::DisputeV2::Event::Workflow,
210
+ Lithic::DisputeV2::Event::Financial,
211
+ Lithic::DisputeV2::Event::CardholderLiability
212
+ )
188
213
  end
189
214
 
190
- # Unique identifier for the event, in UUID format
191
- sig { returns(String) }
192
- attr_accessor :token
215
+ class Workflow < Lithic::Internal::Type::BaseModel
216
+ OrHash =
217
+ T.type_alias do
218
+ T.any(
219
+ Lithic::DisputeV2::Event::Workflow,
220
+ Lithic::Internal::AnyHash
221
+ )
222
+ end
193
223
 
194
- # When the event occurred
195
- sig { returns(Time) }
196
- attr_accessor :created
224
+ # Unique identifier for the event, in UUID format
225
+ sig { returns(String) }
226
+ attr_accessor :token
197
227
 
198
- # Details specific to the event type
199
- sig { returns(Lithic::DisputeV2::Event::Data::Variants) }
200
- attr_accessor :data
228
+ # When the event occurred
229
+ sig { returns(Time) }
230
+ attr_accessor :created
201
231
 
202
- # Type of event
203
- sig { returns(Lithic::DisputeV2::Event::Type::TaggedSymbol) }
204
- attr_accessor :type
232
+ # Details specific to workflow events
233
+ sig { returns(Lithic::DisputeV2::Event::Workflow::Data) }
234
+ attr_reader :data
205
235
 
206
- # Event that occurred in the dispute lifecycle
207
- sig do
208
- params(
209
- token: String,
210
- created: Time,
211
- data:
212
- T.any(
213
- Lithic::DisputeV2::Event::Data::Workflow::OrHash,
214
- Lithic::DisputeV2::Event::Data::Financial::OrHash,
215
- Lithic::DisputeV2::Event::Data::CardholderLiability::OrHash
216
- ),
217
- type: Lithic::DisputeV2::Event::Type::OrSymbol
218
- ).returns(T.attached_class)
219
- end
220
- def self.new(
221
- # Unique identifier for the event, in UUID format
222
- token:,
223
- # When the event occurred
224
- created:,
225
- # Details specific to the event type
226
- data:,
227
- # Type of event
228
- type:
229
- )
230
- end
236
+ sig do
237
+ params(data: Lithic::DisputeV2::Event::Workflow::Data::OrHash).void
238
+ end
239
+ attr_writer :data
231
240
 
232
- sig do
233
- override.returns(
234
- {
241
+ # Type of event. Always `WORKFLOW`
242
+ sig { returns(Symbol) }
243
+ attr_accessor :type
244
+
245
+ # Event tracking the dispute's case management workflow
246
+ sig do
247
+ params(
235
248
  token: String,
236
249
  created: Time,
237
- data: Lithic::DisputeV2::Event::Data::Variants,
238
- type: Lithic::DisputeV2::Event::Type::TaggedSymbol
239
- }
250
+ data: Lithic::DisputeV2::Event::Workflow::Data::OrHash,
251
+ type: Symbol
252
+ ).returns(T.attached_class)
253
+ end
254
+ def self.new(
255
+ # Unique identifier for the event, in UUID format
256
+ token:,
257
+ # When the event occurred
258
+ created:,
259
+ # Details specific to workflow events
260
+ data:,
261
+ # Type of event. Always `WORKFLOW`
262
+ type: :WORKFLOW
240
263
  )
241
- end
242
- def to_hash
243
- end
244
-
245
- # Details specific to the event type
246
- module Data
247
- extend Lithic::Internal::Type::Union
264
+ end
248
265
 
249
- Variants =
250
- T.type_alias do
251
- T.any(
252
- Lithic::DisputeV2::Event::Data::Workflow,
253
- Lithic::DisputeV2::Event::Data::Financial,
254
- Lithic::DisputeV2::Event::Data::CardholderLiability
255
- )
256
- end
266
+ sig do
267
+ override.returns(
268
+ {
269
+ token: String,
270
+ created: Time,
271
+ data: Lithic::DisputeV2::Event::Workflow::Data,
272
+ type: Symbol
273
+ }
274
+ )
275
+ end
276
+ def to_hash
277
+ end
257
278
 
258
- class Workflow < Lithic::Internal::Type::BaseModel
279
+ class Data < Lithic::Internal::Type::BaseModel
259
280
  OrHash =
260
281
  T.type_alias do
261
282
  T.any(
262
- Lithic::DisputeV2::Event::Data::Workflow,
283
+ Lithic::DisputeV2::Event::Workflow::Data,
263
284
  Lithic::Internal::AnyHash
264
285
  )
265
286
  end
@@ -267,7 +288,7 @@ module Lithic
267
288
  # Action taken in this stage
268
289
  sig do
269
290
  returns(
270
- Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol
291
+ Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol
271
292
  )
272
293
  end
273
294
  attr_accessor :action
@@ -280,7 +301,7 @@ module Lithic
280
301
  sig do
281
302
  returns(
282
303
  T.nilable(
283
- Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol
304
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol
284
305
  )
285
306
  )
286
307
  end
@@ -293,29 +314,23 @@ module Lithic
293
314
  # Current stage of the dispute workflow
294
315
  sig do
295
316
  returns(
296
- Lithic::DisputeV2::Event::Data::Workflow::Stage::TaggedSymbol
317
+ Lithic::DisputeV2::Event::Workflow::Data::Stage::TaggedSymbol
297
318
  )
298
319
  end
299
320
  attr_accessor :stage
300
321
 
301
- # Event type discriminator
302
- sig { returns(Symbol) }
303
- attr_accessor :type
304
-
305
322
  # Details specific to workflow events
306
323
  sig do
307
324
  params(
308
325
  action:
309
- Lithic::DisputeV2::Event::Data::Workflow::Action::OrSymbol,
326
+ Lithic::DisputeV2::Event::Workflow::Data::Action::OrSymbol,
310
327
  amount: T.nilable(Integer),
311
328
  disposition:
312
329
  T.nilable(
313
- Lithic::DisputeV2::Event::Data::Workflow::Disposition::OrSymbol
330
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition::OrSymbol
314
331
  ),
315
332
  reason: T.nilable(String),
316
- stage:
317
- Lithic::DisputeV2::Event::Data::Workflow::Stage::OrSymbol,
318
- type: Symbol
333
+ stage: Lithic::DisputeV2::Event::Workflow::Data::Stage::OrSymbol
319
334
  ).returns(T.attached_class)
320
335
  end
321
336
  def self.new(
@@ -328,9 +343,7 @@ module Lithic
328
343
  # Reason for the action
329
344
  reason:,
330
345
  # Current stage of the dispute workflow
331
- stage:,
332
- # Event type discriminator
333
- type: :WORKFLOW
346
+ stage:
334
347
  )
335
348
  end
336
349
 
@@ -338,16 +351,15 @@ module Lithic
338
351
  override.returns(
339
352
  {
340
353
  action:
341
- Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol,
354
+ Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol,
342
355
  amount: T.nilable(Integer),
343
356
  disposition:
344
357
  T.nilable(
345
- Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol
358
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol
346
359
  ),
347
360
  reason: T.nilable(String),
348
361
  stage:
349
- Lithic::DisputeV2::Event::Data::Workflow::Stage::TaggedSymbol,
350
- type: Symbol
362
+ Lithic::DisputeV2::Event::Workflow::Data::Stage::TaggedSymbol
351
363
  }
352
364
  )
353
365
  end
@@ -362,7 +374,7 @@ module Lithic
362
374
  T.type_alias do
363
375
  T.all(
364
376
  Symbol,
365
- Lithic::DisputeV2::Event::Data::Workflow::Action
377
+ Lithic::DisputeV2::Event::Workflow::Data::Action
366
378
  )
367
379
  end
368
380
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -370,23 +382,23 @@ module Lithic
370
382
  OPENED =
371
383
  T.let(
372
384
  :OPENED,
373
- Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol
385
+ Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol
374
386
  )
375
387
  CLOSED =
376
388
  T.let(
377
389
  :CLOSED,
378
- Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol
390
+ Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol
379
391
  )
380
392
  REOPENED =
381
393
  T.let(
382
394
  :REOPENED,
383
- Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol
395
+ Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol
384
396
  )
385
397
 
386
398
  sig do
387
399
  override.returns(
388
400
  T::Array[
389
- Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol
401
+ Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol
390
402
  ]
391
403
  )
392
404
  end
@@ -402,7 +414,7 @@ module Lithic
402
414
  T.type_alias do
403
415
  T.all(
404
416
  Symbol,
405
- Lithic::DisputeV2::Event::Data::Workflow::Disposition
417
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition
406
418
  )
407
419
  end
408
420
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -410,33 +422,33 @@ module Lithic
410
422
  WON =
411
423
  T.let(
412
424
  :WON,
413
- Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol
425
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol
414
426
  )
415
427
  LOST =
416
428
  T.let(
417
429
  :LOST,
418
- Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol
430
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol
419
431
  )
420
432
  PARTIALLY_WON =
421
433
  T.let(
422
434
  :PARTIALLY_WON,
423
- Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol
435
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol
424
436
  )
425
437
  WITHDRAWN =
426
438
  T.let(
427
439
  :WITHDRAWN,
428
- Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol
440
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol
429
441
  )
430
442
  DENIED =
431
443
  T.let(
432
444
  :DENIED,
433
- Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol
445
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol
434
446
  )
435
447
 
436
448
  sig do
437
449
  override.returns(
438
450
  T::Array[
439
- Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol
451
+ Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol
440
452
  ]
441
453
  )
442
454
  end
@@ -450,20 +462,20 @@ module Lithic
450
462
 
451
463
  TaggedSymbol =
452
464
  T.type_alias do
453
- T.all(Symbol, Lithic::DisputeV2::Event::Data::Workflow::Stage)
465
+ T.all(Symbol, Lithic::DisputeV2::Event::Workflow::Data::Stage)
454
466
  end
455
467
  OrSymbol = T.type_alias { T.any(Symbol, String) }
456
468
 
457
469
  CLAIM =
458
470
  T.let(
459
471
  :CLAIM,
460
- Lithic::DisputeV2::Event::Data::Workflow::Stage::TaggedSymbol
472
+ Lithic::DisputeV2::Event::Workflow::Data::Stage::TaggedSymbol
461
473
  )
462
474
 
463
475
  sig do
464
476
  override.returns(
465
477
  T::Array[
466
- Lithic::DisputeV2::Event::Data::Workflow::Stage::TaggedSymbol
478
+ Lithic::DisputeV2::Event::Workflow::Data::Stage::TaggedSymbol
467
479
  ]
468
480
  )
469
481
  end
@@ -471,12 +483,77 @@ module Lithic
471
483
  end
472
484
  end
473
485
  end
486
+ end
487
+
488
+ class Financial < Lithic::Internal::Type::BaseModel
489
+ OrHash =
490
+ T.type_alias do
491
+ T.any(
492
+ Lithic::DisputeV2::Event::Financial,
493
+ Lithic::Internal::AnyHash
494
+ )
495
+ end
496
+
497
+ # Unique identifier for the event, in UUID format
498
+ sig { returns(String) }
499
+ attr_accessor :token
500
+
501
+ # When the event occurred
502
+ sig { returns(Time) }
503
+ attr_accessor :created
504
+
505
+ # Details specific to financial events
506
+ sig { returns(Lithic::DisputeV2::Event::Financial::Data) }
507
+ attr_reader :data
508
+
509
+ sig do
510
+ params(data: Lithic::DisputeV2::Event::Financial::Data::OrHash).void
511
+ end
512
+ attr_writer :data
513
+
514
+ # Type of event. Always `FINANCIAL`
515
+ sig { returns(Symbol) }
516
+ attr_accessor :type
517
+
518
+ # Event tracking a funds movement between issuer and acquirer
519
+ sig do
520
+ params(
521
+ token: String,
522
+ created: Time,
523
+ data: Lithic::DisputeV2::Event::Financial::Data::OrHash,
524
+ type: Symbol
525
+ ).returns(T.attached_class)
526
+ end
527
+ def self.new(
528
+ # Unique identifier for the event, in UUID format
529
+ token:,
530
+ # When the event occurred
531
+ created:,
532
+ # Details specific to financial events
533
+ data:,
534
+ # Type of event. Always `FINANCIAL`
535
+ type: :FINANCIAL
536
+ )
537
+ end
538
+
539
+ sig do
540
+ override.returns(
541
+ {
542
+ token: String,
543
+ created: Time,
544
+ data: Lithic::DisputeV2::Event::Financial::Data,
545
+ type: Symbol
546
+ }
547
+ )
548
+ end
549
+ def to_hash
550
+ end
474
551
 
475
- class Financial < Lithic::Internal::Type::BaseModel
552
+ class Data < Lithic::Internal::Type::BaseModel
476
553
  OrHash =
477
554
  T.type_alias do
478
555
  T.any(
479
- Lithic::DisputeV2::Event::Data::Financial,
556
+ Lithic::DisputeV2::Event::Financial::Data,
480
557
  Lithic::Internal::AnyHash
481
558
  )
482
559
  end
@@ -488,7 +565,7 @@ module Lithic
488
565
  # Direction of funds flow
489
566
  sig do
490
567
  returns(
491
- Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol
568
+ Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol
492
569
  )
493
570
  end
494
571
  attr_accessor :polarity
@@ -496,24 +573,19 @@ module Lithic
496
573
  # Stage at which the financial event occurred
497
574
  sig do
498
575
  returns(
499
- Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol
576
+ Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol
500
577
  )
501
578
  end
502
579
  attr_accessor :stage
503
580
 
504
- # Event type discriminator
505
- sig { returns(Symbol) }
506
- attr_accessor :type
507
-
508
581
  # Details specific to financial events
509
582
  sig do
510
583
  params(
511
584
  amount: Integer,
512
585
  polarity:
513
- Lithic::DisputeV2::Event::Data::Financial::Polarity::OrSymbol,
586
+ Lithic::DisputeV2::Event::Financial::Data::Polarity::OrSymbol,
514
587
  stage:
515
- Lithic::DisputeV2::Event::Data::Financial::Stage::OrSymbol,
516
- type: Symbol
588
+ Lithic::DisputeV2::Event::Financial::Data::Stage::OrSymbol
517
589
  ).returns(T.attached_class)
518
590
  end
519
591
  def self.new(
@@ -522,9 +594,7 @@ module Lithic
522
594
  # Direction of funds flow
523
595
  polarity:,
524
596
  # Stage at which the financial event occurred
525
- stage:,
526
- # Event type discriminator
527
- type: :FINANCIAL
597
+ stage:
528
598
  )
529
599
  end
530
600
 
@@ -533,10 +603,9 @@ module Lithic
533
603
  {
534
604
  amount: Integer,
535
605
  polarity:
536
- Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol,
606
+ Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol,
537
607
  stage:
538
- Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol,
539
- type: Symbol
608
+ Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol
540
609
  }
541
610
  )
542
611
  end
@@ -551,7 +620,7 @@ module Lithic
551
620
  T.type_alias do
552
621
  T.all(
553
622
  Symbol,
554
- Lithic::DisputeV2::Event::Data::Financial::Polarity
623
+ Lithic::DisputeV2::Event::Financial::Data::Polarity
555
624
  )
556
625
  end
557
626
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -559,18 +628,18 @@ module Lithic
559
628
  CREDIT =
560
629
  T.let(
561
630
  :CREDIT,
562
- Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol
631
+ Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol
563
632
  )
564
633
  DEBIT =
565
634
  T.let(
566
635
  :DEBIT,
567
- Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol
636
+ Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol
568
637
  )
569
638
 
570
639
  sig do
571
640
  override.returns(
572
641
  T::Array[
573
- Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol
642
+ Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol
574
643
  ]
575
644
  )
576
645
  end
@@ -586,7 +655,7 @@ module Lithic
586
655
  T.type_alias do
587
656
  T.all(
588
657
  Symbol,
589
- Lithic::DisputeV2::Event::Data::Financial::Stage
658
+ Lithic::DisputeV2::Event::Financial::Data::Stage
590
659
  )
591
660
  end
592
661
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -594,33 +663,33 @@ module Lithic
594
663
  CHARGEBACK =
595
664
  T.let(
596
665
  :CHARGEBACK,
597
- Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol
666
+ Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol
598
667
  )
599
668
  REPRESENTMENT =
600
669
  T.let(
601
670
  :REPRESENTMENT,
602
- Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol
671
+ Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol
603
672
  )
604
673
  PREARBITRATION =
605
674
  T.let(
606
675
  :PREARBITRATION,
607
- Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol
676
+ Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol
608
677
  )
609
678
  ARBITRATION =
610
679
  T.let(
611
680
  :ARBITRATION,
612
- Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol
681
+ Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol
613
682
  )
614
683
  COLLABORATION =
615
684
  T.let(
616
685
  :COLLABORATION,
617
- Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol
686
+ Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol
618
687
  )
619
688
 
620
689
  sig do
621
690
  override.returns(
622
691
  T::Array[
623
- Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol
692
+ Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol
624
693
  ]
625
694
  )
626
695
  end
@@ -628,12 +697,79 @@ module Lithic
628
697
  end
629
698
  end
630
699
  end
700
+ end
701
+
702
+ class CardholderLiability < Lithic::Internal::Type::BaseModel
703
+ OrHash =
704
+ T.type_alias do
705
+ T.any(
706
+ Lithic::DisputeV2::Event::CardholderLiability,
707
+ Lithic::Internal::AnyHash
708
+ )
709
+ end
710
+
711
+ # Unique identifier for the event, in UUID format
712
+ sig { returns(String) }
713
+ attr_accessor :token
714
+
715
+ # When the event occurred
716
+ sig { returns(Time) }
717
+ attr_accessor :created
718
+
719
+ # Details specific to cardholder liability events
720
+ sig { returns(Lithic::DisputeV2::Event::CardholderLiability::Data) }
721
+ attr_reader :data
722
+
723
+ sig do
724
+ params(
725
+ data: Lithic::DisputeV2::Event::CardholderLiability::Data::OrHash
726
+ ).void
727
+ end
728
+ attr_writer :data
729
+
730
+ # Type of event. Always `CARDHOLDER_LIABILITY`
731
+ sig { returns(Symbol) }
732
+ attr_accessor :type
733
+
734
+ # Event tracking a change in cardholder liability
735
+ sig do
736
+ params(
737
+ token: String,
738
+ created: Time,
739
+ data: Lithic::DisputeV2::Event::CardholderLiability::Data::OrHash,
740
+ type: Symbol
741
+ ).returns(T.attached_class)
742
+ end
743
+ def self.new(
744
+ # Unique identifier for the event, in UUID format
745
+ token:,
746
+ # When the event occurred
747
+ created:,
748
+ # Details specific to cardholder liability events
749
+ data:,
750
+ # Type of event. Always `CARDHOLDER_LIABILITY`
751
+ type: :CARDHOLDER_LIABILITY
752
+ )
753
+ end
754
+
755
+ sig do
756
+ override.returns(
757
+ {
758
+ token: String,
759
+ created: Time,
760
+ data: Lithic::DisputeV2::Event::CardholderLiability::Data,
761
+ type: Symbol
762
+ }
763
+ )
764
+ end
765
+ def to_hash
766
+ end
631
767
 
632
- class CardholderLiability < Lithic::Internal::Type::BaseModel
768
+ class Data < Lithic::Internal::Type::BaseModel
633
769
  OrHash =
634
770
  T.type_alias do
635
771
  T.any(
636
- Lithic::DisputeV2::Event::Data::CardholderLiability,
772
+ Lithic::DisputeV2::Event::CardholderLiability::Data,
637
773
  Lithic::Internal::AnyHash
638
774
  )
639
775
  end
@@ -641,7 +777,7 @@ module Lithic
641
777
  # Action taken regarding cardholder liability
642
778
  sig do
643
779
  returns(
644
- Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol
780
+ Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol
645
781
  )
646
782
  end
647
783
  attr_accessor :action
@@ -651,21 +787,16 @@ module Lithic
651
787
  attr_accessor :amount
652
788
 
653
789
  # Reason for the action
654
- sig { returns(String) }
790
+ sig { returns(T.nilable(String)) }
655
791
  attr_accessor :reason
656
792
 
657
- # Event type discriminator
658
- sig { returns(Symbol) }
659
- attr_accessor :type
660
-
661
793
  # Details specific to cardholder liability events
662
794
  sig do
663
795
  params(
664
796
  action:
665
- Lithic::DisputeV2::Event::Data::CardholderLiability::Action::OrSymbol,
797
+ Lithic::DisputeV2::Event::CardholderLiability::Data::Action::OrSymbol,
666
798
  amount: Integer,
667
- reason: String,
668
- type: Symbol
799
+ reason: T.nilable(String)
669
800
  ).returns(T.attached_class)
670
801
  end
671
802
  def self.new(
@@ -674,9 +805,7 @@ module Lithic
674
805
  # Amount in minor units
675
806
  amount:,
676
807
  # Reason for the action
677
- reason:,
678
- # Event type discriminator
679
- type: :CARDHOLDER_LIABILITY
808
+ reason:
680
809
  )
681
810
  end
682
811
 
@@ -684,10 +813,9 @@ module Lithic
684
813
  override.returns(
685
814
  {
686
815
  action:
687
- Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol,
816
+ Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol,
688
817
  amount: Integer,
689
- reason: String,
690
- type: Symbol
818
+ reason: T.nilable(String)
691
819
  }
692
820
  )
693
821
  end
@@ -702,7 +830,7 @@ module Lithic
702
830
  T.type_alias do
703
831
  T.all(
704
832
  Symbol,
705
- Lithic::DisputeV2::Event::Data::CardholderLiability::Action
833
+ Lithic::DisputeV2::Event::CardholderLiability::Data::Action
706
834
  )
707
835
  end
708
836
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -710,23 +838,28 @@ module Lithic
710
838
  PROVISIONAL_CREDIT_GRANTED =
711
839
  T.let(
712
840
  :PROVISIONAL_CREDIT_GRANTED,
713
- Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol
841
+ Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol
714
842
  )
715
843
  PROVISIONAL_CREDIT_REVERSED =
716
844
  T.let(
717
845
  :PROVISIONAL_CREDIT_REVERSED,
718
- Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol
846
+ Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol
719
847
  )
720
848
  WRITTEN_OFF =
721
849
  T.let(
722
850
  :WRITTEN_OFF,
723
- Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol
851
+ Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol
852
+ )
853
+ WRITE_OFF_REVERSED =
854
+ T.let(
855
+ :WRITE_OFF_REVERSED,
856
+ Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol
724
857
  )
725
858
 
726
859
  sig do
727
860
  override.returns(
728
861
  T::Array[
729
- Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol
862
+ Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol
730
863
  ]
731
864
  )
732
865
  end
@@ -734,39 +867,10 @@ module Lithic
734
867
  end
735
868
  end
736
869
  end
737
-
738
- sig do
739
- override.returns(T::Array[Lithic::DisputeV2::Event::Data::Variants])
740
- end
741
- def self.variants
742
- end
743
870
  end
744
871
 
745
- # Type of event
746
- module Type
747
- extend Lithic::Internal::Type::Enum
748
-
749
- TaggedSymbol =
750
- T.type_alias { T.all(Symbol, Lithic::DisputeV2::Event::Type) }
751
- OrSymbol = T.type_alias { T.any(Symbol, String) }
752
-
753
- WORKFLOW =
754
- T.let(:WORKFLOW, Lithic::DisputeV2::Event::Type::TaggedSymbol)
755
- FINANCIAL =
756
- T.let(:FINANCIAL, Lithic::DisputeV2::Event::Type::TaggedSymbol)
757
- CARDHOLDER_LIABILITY =
758
- T.let(
759
- :CARDHOLDER_LIABILITY,
760
- Lithic::DisputeV2::Event::Type::TaggedSymbol
761
- )
762
-
763
- sig do
764
- override.returns(
765
- T::Array[Lithic::DisputeV2::Event::Type::TaggedSymbol]
766
- )
767
- end
768
- def self.values
769
- end
872
+ sig { override.returns(T::Array[Lithic::DisputeV2::Event::Variants]) }
873
+ def self.variants
770
874
  end
771
875
  end
772
876