modern_treasury 0.1.0.pre.alpha.20 → 0.1.0.pre.alpha.22

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 (169) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -0
  3. data/README.md +3 -3
  4. data/lib/modern_treasury/errors.rb +22 -0
  5. data/lib/modern_treasury/internal/transport/base_client.rb +10 -2
  6. data/lib/modern_treasury/internal/type/array_of.rb +6 -1
  7. data/lib/modern_treasury/internal/type/base_model.rb +77 -23
  8. data/lib/modern_treasury/internal/type/boolean.rb +7 -1
  9. data/lib/modern_treasury/internal/type/converter.rb +42 -34
  10. data/lib/modern_treasury/internal/type/enum.rb +16 -5
  11. data/lib/modern_treasury/internal/type/file_input.rb +6 -1
  12. data/lib/modern_treasury/internal/type/hash_of.rb +6 -1
  13. data/lib/modern_treasury/internal/type/union.rb +19 -9
  14. data/lib/modern_treasury/internal/type/unknown.rb +7 -1
  15. data/lib/modern_treasury/internal/util.rb +13 -10
  16. data/lib/modern_treasury/models/bulk_request_create_params.rb +143 -18
  17. data/lib/modern_treasury/models/bulk_result.rb +5 -3
  18. data/lib/modern_treasury/models/counterparty_create_params.rb +1 -0
  19. data/lib/modern_treasury/models/external_account_create_params.rb +1 -0
  20. data/lib/modern_treasury/models/incoming_payment_detail.rb +1 -0
  21. data/lib/modern_treasury/models/internal_account.rb +146 -3
  22. data/lib/modern_treasury/models/internal_account_create_params.rb +138 -1
  23. data/lib/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rb +23 -0
  24. data/lib/modern_treasury/models/invoice.rb +10 -1
  25. data/lib/modern_treasury/models/ledger_account.rb +9 -1
  26. data/lib/modern_treasury/models/ledger_account_category.rb +9 -1
  27. data/lib/modern_treasury/models/ledger_account_category_list_params.rb +8 -1
  28. data/lib/modern_treasury/models/ledger_account_list_params.rb +15 -1
  29. data/lib/modern_treasury/models/payment_order.rb +21 -9
  30. data/lib/modern_treasury/models/payment_order_create_async_params.rb +8 -7
  31. data/lib/modern_treasury/models/payment_order_create_params.rb +8 -7
  32. data/lib/modern_treasury/models/payment_order_list_params.rb +9 -1
  33. data/lib/modern_treasury/models/payment_order_update_params.rb +9 -7
  34. data/lib/modern_treasury/models/payment_reference.rb +4 -1
  35. data/lib/modern_treasury/models/return_create_params.rb +75 -1
  36. data/lib/modern_treasury/models/return_object.rb +80 -2
  37. data/lib/modern_treasury/models/routing_detail.rb +1 -0
  38. data/lib/modern_treasury/models/routing_detail_create_params.rb +1 -0
  39. data/lib/modern_treasury/models/transaction.rb +1 -0
  40. data/lib/modern_treasury/models/transaction_create_params.rb +9 -1
  41. data/lib/modern_treasury/models/transactions/transaction_line_item.rb +9 -1
  42. data/lib/modern_treasury/models/validation_validate_routing_number_params.rb +1 -0
  43. data/lib/modern_treasury/models/virtual_account_create_params.rb +1 -0
  44. data/lib/modern_treasury/models.rb +4 -22
  45. data/lib/modern_treasury/resources/bulk_requests.rb +1 -1
  46. data/lib/modern_treasury/resources/internal_accounts/balance_reports.rb +2 -2
  47. data/lib/modern_treasury/resources/internal_accounts.rb +3 -1
  48. data/lib/modern_treasury/resources/ledger_account_categories.rb +3 -1
  49. data/lib/modern_treasury/resources/ledger_accounts.rb +5 -1
  50. data/lib/modern_treasury/resources/ledger_event_handlers.rb +0 -111
  51. data/lib/modern_treasury/resources/ledgerable_events.rb +0 -51
  52. data/lib/modern_treasury/resources/payment_orders.rb +6 -4
  53. data/lib/modern_treasury/resources/returns.rb +3 -1
  54. data/lib/modern_treasury/resources/transactions.rb +3 -1
  55. data/lib/modern_treasury/version.rb +1 -1
  56. data/lib/modern_treasury.rb +3 -10
  57. data/rbi/modern_treasury/errors.rbi +16 -0
  58. data/rbi/modern_treasury/internal/type/boolean.rbi +2 -0
  59. data/rbi/modern_treasury/internal/type/converter.rbi +15 -15
  60. data/rbi/modern_treasury/internal/type/union.rbi +5 -0
  61. data/rbi/modern_treasury/internal/type/unknown.rbi +2 -0
  62. data/rbi/modern_treasury/internal/util.rbi +2 -0
  63. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +234 -18
  64. data/rbi/modern_treasury/models/bulk_result.rbi +2 -0
  65. data/rbi/modern_treasury/models/counterparty_create_params.rbi +5 -0
  66. data/rbi/modern_treasury/models/external_account_create_params.rbi +5 -0
  67. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +5 -0
  68. data/rbi/modern_treasury/models/internal_account.rbi +328 -5
  69. data/rbi/modern_treasury/models/internal_account_create_params.rbi +333 -0
  70. data/rbi/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rbi +37 -0
  71. data/rbi/modern_treasury/models/invoice.rbi +10 -0
  72. data/rbi/modern_treasury/models/ledger_account.rbi +8 -0
  73. data/rbi/modern_treasury/models/ledger_account_category.rbi +8 -0
  74. data/rbi/modern_treasury/models/ledger_account_category_list_params.rbi +9 -0
  75. data/rbi/modern_treasury/models/ledger_account_list_params.rbi +22 -0
  76. data/rbi/modern_treasury/models/payment_order.rbi +39 -14
  77. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +14 -9
  78. data/rbi/modern_treasury/models/payment_order_create_params.rbi +14 -9
  79. data/rbi/modern_treasury/models/payment_order_list_params.rbi +14 -0
  80. data/rbi/modern_treasury/models/payment_order_update_params.rbi +19 -9
  81. data/rbi/modern_treasury/models/payment_reference.rbi +20 -5
  82. data/rbi/modern_treasury/models/return_create_params.rbi +114 -0
  83. data/rbi/modern_treasury/models/return_object.rbi +131 -5
  84. data/rbi/modern_treasury/models/routing_detail.rbi +5 -0
  85. data/rbi/modern_treasury/models/routing_detail_create_params.rbi +5 -0
  86. data/rbi/modern_treasury/models/transaction.rbi +5 -0
  87. data/rbi/modern_treasury/models/transaction_create_params.rbi +8 -0
  88. data/rbi/modern_treasury/models/transactions/transaction_line_item.rbi +8 -0
  89. data/rbi/modern_treasury/models/validation_validate_routing_number_params.rbi +5 -0
  90. data/rbi/modern_treasury/models/virtual_account_create_params.rbi +5 -0
  91. data/rbi/modern_treasury/models.rbi +0 -25
  92. data/rbi/modern_treasury/resources/bulk_requests.rbi +1 -0
  93. data/rbi/modern_treasury/resources/internal_accounts/balance_reports.rbi +7 -3
  94. data/rbi/modern_treasury/resources/internal_accounts.rbi +7 -0
  95. data/rbi/modern_treasury/resources/ledger_account_categories.rbi +2 -0
  96. data/rbi/modern_treasury/resources/ledger_accounts.rbi +4 -0
  97. data/rbi/modern_treasury/resources/ledger_event_handlers.rbi +0 -97
  98. data/rbi/modern_treasury/resources/ledgerable_events.rbi +0 -38
  99. data/rbi/modern_treasury/resources/payment_orders.rbi +11 -9
  100. data/rbi/modern_treasury/resources/returns.rbi +6 -0
  101. data/rbi/modern_treasury/resources/transactions.rbi +3 -0
  102. data/sig/modern_treasury/errors.rbs +9 -0
  103. data/sig/modern_treasury/internal/type/converter.rbs +7 -1
  104. data/sig/modern_treasury/models/bulk_request_create_params.rbs +101 -0
  105. data/sig/modern_treasury/models/bulk_result.rbs +1 -0
  106. data/sig/modern_treasury/models/counterparty_create_params.rbs +2 -0
  107. data/sig/modern_treasury/models/external_account_create_params.rbs +2 -0
  108. data/sig/modern_treasury/models/incoming_payment_detail.rbs +2 -0
  109. data/sig/modern_treasury/models/internal_account.rbs +147 -3
  110. data/sig/modern_treasury/models/internal_account_create_params.rbs +143 -0
  111. data/sig/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rbs +10 -0
  112. data/sig/modern_treasury/models/invoice.rbs +5 -0
  113. data/sig/modern_treasury/models/ledger_account.rbs +5 -0
  114. data/sig/modern_treasury/models/ledger_account_category.rbs +5 -0
  115. data/sig/modern_treasury/models/ledger_account_category_list_params.rbs +7 -0
  116. data/sig/modern_treasury/models/ledger_account_list_params.rbs +16 -0
  117. data/sig/modern_treasury/models/payment_order.rbs +15 -2
  118. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +2 -0
  119. data/sig/modern_treasury/models/payment_order_create_params.rbs +2 -0
  120. data/sig/modern_treasury/models/payment_order_list_params.rbs +9 -0
  121. data/sig/modern_treasury/models/payment_order_update_params.rbs +4 -0
  122. data/sig/modern_treasury/models/payment_reference.rbs +8 -2
  123. data/sig/modern_treasury/models/return_create_params.rbs +47 -0
  124. data/sig/modern_treasury/models/return_object.rbs +55 -2
  125. data/sig/modern_treasury/models/routing_detail.rbs +2 -0
  126. data/sig/modern_treasury/models/routing_detail_create_params.rbs +2 -0
  127. data/sig/modern_treasury/models/transaction.rbs +2 -0
  128. data/sig/modern_treasury/models/transaction_create_params.rbs +5 -0
  129. data/sig/modern_treasury/models/transactions/transaction_line_item.rbs +5 -0
  130. data/sig/modern_treasury/models/validation_validate_routing_number_params.rbs +2 -0
  131. data/sig/modern_treasury/models/virtual_account_create_params.rbs +2 -0
  132. data/sig/modern_treasury/models.rbs +0 -18
  133. data/sig/modern_treasury/resources/internal_accounts/balance_reports.rbs +1 -1
  134. data/sig/modern_treasury/resources/internal_accounts.rbs +1 -0
  135. data/sig/modern_treasury/resources/ledger_account_categories.rbs +1 -0
  136. data/sig/modern_treasury/resources/ledger_accounts.rbs +2 -0
  137. data/sig/modern_treasury/resources/ledger_event_handlers.rbs +0 -30
  138. data/sig/modern_treasury/resources/ledgerable_events.rbs +0 -13
  139. data/sig/modern_treasury/resources/payment_orders.rbs +1 -0
  140. data/sig/modern_treasury/resources/returns.rbs +1 -0
  141. data/sig/modern_treasury/resources/transactions.rbs +1 -0
  142. metadata +2 -29
  143. data/lib/modern_treasury/models/ledger_event_handler.rb +0 -222
  144. data/lib/modern_treasury/models/ledger_event_handler_create_params.rb +0 -177
  145. data/lib/modern_treasury/models/ledger_event_handler_delete_params.rb +0 -14
  146. data/lib/modern_treasury/models/ledger_event_handler_list_params.rb +0 -58
  147. data/lib/modern_treasury/models/ledger_event_handler_retrieve_params.rb +0 -14
  148. data/lib/modern_treasury/models/ledger_event_handler_variable.rb +0 -59
  149. data/lib/modern_treasury/models/ledgerable_event.rb +0 -92
  150. data/lib/modern_treasury/models/ledgerable_event_create_params.rb +0 -50
  151. data/lib/modern_treasury/models/ledgerable_event_retrieve_params.rb +0 -14
  152. data/rbi/modern_treasury/models/ledger_event_handler.rbi +0 -322
  153. data/rbi/modern_treasury/models/ledger_event_handler_create_params.rbi +0 -303
  154. data/rbi/modern_treasury/models/ledger_event_handler_delete_params.rbi +0 -32
  155. data/rbi/modern_treasury/models/ledger_event_handler_list_params.rbi +0 -92
  156. data/rbi/modern_treasury/models/ledger_event_handler_retrieve_params.rbi +0 -32
  157. data/rbi/modern_treasury/models/ledger_event_handler_variable.rbi +0 -98
  158. data/rbi/modern_treasury/models/ledgerable_event.rbi +0 -108
  159. data/rbi/modern_treasury/models/ledgerable_event_create_params.rbi +0 -75
  160. data/rbi/modern_treasury/models/ledgerable_event_retrieve_params.rbi +0 -32
  161. data/sig/modern_treasury/models/ledger_event_handler.rbs +0 -149
  162. data/sig/modern_treasury/models/ledger_event_handler_create_params.rbs +0 -127
  163. data/sig/modern_treasury/models/ledger_event_handler_delete_params.rbs +0 -15
  164. data/sig/modern_treasury/models/ledger_event_handler_list_params.rbs +0 -54
  165. data/sig/modern_treasury/models/ledger_event_handler_retrieve_params.rbs +0 -15
  166. data/sig/modern_treasury/models/ledger_event_handler_variable.rbs +0 -36
  167. data/sig/modern_treasury/models/ledgerable_event.rbs +0 -65
  168. data/sig/modern_treasury/models/ledgerable_event_create_params.rbs +0 -43
  169. data/sig/modern_treasury/models/ledgerable_event_retrieve_params.rbs +0 -15
