modern_treasury 0.11.0 → 0.12.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 (116) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/README.md +10 -1
  4. data/lib/modern_treasury/internal/transport/pooled_net_requester.rb +12 -10
  5. data/lib/modern_treasury/internal/util.rb +7 -2
  6. data/lib/modern_treasury/models/bulk_request_create_params.rb +146 -2
  7. data/lib/modern_treasury/models/child_legal_entity.rb +609 -0
  8. data/lib/modern_treasury/models/child_legal_entity_create.rb +63 -1
  9. data/lib/modern_treasury/models/connection_legal_entity.rb +2 -0
  10. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +54 -63
  11. data/lib/modern_treasury/models/connection_legal_entity_list_params.rb +2 -0
  12. data/lib/modern_treasury/models/counterparty_create_params.rb +54 -59
  13. data/lib/modern_treasury/models/expected_payment.rb +69 -1
  14. data/lib/modern_treasury/models/expected_payment_create_params.rb +65 -1
  15. data/lib/modern_treasury/models/expected_payment_update_params.rb +65 -1
  16. data/lib/modern_treasury/models/incoming_payment_detail.rb +5 -0
  17. data/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rb +5 -0
  18. data/lib/modern_treasury/models/incoming_payment_detail_list_params.rb +5 -0
  19. data/lib/modern_treasury/models/internal_account.rb +10 -1
  20. data/lib/modern_treasury/models/internal_account_update_params.rb +9 -1
  21. data/lib/modern_treasury/models/invoice.rb +2 -0
  22. data/lib/modern_treasury/models/invoice_create_params.rb +1 -19
  23. data/lib/modern_treasury/models/invoice_update_params.rb +1 -19
  24. data/lib/modern_treasury/models/ledger_entry.rb +10 -1
  25. data/lib/modern_treasury/models/ledger_entry_create_request.rb +10 -1
  26. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +10 -1
  27. data/lib/modern_treasury/models/legal_entity.rb +61 -11
  28. data/lib/modern_treasury/models/legal_entity_association.rb +3 -559
  29. data/lib/modern_treasury/models/legal_entity_association_inline_create.rb +60 -0
  30. data/lib/modern_treasury/models/legal_entity_create_params.rb +54 -59
  31. data/lib/modern_treasury/models/legal_entity_update_params.rb +51 -1
  32. data/lib/modern_treasury/models/payment_order.rb +4 -0
  33. data/lib/modern_treasury/models/payment_reference.rb +4 -0
  34. data/lib/modern_treasury/models/return_object.rb +5 -0
  35. data/lib/modern_treasury/models/transaction.rb +1 -0
  36. data/lib/modern_treasury/models.rb +4 -0
  37. data/lib/modern_treasury/resources/expected_payments.rb +18 -2
  38. data/lib/modern_treasury/resources/internal_accounts.rb +3 -1
  39. data/lib/modern_treasury/resources/invoices.rb +2 -10
  40. data/lib/modern_treasury/resources/ledger_accounts.rb +3 -3
  41. data/lib/modern_treasury/resources/ledger_transactions.rb +5 -2
  42. data/lib/modern_treasury/resources/legal_entities.rb +27 -3
  43. data/lib/modern_treasury/version.rb +1 -1
  44. data/lib/modern_treasury.rb +3 -0
  45. data/manifest.yaml +1 -0
  46. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +272 -0
  47. data/rbi/modern_treasury/models/child_legal_entity.rbi +969 -0
  48. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +78 -0
  49. data/rbi/modern_treasury/models/connection_legal_entity.rbi +10 -0
  50. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +61 -135
  51. data/rbi/modern_treasury/models/connection_legal_entity_list_params.rbi +10 -0
  52. data/rbi/modern_treasury/models/counterparty_create_params.rbi +61 -135
  53. data/rbi/modern_treasury/models/expected_payment.rbi +136 -0
  54. data/rbi/modern_treasury/models/expected_payment_create_params.rbi +136 -0
  55. data/rbi/modern_treasury/models/expected_payment_update_params.rbi +136 -0
  56. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +25 -0
  57. data/rbi/modern_treasury/models/incoming_payment_detail_create_async_params.rbi +25 -0
  58. data/rbi/modern_treasury/models/incoming_payment_detail_list_params.rbi +25 -0
  59. data/rbi/modern_treasury/models/internal_account.rbi +10 -0
  60. data/rbi/modern_treasury/models/internal_account_update_params.rbi +11 -0
  61. data/rbi/modern_treasury/models/invoice_create_params.rbi +0 -20
  62. data/rbi/modern_treasury/models/invoice_update_params.rbi +0 -20
  63. data/rbi/modern_treasury/models/ledger_entry.rbi +10 -0
  64. data/rbi/modern_treasury/models/ledger_entry_create_request.rbi +13 -0
  65. data/rbi/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +10 -0
  66. data/rbi/modern_treasury/models/legal_entity.rbi +67 -15
  67. data/rbi/modern_treasury/models/legal_entity_association.rbi +4 -962
  68. data/rbi/modern_treasury/models/legal_entity_association_inline_create.rbi +130 -0
  69. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +61 -134
  70. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +58 -0
  71. data/rbi/modern_treasury/models/payment_order.rbi +20 -0
  72. data/rbi/modern_treasury/models/payment_reference.rbi +20 -0
  73. data/rbi/modern_treasury/models/return_object.rbi +22 -0
  74. data/rbi/modern_treasury/models/transaction.rbi +5 -0
  75. data/rbi/modern_treasury/models.rbi +5 -0
  76. data/rbi/modern_treasury/resources/expected_payments.rbi +44 -0
  77. data/rbi/modern_treasury/resources/internal_accounts.rbi +3 -0
  78. data/rbi/modern_treasury/resources/invoices.rbi +0 -16
  79. data/rbi/modern_treasury/resources/ledger_accounts.rbi +3 -3
  80. data/rbi/modern_treasury/resources/ledger_transactions.rbi +3 -2
  81. data/rbi/modern_treasury/resources/legal_entities.rbi +41 -1
  82. data/sig/modern_treasury/models/bulk_request_create_params.rbs +84 -0
  83. data/sig/modern_treasury/models/child_legal_entity.rbs +469 -0
  84. data/sig/modern_treasury/models/child_legal_entity_create.rbs +39 -0
  85. data/sig/modern_treasury/models/connection_legal_entity.rbs +4 -1
  86. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +38 -60
  87. data/sig/modern_treasury/models/connection_legal_entity_list_params.rbs +4 -1
  88. data/sig/modern_treasury/models/counterparty_create_params.rbs +38 -60
  89. data/sig/modern_treasury/models/expected_payment.rbs +42 -0
  90. data/sig/modern_treasury/models/expected_payment_create_params.rbs +42 -0
  91. data/sig/modern_treasury/models/expected_payment_update_params.rbs +42 -0
  92. data/sig/modern_treasury/models/incoming_payment_detail.rbs +10 -0
  93. data/sig/modern_treasury/models/incoming_payment_detail_create_async_params.rbs +10 -0
  94. data/sig/modern_treasury/models/incoming_payment_detail_list_params.rbs +10 -0
  95. data/sig/modern_treasury/models/internal_account.rbs +5 -0
  96. data/sig/modern_treasury/models/internal_account_update_params.rbs +7 -0
  97. data/sig/modern_treasury/models/invoice_create_params.rbs +0 -10
  98. data/sig/modern_treasury/models/invoice_update_params.rbs +0 -10
  99. data/sig/modern_treasury/models/ledger_entry.rbs +5 -0
  100. data/sig/modern_treasury/models/ledger_entry_create_request.rbs +7 -0
  101. data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +5 -0
  102. data/sig/modern_treasury/models/legal_entity.rbs +38 -8
  103. data/sig/modern_treasury/models/legal_entity_association.rbs +4 -435
  104. data/sig/modern_treasury/models/legal_entity_association_inline_create.rbs +59 -0
  105. data/sig/modern_treasury/models/legal_entity_create_params.rbs +38 -60
  106. data/sig/modern_treasury/models/legal_entity_update_params.rbs +34 -0
  107. data/sig/modern_treasury/models/payment_order.rbs +8 -0
  108. data/sig/modern_treasury/models/payment_reference.rbs +8 -0
  109. data/sig/modern_treasury/models/return_object.rbs +10 -0
  110. data/sig/modern_treasury/models/transaction.rbs +2 -0
  111. data/sig/modern_treasury/models.rbs +4 -0
  112. data/sig/modern_treasury/resources/expected_payments.rbs +8 -0
  113. data/sig/modern_treasury/resources/internal_accounts.rbs +1 -0
  114. data/sig/modern_treasury/resources/invoices.rbs +0 -4
  115. data/sig/modern_treasury/resources/legal_entities.rbs +13 -1
  116. metadata +8 -2
