modern_treasury 0.26.0 → 0.28.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 (216) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +71 -0
  3. data/README.md +4 -4
  4. data/lib/modern_treasury/client.rb +14 -0
  5. data/lib/modern_treasury/internal/transport/base_client.rb +5 -0
  6. data/lib/modern_treasury/internal/util.rb +3 -1
  7. data/lib/modern_treasury/models/bulk_request_create_params.rb +65 -202
  8. data/lib/modern_treasury/models/child_legal_entity.rb +121 -3
  9. data/lib/modern_treasury/models/child_legal_entity_create.rb +35 -1
  10. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +38 -1
  11. data/lib/modern_treasury/models/counterparty_collect_account_params.rb +0 -2
  12. data/lib/modern_treasury/models/counterparty_create_params.rb +38 -14
  13. data/lib/modern_treasury/models/currency.rb +0 -3
  14. data/lib/modern_treasury/models/document.rb +1 -73
  15. data/lib/modern_treasury/models/document_create_params.rb +11 -11
  16. data/lib/modern_treasury/models/document_list_params.rb +11 -11
  17. data/lib/modern_treasury/models/expected_payment.rb +2 -3
  18. data/lib/modern_treasury/models/expected_payment_create_params.rb +2 -3
  19. data/lib/modern_treasury/models/expected_payment_list_params.rb +3 -16
  20. data/lib/modern_treasury/models/expected_payment_type.rb +1 -13
  21. data/lib/modern_treasury/models/expected_payment_update_params.rb +2 -3
  22. data/lib/modern_treasury/models/external_account_create_params.rb +0 -13
  23. data/lib/modern_treasury/models/external_account_verify_params.rb +0 -11
  24. data/lib/modern_treasury/models/external_account_verify_response.rb +0 -11
  25. data/lib/modern_treasury/models/hold_list_params.rb +8 -11
  26. data/lib/modern_treasury/models/identification_create_request.rb +75 -0
  27. data/lib/modern_treasury/models/incoming_payment_detail.rb +15 -14
  28. data/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rb +11 -7
  29. data/lib/modern_treasury/models/incoming_payment_detail_list_params.rb +15 -12
  30. data/lib/modern_treasury/models/internal_account.rb +12 -12
  31. data/lib/modern_treasury/models/internal_account_create_params.rb +37 -33
  32. data/lib/modern_treasury/models/internal_account_list_params.rb +0 -11
  33. data/lib/modern_treasury/models/internal_account_update_account_capability_response.rb +0 -11
  34. data/lib/modern_treasury/models/internal_accounts/balance_report.rb +15 -6
  35. data/lib/modern_treasury/models/internal_accounts/balance_report_create_params.rb +20 -11
  36. data/lib/modern_treasury/models/invoice.rb +25 -1
  37. data/lib/modern_treasury/models/invoice_create_params.rb +3 -4
  38. data/lib/modern_treasury/models/invoice_update_params.rb +3 -4
  39. data/lib/modern_treasury/models/ledger_account_settlement_update_params.rb +10 -1
  40. data/lib/modern_treasury/models/ledger_balance.rb +22 -1
  41. data/lib/modern_treasury/models/ledger_entry.rb +10 -1
  42. data/lib/modern_treasury/models/ledger_entry_create_request.rb +19 -10
  43. data/lib/modern_treasury/models/ledger_transaction_create_partial_post_params.rb +69 -10
  44. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +10 -1
  45. data/lib/modern_treasury/models/legal_entity.rb +121 -3
  46. data/lib/modern_treasury/models/legal_entity_address_create_request.rb +14 -1
  47. data/lib/modern_treasury/models/legal_entity_association.rb +2 -3
  48. data/lib/modern_treasury/models/legal_entity_create_params.rb +34 -1
  49. data/lib/modern_treasury/models/legal_entity_update_params.rb +34 -1
  50. data/lib/modern_treasury/models/legal_entity_update_status_params.rb +46 -0
  51. data/lib/modern_treasury/models/payment_order.rb +9 -10
  52. data/lib/modern_treasury/models/payment_order_create_async_params.rb +4 -18
  53. data/lib/modern_treasury/models/payment_order_create_params.rb +15 -29
  54. data/lib/modern_treasury/models/payment_order_list_params.rb +0 -11
  55. data/lib/modern_treasury/models/payment_order_subtype.rb +2 -3
  56. data/lib/modern_treasury/models/payment_order_type.rb +2 -14
  57. data/lib/modern_treasury/models/payment_order_update_params.rb +4 -18
  58. data/lib/modern_treasury/models/payment_reference.rb +5 -5
  59. data/lib/modern_treasury/models/reconciliation_rule.rb +3 -16
  60. data/lib/modern_treasury/models/return_object.rb +11 -8
  61. data/lib/modern_treasury/models/routing_detail.rb +0 -13
  62. data/lib/modern_treasury/models/routing_detail_create_params.rb +0 -13
  63. data/lib/modern_treasury/models/routing_number_lookup_request.rb +0 -11
  64. data/lib/modern_treasury/models/third_party_verification.rb +2 -0
  65. data/lib/modern_treasury/models/transaction.rb +17 -20
  66. data/lib/modern_treasury/models/transaction_create_params.rb +23 -25
  67. data/lib/modern_treasury/models/validation_validate_routing_number_params.rb +0 -2
  68. data/lib/modern_treasury/models/virtual_account_create_params.rb +0 -13
  69. data/lib/modern_treasury/models.rb +2 -0
  70. data/lib/modern_treasury/resources/bulk_requests.rb +1 -1
  71. data/lib/modern_treasury/resources/expected_payments.rb +3 -3
  72. data/lib/modern_treasury/resources/holds.rb +3 -3
  73. data/lib/modern_treasury/resources/incoming_payment_details.rb +7 -3
  74. data/lib/modern_treasury/resources/internal_accounts.rb +8 -6
  75. data/lib/modern_treasury/resources/invoices.rb +2 -2
  76. data/lib/modern_treasury/resources/ledger_account_settlements.rb +3 -1
  77. data/lib/modern_treasury/resources/legal_entities.rb +33 -2
  78. data/lib/modern_treasury/resources/payment_orders.rb +3 -3
  79. data/lib/modern_treasury/resources/transactions.rb +5 -3
  80. data/lib/modern_treasury/version.rb +1 -1
  81. data/lib/modern_treasury.rb +1 -0
  82. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +104 -522
  83. data/rbi/modern_treasury/models/child_legal_entity.rbi +452 -5
  84. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +68 -0
  85. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +74 -0
  86. data/rbi/modern_treasury/models/counterparty_collect_account_params.rbi +0 -10
  87. data/rbi/modern_treasury/models/counterparty_create_params.rbi +74 -65
  88. data/rbi/modern_treasury/models/currency.rbi +0 -3
  89. data/rbi/modern_treasury/models/document.rbi +0 -87
  90. data/rbi/modern_treasury/models/document_create_params.rbi +22 -22
  91. data/rbi/modern_treasury/models/document_list_params.rbi +22 -22
  92. data/rbi/modern_treasury/models/expected_payment.rbi +2 -4
  93. data/rbi/modern_treasury/models/expected_payment_create_params.rbi +2 -4
  94. data/rbi/modern_treasury/models/expected_payment_list_params.rbi +3 -61
  95. data/rbi/modern_treasury/models/expected_payment_type.rbi +1 -18
  96. data/rbi/modern_treasury/models/expected_payment_update_params.rbi +2 -4
  97. data/rbi/modern_treasury/models/external_account_create_params.rbi +0 -65
  98. data/rbi/modern_treasury/models/external_account_verify_params.rbi +0 -55
  99. data/rbi/modern_treasury/models/external_account_verify_response.rbi +0 -55
  100. data/rbi/modern_treasury/models/hold_list_params.rbi +8 -13
  101. data/rbi/modern_treasury/models/identification_create_request.rbi +375 -0
  102. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +17 -43
  103. data/rbi/modern_treasury/models/incoming_payment_detail_create_async_params.rbi +12 -27
  104. data/rbi/modern_treasury/models/incoming_payment_detail_list_params.rbi +20 -33
  105. data/rbi/modern_treasury/models/internal_account.rbi +14 -55
  106. data/rbi/modern_treasury/models/internal_account_create_params.rbi +60 -77
  107. data/rbi/modern_treasury/models/internal_account_list_params.rbi +0 -55
  108. data/rbi/modern_treasury/models/internal_account_update_account_capability_response.rbi +0 -55
  109. data/rbi/modern_treasury/models/internal_accounts/balance_report.rbi +17 -7
  110. data/rbi/modern_treasury/models/internal_accounts/balance_report_create_params.rbi +31 -15
  111. data/rbi/modern_treasury/models/invoice.rbi +27 -3
  112. data/rbi/modern_treasury/models/invoice_create_params.rbi +4 -6
  113. data/rbi/modern_treasury/models/invoice_update_params.rbi +4 -6
  114. data/rbi/modern_treasury/models/ledger_account_settlement_update_params.rbi +10 -0
  115. data/rbi/modern_treasury/models/ledger_balance.rbi +21 -3
  116. data/rbi/modern_treasury/models/ledger_entry.rbi +10 -0
  117. data/rbi/modern_treasury/models/ledger_entry_create_request.rbi +26 -10
  118. data/rbi/modern_treasury/models/ledger_transaction_create_partial_post_params.rbi +89 -13
  119. data/rbi/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +10 -0
  120. data/rbi/modern_treasury/models/legal_entity.rbi +451 -5
  121. data/rbi/modern_treasury/models/legal_entity_address_create_request.rbi +18 -3
  122. data/rbi/modern_treasury/models/legal_entity_association.rbi +2 -4
  123. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +68 -0
  124. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +68 -0
  125. data/rbi/modern_treasury/models/legal_entity_update_status_params.rbi +96 -0
  126. data/rbi/modern_treasury/models/payment_order.rbi +30 -32
  127. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +6 -73
  128. data/rbi/modern_treasury/models/payment_order_create_params.rbi +28 -95
  129. data/rbi/modern_treasury/models/payment_order_list_params.rbi +0 -55
  130. data/rbi/modern_treasury/models/payment_order_subtype.rbi +3 -4
  131. data/rbi/modern_treasury/models/payment_order_type.rbi +2 -16
  132. data/rbi/modern_treasury/models/payment_order_update_params.rbi +6 -73
  133. data/rbi/modern_treasury/models/payment_reference.rbi +24 -24
  134. data/rbi/modern_treasury/models/reconciliation_rule.rbi +3 -43
  135. data/rbi/modern_treasury/models/return_object.rbi +33 -29
  136. data/rbi/modern_treasury/models/routing_detail.rbi +0 -59
  137. data/rbi/modern_treasury/models/routing_detail_create_params.rbi +0 -65
  138. data/rbi/modern_treasury/models/routing_number_lookup_request.rbi +0 -55
  139. data/rbi/modern_treasury/models/third_party_verification.rbi +10 -0
  140. data/rbi/modern_treasury/models/transaction.rbi +24 -35
  141. data/rbi/modern_treasury/models/transaction_create_params.rbi +33 -72
  142. data/rbi/modern_treasury/models/validation_validate_routing_number_params.rbi +0 -10
  143. data/rbi/modern_treasury/models/virtual_account_create_params.rbi +0 -65
  144. data/rbi/modern_treasury/models.rbi +3 -0
  145. data/rbi/modern_treasury/resources/bulk_requests.rbi +3 -2
  146. data/rbi/modern_treasury/resources/expected_payments.rbi +3 -6
  147. data/rbi/modern_treasury/resources/holds.rbi +3 -5
  148. data/rbi/modern_treasury/resources/incoming_payment_details.rbi +10 -2
  149. data/rbi/modern_treasury/resources/internal_accounts.rbi +15 -8
  150. data/rbi/modern_treasury/resources/invoices.rbi +4 -6
  151. data/rbi/modern_treasury/resources/ledger_account_settlements.rbi +4 -0
  152. data/rbi/modern_treasury/resources/legal_entities.rbi +31 -0
  153. data/rbi/modern_treasury/resources/payment_orders.rbi +9 -12
  154. data/rbi/modern_treasury/resources/transactions.rbi +11 -7
  155. data/sig/modern_treasury/models/bulk_request_create_params.rbs +45 -207
  156. data/sig/modern_treasury/models/child_legal_entity.rbs +179 -2
  157. data/sig/modern_treasury/models/child_legal_entity_create.rbs +21 -0
  158. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +21 -0
  159. data/sig/modern_treasury/models/counterparty_collect_account_params.rbs +0 -4
  160. data/sig/modern_treasury/models/counterparty_create_params.rbs +21 -26
  161. data/sig/modern_treasury/models/currency.rbs +0 -6
  162. data/sig/modern_treasury/models/document.rbs +0 -57
  163. data/sig/modern_treasury/models/document_create_params.rbs +22 -22
  164. data/sig/modern_treasury/models/document_list_params.rbs +22 -22
  165. data/sig/modern_treasury/models/expected_payment_list_params.rbs +0 -22
  166. data/sig/modern_treasury/models/expected_payment_type.rbs +0 -22
  167. data/sig/modern_treasury/models/external_account_create_params.rbs +0 -26
  168. data/sig/modern_treasury/models/external_account_verify_params.rbs +0 -22
  169. data/sig/modern_treasury/models/external_account_verify_response.rbs +0 -22
  170. data/sig/modern_treasury/models/identification_create_request.rbs +150 -0
  171. data/sig/modern_treasury/models/incoming_payment_detail.rbs +7 -16
  172. data/sig/modern_treasury/models/incoming_payment_detail_create_async_params.rbs +7 -12
  173. data/sig/modern_treasury/models/incoming_payment_detail_list_params.rbs +9 -12
  174. data/sig/modern_treasury/models/internal_account.rbs +5 -22
  175. data/sig/modern_treasury/models/internal_account_create_params.rbs +22 -33
  176. data/sig/modern_treasury/models/internal_account_list_params.rbs +0 -22
  177. data/sig/modern_treasury/models/internal_account_update_account_capability_response.rbs +0 -22
  178. data/sig/modern_treasury/models/internal_accounts/balance_report.rbs +9 -4
  179. data/sig/modern_treasury/models/internal_accounts/balance_report_create_params.rbs +17 -8
  180. data/sig/modern_treasury/models/invoice.rbs +18 -3
  181. data/sig/modern_treasury/models/ledger_account_settlement_update_params.rbs +5 -0
  182. data/sig/modern_treasury/models/ledger_balance.rbs +18 -3
  183. data/sig/modern_treasury/models/ledger_entry.rbs +5 -0
  184. data/sig/modern_treasury/models/ledger_entry_create_request.rbs +14 -5
  185. data/sig/modern_treasury/models/ledger_transaction_create_partial_post_params.rbs +42 -8
  186. data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +5 -0
  187. data/sig/modern_treasury/models/legal_entity.rbs +179 -2
  188. data/sig/modern_treasury/models/legal_entity_address_create_request.rbs +10 -3
  189. data/sig/modern_treasury/models/legal_entity_create_params.rbs +21 -0
  190. data/sig/modern_treasury/models/legal_entity_update_params.rbs +21 -0
  191. data/sig/modern_treasury/models/legal_entity_update_status_params.rbs +43 -0
  192. data/sig/modern_treasury/models/payment_order.rbs +10 -10
  193. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +0 -26
  194. data/sig/modern_treasury/models/payment_order_create_params.rbs +22 -48
  195. data/sig/modern_treasury/models/payment_order_list_params.rbs +0 -22
  196. data/sig/modern_treasury/models/payment_order_subtype.rbs +4 -6
  197. data/sig/modern_treasury/models/payment_order_type.rbs +0 -22
  198. data/sig/modern_treasury/models/payment_order_update_params.rbs +0 -26
  199. data/sig/modern_treasury/models/payment_reference.rbs +10 -10
  200. data/sig/modern_treasury/models/reconciliation_rule.rbs +0 -22
  201. data/sig/modern_treasury/models/return_object.rbs +18 -12
  202. data/sig/modern_treasury/models/routing_detail.rbs +0 -26
  203. data/sig/modern_treasury/models/routing_detail_create_params.rbs +0 -26
  204. data/sig/modern_treasury/models/routing_number_lookup_request.rbs +0 -22
  205. data/sig/modern_treasury/models/third_party_verification.rbs +4 -1
  206. data/sig/modern_treasury/models/transaction.rbs +7 -26
  207. data/sig/modern_treasury/models/transaction_create_params.rbs +14 -27
  208. data/sig/modern_treasury/models/validation_validate_routing_number_params.rbs +0 -4
  209. data/sig/modern_treasury/models/virtual_account_create_params.rbs +0 -26
  210. data/sig/modern_treasury/models.rbs +2 -0
  211. data/sig/modern_treasury/resources/incoming_payment_details.rbs +2 -0
  212. data/sig/modern_treasury/resources/internal_accounts.rbs +3 -2
  213. data/sig/modern_treasury/resources/ledger_account_settlements.rbs +1 -0
  214. data/sig/modern_treasury/resources/legal_entities.rbs +8 -0
  215. data/sig/modern_treasury/resources/transactions.rbs +2 -1
  216. metadata +5 -2
