modern_treasury 0.10.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 (173) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -0
  3. data/README.md +10 -1
  4. data/lib/modern_treasury/client.rb +12 -0
  5. data/lib/modern_treasury/internal/transport/pooled_net_requester.rb +12 -10
  6. data/lib/modern_treasury/internal/util.rb +7 -2
  7. data/lib/modern_treasury/models/bulk_request_create_params.rb +146 -2
  8. data/lib/modern_treasury/models/child_legal_entity.rb +609 -0
  9. data/lib/modern_treasury/models/child_legal_entity_create.rb +63 -1
  10. data/lib/modern_treasury/models/connection_legal_entity.rb +2 -0
  11. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +54 -63
  12. data/lib/modern_treasury/models/connection_legal_entity_list_params.rb +2 -0
  13. data/lib/modern_treasury/models/counterparty_create_params.rb +54 -59
  14. data/lib/modern_treasury/models/expected_payment.rb +69 -1
  15. data/lib/modern_treasury/models/expected_payment_create_params.rb +65 -1
  16. data/lib/modern_treasury/models/expected_payment_update_params.rb +65 -1
  17. data/lib/modern_treasury/models/hold_create_params.rb +74 -0
  18. data/lib/modern_treasury/models/hold_create_response.rb +143 -0
  19. data/lib/modern_treasury/models/hold_list_params.rb +89 -0
  20. data/lib/modern_treasury/models/hold_list_response.rb +143 -0
  21. data/lib/modern_treasury/models/hold_retrieve_params.rb +14 -0
  22. data/lib/modern_treasury/models/hold_retrieve_response.rb +143 -0
  23. data/lib/modern_treasury/models/hold_update_params.rb +40 -0
  24. data/lib/modern_treasury/models/hold_update_response.rb +143 -0
  25. data/lib/modern_treasury/models/incoming_payment_detail.rb +5 -0
  26. data/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rb +5 -0
  27. data/lib/modern_treasury/models/incoming_payment_detail_list_params.rb +5 -0
  28. data/lib/modern_treasury/models/internal_account.rb +10 -1
  29. data/lib/modern_treasury/models/internal_account_request_closure_params.rb +14 -0
  30. data/lib/modern_treasury/models/internal_account_update_params.rb +9 -1
  31. data/lib/modern_treasury/models/invoice.rb +2 -0
  32. data/lib/modern_treasury/models/invoice_create_params.rb +1 -19
  33. data/lib/modern_treasury/models/invoice_update_params.rb +1 -19
  34. data/lib/modern_treasury/models/journal_entry_list_params.rb +38 -0
  35. data/lib/modern_treasury/models/journal_entry_retrieve_params.rb +14 -0
  36. data/lib/modern_treasury/models/journal_report_list_params.rb +14 -0
  37. data/lib/modern_treasury/models/journal_report_retrieve_params.rb +14 -0
  38. data/lib/modern_treasury/models/journal_report_update_params.rb +26 -0
  39. data/lib/modern_treasury/models/ledger_entry.rb +10 -1
  40. data/lib/modern_treasury/models/ledger_entry_create_request.rb +10 -1
  41. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +10 -1
  42. data/lib/modern_treasury/models/legal_entity.rb +61 -11
  43. data/lib/modern_treasury/models/legal_entity_association.rb +3 -559
  44. data/lib/modern_treasury/models/legal_entity_association_inline_create.rb +60 -0
  45. data/lib/modern_treasury/models/legal_entity_create_params.rb +54 -59
  46. data/lib/modern_treasury/models/legal_entity_update_params.rb +51 -1
  47. data/lib/modern_treasury/models/payment_order.rb +5 -1
  48. data/lib/modern_treasury/models/payment_order_subtype.rb +0 -1
  49. data/lib/modern_treasury/models/payment_reference.rb +5 -1
  50. data/lib/modern_treasury/models/return_object.rb +6 -1
  51. data/lib/modern_treasury/models/transaction.rb +2 -1
  52. data/lib/modern_treasury/models.rb +24 -0
  53. data/lib/modern_treasury/resources/expected_payments.rb +18 -2
  54. data/lib/modern_treasury/resources/holds.rb +126 -0
  55. data/lib/modern_treasury/resources/internal_accounts.rb +23 -1
  56. data/lib/modern_treasury/resources/invoices.rb +2 -10
  57. data/lib/modern_treasury/resources/journal_entries.rb +60 -0
  58. data/lib/modern_treasury/resources/journal_reports.rb +78 -0
  59. data/lib/modern_treasury/resources/ledger_accounts.rb +3 -3
  60. data/lib/modern_treasury/resources/ledger_transactions.rb +5 -2
  61. data/lib/modern_treasury/resources/legal_entities.rb +27 -3
  62. data/lib/modern_treasury/version.rb +1 -1
  63. data/lib/modern_treasury.rb +20 -0
  64. data/manifest.yaml +1 -0
  65. data/rbi/modern_treasury/client.rbi +9 -0
  66. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +272 -0
  67. data/rbi/modern_treasury/models/child_legal_entity.rbi +969 -0
  68. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +78 -0
  69. data/rbi/modern_treasury/models/connection_legal_entity.rbi +10 -0
  70. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +61 -135
  71. data/rbi/modern_treasury/models/connection_legal_entity_list_params.rbi +10 -0
  72. data/rbi/modern_treasury/models/counterparty_create_params.rbi +61 -135
  73. data/rbi/modern_treasury/models/expected_payment.rbi +136 -0
  74. data/rbi/modern_treasury/models/expected_payment_create_params.rbi +136 -0
  75. data/rbi/modern_treasury/models/expected_payment_update_params.rbi +136 -0
  76. data/rbi/modern_treasury/models/hold_create_params.rbi +125 -0
  77. data/rbi/modern_treasury/models/hold_create_response.rbi +232 -0
  78. data/rbi/modern_treasury/models/hold_list_params.rbi +150 -0
  79. data/rbi/modern_treasury/models/hold_list_response.rbi +225 -0
  80. data/rbi/modern_treasury/models/hold_retrieve_params.rbi +32 -0
  81. data/rbi/modern_treasury/models/hold_retrieve_response.rbi +234 -0
  82. data/rbi/modern_treasury/models/hold_update_params.rbi +79 -0
  83. data/rbi/modern_treasury/models/hold_update_response.rbi +232 -0
  84. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +25 -0
  85. data/rbi/modern_treasury/models/incoming_payment_detail_create_async_params.rbi +25 -0
  86. data/rbi/modern_treasury/models/incoming_payment_detail_list_params.rbi +25 -0
  87. data/rbi/modern_treasury/models/internal_account.rbi +10 -0
  88. data/rbi/modern_treasury/models/internal_account_request_closure_params.rbi +32 -0
  89. data/rbi/modern_treasury/models/internal_account_update_params.rbi +11 -0
  90. data/rbi/modern_treasury/models/invoice_create_params.rbi +0 -20
  91. data/rbi/modern_treasury/models/invoice_update_params.rbi +0 -20
  92. data/rbi/modern_treasury/models/journal_entry_list_params.rbi +68 -0
  93. data/rbi/modern_treasury/models/journal_entry_retrieve_params.rbi +32 -0
  94. data/rbi/modern_treasury/models/journal_report_list_params.rbi +32 -0
  95. data/rbi/modern_treasury/models/journal_report_retrieve_params.rbi +32 -0
  96. data/rbi/modern_treasury/models/journal_report_update_params.rbi +52 -0
  97. data/rbi/modern_treasury/models/ledger_entry.rbi +10 -0
  98. data/rbi/modern_treasury/models/ledger_entry_create_request.rbi +13 -0
  99. data/rbi/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +10 -0
  100. data/rbi/modern_treasury/models/legal_entity.rbi +67 -15
  101. data/rbi/modern_treasury/models/legal_entity_association.rbi +4 -962
  102. data/rbi/modern_treasury/models/legal_entity_association_inline_create.rbi +130 -0
  103. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +61 -134
  104. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +58 -0
  105. data/rbi/modern_treasury/models/payment_order.rbi +22 -2
  106. data/rbi/modern_treasury/models/payment_order_subtype.rbi +0 -1
  107. data/rbi/modern_treasury/models/payment_reference.rbi +22 -2
  108. data/rbi/modern_treasury/models/return_object.rbi +24 -2
  109. data/rbi/modern_treasury/models/transaction.rbi +7 -2
  110. data/rbi/modern_treasury/models.rbi +28 -0
  111. data/rbi/modern_treasury/resources/expected_payments.rbi +44 -0
  112. data/rbi/modern_treasury/resources/holds.rbi +108 -0
  113. data/rbi/modern_treasury/resources/internal_accounts.rbi +17 -0
  114. data/rbi/modern_treasury/resources/invoices.rbi +0 -16
  115. data/rbi/modern_treasury/resources/journal_entries.rbi +46 -0
  116. data/rbi/modern_treasury/resources/journal_reports.rbi +51 -0
  117. data/rbi/modern_treasury/resources/ledger_accounts.rbi +3 -3
  118. data/rbi/modern_treasury/resources/ledger_transactions.rbi +3 -2
  119. data/rbi/modern_treasury/resources/legal_entities.rbi +41 -1
  120. data/sig/modern_treasury/client.rbs +6 -0
  121. data/sig/modern_treasury/models/bulk_request_create_params.rbs +84 -0
  122. data/sig/modern_treasury/models/child_legal_entity.rbs +469 -0
  123. data/sig/modern_treasury/models/child_legal_entity_create.rbs +39 -0
  124. data/sig/modern_treasury/models/connection_legal_entity.rbs +4 -1
  125. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +38 -60
  126. data/sig/modern_treasury/models/connection_legal_entity_list_params.rbs +4 -1
  127. data/sig/modern_treasury/models/counterparty_create_params.rbs +38 -60
  128. data/sig/modern_treasury/models/expected_payment.rbs +42 -0
  129. data/sig/modern_treasury/models/expected_payment_create_params.rbs +42 -0
  130. data/sig/modern_treasury/models/expected_payment_update_params.rbs +42 -0
  131. data/sig/modern_treasury/models/hold_create_params.rbs +66 -0
  132. data/sig/modern_treasury/models/hold_create_response.rbs +108 -0
  133. data/sig/modern_treasury/models/hold_list_params.rbs +76 -0
  134. data/sig/modern_treasury/models/hold_list_response.rbs +108 -0
  135. data/sig/modern_treasury/models/hold_retrieve_params.rbs +15 -0
  136. data/sig/modern_treasury/models/hold_retrieve_response.rbs +108 -0
  137. data/sig/modern_treasury/models/hold_update_params.rbs +41 -0
  138. data/sig/modern_treasury/models/hold_update_response.rbs +108 -0
  139. data/sig/modern_treasury/models/incoming_payment_detail.rbs +10 -0
  140. data/sig/modern_treasury/models/incoming_payment_detail_create_async_params.rbs +10 -0
  141. data/sig/modern_treasury/models/incoming_payment_detail_list_params.rbs +10 -0
  142. data/sig/modern_treasury/models/internal_account.rbs +5 -0
  143. data/sig/modern_treasury/models/internal_account_request_closure_params.rbs +15 -0
  144. data/sig/modern_treasury/models/internal_account_update_params.rbs +7 -0
  145. data/sig/modern_treasury/models/invoice_create_params.rbs +0 -10
  146. data/sig/modern_treasury/models/invoice_update_params.rbs +0 -10
  147. data/sig/modern_treasury/models/journal_entry_list_params.rbs +36 -0
  148. data/sig/modern_treasury/models/journal_entry_retrieve_params.rbs +15 -0
  149. data/sig/modern_treasury/models/journal_report_list_params.rbs +15 -0
  150. data/sig/modern_treasury/models/journal_report_retrieve_params.rbs +15 -0
  151. data/sig/modern_treasury/models/journal_report_update_params.rbs +32 -0
  152. data/sig/modern_treasury/models/ledger_entry.rbs +5 -0
  153. data/sig/modern_treasury/models/ledger_entry_create_request.rbs +7 -0
  154. data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +5 -0
  155. data/sig/modern_treasury/models/legal_entity.rbs +38 -8
  156. data/sig/modern_treasury/models/legal_entity_association.rbs +4 -435
  157. data/sig/modern_treasury/models/legal_entity_association_inline_create.rbs +59 -0
  158. data/sig/modern_treasury/models/legal_entity_create_params.rbs +38 -60
  159. data/sig/modern_treasury/models/legal_entity_update_params.rbs +34 -0
  160. data/sig/modern_treasury/models/payment_order.rbs +10 -2
  161. data/sig/modern_treasury/models/payment_order_subtype.rbs +0 -2
  162. data/sig/modern_treasury/models/payment_reference.rbs +10 -2
  163. data/sig/modern_treasury/models/return_object.rbs +12 -2
  164. data/sig/modern_treasury/models/transaction.rbs +4 -2
  165. data/sig/modern_treasury/models.rbs +24 -0
  166. data/sig/modern_treasury/resources/expected_payments.rbs +8 -0
  167. data/sig/modern_treasury/resources/holds.rbs +38 -0
  168. data/sig/modern_treasury/resources/internal_accounts.rbs +6 -0
  169. data/sig/modern_treasury/resources/invoices.rbs +0 -4
  170. data/sig/modern_treasury/resources/journal_entries.rbs +19 -0
  171. data/sig/modern_treasury/resources/journal_reports.rbs +21 -0
  172. data/sig/modern_treasury/resources/legal_entities.rbs +13 -1
  173. metadata +59 -2