@@ -16,6 +16,38 @@ module ModernTreasury
16
16
  # @return [Integer, nil]
17
17
  required :amount_lower_bound, Integer, nil?: true
18
18
 
19
+ # @!attribute amount_reconciled
20
+ # The amount reconciled for this expected payment. Value in specified currency's
21
+ # smallest unit. e.g. $10 would be represented as 1000.
22
+ #
23
+ # @return [Integer, nil]
24
+ required :amount_reconciled, Integer, nil?: true
25
+
26
+ # @!attribute amount_reconciled_direction
27
+ # One of credit or debit. Indicates whether amount_reconciled is a credit or debit
28
+ # amount.
29
+ #
30
+ # @return [Symbol, ModernTreasury::Models::ExpectedPayment::AmountReconciledDirection, nil]
31
+ required :amount_reconciled_direction,
32
+ enum: -> { ModernTreasury::ExpectedPayment::AmountReconciledDirection },
33
+ nil?: true
34
+
35
+ # @!attribute amount_unreconciled
36
+ # The amount that remains unreconciled for this expected payment. Value in
37
+ # specified currency's smallest unit. e.g. $10 would be represented as 1000.
38
+ #
39
+ # @return [Integer, nil]
40
+ required :amount_unreconciled, Integer, nil?: true
41
+
42
+ # @!attribute amount_unreconciled_direction
43
+ # One of credit or debit. Indicates whether amount_unreconciled is a credit or
44
+ # debit amount.
45
+ #
46
+ # @return [Symbol, ModernTreasury::Models::ExpectedPayment::AmountUnreconciledDirection, nil]
47
+ required :amount_unreconciled_direction,
48
+ enum: -> { ModernTreasury::ExpectedPayment::AmountUnreconciledDirection },
49
+ nil?: true
50
+
19
51
  # @!attribute amount_upper_bound
20
52
  # The highest amount this expected payment may be equal to. Value in specified
21
53
  # currency's smallest unit. e.g. $10 would be represented as 1000.
@@ -179,7 +211,7 @@ module ModernTreasury
179
211
  # @return [Time]
180
212
  required :updated_at, Time
181
213
 
182
- # @!method initialize(id:, amount_lower_bound:, amount_upper_bound:, counterparty_id:, created_at:, currency:, date_lower_bound:, date_upper_bound:, description:, direction:, external_id:, internal_account_id:, ledger_transaction_id:, live_mode:, metadata:, object:, reconciliation_filters:, reconciliation_groups:, reconciliation_method:, reconciliation_rule_variables:, remittance_information:, statement_descriptor:, status:, transaction_id:, transaction_line_item_id:, type:, updated_at:)
214
+ # @!method initialize(id:, amount_lower_bound:, amount_reconciled:, amount_reconciled_direction:, amount_unreconciled:, amount_unreconciled_direction:, amount_upper_bound:, counterparty_id:, created_at:, currency:, date_lower_bound:, date_upper_bound:, description:, direction:, external_id:, internal_account_id:, ledger_transaction_id:, live_mode:, metadata:, object:, reconciliation_filters:, reconciliation_groups:, reconciliation_method:, reconciliation_rule_variables:, remittance_information:, statement_descriptor:, status:, transaction_id:, transaction_line_item_id:, type:, updated_at:)
183
215
  # Some parameter documentations has been truncated, see