@@ -188,6 +188,18 @@ module ModernTreasury
188
188
  sig { returns(T.nilable(String)) }
189
189
  attr_accessor :suffix
190
190
 
191
+ # Acceptance of terms of use by the legal entity.
192
+ sig { returns(T.nilable(ModernTreasury::LegalEntity::TermsOfUse)) }
193
+ attr_reader :terms_of_use
194
+
195
+ sig do
196
+ params(
197
+ terms_of_use:
198
+ T.nilable(ModernTreasury::LegalEntity::TermsOfUse::OrHash)
199
+ ).void
200
+ end
201
+ attr_writer :terms_of_use
202
+
191
203
  # Deprecated. Use `third_party_verifications` instead.
192
204
  sig { returns(T.nilable(ModernTreasury::ThirdPartyVerification)) }
193
205
  attr_reader :third_party_verification
@@ -284,6 +296,8 @@ module ModernTreasury
284
296
  service_provider_legal_entity_id: T.nilable(String),
285
297
  status: T.nilable(ModernTreasury::LegalEntity::Status::OrSymbol),
286
298
  suffix: T.nilable(String),
299
+ terms_of_use:
300
+ T.nilable(ModernTreasury::LegalEntity::TermsOfUse::OrHash),
287
301
  third_party_verification:
