modern_treasury 0.30.0 → 0.32.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 (145) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/modern_treasury/models/account_detail.rb +9 -6
  5. data/lib/modern_treasury/models/account_detail_create_params.rb +9 -6
  6. data/lib/modern_treasury/models/bulk_request_create_params.rb +30 -10
  7. data/lib/modern_treasury/models/child_legal_entity.rb +8 -7
  8. data/lib/modern_treasury/models/child_legal_entity_create.rb +2 -2
  9. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +2 -2
  10. data/lib/modern_treasury/models/counterparty_create_params.rb +27 -4
  11. data/lib/modern_treasury/models/document.rb +7 -9
  12. data/lib/modern_treasury/models/document_create_params.rb +0 -2
  13. data/lib/modern_treasury/models/document_list_params.rb +7 -9
  14. data/lib/modern_treasury/models/expected_payment.rb +3 -4
  15. data/lib/modern_treasury/models/expected_payment_create_params.rb +2 -3
  16. data/lib/modern_treasury/models/expected_payment_update_params.rb +2 -3
  17. data/lib/modern_treasury/models/external_account_create_params.rb +2 -1
  18. data/lib/modern_treasury/models/identification.rb +109 -0
  19. data/lib/modern_treasury/models/identification_create_params.rb +109 -0
  20. data/lib/modern_treasury/models/identification_create_request.rb +109 -0
  21. data/lib/modern_treasury/models/identification_update_params.rb +109 -0
  22. data/lib/modern_treasury/models/incoming_payment_detail.rb +2 -1
  23. data/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rb +3 -14
  24. data/lib/modern_treasury/models/internal_account.rb +10 -1
  25. data/lib/modern_treasury/models/internal_account_create_params.rb +13 -1
  26. data/lib/modern_treasury/models/ledger_account.rb +0 -1
  27. data/lib/modern_treasury/models/ledger_account_create_request.rb +0 -1
  28. data/lib/modern_treasury/models/legal_entity.rb +8 -7
  29. data/lib/modern_treasury/models/legal_entity_address_create_request.rb +18 -18
  30. data/lib/modern_treasury/models/legal_entity_create_params.rb +23 -3
  31. data/lib/modern_treasury/models/legal_entity_list_params.rb +1 -0
  32. data/lib/modern_treasury/models/legal_entity_update_params.rb +25 -3
  33. data/lib/modern_treasury/models/payment_order.rb +12 -2
  34. data/lib/modern_treasury/models/payment_order_create_async_params.rb +13 -2
  35. data/lib/modern_treasury/models/payment_order_create_params.rb +13 -4
  36. data/lib/modern_treasury/models/payment_order_subtype.rb +3 -0
  37. data/lib/modern_treasury/models/payment_order_update_params.rb +13 -2
  38. data/lib/modern_treasury/models/payment_reference.rb +1 -1
  39. data/lib/modern_treasury/models/return_object.rb +1 -1
  40. data/lib/modern_treasury/models/third_party_verification.rb +1 -0
  41. data/lib/modern_treasury/models/virtual_account.rb +9 -1
  42. data/lib/modern_treasury/models/virtual_account_create_params.rb +18 -7
  43. data/lib/modern_treasury/models/virtual_account_list_params.rb +9 -1
  44. data/lib/modern_treasury/resources/account_details.rb +1 -1
  45. data/lib/modern_treasury/resources/documents.rb +1 -1
  46. data/lib/modern_treasury/resources/expected_payments.rb +2 -2
  47. data/lib/modern_treasury/resources/incoming_payment_details.rb +1 -1
  48. data/lib/modern_treasury/resources/internal_accounts.rb +7 -2
  49. data/lib/modern_treasury/resources/legal_entities.rb +8 -4
  50. data/lib/modern_treasury/resources/payment_orders.rb +9 -3
  51. data/lib/modern_treasury/resources/virtual_accounts.rb +6 -2
  52. data/lib/modern_treasury/version.rb +1 -1
  53. data/rbi/modern_treasury/models/account_detail.rbi +19 -11
  54. data/rbi/modern_treasury/models/account_detail_create_params.rbi +19 -11
  55. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +66 -16
  56. data/rbi/modern_treasury/models/child_legal_entity.rbi +10 -8
  57. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +2 -2
  58. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +2 -2
  59. data/rbi/modern_treasury/models/counterparty_create_params.rbi +69 -7
  60. data/rbi/modern_treasury/models/document.rbi +9 -19
  61. data/rbi/modern_treasury/models/document_create_params.rbi +0 -10
  62. data/rbi/modern_treasury/models/document_list_params.rbi +9 -19
  63. data/rbi/modern_treasury/models/expected_payment.rbi +3 -3
  64. data/rbi/modern_treasury/models/expected_payment_create_params.rbi +11 -3
  65. data/rbi/modern_treasury/models/expected_payment_update_params.rbi +11 -3
  66. data/rbi/modern_treasury/models/external_account_create_params.rbi +10 -5
  67. data/rbi/modern_treasury/models/identification.rbi +224 -0
  68. data/rbi/modern_treasury/models/identification_create_params.rbi +545 -0
  69. data/rbi/modern_treasury/models/identification_create_request.rbi +545 -0
  70. data/rbi/modern_treasury/models/identification_update_params.rbi +545 -0
  71. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +10 -5
  72. data/rbi/modern_treasury/models/incoming_payment_detail_create_async_params.rbi +4 -50
  73. data/rbi/modern_treasury/models/internal_account.rbi +10 -0
  74. data/rbi/modern_treasury/models/internal_account_create_params.rbi +22 -0
  75. data/rbi/modern_treasury/models/ledger_account.rbi +0 -5
  76. data/rbi/modern_treasury/models/ledger_account_create_request.rbi +0 -5
  77. data/rbi/modern_treasury/models/legal_entity.rbi +9 -8
  78. data/rbi/modern_treasury/models/legal_entity_address_create_request.rbi +21 -21
  79. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +51 -2
  80. data/rbi/modern_treasury/models/legal_entity_list_params.rbi +5 -0
  81. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +54 -2
  82. data/rbi/modern_treasury/models/payment_order.rbi +17 -5
  83. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +22 -5
  84. data/rbi/modern_treasury/models/payment_order_create_params.rbi +22 -15
  85. data/rbi/modern_treasury/models/payment_order_subtype.rbi +9 -0
  86. data/rbi/modern_treasury/models/payment_order_update_params.rbi +22 -5
  87. data/rbi/modern_treasury/models/payment_reference.rbi +5 -5
  88. data/rbi/modern_treasury/models/return_object.rbi +5 -5
  89. data/rbi/modern_treasury/models/third_party_verification.rbi +5 -0
  90. data/rbi/modern_treasury/models/virtual_account.rbi +8 -0
  91. data/rbi/modern_treasury/models/virtual_account_create_params.rbi +27 -11
  92. data/rbi/modern_treasury/models/virtual_account_list_params.rbi +11 -0
  93. data/rbi/modern_treasury/resources/account_details.rbi +3 -2
  94. data/rbi/modern_treasury/resources/documents.rbi +3 -3
  95. data/rbi/modern_treasury/resources/expected_payments.rbi +2 -2
  96. data/rbi/modern_treasury/resources/incoming_payment_details.rbi +1 -2
  97. data/rbi/modern_treasury/resources/internal_accounts.rbi +7 -1
  98. data/rbi/modern_treasury/resources/legal_entities.rbi +11 -2
  99. data/rbi/modern_treasury/resources/payment_orders.rbi +15 -0
  100. data/rbi/modern_treasury/resources/virtual_accounts.rbi +6 -0
  101. data/sig/modern_treasury/models/account_detail.rbs +5 -3
  102. data/sig/modern_treasury/models/account_detail_create_params.rbs +5 -3
  103. data/sig/modern_treasury/models/bulk_request_create_params.rbs +36 -14
  104. data/sig/modern_treasury/models/child_legal_entity.rbs +2 -1
  105. data/sig/modern_treasury/models/counterparty_create_params.rbs +24 -3
  106. data/sig/modern_treasury/models/document.rbs +0 -4
  107. data/sig/modern_treasury/models/document_create_params.rbs +0 -4
  108. data/sig/modern_treasury/models/document_list_params.rbs +0 -4
  109. data/sig/modern_treasury/models/expected_payment.rbs +4 -4
  110. data/sig/modern_treasury/models/expected_payment_create_params.rbs +8 -4
  111. data/sig/modern_treasury/models/expected_payment_update_params.rbs +8 -4
  112. data/sig/modern_treasury/models/external_account_create_params.rbs +5 -3
  113. data/sig/modern_treasury/models/identification.rbs +219 -1
  114. data/sig/modern_treasury/models/identification_create_params.rbs +219 -1
  115. data/sig/modern_treasury/models/identification_create_request.rbs +219 -1
  116. data/sig/modern_treasury/models/identification_update_params.rbs +219 -1
  117. data/sig/modern_treasury/models/incoming_payment_detail.rbs +5 -3
  118. data/sig/modern_treasury/models/incoming_payment_detail_create_async_params.rbs +6 -17
  119. data/sig/modern_treasury/models/internal_account.rbs +5 -0
  120. data/sig/modern_treasury/models/internal_account_create_params.rbs +13 -1
  121. data/sig/modern_treasury/models/ledger_account.rbs +1 -2
  122. data/sig/modern_treasury/models/ledger_account_create_request.rbs +1 -2
  123. data/sig/modern_treasury/models/legal_entity.rbs +2 -1
  124. data/sig/modern_treasury/models/legal_entity_address_create_request.rbs +13 -13
  125. data/sig/modern_treasury/models/legal_entity_create_params.rbs +19 -0
  126. data/sig/modern_treasury/models/legal_entity_list_params.rbs +2 -1
  127. data/sig/modern_treasury/models/legal_entity_update_params.rbs +19 -0
  128. data/sig/modern_treasury/models/payment_order.rbs +7 -2
  129. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +10 -3
  130. data/sig/modern_treasury/models/payment_order_create_params.rbs +10 -7
  131. data/sig/modern_treasury/models/payment_order_subtype.rbs +6 -0
  132. data/sig/modern_treasury/models/payment_order_update_params.rbs +10 -3
  133. data/sig/modern_treasury/models/payment_reference.rbs +2 -2
  134. data/sig/modern_treasury/models/return_object.rbs +2 -2
  135. data/sig/modern_treasury/models/third_party_verification.rbs +2 -0
  136. data/sig/modern_treasury/models/virtual_account.rbs +5 -0
  137. data/sig/modern_treasury/models/virtual_account_create_params.rbs +10 -3
  138. data/sig/modern_treasury/models/virtual_account_list_params.rbs +7 -0
  139. data/sig/modern_treasury/resources/expected_payments.rbs +2 -2
  140. data/sig/modern_treasury/resources/incoming_payment_details.rbs +1 -1
  141. data/sig/modern_treasury/resources/internal_accounts.rbs +1 -0
  142. data/sig/modern_treasury/resources/legal_entities.rbs +2 -0
  143. data/sig/modern_treasury/resources/payment_orders.rbs +3 -0
  144. data/sig/modern_treasury/resources/virtual_accounts.rbs +2 -0
  145. metadata +2 -2
