lithic 0.17.0 → 0.18.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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/models/auth_rules/rule_feature.rb +291 -2
  5. data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +2 -2
  6. data/lib/lithic/models/claim_created_webhook_event.rb +190 -0
  7. data/lib/lithic/models/claim_document_accepted_webhook_event.rb +175 -0
  8. data/lib/lithic/models/claim_document_rejected_webhook_event.rb +175 -0
  9. data/lib/lithic/models/claim_document_uploaded_webhook_event.rb +175 -0
  10. data/lib/lithic/models/claim_updated_webhook_event.rb +190 -0
  11. data/lib/lithic/models/event.rb +23 -0
  12. data/lib/lithic/models/event_list_params.rb +14 -0
  13. data/lib/lithic/models/event_subscription.rb +14 -0
  14. data/lib/lithic/models/events/subscription_create_params.rb +14 -0
  15. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +5 -0
  16. data/lib/lithic/models/events/subscription_update_params.rb +14 -0
  17. data/lib/lithic/models/parsed_webhook_event.rb +11 -1
  18. data/lib/lithic/models.rb +10 -0
  19. data/lib/lithic/resources/webhooks.rb +1 -1
  20. data/lib/lithic/version.rb +1 -1
  21. data/lib/lithic.rb +5 -0
  22. data/rbi/lithic/models/auth_rules/rule_feature.rbi +686 -2
  23. data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +15 -3
  24. data/rbi/lithic/models/claim_created_webhook_event.rbi +386 -0
  25. data/rbi/lithic/models/claim_document_accepted_webhook_event.rbi +315 -0
  26. data/rbi/lithic/models/claim_document_rejected_webhook_event.rbi +315 -0
  27. data/rbi/lithic/models/claim_document_uploaded_webhook_event.rbi +315 -0
  28. data/rbi/lithic/models/claim_updated_webhook_event.rbi +386 -0
  29. data/rbi/lithic/models/event.rbi +46 -0
  30. data/rbi/lithic/models/event_list_params.rbi +34 -0
  31. data/rbi/lithic/models/event_subscription.rbi +34 -0
  32. data/rbi/lithic/models/events/subscription_create_params.rbi +34 -0
  33. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +25 -0
  34. data/rbi/lithic/models/events/subscription_update_params.rbi +34 -0
  35. data/rbi/lithic/models/parsed_webhook_event.rbi +5 -0
  36. data/rbi/lithic/models.rbi +13 -0
  37. data/rbi/lithic/resources/webhooks.rbi +5 -0
  38. data/sig/lithic/models/auth_rules/rule_feature.rbs +252 -0
  39. data/sig/lithic/models/claim_created_webhook_event.rbs +169 -0
  40. data/sig/lithic/models/claim_document_accepted_webhook_event.rbs +131 -0
  41. data/sig/lithic/models/claim_document_rejected_webhook_event.rbs +131 -0
  42. data/sig/lithic/models/claim_document_uploaded_webhook_event.rbs +131 -0
  43. data/sig/lithic/models/claim_updated_webhook_event.rbs +169 -0
  44. data/sig/lithic/models/event.rbs +10 -0
  45. data/sig/lithic/models/event_list_params.rbs +10 -0
  46. data/sig/lithic/models/event_subscription.rbs +10 -0
  47. data/sig/lithic/models/events/subscription_create_params.rbs +10 -0
  48. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +10 -0
  49. data/sig/lithic/models/events/subscription_update_params.rbs +10 -0
  50. data/sig/lithic/models/parsed_webhook_event.rbs +5 -0
  51. data/sig/lithic/models.rbs +10 -0
  52. data/sig/lithic/resources/webhooks.rbs +5 -0
  53. metadata +17 -2
@@ -29,11 +29,15 @@ module Lithic
29
29
  Lithic::AuthRules::RuleFeature::ACHReceiptFeature,
30
30
  Lithic::AuthRules::RuleFeature::CardTransactionFeature,
31
31
  Lithic::AuthRules::RuleFeature::ACHPaymentFeature,
32
+ Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature,
32
33
  Lithic::AuthRules::RuleFeature::CardFeature,
33
34
  Lithic::AuthRules::RuleFeature::AccountHolderFeature,
34
35
  Lithic::AuthRules::RuleFeature::IPMetadataFeature,
35
36
  Lithic::AuthRules::RuleFeature::SpendVelocityFeature,
36
- Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature
37
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature,
38
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature,
39
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature,
40
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature
37
41
  )