288
302
  T.nilable(ModernTreasury::ThirdPartyVerification::OrHash),
289
303
  third_party_verifications:
@@ -376,6 +390,8 @@ module ModernTreasury
376
390
  status:,
377
391
  # An individual's suffix.
378
392
  suffix:,
393
+ # Acceptance of terms of use by the legal entity.
394
+ terms_of_use:,
379
395
  # Deprecated. Use `third_party_verifications` instead.
380
396
  third_party_verification:,
381
397
  # A list of third-party verifications run by external vendors.
@@ -443,6 +459,7 @@ module ModernTreasury
443
459
  status:
444
460
  T.nilable(ModernTreasury::LegalEntity::Status::TaggedSymbol),
445
461
  suffix: T.nilable(String),
462
+ terms_of_use: T.nilable(ModernTreasury::LegalEntity::TermsOfUse),
446
463
  third_party_verification:
447
464
  T.nilable(ModernTreasury::ThirdPartyVerification),
448
465
  third_party_verifications:
@@ -514,6 +531,11 @@ module ModernTreasury
514
531
  sig { returns(T.nilable(String)) }
515
532
  attr_accessor :postal_code
516
533
 
534
+ # Whether this address is the primary address for the legal entity. Optional; when
535
+ # omitted it is inferred from the address types.
536
+ sig { returns(T.nilable(T::Boolean)) }
537
+ attr_accessor :primary
538
+
517
539
  # Region or State.
