lithic 0.4.0 → 0.5.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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/README.md +10 -1
  4. data/lib/lithic/internal/transport/pooled_net_requester.rb +1 -1
  5. data/lib/lithic/internal/util.rb +1 -1
  6. data/lib/lithic/models/account_holder.rb +14 -5
  7. data/lib/lithic/models/account_holder_create_params.rb +10 -1
  8. data/lib/lithic/models/account_holder_simulate_enrollment_review_params.rb +1 -0
  9. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +14 -5
  10. data/lib/lithic/models/account_holder_update_params.rb +10 -1
  11. data/lib/lithic/models/account_holder_update_response.rb +14 -5
  12. data/lib/lithic/models/account_holder_updated_webhook_event.rb +10 -1
  13. data/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +3 -3
  14. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +47 -21
  15. data/lib/lithic/models/auth_rules/v2_list_results_params.rb +70 -0
  16. data/lib/lithic/models/auth_rules/v2_list_results_response.rb +740 -0
  17. data/lib/lithic/models/book_transfer_create_params.rb +9 -1
  18. data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +178 -25
  19. data/lib/lithic/models/kyb.rb +10 -1
  20. data/lib/lithic/models/parsed_webhook_event.rb +10 -1
  21. data/lib/lithic/resources/account_holders.rb +6 -2
  22. data/lib/lithic/resources/auth_rules/v2.rb +42 -0
  23. data/lib/lithic/resources/book_transfers.rb +3 -1
  24. data/lib/lithic/version.rb +1 -1
  25. data/lib/lithic.rb +2 -0
  26. data/rbi/lithic/internal/util.rbi +1 -1
  27. data/rbi/lithic/models/account_holder.rbi +19 -6
  28. data/rbi/lithic/models/account_holder_create_params.rbi +13 -0
  29. data/rbi/lithic/models/account_holder_simulate_enrollment_review_params.rbi +5 -0
  30. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +19 -6
  31. data/rbi/lithic/models/account_holder_update_params.rbi +13 -0
  32. data/rbi/lithic/models/account_holder_update_response.rbi +19 -6
  33. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +13 -0
  34. data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +3 -3
  35. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +69 -30
  36. data/rbi/lithic/models/auth_rules/v2_list_results_params.rbi +112 -0
  37. data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +1826 -0
  38. data/rbi/lithic/models/book_transfer_create_params.rbi +11 -0
  39. data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +337 -36
  40. data/rbi/lithic/models/kyb.rbi +13 -0
  41. data/rbi/lithic/models/parsed_webhook_event.rbi +13 -0
  42. data/rbi/lithic/resources/account_holders.rbi +8 -0
  43. data/rbi/lithic/resources/auth_rules/v2.rbi +42 -0
  44. data/rbi/lithic/resources/book_transfers.rbi +3 -0
  45. data/sig/lithic/models/account_holder.rbs +7 -0
  46. data/sig/lithic/models/account_holder_create_params.rbs +7 -0
  47. data/sig/lithic/models/account_holder_simulate_enrollment_review_params.rbs +2 -1
  48. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +7 -0
  49. data/sig/lithic/models/account_holder_update_params.rbs +7 -0
  50. data/sig/lithic/models/account_holder_update_response.rbs +7 -0
  51. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +7 -0
  52. data/sig/lithic/models/auth_rules/v2_list_results_params.rbs +65 -0
  53. data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +752 -0
  54. data/sig/lithic/models/book_transfer_create_params.rbs +7 -0
  55. data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +96 -0
  56. data/sig/lithic/models/kyb.rbs +7 -0
  57. data/sig/lithic/models/parsed_webhook_event.rbs +7 -0
  58. data/sig/lithic/resources/account_holders.rbs +2 -0
  59. data/sig/lithic/resources/auth_rules/v2.rbs +10 -0
  60. data/sig/lithic/resources/book_transfers.rbs +1 -0
  61. metadata +8 -2
@@ -52,6 +52,13 @@ module Lithic
52
52
  sig { params(external_id: String).void }
