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
@@ -131,6 +131,13 @@ module ModernTreasury
131
131
  # @return [Symbol, ModernTreasury::Models::PaymentOrderType]
132
132
  required :type, enum: -> { ModernTreasury::PaymentOrderType }
133
133
 
134
+ # @!attribute accounting
135
+ # @deprecated
136
+ #
137
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting, nil]
138
+ optional :accounting,
139
+ -> { ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting }
140
+
134
141
  # @!attribute accounting_category_id
135
142
  # @deprecated
136
143
  #
@@ -140,6 +147,15 @@ module ModernTreasury
140
147
  # @return [String, nil]
141
148
  optional :accounting_category_id, String, nil?: true
142
149
 
150
+ # @!attribute accounting_ledger_class_id
151
+ # @deprecated
152
+ #
153
+ # The ID of one of your accounting ledger classes. Note that these will only be
154
+ # accessible if your accounting system has been connected.
155
+ #
156
+ # @return [String, nil]
157
+ optional :accounting_ledger_class_id, String, nil?: true
158
+
143
159
  # @!attribute charge_bearer
144
160
  # The party that will pay the fees for the payment order. See
145
161
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
@@ -298,6 +314,13 @@ module ModernTreasury
298
314
  # @return [String, nil]
299
315
  optional :receiving_account_id, String
300
316
 
317
+ # @!attribute reconciliation_status
318
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
319
+ #
320
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus, nil]
321
+ optional :reconciliation_status,
322
+ enum: -> { ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus }
323
+
301
324
  # @!attribute remittance_information
302
325
  # For `ach`, this field will be passed through on an addenda record. For `wire`
303
326
  # payments the field will be passed through as the "Originator to Beneficiary
@@ -364,7 +387,7 @@ module ModernTreasury
364
387
  # @return [String, nil]
365
388
  optional :ultimate_receiving_party_name, String, nil?: true
366
389
 
367
- # @!method initialize(amount:, direction:, originating_account_id:, type:, accounting_category_id: nil, charge_bearer: nil, currency: nil, description: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil)
390
+ # @!method initialize(amount:, direction:, originating_account_id:, type:, accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, charge_bearer: nil, currency: nil, description: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil)
368
391
  # Some parameter documentations has been truncated, see
369
392
  # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest}
370
393
  # for more details.
@@ -377,8 +400,12 @@ module ModernTreasury
377
400
  #
378
401
  # @param type [Symbol, ModernTreasury::Models::PaymentOrderType] One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sep
379
402
  #
403
+ # @param accounting [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting]
404
+ #
380
405
  # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
381
406
  #
407
+ # @param accounting_ledger_class_id [String, nil] The ID of one of your accounting ledger classes. Note that these will only be ac
408
+ #
382
409
  # @param charge_bearer [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ChargeBearer, nil] The party that will pay the fees for the payment order. See https://docs.modernt
383
410
  #
384
411
  # @param currency [Symbol, ModernTreasury::Models::Currency] Defaults to the currency of the originating account.
@@ -417,6 +444,8 @@ module ModernTreasury
417
444
  #
418
445
  # @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
419
446
  #
447
+ # @param reconciliation_status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
448
+ #
420
449
  # @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
421
450
  #
422
451
  # @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
@@ -451,6 +480,39 @@ module ModernTreasury
451
480
  # @return [Array<Symbol>]
452
481
  end
453
482
 
483
+ # @deprecated
484
+ #
485
+ # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest#accounting
486
+ class Accounting < ModernTreasury::Internal::Type::BaseModel
487
+ # @!attribute account_id
488
+ # @deprecated
489
+ #
490
+ # The ID of one of your accounting categories. Note that these will only be
491
+ # accessible if your accounting system has been connected.
492
+ #
493
+ # @return [String, nil]
494
+ optional :account_id, String, nil?: true
495
+
496
+ # @!attribute class_id
497
+ # @deprecated
498
+ #
499
+ # The ID of one of the class objects in your accounting system. Class objects
500
+ # track segments of your business independent of client or project. Note that
501
+ # these will only be accessible if your accounting system has been connected.
502
+ #
503
+ # @return [String, nil]
504
+ optional :class_id, String, nil?: true
505
+
506
+ # @!method initialize(account_id: nil, class_id: nil)
507
+ # Some parameter documentations has been truncated, see
508
+ # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting}
509
+ # for more details.
510
+ #
511
+ # @param account_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
512
+ #
513
+ # @param class_id [String, nil] The ID of one of the class objects in your accounting system. Class objects trac
514
+ end
515
+
454
516
  # The party that will pay the fees for the payment order. See
