lithic 0.23.0 → 0.24.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 (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/models/account_activity_list_params.rb +3 -3
  5. data/lib/lithic/models/account_holder_list_params.rb +3 -3
  6. data/lib/lithic/models/account_list_params.rb +3 -3
  7. data/lib/lithic/models/account_update_params.rb +10 -7
  8. data/lib/lithic/models/auth_rules/auth_rule.rb +6 -10
  9. data/lib/lithic/models/auth_rules/auth_rule_version.rb +3 -5
  10. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +91 -8
  11. data/lib/lithic/models/auth_rules/v2/backtest_results.rb +9 -1
  12. data/lib/lithic/models/auth_rules/v2_create_params.rb +12 -20
  13. data/lib/lithic/models/auth_rules/v2_draft_params.rb +3 -5
  14. data/lib/lithic/models/auth_rules/v2_list_results_params.rb +3 -3
  15. data/lib/lithic/models/book_transfer_list_params.rb +3 -3
  16. data/lib/lithic/models/card_bulk_order_list_params.rb +3 -3
  17. data/lib/lithic/models/card_list_params.rb +3 -3
  18. data/lib/lithic/models/cards/financial_transaction_list_params.rb +3 -3
  19. data/lib/lithic/models/dispute_list_evidences_params.rb +3 -3
  20. data/lib/lithic/models/dispute_list_params.rb +3 -3
  21. data/lib/lithic/models/event_list_attempts_params.rb +3 -3
  22. data/lib/lithic/models/event_list_params.rb +3 -3
  23. data/lib/lithic/models/events/subscription_list_attempts_params.rb +3 -3
  24. data/lib/lithic/models/events/subscription_recover_params.rb +3 -3
  25. data/lib/lithic/models/events/subscription_replay_missing_params.rb +3 -3
  26. data/lib/lithic/models/external_payment_list_params.rb +3 -3
  27. data/lib/lithic/models/financial_accounts/financial_transaction_list_params.rb +3 -3
  28. data/lib/lithic/models/financial_accounts/installment_plan.rb +33 -3
  29. data/lib/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rb +95 -15
  30. data/lib/lithic/models/financial_accounts/installment_plans/statement_list_params.rb +3 -3
  31. data/lib/lithic/models/financial_accounts/loan_tape_list_params.rb +3 -3
  32. data/lib/lithic/models/financial_accounts/statement_list_params.rb +3 -3
  33. data/lib/lithic/models/funding_event_list_params.rb +3 -3
  34. data/lib/lithic/models/hold_list_params.rb +3 -3
  35. data/lib/lithic/models/kyb.rb +2 -0
  36. data/lib/lithic/models/management_operation_create_params.rb +7 -19
  37. data/lib/lithic/models/management_operation_list_params.rb +3 -3
  38. data/lib/lithic/models/network_program_list_params.rb +3 -3
  39. data/lib/lithic/models/payment_list_params.rb +3 -3
  40. data/lib/lithic/models/reports/settlement/network_total_list_params.rb +3 -3
  41. data/lib/lithic/models/three_ds_authentication.rb +12 -1
  42. data/lib/lithic/models/three_ds_authentication_challenge_webhook_event.rb +13 -1
  43. data/lib/lithic/models/tokenization.rb +44 -1
  44. data/lib/lithic/models/tokenization_list_params.rb +3 -2
  45. data/lib/lithic/models/transaction_list_params.rb +3 -3
  46. data/lib/lithic/models/transaction_monitoring/case_list_params.rb +3 -3
  47. data/lib/lithic/resources/account_activity.rb +1 -1
  48. data/lib/lithic/resources/account_holders.rb +1 -1
  49. data/lib/lithic/resources/accounts.rb +1 -1
  50. data/lib/lithic/resources/auth_rules/v2.rb +2 -2
  51. data/lib/lithic/resources/book_transfers.rb +1 -1
  52. data/lib/lithic/resources/card_bulk_orders.rb +1 -1
  53. data/lib/lithic/resources/cards/financial_transactions.rb +1 -1
  54. data/lib/lithic/resources/cards.rb +1 -1
  55. data/lib/lithic/resources/disputes.rb +2 -2
  56. data/lib/lithic/resources/events/subscriptions.rb +7 -7
  57. data/lib/lithic/resources/events.rb +2 -2
  58. data/lib/lithic/resources/external_payments.rb +1 -1
  59. data/lib/lithic/resources/financial_accounts/financial_transactions.rb +1 -1
  60. data/lib/lithic/resources/financial_accounts/installment_plans/statements.rb +1 -1
  61. data/lib/lithic/resources/financial_accounts/loan_tapes.rb +1 -1
  62. data/lib/lithic/resources/financial_accounts/statements.rb +1 -1
  63. data/lib/lithic/resources/funding_events.rb +1 -1
  64. data/lib/lithic/resources/holds.rb +1 -1
  65. data/lib/lithic/resources/management_operations.rb +3 -3
  66. data/lib/lithic/resources/network_programs.rb +1 -1
  67. data/lib/lithic/resources/payments.rb +1 -1
  68. data/lib/lithic/resources/reports/settlement/network_totals.rb +1 -1
  69. data/lib/lithic/resources/tokenizations.rb +1 -1
  70. data/lib/lithic/resources/transaction_monitoring/cases.rb +1 -1
  71. data/lib/lithic/resources/transactions.rb +1 -1
  72. data/lib/lithic/version.rb +1 -1
  73. data/lib/lithic.rb +0 -1
  74. data/rbi/lithic/models/account_activity_list_params.rbi +4 -4
  75. data/rbi/lithic/models/account_holder_list_params.rbi +4 -4
  76. data/rbi/lithic/models/account_list_params.rbi +4 -4
  77. data/rbi/lithic/models/account_update_params.rbi +20 -14
  78. data/rbi/lithic/models/auth_rules/auth_rule.rbi +4 -8
  79. data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +2 -4
  80. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +200 -20
  81. data/rbi/lithic/models/auth_rules/v2/backtest_results.rbi +8 -0
  82. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +16 -32
  83. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +4 -8
  84. data/rbi/lithic/models/auth_rules/v2_list_results_params.rbi +4 -4
  85. data/rbi/lithic/models/book_transfer_list_params.rbi +4 -4
  86. data/rbi/lithic/models/card_bulk_order_list_params.rbi +4 -4
  87. data/rbi/lithic/models/card_list_params.rbi +4 -4
  88. data/rbi/lithic/models/cards/financial_transaction_list_params.rbi +4 -4
  89. data/rbi/lithic/models/dispute_list_evidences_params.rbi +4 -4
  90. data/rbi/lithic/models/dispute_list_params.rbi +4 -4
  91. data/rbi/lithic/models/event_list_attempts_params.rbi +4 -4
  92. data/rbi/lithic/models/event_list_params.rbi +4 -4
  93. data/rbi/lithic/models/events/subscription_list_attempts_params.rbi +4 -4
  94. data/rbi/lithic/models/events/subscription_recover_params.rbi +4 -4
  95. data/rbi/lithic/models/events/subscription_replay_missing_params.rbi +4 -4
  96. data/rbi/lithic/models/external_payment_list_params.rbi +4 -4
  97. data/rbi/lithic/models/financial_accounts/financial_transaction_list_params.rbi +4 -4
  98. data/rbi/lithic/models/financial_accounts/installment_plan.rbi +40 -6
  99. data/rbi/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbi +160 -24
  100. data/rbi/lithic/models/financial_accounts/installment_plans/statement_list_params.rbi +4 -4
  101. data/rbi/lithic/models/financial_accounts/loan_tape_list_params.rbi +4 -4
  102. data/rbi/lithic/models/financial_accounts/statement_list_params.rbi +4 -4
  103. data/rbi/lithic/models/funding_event_list_params.rbi +4 -4
  104. data/rbi/lithic/models/hold_list_params.rbi +4 -4
  105. data/rbi/lithic/models/kyb.rbi +4 -0
  106. data/rbi/lithic/models/management_operation_create_params.rbi +8 -82
  107. data/rbi/lithic/models/management_operation_list_params.rbi +4 -4
  108. data/rbi/lithic/models/network_program_list_params.rbi +4 -4
  109. data/rbi/lithic/models/payment_list_params.rbi +4 -4
  110. data/rbi/lithic/models/reports/settlement/network_total_list_params.rbi +4 -4
  111. data/rbi/lithic/models/three_ds_authentication.rbi +14 -0
  112. data/rbi/lithic/models/three_ds_authentication_challenge_webhook_event.rbi +10 -0
  113. data/rbi/lithic/models/tokenization.rbi +91 -3
  114. data/rbi/lithic/models/tokenization_list_params.rbi +7 -2
  115. data/rbi/lithic/models/transaction_list_params.rbi +4 -4
  116. data/rbi/lithic/models/transaction_monitoring/case_list_params.rbi +4 -4
  117. data/rbi/lithic/resources/account_activity.rbi +2 -2
  118. data/rbi/lithic/resources/account_holders.rbi +2 -2
  119. data/rbi/lithic/resources/accounts.rbi +12 -9
  120. data/rbi/lithic/resources/auth_rules/v2.rbi +3 -4
  121. data/rbi/lithic/resources/book_transfers.rbi +2 -2
  122. data/rbi/lithic/resources/card_bulk_orders.rbi +2 -2
  123. data/rbi/lithic/resources/cards/financial_transactions.rbi +2 -2
  124. data/rbi/lithic/resources/cards.rbi +2 -2
  125. data/rbi/lithic/resources/disputes.rbi +4 -4
  126. data/rbi/lithic/resources/events/subscriptions.rbi +10 -10
  127. data/rbi/lithic/resources/events.rbi +4 -4
  128. data/rbi/lithic/resources/external_payments.rbi +2 -2
  129. data/rbi/lithic/resources/financial_accounts/financial_transactions.rbi +2 -2
  130. data/rbi/lithic/resources/financial_accounts/installment_plans/statements.rbi +2 -2
  131. data/rbi/lithic/resources/financial_accounts/loan_tapes.rbi +2 -2
  132. data/rbi/lithic/resources/financial_accounts/statements.rbi +2 -2
  133. data/rbi/lithic/resources/funding_events.rbi +2 -2
  134. data/rbi/lithic/resources/holds.rbi +2 -2
  135. data/rbi/lithic/resources/management_operations.rbi +5 -3
  136. data/rbi/lithic/resources/network_programs.rbi +2 -2
  137. data/rbi/lithic/resources/payments.rbi +2 -2
  138. data/rbi/lithic/resources/reports/settlement/network_totals.rbi +2 -2
  139. data/rbi/lithic/resources/tokenizations.rbi +1 -1
  140. data/rbi/lithic/resources/transaction_monitoring/cases.rbi +2 -2
  141. data/rbi/lithic/resources/transactions.rbi +2 -2
  142. data/sig/lithic/models/auth_rules/auth_rule.rbs +0 -2
  143. data/sig/lithic/models/auth_rules/auth_rule_version.rbs +0 -1
  144. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +64 -5
  145. data/sig/lithic/models/auth_rules/v2/backtest_results.rbs +5 -0
  146. data/sig/lithic/models/auth_rules/v2_create_params.rbs +0 -4
  147. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +0 -1
  148. data/sig/lithic/models/financial_accounts/installment_plan.rbs +25 -6
  149. data/sig/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbs +80 -21
  150. data/sig/lithic/models/management_operation_create_params.rbs +1 -33
  151. data/sig/lithic/models/three_ds_authentication.rbs +5 -0
  152. data/sig/lithic/models/three_ds_authentication_challenge_webhook_event.rbs +5 -0
  153. data/sig/lithic/models/tokenization.rbs +47 -4
  154. data/sig/lithic/models/tokenization_list_params.rbs +3 -1
  155. metadata +1 -4
  156. data/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb +0 -538
  157. data/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi +0 -1161
  158. data/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs +0 -278
@@ -22,10 +22,25 @@ module Lithic
22
22
  sig { returns(String) }
23
23
  attr_accessor :token
24
24
 
25
+ # Date the plan was paid off or cancelled, or null if it was still open as of this
26
+ # statement
27
+ sig { returns(T.nilable(Date)) }
28
+ attr_accessor :closed_at
29
+
30
+ # Timestamp of when the installment plan was created
31
+ sig { returns(Time) }
32
+ attr_accessor :created
33
+
25
34
  # Enrollment fee charged when the plan was created in cents
26
35
  sig { returns(Integer) }
27
36
  attr_accessor :fee_amount
28
37
 
38
+ # Amount credited to this plan after the plan was recalculated, as of this
39
+ # statement. The plan amount is not changed, and this credit reduces the amount
40
+ # owed
41
+ sig { returns(Integer) }
42
+ attr_accessor :installment_plan_adjustment
43
+
29
44
  # Globally unique identifier for the installment plan this snapshot is of
30
45
  sig { returns(String) }
31
46
  attr_accessor :installment_plan_token
@@ -60,6 +75,30 @@ module Lithic
60
75
  sig { returns(Integer) }
61
76
  attr_accessor :principal_amount
62
77
 
78
+ # Balance the plan was opened on, broken out by category, or null if it was not
79
+ # recorded
80
+ sig do
81
+ returns(
82
+ T.nilable(Lithic::FinancialAccounts::TransactionCategoryBalances)
83
+ )
84
+ end
85
+ attr_reader :source_amounts
86
+
87
+ sig do
88
+ params(
89
+ source_amounts:
90
+ T.nilable(
91
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
92
+ )
93
+ ).void
94
+ end
95
+ attr_writer :source_amounts
96
+
97
+ # Identifier of the record the plan was opened from, such as the closing statement
98
+ # for an unpaid balance
99
+ sig { returns(String) }
100
+ attr_accessor :source_id
101
+
63
102
  sig do
64
103
  returns(
65
104
  Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::SourceType::TaggedSymbol
@@ -85,13 +124,20 @@ module Lithic
85
124
  sig { returns(Integer) }
86
125
  attr_accessor :total_paid
87
126
 
127
+ # Timestamp of when the installment plan was last updated as of this statement
128
+ sig { returns(Time) }
129
+ attr_accessor :updated
130
+
88
131
  # An immutable snapshot of an installment plan as of the statement it is attached
89
132
  # to. Lithic cuts one per open plan when a statement is generated and never
90
133
  # reissues it
91
134
  sig do
92
135
  params(
93
136
  token: String,
137
+ closed_at: T.nilable(Date),
138
+ created: Time,
94
139
  fee_amount: Integer,
140
+ installment_plan_adjustment: Integer,
95
141
  installment_plan_token: String,
96
142
  installment_plan_total: Integer,
97
143
  installments:
@@ -102,12 +148,18 @@ module Lithic
102
148
  installments_paid: Integer,
103
149
  num_installments: Integer,
104
150
  principal_amount: Integer,
151
+ source_amounts:
152
+ T.nilable(
153
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
154
+ ),
155
+ source_id: String,
105
156
  source_type:
106
157
  Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::SourceType::OrSymbol,
107
158
  start_date: Date,
108
159
  state:
109
160
  Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::State::OrSymbol,
110
- total_paid: Integer
161
+ total_paid: Integer,
162
+ updated: Time
111
163
  ).returns(T.attached_class)
112
164
  end
113
165
  def self.new(
@@ -116,8 +168,17 @@ module Lithic
116
168
  # so the statement identifies the snapshot within the plan. Pass it as a
117
169
  # pagination cursor
118
170
  token:,
171
+ # Date the plan was paid off or cancelled, or null if it was still open as of this
172
+ # statement
173
+ closed_at:,
174
+ # Timestamp of when the installment plan was created
175
+ created:,
119
176
  # Enrollment fee charged when the plan was created in cents
120
177
  fee_amount:,
178
+ # Amount credited to this plan after the plan was recalculated, as of this
179
+ # statement. The plan amount is not changed, and this credit reduces the amount
180
+ # owed
181
+ installment_plan_adjustment:,
121
182
  # Globally unique identifier for the installment plan this snapshot is of
122
183
  installment_plan_token:,
123
184
  # Total owed on the plan in cents, the principal amount plus the enrollment fee
@@ -132,6 +193,12 @@ module Lithic
132
193
  num_installments:,
133
194
  # Balance the plan was opened on in cents, excluding the enrollment fee
134
195
  principal_amount:,
196
+ # Balance the plan was opened on, broken out by category, or null if it was not
197
+ # recorded
198
+ source_amounts:,
199
+ # Identifier of the record the plan was opened from, such as the closing statement
200
+ # for an unpaid balance
201
+ source_id:,
135
202
  source_type:,
136
203
  # Date the plan was created
137
204
  start_date:,
@@ -140,7 +207,9 @@ module Lithic
140
207
  # and should not be treated as final
141
208
  state:,
142
209
  # Amount paid towards the plan as of this statement in cents
143
- total_paid:
210
+ total_paid:,
211
+ # Timestamp of when the installment plan was last updated as of this statement
212
+ updated:
144
213
  )
145
214
  end
146
215
 
@@ -148,7 +217,10 @@ module Lithic
148
217
  override.returns(
149
218
  {
150
219
  token: String,
220
+ closed_at: T.nilable(Date),
221
+ created: Time,
151
222
  fee_amount: Integer,
223
+ installment_plan_adjustment: Integer,
152
224
  installment_plan_token: String,
153
225
  installment_plan_total: Integer,
154
226
  installments:
@@ -159,12 +231,18 @@ module Lithic
159
231
  installments_paid: Integer,
160
232
  num_installments: Integer,
161
233
  principal_amount: Integer,
234
+ source_amounts:
235
+ T.nilable(
236
+ Lithic::FinancialAccounts::TransactionCategoryBalances
237
+ ),
238
+ source_id: String,
162
239
  source_type:
163
240
  Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::SourceType::TaggedSymbol,
164
241
  start_date: Date,
165
242
  state:
166
243
  Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::State::TaggedSymbol,
167
- total_paid: Integer
244
+ total_paid: Integer,
245
+ updated: Time
168
246
  }
169
247
  )
170
248
  end
@@ -184,13 +262,15 @@ module Lithic
184
262
  sig { returns(Integer) }
185
263
  attr_accessor :amount_due
186
264
 
187
- sig { returns(Lithic::FinancialAccounts::CategoryBalances) }
265
+ sig do
266
+ returns(Lithic::FinancialAccounts::TransactionCategoryBalances)
267
+ end
188
268
  attr_reader :amount_due_details
189
269
 
190
270
  sig do
191
271
  params(
192
272
  amount_due_details:
193
- Lithic::FinancialAccounts::CategoryBalances::OrHash
273
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
194
274
  ).void
195
275
  end
196
276
  attr_writer :amount_due_details
@@ -199,13 +279,15 @@ module Lithic
199
279
  sig { returns(Integer) }
200
280
  attr_accessor :amount_outstanding
201
281
 
202
- sig { returns(Lithic::FinancialAccounts::CategoryBalances) }
282
+ sig do
283
+ returns(Lithic::FinancialAccounts::TransactionCategoryBalances)
284
+ end
203
285
  attr_reader :amount_outstanding_details
204
286
 
205
287
  sig do
206
288
  params(
207
289
  amount_outstanding_details:
208
- Lithic::FinancialAccounts::CategoryBalances::OrHash
290
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
209
291
  ).void
210
292
  end
211
293
  attr_writer :amount_outstanding_details
@@ -214,13 +296,15 @@ module Lithic
214
296
  sig { returns(Integer) }
215
297
  attr_accessor :amount_paid
216
298
 
217
- sig { returns(Lithic::FinancialAccounts::CategoryBalances) }
299
+ sig do
300
+ returns(Lithic::FinancialAccounts::TransactionCategoryBalances)
301
+ end
218
302
  attr_reader :amount_paid_details
219
303
 
220
304
  sig do
221
305
  params(
222
306
  amount_paid_details:
223
- Lithic::FinancialAccounts::CategoryBalances::OrHash
307
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
224
308
  ).void
225
309
  end
226
310
  attr_writer :amount_paid_details
@@ -252,20 +336,26 @@ module Lithic
252
336
  end
253
337
  attr_accessor :payments
254
338
 
255
- # One installment of a plan as of the statement. Amounts are totalled across
256
- # transaction categories rather than broken out by them, which the installment
257
- # plan endpoint does
339
+ # Amount from installment_plan_adjustment credited to this installment as of this
340
+ # statement
341
+ sig { returns(T.nilable(Integer)) }
342
+ attr_reader :installment_adjustment
343
+
344
+ sig { params(installment_adjustment: Integer).void }
345
+ attr_writer :installment_adjustment
346
+
347
+ # One installment of a plan as of the statement
258
348
  sig do
259
349
  params(
260
350
  amount_due: Integer,
261
351
  amount_due_details:
262
- Lithic::FinancialAccounts::CategoryBalances::OrHash,
352
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash,
263
353
  amount_outstanding: Integer,
264
354
  amount_outstanding_details:
265
- Lithic::FinancialAccounts::CategoryBalances::OrHash,
355
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash,
266
356
  amount_paid: Integer,
267
357
  amount_paid_details:
268
- Lithic::FinancialAccounts::CategoryBalances::OrHash,
358
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash,
269
359
  date_assessed: T.nilable(Date),
270
360
  due_date: Date,
271
361
  installment_num: Integer,
@@ -273,7 +363,8 @@ module Lithic
273
363
  payments:
274
364
  T::Array[
275
365
  Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::Installment::Payment::OrHash
276
- ]
366
+ ],
367
+ installment_adjustment: Integer
277
368
  ).returns(T.attached_class)
278
369
  end
279
370
  def self.new(
@@ -296,7 +387,10 @@ module Lithic
296
387
  # Date the installment must be paid by before it is considered past due
297
388
  payment_due_date:,
298
389
  # Payments applied to this installment, oldest first
299
- payments:
390
+ payments:,
391
+ # Amount from installment_plan_adjustment credited to this installment as of this
392
+ # statement
393
+ installment_adjustment: nil
300
394
  )
301
395
  end
302
396
 
@@ -305,13 +399,13 @@ module Lithic
305
399
  {
306
400
  amount_due: Integer,
307
401
  amount_due_details:
308
- Lithic::FinancialAccounts::CategoryBalances,
402
+ Lithic::FinancialAccounts::TransactionCategoryBalances,
309
403
  amount_outstanding: Integer,
310
404
  amount_outstanding_details:
311
- Lithic::FinancialAccounts::CategoryBalances,
405
+ Lithic::FinancialAccounts::TransactionCategoryBalances,
312
406
  amount_paid: Integer,
313
407
  amount_paid_details:
314
- Lithic::FinancialAccounts::CategoryBalances,
408
+ Lithic::FinancialAccounts::TransactionCategoryBalances,
315
409
  date_assessed: T.nilable(Date),
316
410
  due_date: Date,
317
411
  installment_num: Integer,
@@ -319,7 +413,8 @@ module Lithic
319
413
  payments:
320
414
  T::Array[
321
415
  Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::Installment::Payment
322
- ]
416
+ ],
417
+ installment_adjustment: Integer
323
418
  }