53
53
  attr_writer :external_id
54
54
 
55
+ # Token of an existing hold to settle when this transfer is initiated
56
+ sig { returns(T.nilable(String)) }
57
+ attr_reader :hold_token
58
+
59
+ sig { params(hold_token: String).void }
60
+ attr_writer :hold_token
61
+
55
62
  # Optional descriptor for the transfer.
56
63
  sig { returns(T.nilable(String)) }
57
64
  attr_reader :memo
@@ -85,6 +92,7 @@ module Lithic
85
92
  type: Lithic::BookTransferCreateParams::Type::OrSymbol,
86
93
  token: String,
87
94
  external_id: String,
95
+ hold_token: String,
88
96
  memo: String,
89
97
  on_closed_account:
90
98
  Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol,
@@ -111,6 +119,8 @@ module Lithic
111
119
  token: nil,
112
120
  # External ID defined by the customer
113
121
  external_id: nil,
122
+ # Token of an existing hold to settle when this transfer is initiated
123
+ hold_token: nil,
114
124
  # Optional descriptor for the transfer.
115
125
  memo: nil,
116
126
  # What to do if the financial account is closed when posting an operation
@@ -130,6 +140,7 @@ module Lithic
130
140
  type: Lithic::BookTransferCreateParams::Type::OrSymbol,
131
141
  token: String,
132
142
  external_id: String,
143
+ hold_token: String,
133
144
  memo: String,
134
145
  on_closed_account:
135
146
  Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol,
@@ -21,14 +21,33 @@ module Lithic
21
21
  sig { returns(Integer) }
22
22
  attr_accessor :acquirer_fee
23
23
 
24
- # Authorization amount of the transaction (in cents), including any acquirer fees.
25
- # The contents of this field are identical to `authorization_amount`.
24
+ # Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
25
+ # including any acquirer fees. The contents of this field are identical to
26
+ # `authorization_amount`.
26
27
  sig { returns(Integer) }
27
28
  attr_accessor :amount
28
29
 
29
- # The base transaction amount (in cents) plus the acquirer fee field. This is the
30
- # amount the issuer should authorize against unless the issuer is paying the
31
- # acquirer fee on behalf of the cardholder.
30
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
31
+ # amounts reflect the original network authorization values. For programs with
32
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
33
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
34
+ # anticipated final transaction amounts such as tips or fuel fill-ups
35
+ sig do
36
+ returns(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts)
37
+ end
38
+ attr_reader :amounts
39
+
40
+ sig do
41
+ params(
42
+ amounts:
43
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::OrHash
44
+ ).void
45
+ end
46
+ attr_writer :amounts
47
+
48
+ # Deprecated, use `amounts`. The base transaction amount (in cents) plus the
49
+ # acquirer fee field. This is the amount the issuer should authorize against
50
+ # unless the issuer is paying the acquirer fee on behalf of the cardholder.
32
51
  sig { returns(Integer) }
33
52
  attr_accessor :authorization_amount
34
53
 
@@ -56,7 +75,8 @@ module Lithic
56
75
  end
57
76
  attr_writer :card
58
77
 
59
- # 3-character alphabetic ISO 4217 code for cardholder's billing currency.
78
+ # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
79
+ # billing currency.
60
80
  sig { returns(String) }
61
81
  attr_accessor :cardholder_currency
62
82
 
@@ -82,11 +102,11 @@ module Lithic
82
102
  sig { params(merchant: Lithic::Merchant::OrHash).void }
83
103
  attr_writer :merchant
84
104
 
85
- # The amount that the merchant will receive, denominated in `merchant_currency`
86
- # and in the smallest currency unit. Note the amount includes `acquirer_fee`,
87
- # similar to `authorization_amount`. It will be different from
88
- # `authorization_amount` if the merchant is taking payment in a different
89
- # currency.
105
+ # Deprecated, use `amounts`. The amount that the merchant will receive,
106
+ # denominated in `merchant_currency` and in the smallest currency unit. Note the
107
+ # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
108
+ # different from `authorization_amount` if the merchant is taking payment in a
109
+ # different currency.
90
110
  sig { returns(Integer) }