@@ -363,11 +363,21 @@ module ModernTreasury
363
363
  end
364
364
  OrSymbol = T.type_alias { T.any(Symbol, String) }
365
365
 
366
+ ARBITRUM_ADDRESS =
367
+ T.let(
368
+ :arbitrum_address,
369
+ ModernTreasury::IncomingPaymentDetail::OriginatingAccountNumberType::TaggedSymbol
370
+ )
366
371
  AU_NUMBER =
367
372
  T.let(
368
373
  :au_number,
369
374
  ModernTreasury::IncomingPaymentDetail::OriginatingAccountNumberType::TaggedSymbol
370
375
  )
376
+ AVALANCHE_ADDRESS =
377
+ T.let(
378
+ :avalanche_address,
379
+ ModernTreasury::IncomingPaymentDetail::OriginatingAccountNumberType::TaggedSymbol
380
+ )
371
381
  BASE_ADDRESS =
372
382
  T.let(
373
383
  :base_address,
@@ -433,11 +443,6 @@ module ModernTreasury
433
443
  :solana_address,
434
444
  ModernTreasury::IncomingPaymentDetail::OriginatingAccountNumberType::TaggedSymbol
435
445
  )
436
- WALLET_ADDRESS =
437
- T.let(
438
- :wallet_address,
439
- ModernTreasury::IncomingPaymentDetail::OriginatingAccountNumberType::TaggedSymbol
440
- )
441
446
 