@@ -9,6 +9,16 @@ module ModernTreasury
9
9
  # @return [String]
10
10
  required :id, String
11
11
 
12
+ # @!attribute account_capabilities
13
+ # An array of AccountCapability objects that list the originating abilities of the
14
+ # internal account and any relevant information for them.
15
+ #
16
+ # @return [Array<ModernTreasury::Models::InternalAccount::AccountCapability>]
17
+ required :account_capabilities,
18
+ -> {
19
+ ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::InternalAccount::AccountCapability]
20
+ }
21
+
12
22
  # @!attribute account_details
13
23
  # An array of account detail objects.
14
24
  #
@@ -52,7 +62,7 @@ module ModernTreasury
52
62
  required :ledger_account_id, String, nil?: true
53
63
 
54
64
  # @!attribute legal_entity_id
55
- # The Legal Entity associated to this account
65
+ # The Legal Entity associated to this account.
56
66
  #
57
67
  # @return [String, nil]
58
68
  required :legal_entity_id, String, nil?: true
@@ -117,12 +127,20 @@ module ModernTreasury
117
127
  # @return [Time]
118
128
  required :updated_at, Time
119
129
 
120
- # @!method initialize(id:, 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:)
130
+ # @!attribute vendor_id
131
+ # The vendor ID associated with this account.
132
+ #
133
+ # @return [String, nil]
134
+ required :vendor_id, String, nil?: true
135
+
136
+ # @!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:)
121
137
  # Some parameter documentations has been truncated, see