91
111
  attr_accessor :merchant_amount
92
112
 
@@ -94,8 +114,8 @@ module Lithic
94
114
  sig { returns(String) }
95
115
  attr_accessor :merchant_currency
96
116
 
97
- # Amount (in cents) of the transaction that has been settled, including any
98
- # acquirer fees
117
+ # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
118
+ # settled, including any acquirer fees.
99
119
  sig { returns(Integer) }
100
120
  attr_accessor :settled_amount
101
121
 
@@ -151,11 +171,11 @@ module Lithic
151
171
  sig { params(cashback: Integer).void }
152
172
  attr_writer :cashback
153
173
 
154
- # If the transaction was requested in a currency other than the settlement
155
- # currency, this field will be populated to indicate the rate used to translate
156
- # the merchant_amount to the amount (i.e., `merchant_amount` x `conversion_rate` =
157
- # `amount`). Note that the `merchant_amount` is in the local currency and the
158
- # amount is in the settlement currency.
174
+ # Deprecated, use `amounts`. If the transaction was requested in a currency other
175
+ # than the settlement currency, this field will be populated to indicate the rate
176
+ # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
177
+ # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
178
+ # currency and the amount is in the settlement currency.
159
179
  sig { returns(T.nilable(Float)) }
160
180
  attr_reader :conversion_rate
161
181
 
@@ -293,6 +313,8 @@ module Lithic
293
313
  token: String,
294
314
  acquirer_fee: Integer,
295
315
  amount: Integer,
316
+ amounts:
317
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::OrHash,
296
318
  authorization_amount: Integer,
297
319
  avs:
298
320
  Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::OrHash,
@@ -342,17 +364,25 @@ module Lithic
342
364
  # zero if no fee is assessed. Rebates may be transmitted as a negative value to
343
365
  # indicate credited fees.
344
366
  acquirer_fee:,
345
- # Authorization amount of the transaction (in cents), including any acquirer fees.
346
- # The contents of this field are identical to `authorization_amount`.
367
+ # Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
368
+ # including any acquirer fees. The contents of this field are identical to
369
+ # `authorization_amount`.
347
370
  amount:,
348
- # The base transaction amount (in cents) plus the acquirer fee field. This is the
349
- # amount the issuer should authorize against unless the issuer is paying the
350
- # acquirer fee on behalf of the cardholder.
371
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
372
+ # amounts reflect the original network authorization values. For programs with
373
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
374
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
375
+ # anticipated final transaction amounts such as tips or fuel fill-ups
376
+ amounts:,
377
+ # Deprecated, use `amounts`. The base transaction amount (in cents) plus the
378
+ # acquirer fee field. This is the amount the issuer should authorize against
379
+ # unless the issuer is paying the acquirer fee on behalf of the cardholder.
351
380
  authorization_amount:,
352
381
  avs:,
353
382
  # Card object in ASA
354
383
  card:,
355
- # 3-character alphabetic ISO 4217 code for cardholder's billing currency.
384
+ # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
385
+ # billing currency.
356
386
  cardholder_currency:,
357
387
  # The portion of the transaction requested as cash back by the cardholder, and
358
388
  # does not include any acquirer fees. The amount field includes the purchase
@@ -364,16 +394,16 @@ module Lithic
364
394
  # Date and time when the transaction first occurred in UTC.
365
395
  created:,
366
396
  merchant:,
367
- # The amount that the merchant will receive, denominated in `merchant_currency`
368
- # and in the smallest currency unit. Note the amount includes `acquirer_fee`,
369
- # similar to `authorization_amount`. It will be different from
370
- # `authorization_amount` if the merchant is taking payment in a different
371
- # currency.
397
+ # Deprecated, use `amounts`. The amount that the merchant will receive,
398
+ # denominated in `merchant_currency` and in the smallest currency unit. Note the
399
+ # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
400
+ # different from `authorization_amount` if the merchant is taking payment in a
401
+ # different currency.
372
402
  merchant_amount:,