442
447
  sig do
443
448
  override.returns(
@@ -40,20 +40,11 @@ module ModernTreasury
40
40
  attr_accessor :description
41
41
 
42
42
  # One of `credit`, `debit`.
43
- sig do
44
- returns(
45
- T.nilable(
46
- ModernTreasury::IncomingPaymentDetailCreateAsyncParams::Direction::OrSymbol
47
- )
48
- )
49
- end
43
+ sig { returns(T.nilable(ModernTreasury::TransactionDirection::OrSymbol)) }
50
44
  attr_reader :direction
51
45
 
52
46
  sig do
53
- params(
54
- direction:
55
- ModernTreasury::IncomingPaymentDetailCreateAsyncParams::Direction::OrSymbol
56
- ).void
47
+ params(direction: ModernTreasury::TransactionDirection::OrSymbol).void
57
48
  end
58
49
  attr_writer :direction
59
50
 
@@ -99,8 +90,7 @@ module ModernTreasury
99
90
  currency: T.nilable(ModernTreasury::Currency::OrSymbol),
100
91
  data: T.nilable(T.anything),
101
92
  description: T.nilable(String),
102
- direction:
103
- ModernTreasury::IncomingPaymentDetailCreateAsyncParams::Direction::OrSymbol,
93
+ direction: ModernTreasury::TransactionDirection::OrSymbol,
104
94
  internal_account_id: String,
105
95
  subtype: T.nilable(String),
106
96
  type:
@@ -146,8 +136,7 @@ module ModernTreasury
146
136
  currency: T.nilable(ModernTreasury::Currency::OrSymbol),
147
137
  data: T.nilable(T.anything),
148
138
  description: T.nilable(String),
149
- direction:
150
- ModernTreasury::IncomingPaymentDetailCreateAsyncParams::Direction::OrSymbol,
139
+ direction: ModernTreasury::TransactionDirection::OrSymbol,
151
140
  internal_account_id: String,
152
141
  subtype: T.nilable(String),
153
142
  type:
@@ -160,41 +149,6 @@ module ModernTreasury
160
149
  def to_hash
161
150
  end
162
151
 
163
- # One of `credit`, `debit`.
164
- module Direction
165
- extend ModernTreasury::Internal::Type::Enum
166
-
167
- TaggedSymbol =
168
- T.type_alias do
169
- T.all(
170
- Symbol,
171
- ModernTreasury::IncomingPaymentDetailCreateAsyncParams::Direction
172
- )
173
- end
174
- OrSymbol = T.type_alias { T.any(Symbol, String) }
175
-
176
- CREDIT =
177
- T.let(
178
- :credit,
179
- ModernTreasury::IncomingPaymentDetailCreateAsyncParams::Direction::TaggedSymbol
180
- )
181
- DEBIT =
182
- T.let(
183
- :debit,
184
- ModernTreasury::IncomingPaymentDetailCreateAsyncParams::Direction::TaggedSymbol
185
- )
186
-
187
- sig do
188
- override.returns(
189
- T::Array[
190
- ModernTreasury::IncomingPaymentDetailCreateAsyncParams::Direction::TaggedSymbol
191
- ]
192
- )
193
- end
194
- def self.values
195
- end
196
- end
197
-
198
152
  # One of `ach`, `wire`, `check`.
199
153
  module Type
200
154
  extend ModernTreasury::Internal::Type::Enum
@@ -130,6 +130,11 @@ module ModernTreasury
130
130
  end
131
131
  attr_accessor :status
132
132
 
133
+ # The account title at the financial institution, used in place of the party name.
134
+ # Only applicable to accounts created under supported connections.
135
+ sig { returns(T.nilable(String)) }
136
+ attr_accessor :title
137
+
133
138
  sig { returns(Time) }
134
139
  attr_accessor :updated_at
135
140
 
@@ -167,6 +172,7 @@ module ModernTreasury
167
172
  T.nilable(ModernTreasury::InternalAccount::PartyType::OrSymbol),
168
173
  routing_details: T::Array[ModernTreasury::RoutingDetail::OrHash],
169
174
  status: T.nilable(ModernTreasury::InternalAccount::Status::OrSymbol),
175
+ title: T.nilable(String),
170
176
  updated_at: Time,
171
177
  vendor_id: T.nilable(String)
172
178
  ).returns(T.attached_class)