122
138
  # {ModernTreasury::Models::InternalAccount} for more details.
123
139
  #
124
140
  # @param id [String]
125
141
  #
142
+ # @param account_capabilities [Array<ModernTreasury::Models::InternalAccount::AccountCapability>] An array of AccountCapability objects that list the originating abilities of the
143
+ #
126
144
  # @param account_details [Array<ModernTreasury::Models::AccountDetail>] An array of account detail objects.
127
145
  #
128
146
  # @param account_type [Symbol, ModernTreasury::Models::InternalAccount::AccountType, nil] Can be checking, savings or other.
@@ -137,7 +155,7 @@ module ModernTreasury
137
155
  #
138
156
  # @param ledger_account_id [String, nil] If the internal account links to a ledger account in Modern Treasury, the id of
139
157
  #
140
- # @param legal_entity_id [String, nil] The Legal Entity associated to this account
158
+ # @param legal_entity_id [String, nil] The Legal Entity associated to this account.
141
159
  #
142
160
  # @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
143
161
  #
@@ -158,6 +176,131 @@ module ModernTreasury
158
176
  # @param routing_details [Array<ModernTreasury::Models::RoutingDetail>] An array of routing detail objects.
159
177
  #
160
178
  # @param updated_at [Time]
179
+ #
180
+ # @param vendor_id [String, nil] The vendor ID associated with this account.
181
+
182
+ class AccountCapability < ModernTreasury::Internal::Type::BaseModel
183
+ # @!attribute id
184
+ #
185
+ # @return [String]
186
+ required :id, String
187
+
188
+ # @!attribute created_at
189
+ #
190
+ # @return [Time]
191
+ required :created_at, Time
192
+
193
+ # @!attribute direction
194
+ # One of `debit` or `credit`. Indicates the direction of money movement this
195
+ # capability is responsible for.
196
+ #
197
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection]
198
+ required :direction, enum: -> { ModernTreasury::TransactionDirection }
199
+
200
+ # @!attribute discarded_at
201
+ #
202
+ # @return [Time, nil]
203
+ required :discarded_at, Time, nil?: true
204
+
205
+ # @!attribute identifier
206
+ # A unique reference assigned by your bank for tracking and recognizing payment
207
+ # files. It is important this is formatted exactly how the bank assigned it.
208
+ #
209
+ # @return [String, nil]
210
+ required :identifier, String, nil?: true
211
+
212
+ # @!attribute live_mode
213
+ # This field will be true if this object exists in the live environment or false
214
+ # if it exists in the test environment.
215
+ #
216
+ # @return [Boolean]
217
+ required :live_mode, ModernTreasury::Internal::Type::Boolean
218
+
219
+ # @!attribute object
220
+ #
221
+ # @return [String]
222
+ required :object, String
223
+
224
+ # @!attribute payment_type
225
+ # Indicates the the type of payment this capability is responsible for
226
+ # originating.
227
+ #
228
+ # @return [Symbol, ModernTreasury::Models::InternalAccount::AccountCapability::PaymentType]
229
+ required :payment_type, enum: -> { ModernTreasury::InternalAccount::AccountCapability::PaymentType }
230
+
231
+ # @!attribute updated_at
232
+ #
233
+ # @return [Time]
234
+ required :updated_at, Time
235
+
236
+ # @!method initialize(id:, created_at:, direction:, discarded_at:, identifier:, live_mode:, object:, payment_type:, updated_at:)
237
+ # Some parameter documentations has been truncated, see
238
+ # {ModernTreasury::Models::InternalAccount::AccountCapability} for more details.
239
+ #
240
+ # @param id [String]
241
+ #
242
+ # @param created_at [Time]
243
+ #
244
+ # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `debit` or `credit`. Indicates the direction of money movement this capab
245
+ #
246
+ # @param discarded_at [Time, nil]
247
+ #
248
+ # @param identifier [String, nil] A unique reference assigned by your bank for tracking and recognizing payment fi
249
+ #
250
+ # @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
251
+ #
252
+ # @param object [String]
253
+ #
254
+ # @param payment_type [Symbol, ModernTreasury::Models::InternalAccount::AccountCapability::PaymentType] Indicates the the type of payment this capability is responsible for originating
255
+ #
256
+ # @param updated_at [Time]
257
+
258
+ # Indicates the the type of payment this capability is responsible for
259
+ # originating.
260
+ #
261
+ # @see ModernTreasury::Models::InternalAccount::AccountCapability#payment_type
262
+ module PaymentType
263
+ extend ModernTreasury::Internal::Type::Enum
264
+
265
+ ACH = :ach
266
+ AU_BECS = :au_becs
267
+ BACS = :bacs
268
+ BASE = :base
269
+ BOOK = :book
270
+ CARD = :card
271
+ CHATS = :chats
272
+ CHECK = :check
273
+ CROSS_BORDER = :cross_border
274
+ DK_NETS = :dk_nets
275
+ EFT = :eft
276
+ ETHEREUM = :ethereum
277
+ HU_ICS = :hu_ics
278
+ INTERAC = :interac
279
+ MASAV = :masav
280
+ MX_CCEN = :mx_ccen
281
+ NEFT = :neft
282
+ NICS = :nics
283
+ NZ_BECS = :nz_becs
284
+ PL_ELIXIR = :pl_elixir
285
+ POLYGON = :polygon
286
+ PROVXCHANGE = :provxchange
287
+ RO_SENT = :ro_sent
288
+ RTP = :rtp
289
+ SE_BANKGIROT = :se_bankgirot
290
+ SEN = :sen
291
+ SEPA = :sepa
292
+ SG_GIRO = :sg_giro
293
+ SIC = :sic
294
+ SIGNET = :signet
295
+ SKNBI = :sknbi
296
+ SOLANA = :solana
297
+ WIRE = :wire
298
+ ZENGIN = :zengin
299
+
300
+ # @!method self.values
301
+ # @return [Array<Symbol>]
302
+ end
303
+ end
161
304
 
