lithic 0.1.0.pre.alpha.29 → 0.1.0.pre.alpha.31

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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/internal/type/enum.rb +6 -3
  5. data/lib/lithic/internal/type/union.rb +5 -2
  6. data/lib/lithic/internal/util.rb +8 -9
  7. data/lib/lithic/models/account_update_params.rb +4 -4
  8. data/lib/lithic/models/auth_rules/v2/backtest_results.rb +100 -28
  9. data/lib/lithic/models/auth_rules/v2_apply_response.rb +401 -10
  10. data/lib/lithic/models/auth_rules/v2_create_params.rb +205 -6
  11. data/lib/lithic/models/auth_rules/v2_create_response.rb +401 -10
  12. data/lib/lithic/models/auth_rules/v2_draft_params.rb +186 -3
  13. data/lib/lithic/models/auth_rules/v2_draft_response.rb +401 -10
  14. data/lib/lithic/models/auth_rules/v2_list_params.rb +27 -8
  15. data/lib/lithic/models/auth_rules/v2_list_response.rb +401 -10
  16. data/lib/lithic/models/auth_rules/v2_promote_response.rb +401 -10
  17. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +401 -10
  18. data/lib/lithic/models/auth_rules/v2_update_response.rb +401 -10
  19. data/lib/lithic/models/funding_event_list_response.rb +26 -22
  20. data/lib/lithic/models/funding_event_retrieve_response.rb +26 -22
  21. data/lib/lithic/models/payment.rb +2 -2
  22. data/lib/lithic/models/required_document.rb +2 -2
  23. data/lib/lithic/models/transaction.rb +2 -1
  24. data/lib/lithic/models.rb +4 -4
  25. data/lib/lithic/resources/auth_rules/v2/backtests.rb +12 -13
  26. data/lib/lithic/resources/auth_rules/v2.rb +45 -39
  27. data/lib/lithic/resources/transfers.rb +2 -0
  28. data/lib/lithic/version.rb +1 -1
  29. data/rbi/lithic/internal/util.rbi +2 -0
  30. data/rbi/lithic/models/account_update_params.rbi +6 -6
  31. data/rbi/lithic/models/auth_rules/v2/backtest_results.rbi +186 -24
  32. data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +895 -7
  33. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +442 -8
  34. data/rbi/lithic/models/auth_rules/v2_create_response.rbi +895 -7
  35. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +414 -4
  36. data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +895 -7
  37. data/rbi/lithic/models/auth_rules/v2_list_params.rbi +60 -7
  38. data/rbi/lithic/models/auth_rules/v2_list_response.rbi +895 -7
  39. data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +895 -7
  40. data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +895 -7
  41. data/rbi/lithic/models/auth_rules/v2_update_response.rbi +895 -7
  42. data/rbi/lithic/models/funding_event_list_response.rbi +35 -28
  43. data/rbi/lithic/models/funding_event_retrieve_response.rbi +35 -28
  44. data/rbi/lithic/models/payment.rbi +3 -3
  45. data/rbi/lithic/models/required_document.rbi +2 -2
  46. data/rbi/lithic/models/transaction.rbi +4 -2
  47. data/rbi/lithic/resources/accounts.rbi +2 -2
  48. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +12 -13
  49. data/rbi/lithic/resources/auth_rules/v2.rbi +49 -38
  50. data/sig/lithic/models/auth_rules/v2/backtest_results.rbs +66 -2
  51. data/sig/lithic/models/auth_rules/v2_apply_response.rbs +280 -1
  52. data/sig/lithic/models/auth_rules/v2_create_params.rbs +135 -1
  53. data/sig/lithic/models/auth_rules/v2_create_response.rbs +280 -1
  54. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +129 -0
  55. data/sig/lithic/models/auth_rules/v2_draft_response.rbs +280 -1
  56. data/sig/lithic/models/auth_rules/v2_list_params.rbs +20 -0
  57. data/sig/lithic/models/auth_rules/v2_list_response.rbs +280 -1
  58. data/sig/lithic/models/auth_rules/v2_promote_response.rbs +280 -1
  59. data/sig/lithic/models/auth_rules/v2_retrieve_response.rbs +280 -1
  60. data/sig/lithic/models/auth_rules/v2_update_response.rbs +280 -1
  61. data/sig/lithic/models/funding_event_list_response.rbs +18 -11
  62. data/sig/lithic/models/funding_event_retrieve_response.rbs +18 -11
  63. data/sig/lithic/resources/auth_rules/v2.rbs +1 -0
  64. metadata +2 -2