@@ -223,6 +229,9 @@ module ModernTreasury
223
229
  routing_details:,
224
230
  # The internal account status.
225
231
  status:,
232
+ # The account title at the financial institution, used in place of the party name.
233
+ # Only applicable to accounts created under supported connections.
234
+ title:,
226
235
  updated_at:,
227
236
  # The vendor ID associated with this account.
228
237
  vendor_id:
@@ -263,6 +272,7 @@ module ModernTreasury
263
272
  routing_details: T::Array[ModernTreasury::RoutingDetail],
264
273
  status:
265
274
  T.nilable(ModernTreasury::InternalAccount::Status::TaggedSymbol),
275
+ title: T.nilable(String),
266
276
  updated_at: Time,
267
277
  vendor_id: T.nilable(String)
268
278
  }
@@ -157,6 +157,12 @@ module ModernTreasury
157
157
  end
158
158
  attr_writer :requested_account_number_types
159
159
 
160
+ # The account title at the financial institution, used in place of the party name.
161
+ # Only applicable to accounts created under supported connections. Please reach
162
+ # out to your customer success manager to enable this capability for your program.
163
+ sig { returns(T.nilable(String)) }
164
+ attr_accessor :title
165
+
160
166
  # A hash of vendor specific attributes that will be used when creating the account
161
167
  # at the vendor specified by the given connection.
162
168
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
@@ -190,6 +196,7 @@ module ModernTreasury
190
196
  T::Array[
191
197
  ModernTreasury::InternalAccountCreateParams::RequestedAccountNumberType::OrSymbol
192
198
  ],
199
+ title: T.nilable(String),
193
200
  vendor_attributes: T::Hash[Symbol, String],
194
201
  request_options: ModernTreasury::RequestOptions::OrHash
195
202
  ).returns(T.attached_class)
@@ -231,6 +238,10 @@ module ModernTreasury
231
238
  party_name: nil,
232
239
  # An array of account number types requested for provisioning.
233
240
  requested_account_number_types: nil,
241
+ # The account title at the financial institution, used in place of the party name.
242
+ # Only applicable to accounts created under supported connections. Please reach
243
+ # out to your customer success manager to enable this capability for your program.
244
+ title: nil,
234
245
  # A hash of vendor specific attributes that will be used when creating the account
235
246
  # at the vendor specified by the given connection.
236
247
  vendor_attributes: nil,
@@ -264,6 +275,7 @@ module ModernTreasury
264
275
  T::Array[
265
276
  ModernTreasury::InternalAccountCreateParams::RequestedAccountNumberType::OrSymbol
266
277
  ],
278
+ title: T.nilable(String),
267
279
  vendor_attributes: T::Hash[Symbol, String],
268
280
  request_options: ModernTreasury::RequestOptions
269
281
  }
@@ -760,6 +772,16 @@ module ModernTreasury
760
772
  end
761
773
  OrSymbol = T.type_alias { T.any(Symbol, String) }
762
774
 
775
+ ARBITRUM_ADDRESS =
776
+ T.let(
777
+ :arbitrum_address,
778
+ ModernTreasury::InternalAccountCreateParams::RequestedAccountNumberType::TaggedSymbol
779
+ )
780
+ AVALANCHE_ADDRESS =
781
+ T.let(
782
+ :avalanche_address,
783
+ ModernTreasury::InternalAccountCreateParams::RequestedAccountNumberType::TaggedSymbol
784
+ )
763
785
  BASE_ADDRESS =