162
305
  # Can be checking, savings or other.
163
306
  #
@@ -32,6 +32,16 @@ module ModernTreasury
32
32
  # @return [String]
33
33
  required :party_name, String
34
34
 
35
+ # @!attribute account_capabilities
36
+ # An array of AccountCapability objects that list the originating abilities of the
37
+ # internal account and any relevant information for them.
38
+ #
39
+ # @return [Array<ModernTreasury::Models::InternalAccountCreateParams::AccountCapability>, nil]
40
+ optional :account_capabilities,
41
+ -> {
42
+ ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::InternalAccountCreateParams::AccountCapability]
43
+ }
44
+
35
45
  # @!attribute account_type
36
46
  # The account type, used to provision the appropriate account at the financial
37
47
  # institution.
@@ -70,7 +80,7 @@ module ModernTreasury
70
80
  # @return [Hash{Symbol=>String}, nil]
71
81
  optional :vendor_attributes, ModernTreasury::Internal::Type::HashOf[String]
72
82
 
73
- # @!method initialize(connection_id:, currency:, name:, party_name:, account_type: nil, counterparty_id: nil, legal_entity_id: nil, parent_account_id: nil, party_address: nil, vendor_attributes: nil, request_options: {})
83
+ # @!method initialize(connection_id:, currency:, name:, party_name:, account_capabilities: nil, account_type: nil, counterparty_id: nil, legal_entity_id: nil, parent_account_id: nil, party_address: nil, vendor_attributes: nil, request_options: {})
74
84
  # Some parameter documentations has been truncated, see
75
85
  # {ModernTreasury::Models::InternalAccountCreateParams} for more details.
76
86
  #
@@ -82,6 +92,8 @@ module ModernTreasury
82
92
  #
83
93
  # @param party_name [String] The legal name of the entity which owns the account.
84
94
  #
95
+ # @param account_capabilities [Array<ModernTreasury::Models::InternalAccountCreateParams::AccountCapability>] An array of AccountCapability objects that list the originating abilities of the
96
+ #
85
97
  # @param account_type [Symbol, ModernTreasury::Models::InternalAccountCreateParams::AccountType] The account type, used to provision the appropriate account at the financial ins
86
98
  #
87
99
  # @param counterparty_id [String] The Counterparty associated to this account.
@@ -108,6 +120,131 @@ module ModernTreasury
108
120
  # @return [Array<Symbol>]
109
121
  end
110
122
 