455
517
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
456
518
  # differences between the options.
@@ -838,6 +900,20 @@ module ModernTreasury
838
900
  end
839
901
  end
840
902
  end
903
+
904
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
905
+ #
906
+ # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest#reconciliation_status
907
+ module ReconciliationStatus
908
+ extend ModernTreasury::Internal::Type::Enum
909
+
910
+ UNRECONCILED = :unreconciled
911
+ TENTATIVELY_RECONCILED = :tentatively_reconciled
912
+ RECONCILED = :reconciled
913
+
914
+ # @!method self.values
915
+ # @return [Array<Symbol>]
916
+ end
841
917
  end
842
918
 
843
919
  class ExpectedPaymentCreateRequest < ModernTreasury::Internal::Type::BaseModel
@@ -1256,6 +1332,13 @@ module ModernTreasury
1256
1332
  # @return [String, nil]
1257
1333
  optional :id, String
1258
1334
 
1335
+ # @!attribute accounting
1336
+ # @deprecated
1337
+ #
1338
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting, nil]
1339
+ optional :accounting,
1340
+ -> { ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting }
1341
+
1259
1342
  # @!attribute accounting_category_id
1260
1343
  # @deprecated
1261
1344
  #
@@ -1265,6 +1348,15 @@ module ModernTreasury
1265
1348
  # @return [String, nil]
1266
1349
  optional :accounting_category_id, String, nil?: true
1267
1350
 
1351
+ # @!attribute accounting_ledger_class_id
1352
+ # @deprecated
1353
+ #
1354
+ # The ID of one of your accounting ledger classes. Note that these will only be
1355
+ # accessible if your accounting system has been connected.
1356
+ #
1357
+ # @return [String, nil]
1358
+ optional :accounting_ledger_class_id, String, nil?: true
1359
+
1268
1360
  # @!attribute amount
1269
1361
  # Value in specified currency's smallest unit. e.g. $10 would be represented as
1270
1362
  # 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
@@ -1434,6 +1526,13 @@ module ModernTreasury
1434
1526
  # @return [String, nil]
1435
1527
  optional :receiving_account_id, String
1436
1528
 
1529
+ # @!attribute reconciliation_status
1530
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
1531
+ #
1532
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus, nil]
1533
+ optional :reconciliation_status,
1534
+ enum: -> { ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus }
1535
+
1437
1536
  # @!attribute remittance_information
1438
1537
  # For `ach`, this field will be passed through on an addenda record. For `wire`
1439
1538
  # payments the field will be passed through as the "Originator to Beneficiary
@@ -1518,15 +1617,19 @@ module ModernTreasury
1518
1617
  # @return [String, nil]
1519
1618
  optional :ultimate_receiving_party_name, String, nil?: true
1520
1619
 
1521
- # @!method initialize(id: nil, accounting_category_id: nil, amount: nil, charge_bearer: nil, counterparty_id: nil, currency: nil, description: nil, direction: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_account_id: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, status: nil, subtype: nil, type: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil)
1620
+ # @!method initialize(id: nil, accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, amount: nil, charge_bearer: nil, counterparty_id: nil, currency: nil, description: nil, direction: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_account_id: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, status: nil, subtype: nil, type: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil)
1522
1621
  # Some parameter documentations has been truncated, see
1523
1622
  # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID}
1524
1623
  # for more details.
1525
1624
  #
1526
1625
  # @param id [String]
1527
1626
  #
1627
+ # @param accounting [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting]
1628
+ #
1528
1629
  # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
1529
1630
  #
1631
+ # @param accounting_ledger_class_id [String, nil] The ID of one of your accounting ledger classes. Note that these will only be ac
1632
+ #
1530
1633
  # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
1531
1634
  #
1532
1635
  # @param charge_bearer [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ChargeBearer, nil] The party that will pay the fees for the payment order. See https://docs.modernt
@@ -1569,6 +1672,8 @@ module ModernTreasury
1569
1672
  #
1570
1673
  # @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
1571
1674
  #
1675
+ # @param reconciliation_status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
1676
+ #
1572
1677
  # @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
1573
1678
  #
1574
1679
  # @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