764
786
  T.let(
765
787
  :base_address,
@@ -286,11 +286,6 @@ module ModernTreasury
286
286
  end
287
287
  OrSymbol = T.type_alias { T.any(Symbol, String) }
288
288
 
289
- COUNTERPARTY =
290
- T.let(
291
- :counterparty,
292
- ModernTreasury::LedgerAccount::LedgerableType::TaggedSymbol
293
- )
294
289
  EXTERNAL_ACCOUNT =
295
290
  T.let(
296
291
  :external_account,
@@ -166,11 +166,6 @@ module ModernTreasury
166
166
  end
167
167
  OrSymbol = T.type_alias { T.any(Symbol, String) }
168
168
 
169
- COUNTERPARTY =
170
- T.let(
171
- :counterparty,
172
- ModernTreasury::LedgerAccountCreateRequest::LedgerableType::TaggedSymbol
173
- )
174
169
  EXTERNAL_ACCOUNT =
175
170
  T.let(
176
171
  :external_account,
@@ -165,7 +165,7 @@ module ModernTreasury
165
165
  sig { returns(T.nilable(String)) }
166
166
  attr_accessor :prefix
167
167
 
168
- # A list of primary social media URLs for the business.
168
+ # A list of the entity's primary social media URLs.
169
169
  sig { returns(T::Array[String]) }
170
170
  attr_accessor :primary_social_media_sites
171
171
 
@@ -187,8 +187,8 @@ module ModernTreasury
187
187
  sig { returns(T.nilable(String)) }
188
188
  attr_accessor :service_provider_legal_entity_id
189
189
 
190
- # The activation status of the legal entity. One of pending, active, suspended, or
191
- # denied.
190
+ # The activation status of the legal entity. One of draft, pending, active,
191
+ # suspended, or denied.
192
192
  sig do
193
193
  returns(T.nilable(ModernTreasury::LegalEntity::Status::TaggedSymbol))
194
194
  end
@@ -392,7 +392,7 @@ module ModernTreasury
392
392
  preferred_name:,
393
393
  # An individual's prefix.
394
394
  prefix:,
395
- # A list of primary social media URLs for the business.
395
+ # A list of the entity's primary social media URLs.
396
396
  primary_social_media_sites:,
397
397
  # Array of regulatory bodies overseeing this institution.
398
398
  regulators:,
@@ -400,8 +400,8 @@ module ModernTreasury
400
400
  risk_rating:,
401
401
  # The UUID of the parent legal entity in the service provider tree.
402
402
  service_provider_legal_entity_id:,
403
- # The activation status of the legal entity. One of pending, active, suspended, or
404
- # denied.
403
+ # The activation status of the legal entity. One of draft, pending, active,
404
+ # suspended, or denied.
405
405
  status:,
406
406
  # An individual's suffix.
407
407
  suffix:,
@@ -912,8 +912,8 @@ module ModernTreasury
912
912
  end
913
913
  end
914
914
 
915
- # The activation status of the legal entity. One of pending, active, suspended, or
916
- # denied.
915
+ # The activation status of the legal entity. One of draft, pending, active,
916
+ # suspended, or denied.
917
917
  module Status
918
918
  extend ModernTreasury::Internal::Type::Enum
919
919
 
@@ -925,6 +925,7 @@ module ModernTreasury
925
925
  T.let(:active, ModernTreasury::LegalEntity::Status::TaggedSymbol)
926
926
  DENIED =
927
927
  T.let(:denied, ModernTreasury::LegalEntity::Status::TaggedSymbol)
928
+ DRAFT = T.let(:draft, ModernTreasury::LegalEntity::Status::TaggedSymbol)
928
929
  PENDING =
929
930
  T.let(:pending, ModernTreasury::LegalEntity::Status::TaggedSymbol)
930
931
  SUSPENDED =
@@ -23,15 +23,6 @@ module ModernTreasury
23
23
  sig { returns(T.nilable(String)) }
24
24
  attr_accessor :locality
25
25
 
26
- # The postal code of the address.
27
- sig { returns(T.nilable(String)) }
28
- attr_accessor :postal_code
29
-
30
- # Region or State. This field is free-form; for US states, we recommend a
31
- # two-letter code (e.g. CA). Full state names are also accepted.
32
- sig { returns(T.nilable(String)) }
33
- attr_accessor :region
34
-
35
26
  # The types of this address.
36
27
  sig do
37
28
  returns(
@@ -57,24 +48,33 @@ module ModernTreasury
57
48
  sig { returns(T.nilable(String)) }
58
49
  attr_accessor :line2
59
50
 
51
+ # The postal code of the address.
52
+ sig { returns(T.nilable(String)) }
53
+ attr_accessor :postal_code
54
+
60
55
  # Whether this address is the primary address for the legal entity. Optional; when
61
56
  # omitted it is inferred from the address types.
62
57
  sig { returns(T.nilable(T::Boolean)) }
63
58
  attr_accessor :primary
64
59
 
60
+ # Region or State. This field is free-form; for US states, we recommend a
61
+ # two-letter code (e.g. CA). Full state names are also accepted.
62
+ sig { returns(T.nilable(String)) }
63
+ attr_accessor :region
64
+
65
65
  sig do
66
66
  params(
67
67
  country: T.nilable(String),
68
68
  line1: T.nilable(String),
69
69
  locality: T.nilable(String),
70
- postal_code: T.nilable(String),
71
- region: T.nilable(String),
72
70
  address_types:
73
71
  T::Array[
74
72
  ModernTreasury::LegalEntityAddressCreateRequest::AddressType::OrSymbol
75
73
  ],
76
74
  line2: T.nilable(String),
77
- primary: T.nilable(T::Boolean)
75
+ postal_code: T.nilable(String),
76
+ primary: T.nilable(T::Boolean),
77
+ region: T.nilable(String)
78
78
  ).returns(T.attached_class)
79
79
  end
80
80
  def self.new(
@@ -84,17 +84,17 @@ module ModernTreasury
84
84
  # Locality or City. Use the full city name rather than an abbreviation (e.g. San
85
85
  # Francisco).
86
86
  locality:,
87
- # The postal code of the address.
88
- postal_code:,
89
- # Region or State. This field is free-form; for US states, we recommend a
90
- # two-letter code (e.g. CA). Full state names are also accepted.
91
- region:,
92
87
  # The types of this address.
93
88
  address_types: nil,
94
89
  line2: nil,
90
+ # The postal code of the address.
91
+ postal_code: nil,
95
92
  # Whether this address is the primary address for the legal entity. Optional; when
96
93
  # omitted it is inferred from the address types.
97
- primary: nil
94
+ primary: nil,
95
+ # Region or State. This field is free-form; for US states, we recommend a
96
+ # two-letter code (e.g. CA). Full state names are also accepted.
97
+ region: nil
98
98
  )
99
99
  end
100
100
 
@@ -104,14 +104,14 @@ module ModernTreasury
104
104
  country: T.nilable(String),
105
105
  line1: T.nilable(String),
106
106
  locality: T.nilable(String),
107
- postal_code: T.nilable(String),
108
- region: T.nilable(String),
109
107
  address_types:
110
108
  T::Array[
111
109
  ModernTreasury::LegalEntityAddressCreateRequest::AddressType::OrSymbol
112
110
  ],
113
111
  line2: T.nilable(String),
114
- primary: T.nilable(T::Boolean)
112
+ postal_code: T.nilable(String),
113
+ primary: T.nilable(T::Boolean),
114
+ region: T.nilable(String)
115
115
  }
116
116
  )
117
117
  end
@@ -249,7 +249,7 @@ module ModernTreasury
249
249
  sig { returns(T.nilable(String)) }
250
250
  attr_accessor :prefix
251
251
 
252
- # A list of primary social media URLs for the business.
252
+ # A list of the entity's primary social media URLs.
253
253
  sig { returns(T.nilable(T::Array[String])) }
254
254
  attr_reader :primary_social_media_sites
255
255
 
@@ -280,6 +280,22 @@ module ModernTreasury
280
280
  sig { returns(T.nilable(String)) }
281
281
  attr_accessor :service_provider_legal_entity_id
282
282
 
283
+ # Set to draft to create the legal entity as a draft. Omit to create it as
284
+ # pending. Inline child legal entities take the parent's status.
285
+ sig do
286
+ returns(
287
+ T.nilable(ModernTreasury::LegalEntityCreateParams::Status::OrSymbol)
288
+ )
289
+ end
290
+ attr_reader :status
291
+
292
+ sig do
293
+ params(
294
+ status: ModernTreasury::LegalEntityCreateParams::Status::OrSymbol
295
+ ).void
296
+ end
297
+ attr_writer :status
298
+
283
299
  # An individual's suffix.
284
300
  sig { returns(T.nilable(String)) }
285
301
  attr_accessor :suffix
@@ -413,6 +429,7 @@ module ModernTreasury
413
429
  ModernTreasury::LegalEntityCreateParams::RiskRating::OrSymbol
414
430
  ),
415
431
  service_provider_legal_entity_id: T.nilable(String),
432
+ status: ModernTreasury::LegalEntityCreateParams::Status::OrSymbol,
416
433
  suffix: T.nilable(String),
417
434
  terms_of_use:
418
435
  T.nilable(
@@ -500,7 +517,7 @@ module ModernTreasury
500
517
  preferred_name: nil,
501
518
  # An individual's prefix.
502
519
  prefix: nil,
503
- # A list of primary social media URLs for the business.
520
+ # A list of the entity's primary social media URLs.
504
521
  primary_social_media_sites: nil,
505
522
  # Array of regulatory bodies overseeing this institution.
506
523
  regulators: nil,
@@ -508,6 +525,9 @@ module ModernTreasury
508
525
  risk_rating: nil,
509
526
  # The UUID of the parent legal entity in the service provider tree.
510
527
  service_provider_legal_entity_id: nil,
528
+ # Set to draft to create the legal entity as a draft. Omit to create it as
529
+ # pending. Inline child legal entities take the parent's status.
530
+ status: nil,
511
531
  # An individual's suffix.
512
532
  suffix: nil,
513
533
  # Acceptance of terms of use by the legal entity.
@@ -585,6 +605,7 @@ module ModernTreasury
585
605
  ModernTreasury::LegalEntityCreateParams::RiskRating::OrSymbol
586
606
  ),
587
607
  service_provider_legal_entity_id: T.nilable(String),
608
+ status: ModernTreasury::LegalEntityCreateParams::Status::OrSymbol,
588
609
  suffix: T.nilable(String),
589
610
  terms_of_use:
590
611
  T.nilable(ModernTreasury::LegalEntityCreateParams::TermsOfUse),
@@ -967,6 +988,34 @@ module ModernTreasury
967
988
  end
968
989
  end
969
990
 
991
+ # Set to draft to create the legal entity as a draft. Omit to create it as
992
+ # pending. Inline child legal entities take the parent's status.
993
+ module Status
994
+ extend ModernTreasury::Internal::Type::Enum
995
+
996
+ TaggedSymbol =
997
+ T.type_alias do
998
+ T.all(Symbol, ModernTreasury::LegalEntityCreateParams::Status)
999
+ end
1000
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1001
+
1002
+ DRAFT =
1003
+ T.let(
1004
+ :draft,
1005
+ ModernTreasury::LegalEntityCreateParams::Status::TaggedSymbol
1006
+ )
1007
+
1008
+ sig do
1009
+ override.returns(
1010
+ T::Array[
1011
+ ModernTreasury::LegalEntityCreateParams::Status::TaggedSymbol
1012
+ ]
1013
+ )
1014
+ end
1015
+ def self.values
1016
+ end
1017
+ end
1018
+
970
1019
  class TermsOfUse < ModernTreasury::Internal::Type::BaseModel
971
1020
  OrHash =
972
1021
  T.type_alias do
@@ -171,6 +171,11 @@ module ModernTreasury
171
171
  :pending,
172
172
  ModernTreasury::LegalEntityListParams::Status::TaggedSymbol
173
173
  )