518
540
  sig { returns(T.nilable(String)) }
519
541
  attr_accessor :region
@@ -537,6 +559,7 @@ module ModernTreasury
537
559
  locality: T.nilable(String),
538
560
  object: String,
539
561
  postal_code: T.nilable(String),
562
+ primary: T.nilable(T::Boolean),
540
563
  region: T.nilable(String),
541
564
  updated_at: Time
542
565
  ).returns(T.attached_class)
@@ -559,6 +582,9 @@ module ModernTreasury
559
582
  object:,
560
583
  # The postal code of the address.
561
584
  postal_code:,
585
+ # Whether this address is the primary address for the legal entity. Optional; when
586
+ # omitted it is inferred from the address types.
587
+ primary:,
562
588
  # Region or State.
563
589
  region:,
564
590
  updated_at:
@@ -582,6 +608,7 @@ module ModernTreasury
582
608
  locality: T.nilable(String),
583
609
  object: String,
584
610
  postal_code: T.nilable(String),
611
+ primary: T.nilable(T::Boolean),
585
612
  region: T.nilable(String),
586
613
  updated_at: Time
587
614
  }
@@ -604,6 +631,11 @@ module ModernTreasury
604
631
  :business,
605
632
  ModernTreasury::LegalEntity::Address::AddressType::TaggedSymbol