373
403
  # 3-character alphabetic ISO 4217 code for the local currency of the transaction.
374
404
  merchant_currency:,
375
- # Amount (in cents) of the transaction that has been settled, including any
376
- # acquirer fees
405
+ # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
406
+ # settled, including any acquirer fees.
377
407
  settled_amount:,
378
408
  # The type of authorization request that this request is for. Note that
379
409
  # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
@@ -385,11 +415,11 @@ module Lithic
385
415
  cardholder_authentication: nil,
386
416
  # Deprecated, use `cash_amount`.
387
417
  cashback: nil,
388
- # If the transaction was requested in a currency other than the settlement
389
- # currency, this field will be populated to indicate the rate used to translate
390
- # the merchant_amount to the amount (i.e., `merchant_amount` x `conversion_rate` =
391
- # `amount`). Note that the `merchant_amount` is in the local currency and the
392
- # amount is in the settlement currency.
418
+ # Deprecated, use `amounts`. If the transaction was requested in a currency other
419
+ # than the settlement currency, this field will be populated to indicate the rate
420
+ # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
421
+ # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
422
+ # currency and the amount is in the settlement currency.
393
423
  conversion_rate: nil,
394
424
  # The event token associated with the authorization. This field is only set for
395
425
  # programs enrolled into the beta.
@@ -429,6 +459,8 @@ module Lithic
429
459
  token: String,
430
460
  acquirer_fee: Integer,
431
461
  amount: Integer,
462
+ amounts:
463
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts,
432
464
  authorization_amount: Integer,
433
465
  avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs,
434
466
  card: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card,
@@ -472,6 +504,275 @@ module Lithic
472
504
  def to_hash
473
505
  end
474
506
 