38
42
  ]
39
43
  )
@@ -53,11 +57,15 @@ module Lithic
53
57
  Lithic::AuthRules::RuleFeature::ACHReceiptFeature::OrHash,
54
58
  Lithic::AuthRules::RuleFeature::CardTransactionFeature::OrHash,
55
59
  Lithic::AuthRules::RuleFeature::ACHPaymentFeature::OrHash,
60
+ Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature::OrHash,
56
61
  Lithic::AuthRules::RuleFeature::CardFeature::OrHash,
57
62
  Lithic::AuthRules::RuleFeature::AccountHolderFeature::OrHash,
58
63
  Lithic::AuthRules::RuleFeature::IPMetadataFeature::OrHash,
59
64
  Lithic::AuthRules::RuleFeature::SpendVelocityFeature::OrHash,
60
- Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::OrHash
65
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::OrHash,
66
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::OrHash,
67
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::OrHash,
68
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::OrHash
61
69
  )
62
70
  ]
63
71
  ).returns(T.attached_class)
@@ -85,11 +93,15 @@ module Lithic
85
93
  Lithic::AuthRules::RuleFeature::ACHReceiptFeature,
86
94
  Lithic::AuthRules::RuleFeature::CardTransactionFeature,
87
95
  Lithic::AuthRules::RuleFeature::ACHPaymentFeature,
96
+ Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature,
88
97
  Lithic::AuthRules::RuleFeature::CardFeature,
89
98
  Lithic::AuthRules::RuleFeature::AccountHolderFeature,
90
99
  Lithic::AuthRules::RuleFeature::IPMetadataFeature,
91
100
  Lithic::AuthRules::RuleFeature::SpendVelocityFeature,
92
- Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature
101
+ Lithic::AuthRules::RuleFeature::PaymentVelocityFeature,
102
+ Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature,
103
+ Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature,
104
+ Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature
93
105
  )
94
106
  ]
95
107
  }