606
633
  )
634
+ BUSINESS_PHYSICAL =
635
+ T.let(
636
+ :business_physical,
637
+ ModernTreasury::LegalEntity::Address::AddressType::TaggedSymbol
638
+ )
607
639
  BUSINESS_REGISTERED =
608
640
  T.let(
609
641
  :business_registered,
@@ -776,6 +808,36 @@ module ModernTreasury
776
808
  :ar_cuit,
777
809
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
778
810
  )
811
+ AT_ATIN =
812
+ T.let(
813
+ :at_atin,
814
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
815
+ )
816
+ AT_VAT =
817
+ T.let(
818
+ :at_vat,
819
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
820
+ )
821
+ AU_ABN =
822
+ T.let(
823
+ :au_abn,
824
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
825
+ )
826
+ AU_TFN =
827
+ T.let(
828
+ :au_tfn,
829
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
830
+ )
831
+ BE_ENT =
832
+ T.let(
833
+ :be_ent,
834
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
835
+ )
836
+ BE_NRN =
837
+ T.let(
838
+ :be_nrn,
839
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
840
+ )
779
841
  BR_CNPJ =
780
842
  T.let(
781
843
  :br_cnpj,
@@ -786,11 +848,26 @@ module ModernTreasury
786
848
  :br_cpf,
787
849
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
788
850
  )
851
+ CA_BN =
852
+ T.let(
853
+ :ca_bn,
854
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
855
+ )
789
856
  CA_SIN =
790
857
  T.let(
791
858
  :ca_sin,
792
859
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
793
860
  )
861
+ CH_AHV =
862
+ T.let(
863
+ :ch_ahv,
864
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
865
+ )
866
+ CH_UID =
867
+ T.let(
868
+ :ch_uid,
869
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
870
+ )
794
871
  CL_RUN =
795
872
  T.let(
796
873
  :cl_run,
@@ -811,11 +888,121 @@ module ModernTreasury
811
888
  :co_nit,
812
889
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
813
890
  )