@@ -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
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::JournalEntries#list
6
+ class JournalEntryListParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!attribute journal_report_id
11
+ # The ID of the journal report
12
+ #
13
+ # @return [String]
14
+ required :journal_report_id, String
15
+
16
+ # @!attribute page
17
+ # Page number for pagination
18
+ #
19
+ # @return [Integer, nil]
20
+ optional :page, Integer
21
+
22
+ # @!attribute per_page
23
+ # Number of items per page
24
+ #
25
+ # @return [Integer, nil]
26
+ optional :per_page, Integer
27
+
28
+ # @!method initialize(journal_report_id:, page: nil, per_page: nil, request_options: {})
29
+ # @param journal_report_id [String] The ID of the journal report
30
+ #
31
+ # @param page [Integer] Page number for pagination
32
+ #
33
+ # @param per_page [Integer] Number of items per page
34
+ #
35
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::JournalEntries#retrieve
6
+ class JournalEntryRetrieveParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::JournalReports#list
6
+ class JournalReportListParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::JournalReports#retrieve
6
+ class JournalReportRetrieveParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::JournalReports#update
6
+ class JournalReportUpdateParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!attribute metadata
11
+ #
12
+ # @return [Object, nil]
13
+ optional :metadata, ModernTreasury::Internal::Type::Unknown
14
+
15
+ # @!attribute status
16
+ #
17
+ # @return [String, nil]
18
+ optional :status, String
19
+
20
+ # @!method initialize(metadata: nil, status: nil, request_options: {})
21
+ # @param metadata [Object]
22
+ # @param status [String]
23
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -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.
@@ -20,6 +20,12 @@ module ModernTreasury
20
20
  # @return [ModernTreasury::Models::LegalEntityBankSettings, nil]
