modern_treasury 0.5.0 → 0.7.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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +49 -0
  3. data/README.md +9 -9
  4. data/lib/modern_treasury/errors.rb +25 -11
  5. data/lib/modern_treasury/file_part.rb +10 -7
  6. data/lib/modern_treasury/internal/page.rb +3 -3
  7. data/lib/modern_treasury/internal/transport/base_client.rb +11 -7
  8. data/lib/modern_treasury/internal/transport/pooled_net_requester.rb +7 -10
  9. data/lib/modern_treasury/internal/type/base_page.rb +1 -1
  10. data/lib/modern_treasury/internal/type/file_input.rb +7 -4
  11. data/lib/modern_treasury/internal/util.rb +5 -5
  12. data/lib/modern_treasury/models/bulk_request_create_params.rb +155 -2
  13. data/lib/modern_treasury/models/counterparty.rb +5 -18
  14. data/lib/modern_treasury/models/counterparty_create_params.rb +7 -16
  15. data/lib/modern_treasury/models/incoming_payment_detail.rb +23 -1
  16. data/lib/modern_treasury/models/internal_account.rb +25 -1
  17. data/lib/modern_treasury/models/internal_account_list_params.rb +23 -1
  18. data/lib/modern_treasury/models/invoice_list_params.rb +17 -1
  19. data/lib/modern_treasury/models/line_item.rb +55 -1
  20. data/lib/modern_treasury/models/payment_order.rb +226 -1
  21. data/lib/modern_treasury/models/payment_order_create_async_params.rb +72 -1
  22. data/lib/modern_treasury/models/payment_order_create_params.rb +71 -1
  23. data/lib/modern_treasury/models/payment_order_list_params.rb +1 -0
  24. data/lib/modern_treasury/models/payment_order_update_params.rb +72 -1
  25. data/lib/modern_treasury/models/payment_orders/reversal.rb +24 -1
  26. data/lib/modern_treasury/models/payment_reference.rb +1 -0
  27. data/lib/modern_treasury/models/return_create_params.rb +21 -1
  28. data/lib/modern_treasury/models/return_object.rb +25 -1
  29. data/lib/modern_treasury/models/transaction.rb +1 -0
  30. data/lib/modern_treasury/resources/counterparties.rb +1 -1
  31. data/lib/modern_treasury/resources/internal_accounts.rb +3 -1
  32. data/lib/modern_treasury/resources/invoices.rb +5 -1
  33. data/lib/modern_treasury/resources/payment_orders.rb +21 -3
  34. data/lib/modern_treasury/resources/returns.rb +3 -1
  35. data/lib/modern_treasury/version.rb +1 -1
  36. data/rbi/modern_treasury/errors.rbi +29 -2
  37. data/rbi/modern_treasury/file_part.rbi +1 -1
  38. data/rbi/modern_treasury/internal/transport/base_client.rbi +4 -5
  39. data/rbi/modern_treasury/internal/type/base_page.rbi +1 -1
  40. data/rbi/modern_treasury/internal/util.rbi +1 -1
  41. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +289 -0
  42. data/rbi/modern_treasury/models/counterparty.rbi +3 -49
  43. data/rbi/modern_treasury/models/counterparty_create_params.rbi +4 -62
  44. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +54 -0
  45. data/rbi/modern_treasury/models/internal_account.rbi +52 -0
  46. data/rbi/modern_treasury/models/internal_account_list_params.rbi +66 -0
  47. data/rbi/modern_treasury/models/invoice_list_params.rbi +22 -0
  48. data/rbi/modern_treasury/models/line_item.rbi +69 -0
  49. data/rbi/modern_treasury/models/payment_order.rbi +374 -0
  50. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +140 -0
  51. data/rbi/modern_treasury/models/payment_order_create_params.rbi +137 -0
  52. data/rbi/modern_treasury/models/payment_order_list_params.rbi +5 -0
  53. data/rbi/modern_treasury/models/payment_order_update_params.rbi +142 -0
  54. data/rbi/modern_treasury/models/payment_orders/reversal.rbi +54 -0
  55. data/rbi/modern_treasury/models/payment_reference.rbi +5 -0
  56. data/rbi/modern_treasury/models/return_create_params.rbi +64 -0
  57. data/rbi/modern_treasury/models/return_object.rbi +58 -0
  58. data/rbi/modern_treasury/models/transaction.rbi +5 -0
  59. data/rbi/modern_treasury/resources/counterparties.rbi +1 -2
  60. data/rbi/modern_treasury/resources/internal_accounts.rbi +3 -0
  61. data/rbi/modern_treasury/resources/invoices.rbi +6 -0
  62. data/rbi/modern_treasury/resources/payment_orders.rbi +33 -0
  63. data/rbi/modern_treasury/resources/returns.rbi +4 -0
  64. data/sig/modern_treasury/errors.rbs +7 -0
  65. data/sig/modern_treasury/file_part.rbs +1 -1
  66. data/sig/modern_treasury/models/bulk_request_create_params.rbs +98 -0
  67. data/sig/modern_treasury/models/counterparty.rbs +4 -18
  68. data/sig/modern_treasury/models/counterparty_create_params.rbs +5 -21
  69. data/sig/modern_treasury/models/incoming_payment_detail.rbs +18 -0
  70. data/sig/modern_treasury/models/internal_account.rbs +20 -0
  71. data/sig/modern_treasury/models/internal_account_list_params.rbs +25 -1
  72. data/sig/modern_treasury/models/invoice_list_params.rbs +14 -0
  73. data/sig/modern_treasury/models/line_item.rbs +22 -0
  74. data/sig/modern_treasury/models/payment_order.rbs +154 -0
  75. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +48 -0
  76. data/sig/modern_treasury/models/payment_order_create_params.rbs +48 -0
  77. data/sig/modern_treasury/models/payment_order_list_params.rbs +2 -0
  78. data/sig/modern_treasury/models/payment_order_update_params.rbs +50 -0
  79. data/sig/modern_treasury/models/payment_orders/reversal.rbs +18 -0
  80. data/sig/modern_treasury/models/payment_reference.rbs +2 -0
  81. data/sig/modern_treasury/models/return_create_params.rbs +23 -1
  82. data/sig/modern_treasury/models/return_object.rbs +22 -0
  83. data/sig/modern_treasury/models/transaction.rbs +2 -0
  84. data/sig/modern_treasury/resources/counterparties.rbs +1 -1
  85. data/sig/modern_treasury/resources/internal_accounts.rbs +1 -0
  86. data/sig/modern_treasury/resources/invoices.rbs +2 -0
  87. data/sig/modern_treasury/resources/payment_orders.rbs +9 -0
  88. data/sig/modern_treasury/resources/returns.rbs +1 -0
  89. metadata +2 -2