891
+ CY_TIN =
892
+ T.let(
893
+ :cy_tin,
894
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
895
+ )
896
+ CZ_ICO =
897
+ T.let(
898
+ :cz_ico,
899
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
900
+ )
901
+ CZ_RC =
902
+ T.let(
903
+ :cz_rc,
904
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
905
+ )
906
+ DE_STID =
907
+ T.let(
908
+ :de_stid,
909
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
910
+ )
911
+ DE_STNR =
912
+ T.let(
913
+ :de_stnr,
914
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
915
+ )
916
+ DE_VAT =
917
+ T.let(
918
+ :de_vat,
919
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
920
+ )
921
+ DK_CPR =
922
+ T.let(
923
+ :dk_cpr,
924
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
925
+ )
926
+ DK_CVR =
927
+ T.let(
928
+ :dk_cvr,
929
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
930
+ )
814
931
  DRIVERS_LICENSE =
815
932
  T.let(
816
933
  :drivers_license,
817
934
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
818
935
  )
936
+ EE_IK =
937
+ T.let(
938
+ :ee_ik,
939
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
940
+ )
941
+ EE_RK =
942
+ T.let(
943
+ :ee_rk,
944
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
945
+ )
946
+ ES_NIE =
947
+ T.let(
948
+ :es_nie,
949
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
950
+ )
951
+ ES_NIF =
952
+ T.let(
953
+ :es_nif,
954
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
955
+ )
956
+ FI_HETU =
957
+ T.let(
958
+ :fi_hetu,
959
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
960
+ )
961
+ FI_YTJ =
962
+ T.let(
963
+ :fi_ytj,
964
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
965
+ )
966
+ FR_NIF =
967
+ T.let(
968
+ :fr_nif,
969
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
970
+ )
971
+ FR_SIREN =
972
+ T.let(
973
+ :fr_siren,
974
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
975
+ )
976
+ FR_VAT =
977
+ T.let(
978
+ :fr_vat,
979
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
980
+ )
981
+ GB_NINO =
982
+ T.let(
983
+ :gb_nino,
984
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
985
+ )
986
+ GB_UTR =
987
+ T.let(
988
+ :gb_utr,
989
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
990
+ )
991
+ GB_VAT =
992
+ T.let(
993
+ :gb_vat,
994
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
995
+ )
996
+ GENERIC_INTERNATIONAL =
997
+ T.let(
998
+ :generic_international,
999
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1000
+ )
1001
+ GR_VAT =
1002
+ T.let(
1003
+ :gr_vat,
1004
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1005
+ )
819
1006
  HN_ID =
820
1007
  T.let(
821
1008
  :hn_id,
@@ -826,16 +1013,61 @@ module ModernTreasury
826
1013
  :hn_rtn,
827
1014
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
828
1015
  )
1016
+ HR_OIB =
1017
+ T.let(
1018
+ :hr_oib,
1019
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1020
+ )
1021
+ HU_ADJ =
1022
+ T.let(
1023
+ :hu_adj,
1024
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1025
+ )
1026
+ HU_ANUM =
1027
+ T.let(
1028
+ :hu_anum,
1029
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1030
+ )
829
1031
  IE_PPS =
830
1032
  T.let(
831
1033
  :ie_pps,
832
1034
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
833
1035
  )
1036
+ IE_TRN =
1037
+ T.let(
1038
+ :ie_trn,
1039
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1040
+ )
834
1041
  IN_LEI =
835
1042
  T.let(
836
1043
  :in_lei,
837
1044
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
838
1045
  )
1046
+ IS_KNT =
1047
+ T.let(
1048
+ :is_knt,
1049
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1050
+ )
1051
+ IT_CF =
1052
+ T.let(
1053
+ :it_cf,
1054
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1055
+ )
1056
+ IT_PIVA =
1057
+ T.let(
1058
+ :it_piva,
1059
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1060
+ )
1061
+ JP_HB =
1062
+ T.let(
1063
+ :jp_hb,
1064
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1065
+ )
1066
+ JP_MN =
1067
+ T.let(
1068
+ :jp_mn,
1069
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1070
+ )
839
1071
  KR_BRN =
840
1072
  T.let(
841
1073
  :kr_brn,
@@ -851,11 +1083,136 @@ module ModernTreasury
851
1083
  :kr_rrn,
852
1084
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
853
1085
  )