21
21
  required :bank_settings, -> { ModernTreasury::LegalEntityBankSettings }, nil?: true
22
22
 
23
+ # @!attribute business_description
24
+ # A description of the business.
25
+ #
26
+ # @return [String, nil]
27
+ required :business_description, String, nil?: true
28
+
23
29
  # @!attribute business_name
24
30
  # The business's legal business name.
25
31
  #
@@ -37,6 +43,13 @@ module ModernTreasury
37
43
  # @return [ModernTreasury::Models::LegalEntityComplianceDetail, nil]
38
44
  required :compliance_details, -> { ModernTreasury::LegalEntityComplianceDetail }, nil?: true
39
45
 
46
+ # @!attribute country_of_incorporation
47
+ # The country code where the business is incorporated in the ISO 3166-1 alpha-2 or
48
+ # alpha-3 formats.
49
+ #
50
+ # @return [String, nil]
51
+ required :country_of_incorporation, String, nil?: true
52
+
40
53
  # @!attribute created_at
41
54
  #
42
55
  # @return [Time]
@@ -70,6 +83,12 @@ module ModernTreasury
70
83
  # @return [String, nil]
71
84
  required :email, String, nil?: true
72
85
 
86
+ # @!attribute expected_activity_volume
87
+ # Monthly expected transaction volume in entity's local currency.
88
+ #
89
+ # @return [Integer, nil]
90
+ required :expected_activity_volume, Integer, nil?: true
91
+
73
92
  # @!attribute first_name