324
419
  )
325
420
  end
@@ -339,22 +434,63 @@ module Lithic
339
434
  sig { returns(Integer) }
340
435
  attr_accessor :amount
341
436
 
437
+ sig do
438
+ returns(Lithic::FinancialAccounts::TransactionCategoryBalances)
439
+ end
440
+ attr_reader :amount_details
441
+
442
+ sig do
443
+ params(
444
+ amount_details:
445
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
446
+ ).void
447
+ end
448
+ attr_writer :amount_details
449
+
342
450
  # Date the payment was applied to the installment
343
451
  sig { returns(Date) }
344
452
  attr_accessor :date
345
453
 
454
+ # True when the source of the payment is an adjustment of an underlying account or
455
+ # transaction
456
+ sig { returns(T.nilable(T::Boolean)) }
457
+ attr_reader :is_adjustment
458
+
459
+ sig { params(is_adjustment: T::Boolean).void }
460
+ attr_writer :is_adjustment
461
+
346
462
  sig do
347
- params(amount: Integer, date: Date).returns(T.attached_class)
463
+ params(
464
+ amount: Integer,
465
+ amount_details:
466
+ Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash,
467
+ date: Date,
468
+ is_adjustment: T::Boolean
469
+ ).returns(T.attached_class)
348
470
  end