174
+ DRAFT =
175
+ T.let(
176
+ :draft,
177
+ ModernTreasury::LegalEntityListParams::Status::TaggedSymbol
178
+ )
174
179
  ACTIVE =
175
180
  T.let(
176
181
  :active,
@@ -206,7 +206,7 @@ module ModernTreasury
206
206
  sig { returns(T.nilable(String)) }
207
207
  attr_accessor :prefix
208
208
 
209
- # A list of primary social media URLs for the business.
209
+ # A list of the entity's primary social media URLs.
210
210
  sig { returns(T.nilable(T::Array[String])) }
211
211
  attr_reader :primary_social_media_sites
212
212
 
@@ -237,6 +237,23 @@ module ModernTreasury
237
237
  sig { returns(T.nilable(String)) }
238
238
  attr_accessor :service_provider_legal_entity_id
239
239
 
240
+ # Set to pending to submit a draft legal entity for processing. Only valid while
241
+ # the legal entity is draft, and must be the only attribute in the request. Draft
242
+ # child legal entities are submitted with it.
243
+ sig do
244
+ returns(
245
+ T.nilable(ModernTreasury::LegalEntityUpdateParams::Status::OrSymbol)
246
+ )
247
+ end
248
+ attr_reader :status
249
+
250
+ sig do
251
+ params(
252
+ status: ModernTreasury::LegalEntityUpdateParams::Status::OrSymbol
253
+ ).void
254
+ end
255
+ attr_writer :status
256
+
240
257
  # An individual's suffix.
241
258
  sig { returns(T.nilable(String)) }
242
259
  attr_accessor :suffix
@@ -359,6 +376,7 @@ module ModernTreasury
359
376
  ModernTreasury::LegalEntityUpdateParams::RiskRating::OrSymbol
360
377
  ),