74
93
  # An individual's first name.
75
94
  #
@@ -90,20 +109,18 @@ module ModernTreasury
90
109
  required :industry_classifications,
91
110
  -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification] }
92
111
 
112
+ # @!attribute intended_use
113
+ # A description of the intended use of the legal entity.
114
+ #
115
+ # @return [String, nil]
116
+ required :intended_use, String, nil?: true
117
+
93
118
  # @!attribute last_name
94
119
  # An individual's last name.
95
120
  #
96
121
  # @return [String, nil]
97
122
  required :last_name, String, nil?: true
98
123
 
99
- # @!attribute legal_entity_associations
100
- # The legal entity associations and its child legal entities.
101
- #
102
- # @return [Array<ModernTreasury::Models::LegalEntityAssociation>, nil]
103
- required :legal_entity_associations,
104
- -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation] },
105
- nil?: true
106
-
107
124
  # @!attribute legal_entity_type
108
125
  # The type of legal entity.
109
126
  #
@@ -141,6 +158,13 @@ module ModernTreasury
141
158
  # @return [String]
142
159
  required :object, String
143
160
 
161
+ # @!attribute operating_jurisdictions
162
+ # A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3
163
+ # codes).
164
+ #
165
+ # @return [Array<String>]
166
+ required :operating_jurisdictions, ModernTreasury::Internal::Type::ArrayOf[String]
167
+
144
168
  # @!attribute phone_numbers