349
471
  def self.new(
350
472
  # Amount applied to the installment in cents
351
473
  amount:,
474
+ amount_details:,
352
475
  # Date the payment was applied to the installment
353
- date:
476
+ date:,
477
+ # True when the source of the payment is an adjustment of an underlying account or
478
+ # transaction
479
+ is_adjustment: nil
354
480
  )
355
481
  end
356
482
 
357
- sig { override.returns({ amount: Integer, date: Date }) }
483
+ sig do
484
+ override.returns(
485
+ {
486
+ amount: Integer,
487
+ amount_details:
488
+ Lithic::FinancialAccounts::TransactionCategoryBalances,
489
+ date: Date,
490
+ is_adjustment: T::Boolean
491
+ }
492
+ )
493
+ end
358
494
  def to_hash
359
495
  end
360
496
  end
@@ -24,8 +24,8 @@ module Lithic
24
24
  sig { returns(String) }
25
25
  attr_accessor :installment_plan_token
26
26
 
27
- # Date string in RFC 3339 format. Only entries created after the specified date
28
- # will be included.
27
+ # Date string in RFC 3339 format. Only entries created on or after the specified
28
+ # date will be included.
29
29
  sig { returns(T.nilable(Date)) }
30
30
  attr_reader :begin_
31
31
 