@@ -160,7 +160,7 @@ module Lithic
160
160
  end
161
161
 
162
162
  # The total number of historical transactions approved by this rule during the
163
- # backtest period, or the number of transactions that would have been approved if
163
+ # relevant period, or the number of transactions that would have been approved if
164
164
  # the rule was evaluated in shadow mode.
165
165
  sig { returns(T.nilable(Integer)) }
166
166
  attr_reader :approved
@@ -168,8 +168,18 @@ module Lithic
168
168
  sig { params(approved: Integer).void }
169
169
  attr_writer :approved
170
170
 
171
+ # The total number of historical transactions challenged by this rule during the
172
+ # relevant period, or the number of transactions that would have been challenged
173
+ # if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
174
+ # Rules.
175
+ sig { returns(T.nilable(Integer)) }
176
+ attr_reader :challenged
177
+
178
+ sig { params(challenged: Integer).void }
179
+ attr_writer :challenged
180
+
171
181
  # The total number of historical transactions declined by this rule during the
172
- # backtest period, or the number of transactions that would have been declined if
182
+ # relevant period, or the number of transactions that would have been declined if
173
183
  # the rule was evaluated in shadow mode.
174
184
  sig { returns(T.nilable(Integer)) }
175
185
  attr_reader :declined
@@ -177,7 +187,7 @@ module Lithic
177
187
  sig { params(declined: Integer).void }
178
188
  attr_writer :declined
179
189
 
180
- # Example authorization request events that would have been approved or declined.
190
+ # Example events and their outcomes.
181
191
  sig do