184
216
  # {ModernTreasury::Models::ExpectedPayment} for more details.
185
217
  #
@@ -187,6 +219,14 @@ module ModernTreasury
187
219
  #
188
220
  # @param amount_lower_bound [Integer, nil] The lowest amount this expected payment may be equal to. Value in specified curr
189
221
  #
222
+ # @param amount_reconciled [Integer, nil] The amount reconciled for this expected payment. Value in specified currency's s
223
+ #
224
+ # @param amount_reconciled_direction [Symbol, ModernTreasury::Models::ExpectedPayment::AmountReconciledDirection, nil] One of credit or debit. Indicates whether amount_reconciled is a credit or debit
225
+ #
226
+ # @param amount_unreconciled [Integer, nil] The amount that remains unreconciled for this expected payment. Value in specifi
227
+ #
228
+ # @param amount_unreconciled_direction [Symbol, ModernTreasury::Models::ExpectedPayment::AmountUnreconciledDirection, nil] One of credit or debit. Indicates whether amount_unreconciled is a credit or deb
229
+ #
190
230
  # @param amount_upper_bound [Integer, nil] The highest amount this expected payment may be equal to. Value in specified cur
191
231
  #
192
232
  # @param counterparty_id [String, nil] The ID of the counterparty you expect for this payment.
@@ -237,6 +277,34 @@ module ModernTreasury
237
277
  #
238
278
  # @param updated_at [Time]
239
279
 
280
+ # One of credit or debit. Indicates whether amount_reconciled is a credit or debit
281
+ # amount.
282
+ #
283
+ # @see ModernTreasury::Models::ExpectedPayment#amount_reconciled_direction
284
+ module AmountReconciledDirection
285
+ extend ModernTreasury::Internal::Type::Enum
286
+
287
+ CREDIT = :credit
288
+ DEBIT = :debit
289
+
290
+ # @!method self.values
291
+ # @return [Array<Symbol>]
292
+ end
293
+
294
+ # One of credit or debit. Indicates whether amount_unreconciled is a credit or
295
+ # debit amount.
296
+ #
297
+ # @see ModernTreasury::Models::ExpectedPayment#amount_unreconciled_direction
298
+ module AmountUnreconciledDirection
299
+ extend ModernTreasury::Internal::Type::Enum
300
+
301
+ CREDIT = :credit
302
+ DEBIT = :debit
303
+
304
+ # @!method self.values
305
+ # @return [Array<Symbol>]
306
+ end
307
+
240
308
  # One of credit or debit. When you are receiving money, use credit. When you are
241
309
  # being charged, use debit.
242
310
  #
@@ -14,6 +14,38 @@ module ModernTreasury
14
14
  # @return [Integer, nil]
15
15
  optional :amount_lower_bound, Integer, nil?: true
16
16
 
17
+ # @!attribute amount_reconciled
18
+ # The amount reconciled for this expected payment. Value in specified currency's
19
+ # smallest unit. e.g. $10 would be represented as 1000.
20
+ #
21
+ # @return [Integer, nil]
22
+ optional :amount_reconciled, Integer, nil?: true
23
+
24
+ # @!attribute amount_reconciled_direction
25
+ # One of credit or debit. Indicates whether amount_reconciled is a credit or debit
26
+ # amount.
27
+ #
28
+ # @return [Symbol, ModernTreasury::Models::ExpectedPaymentCreateParams::AmountReconciledDirection, nil]
29
+ optional :amount_reconciled_direction,
30
+ enum: -> { ModernTreasury::ExpectedPaymentCreateParams::AmountReconciledDirection },
31
+ nil?: true
32
+
33
+ # @!attribute amount_unreconciled
34
+ # The amount that remains unreconciled for this expected payment. Value in
35
+ # specified currency's smallest unit. e.g. $10 would be represented as 1000.
36
+ #
37
+ # @return [Integer, nil]
38
+ optional :amount_unreconciled, Integer, nil?: true
39
+
40
+ # @!attribute amount_unreconciled_direction
41
+ # One of credit or debit. Indicates whether amount_unreconciled is a credit or
42
+ # debit amount.
43
+ #
44
+ # @return [Symbol, ModernTreasury::Models::ExpectedPaymentCreateParams::AmountUnreconciledDirection, nil]
45
+ optional :amount_unreconciled_direction,
46
+ enum: -> { ModernTreasury::ExpectedPaymentCreateParams::AmountUnreconciledDirection },
47
+ nil?: true
48
+
17
49
  # @!attribute amount_upper_bound
18
50
  # The highest amount this expected payment may be equal to. Value in specified
19
51
  # currency's smallest unit. e.g. $10 would be represented as 1000.
@@ -145,12 +177,20 @@ module ModernTreasury
145
177
  # @return [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil]
146
178
  optional :type, enum: -> { ModernTreasury::ExpectedPaymentType }, nil?: true
147
179
 