145
169
  #
146
170
  # @return [Array<ModernTreasury::Models::LegalEntity::PhoneNumber>]
@@ -165,6 +189,12 @@ module ModernTreasury
165
189
  # @return [String, nil]
166
190
  required :prefix, String, nil?: true
167
191
 
192
+ # @!attribute primary_social_media_sites
193
+ # A list of primary social media URLs for the business.
194
+ #
195
+ # @return [Array<String>]
196
+ required :primary_social_media_sites, ModernTreasury::Internal::Type::ArrayOf[String]
197
+
168
198
  # @!attribute risk_rating
169
199
  # The risk rating of the legal entity. One of low, medium, high.
170
200
  #
@@ -195,7 +225,15 @@ module ModernTreasury
195
225
  # @return [String, nil]
196
226
  required :website, String, nil?: true
197
227
 
198
- # @!method initialize(id:, addresses:, bank_settings:, business_name:, citizenship_country:, compliance_details:, created_at:, date_formed:, date_of_birth:, discarded_at:, doing_business_as_names:, email:, first_name:, identifications:, industry_classifications:, last_name:, legal_entity_associations:, legal_entity_type:, legal_structure:, live_mode:, metadata:, middle_name:, object:, phone_numbers:, politically_exposed_person:, preferred_name:, prefix:, risk_rating:, suffix:, updated_at:, wealth_and_employment_details:, website:)
228
+ # @!attribute legal_entity_associations
229
+ # The legal entity associations and its child legal entities.
230
+ #
231
+ # @return [Array<ModernTreasury::Models::LegalEntityAssociation>, nil]
232
+ optional :legal_entity_associations,
233
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation] },
234
+ nil?: true
235
+
236
+ # @!method initialize(id:, addresses:, bank_settings:, business_description:, business_name:, citizenship_country:, compliance_details:, country_of_incorporation:, created_at:, date_formed:, date_of_birth:, discarded_at:, doing_business_as_names:, email:, expected_activity_volume:, first_name:, identifications:, industry_classifications:, intended_use:, last_name:, legal_entity_type:, legal_structure:, live_mode:, metadata:, middle_name:, object:, operating_jurisdictions:, phone_numbers:, politically_exposed_person:, preferred_name:, prefix:, primary_social_media_sites:, risk_rating:, suffix:, updated_at:, wealth_and_employment_details:, website:, legal_entity_associations: nil)
199
237
  # Some parameter documentations has been truncated, see