123
+ class AccountCapability < ModernTreasury::Internal::Type::BaseModel
124
+ # @!attribute id
125
+ #
126
+ # @return [String]
127
+ required :id, String
128
+
129
+ # @!attribute created_at
130
+ #
131
+ # @return [Time]
132
+ required :created_at, Time
133
+
134
+ # @!attribute direction
135
+ # One of `debit` or `credit`. Indicates the direction of money movement this
136
+ # capability is responsible for.
137
+ #
138
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection]
139
+ required :direction, enum: -> { ModernTreasury::TransactionDirection }
140
+
141
+ # @!attribute discarded_at
142
+ #
143
+ # @return [Time, nil]
144
+ required :discarded_at, Time, nil?: true
145
+
146
+ # @!attribute identifier
147
+ # A unique reference assigned by your bank for tracking and recognizing payment
148
+ # files. It is important this is formatted exactly how the bank assigned it.
149
+ #
150
+ # @return [String, nil]
151
+ required :identifier, String, nil?: true
152
+
153
+ # @!attribute live_mode
154
+ # This field will be true if this object exists in the live environment or false
155
+ # if it exists in the test environment.
156
+ #
157
+ # @return [Boolean]
158
+ required :live_mode, ModernTreasury::Internal::Type::Boolean
159
+
160
+ # @!attribute object
161
+ #
162
+ # @return [String]
163
+ required :object, String
164
+
165
+ # @!attribute payment_type
166
+ # Indicates the the type of payment this capability is responsible for
167
+ # originating.
168
+ #
169
+ # @return [Symbol, ModernTreasury::Models::InternalAccountCreateParams::AccountCapability::PaymentType]
170
+ required :payment_type,
171
+ enum: -> { ModernTreasury::InternalAccountCreateParams::AccountCapability::PaymentType }
172
+
173
+ # @!attribute updated_at
174
+ #
175
+ # @return [Time]
176
+ required :updated_at, Time
177
+
178
+ # @!method initialize(id:, created_at:, direction:, discarded_at:, identifier:, live_mode:, object:, payment_type:, updated_at:)
179
+ # Some parameter documentations has been truncated, see
180
+ # {ModernTreasury::Models::InternalAccountCreateParams::AccountCapability} for
181
+ # more details.
182
+ #
183
+ # @param id [String]
184
+ #
185
+ # @param created_at [Time]
186
+ #
187
+ # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `debit` or `credit`. Indicates the direction of money movement this capab
188
+ #
189
+ # @param discarded_at [Time, nil]
190
+ #
191
+ # @param identifier [String, nil] A unique reference assigned by your bank for tracking and recognizing payment fi
192
+ #
193
+ # @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
194
+ #
195
+ # @param object [String]
196
+ #
197
+ # @param payment_type [Symbol, ModernTreasury::Models::InternalAccountCreateParams::AccountCapability::PaymentType] Indicates the the type of payment this capability is responsible for originating
198
+ #
199
+ # @param updated_at [Time]
200
+
201
+ # Indicates the the type of payment this capability is responsible for
202
+ # originating.
203
+ #
204
+ # @see ModernTreasury::Models::InternalAccountCreateParams::AccountCapability#payment_type
205
+ module PaymentType
206
+ extend ModernTreasury::Internal::Type::Enum
207
+
208
+ ACH = :ach
209
+ AU_BECS = :au_becs
210
+ BACS = :bacs
211
+ BASE = :base
212
+ BOOK = :book
213
+ CARD = :card
214
+ CHATS = :chats
215
+ CHECK = :check
216
+ CROSS_BORDER = :cross_border
217
+ DK_NETS = :dk_nets
218
+ EFT = :eft
219
+ ETHEREUM = :ethereum
220
+ HU_ICS = :hu_ics
221
+ INTERAC = :interac
222
+ MASAV = :masav
223
+ MX_CCEN = :mx_ccen
224
+ NEFT = :neft
225
+ NICS = :nics
226
+ NZ_BECS = :nz_becs
227
+ PL_ELIXIR = :pl_elixir
228
+ POLYGON = :polygon
229
+ PROVXCHANGE = :provxchange
230
+ RO_SENT = :ro_sent
231
+ RTP = :rtp
232
+ SE_BANKGIROT = :se_bankgirot
233
+ SEN = :sen
234
+ SEPA = :sepa
235
+ SG_GIRO = :sg_giro
236
+ SIC = :sic
237
+ SIGNET = :signet
238
+ SKNBI = :sknbi
239
+ SOLANA = :solana
240
+ WIRE = :wire
241
+ ZENGIN = :zengin
242
+
243
+ # @!method self.values
244
+ # @return [Array<Symbol>]
245
+ end
246
+ end
247
+
111
248
  # The account type, used to provision the appropriate account at the financial
112
249
  # institution.
113
250
  module AccountType
@@ -16,6 +16,29 @@ module ModernTreasury
16
16
  # @!method initialize(internal_account_id:, request_options: {})
17
17
  # @param internal_account_id [String]
18
18
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
19
+
20
+ module ID
21
+ extend ModernTreasury::Internal::Type::Union
22
+
23
+ variant String
24
+
25
+ variant const: -> { ModernTreasury::Models::InternalAccounts::BalanceReportRetrieveParams::ID::LATEST }
26
+
27
+ # @!method self.variants
28
+ # @return [Array(String, Symbol)]
29
+
30
+ define_sorbet_constant!(:Variants) do
31
+ T.type_alias do
32
+ T.any(String, ModernTreasury::InternalAccounts::BalanceReportRetrieveParams::ID::TaggedSymbol)
33
+ end
34
+ end
35
+
36
+ # @!group
37
+
38
+ LATEST = :latest
39
+
40
+ # @!endgroup
41
+ end
19
42
  end
20
43
  end
21
44
  end
@@ -101,6 +101,13 @@ module ModernTreasury
101
101
  # @return [ModernTreasury::Models::Invoice::InvoicerAddress, nil]
102
102
  required :invoicer_address, -> { ModernTreasury::Invoice::InvoicerAddress }, nil?: true
103
103
 
104
+ # @!attribute invoicer_name
105
+ # The name of the issuer for the invoice. Defaults to the name of the
106
+ # Organization.
107
+ #
108
+ # @return [String, nil]
109
+ required :invoicer_name, String, nil?: true
110
+
104
111
  # @!attribute ledger_account_settlement_id