148
- # @!method initialize(amount_lower_bound: nil, amount_upper_bound: nil, counterparty_id: nil, currency: nil, date_lower_bound: nil, date_upper_bound: nil, description: nil, direction: nil, external_id: nil, internal_account_id: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, reconciliation_filters: nil, reconciliation_groups: nil, reconciliation_rule_variables: nil, remittance_information: nil, statement_descriptor: nil, type: nil, request_options: {})
180
+ # @!method initialize(amount_lower_bound: nil, amount_reconciled: nil, amount_reconciled_direction: nil, amount_unreconciled: nil, amount_unreconciled_direction: nil, amount_upper_bound: nil, counterparty_id: nil, currency: nil, date_lower_bound: nil, date_upper_bound: nil, description: nil, direction: nil, external_id: nil, internal_account_id: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, reconciliation_filters: nil, reconciliation_groups: nil, reconciliation_rule_variables: nil, remittance_information: nil, statement_descriptor: nil, type: nil, request_options: {})
149
181
  # Some parameter documentations has been truncated, see
150
182
  # {ModernTreasury::Models::ExpectedPaymentCreateParams} for more details.
151
183
  #
152
184
  # @param amount_lower_bound [Integer, nil] The lowest amount this expected payment may be equal to. Value in specified curr
153
185
  #
186
+ # @param amount_reconciled [Integer, nil] The amount reconciled for this expected payment. Value in specified currency's s
187
+ #
188
+ # @param amount_reconciled_direction [Symbol, ModernTreasury::Models::ExpectedPaymentCreateParams::AmountReconciledDirection, nil] One of credit or debit. Indicates whether amount_reconciled is a credit or debit
189
+ #
190
+ # @param amount_unreconciled [Integer, nil] The amount that remains unreconciled for this expected payment. Value in specifi
191
+ #
192
+ # @param amount_unreconciled_direction [Symbol, ModernTreasury::Models::ExpectedPaymentCreateParams::AmountUnreconciledDirection, nil] One of credit or debit. Indicates whether amount_unreconciled is a credit or deb
193
+ #
154
194
  # @param amount_upper_bound [Integer, nil] The highest amount this expected payment may be equal to. Value in specified cur
155
195
  #
156
196
  # @param counterparty_id [String, nil] The ID of the counterparty you expect for this payment.
@@ -191,6 +231,30 @@ module ModernTreasury
191
231
  #
192
232
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
193
233
 
234
+ # One of credit or debit. Indicates whether amount_reconciled is a credit or debit
235
+ # amount.
236
+ module AmountReconciledDirection
237
+ extend ModernTreasury::Internal::Type::Enum
238
+
239
+ CREDIT = :credit
240
+ DEBIT = :debit
241
+
242
+ # @!method self.values
243
+ # @return [Array<Symbol>]
244
+ end
245
+
246
+ # One of credit or debit. Indicates whether amount_unreconciled is a credit or
247
+ # debit amount.
248
+ module AmountUnreconciledDirection
249
+ extend ModernTreasury::Internal::Type::Enum
250
+
251
+ CREDIT = :credit
252
+ DEBIT = :debit
253
+
254
+ # @!method self.values
255
+ # @return [Array<Symbol>]
256
+ end
257
+
194
258
  # One of credit or debit. When you are receiving money, use credit. When you are
195
259
  # being charged, use debit.
196
260
  module Direction
@@ -14,6 +14,38 @@ module ModernTreasury
14
14
  # @return [Integer, nil]
15
15
  optional :amount_lower_bound, Integer, nil?: true
16
16
 
17
+ # @!attribute amount_reconciled
18
+ # The amount reconciled for this expected payment. Value in specified currency's
19
+ # smallest unit. e.g. $10 would be represented as 1000.
20
+ #
21
+ # @return [Integer, nil]
22
+ optional :amount_reconciled, Integer, nil?: true
23
+
24
+ # @!attribute amount_reconciled_direction
25
+ # One of credit or debit. Indicates whether amount_reconciled is a credit or debit
26
+ # amount.
27
+ #
28
+ # @return [Symbol, ModernTreasury::Models::ExpectedPaymentUpdateParams::AmountReconciledDirection, nil]
29
+ optional :amount_reconciled_direction,
30
+ enum: -> { ModernTreasury::ExpectedPaymentUpdateParams::AmountReconciledDirection },
31
+ nil?: true
32
+
33
+ # @!attribute amount_unreconciled
34
+ # The amount that remains unreconciled for this expected payment. Value in
35
+ # specified currency's smallest unit. e.g. $10 would be represented as 1000.
36
+ #
37
+ # @return [Integer, nil]
38
+ optional :amount_unreconciled, Integer, nil?: true
39
+
40
+ # @!attribute amount_unreconciled_direction
41
+ # One of credit or debit. Indicates whether amount_unreconciled is a credit or
42
+ # debit amount.
43
+ #
44
+ # @return [Symbol, ModernTreasury::Models::ExpectedPaymentUpdateParams::AmountUnreconciledDirection, nil]
45
+ optional :amount_unreconciled_direction,
46
+ enum: -> { ModernTreasury::ExpectedPaymentUpdateParams::AmountUnreconciledDirection },
47
+ nil?: true
48
+
17
49
  # @!attribute amount_upper_bound
18
50
  # The highest amount this expected payment may be equal to. Value in specified
19
51
  # currency's smallest unit. e.g. $10 would be represented as 1000.
@@ -128,12 +160,20 @@ module ModernTreasury
128
160
  # @return [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil]
129
161
  optional :type, enum: -> { ModernTreasury::ExpectedPaymentType }, nil?: true
130
162
 
131
- # @!method initialize(amount_lower_bound: nil, amount_upper_bound: nil, counterparty_id: nil, currency: nil, date_lower_bound: nil, date_upper_bound: nil, description: nil, direction: nil, external_id: nil, internal_account_id: nil, metadata: nil, reconciliation_filters: nil, reconciliation_groups: nil, reconciliation_rule_variables: nil, remittance_information: nil, statement_descriptor: nil, status: nil, type: nil, request_options: {})
163
+ # @!method initialize(amount_lower_bound: nil, amount_reconciled: nil, amount_reconciled_direction: nil, amount_unreconciled: nil, amount_unreconciled_direction: nil, amount_upper_bound: nil, counterparty_id: nil, currency: nil, date_lower_bound: nil, date_upper_bound: nil, description: nil, direction: nil, external_id: nil, internal_account_id: nil, metadata: nil, reconciliation_filters: nil, reconciliation_groups: nil, reconciliation_rule_variables: nil, remittance_information: nil, statement_descriptor: nil, status: nil, type: nil, request_options: {})
132
164
  # Some parameter documentations has been truncated, see