507
+ class Amounts < Lithic::Internal::Type::BaseModel
508
+ OrHash =
509
+ T.type_alias do
510
+ T.any(
511
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts,
512
+ Lithic::Internal::AnyHash
513
+ )
514
+ end
515
+
516
+ sig do
517
+ returns(
518
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder
519
+ )
520
+ end
521
+ attr_reader :cardholder
522
+
523
+ sig do
524
+ params(
525
+ cardholder:
526
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder::OrHash
527
+ ).void
528
+ end
529
+ attr_writer :cardholder
530
+
531
+ sig do
532
+ returns(
533
+ T.nilable(
534
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold
535
+ )
536
+ )
537
+ end
538
+ attr_reader :hold
539
+
540
+ sig do
541
+ params(
542
+ hold:
543
+ T.nilable(
544
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold::OrHash
545
+ )
546
+ ).void
547
+ end
548
+ attr_writer :hold
549
+
550
+ sig do
551
+ returns(
552
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant
553
+ )
554
+ end
555
+ attr_reader :merchant
556
+
557
+ sig do
558
+ params(
559
+ merchant:
560
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant::OrHash
561
+ ).void
562
+ end
563
+ attr_writer :merchant
564
+
565
+ sig do
566
+ returns(
567
+ T.nilable(
568
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement
569
+ )
570
+ )
571
+ end
572
+ attr_reader :settlement
573
+
574
+ sig do
575
+ params(
576
+ settlement:
577
+ T.nilable(
578
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement::OrHash
579
+ )
580
+ ).void
581
+ end
582
+ attr_writer :settlement
583
+
584
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
585
+ # amounts reflect the original network authorization values. For programs with
586
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
587
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
588
+ # anticipated final transaction amounts such as tips or fuel fill-ups
589
+ sig do
590
+ params(
591
+ cardholder:
592
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder::OrHash,
593
+ hold:
594
+ T.nilable(
595
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold::OrHash
596
+ ),
597
+ merchant:
598
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant::OrHash,
599
+ settlement:
600
+ T.nilable(
601
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement::OrHash
602
+ )
603
+ ).returns(T.attached_class)
604
+ end
605
+ def self.new(cardholder:, hold:, merchant:, settlement:)
606
+ end
607
+
608
+ sig do
609
+ override.returns(
610
+ {
611
+ cardholder:
612
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder,
613
+ hold:
614
+ T.nilable(
615
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold
616
+ ),
617
+ merchant:
618
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant,
619
+ settlement:
620
+ T.nilable(
621
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement
622
+ )
623
+ }
624
+ )
625
+ end
626
+ def to_hash
627
+ end
628
+
629
+ class Cardholder < Lithic::Internal::Type::BaseModel
630
+ OrHash =
631
+ T.type_alias do
632
+ T.any(
633
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder,
634
+ Lithic::Internal::AnyHash
635
+ )
636
+ end
637
+
638
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
639
+ sig { returns(Integer) }
640
+ attr_accessor :amount
641
+
642
+ # Exchange rate used for currency conversion
643
+ sig { returns(String) }
644
+ attr_accessor :conversion_rate
645
+
646
+ # 3-character alphabetic ISO 4217 currency
647
+ sig { returns(String) }
648
+ attr_accessor :currency
649
+
650
+ sig do
651
+ params(
652
+ amount: Integer,
653
+ conversion_rate: String,
654
+ currency: String
655
+ ).returns(T.attached_class)
656
+ end
657
+ def self.new(
658
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
659
+ amount:,
660
+ # Exchange rate used for currency conversion
661
+ conversion_rate:,
662
+ # 3-character alphabetic ISO 4217 currency
663
+ currency:
664
+ )
665
+ end
666
+
667
+ sig do
668
+ override.returns(
669
+ { amount: Integer, conversion_rate: String, currency: String }
670
+ )
671
+ end
672
+ def to_hash
673
+ end
674
+ end
675
+
676
+ class Hold < Lithic::Internal::Type::BaseModel
677
+ OrHash =
678
+ T.type_alias do
679
+ T.any(
680
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold,
681
+ Lithic::Internal::AnyHash
682
+ )
683
+ end
684
+
685
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
686
+ sig { returns(Integer) }
687
+ attr_accessor :amount
688
+
689
+ # 3-character alphabetic ISO 4217 currency
690
+ sig { returns(String) }
691
+ attr_accessor :currency
692
+
693
+ sig do
694
+ params(amount: Integer, currency: String).returns(T.attached_class)
695
+ end
696
+ def self.new(
697
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
698
+ amount:,
699
+ # 3-character alphabetic ISO 4217 currency
700
+ currency:
701
+ )
702
+ end
703
+
704
+ sig { override.returns({ amount: Integer, currency: String }) }
705
+ def to_hash
706
+ end
707
+ end
708
+
709
+ class Merchant < Lithic::Internal::Type::BaseModel
710
+ OrHash =
711
+ T.type_alias do
712
+ T.any(
713
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant,
714
+ Lithic::Internal::AnyHash
715
+ )
716
+ end
717
+
718
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
719
+ sig { returns(Integer) }
720
+ attr_accessor :amount
721
+
722
+ # 3-character alphabetic ISO 4217 currency
723
+ sig { returns(String) }
724
+ attr_accessor :currency
725
+
726
+ sig do
727
+ params(amount: Integer, currency: String).returns(T.attached_class)
728
+ end
729
+ def self.new(
730
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
731
+ amount:,
732
+ # 3-character alphabetic ISO 4217 currency
733
+ currency:
734
+ )
735
+ end
736
+
737
+ sig { override.returns({ amount: Integer, currency: String }) }
738
+ def to_hash
739
+ end
740
+ end
741
+
742
+ class Settlement < Lithic::Internal::Type::BaseModel
743
+ OrHash =
744
+ T.type_alias do
745
+ T.any(
746
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement,
747
+ Lithic::Internal::AnyHash
748
+ )
749
+ end
750
+
751
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
752
+ sig { returns(Integer) }
753
+ attr_accessor :amount
754
+
755
+ # 3-character alphabetic ISO 4217 currency
756
+ sig { returns(String) }
757
+ attr_accessor :currency
758
+
759
+ sig do
760
+ params(amount: Integer, currency: String).returns(T.attached_class)
761
+ end
762
+ def self.new(
763
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
764
+ amount:,
765
+ # 3-character alphabetic ISO 4217 currency
766
+ currency:
767
+ )
768
+ end
769
+
770
+ sig { override.returns({ amount: Integer, currency: String }) }
771
+ def to_hash
772
+ end
773
+ end
774
+ end
775
+
475
776
  class Avs < Lithic::Internal::Type::BaseModel