105
112
  # The ledger account settlement object linked to the invoice.
106
113
  #
@@ -244,7 +251,7 @@ module ModernTreasury
244
251
  # @return [String, nil]
245
252
  required :virtual_account_id, String, nil?: true
246
253
 
247
- # @!method initialize(id:, amount_paid:, amount_remaining:, contact_details:, counterparty_billing_address:, counterparty_id:, counterparty_shipping_address:, created_at:, currency:, description:, due_date:, expected_payments:, fallback_payment_method:, hosted_url:, invoicer_address:, ledger_account_settlement_id:, live_mode:, metadata:, notification_email_addresses:, notifications_enabled:, number:, object:, originating_account_id:, payment_effective_date:, payment_method:, payment_orders:, payment_type:, pdf_url:, receiving_account_id:, recipient_email:, recipient_name:, remind_after_overdue_days:, status:, total_amount:, transaction_line_item_ids:, updated_at:, virtual_account_id:)
254
+ # @!method initialize(id:, amount_paid:, amount_remaining:, contact_details:, counterparty_billing_address:, counterparty_id:, counterparty_shipping_address:, created_at:, currency:, description:, due_date:, expected_payments:, fallback_payment_method:, hosted_url:, invoicer_address:, invoicer_name:, ledger_account_settlement_id:, live_mode:, metadata:, notification_email_addresses:, notifications_enabled:, number:, object:, originating_account_id:, payment_effective_date:, payment_method:, payment_orders:, payment_type:, pdf_url:, receiving_account_id:, recipient_email:, recipient_name:, remind_after_overdue_days:, status:, total_amount:, transaction_line_item_ids:, updated_at:, virtual_account_id:)
248
255
  # Some parameter documentations has been truncated, see
249
256
  # {ModernTreasury::Models::Invoice} for more details.
250
257
  #
@@ -278,6 +285,8 @@ module ModernTreasury
278
285
  #
279
286
  # @param invoicer_address [ModernTreasury::Models::Invoice::InvoicerAddress, nil] The invoice issuer's business address.
280
287
  #
288
+ # @param invoicer_name [String, nil] The name of the issuer for the invoice. Defaults to the name of the Organization
289
+ #
281
290
  # @param ledger_account_settlement_id [String, nil] The ledger account settlement object linked to the invoice.
282
291
  #
283
292
  # @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
@@ -35,6 +35,12 @@ module ModernTreasury
35
35
  # @return [Time, nil]
36
36
  required :discarded_at, Time, nil?: true
37
37
 
38
+ # @!attribute external_id
39
+ # An optional user-defined 180 character unique identifier.
40
+ #
41
+ # @return [String, nil]
42
+ required :external_id, String, nil?: true
43
+
38
44
  # @!attribute ledger_id
39
45
  # The id of the ledger that this account belongs to.
40
46
  #
@@ -98,7 +104,7 @@ module ModernTreasury
98
104
  # @return [Time]
99
105
  required :updated_at, Time
100
106
 
101
- # @!method initialize(id:, balances:, created_at:, description:, discarded_at:, ledger_id:, ledgerable_id:, ledgerable_type:, live_mode:, lock_version:, metadata:, name:, normal_balance:, object:, updated_at:)
107
+ # @!method initialize(id:, balances:, created_at:, description:, discarded_at:, external_id:, ledger_id:, ledgerable_id:, ledgerable_type:, live_mode:, lock_version:, metadata:, name:, normal_balance:, object:, updated_at:)
102
108
  # Some parameter documentations has been truncated, see
103
109
  # {ModernTreasury::Models::LedgerAccount} for more details.
104
110
  #
@@ -112,6 +118,8 @@ module ModernTreasury
112
118
  #
113
119
  # @param discarded_at [Time, nil]
114
120
  #
121
+ # @param external_id [String, nil] An optional user-defined 180 character unique identifier.
122
+ #
115
123
  # @param ledger_id [String] The id of the ledger that this account belongs to.
116
124
  #
117
125
  # @param ledgerable_id [String, nil] If the ledger account links to another object in Modern Treasury, the id will be
@@ -35,6 +35,12 @@ module ModernTreasury
35
35
  # @return [Time, nil]
36
36
  required :discarded_at, Time, nil?: true
37
37
 
38
+ # @!attribute external_id
39
+ # An optional user-defined 180 character unique identifier.
40
+ #
41
+ # @return [String, nil]
42
+ required :external_id, String, nil?: true
43
+
38
44
  # @!attribute ledger_id
39
45
  # The id of the ledger that this account category belongs to.
40
46
  #
@@ -77,7 +83,7 @@ module ModernTreasury
77
83
  # @return [Time]
78
84
  required :updated_at, Time
79
85
 
80
- # @!method initialize(id:, balances:, created_at:, description:, discarded_at:, ledger_id:, live_mode:, metadata:, name:, normal_balance:, object:, updated_at:)
86
+ # @!method initialize(id:, balances:, created_at:, description:, discarded_at:, external_id:, ledger_id:, live_mode:, metadata:, name:, normal_balance:, object:, updated_at:)
81
87
  # Some parameter documentations has been truncated, see
82
88
  # {ModernTreasury::Models::LedgerAccountCategory} for more details.
83
89
  #
@@ -91,6 +97,8 @@ module ModernTreasury
91
97
  #
92
98
  # @param discarded_at [Time, nil]
93
99
  #
100
+ # @param external_id [String, nil] An optional user-defined 180 character unique identifier.
101
+ #
94
102
  # @param ledger_id [String] The id of the ledger that this account category belongs to.
95
103
  #
96
104
  # @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
@@ -32,6 +32,11 @@ module ModernTreasury
32
32
  # @return [String, nil]
33
33
  optional :currency, String
34
34
 
35
+ # @!attribute external_id
36
+ #
37
+ # @return [String, nil]
38
+ optional :external_id, String
39
+
35
40
  # @!attribute ledger_account_id