133
165
  # {ModernTreasury::Models::ExpectedPaymentUpdateParams} for more details.
134
166
  #
135
167
  # @param amount_lower_bound [Integer, nil] The lowest amount this expected payment may be equal to. Value in specified curr
136
168
  #
169
+ # @param amount_reconciled [Integer, nil] The amount reconciled for this expected payment. Value in specified currency's s
170
+ #
171
+ # @param amount_reconciled_direction [Symbol, ModernTreasury::Models::ExpectedPaymentUpdateParams::AmountReconciledDirection, nil] One of credit or debit. Indicates whether amount_reconciled is a credit or debit
172
+ #
173
+ # @param amount_unreconciled [Integer, nil] The amount that remains unreconciled for this expected payment. Value in specifi
174
+ #
175
+ # @param amount_unreconciled_direction [Symbol, ModernTreasury::Models::ExpectedPaymentUpdateParams::AmountUnreconciledDirection, nil] One of credit or debit. Indicates whether amount_unreconciled is a credit or deb
176
+ #
137
177
  # @param amount_upper_bound [Integer, nil] The highest amount this expected payment may be equal to. Value in specified cur
138
178
  #
139
179
  # @param counterparty_id [String, nil] The ID of the counterparty you expect for this payment.
@@ -170,6 +210,30 @@ module ModernTreasury
170
210
  #
171
211
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
172
212
 
213
+ # One of credit or debit. Indicates whether amount_reconciled is a credit or debit
214
+ # amount.
215
+ module AmountReconciledDirection
216
+ extend ModernTreasury::Internal::Type::Enum
217
+
218
+ CREDIT = :credit
219
+ DEBIT = :debit
220
+
221
+ # @!method self.values
222
+ # @return [Array<Symbol>]
223
+ end
224
+
225
+ # One of credit or debit. Indicates whether amount_unreconciled is a credit or
226
+ # debit amount.
227
+ module AmountUnreconciledDirection
228
+ extend ModernTreasury::Internal::Type::Enum
229
+
230
+ CREDIT = :credit
231
+ DEBIT = :debit
232
+
233
+ # @!method self.values
234
+ # @return [Array<Symbol>]
235
+ end
236
+
173
237
  # One of credit or debit. When you are receiving money, use credit. When you are
174
238
  # being charged, use debit.
175
239
  module Direction
@@ -323,16 +323,21 @@ module ModernTreasury
323
323
  ACH = :ach
324
324
  AU_BECS = :au_becs
325
325
  BACS = :bacs
326
+ BASE = :base
326
327
  BOOK = :book
327
328
  CHECK = :check
328
329
  EFT = :eft
330
+ ETHEREUM = :ethereum
329
331
  INTERAC = :interac
330
332
  NEFT = :neft
331
333
  NZ_BECS = :nz_becs
334
+ POLYGON = :polygon
332
335
  RTP = :rtp
333
336
  SEPA = :sepa
334
337
  SIGNET = :signet
338
+ SOLANA = :solana
335
339
  WIRE = :wire
340
+ ZENGIN = :zengin
336
341
 
337
342
  # @!method self.values
338
343
  # @return [Array<Symbol>]
@@ -107,16 +107,21 @@ module ModernTreasury
107
107
  ACH = :ach
108
108
  AU_BECS = :au_becs
109
109
  BACS = :bacs
110
+ BASE = :base
110
111
  BOOK = :book
111
112
  CHECK = :check
112
113
  EFT = :eft
114
+ ETHEREUM = :ethereum
113
115
  INTERAC = :interac
114
116
  NEFT = :neft
115
117
  NZ_BECS = :nz_becs
118
+ POLYGON = :polygon
116
119
  RTP = :rtp
117
120
  SEPA = :sepa
118
121
  SIGNET = :signet
122
+ SOLANA = :solana
119
123
  WIRE = :wire
124
+ ZENGIN = :zengin
120
125
 
121
126
  # @!method self.values
122
127
  # @return [Array<Symbol>]
@@ -111,16 +111,21 @@ module ModernTreasury
111
111
  ACH = :ach
112
112
  AU_BECS = :au_becs
113
113
  BACS = :bacs
114
+ BASE = :base
114
115
  BOOK = :book
115
116
  CHECK = :check
116
117
  EFT = :eft
118
+ ETHEREUM = :ethereum
117
119
  INTERAC = :interac
118
120
  NEFT = :neft
119
121
  NZ_BECS = :nz_becs
122
+ POLYGON = :polygon
120
123
  RTP = :rtp
121
124
  SEPA = :sepa
122
125
  SIGNET = :signet
126
+ SOLANA = :solana
123
127
  WIRE = :wire
128
+ ZENGIN = :zengin
124
129
 
125
130
  # @!method self.values
126
131
  # @return [Array<Symbol>]
@@ -35,6 +35,13 @@ module ModernTreasury
35
35
  # @return [ModernTreasury::Models::Connection]
36
36
  required :connection, -> { ModernTreasury::Connection }
37
37
 
38
+ # @!attribute contra_ledger_account_id
39
+ # If the internal account links to a contra ledger account in Modern Treasury, the
40
+ # id of the contra ledger account will be populated here.
41
+ #
42
+ # @return [String, nil]
43
+ required :contra_ledger_account_id, String, nil?: true
44
+
38
45
  # @!attribute counterparty_id
39
46
  # The Counterparty associated to this account.
40
47
  #