476
777
  OrHash =
477
778
  T.type_alias do
@@ -81,6 +81,14 @@ module Lithic
81
81
  sig { params(kyb_passed_timestamp: String).void }
82
82
  attr_writer :kyb_passed_timestamp
83
83
 
84
+ # 6-digit North American Industry Classification System (NAICS) code for the
85
+ # business.
86
+ sig { returns(T.nilable(String)) }
87
+ attr_reader :naics_code
88
+
89
+ sig { params(naics_code: String).void }
90
+ attr_writer :naics_code
91
+
84
92
  # Company website URL.
85
93
  sig { returns(T.nilable(String)) }
86
94
  attr_reader :website_url
@@ -101,6 +109,7 @@ module Lithic
101
109
  T::Array[Lithic::KYB::BeneficialOwnerEntity::OrHash],
102
110
  external_id: String,
103
111
  kyb_passed_timestamp: String,
112
+ naics_code: String,
104
113
  website_url: String
105
114
  ).returns(T.attached_class)
106
115
  end
@@ -143,6 +152,9 @@ module Lithic
143
152
  #
144
153
  # This field is required only if workflow type is `KYB_BYO`.
145
154
  kyb_passed_timestamp: nil,
155
+ # 6-digit North American Industry Classification System (NAICS) code for the
156
+ # business.
157
+ naics_code: nil,
146
158
  # Company website URL.
147
159
  website_url: nil
148
160
  )
@@ -162,6 +174,7 @@ module Lithic
162
174
  T::Array[Lithic::KYB::BeneficialOwnerEntity],
163
175
  external_id: String,
164
176
  kyb_passed_timestamp: String,
177
+ naics_code: String,
165
178
  website_url: String
166
179
  }
167
180
  )
@@ -121,6 +121,14 @@ module Lithic
121
121
  sig { params(external_id: String).void }
122
122
  attr_writer :external_id
123
123
 
124
+ # 6-digit North American Industry Classification System (NAICS) code for the
125
+ # business. Only present if naics_code was included in the update request.
126
+ sig { returns(T.nilable(String)) }
127
+ attr_reader :naics_code
128
+
129
+ sig { params(naics_code: String).void }
130
+ attr_writer :naics_code
131
+
124
132
  # Short description of the company's line of business (i.e., what does the company
125
133
  # do?).
126
134
  sig { returns(T.nilable(String)) }
@@ -145,6 +153,7 @@ module Lithic
145
153
  event_type:
146
154
  Lithic::ParsedWebhookEvent::KYBPayload::EventType::OrSymbol,
147
155
  external_id: String,
156
+ naics_code: String,
148
157
  nature_of_business: String,
149
158
  website_url: String
150
159
  ).returns(T.attached_class)
@@ -159,6 +168,9 @@ module Lithic
159
168
  # A user provided id that can be used to link an account holder with an external
160
169
  # system
161
170
  external_id: nil,
171
+ # 6-digit North American Industry Classification System (NAICS) code for the
172
+ # business. Only present if naics_code was included in the update request.
173
+ naics_code: nil,
162
174
  # Short description of the company's line of business (i.e., what does the company
163
175
  # do?).
164
176
  nature_of_business: nil,
@@ -176,6 +188,7 @@ module Lithic
176
188
  event_type:
177
189
  Lithic::ParsedWebhookEvent::KYBPayload::EventType::TaggedSymbol,
178
190
  external_id: String,
191
+ naics_code: String,
179
192
  nature_of_business: String,
180
193
  website_url: String
181
194
  }
@@ -38,6 +38,7 @@ module Lithic
38
38
  ],