@@ -1589,6 +1694,39 @@ module ModernTreasury
1589
1694
  #
1590
1695
  # @param ultimate_receiving_party_name [String, nil] This represents the identifier by which the merchant is known to the person init
1591
1696
 
1697
+ # @deprecated
1698
+ #
1699
+ # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID#accounting
1700
+ class Accounting < ModernTreasury::Internal::Type::BaseModel
1701
+ # @!attribute account_id
1702
+ # @deprecated
1703
+ #
1704
+ # The ID of one of your accounting categories. Note that these will only be
1705
+ # accessible if your accounting system has been connected.
1706
+ #
1707
+ # @return [String, nil]
1708
+ optional :account_id, String, nil?: true
1709
+
1710
+ # @!attribute class_id
1711
+ # @deprecated
1712
+ #
1713
+ # The ID of one of the class objects in your accounting system. Class objects
1714
+ # track segments of your business independent of client or project. Note that
1715
+ # these will only be accessible if your accounting system has been connected.
1716
+ #
1717
+ # @return [String, nil]
1718
+ optional :class_id, String, nil?: true
1719
+
1720
+ # @!method initialize(account_id: nil, class_id: nil)
1721
+ # Some parameter documentations has been truncated, see
1722
+ # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting}
1723
+ # for more details.
1724
+ #
1725
+ # @param account_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
1726
+ #
1727
+ # @param class_id [String, nil] The ID of one of the class objects in your accounting system. Class objects trac
1728
+ end
1729
+
1592
1730
  # The party that will pay the fees for the payment order. See
1593
1731
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
1594
1732
  # differences between the options.
@@ -1993,6 +2131,20 @@ module ModernTreasury
1993
2131
  end
1994
2132
  end
1995
2133
 
2134
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
2135
+ #
2136
+ # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID#reconciliation_status
2137
+ module ReconciliationStatus
2138
+ extend ModernTreasury::Internal::Type::Enum
2139
+
2140
+ UNRECONCILED = :unreconciled
2141
+ TENTATIVELY_RECONCILED = :tentatively_reconciled
2142
+ RECONCILED = :reconciled
2143
+
2144
+ # @!method self.values
2145
+ # @return [Array<Symbol>]
2146
+ end
2147
+
1996
2148
  # To cancel a payment order, use `cancelled`. To redraft a returned payment order,
1997
2149
  # use `approved`. To undo approval on a denied or approved payment order, use
1998
2150
  # `needs_approval`.
@@ -2006,6 +2158,7 @@ module ModernTreasury
2006
2158
  COMPLETED = :completed
2007
2159
  DENIED = :denied
2008
2160
  FAILED = :failed
2161
+ HELD = :held
2009
2162
  NEEDS_APPROVAL = :needs_approval
2010
2163
  PENDING = :pending
2011
2164
  PROCESSING = :processing
@@ -81,10 +81,12 @@ module ModernTreasury
81
81
  required :updated_at, Time
82
82
 
83
83
  # @!attribute verification_status
84
+ # @deprecated
85
+ #
84
86
  # The verification status of the counterparty.
85
87
  #
86
- # @return [Symbol, ModernTreasury::Models::Counterparty::VerificationStatus]
87
- required :verification_status, enum: -> { ModernTreasury::Counterparty::VerificationStatus }
88
+ # @return [String]
89
+ required :verification_status, String
88
90
 
89
91
  # @!method initialize(id:, accounts:, created_at:, discarded_at:, email:, external_id:, legal_entity_id:, live_mode:, metadata:, name:, object:, send_remittance_advice:, updated_at:, verification_status:)
90
92
  # Some parameter documentations has been truncated, see
@@ -116,7 +118,7 @@ module ModernTreasury
116
118
  #
117
119
  # @param updated_at [Time]
118
120
  #
119
- # @param verification_status [Symbol, ModernTreasury::Models::Counterparty::VerificationStatus] The verification status of the counterparty.
121
+ # @param verification_status [String] The verification status of the counterparty.
120
122
 
121
123
  class Account < ModernTreasury::Internal::Type::BaseModel
122
124
  # @!attribute id
@@ -308,21 +310,6 @@ module ModernTreasury
308
310
  # @return [Array<Symbol>]
309
311
  end
310
312
  end