@@ -137,7 +144,7 @@ module ModernTreasury
137
144
  # @return [String, nil]
138
145
  required :vendor_id, String, nil?: true
139
146
 
140
- # @!method initialize(id:, account_capabilities:, account_details:, account_type:, connection:, counterparty_id:, created_at:, currency:, ledger_account_id:, legal_entity_id:, live_mode:, metadata:, name:, object:, parent_account_id:, party_address:, party_name:, party_type:, routing_details:, status:, updated_at:, vendor_id:)
147
+ # @!method initialize(id:, account_capabilities:, account_details:, account_type:, connection:, contra_ledger_account_id:, counterparty_id:, created_at:, currency:, ledger_account_id:, legal_entity_id:, live_mode:, metadata:, name:, object:, parent_account_id:, party_address:, party_name:, party_type:, routing_details:, status:, updated_at:, vendor_id:)
141
148
  # Some parameter documentations has been truncated, see
142
149
  # {ModernTreasury::Models::InternalAccount} for more details.
143
150
  #
@@ -151,6 +158,8 @@ module ModernTreasury
151
158
  #
152
159
  # @param connection [ModernTreasury::Models::Connection] Specifies which financial institution the accounts belong to.
153
160
  #
161
+ # @param contra_ledger_account_id [String, nil] If the internal account links to a contra ledger account in Modern Treasury, the
162
+ #
154
163
  # @param counterparty_id [String, nil] The Counterparty associated to this account.
155
164
  #
156
165
  # @param created_at [Time]
@@ -7,6 +7,12 @@ module ModernTreasury
7
7
  extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
8
  include ModernTreasury::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute contra_ledger_account_id
11
+ # The Contra Ledger Account associated to this account.
12
+ #
13
+ # @return [String, nil]
14
+ optional :contra_ledger_account_id, String
15
+
10
16
  # @!attribute counterparty_id
11
17
  # The Counterparty associated to this account.
12
18
  #
@@ -38,10 +44,12 @@ module ModernTreasury
38
44
  # @return [String, nil]
39
45
  optional :parent_account_id, String
40
46
 
41
- # @!method initialize(counterparty_id: nil, ledger_account_id: nil, metadata: nil, name: nil, parent_account_id: nil, request_options: {})
47
+ # @!method initialize(contra_ledger_account_id: nil, counterparty_id: nil, ledger_account_id: nil, metadata: nil, name: nil, parent_account_id: nil, request_options: {})
42
48
  # Some parameter documentations has been truncated, see
43
49
  # {ModernTreasury::Models::InternalAccountUpdateParams} for more details.
44
50
  #
51
+ # @param contra_ledger_account_id [String] The Contra Ledger Account associated to this account.
52
+ #
45
53
  # @param counterparty_id [String] The Counterparty associated to this account.
46
54
  #
47
55
  # @param ledger_account_id [String] The Ledger Account associated to this account.
@@ -108,6 +108,8 @@ module ModernTreasury
108
108
  required :invoicer_name, String, nil?: true
109
109
 
110
110
  # @!attribute ledger_account_settlement_id
111
+ # @deprecated
112
+ #
111
113
  # The ledger account settlement object linked to the invoice.
112
114
  #
113
115
  # @return [String, nil]
@@ -74,14 +74,6 @@ module ModernTreasury
74
74
  # @return [String, nil]
75
75
  optional :fallback_payment_method, String, nil?: true
76
76
 
77
- # @!attribute ingest_ledger_entries
78
- # Whether to ingest the ledger_entries to populate the invoice line items. If this
79
- # is false, then a line item must be provided. If this is true, line_items must be
80
- # empty. Ignored if ledger_account_settlement_id is empty.
81
- #
82
- # @return [Boolean, nil]
83
- optional :ingest_ledger_entries, ModernTreasury::Internal::Type::Boolean, nil?: true
84
-
85
77
  # @!attribute invoice_line_items
86
78
  # An array of invoice line items. The API supports a maximum of 50 invoice line
87
79
  # items per invoice. If a greater number of invoice line items is required, please
@@ -100,12 +92,6 @@ module ModernTreasury
100
92
  # @return [ModernTreasury::Models::InvoiceCreateParams::InvoicerAddress, nil]
101
93
  optional :invoicer_address, -> { ModernTreasury::InvoiceCreateParams::InvoicerAddress }, nil?: true
102
94
 
103
- # @!attribute ledger_account_settlement_id
104
- # The ID of the virtual account the invoice should be paid to.
105
- #
106
- # @return [String, nil]
107
- optional :ledger_account_settlement_id, String, nil?: true
108
-
109
95
  # @!attribute metadata
110
96
  # Additional data represented as key-value pairs. Both the key and value must be
111
97
  # strings.
@@ -188,7 +174,7 @@ module ModernTreasury
188
174
  # @return [String, nil]
189
175
  optional :virtual_account_id, String, nil?: true
190
176
 
191
- # @!method initialize(counterparty_id:, due_date:, originating_account_id:, auto_advance: nil, contact_details: nil, counterparty_billing_address: nil, counterparty_shipping_address: nil, currency: nil, description: nil, fallback_payment_method: nil, ingest_ledger_entries: nil, invoice_line_items: nil, invoicer_address: nil, ledger_account_settlement_id: nil, metadata: nil, notification_email_addresses: nil, notifications_enabled: nil, payment_effective_date: nil, payment_method: nil, payment_type: nil, receiving_account_id: nil, recipient_email: nil, recipient_name: nil, remind_after_overdue_days: nil, virtual_account_id: nil, request_options: {})
177
+ # @!method initialize(counterparty_id:, due_date:, originating_account_id:, auto_advance: nil, contact_details: nil, counterparty_billing_address: nil, counterparty_shipping_address: nil, currency: nil, description: nil, fallback_payment_method: nil, invoice_line_items: nil, invoicer_address: nil, metadata: nil, notification_email_addresses: nil, notifications_enabled: nil, payment_effective_date: nil, payment_method: nil, payment_type: nil, receiving_account_id: nil, recipient_email: nil, recipient_name: nil, remind_after_overdue_days: nil, virtual_account_id: nil, request_options: {})
192
178
  # Some parameter documentations has been truncated, see