200
238
  # {ModernTreasury::Models::LegalEntity} for more details.
201
239
  #
@@ -205,12 +243,16 @@ module ModernTreasury
205
243
  #
206
244
  # @param bank_settings [ModernTreasury::Models::LegalEntityBankSettings, nil]
207
245
  #
246
+ # @param business_description [String, nil] A description of the business.
247
+ #
208
248
  # @param business_name [String, nil] The business's legal business name.
209
249
  #
210
250
  # @param citizenship_country [String, nil] The country of citizenship for an individual.
211
251
  #
212
252
  # @param compliance_details [ModernTreasury::Models::LegalEntityComplianceDetail, nil]
213
253
  #
254
+ # @param country_of_incorporation [String, nil] The country code where the business is incorporated in the ISO 3166-1 alpha-2 or
255
+ #
214
256
  # @param created_at [Time]
215
257
  #
216
258
  # @param date_formed [Date, nil] A business's formation date (YYYY-MM-DD).
@@ -223,15 +265,17 @@ module ModernTreasury
223
265
  #
224
266
  # @param email [String, nil] The entity's primary email.
225
267
  #
268
+ # @param expected_activity_volume [Integer, nil] Monthly expected transaction volume in entity's local currency.
269
+ #
226
270
  # @param first_name [String, nil] An individual's first name.
227
271
  #
228
272
  # @param identifications [Array<ModernTreasury::Models::LegalEntity::Identification>] A list of identifications for the legal entity.
229
273
  #
230
274
  # @param industry_classifications [Array<ModernTreasury::Models::LegalEntityIndustryClassification>] A list of industry classifications for the legal entity.
231
275
  #
232
- # @param last_name [String, nil] An individual's last name.
276
+ # @param intended_use [String, nil] A description of the intended use of the legal entity.
233
277
  #
234
- # @param legal_entity_associations [Array<ModernTreasury::Models::LegalEntityAssociation>, nil] The legal entity associations and its child legal entities.
278
+ # @param last_name [String, nil] An individual's last name.
235
279
  #
236
280
  # @param legal_entity_type [Symbol, ModernTreasury::Models::LegalEntity::LegalEntityType] The type of legal entity.
237
281
  #
@@ -245,6 +289,8 @@ module ModernTreasury
245
289
  #
246
290
  # @param object [String]
247
291
  #
292
+ # @param operating_jurisdictions [Array<String>] A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3 c
293
+ #
248
294
  # @param phone_numbers [Array<ModernTreasury::Models::LegalEntity::PhoneNumber>]
249
295
  #
250
296
  # @param politically_exposed_person [Boolean, nil] Whether the individual is a politically exposed person.
@@ -253,6 +299,8 @@ module ModernTreasury
253
299
  #
254
300
  # @param prefix [String, nil] An individual's prefix.
255
301
  #
302
+ # @param primary_social_media_sites [Array<String>] A list of primary social media URLs for the business.
303
+ #
256
304
  # @param risk_rating [Symbol, ModernTreasury::Models::LegalEntity::RiskRating, nil] The risk rating of the legal entity. One of low, medium, high.
257
305
  #
258
306
  # @param suffix [String, nil] An individual's suffix.
@@ -262,6 +310,8 @@ module ModernTreasury
262
310
  # @param wealth_and_employment_details [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
263
311
  #
264
312
  # @param website [String, nil] The entity's primary website URL.
313
+ #
314
+ # @param legal_entity_associations [Array<ModernTreasury::Models::LegalEntityAssociation>, nil] The legal entity associations and its child legal entities.
265
315
 
266
316
  class Address < ModernTreasury::Internal::Type::BaseModel
267
317
  # @!attribute id