311
-
312
- # The verification status of the counterparty.
313
- #
314
- # @see ModernTreasury::Models::Counterparty#verification_status
315
- module VerificationStatus
316
- extend ModernTreasury::Internal::Type::Enum
317
-
318
- DENIED = :denied
319
- NEEDS_APPROVAL = :needs_approval
320
- UNVERIFIED = :unverified
321
- VERIFIED = :verified
322
-
323
- # @!method self.values
324
- # @return [Array<Symbol>]
325
- end
326
313
  end
327
314
  end
328
315
  end
@@ -20,6 +20,7 @@ module ModernTreasury
20
20
  optional :body_external_id, String, api_name: :external_id, nil?: true
21
21
 
22
22
  # @!attribute accounting
23
+ # @deprecated
23
24
  #
24
25
  # @return [ModernTreasury::Models::CounterpartyCreateParams::Accounting, nil]
25
26
  optional :accounting, -> { ModernTreasury::CounterpartyCreateParams::Accounting }
@@ -78,10 +79,12 @@ module ModernTreasury
78
79
  optional :taxpayer_identifier, String
79
80
 
80
81
  # @!attribute verification_status
82
+ # @deprecated
83
+ #
81
84
  # The verification status of the counterparty.
82
85
  #
83
- # @return [Symbol, ModernTreasury::Models::CounterpartyCreateParams::VerificationStatus, nil]
84
- optional :verification_status, enum: -> { ModernTreasury::CounterpartyCreateParams::VerificationStatus }
86
+ # @return [String, nil]
87
+ optional :verification_status, String
85
88
 
86
89
  # @!method initialize(name:, body_external_id: nil, accounting: nil, accounts: nil, email: nil, ledger_type: nil, legal_entity: nil, legal_entity_id: nil, metadata: nil, send_remittance_advice: nil, taxpayer_identifier: nil, verification_status: nil, request_options: {})
87
90
  # Some parameter documentations has been truncated, see
@@ -109,10 +112,11 @@ module ModernTreasury
109
112
  #
110
113
  # @param taxpayer_identifier [String] Either a valid SSN or EIN.
111
114
  #
112
- # @param verification_status [Symbol, ModernTreasury::Models::CounterpartyCreateParams::VerificationStatus] The verification status of the counterparty.
115
+ # @param verification_status [String] The verification status of the counterparty.
113
116
  #
114
117
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
115
118
 
119
+ # @deprecated
116
120
  class Accounting < ModernTreasury::Internal::Type::BaseModel
117
121
  # @!attribute type
118
122
  # An optional type to auto-sync the counterparty to your ledger. Either `customer`
@@ -762,19 +766,6 @@ module ModernTreasury
762
766
  # @return [Array<Symbol>]
763
767
  end
764
768
  end
765
-
766
- # The verification status of the counterparty.
767
- module VerificationStatus
768
- extend ModernTreasury::Internal::Type::Enum
769
-
770
- DENIED = :denied
771
- NEEDS_APPROVAL = :needs_approval
772
- UNVERIFIED = :unverified
773
- VERIFIED = :verified
774
-
775
- # @!method self.values
776
- # @return [Array<Symbol>]
777
- end
778
769
  end
779
770
  end
780
771
  end
@@ -107,6 +107,12 @@ module ModernTreasury
107
107
  enum: -> { ModernTreasury::IncomingPaymentDetail::OriginatingRoutingNumberType },
108
108
  nil?: true
109
109
 
110
+ # @!attribute reconciliation_status
111
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
112
+ #
113
+ # @return [Symbol, ModernTreasury::Models::IncomingPaymentDetail::ReconciliationStatus]
114
+ required :reconciliation_status, enum: -> { ModernTreasury::IncomingPaymentDetail::ReconciliationStatus }
115
+
110
116
  # @!attribute status
111
117
  # The current status of the incoming payment order. One of `pending`, `completed`,
112
118
  # or `returned`.
@@ -164,7 +170,7 @@ module ModernTreasury
164
170
  # @return [String, nil]
165
171
  optional :originating_account_number, String, nil?: true
166
172
 