1086
+ LI_PEID =
1087
+ T.let(
1088
+ :li_peid,
1089
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1090
+ )
1091
+ LT_AK =
1092
+ T.let(
1093
+ :lt_ak,
1094
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1095
+ )
1096
+ LT_JAK =
1097
+ T.let(
1098
+ :lt_jak,
1099
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1100
+ )
1101
+ LU_MTC =
1102
+ T.let(
1103
+ :lu_mtc,
1104
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1105
+ )
1106
+ LU_VAT =
1107
+ T.let(
1108
+ :lu_vat,
1109
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1110
+ )
1111
+ LV_PK =
1112
+ T.let(
1113
+ :lv_pk,
1114
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1115
+ )
1116
+ LV_RN =
1117
+ T.let(
1118
+ :lv_rn,
1119
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1120
+ )
1121
+ MT_TIN =
1122
+ T.let(
1123
+ :mt_tin,
1124
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1125
+ )
1126
+ MT_VAT =
1127
+ T.let(
1128
+ :mt_vat,
1129
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1130
+ )
1131
+ MX_CURP =
1132
+ T.let(
1133
+ :mx_curp,
1134
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1135
+ )
1136
+ MX_INE =
1137
+ T.let(
1138
+ :mx_ine,
1139
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1140
+ )
1141
+ MX_RFC =
1142
+ T.let(
1143
+ :mx_rfc,
1144
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1145
+ )
1146
+ NATIONAL_ID =
1147
+ T.let(
1148
+ :national_id,
1149
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1150
+ )
1151
+ NL_BSN =
1152
+ T.let(
1153
+ :nl_bsn,
1154
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1155
+ )
1156
+ NL_BTW =
1157
+ T.let(
1158
+ :nl_btw,
1159
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1160
+ )
1161
+ NL_RSIN =
1162
+ T.let(
1163
+ :nl_rsin,
1164
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1165
+ )
1166
+ NO_FDN =
1167
+ T.let(
1168
+ :no_fdn,
1169
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1170
+ )
1171
+ NO_MVA =
1172
+ T.let(
1173
+ :no_mva,
1174
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1175
+ )
1176
+ NO_ORGNR =
1177
+ T.let(
1178
+ :no_orgnr,
1179
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1180
+ )
1181
+ NZ_IRD =
1182
+ T.let(
1183
+ :nz_ird,
1184
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1185
+ )
854
1186
  PASSPORT =
855
1187
  T.let(
856
1188
  :passport,
857
1189
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
858
1190
  )
1191
+ PL_NIP =
1192
+ T.let(
1193
+ :pl_nip,
1194
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1195
+ )
1196
+ PL_PESEL =
1197
+ T.let(
1198
+ :pl_pesel,
1199
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1200
+ )
1201
+ PT_NIF =
1202
+ T.let(
1203
+ :pt_nif,
1204
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1205
+ )
1206
+ RO_CNP =
1207
+ T.let(
1208
+ :ro_cnp,
1209
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1210
+ )
1211
+ RO_CUI =
1212
+ T.let(
1213
+ :ro_cui,
1214
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1215
+ )
859
1216
  SA_TIN =
860
1217
  T.let(
861
1218
  :sa_tin,
@@ -866,6 +1223,51 @@ module ModernTreasury
866
1223
  :sa_vat,
867
1224
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
868
1225
  )
1226
+ SE_ORGNR =
1227
+ T.let(
1228
+ :se_orgnr,
1229
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1230
+ )
1231
+ SE_PNMR =
1232
+ T.let(
1233
+ :se_pnmr,
1234
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1235
+ )
1236
+ SG_FIN =
1237
+ T.let(
1238
+ :sg_fin,
1239
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1240
+ )
1241
+ SG_NRIC =
1242
+ T.let(
1243
+ :sg_nric,
1244
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1245
+ )
1246
+ SG_UEN =
1247
+ T.let(
1248
+ :sg_uen,
1249
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1250
+ )
1251
+ SI_DAV =
1252
+ T.let(
1253
+ :si_dav,
1254
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1255
+ )
1256
+ SI_TIN =
1257
+ T.let(
1258
+ :si_tin,
1259
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1260
+ )
1261
+ SK_ICO =
1262
+ T.let(
1263
+ :sk_ico,
1264
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1265
+ )
1266
+ SK_RC =
1267
+ T.let(
1268
+ :sk_rc,
1269
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1270
+ )
869
1271
  US_EIN =
870
1272
  T.let(
871
1273
  :us_ein,
@@ -881,6 +1283,11 @@ module ModernTreasury
881
1283
  :us_ssn,
882
1284
  ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
883
1285
  )
1286
+ UY_RUT =
1287
+ T.let(
1288
+ :uy_rut,
1289
+ ModernTreasury::LegalEntity::Identification::IDType::TaggedSymbol
1290
+ )
884
1291
  VN_TIN =
885
1292
  T.let(
886
1293
  :vn_tin,
@@ -919,11 +1326,6 @@ module ModernTreasury
919
1326
  :individual,
920
1327
  ModernTreasury::LegalEntity::LegalEntityType::TaggedSymbol
921
1328
  )
922
- JOINT =
923
- T.let(
924
- :joint,
925
- ModernTreasury::LegalEntity::LegalEntityType::TaggedSymbol
926
- )
927
1329
 
928
1330
  sig do