361
378
  service_provider_legal_entity_id: T.nilable(String),
379
+ status: ModernTreasury::LegalEntityUpdateParams::Status::OrSymbol,
362
380
  suffix: T.nilable(String),
363
381
  terms_of_use:
364
382
  T.nilable(
@@ -433,7 +451,7 @@ module ModernTreasury
433
451
  preferred_name: nil,
434
452
  # An individual's prefix.
435
453
  prefix: nil,
436
- # A list of primary social media URLs for the business.
454
+ # A list of the entity's primary social media URLs.
437
455
  primary_social_media_sites: nil,
438
456
  # Array of regulatory bodies overseeing this institution.
439
457
  regulators: nil,
@@ -441,6 +459,10 @@ module ModernTreasury
441
459
  risk_rating: nil,
442
460
  # The UUID of the parent legal entity in the service provider tree.
443
461
  service_provider_legal_entity_id: nil,
462
+ # Set to pending to submit a draft legal entity for processing. Only valid while
463
+ # the legal entity is draft, and must be the only attribute in the request. Draft
464
+ # child legal entities are submitted with it.
465
+ status: nil,
444
466
  # An individual's suffix.
445
467
  suffix: nil,
446
468
  # Acceptance of terms of use by the legal entity.
@@ -509,6 +531,7 @@ module ModernTreasury
509
531
  ModernTreasury::LegalEntityUpdateParams::RiskRating::OrSymbol
510
532
  ),