167
- # @!method initialize(id:, amount:, as_of_date:, created_at:, currency:, data:, direction:, internal_account_id:, ledger_transaction_id:, live_mode:, metadata:, object:, originating_account_number_safe:, originating_account_number_type:, originating_routing_number:, originating_routing_number_type:, status:, transaction_id:, transaction_line_item_id:, type:, updated_at:, vendor_id:, virtual_account:, virtual_account_id:, originating_account_number: nil)
173
+ # @!method initialize(id:, amount:, as_of_date:, created_at:, currency:, data:, direction:, internal_account_id:, ledger_transaction_id:, live_mode:, metadata:, object:, originating_account_number_safe:, originating_account_number_type:, originating_routing_number:, originating_routing_number_type:, reconciliation_status:, status:, transaction_id:, transaction_line_item_id:, type:, updated_at:, vendor_id:, virtual_account:, virtual_account_id:, originating_account_number: nil)
168
174
  # Some parameter documentations has been truncated, see
169
175
  # {ModernTreasury::Models::IncomingPaymentDetail} for more details.
170
176
  #
@@ -200,6 +206,8 @@ module ModernTreasury
200
206
  #
201
207
  # @param originating_routing_number_type [Symbol, ModernTreasury::Models::IncomingPaymentDetail::OriginatingRoutingNumberType, nil] The type of the originating routing number for the incoming payment detail.
202
208
  #
209
+ # @param reconciliation_status [Symbol, ModernTreasury::Models::IncomingPaymentDetail::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
210
+ #
203
211
  # @param status [Symbol, ModernTreasury::Models::IncomingPaymentDetail::Status] The current status of the incoming payment order. One of `pending`, `completed`,
204
212
  #
205
213
  # @param transaction_id [String, nil] The ID of the reconciled Transaction or `null`.
@@ -276,6 +284,20 @@ module ModernTreasury
276
284
  # @return [Array<Symbol>]
277
285
  end
278
286
 
287
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
288
+ #
289
+ # @see ModernTreasury::Models::IncomingPaymentDetail#reconciliation_status
290
+ module ReconciliationStatus
291
+ extend ModernTreasury::Internal::Type::Enum
292
+
293
+ UNRECONCILED = :unreconciled
294
+ TENTATIVELY_RECONCILED = :tentatively_reconciled
295
+ RECONCILED = :reconciled
296
+
297
+ # @!method self.values
298
+ # @return [Array<Symbol>]
299
+ end
300
+
279
301
  # The current status of the incoming payment order. One of `pending`, `completed`,
280
302
  # or `returned`.
281
303
  #
@@ -120,6 +120,12 @@ module ModernTreasury
120
120
  # @return [Array<ModernTreasury::Models::RoutingDetail>]
121
121
  required :routing_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::RoutingDetail] }
122
122
 
123
+ # @!attribute status
124
+ # The internal account status.
125
+ #
126
+ # @return [Symbol, ModernTreasury::Models::InternalAccount::Status, nil]
127
+ required :status, enum: -> { ModernTreasury::InternalAccount::Status }, nil?: true
128
+
123
129
  # @!attribute updated_at
124
130
  #
125
131
  # @return [Time]
@@ -131,7 +137,7 @@ module ModernTreasury
131
137
  # @return [String, nil]
132
138
  required :vendor_id, String, nil?: true
133
139
 
134
- # @!method initialize(id:, account_capabilities:, account_details:, account_type:, connection:, counterparty_id:, created_at:, currency:, ledger_account_id:, legal_entity_id:, live_mode:, metadata:, name:, object:, parent_account_id:, party_address:, party_name:, party_type:, routing_details:, updated_at:, vendor_id:)
140
+ # @!method initialize(id:, account_capabilities:, account_details:, account_type:, connection:, counterparty_id:, created_at:, currency:, ledger_account_id:, legal_entity_id:, live_mode:, metadata:, name:, object:, parent_account_id:, party_address:, party_name:, party_type:, routing_details:, status:, updated_at:, vendor_id:)
135
141
  # Some parameter documentations has been truncated, see
136
142
  # {ModernTreasury::Models::InternalAccount} for more details.
137
143
  #
@@ -173,6 +179,8 @@ module ModernTreasury
173
179
  #
174
180
  # @param routing_details [Array<ModernTreasury::Models::RoutingDetail>] An array of routing detail objects.
175
181
  #
182
+ # @param status [Symbol, ModernTreasury::Models::InternalAccount::Status, nil] The internal account status.
183
+ #
176
184
  # @param updated_at [Time]
177
185
  #
178
186
  # @param vendor_id [String, nil] The vendor ID associated with this account.
@@ -337,6 +345,22 @@ module ModernTreasury
337
345
  # @!method self.values
338
346
  # @return [Array<Symbol>]
339
347
  end