@@ -94,8 +94,8 @@ module Lithic
94
94
  financial_account_token:,
95
95
  # Globally unique identifier for installment plan.
96
96
  installment_plan_token:,
97
- # Date string in RFC 3339 format. Only entries created after the specified date
98
- # will be included.
97
+ # Date string in RFC 3339 format. Only entries created on or after the specified
98
+ # date will be included.
99
99
  begin_: nil,
100
100
  # Date string in RFC 3339 format. Only entries created before the specified date
101
101
  # will be included.
@@ -19,8 +19,8 @@ module Lithic
19
19
  sig { returns(String) }
20
20
  attr_accessor :financial_account_token
21
21
 
22
- # Date string in RFC 3339 format. Only entries created after the specified date
23
- # will be included.
22
+ # Date string in RFC 3339 format. Only entries created on or after the specified
23
+ # date will be included.
24
24
  sig { returns(T.nilable(Date)) }
25
25
  attr_reader :begin_
26
26
 
@@ -72,8 +72,8 @@ module Lithic
72
72
  def self.new(
73
73
  # Globally unique identifier for financial account.
74
74
  financial_account_token:,
75
- # Date string in RFC 3339 format. Only entries created after the specified date
76
- # will be included.
75
+ # Date string in RFC 3339 format. Only entries created on or after the specified
76
+ # date will be included.
77
77
  begin_: nil,
78
78
  # Date string in RFC 3339 format. Only entries created before the specified date
79
79
  # will be included.
@@ -19,8 +19,8 @@ module Lithic
19
19
  sig { returns(String) }
20
20
  attr_accessor :financial_account_token
21
21
 
22
- # Date string in RFC 3339 format. Only entries created after the specified date
23
- # will be included.
22
+ # Date string in RFC 3339 format. Only entries created on or after the specified
23
+ # date will be included.
24
24
  sig { returns(T.nilable(Date)) }
25
25
  attr_reader :begin_
26
26
 
@@ -80,8 +80,8 @@ module Lithic
80
80
  def self.new(
81
81
  # Globally unique identifier for financial account.
82
82
  financial_account_token:,
83
- # Date string in RFC 3339 format. Only entries created after the specified date
84
- # will be included.
83
+ # Date string in RFC 3339 format. Only entries created on or after the specified
84
+ # date will be included.
85
85
  begin_: nil,
86
86
  # Date string in RFC 3339 format. Only entries created before the specified date
87
87
  # will be included.
@@ -11,8 +11,8 @@ module Lithic
11
11
  T.any(Lithic::FundingEventListParams, Lithic::Internal::AnyHash)
12
12
  end
13
13
 
14
- # Date string in RFC 3339 format. Only entries created after the specified time
15
- # will be included. UTC time zone.
14
+ # Date string in RFC 3339 format. Only entries created on or after the specified
15
+ # time will be included. UTC time zone.
16
16
  sig { returns(T.nilable(Time)) }
17
17
  attr_reader :begin_
18
18
 
@@ -70,8 +70,8 @@ module Lithic
70
70
  ).returns(T.attached_class)
71
71
  end
72
72
  def self.new(
73
- # Date string in RFC 3339 format. Only entries created after the specified time
74
- # will be included. UTC time zone.
73
+ # Date string in RFC 3339 format. Only entries created on or after the specified
74
+ # time will be included. UTC time zone.
75
75
  begin_: nil,
76
76
  # Date string in RFC 3339 format. Only entries created before the specified time
77
77
  # will be included. UTC time zone.
@@ -14,8 +14,8 @@ module Lithic
14
14
  sig { returns(String) }
15
15
  attr_accessor :financial_account_token
16
16
 
17
- # Date string in RFC 3339 format. Only entries created after the specified time
18
- # will be included. UTC time zone.
17
+ # Date string in RFC 3339 format. Only entries created on or after the specified
18
+ # time will be included. UTC time zone.
19
19
  sig { returns(T.nilable(Time)) }
20
20
  attr_reader :begin_
21
21
 
@@ -74,8 +74,8 @@ module Lithic
74
74
  end
75
75
  def self.new(
76
76
  financial_account_token:,
77
- # Date string in RFC 3339 format. Only entries created after the specified time
78
- # will be included. UTC time zone.
77
+ # Date string in RFC 3339 format. Only entries created on or after the specified
78
+ # time will be included. UTC time zone.
79
79
  begin_: nil,
80
80
  # Date string in RFC 3339 format. Only entries created before the specified time
81
81
  # will be included. UTC time zone.
@@ -72,6 +72,8 @@ module Lithic
72
72
 
73
73
  # 6-digit North American Industry Classification System (NAICS) code for the
74
74
  # business.
75
+ #
76
+ # This parameter is required if workflow type is `KYB_BASIC`
75
77
  sig { returns(T.nilable(String)) }
76
78
  attr_reader :naics_code
77
79
 
@@ -140,6 +142,8 @@ module Lithic
140
142
  kyb_passed_timestamp: nil,
141
143
  # 6-digit North American Industry Classification System (NAICS) code for the
142
144
  # business.
145
+ #
146
+ # This parameter is required if workflow type is `KYB_BASIC`
143
147
  naics_code: nil,
144
148
  # Company website URL.
145
149
  website_url: nil
@@ -30,6 +30,8 @@ module Lithic
30
30
  sig { returns(Date) }
31
31
  attr_accessor :effective_date
32
32
 
33
+ # Type of management operation to create. To reverse an existing management
34
+ # operation, use the reverse management operation endpoint
33
35
  sig do
34
36
  returns(Lithic::ManagementOperationCreateParams::EventType::OrSymbol)
35
37
  end
@@ -38,7 +40,7 @@ module Lithic
38
40
  sig { returns(String) }
39
41
  attr_accessor :financial_account_token
40
42
 
41
- # Customer-provided token that will serve as an idempotency token. This token will
43
+ # Client-provided token that will serve as an idempotency token. This token will
42
44
  # become the transaction token.
43
45
  sig { returns(T.nilable(String)) }
44
46
  attr_reader :token
@@ -106,9 +108,11 @@ module Lithic
106
108
  category:,
107
109
  direction:,
108
110
  effective_date:,
111
+ # Type of management operation to create. To reverse an existing management
112
+ # operation, use the reverse management operation endpoint
109
113
  event_type:,
110
114
  financial_account_token:,
111
- # Customer-provided token that will serve as an idempotency token. This token will
115
+ # Client-provided token that will serve as an idempotency token. This token will
112
116
  # become the transaction token.
113
117
  token: nil,
114
118
  memo: nil,
@@ -222,6 +226,8 @@ module Lithic
222
226
  end
223
227
  end
224
228
 
229
+ # Type of management operation to create. To reverse an existing management
230
+ # operation, use the reverse management operation endpoint
225
231
  module EventType
226
232
  extend Lithic::Internal::Type::Enum
227
233
 
@@ -231,151 +237,71 @@ module Lithic
231
237
  end
232
238
  OrSymbol = T.type_alias { T.any(Symbol, String) }
233
239
 
234
- LOSS_WRITE_OFF =
235
- T.let(
236
- :LOSS_WRITE_OFF,
237
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
238
- )
239
240
  CASH_BACK =
240
241
  T.let(
241
242
  :CASH_BACK,
242
243
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
243
244
  )
244
- CASH_BACK_REVERSAL =
245
- T.let(
246
- :CASH_BACK_REVERSAL,
247
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
248
- )
249
245
  CURRENCY_CONVERSION =
250
246
  T.let(
251
247
  :CURRENCY_CONVERSION,
252
248
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
253
249
  )
254
- CURRENCY_CONVERSION_REVERSAL =
255
- T.let(
256
- :CURRENCY_CONVERSION_REVERSAL,
257
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
258
- )
259
- INTEREST =
260
- T.let(
261
- :INTEREST,
262
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
263
- )
264
- INTEREST_REVERSAL =
265
- T.let(
266
- :INTEREST_REVERSAL,
267
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
268
- )
269
250
  INSTALLMENT_FEE =
270
251
  T.let(
271
252
  :INSTALLMENT_FEE,
272
253
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
273
254
  )
274
- INSTALLMENT_FEE_REVERSAL =
275
- T.let(
276
- :INSTALLMENT_FEE_REVERSAL,
277
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
278
- )
279
255
  LATE_PAYMENT =
280
256
  T.let(
281
257
  :LATE_PAYMENT,
282
258
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
283
259
  )
284
- LATE_PAYMENT_REVERSAL =
285
- T.let(
286
- :LATE_PAYMENT_REVERSAL,
287
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
288
- )
289
260
  BILLING_ERROR =
290
261
  T.let(
291
262
  :BILLING_ERROR,
292
263
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
293
264
  )
294
- BILLING_ERROR_REVERSAL =
295
- T.let(
296
- :BILLING_ERROR_REVERSAL,
297
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
298
- )
299
265
  PROVISIONAL_CREDIT =
300
266
  T.let(
301
267
  :PROVISIONAL_CREDIT,
302
268
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
303
269
  )
304
- PROVISIONAL_CREDIT_REVERSAL =
305
- T.let(
306
- :PROVISIONAL_CREDIT_REVERSAL,
307
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
308
- )
309
270
  RETURNED_PAYMENT =
310
271
  T.let(
311
272
  :RETURNED_PAYMENT,
312
273
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
313
274
  )
314
- RETURNED_PAYMENT_REVERSAL =
315
- T.let(
316
- :RETURNED_PAYMENT_REVERSAL,
317
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
318
- )
319
275
  DISPUTE_WON =
320
276
  T.let(
321
277
  :DISPUTE_WON,
322
278
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
323
279
  )
324
- DISPUTE_WON_REVERSAL =
325
- T.let(
326
- :DISPUTE_WON_REVERSAL,
327
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
328
- )
329
280
  DISBURSE =
330
281
  T.let(
331
282
  :DISBURSE,
332
283
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
333
284
  )
334
- DISBURSE_REVERSAL =
335
- T.let(
336
- :DISBURSE_REVERSAL,
337
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
338
- )
339
285
  ANNUAL =
340
286
  T.let(
341
287
  :ANNUAL,
342
288
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
343
289
  )
344
- ANNUAL_REVERSAL =
345
- T.let(
346
- :ANNUAL_REVERSAL,
347
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
348
- )
349
290
  QUARTERLY =
350
291
  T.let(
351
292
  :QUARTERLY,
352
293
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
353
294
  )
354
- QUARTERLY_REVERSAL =
355
- T.let(
356
- :QUARTERLY_REVERSAL,
357
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
358
- )
359
295
  MONTHLY =
360
296
  T.let(
361
297
  :MONTHLY,
362
298
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
363
299
  )
364
- MONTHLY_REVERSAL =
365
- T.let(
366
- :MONTHLY_REVERSAL,
367
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
368
- )
369
300
  FEE =
370
301
  T.let(
371
302
  :FEE,
372
303
  Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
373
304
  )
374
- FEE_REVERSAL =
375
- T.let(
376
- :FEE_REVERSAL,
377
- Lithic::ManagementOperationCreateParams::EventType::TaggedSymbol
378
- )
379
305
 
380
306
  sig do
381
307
  override.returns(