929
1331
  override.returns(
@@ -1106,6 +1508,50 @@ module ModernTreasury
1106
1508
  def self.values
1107
1509
  end
1108
1510
  end
1511
+
1512
+ class TermsOfUse < ModernTreasury::Internal::Type::BaseModel
1513
+ OrHash =
1514
+ T.type_alias do
1515
+ T.any(
1516
+ ModernTreasury::LegalEntity::TermsOfUse,
1517
+ ModernTreasury::Internal::AnyHash
1518
+ )
1519
+ end
1520
+
1521
+ # The ISO 8601 timestamp indicating when the terms of use were accepted.
1522
+ sig { returns(T.nilable(Time)) }
1523
+ attr_reader :accepted_at
1524
+
1525
+ sig { params(accepted_at: Time).void }
1526
+ attr_writer :accepted_at
1527
+
1528
+ # The IP address from which the terms of use were accepted. Supports both IPv4 and
1529
+ # IPv6 formats.
1530
+ sig { returns(T.nilable(String)) }
1531
+ attr_reader :ip_address
1532
+
1533
+ sig { params(ip_address: String).void }
1534
+ attr_writer :ip_address
1535
+
1536
+ # Acceptance of terms of use by the legal entity.
1537
+ sig do
1538
+ params(accepted_at: Time, ip_address: String).returns(
1539
+ T.attached_class
1540
+ )
1541
+ end
1542
+ def self.new(
1543
+ # The ISO 8601 timestamp indicating when the terms of use were accepted.
1544
+ accepted_at: nil,
1545
+ # The IP address from which the terms of use were accepted. Supports both IPv4 and
1546
+ # IPv6 formats.
1547
+ ip_address: nil
1548
+ )
1549
+ end
1550
+
1551
+ sig { override.returns({ accepted_at: Time, ip_address: String }) }
1552
+ def to_hash
1553
+ end
1554
+ end
1109
1555
  end
1110
1556
  end
1111
1557
  end
@@ -55,6 +55,11 @@ module ModernTreasury
55
55
  sig { returns(T.nilable(String)) }
56
56
  attr_accessor :line2
57
57
 
58
+ # Whether this address is the primary address for the legal entity. Optional; when
59
+ # omitted it is inferred from the address types.
60
+ sig { returns(T.nilable(T::Boolean)) }
61
+ attr_accessor :primary
62
+
58
63
  sig do
59
64
  params(
60
65
  country: T.nilable(String),
@@ -66,7 +71,8 @@ module ModernTreasury
66
71
  T::Array[
67
72
  ModernTreasury::LegalEntityAddressCreateRequest::AddressType::OrSymbol
68
73
  ],
69
- line2: T.nilable(String)
74
+ line2: T.nilable(String),
75
+ primary: T.nilable(T::Boolean)
70
76
  ).returns(T.attached_class)
71
77
  end
72
78
  def self.new(
@@ -81,7 +87,10 @@ module ModernTreasury
81
87
  region:,
82
88
  # The types of this address.
83
89
  address_types: nil,
84
- line2: nil
90
+ line2: nil,
91
+ # Whether this address is the primary address for the legal entity. Optional; when
92
+ # omitted it is inferred from the address types.
93
+ primary: nil
85
94
  )
86
95
  end
87
96
 
@@ -97,7 +106,8 @@ module ModernTreasury
97
106
  T::Array[
98
107
  ModernTreasury::LegalEntityAddressCreateRequest::AddressType::OrSymbol
99
108
  ],
100
- line2: T.nilable(String)
109
+ line2: T.nilable(String),
110
+ primary: T.nilable(T::Boolean)
101
111
  }
102
112
  )
103
113
  end
@@ -121,6 +131,11 @@ module ModernTreasury
121
131
  :business,
122
132
  ModernTreasury::LegalEntityAddressCreateRequest::AddressType::TaggedSymbol
123
133
  )
134
+ BUSINESS_PHYSICAL =
135
+ T.let(
136
+ :business_physical,
137
+ ModernTreasury::LegalEntityAddressCreateRequest::AddressType::TaggedSymbol
138
+ )
124
139
  BUSINESS_REGISTERED =
125
140
  T.let(
126
141
  :business_registered,
@@ -39,8 +39,7 @@ module ModernTreasury
39
39
  sig { returns(T.nilable(Integer)) }
40
40
  attr_accessor :ownership_percentage
41
41
 
42
- # The ID of the parent legal entity. This must be a business or joint legal
43
- # entity.
42
+ # The ID of the parent legal entity. This must be a business legal entity.
44
43
  sig { returns(String) }
45
44
  attr_accessor :parent_legal_entity_id
46
45
 
@@ -90,8 +89,7 @@ module ModernTreasury
90
89
  object:,
91
90
  # The child entity's ownership percentage iff they are a beneficial owner.
92
91
  ownership_percentage:,
93
- # The ID of the parent legal entity. This must be a business or joint legal
94
- # entity.
92
+ # The ID of the parent legal entity. This must be a business legal entity.
95
93
  parent_legal_entity_id:,
96
94
  relationship_types:,
97
95
  # The job title of the child entity at the parent entity.