348
+
349
+ # The internal account status.
350
+ #
351
+ # @see ModernTreasury::Models::InternalAccount#status
352
+ module Status
353
+ extend ModernTreasury::Internal::Type::Enum
354
+
355
+ ACTIVE = :active
356
+ CLOSED = :closed
357
+ PENDING_ACTIVATION = :pending_activation
358
+ PENDING_CLOSURE = :pending_closure
359
+ SUSPENDED = :suspended
360
+
361
+ # @!method self.values
362
+ # @return [Array<Symbol>]
363
+ end
340
364
  end
341
365
  end
342
366
  end
@@ -55,7 +55,13 @@ module ModernTreasury
55
55
  # @return [Integer, nil]
56
56
  optional :per_page, Integer
57
57
 
58
- # @!method initialize(after_cursor: nil, counterparty_id: nil, currency: nil, legal_entity_id: nil, metadata: nil, payment_direction: nil, payment_type: nil, per_page: nil, request_options: {})
58
+ # @!attribute status
59
+ # Only return internal accounts with this status.
60
+ #
61
+ # @return [Symbol, ModernTreasury::Models::InternalAccountListParams::Status, nil]
62
+ optional :status, enum: -> { ModernTreasury::InternalAccountListParams::Status }
63
+
64
+ # @!method initialize(after_cursor: nil, counterparty_id: nil, currency: nil, legal_entity_id: nil, metadata: nil, payment_direction: nil, payment_type: nil, per_page: nil, status: nil, request_options: {})
59
65
  # Some parameter documentations has been truncated, see
60
66
  # {ModernTreasury::Models::InternalAccountListParams} for more details.
61
67
  #
@@ -75,6 +81,8 @@ module ModernTreasury
75
81
  #
76
82
  # @param per_page [Integer]
77
83
  #
84
+ # @param status [Symbol, ModernTreasury::Models::InternalAccountListParams::Status] Only return internal accounts with this status.
85
+ #
78
86
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
79
87
 
80
88
  # Only return internal accounts that can make this type of payment.
@@ -120,6 +128,20 @@ module ModernTreasury
120
128
  # @!method self.values
121
129
  # @return [Array<Symbol>]
122
130
  end
131
+
132
+ # Only return internal accounts with this status.
133
+ module Status
134
+ extend ModernTreasury::Internal::Type::Enum
135
+
136
+ ACTIVE = :active
137
+ PENDING_ACTIVATION = :pending_activation
138
+ SUSPENDED = :suspended
139
+ PENDING_CLOSURE = :pending_closure
140
+ CLOSED = :closed
141
+
142
+ # @!method self.values
143
+ # @return [Array<Symbol>]
144
+ end
123
145
  end
124
146
  end
125
147
  end
@@ -17,6 +17,18 @@ module ModernTreasury
17
17
  # @return [String, nil]
18
18
  optional :counterparty_id, String
19
19
 
20
+ # @!attribute created_at_end
21
+ # An inclusive upper bound for searching created_at
22
+ #
23
+ # @return [Time, nil]
24
+ optional :created_at_end, Time
25
+
26
+ # @!attribute created_at_start
27
+ # An inclusive lower bound for searching created_at
28
+ #
29
+ # @return [Time, nil]
30
+ optional :created_at_start, Time
31
+
20
32
  # @!attribute due_date_end
21
33
  # An inclusive upper bound for searching due_date
22
34
  #
@@ -68,7 +80,7 @@ module ModernTreasury
68
80
  # @return [Symbol, ModernTreasury::Models::InvoiceListParams::Status, nil]
69
81
  optional :status, enum: -> { ModernTreasury::InvoiceListParams::Status }
70
82
 
71
- # @!method initialize(after_cursor: nil, counterparty_id: nil, due_date_end: nil, due_date_start: nil, expected_payment_id: nil, metadata: nil, number: nil, originating_account_id: nil, payment_order_id: nil, per_page: nil, status: nil, request_options: {})
83
+ # @!method initialize(after_cursor: nil, counterparty_id: nil, created_at_end: nil, created_at_start: nil, due_date_end: nil, due_date_start: nil, expected_payment_id: nil, metadata: nil, number: nil, originating_account_id: nil, payment_order_id: nil, per_page: nil, status: nil, request_options: {})
72
84
  # Some parameter documentations has been truncated, see
73
85
  # {ModernTreasury::Models::InvoiceListParams} for more details.
74
86
  #