@@ -38,11 +38,29 @@ module ModernTreasury
38
38
  sig { returns(ModernTreasury::PaymentOrderType::OrSymbol) }
39
39
  attr_accessor :type
40
40
 
41
+ sig do
42
+ returns(T.nilable(ModernTreasury::PaymentOrderCreateParams::Accounting))
43
+ end
44
+ attr_reader :accounting
45
+
46
+ sig do
47
+ params(
48
+ accounting:
49
+ ModernTreasury::PaymentOrderCreateParams::Accounting::OrHash
50
+ ).void
51
+ end
52
+ attr_writer :accounting
53
+
41
54
  # The ID of one of your accounting categories. Note that these will only be
42
55
  # accessible if your accounting system has been connected.
43
56
  sig { returns(T.nilable(String)) }
44
57
  attr_accessor :accounting_category_id
45
58
 
59
+ # The ID of one of your accounting ledger classes. Note that these will only be
60
+ # accessible if your accounting system has been connected.
61
+ sig { returns(T.nilable(String)) }
62
+ attr_accessor :accounting_ledger_class_id
63
+
46
64
  # The party that will pay the fees for the payment order. See
47
65
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
48
66
  # differences between the options.
@@ -261,6 +279,24 @@ module ModernTreasury
261
279
  sig { params(receiving_account_id: String).void }