36
41
  # Query categories which contain a ledger account directly or through child
37
42
  # categories.
@@ -68,7 +73,7 @@ module ModernTreasury
68
73
  # @return [Integer, nil]
69
74
  optional :per_page, Integer
70
75
 
71
- # @!method initialize(id: nil, after_cursor: nil, balances: nil, currency: nil, ledger_account_id: nil, ledger_id: nil, metadata: nil, name: nil, parent_ledger_account_category_id: nil, per_page: nil, request_options: {})
76
+ # @!method initialize(id: nil, after_cursor: nil, balances: nil, currency: nil, external_id: nil, ledger_account_id: nil, ledger_id: nil, metadata: nil, name: nil, parent_ledger_account_category_id: nil, per_page: nil, request_options: {})
72
77
  # Some parameter documentations has been truncated, see
73
78
  # {ModernTreasury::Models::LedgerAccountCategoryListParams} for more details.
74
79
  #
@@ -80,6 +85,8 @@ module ModernTreasury
80
85
  #
81
86
  # @param currency [String]
82
87
  #
88
+ # @param external_id [String]
89
+ #
83
90
  # @param ledger_account_id [String] Query categories which contain a ledger account directly or through child catego
84
91
  #
85
92
  # @param ledger_id [String]
@@ -52,6 +52,11 @@ module ModernTreasury
52
52
  # @return [String, nil]
53
53
  optional :currency, String
54
54
 
55
+ # @!attribute external_id
56
+ #
57
+ # @return [String, nil]
58
+ optional :external_id, String
59
+
55
60
  # @!attribute ledger_account_category_id
56
61
  #
57
62
  # @return [String, nil]
@@ -77,6 +82,11 @@ module ModernTreasury
77
82
  # @return [Array<String>, nil]
78
83
  optional :name, ModernTreasury::Internal::Type::ArrayOf[String]
79
84
 
85
+ # @!attribute normal_balance
86
+ #
87
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection, nil]
88
+ optional :normal_balance, enum: -> { ModernTreasury::TransactionDirection }
89
+
80
90
  # @!attribute pending_balance_amount
81
91
  # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to
82
92
  # filter by balance amount.
@@ -104,7 +114,7 @@ module ModernTreasury
104
114
  # @return [Hash{Symbol=>Time}, nil]
105
115
  optional :updated_at, ModernTreasury::Internal::Type::HashOf[Time]
106
116
 
107
- # @!method initialize(id: nil, after_cursor: nil, available_balance_amount: nil, balances: nil, created_at: nil, currency: nil, ledger_account_category_id: nil, ledger_id: nil, metadata: nil, name: nil, pending_balance_amount: nil, per_page: nil, posted_balance_amount: nil, updated_at: nil, request_options: {})
117
+ # @!method initialize(id: nil, after_cursor: nil, available_balance_amount: nil, balances: nil, created_at: nil, currency: nil, external_id: nil, ledger_account_category_id: nil, ledger_id: nil, metadata: nil, name: nil, normal_balance: nil, pending_balance_amount: nil, per_page: nil, posted_balance_amount: nil, updated_at: nil, request_options: {})
108
118
  # Some parameter documentations has been truncated, see
109
119
  # {ModernTreasury::Models::LedgerAccountListParams} for more details.
110
120
  #
@@ -120,6 +130,8 @@ module ModernTreasury
120
130
  #
121
131
  # @param currency [String]
122
132
  #
133
+ # @param external_id [String]
134
+ #
123
135
  # @param ledger_account_category_id [String]
124
136
  #
125
137
  # @param ledger_id [String]
@@ -128,6 +140,8 @@ module ModernTreasury
128
140
  #
129
141
  # @param name [Array<String>] If you have specific names to retrieve in bulk, you can pass them as query param
130
142
  #
143
+ # @param normal_balance [Symbol, ModernTreasury::Models::TransactionDirection]
144
+ #
131
145
  # @param pending_balance_amount [ModernTreasury::Models::LedgerAccountListParams::PendingBalanceAmount] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to fi
132
146
  #
133
147
  # @param per_page [Integer]
@@ -40,9 +40,9 @@ module ModernTreasury
40
40
  required :amount, Integer
41
41
 
42
42
  # @!attribute charge_bearer
43
- # The party that will pay the fees for the payment order. Only applies to wire
44
- # payment orders. Can be one of shared, sender, or receiver, which correspond
45
- # respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
43
+ # The party that will pay the fees for the payment order. See
44
+ # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
45
+ # differences between the options.
46
46
  #
47
47
  # @return [Symbol, ModernTreasury::Models::PaymentOrder::ChargeBearer, nil]
48
48
  required :charge_bearer, enum: -> { ModernTreasury::PaymentOrder::ChargeBearer }, nil?: true
@@ -101,6 +101,12 @@ module ModernTreasury
101
101
  # @return [Time, nil]
102
102
  required :expires_at, Time, nil?: true
103
103
 
104
+ # @!attribute external_id
105
+ # An optional user-defined 180 character unique identifier.
106
+ #
107
+ # @return [String, nil]
108
+ required :external_id, String, nil?: true
109
+
104
110
  # @!attribute foreign_exchange_contract
105
111
  # If present, indicates a specific foreign exchange contract number that has been
106
112
  # generated by your financial institution.
@@ -336,7 +342,7 @@ module ModernTreasury
336
342
  # @return [String, nil]
337
343
  required :vendor_failure_reason, String, nil?: true
338
344
 