193
179
  # {ModernTreasury::Models::InvoiceCreateParams} for more details.
194
180
  #
@@ -212,14 +198,10 @@ module ModernTreasury
212
198
  #
213
199
  # @param fallback_payment_method [String, nil] When payment_method is automatic, the fallback payment method to use when an aut
214
200
  #
215
- # @param ingest_ledger_entries [Boolean, nil] Whether to ingest the ledger_entries to populate the invoice line items. If this
216
- #
217
201
  # @param invoice_line_items [Array<ModernTreasury::Models::InvoiceCreateParams::InvoiceLineItem>, nil] An array of invoice line items. The API supports a maximum of 50 invoice line it
218
202
  #
219
203
  # @param invoicer_address [ModernTreasury::Models::InvoiceCreateParams::InvoicerAddress, nil] The invoice issuer's business address.
220
204
  #
221
- # @param ledger_account_settlement_id [String, nil] The ID of the virtual account the invoice should be paid to.
222
- #
223
205
  # @param metadata [Hash{Symbol=>String}, nil] Additional data represented as key-value pairs. Both the key and value must be s
224
206
  #
225
207
  # @param notification_email_addresses [Array<String>, nil] Emails in addition to the counterparty email to send invoice status notification
@@ -60,14 +60,6 @@ module ModernTreasury
60
60
  # @return [String, nil]
61
61
  optional :fallback_payment_method, String, nil?: true
62
62
 
63
- # @!attribute ingest_ledger_entries
64
- # Whether to ingest the ledger_entries to populate the invoice line items. If this
65
- # is false, then a line item must be provided. If this is true, line_items must be
66
- # empty. Ignored if ledger_account_settlement_id is empty.
67
- #
68
- # @return [Boolean, nil]
69
- optional :ingest_ledger_entries, ModernTreasury::Internal::Type::Boolean, nil?: true
70
-
71
63
  # @!attribute invoice_line_items
72
64
  # An array of invoice line items. The API supports a maximum of 50 invoice line
73
65
  # items per invoice. If a greater number of invoice line items is required, please
@@ -86,12 +78,6 @@ module ModernTreasury
86
78
  # @return [ModernTreasury::Models::InvoiceUpdateParams::InvoicerAddress, nil]
87
79
  optional :invoicer_address, -> { ModernTreasury::InvoiceUpdateParams::InvoicerAddress }, nil?: true
88
80
 
89
- # @!attribute ledger_account_settlement_id
90
- # The ID of the virtual account the invoice should be paid to.
91
- #
92
- # @return [String, nil]
93
- optional :ledger_account_settlement_id, String, nil?: true
94
-
95
81
  # @!attribute metadata
96
82
  # Additional data represented as key-value pairs. Both the key and value must be
97
83
  # strings.
@@ -188,7 +174,7 @@ module ModernTreasury
188
174
  # @return [String, nil]
189
175
  optional :virtual_account_id, String, nil?: true
190
176
 
191
- # @!method initialize(contact_details: nil, counterparty_billing_address: nil, counterparty_id: nil, counterparty_shipping_address: nil, currency: nil, description: nil, due_date: nil, fallback_payment_method: nil, ingest_ledger_entries: nil, invoice_line_items: nil, invoicer_address: nil, ledger_account_settlement_id: nil, metadata: nil, notification_email_addresses: nil, notifications_enabled: nil, originating_account_id: nil, payment_effective_date: nil, payment_method: nil, payment_type: nil, receiving_account_id: nil, recipient_email: nil, recipient_name: nil, remind_after_overdue_days: nil, status: nil, virtual_account_id: nil, request_options: {})
177
+ # @!method initialize(contact_details: nil, counterparty_billing_address: nil, counterparty_id: nil, counterparty_shipping_address: nil, currency: nil, description: nil, due_date: nil, fallback_payment_method: nil, invoice_line_items: nil, invoicer_address: nil, metadata: nil, notification_email_addresses: nil, notifications_enabled: nil, originating_account_id: nil, payment_effective_date: nil, payment_method: nil, payment_type: nil, receiving_account_id: nil, recipient_email: nil, recipient_name: nil, remind_after_overdue_days: nil, status: nil, virtual_account_id: nil, request_options: {})
192
178
  # Some parameter documentations has been truncated, see
193
179
  # {ModernTreasury::Models::InvoiceUpdateParams} for more details.
194
180
  #
@@ -208,14 +194,10 @@ module ModernTreasury
208
194
  #
209
195
  # @param fallback_payment_method [String, nil] When payment_method is automatic, the fallback payment method to use when an aut
210
196
  #
211
- # @param ingest_ledger_entries [Boolean, nil] Whether to ingest the ledger_entries to populate the invoice line items. If this
212
- #
213
197
  # @param invoice_line_items [Array<ModernTreasury::Models::InvoiceUpdateParams::InvoiceLineItem>, nil] An array of invoice line items. The API supports a maximum of 50 invoice line it
214
198
  #
215
199
  # @param invoicer_address [ModernTreasury::Models::InvoiceUpdateParams::InvoicerAddress, nil] The invoice issuer's business address.
216
200
  #
217
- # @param ledger_account_settlement_id [String, nil] The ID of the virtual account the invoice should be paid to.
218
- #
219
201
  # @param metadata [Hash{Symbol=>String}, nil] Additional data represented as key-value pairs. Both the key and value must be s
220
202
  #
221
203
  # @param notification_email_addresses [Array<String>, nil] Emails in addition to the counterparty email to send invoice status notification