@@ -76,6 +88,10 @@ module ModernTreasury
76
88
  #
77
89
  # @param counterparty_id [String]
78
90
  #
91
+ # @param created_at_end [Time] An inclusive upper bound for searching created_at
92
+ #
93
+ # @param created_at_start [Time] An inclusive lower bound for searching created_at
94
+ #
79
95
  # @param due_date_end [Date] An inclusive upper bound for searching due_date
80
96
  #
81
97
  # @param due_date_start [Date] An inclusive lower bound for searching due_date
@@ -9,13 +9,31 @@ module ModernTreasury
9
9
  # @return [String]
10
10
  required :id, String
11
11
 
12
+ # @!attribute accounting
13
+ # @deprecated
14
+ #
15
+ # @return [ModernTreasury::Models::LineItem::Accounting]
16
+ required :accounting, -> { ModernTreasury::LineItem::Accounting }
17
+
12
18
  # @!attribute accounting_category_id
19
+ # @deprecated
20
+ #
13
21
  # The ID of one of your accounting categories. Note that these will only be
14
22
  # accessible if your accounting system has been connected.
15
23
  #
16
24
  # @return [String, nil]
17
25
  required :accounting_category_id, String, nil?: true
18
26
 
27
+ # @!attribute accounting_ledger_class_id
28
+ # @deprecated
29
+ #
30
+ # The ID of one of the class objects in your accounting system. Class objects
31
+ # track segments of your business independent of client or project. Note that
32
+ # these will only be accessible if your accounting system has been connected.
33
+ #
34
+ # @return [String, nil]
35
+ required :accounting_ledger_class_id, String, nil?: true
36
+
19
37
  # @!attribute amount
20
38
  # Value in specified currency's smallest unit. e.g. $10 would be represented
21
39
  # as 1000.
@@ -70,14 +88,18 @@ module ModernTreasury
70
88
  # @return [Time]
71
89
  required :updated_at, Time
72
90
 
73
- # @!method initialize(id:, accounting_category_id:, amount:, created_at:, description:, itemizable_id:, itemizable_type:, live_mode:, metadata:, object:, updated_at:)
91
+ # @!method initialize(id:, accounting:, accounting_category_id:, accounting_ledger_class_id:, amount:, created_at:, description:, itemizable_id:, itemizable_type:, live_mode:, metadata:, object:, updated_at:)
74
92
  # Some parameter documentations has been truncated, see
75
93
  # {ModernTreasury::Models::LineItem} for more details.
76
94
  #
77
95
  # @param id [String]
78
96
  #
97
+ # @param accounting [ModernTreasury::Models::LineItem::Accounting]
98
+ #
79
99
  # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
80
100
  #
101
+ # @param accounting_ledger_class_id [String, nil] The ID of one of the class objects in your accounting system. Class objects trac
102
+ #
81
103
  # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
82
104
  #
83
105
  # @param created_at [Time]
@@ -96,6 +118,38 @@ module ModernTreasury
96
118
  #
97
119
  # @param updated_at [Time]
98
120
 
121
+ # @deprecated
122
+ #
123
+ # @see ModernTreasury::Models::LineItem#accounting
124
+ class Accounting < ModernTreasury::Internal::Type::BaseModel
125
+ # @!attribute account_id
126
+ # @deprecated
127
+ #
128
+ # The ID of one of your accounting categories. Note that these will only be
129
+ # accessible if your accounting system has been connected.
130
+ #
131
+ # @return [String, nil]
132
+ optional :account_id, String, nil?: true
133
+
134
+ # @!attribute class_id
135
+ # @deprecated
136
+ #
137
+ # The ID of one of the class objects in your accounting system. Class objects
138
+ # track segments of your business independent of client or project. Note that
139
+ # these will only be accessible if your accounting system has been connected.
140
+ #
141
+ # @return [String, nil]
142
+ optional :class_id, String, nil?: true
143
+
144
+ # @!method initialize(account_id: nil, class_id: nil)
145
+ # Some parameter documentations has been truncated, see
146
+ # {ModernTreasury::Models::LineItem::Accounting} for more details.
147
+ #
148
+ # @param account_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
149
+ #
150
+ # @param class_id [String, nil] The ID of one of the class objects in your accounting system. Class objects trac
151
+ end
152
+
99
153
  # One of `payment_orders` or `expected_payments`.
100
154
  #
101
155
  # @see ModernTreasury::Models::LineItem#itemizable_type