262
280
  attr_writer :receiving_account_id
263
281
 
282
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
283
+ sig do
284
+ returns(
285
+ T.nilable(
286
+ ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus::OrSymbol
287
+ )
288
+ )
289
+ end
290
+ attr_reader :reconciliation_status
291
+
292
+ sig do
293
+ params(
294
+ reconciliation_status:
295
+ ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus::OrSymbol
296
+ ).void
297
+ end
298
+ attr_writer :reconciliation_status
299
+
264
300
  # For `ach`, this field will be passed through on an addenda record. For `wire`
265
301
  # payments the field will be passed through as the "Originator to Beneficiary
266
302
  # Information", also known as OBI or Fedwire tag 6000.
@@ -319,7 +355,10 @@ module ModernTreasury
319
355
  ModernTreasury::PaymentOrderCreateParams::Direction::OrSymbol,
320
356
  originating_account_id: String,
321
357
  type: ModernTreasury::PaymentOrderType::OrSymbol,
358
+ accounting:
359
+ ModernTreasury::PaymentOrderCreateParams::Accounting::OrHash,
322
360
  accounting_category_id: T.nilable(String),
361
+ accounting_ledger_class_id: T.nilable(String),
323
362
  charge_bearer:
324
363
  T.nilable(
325
364
  ModernTreasury::PaymentOrderCreateParams::ChargeBearer::OrSymbol
@@ -356,6 +395,8 @@ module ModernTreasury
356
395
  receiving_account:
357
396
  ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::OrHash,
358
397
  receiving_account_id: String,
398
+ reconciliation_status:
399
+ ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus::OrSymbol,
359
400
  remittance_information: T.nilable(String),
360
401
  send_remittance_advice: T.nilable(T::Boolean),
361
402
  statement_descriptor: T.nilable(String),
@@ -383,9 +424,13 @@ module ModernTreasury
383
424
  # `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`,
384
425
  # `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
385
426
  type:,
427
+ accounting: nil,
386
428
  # The ID of one of your accounting categories. Note that these will only be
387
429
  # accessible if your accounting system has been connected.
388
430
  accounting_category_id: nil,
431
+ # The ID of one of your accounting ledger classes. Note that these will only be
432
+ # accessible if your accounting system has been connected.
433
+ accounting_ledger_class_id: nil,
389
434
  # The party that will pay the fees for the payment order. See
390
435
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
391
436
  # differences between the options.
@@ -459,6 +504,8 @@ module ModernTreasury
459
504
  # `receiving_account_id`, you may pass the id of an external account or an
460
505
  # internal account.
461
506
  receiving_account_id: nil,
507
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
508
+ reconciliation_status: nil,
462
509
  # For `ach`, this field will be passed through on an addenda record. For `wire`
463
510
  # payments the field will be passed through as the "Originator to Beneficiary
464
511
  # Information", also known as OBI or Fedwire tag 6000.
@@ -501,7 +548,9 @@ module ModernTreasury
501
548
  ModernTreasury::PaymentOrderCreateParams::Direction::OrSymbol,
502
549
  originating_account_id: String,
503
550
  type: ModernTreasury::PaymentOrderType::OrSymbol,
551
+ accounting: ModernTreasury::PaymentOrderCreateParams::Accounting,
504
552
  accounting_category_id: T.nilable(String),
553
+ accounting_ledger_class_id: T.nilable(String),
505
554
  charge_bearer:
506
555
  T.nilable(
507
556
  ModernTreasury::PaymentOrderCreateParams::ChargeBearer::OrSymbol
@@ -533,6 +582,8 @@ module ModernTreasury
533
582
  receiving_account:
534
583
  ModernTreasury::PaymentOrderCreateParams::ReceivingAccount,
535
584
  receiving_account_id: String,
585
+ reconciliation_status:
586
+ ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus::OrSymbol,
536
587
  remittance_information: T.nilable(String),
537
588
  send_remittance_advice: T.nilable(T::Boolean),
538
589
  statement_descriptor: T.nilable(String),
@@ -584,6 +635,52 @@ module ModernTreasury
584
635
  end
585
636
  end
586
637
 
638
+ class Accounting < ModernTreasury::Internal::Type::BaseModel
639
+ OrHash =
640
+ T.type_alias do
641
+ T.any(
642
+ ModernTreasury::PaymentOrderCreateParams::Accounting,
643
+ ModernTreasury::Internal::AnyHash
644
+ )
645
+ end
646
+
647
+ # The ID of one of your accounting categories. Note that these will only be
648
+ # accessible if your accounting system has been connected.
649
+ sig { returns(T.nilable(String)) }
650
+ attr_accessor :account_id
651
+
652
+ # The ID of one of the class objects in your accounting system. Class objects
653
+ # track segments of your business independent of client or project. Note that
654
+ # these will only be accessible if your accounting system has been connected.
655
+ sig { returns(T.nilable(String)) }
656
+ attr_accessor :class_id
657
+
658
+ sig do
659
+ params(
660
+ account_id: T.nilable(String),
661
+ class_id: T.nilable(String)
662
+ ).returns(T.attached_class)
663
+ end
664
+ def self.new(
665
+ # The ID of one of your accounting categories. Note that these will only be
666
+ # accessible if your accounting system has been connected.
667
+ account_id: nil,
668
+ # The ID of one of the class objects in your accounting system. Class objects
669
+ # track segments of your business independent of client or project. Note that
670
+ # these will only be accessible if your accounting system has been connected.
671
+ class_id: nil
672
+ )
673
+ end
674
+
675
+ sig do
676
+ override.returns(
677
+ { account_id: T.nilable(String), class_id: T.nilable(String) }
678
+ )
679
+ end
680
+ def to_hash
681
+ end
682
+ end
683
+
587
684
  # The party that will pay the fees for the payment order. See
588
685
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
589
686
  # differences between the options.
@@ -1758,6 +1855,46 @@ module ModernTreasury
1758
1855
  end
1759
1856
  end
1760
1857
  end
1858
+
1859
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
1860
+ module ReconciliationStatus
1861
+ extend ModernTreasury::Internal::Type::Enum
1862
+
1863
+ TaggedSymbol =
1864
+ T.type_alias do
1865
+ T.all(
1866
+ Symbol,
1867
+ ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus
1868
+ )
1869
+ end
1870
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1871
+
1872
+ UNRECONCILED =
1873
+ T.let(
1874
+ :unreconciled,
1875
+ ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus::TaggedSymbol
1876
+ )
1877
+ TENTATIVELY_RECONCILED =
1878
+ T.let(
1879
+ :tentatively_reconciled,
1880
+ ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus::TaggedSymbol
1881
+ )
1882
+ RECONCILED =
1883
+ T.let(
1884
+ :reconciled,
1885
+ ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus::TaggedSymbol
1886
+ )
1887
+
1888
+ sig do
1889
+ override.returns(
1890
+ T::Array[
1891
+ ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus::TaggedSymbol
1892
+ ]
1893
+ )
1894
+ end
1895
+ def self.values
1896
+ end
1897
+ end
1761
1898
  end
1762
1899
  end
1763
1900
  end
@@ -316,6 +316,11 @@ module ModernTreasury
316
316
  :failed,
317
317
  ModernTreasury::PaymentOrderListParams::Status::TaggedSymbol
318
318
  )
319
+ HELD =
320
+ T.let(
321
+ :held,
322
+ ModernTreasury::PaymentOrderListParams::Status::TaggedSymbol
323
+ )
319
324
  NEEDS_APPROVAL =
320
325
  T.let(
321
326
  :needs_approval,
@@ -14,11 +14,29 @@ module ModernTreasury
14
14
  )
15
15
  end
16
16
 
17
+ sig do
18
+ returns(T.nilable(ModernTreasury::PaymentOrderUpdateParams::Accounting))
19
+ end
20
+ attr_reader :accounting
21
+
22
+ sig do
23
+ params(
24
+ accounting:
25
+ ModernTreasury::PaymentOrderUpdateParams::Accounting::OrHash
26
+ ).void
27
+ end
28
+ attr_writer :accounting
29
+
17
30
  # The ID of one of your accounting categories. Note that these will only be
18
31
  # accessible if your accounting system has been connected.
19
32
  sig { returns(T.nilable(String)) }
20
33
  attr_accessor :accounting_category_id
21
34
 
35
+ # The ID of one of your accounting ledger classes. Note that these will only be
36
+ # accessible if your accounting system has been connected.
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :accounting_ledger_class_id
39
+
22
40
  # Value in specified currency's smallest unit. e.g. $10 would be represented as
23
41
  # 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
24
42
  sig { returns(T.nilable(Integer)) }
@@ -233,6 +251,24 @@ module ModernTreasury
233
251
  sig { params(receiving_account_id: String).void }
234
252
  attr_writer :receiving_account_id
235
253
 
254
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
255
+ sig do
256
+ returns(
257
+ T.nilable(
258
+ ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus::OrSymbol
259
+ )
260
+ )
261
+ end
262
+ attr_reader :reconciliation_status
263
+
264
+ sig do
265
+ params(
266
+ reconciliation_status:
267
+ ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus::OrSymbol
268
+ ).void
269
+ end
270
+ attr_writer :reconciliation_status
271
+
236
272
  # For `ach`, this field will be passed through on an addenda record. For `wire`
237
273
  # payments the field will be passed through as the "Originator to Beneficiary
238
274
  # Information", also known as OBI or Fedwire tag 6000.
@@ -312,7 +348,10 @@ module ModernTreasury
312
348
 
313
349
  sig do
314
350
  params(
351
+ accounting:
352
+ ModernTreasury::PaymentOrderUpdateParams::Accounting::OrHash,
315
353
  accounting_category_id: T.nilable(String),
354
+ accounting_ledger_class_id: T.nilable(String),
316
355
  amount: Integer,
317
356
  charge_bearer:
318
357
  T.nilable(
@@ -347,6 +386,8 @@ module ModernTreasury
347
386
  receiving_account:
348
387
  ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::OrHash,
349
388
  receiving_account_id: String,
389
+ reconciliation_status:
390
+ ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus::OrSymbol,
350
391
  remittance_information: T.nilable(String),
351
392
  send_remittance_advice: T.nilable(T::Boolean),
352
393
  statement_descriptor: T.nilable(String),
@@ -361,9 +402,13 @@ module ModernTreasury
361
402
  ).returns(T.attached_class)
362
403
  end
363
404
  def self.new(
405
+ accounting: nil,
364
406
  # The ID of one of your accounting categories. Note that these will only be
365
407
  # accessible if your accounting system has been connected.
366
408
  accounting_category_id: nil,
409
+ # The ID of one of your accounting ledger classes. Note that these will only be
410
+ # accessible if your accounting system has been connected.
411
+ accounting_ledger_class_id: nil,
367
412
  # Value in specified currency's smallest unit. e.g. $10 would be represented as
368
413
  # 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
369
414
  amount: nil,
@@ -436,6 +481,8 @@ module ModernTreasury
436
481
  # `receiving_account_id`, you may pass the id of an external account or an
437
482
  # internal account.
438
483
  receiving_account_id: nil,
484
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
485
+ reconciliation_status: nil,
439
486
  # For `ach`, this field will be passed through on an addenda record. For `wire`
440
487
  # payments the field will be passed through as the "Originator to Beneficiary
441
488
  # Information", also known as OBI or Fedwire tag 6000.
@@ -486,7 +533,9 @@ module ModernTreasury
486
533
  sig do
487
534
  override.returns(
488
535
  {
536
+ accounting: ModernTreasury::PaymentOrderUpdateParams::Accounting,
489
537
  accounting_category_id: T.nilable(String),
538
+ accounting_ledger_class_id: T.nilable(String),
490
539
  amount: Integer,
491
540
  charge_bearer:
492
541
  T.nilable(
@@ -519,6 +568,8 @@ module ModernTreasury
519
568
  receiving_account:
520
569
  ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount,
521
570
  receiving_account_id: String,
571
+ reconciliation_status:
572
+ ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus::OrSymbol,
522
573
  remittance_information: T.nilable(String),
523
574
  send_remittance_advice: T.nilable(T::Boolean),
524
575
  statement_descriptor: T.nilable(String),
@@ -536,6 +587,52 @@ module ModernTreasury
536
587
  def to_hash
537
588
  end
538
589
 
590
+ class Accounting < ModernTreasury::Internal::Type::BaseModel
591
+ OrHash =
592
+ T.type_alias do
593
+ T.any(
594
+ ModernTreasury::PaymentOrderUpdateParams::Accounting,
595
+ ModernTreasury::Internal::AnyHash
596
+ )
597
+ end
598
+
599
+ # The ID of one of your accounting categories. Note that these will only be
600
+ # accessible if your accounting system has been connected.
601
+ sig { returns(T.nilable(String)) }
602
+ attr_accessor :account_id
603
+
604
+ # The ID of one of the class objects in your accounting system. Class objects
605
+ # track segments of your business independent of client or project. Note that
606
+ # these will only be accessible if your accounting system has been connected.
607
+ sig { returns(T.nilable(String)) }
608
+ attr_accessor :class_id
609
+
610
+ sig do
611
+ params(
612
+ account_id: T.nilable(String),
613
+ class_id: T.nilable(String)
614
+ ).returns(T.attached_class)
615
+ end
616
+ def self.new(
617
+ # The ID of one of your accounting categories. Note that these will only be
618
+ # accessible if your accounting system has been connected.
619
+ account_id: nil,
620
+ # The ID of one of the class objects in your accounting system. Class objects
621
+ # track segments of your business independent of client or project. Note that
622
+ # these will only be accessible if your accounting system has been connected.
623
+ class_id: nil
624
+ )
625
+ end
626
+
627
+ sig do
628
+ override.returns(
629
+ { account_id: T.nilable(String), class_id: T.nilable(String) }
630
+ )
631
+ end
632
+ def to_hash
633
+ end
634
+ end
635
+
539
636
  # The party that will pay the fees for the payment order. See
540
637
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
541
638
  # differences between the options.
@@ -1608,6 +1705,46 @@ module ModernTreasury
1608
1705
  end
1609
1706
  end
1610
1707
 
1708
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
1709
+ module ReconciliationStatus
1710
+ extend ModernTreasury::Internal::Type::Enum
1711
+
1712
+ TaggedSymbol =
1713
+ T.type_alias do
1714
+ T.all(
1715
+ Symbol,
1716
+ ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus
1717
+ )
1718
+ end
1719
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1720
+
1721
+ UNRECONCILED =
1722
+ T.let(
1723
+ :unreconciled,
1724
+ ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus::TaggedSymbol
1725
+ )
1726
+ TENTATIVELY_RECONCILED =
1727
+ T.let(
1728
+ :tentatively_reconciled,
1729
+ ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus::TaggedSymbol
1730
+ )
1731
+ RECONCILED =
1732
+ T.let(
1733
+ :reconciled,
1734
+ ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus::TaggedSymbol
1735
+ )
1736
+
1737
+ sig do
1738
+ override.returns(
1739
+ T::Array[
1740
+ ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus::TaggedSymbol
1741
+ ]
1742
+ )
1743
+ end
1744
+ def self.values
1745
+ end
1746
+ end
1747
+
1611
1748
  # To cancel a payment order, use `cancelled`. To redraft a returned payment order,
1612
1749
  # use `approved`. To undo approval on a denied or approved payment order, use
1613
1750
  # `needs_approval`.
@@ -1645,6 +1782,11 @@ module ModernTreasury
1645
1782
  :failed,
1646
1783
  ModernTreasury::PaymentOrderUpdateParams::Status::TaggedSymbol
1647
1784
  )
1785
+ HELD =
1786
+ T.let(
1787
+ :held,
1788
+ ModernTreasury::PaymentOrderUpdateParams::Status::TaggedSymbol
1789
+ )
1648
1790
  NEEDS_APPROVAL =
1649
1791
  T.let(
1650
1792
  :needs_approval,
@@ -45,6 +45,14 @@ module ModernTreasury
45
45
  end
46
46
  attr_accessor :reason
47
47
 
48
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
49
+ sig do
50
+ returns(
51
+ ModernTreasury::PaymentOrders::Reversal::ReconciliationStatus::TaggedSymbol
52
+ )
53
+ end
54
+ attr_accessor :reconciliation_status
55
+
48
56
  # The current status of the reversal.
49
57
  sig do
50
58
  returns(ModernTreasury::PaymentOrders::Reversal::Status::TaggedSymbol)
@@ -67,6 +75,8 @@ module ModernTreasury
67
75
  object: String,
68
76
  payment_order_id: T.nilable(String),
69
77
  reason: ModernTreasury::PaymentOrders::Reversal::Reason::OrSymbol,
78
+ reconciliation_status:
79
+ ModernTreasury::PaymentOrders::Reversal::ReconciliationStatus::OrSymbol,
70
80
  status: ModernTreasury::PaymentOrders::Reversal::Status::OrSymbol,
71
81
  transaction_ids: T::Array[T.nilable(String)],
72
82
  updated_at: Time
@@ -88,6 +98,8 @@ module ModernTreasury
88
98
  payment_order_id:,
89
99
  # The reason for the reversal.
90
100
  reason:,
101
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
102
+ reconciliation_status:,
91
103
  # The current status of the reversal.
92
104
  status:,
93
105
  transaction_ids:,
@@ -107,6 +119,8 @@ module ModernTreasury
107
119
  payment_order_id: T.nilable(String),
108
120
  reason:
109
121
  ModernTreasury::PaymentOrders::Reversal::Reason::TaggedSymbol,
122
+ reconciliation_status:
123
+ ModernTreasury::PaymentOrders::Reversal::ReconciliationStatus::TaggedSymbol,
110
124
  status:
111
125
  ModernTreasury::PaymentOrders::Reversal::Status::TaggedSymbol,
112
126
  transaction_ids: T::Array[T.nilable(String)],
@@ -164,6 +178,46 @@ module ModernTreasury
164
178
  end
165
179
  end
166
180
 
181
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
182
+ module ReconciliationStatus
183
+ extend ModernTreasury::Internal::Type::Enum
184
+
185
+ TaggedSymbol =
186
+ T.type_alias do
187
+ T.all(
188
+ Symbol,
189
+ ModernTreasury::PaymentOrders::Reversal::ReconciliationStatus
190
+ )
191
+ end
192
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
193
+
194
+ UNRECONCILED =
195
+ T.let(
196
+ :unreconciled,
197
+ ModernTreasury::PaymentOrders::Reversal::ReconciliationStatus::TaggedSymbol
198
+ )
199
+ TENTATIVELY_RECONCILED =
200
+ T.let(
201
+ :tentatively_reconciled,
202
+ ModernTreasury::PaymentOrders::Reversal::ReconciliationStatus::TaggedSymbol
203
+ )
204
+ RECONCILED =
205
+ T.let(
206
+ :reconciled,
207
+ ModernTreasury::PaymentOrders::Reversal::ReconciliationStatus::TaggedSymbol
208
+ )
209
+
210
+ sig do
211
+ override.returns(
212
+ T::Array[
213
+ ModernTreasury::PaymentOrders::Reversal::ReconciliationStatus::TaggedSymbol
214
+ ]
215
+ )
216
+ end
217
+ def self.values
218
+ end
219
+ end
220
+
167
221
  # The current status of the reversal.
168
222
  module Status
169
223
  extend ModernTreasury::Internal::Type::Enum
@@ -400,6 +400,11 @@ module ModernTreasury
400
400
  :lob_check_id,
401
401
  ModernTreasury::PaymentReference::ReferenceNumberType::TaggedSymbol
402
402
  )
403
+ MT_FOF_TRANSFER_ID =
404
+ T.let(
405
+ :mt_fof_transfer_id,
406
+ ModernTreasury::PaymentReference::ReferenceNumberType::TaggedSymbol
407
+ )
403
408
  OTHER =
404
409
  T.let(
405
410
  :other,
@@ -66,6 +66,24 @@ module ModernTreasury
66
66
  sig { returns(T.nilable(String)) }
67
67
  attr_accessor :reason
68
68
 
69
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
70
+ sig do
71
+ returns(
72
+ T.nilable(
73
+ ModernTreasury::ReturnCreateParams::ReconciliationStatus::OrSymbol
74
+ )
75
+ )
76
+ end
77
+ attr_reader :reconciliation_status
78
+
79
+ sig do
80
+ params(
81
+ reconciliation_status:
82
+ ModernTreasury::ReturnCreateParams::ReconciliationStatus::OrSymbol
83
+ ).void
84
+ end
85
+ attr_writer :reconciliation_status
86
+
69
87
  sig do
70
88
  params(
71
89
  returnable_id: T.nilable(String),
@@ -78,6 +96,8 @@ module ModernTreasury
78
96
  data: T.nilable(T.anything),
79
97
  date_of_death: T.nilable(Date),
80
98
  reason: T.nilable(String),
99
+ reconciliation_status:
100
+ ModernTreasury::ReturnCreateParams::ReconciliationStatus::OrSymbol,
81
101
  request_options: ModernTreasury::RequestOptions::OrHash
82
102
  ).returns(T.attached_class)
83
103
  end
@@ -104,6 +124,8 @@ module ModernTreasury
104
124
  # An optional description of the reason for the return. This is for internal usage
105
125
  # and will not be transmitted to the bank.”
106
126
  reason: nil,
127
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
128
+ reconciliation_status: nil,
107
129
  request_options: {}
108
130
  )
109
131
  end
@@ -121,6 +143,8 @@ module ModernTreasury
121
143
  data: T.nilable(T.anything),
122
144
  date_of_death: T.nilable(Date),
123
145
  reason: T.nilable(String),
146
+ reconciliation_status:
147
+ ModernTreasury::ReturnCreateParams::ReconciliationStatus::OrSymbol,
124
148
  request_options: ModernTreasury::RequestOptions
125
149
  }
126
150
  )
@@ -454,6 +478,46 @@ module ModernTreasury
454
478
  def to_hash
455
479
  end
456
480
  end
481
+
482
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
483
+ module ReconciliationStatus
484
+ extend ModernTreasury::Internal::Type::Enum
485
+
486
+ TaggedSymbol =
487
+ T.type_alias do
488
+ T.all(
489
+ Symbol,
490
+ ModernTreasury::ReturnCreateParams::ReconciliationStatus
491
+ )
492
+ end
493
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
494
+
495
+ UNRECONCILED =
496
+ T.let(
497
+ :unreconciled,
498
+ ModernTreasury::ReturnCreateParams::ReconciliationStatus::TaggedSymbol
499
+ )
500
+ TENTATIVELY_RECONCILED =
501
+ T.let(
502
+ :tentatively_reconciled,
503
+ ModernTreasury::ReturnCreateParams::ReconciliationStatus::TaggedSymbol
504
+ )
505
+ RECONCILED =
506
+ T.let(
507
+ :reconciled,
508
+ ModernTreasury::ReturnCreateParams::ReconciliationStatus::TaggedSymbol
509
+ )
510
+
511
+ sig do
512
+ override.returns(
513
+ T::Array[
514
+ ModernTreasury::ReturnCreateParams::ReconciliationStatus::TaggedSymbol
515
+ ]
516
+ )
517
+ end
518
+ def self.values
519
+ end
520
+ end
457
521
  end
458
522
  end
459
523
  end