39
39
  external_id: String,
40
40
  kyb_passed_timestamp: String,
41
+ naics_code: String,
41
42
  website_url: String,
42
43
  kyc_passed_timestamp: String,
43
44
  business_account_token: String,
@@ -98,6 +99,9 @@ module Lithic
98
99
  #
99
100
  # This field is required only if workflow type is `KYB_BYO`.
100
101
  kyb_passed_timestamp: nil,
102
+ # 6-digit North American Industry Classification System (NAICS) code for the
103
+ # business.
104
+ naics_code: nil,
101
105
  # Company website URL.
102
106
  website_url: nil,
103
107
  # An RFC 3339 timestamp indicating when precomputed KYC was completed on the
@@ -154,6 +158,7 @@ module Lithic
154
158
  control_person:
155
159
  Lithic::AccountHolderUpdateParams::ControlPerson::OrHash,
156
160
  external_id: String,
161
+ naics_code: String,
157
162
  nature_of_business: String,
158
163
  website_url: String,
159
164
  individual: Lithic::AccountHolderUpdateParams::Individual::OrHash,
@@ -194,6 +199,9 @@ module Lithic
194
199
  # A user provided id that can be used to link an account holder with an external
195
200
  # system
196
201
  external_id: nil,
202
+ # 6-digit North American Industry Classification System (NAICS) code for the
203
+ # business.
204
+ naics_code: nil,
197
205
  # Short description of the company's line of business (i.e., what does the company
198
206
  # do?).
199
207
  nature_of_business: nil,
@@ -198,6 +198,48 @@ module Lithic
198
198
  )
199
199
  end
200
200
 
201
+ # Lists Auth Rule evaluation results.
202
+ #
203
+ # **Limitations:**
204
+ #
205
+ # - Results are available for the past 3 months only
206
+ # - At least one filter (`event_token` or `auth_rule_token`) must be provided
207
+ # - When filtering by `event_token`, pagination is not supported
208
+ sig do
209
+ params(
210
+ auth_rule_token: String,
211
+ ending_before: String,
212
+ event_token: String,
213
+ has_actions: T::Boolean,
214
+ page_size: Integer,
215
+ starting_after: String,
216
+ request_options: Lithic::RequestOptions::OrHash
217
+ ).returns(
218
+ Lithic::Internal::CursorPage[
219
+ Lithic::Models::AuthRules::V2ListResultsResponse::Variants
220
+ ]
221
+ )
222
+ end
223
+ def list_results(
224
+ # Filter by Auth Rule token
225
+ auth_rule_token: nil,
226
+ # A cursor representing an item's token before which a page of results should end.
227
+ # Used to retrieve the previous page of results before this item.
228
+ ending_before: nil,
229
+ # Filter by event token
230
+ event_token: nil,
231
+ # Filter by whether the rule evaluation produced any actions. When not provided,
232
+ # all results are returned.
233
+ has_actions: nil,
234
+ # Page size (for pagination).
235
+ page_size: nil,
236
+ # A cursor representing an item's token after which a page of results should
237
+ # begin. Used to retrieve the next page of results after this item.
238
+ starting_after: nil,
239
+ request_options: {}
240
+ )
241
+ end
242
+
201
243
  # Promotes the draft version of an Auth rule to the currently active version such
202
244
  # that it is enforced in the respective stream.
203
245
  sig do
@@ -15,6 +15,7 @@ module Lithic
15
15
  type: Lithic::BookTransferCreateParams::Type::OrSymbol,
16
16
  token: String,
17
17
  external_id: String,
18
+ hold_token: String,
18
19
  memo: String,
19
20
  on_closed_account:
20
21
  Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol,
@@ -41,6 +42,8 @@ module Lithic
41
42
  token: nil,
42
43
  # External ID defined by the customer
43
44
  external_id: nil,
45
+ # Token of an existing hold to settle when this transfer is initiated
46
+ hold_token: nil,
44
47
  # Optional descriptor for the transfer.
45
48
  memo: nil,
46
49
  # What to do if the financial account is closed when posting an operation