@@ -0,0 +1,386 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ class ClaimCreatedWebhookEvent < Lithic::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Lithic::ClaimCreatedWebhookEvent, Lithic::Internal::AnyHash)
9
+ end
10
+
11
+ # Unique identifier for the claim, in UUID format
12
+ sig { returns(String) }
13
+ attr_accessor :token
14
+
15
+ # Token for the account holder that filed the claim
16
+ sig { returns(T.nilable(String)) }
17
+ attr_accessor :account_holder_token
18
+
19
+ # Token for the account associated with the claim
20
+ sig { returns(T.nilable(String)) }
21
+ attr_accessor :account_token
22
+
23
+ # Tokens for the cards associated with the disputed transactions
24
+ sig { returns(T::Array[String]) }
25
+ attr_accessor :card_tokens
26
+
27
+ # When the claim was created
28
+ sig { returns(Time) }
29
+ attr_accessor :created
30
+
31
+ # Transactions included in this claim
32
+ sig do
33
+ returns(T::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction])
34
+ end
35
+ attr_accessor :disputed_transactions
36
+
37
+ # The type of event that occurred.
38
+ sig { returns(Symbol) }
39
+ attr_accessor :event_type
40
+
41
+ # Requirements that must be fulfilled before the claim can be submitted
42
+ sig do
43
+ returns(
44
+ T::Array[
45
+ Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol
46
+ ]
47
+ )
48
+ end
49
+ attr_accessor :outstanding_requirements
50
+
51
+ # Dispute reason code provided when creating the claim
52
+ sig { returns(Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol) }
53
+ attr_accessor :reason
54
+
55
+ # Current lifecycle status of the claim
56
+ sig { returns(Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol) }
57
+ attr_accessor :status
58
+
59
+ # When the claim was submitted. Null until the claim reaches `SUBMITTED` status
60
+ sig { returns(T.nilable(Time)) }
61
+ attr_accessor :submitted
62
+
63
+ # When the claim was last updated
64
+ sig { returns(Time) }
65
+ attr_accessor :updated
66
+
67
+ sig do
68
+ params(
69
+ token: String,
70
+ account_holder_token: T.nilable(String),
71
+ account_token: T.nilable(String),
72
+ card_tokens: T::Array[String],
73
+ created: Time,
74
+ disputed_transactions:
75
+ T::Array[
76
+ Lithic::ClaimCreatedWebhookEvent::DisputedTransaction::OrHash
77
+ ],
78
+ outstanding_requirements:
79
+ T::Array[
80
+ Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::OrSymbol
81
+ ],
82
+ reason: Lithic::ClaimCreatedWebhookEvent::Reason::OrSymbol,
83
+ status: Lithic::ClaimCreatedWebhookEvent::Status::OrSymbol,
84
+ submitted: T.nilable(Time),
85
+ updated: Time,
86
+ event_type: Symbol
87
+ ).returns(T.attached_class)
88
+ end
89
+ def self.new(
90
+ # Unique identifier for the claim, in UUID format
91
+ token:,
92
+ # Token for the account holder that filed the claim
93
+ account_holder_token:,
94
+ # Token for the account associated with the claim
95
+ account_token:,
96
+ # Tokens for the cards associated with the disputed transactions
97
+ card_tokens:,
98
+ # When the claim was created
99
+ created:,
100
+ # Transactions included in this claim
101
+ disputed_transactions:,
102
+ # Requirements that must be fulfilled before the claim can be submitted
103
+ outstanding_requirements:,
104
+ # Dispute reason code provided when creating the claim
105
+ reason:,
106
+ # Current lifecycle status of the claim
107
+ status:,
108
+ # When the claim was submitted. Null until the claim reaches `SUBMITTED` status
109
+ submitted:,
110
+ # When the claim was last updated
111
+ updated:,
112
+ # The type of event that occurred.
113
+ event_type: :"claim.created"
114
+ )
115
+ end
116
+
117
+ sig do
118
+ override.returns(
119
+ {
120
+ token: String,
121
+ account_holder_token: T.nilable(String),
122
+ account_token: T.nilable(String),
123
+ card_tokens: T::Array[String],
124
+ created: Time,
125
+ disputed_transactions:
126
+ T::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction],
127
+ event_type: Symbol,
128
+ outstanding_requirements:
129
+ T::Array[
130
+ Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol
131
+ ],
132
+ reason: Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol,
133
+ status: Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol,
134
+ submitted: T.nilable(Time),
135
+ updated: Time
136
+ }
137
+ )
138
+ end
139
+ def to_hash
140
+ end
141
+
142
+ class DisputedTransaction < Lithic::Internal::Type::BaseModel
143
+ OrHash =
144
+ T.type_alias do
145
+ T.any(
146
+ Lithic::ClaimCreatedWebhookEvent::DisputedTransaction,
147
+ Lithic::Internal::AnyHash
148
+ )
149
+ end
150
+
151
+ # Tokens for the specific events within the transaction being disputed. Lithic
152
+ # creates one dispute per event token
153
+ sig { returns(T::Array[String]) }
154
+ attr_accessor :event_tokens
155
+
156
+ # Token for the transaction being disputed, in UUID format
157
+ sig { returns(String) }
158
+ attr_accessor :transaction_token
159
+
160
+ # A transaction included in a claim, along with the specific events being
161
+ # disputed.
162
+ sig do
163
+ params(
164
+ event_tokens: T::Array[String],
165
+ transaction_token: String
166
+ ).returns(T.attached_class)
167
+ end
168
+ def self.new(
169
+ # Tokens for the specific events within the transaction being disputed. Lithic
170
+ # creates one dispute per event token
171
+ event_tokens:,
172
+ # Token for the transaction being disputed, in UUID format
173
+ transaction_token:
174
+ )
175
+ end
176
+
177
+ sig do
178
+ override.returns(
179
+ { event_tokens: T::Array[String], transaction_token: String }
180
+ )
181
+ end
182
+ def to_hash
183
+ end
184
+ end
185
+
186
+ module OutstandingRequirement
187
+ extend Lithic::Internal::Type::Enum
188
+
189
+ TaggedSymbol =
190
+ T.type_alias do
191
+ T.all(
192
+ Symbol,
193
+ Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement
194
+ )
195
+ end
196
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
197
+
198
+ QUESTIONNAIRE =
199
+ T.let(
200
+ :QUESTIONNAIRE,
201
+ Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol
202
+ )
203
+ DOCUMENTS =
204
+ T.let(
205
+ :DOCUMENTS,
206
+ Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol
207
+ )
208
+
209
+ sig do
210
+ override.returns(
211
+ T::Array[
212
+ Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol
213
+ ]
214
+ )
215
+ end
216
+ def self.values
217
+ end
218
+ end
219
+
220
+ # Dispute reason code provided when creating the claim
221
+ module Reason
222
+ extend Lithic::Internal::Type::Enum
223
+
224
+ TaggedSymbol =
225
+ T.type_alias do
226
+ T.all(Symbol, Lithic::ClaimCreatedWebhookEvent::Reason)
227
+ end
228
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
229
+
230
+ CARD_NOT_PRESENT =
231
+ T.let(
232
+ :CARD_NOT_PRESENT,
233
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
234
+ )
235
+ CARD_LOST =
236
+ T.let(
237
+ :CARD_LOST,
238
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
239
+ )
240
+ CARD_STOLEN =
241
+ T.let(
242
+ :CARD_STOLEN,
243
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
244
+ )
245
+ CARD_NEVER_RECEIVED =
246
+ T.let(
247
+ :CARD_NEVER_RECEIVED,
248
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
249
+ )
250
+ COUNTERFEIT =
251
+ T.let(
252
+ :COUNTERFEIT,
253
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
254
+ )
255
+ ACCOUNT_TAKEOVER =
256
+ T.let(
257
+ :ACCOUNT_TAKEOVER,
258
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
259
+ )
260
+ PRODUCT_NOT_RECEIVED =
261
+ T.let(
262
+ :PRODUCT_NOT_RECEIVED,
263
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
264
+ )
265
+ NOT_AS_DESCRIBED =
266
+ T.let(
267
+ :NOT_AS_DESCRIBED,
268
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
269
+ )
270
+ CREDIT_NOT_PROCESSED =
271
+ T.let(
272
+ :CREDIT_NOT_PROCESSED,
273
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
274
+ )
275
+ CANCELLED_RECURRING =
276
+ T.let(
277
+ :CANCELLED_RECURRING,
278
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
279
+ )
280
+ PAID_BY_OTHER_MEANS =
281
+ T.let(
282
+ :PAID_BY_OTHER_MEANS,
283
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
284
+ )
285
+ DUPLICATE_CHARGE =
286
+ T.let(
287
+ :DUPLICATE_CHARGE,
288
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
289
+ )
290
+ LATE_PRESENTMENT =
291
+ T.let(
292
+ :LATE_PRESENTMENT,
293
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
294
+ )
295
+ INCORRECT_TRANSACTION_CODE =
296
+ T.let(
297
+ :INCORRECT_TRANSACTION_CODE,
298
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
299
+ )
300
+ NO_AUTHORIZATION =
301
+ T.let(
302
+ :NO_AUTHORIZATION,
303
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
304
+ )
305
+ DECLINED =
306
+ T.let(
307
+ :DECLINED,
308
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
309
+ )
310
+ INCORRECT_AMOUNT =
311
+ T.let(
312
+ :INCORRECT_AMOUNT,
313
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
314
+ )
315
+ ATM_CASH_NOT_DISPENSED =
316
+ T.let(
317
+ :ATM_CASH_NOT_DISPENSED,
318
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
319
+ )
320
+ ATM_DEPOSIT_WRONG_AMOUNT =
321
+ T.let(
322
+ :ATM_DEPOSIT_WRONG_AMOUNT,
323
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
324
+ )
325
+ ATM_DEPOSIT_MISSING =
326
+ T.let(
327
+ :ATM_DEPOSIT_MISSING,
328
+ Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol
329
+ )
330
+
331
+ sig do
332
+ override.returns(
333
+ T::Array[Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol]
334
+ )
335
+ end
336
+ def self.values
337
+ end
338
+ end
339
+
340
+ # Current lifecycle status of the claim
341
+ module Status
342
+ extend Lithic::Internal::Type::Enum
343
+
344
+ TaggedSymbol =
345
+ T.type_alias do
346
+ T.all(Symbol, Lithic::ClaimCreatedWebhookEvent::Status)
347
+ end
348
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
349
+
350
+ INITIALIZING =
351
+ T.let(
352
+ :INITIALIZING,
353
+ Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol
354
+ )
355
+ AWAITING_INFO =
356
+ T.let(
357
+ :AWAITING_INFO,
358
+ Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol
359
+ )
360
+ SUBMITTED =
361
+ T.let(
362
+ :SUBMITTED,
363
+ Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol
364
+ )
365
+ RESOLVED =
366
+ T.let(
367
+ :RESOLVED,
368
+ Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol
369
+ )
370
+ ABANDONED =
371
+ T.let(
372
+ :ABANDONED,
373
+ Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol
374
+ )
375
+
376
+ sig do
377
+ override.returns(
378
+ T::Array[Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol]
379
+ )
380
+ end
381
+ def self.values
382
+ end
383
+ end
384
+ end
385
+ end
386
+ end