339
- # @!method initialize(id:, accounting:, accounting_category_id:, accounting_ledger_class_id:, amount:, charge_bearer:, counterparty_id:, created_at:, currency:, current_return:, description:, direction:, effective_date:, expires_at:, foreign_exchange_contract:, foreign_exchange_indicator:, foreign_exchange_rate:, ledger_transaction_id:, live_mode:, metadata:, nsf_protected:, object:, originating_account_id:, originating_party_name:, priority:, process_after:, purpose:, receiving_account_id:, receiving_account_type:, reference_numbers:, remittance_information:, send_remittance_advice:, statement_descriptor:, status:, subtype:, transaction_ids:, type:, ultimate_originating_account:, ultimate_originating_account_id:, ultimate_originating_account_type:, ultimate_originating_party_identifier:, ultimate_originating_party_name:, ultimate_receiving_party_identifier:, ultimate_receiving_party_name:, updated_at:, vendor_attributes:, vendor_failure_reason:)
345
+ # @!method initialize(id:, accounting:, accounting_category_id:, accounting_ledger_class_id:, amount:, charge_bearer:, counterparty_id:, created_at:, currency:, current_return:, description:, direction:, effective_date:, expires_at:, external_id:, foreign_exchange_contract:, foreign_exchange_indicator:, foreign_exchange_rate:, ledger_transaction_id:, live_mode:, metadata:, nsf_protected:, object:, originating_account_id:, originating_party_name:, priority:, process_after:, purpose:, receiving_account_id:, receiving_account_type:, reference_numbers:, remittance_information:, send_remittance_advice:, statement_descriptor:, status:, subtype:, transaction_ids:, type:, ultimate_originating_account:, ultimate_originating_account_id:, ultimate_originating_account_type:, ultimate_originating_party_identifier:, ultimate_originating_party_name:, ultimate_receiving_party_identifier:, ultimate_receiving_party_name:, updated_at:, vendor_attributes:, vendor_failure_reason:)
340
346
  # Some parameter documentations has been truncated, see
341
347
  # {ModernTreasury::Models::PaymentOrder} for more details.
342
348
  #
@@ -350,7 +356,7 @@ module ModernTreasury
350
356
  #
351
357
  # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
352
358
  #
353
- # @param charge_bearer [Symbol, ModernTreasury::Models::PaymentOrder::ChargeBearer, nil] The party that will pay the fees for the payment order. Only applies to wire pay
359
+ # @param charge_bearer [Symbol, ModernTreasury::Models::PaymentOrder::ChargeBearer, nil] The party that will pay the fees for the payment order. See https://docs.modernt
354
360
  #
355
361
  # @param counterparty_id [String, nil] If the payment order is tied to a specific Counterparty, their id will appear, o
356
362
  #
@@ -368,6 +374,8 @@ module ModernTreasury
368
374
  #
369
375
  # @param expires_at [Time, nil] RFP payments require an expires_at. This value must be past the effective_date.
370
376
  #
377
+ # @param external_id [String, nil] An optional user-defined 180 character unique identifier.
378
+ #
371
379
  # @param foreign_exchange_contract [String, nil] If present, indicates a specific foreign exchange contract number that has been
372
380
  #
373
381
  # @param foreign_exchange_indicator [Symbol, ModernTreasury::Models::PaymentOrder::ForeignExchangeIndicator, nil] Indicates the type of FX transfer to initiate, can be either `variable_to_fixed`
@@ -460,9 +468,9 @@ module ModernTreasury
460
468
  # @param class_id [String, nil] The ID of one of the class objects in your accounting system. Class objects trac
461
469
  end
462
470
 
463
- # The party that will pay the fees for the payment order. Only applies to wire
464
- # payment orders. Can be one of shared, sender, or receiver, which correspond
465
- # respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
471
+ # The party that will pay the fees for the payment order. See
472
+ # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
473
+ # differences between the options.
466
474
  #
467
475
  # @see ModernTreasury::Models::PaymentOrder#charge_bearer
468
476
  module ChargeBearer
@@ -686,13 +694,14 @@ module ModernTreasury
686
694
  COLUMN_FX_QUOTE_ID = :column_fx_quote_id
687
695
  COLUMN_REVERSAL_PAIR_TRANSFER_ID = :column_reversal_pair_transfer_id
688
696
  COLUMN_TRANSFER_ID = :column_transfer_id
697
+ CROSS_RIVER_CORE_TRANSACTION_ID = :cross_river_core_transaction_id
698
+ CROSS_RIVER_FED_BATCH_ID = :cross_river_fed_batch_id
689
699
  CROSS_RIVER_PAYMENT_ID = :cross_river_payment_id
690
700
  CROSS_RIVER_SERVICE_MESSAGE = :cross_river_service_message
691
701
  CROSS_RIVER_TRANSACTION_ID = :cross_river_transaction_id
692
702
  CURRENCYCLOUD_CONVERSION_ID = :currencycloud_conversion_id
693
703
  CURRENCYCLOUD_PAYMENT_ID = :currencycloud_payment_id
694
704
  DC_BANK_TRANSACTION_ID = :dc_bank_transaction_id
695
- DWOLLA_TRANSACTION_ID = :dwolla_transaction_id
696
705
  EFT_TRACE_NUMBER = :eft_trace_number
697
706
  EVOLVE_TRANSACTION_ID = :evolve_transaction_id
698
707
  FEDWIRE_IMAD = :fedwire_imad
@@ -703,6 +712,8 @@ module ModernTreasury
703
712
  GOLDMAN_SACHS_PAYMENT_REQUEST_ID = :goldman_sachs_payment_request_id
704
713
  GOLDMAN_SACHS_REQUEST_ID = :goldman_sachs_request_id
705
714
  GOLDMAN_SACHS_UNIQUE_PAYMENT_ID = :goldman_sachs_unique_payment_id
715
+ HIFI_OFFRAMP_ID = :hifi_offramp_id
716
+ HIFI_TRANSFER_ID = :hifi_transfer_id
706
717
  INTERAC_MESSAGE_ID = :interac_message_id
707
718
  JPMC_CCN = :jpmc_ccn
708
719
  JPMC_CLEARING_SYSTEM_REFERENCE = :jpmc_clearing_system_reference
@@ -769,6 +780,7 @@ module ModernTreasury
769
780
  RETURNED = :returned
770
781
  REVERSED = :reversed
771
782
  SENT = :sent
783
+ STOPPED = :stopped
772
784
 
773
785
  # @!method self.values
774
786
  # @return [Array<Symbol>]