182
192
  returns(
183
193
  T.nilable(
@@ -210,6 +220,7 @@ module Lithic
210
220
  sig do
211
221
  params(
212
222
  approved: Integer,
223
+ challenged: Integer,
213
224
  declined: Integer,
214
225
  examples:
215
226
  T::Array[
@@ -220,14 +231,19 @@ module Lithic
220
231
  end
221
232
  def self.new(
222
233
  # The total number of historical transactions approved by this rule during the
223
- # backtest period, or the number of transactions that would have been approved if
234
+ # relevant period, or the number of transactions that would have been approved if
224
235
  # the rule was evaluated in shadow mode.
225
236
  approved: nil,
237
+ # The total number of historical transactions challenged by this rule during the
238
+ # relevant period, or the number of transactions that would have been challenged
239
+ # if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
240
+ # Rules.
241
+ challenged: nil,
226
242
  # The total number of historical transactions declined by this rule during the
227
- # backtest period, or the number of transactions that would have been declined if
243
+ # relevant period, or the number of transactions that would have been declined if
228
244
  # the rule was evaluated in shadow mode.
229
245
  declined: nil,
230
- # Example authorization request events that would have been approved or declined.
246
+ # Example events and their outcomes.
231
247
  examples: nil,
232
248
  # The version of the rule, this is incremented whenever the rule's parameters
233
249
  # change.
@@ -239,6 +255,7 @@ module Lithic
239
255
  override.returns(
240
256
  {
241
257
  approved: Integer,
258
+ challenged: Integer,
242
259
  declined: Integer,
243
260
  examples:
244
261
  T::Array[
@@ -260,21 +277,39 @@ module Lithic
260
277
  )
261
278
  end
262
279
 
263
- # Whether the rule would have approved the authorization request.
280
+ # Whether the rule would have approved the request.
264
281
  sig { returns(T.nilable(T::Boolean)) }
265
282
  attr_reader :approved
266
283
 
267
284
  sig { params(approved: T::Boolean).void }
268
285
  attr_writer :approved
269
286
 
270
- # The authorization request event token.
287
+ # The decision made by the rule for this event.
288
+ sig do
289
+ returns(
290
+ T.nilable(
291
+ Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision::TaggedSymbol
292
+ )
293
+ )
294
+ end
295
+ attr_reader :decision
296
+
297
+ sig do
298
+ params(
299
+ decision:
300
+ Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision::OrSymbol
301
+ ).void
302
+ end
303
+ attr_writer :decision
304
+
305
+ # The event token.
271
306
  sig { returns(T.nilable(String)) }
272
307
  attr_reader :event_token
273
308
 
274
309
  sig { params(event_token: String).void }
275
310
  attr_writer :event_token
276
311
 
277
- # The timestamp of the authorization request event.
312
+ # The timestamp of the event.
278
313
  sig { returns(T.nilable(Time)) }
279
314
  attr_reader :timestamp
280
315
 
@@ -284,16 +319,20 @@ module Lithic
284
319
  sig do
285
320
  params(
286
321
  approved: T::Boolean,
322
+ decision:
323
+ Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision::OrSymbol,
287
324
  event_token: String,
288
325
  timestamp: Time
289
326
  ).returns(T.attached_class)
290
327
  end
291
328
  def self.new(
292
- # Whether the rule would have approved the authorization request.
329
+ # Whether the rule would have approved the request.
293
330
  approved: nil,
294
- # The authorization request event token.
331
+ # The decision made by the rule for this event.
332
+ decision: nil,
333
+ # The event token.
295
334
  event_token: nil,
296
- # The timestamp of the authorization request event.
335
+ # The timestamp of the event.
297
336
  timestamp: nil
298
337
  )
299
338
  end
@@ -302,6 +341,8 @@ module Lithic
302
341
  override.returns(
303
342
  {
304
343
  approved: T::Boolean,
344
+ decision:
345
+ Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision::TaggedSymbol,
305
346
  event_token: String,
306
347
  timestamp: Time
307
348
  }
@@ -309,6 +350,46 @@ module Lithic
309
350
  end
310
351
  def to_hash
311
352
  end
353
+
354
+ # The decision made by the rule for this event.
355
+ module Decision
356
+ extend Lithic::Internal::Type::Enum
357
+
358
+ TaggedSymbol =
359
+ T.type_alias do
360
+ T.all(
361
+ Symbol,
362
+ Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision
363
+ )
364
+ end
365
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
366
+
367
+ APPROVED =
368
+ T.let(
369
+ :APPROVED,
370
+ Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision::TaggedSymbol
371
+ )
372
+ DECLINED =
373
+ T.let(
374
+ :DECLINED,
375
+ Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision::TaggedSymbol
376
+ )
377
+ CHALLENGED =
378
+ T.let(
379
+ :CHALLENGED,
380
+ Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision::TaggedSymbol
381
+ )
382
+
383
+ sig do
384
+ override.returns(
385
+ T::Array[
386
+ Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision::TaggedSymbol
387
+ ]
388
+ )
389
+ end
390
+ def self.values
391
+ end
392
+ end
312
393
  end
313
394
  end
314
395
 
@@ -322,7 +403,7 @@ module Lithic
322
403
  end
323
404
 
324
405
  # The total number of historical transactions approved by this rule during the
325
- # backtest period, or the number of transactions that would have been approved if
406
+ # relevant period, or the number of transactions that would have been approved if
326
407
  # the rule was evaluated in shadow mode.
327
408
  sig { returns(T.nilable(Integer)) }
328
409
  attr_reader :approved
@@ -330,8 +411,18 @@ module Lithic
330
411
  sig { params(approved: Integer).void }
331
412
  attr_writer :approved
332
413
 
414
+ # The total number of historical transactions challenged by this rule during the
415
+ # relevant period, or the number of transactions that would have been challenged
416
+ # if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
417
+ # Rules.
418
+ sig { returns(T.nilable(Integer)) }
419
+ attr_reader :challenged
420
+
421
+ sig { params(challenged: Integer).void }
422
+ attr_writer :challenged
423
+
333
424
  # The total number of historical transactions declined by this rule during the
334
- # backtest period, or the number of transactions that would have been declined if
425
+ # relevant period, or the number of transactions that would have been declined if
335
426
  # the rule was evaluated in shadow mode.
336
427
  sig { returns(T.nilable(Integer)) }
337
428
  attr_reader :declined
@@ -339,7 +430,7 @@ module Lithic
339
430
  sig { params(declined: Integer).void }
340
431
  attr_writer :declined
341
432
 
342
- # Example authorization request events that would have been approved or declined.
433
+ # Example events and their outcomes.
343
434
  sig do
344
435
  returns(
345
436
  T.nilable(
@@ -372,6 +463,7 @@ module Lithic
372
463
  sig do
373
464
  params(
374
465
  approved: Integer,
466
+ challenged: Integer,
375
467
  declined: Integer,
376
468
  examples:
377
469
  T::Array[
@@ -382,14 +474,19 @@ module Lithic
382
474
  end
383
475
  def self.new(
384
476
  # The total number of historical transactions approved by this rule during the
385
- # backtest period, or the number of transactions that would have been approved if
477
+ # relevant period, or the number of transactions that would have been approved if
386
478
  # the rule was evaluated in shadow mode.
387
479
  approved: nil,
480
+ # The total number of historical transactions challenged by this rule during the
481
+ # relevant period, or the number of transactions that would have been challenged
482
+ # if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
483
+ # Rules.
484
+ challenged: nil,
388
485
  # The total number of historical transactions declined by this rule during the
389
- # backtest period, or the number of transactions that would have been declined if
486
+ # relevant period, or the number of transactions that would have been declined if
390
487
  # the rule was evaluated in shadow mode.
391
488
  declined: nil,
392
- # Example authorization request events that would have been approved or declined.
489
+ # Example events and their outcomes.
393
490
  examples: nil,
394
491
  # The version of the rule, this is incremented whenever the rule's parameters
395
492
  # change.
@@ -401,6 +498,7 @@ module Lithic
401
498
  override.returns(
402
499
  {
403
500
  approved: Integer,
501
+ challenged: Integer,
404
502
  declined: Integer,
405
503
  examples:
406
504
  T::Array[
@@ -422,21 +520,39 @@ module Lithic
422
520
  )
423
521
  end
424
522
 
425
- # Whether the rule would have approved the authorization request.
523
+ # Whether the rule would have approved the request.
426
524
  sig { returns(T.nilable(T::Boolean)) }
427
525
  attr_reader :approved
428
526
 
429
527
  sig { params(approved: T::Boolean).void }
430
528
  attr_writer :approved
431
529
 
432
- # The authorization request event token.
530
+ # The decision made by the rule for this event.
531
+ sig do
532
+ returns(
533
+ T.nilable(
534
+ Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision::TaggedSymbol
535
+ )
536
+ )
537
+ end
538
+ attr_reader :decision
539
+
540
+ sig do
541
+ params(
542
+ decision:
543
+ Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision::OrSymbol
544
+ ).void
545
+ end
546
+ attr_writer :decision
547
+
548
+ # The event token.
433
549
  sig { returns(T.nilable(String)) }
434
550
  attr_reader :event_token
435
551
 
436
552
  sig { params(event_token: String).void }
437
553
  attr_writer :event_token
438
554
 
439
- # The timestamp of the authorization request event.
555
+ # The timestamp of the event.
440
556
  sig { returns(T.nilable(Time)) }
441
557
  attr_reader :timestamp
442
558
 
@@ -446,16 +562,20 @@ module Lithic
446
562
  sig do
447
563
  params(
448
564
  approved: T::Boolean,
565
+ decision:
566
+ Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision::OrSymbol,
449
567
  event_token: String,
450
568
  timestamp: Time
451
569
  ).returns(T.attached_class)
452
570
  end
453
571
  def self.new(
454
- # Whether the rule would have approved the authorization request.
572
+ # Whether the rule would have approved the request.
455
573
  approved: nil,
456
- # The authorization request event token.
574
+ # The decision made by the rule for this event.
575
+ decision: nil,
576
+ # The event token.
457
577
  event_token: nil,
458
- # The timestamp of the authorization request event.
578
+ # The timestamp of the event.
459
579
  timestamp: nil
460
580
  )
461
581
  end
@@ -464,6 +584,8 @@ module Lithic
464
584
  override.returns(
465
585
  {
466
586
  approved: T::Boolean,
587
+ decision:
588
+ Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision::TaggedSymbol,
467
589
  event_token: String,
468
590
  timestamp: Time
469
591
  }
@@ -471,6 +593,46 @@ module Lithic
471
593
  end
472
594
  def to_hash
473
595
  end
596
+
597
+ # The decision made by the rule for this event.
598
+ module Decision
599
+ extend Lithic::Internal::Type::Enum
600
+
601
+ TaggedSymbol =
602
+ T.type_alias do
603
+ T.all(
604
+ Symbol,
605
+ Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision
606
+ )
607
+ end
608
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
609
+
610
+ APPROVED =
611
+ T.let(
612
+ :APPROVED,
613
+ Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision::TaggedSymbol
614
+ )
615
+ DECLINED =
616
+ T.let(
617
+ :DECLINED,
618
+ Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision::TaggedSymbol
619
+ )
620
+ CHALLENGED =
621
+ T.let(
622
+ :CHALLENGED,
623
+ Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision::TaggedSymbol
624
+ )
625
+
626
+ sig do
627
+ override.returns(
628
+ T::Array[
629
+ Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision::TaggedSymbol
630
+ ]
631
+ )
632
+ end
633
+ def self.values
634
+ end
635
+ end
474
636
  end
475
637
  end
476
638
  end