@@ -35,6 +35,13 @@ module ModernTreasury
35
35
  # @return [Time, nil]
36
36
  required :discarded_at, Time, nil?: true
37
37
 
38
+ # @!attribute effective_at
39
+ # The timestamp (ISO8601 format) at which the ledger transaction happened for
40
+ # reporting purposes.
41
+ #
42
+ # @return [Time]
43
+ required :effective_at, Time
44
+
38
45
  # @!attribute ledger_account_currency
39
46
  # The currency of the ledger account.
40
47
  #
@@ -111,7 +118,7 @@ module ModernTreasury
111
118
  # @return [Time]
112
119
  required :updated_at, Time
113
120
 
114
- # @!method initialize(id:, amount:, created_at:, direction:, discarded_at:, ledger_account_currency:, ledger_account_currency_exponent:, ledger_account_id:, ledger_account_lock_version:, ledger_transaction_id:, live_mode:, metadata:, object:, resulting_ledger_account_balances:, status:, updated_at:)
121
+ # @!method initialize(id:, amount:, created_at:, direction:, discarded_at:, effective_at:, ledger_account_currency:, ledger_account_currency_exponent:, ledger_account_id:, ledger_account_lock_version:, ledger_transaction_id:, live_mode:, metadata:, object:, resulting_ledger_account_balances:, status:, updated_at:)
115
122
  # Some parameter documentations has been truncated, see
116
123
  # {ModernTreasury::Models::LedgerEntry} for more details.
117
124
  #
@@ -125,6 +132,8 @@ module ModernTreasury
125
132
  #
126
133
  # @param discarded_at [Time, nil]
127
134
  #
135
+ # @param effective_at [Time] The timestamp (ISO8601 format) at which the ledger transaction happened for repo
136
+ #
128
137
  # @param ledger_account_currency [String] The currency of the ledger account.
129
138
  #
130
139
  # @param ledger_account_currency_exponent [Integer] The currency exponent of the ledger account.
@@ -33,6 +33,13 @@ module ModernTreasury
33
33
  # @return [Hash{Symbol=>Integer}, nil]
34
34
  optional :available_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
35
35
 
36
+ # @!attribute effective_at
37
+ # The timestamp (ISO8601 format) at which the ledger transaction happened for
38
+ # reporting purposes.
39
+ #
40
+ # @return [Time, nil]
41
+ optional :effective_at, Time
42
+
36
43
  # @!attribute lock_version
37
44
  # Lock version of the ledger account. This can be passed when creating a ledger
38
45
  # transaction to only succeed if no ledger transactions have posted since the
@@ -72,7 +79,7 @@ module ModernTreasury
72
79
  # @return [Boolean, nil]
73
80
  optional :show_resulting_ledger_account_balances, ModernTreasury::Internal::Type::Boolean, nil?: true
74
81
 
75
- # @!method initialize(amount:, direction:, ledger_account_id:, available_balance_amount: nil, lock_version: nil, metadata: nil, pending_balance_amount: nil, posted_balance_amount: nil, show_resulting_ledger_account_balances: nil)
82
+ # @!method initialize(amount:, direction:, ledger_account_id:, available_balance_amount: nil, effective_at: nil, lock_version: nil, metadata: nil, pending_balance_amount: nil, posted_balance_amount: nil, show_resulting_ledger_account_balances: nil)
76
83
  # Some parameter documentations has been truncated, see
77
84
  # {ModernTreasury::Models::LedgerEntryCreateRequest} for more details.
78
85
  #
@@ -84,6 +91,8 @@ module ModernTreasury
84
91
  #
85
92
  # @param available_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
86
93
  #
94
+ # @param effective_at [Time] The timestamp (ISO8601 format) at which the ledger transaction happened for repo
95
+ #
87
96
  # @param lock_version [Integer, nil] Lock version of the ledger account. This can be passed when creating a ledger tr
88
97
  #
89
98
  # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
@@ -218,6 +218,13 @@ module ModernTreasury
218
218
  # @return [Symbol, ModernTreasury::Models::TransactionDirection]
219
219
  required :direction, enum: -> { ModernTreasury::TransactionDirection }
220
220
 
221
+ # @!attribute effective_at
222
+ # The timestamp (ISO8601 format) at which the ledger transaction happened for
223
+ # reporting purposes.
224
+ #
225
+ # @return [Time]
226
+ required :effective_at, Time
227
+
221
228
  # @!attribute ledger_account_currency
222
229
  # The currency of the ledger account.
223
230
  #
@@ -290,7 +297,7 @@ module ModernTreasury
290
297
  required :status,
291
298
  enum: -> { ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::Status }
292
299
 
293
- # @!method initialize(id:, amount:, created_at:, direction:, ledger_account_currency:, ledger_account_currency_exponent:, ledger_account_id:, ledger_account_lock_version:, ledger_transaction_id:, live_mode:, metadata:, object:, resulting_ledger_account_balances:, status:)
300
+ # @!method initialize(id:, amount:, created_at:, direction:, effective_at:, ledger_account_currency:, ledger_account_currency_exponent:, ledger_account_id:, ledger_account_lock_version:, ledger_transaction_id:, live_mode:, metadata:, object:, resulting_ledger_account_balances:, status:)
294
301
  # Some parameter documentations has been truncated, see
295
302
  # {ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry}
296
303
  # for more details.
@@ -303,6 +310,8 @@ module ModernTreasury
303
310
  #
304
311
  # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `credit`, `debit`. Describes the direction money is flowing in the transa
305
312
  #
313
+ # @param effective_at [Time] The timestamp (ISO8601 format) at which the ledger transaction happened for repo
314
+ #
306
315
  # @param ledger_account_currency [String] The currency of the ledger account.
307
316
  #
308
317
  # @param ledger_account_currency_exponent [Integer] The currency exponent of the ledger account.