511
533
  service_provider_legal_entity_id: T.nilable(String),
534
+ status: ModernTreasury::LegalEntityUpdateParams::Status::OrSymbol,
512
535
  suffix: T.nilable(String),
513
536
  terms_of_use:
514
537
  T.nilable(ModernTreasury::LegalEntityUpdateParams::TermsOfUse),
@@ -736,6 +759,35 @@ module ModernTreasury
736
759
  end
737
760
  end
738
761
 
762
+ # Set to pending to submit a draft legal entity for processing. Only valid while
763
+ # the legal entity is draft, and must be the only attribute in the request. Draft
764
+ # child legal entities are submitted with it.
765
+ module Status
766
+ extend ModernTreasury::Internal::Type::Enum
767
+
768
+ TaggedSymbol =
769
+ T.type_alias do
770
+ T.all(Symbol, ModernTreasury::LegalEntityUpdateParams::Status)
771
+ end
772
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
773
+
774
+ PENDING =
775
+ T.let(
776
+ :pending,
777
+ ModernTreasury::LegalEntityUpdateParams::Status::TaggedSymbol
778
+ )
779
+
780
+ sig do
781
+ override.returns(
782
+ T::Array[
783
+ ModernTreasury::LegalEntityUpdateParams::Status::TaggedSymbol
784
+ ]
785
+ )
786
+ end
787
+ def self.values
788
+ end
789
+ end
790
+
739
791
  class TermsOfUse < ModernTreasury::Internal::Type::BaseModel
740
792
  OrHash =
741
793
  T.type_alias do
@@ -201,6 +201,12 @@ module ModernTreasury
201
201
  sig { returns(T.nilable(String)) }
202
202
  attr_accessor :originating_party_name
203
203
 
204
+ # Secondary name for the legal entity making the payment. Can be used for e.g.
205
+ # check signatures where the originating party wishes to retain their company's
206
+ # display name but use an employee's name for the signature.
207
+ sig { returns(T.nilable(String)) }
208
+ attr_accessor :originating_secondary_party_name
209
+
204
210
  # Either `normal` or `high`. For ACH and EFT payments, `high` represents a
205
211
  # same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
206
212
  # an overnight check rather than standard mail.
@@ -381,6 +387,7 @@ module ModernTreasury
381
387
  ModernTreasury::PaymentOrder::OriginatingPartyAddress::OrHash
382
388
  ),
383
389
  originating_party_name: T.nilable(String),
390
+ originating_secondary_party_name: T.nilable(String),
384
391
  priority: ModernTreasury::PaymentOrder::Priority::OrSymbol,
385
392
  process_after: T.nilable(Time),
386
393
  purpose: T.nilable(String),
@@ -497,6 +504,10 @@ module ModernTreasury
497
504
  # the first 16 characters of this string will be used. Any additional characters
498
505
  # will be truncated.
499
506
  originating_party_name:,
507
+ # Secondary name for the legal entity making the payment. Can be used for e.g.
508
+ # check signatures where the originating party wishes to retain their company's
509
+ # display name but use an employee's name for the signature.
510
+ originating_secondary_party_name:,
500
511
  # Either `normal` or `high`. For ACH and EFT payments, `high` represents a
501
512
  # same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
502
513
  # an overnight check rather than standard mail.
@@ -610,6 +621,7 @@ module ModernTreasury
610
621
  originating_party_address:
611
622
  T.nilable(ModernTreasury::PaymentOrder::OriginatingPartyAddress),
612
623
  originating_party_name: T.nilable(String),
624
+ originating_secondary_party_name: T.nilable(String),
613
625
  priority: ModernTreasury::PaymentOrder::Priority::TaggedSymbol,
614
626
  process_after: T.nilable(Time),
615
627
  purpose: T.nilable(String),
@@ -1416,6 +1428,11 @@ module ModernTreasury
1416
1428
  :column_transfer_id,
1417
1429
  ModernTreasury::PaymentOrder::ReferenceNumber::ReferenceNumberType::TaggedSymbol
1418
1430
  )
1431
+ CROSS_RIVER_CARD_NETWORK =
1432
+ T.let(
1433
+ :cross_river_card_network,
1434
+ ModernTreasury::PaymentOrder::ReferenceNumber::ReferenceNumberType::TaggedSymbol
1435
+ )
1419
1436
  CROSS_RIVER_CARD_TRACE_NUMBER =
1420
1437
  T.let(
1421
1438
  :cross_river_card_trace_number,
@@ -1761,11 +1778,6 @@ module ModernTreasury
1761
1778
  :western_alliance_wire_confirmation_number,
1762
1779
  ModernTreasury::PaymentOrder::ReferenceNumber::ReferenceNumberType::TaggedSymbol
1763
1780
  )
1764
- WISE_TRANSFER_ID =
1765
- T.let(
1766
- :wise_transfer_id,
1767
- ModernTreasury::PaymentOrder::ReferenceNumber::ReferenceNumberType::TaggedSymbol
1768
- )
1769
1781
 
1770
1782
  sig do
1771
1783
  override.returns(