modern_treasury 0.1.0.pre.alpha.22 → 0.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -0
- data/README.md +1 -1
- data/lib/modern_treasury/client.rb +0 -12
- data/lib/modern_treasury/internal/transport/base_client.rb +1 -1
- data/lib/modern_treasury/internal/type/base_model.rb +4 -4
- data/lib/modern_treasury/models/accounting.rb +30 -0
- data/lib/modern_treasury/models/address.rb +94 -0
- data/lib/modern_treasury/models/address_request.rb +54 -0
- data/lib/modern_treasury/models/bulk_request_create_params.rb +144 -1505
- data/lib/modern_treasury/models/child_legal_entity_create.rb +275 -0
- data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +10 -627
- data/lib/modern_treasury/models/contact_detail.rb +81 -0
- data/lib/modern_treasury/models/contact_detail_create_request.rb +34 -0
- data/lib/modern_treasury/models/counterparty.rb +24 -177
- data/lib/modern_treasury/models/counterparty_create_params.rb +37 -838
- data/lib/modern_treasury/models/counterparty_list_params.rb +9 -1
- data/lib/modern_treasury/models/document.rb +4 -6
- data/lib/modern_treasury/models/document_create_params.rb +0 -2
- data/lib/modern_treasury/models/document_list_params.rb +4 -6
- data/lib/modern_treasury/models/expected_payment.rb +9 -1
- data/lib/modern_treasury/models/expected_payment_create_params.rb +12 -230
- data/lib/modern_treasury/models/expected_payment_list_params.rb +8 -1
- data/lib/modern_treasury/models/expected_payment_update_params.rb +9 -1
- data/lib/modern_treasury/models/external_account.rb +15 -177
- data/lib/modern_treasury/models/external_account_create_params.rb +18 -210
- data/lib/modern_treasury/models/external_account_list_params.rb +9 -1
- data/lib/modern_treasury/models/external_account_update_params.rb +3 -52
- data/lib/modern_treasury/models/foreign_exchange_quote.rb +3 -73
- data/lib/modern_treasury/models/foreign_exchange_rate.rb +71 -0
- data/lib/modern_treasury/models/identification_create_request.rb +86 -0
- data/lib/modern_treasury/models/internal_account.rb +3 -95
- data/lib/modern_treasury/models/internal_account_update_account_capability_params.rb +34 -0
- data/lib/modern_treasury/models/internal_account_update_account_capability_response.rb +131 -0
- data/lib/modern_treasury/models/invoice.rb +3 -81
- data/lib/modern_treasury/models/invoice_create_params.rb +3 -83
- data/lib/modern_treasury/models/invoice_update_params.rb +3 -83
- data/lib/modern_treasury/models/ledger_account.rb +9 -141
- data/lib/modern_treasury/models/ledger_account_balance_monitor.rb +3 -182
- data/lib/modern_treasury/models/ledger_account_category.rb +3 -175
- data/lib/modern_treasury/models/ledger_account_category_list_params.rb +9 -5
- data/lib/modern_treasury/models/ledger_account_category_retrieve_params.rb +4 -2
- data/lib/modern_treasury/models/ledger_account_create_params.rb +2 -105
- data/lib/modern_treasury/models/ledger_account_create_request.rb +113 -0
- data/lib/modern_treasury/models/ledger_account_statement_create_response.rb +6 -360
- data/lib/modern_treasury/models/ledger_account_statement_retrieve_response.rb +6 -360
- data/lib/modern_treasury/models/ledger_balance.rb +45 -0
- data/lib/modern_treasury/models/ledger_balances.rb +38 -0
- data/lib/modern_treasury/models/ledger_entry.rb +3 -183
- data/lib/modern_treasury/models/ledger_entry_create_request.rb +98 -0
- data/lib/modern_treasury/models/ledger_entry_list_params.rb +48 -8
- data/lib/modern_treasury/models/ledger_transaction.rb +14 -6
- data/lib/modern_treasury/models/ledger_transaction_create_params.rb +2 -212
- data/lib/modern_treasury/models/ledger_transaction_create_request.rb +123 -0
- data/lib/modern_treasury/models/ledger_transaction_create_reversal_params.rb +0 -1
- data/lib/modern_treasury/models/ledger_transaction_list_params.rb +44 -7
- data/lib/modern_treasury/models/ledger_transaction_update_params.rb +5 -104
- data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +15 -193
- data/lib/modern_treasury/models/legal_entity_address_create_request.rb +78 -0
- data/lib/modern_treasury/models/legal_entity_association.rb +1 -0
- data/lib/modern_treasury/models/legal_entity_association_create_params.rb +4 -448
- data/lib/modern_treasury/models/legal_entity_create_params.rb +10 -618
- data/lib/modern_treasury/models/legal_entity_update_params.rb +6 -165
- data/lib/modern_treasury/models/line_item.rb +3 -29
- data/lib/modern_treasury/models/payment_action_list_params.rb +1 -0
- data/lib/modern_treasury/models/payment_order.rb +13 -102
- data/lib/modern_treasury/models/payment_order_create_async_params.rb +24 -477
- data/lib/modern_treasury/models/payment_order_create_params.rb +24 -479
- data/lib/modern_treasury/models/payment_order_update_params.rb +21 -248
- data/lib/modern_treasury/models/payment_orders/reversal_create_params.rb +3 -232
- data/lib/modern_treasury/models/payment_reference.rb +7 -1
- data/lib/modern_treasury/models/return_list_params.rb +5 -6
- data/lib/modern_treasury/models/return_object.rb +7 -3
- data/lib/modern_treasury/models/routing_detail.rb +3 -93
- data/lib/modern_treasury/models/routing_number_lookup_request.rb +3 -55
- data/lib/modern_treasury/models/transaction.rb +5 -73
- data/lib/modern_treasury/models/transactions/transaction_line_item.rb +0 -1
- data/lib/modern_treasury/models/virtual_account_create_params.rb +3 -117
- data/lib/modern_treasury/models.rb +31 -6
- data/lib/modern_treasury/resources/bulk_requests.rb +1 -1
- data/lib/modern_treasury/resources/counterparties.rb +20 -14
- data/lib/modern_treasury/resources/expected_payments.rb +10 -4
- data/lib/modern_treasury/resources/external_accounts.rb +23 -17
- data/lib/modern_treasury/resources/internal_accounts.rb +34 -0
- data/lib/modern_treasury/resources/invoices.rb +2 -2
- data/lib/modern_treasury/resources/ledger_account_categories.rb +1 -1
- data/lib/modern_treasury/resources/ledger_accounts.rb +1 -1
- data/lib/modern_treasury/resources/ledger_entries.rb +1 -1
- data/lib/modern_treasury/resources/ledger_transactions.rb +5 -5
- data/lib/modern_treasury/resources/legal_entities.rb +4 -4
- data/lib/modern_treasury/resources/legal_entity_associations.rb +1 -1
- data/lib/modern_treasury/resources/payment_orders/reversals.rb +1 -1
- data/lib/modern_treasury/resources/payment_orders.rb +5 -5
- data/lib/modern_treasury/resources/returns.rb +1 -1
- data/lib/modern_treasury/resources/virtual_accounts.rb +1 -1
- data/lib/modern_treasury/version.rb +1 -1
- data/lib/modern_treasury.rb +16 -6
- data/rbi/modern_treasury/client.rbi +0 -9
- data/rbi/modern_treasury/internal/transport/base_client.rbi +1 -1
- data/rbi/modern_treasury/models/accounting.rbi +48 -0
- data/rbi/modern_treasury/models/address.rbi +107 -0
- data/rbi/modern_treasury/models/address_request.rbi +76 -0
- data/rbi/modern_treasury/models/bulk_request_create_params.rbi +701 -3140
- data/rbi/modern_treasury/models/child_legal_entity_create.rbi +511 -0
- data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +17 -1314
- data/rbi/modern_treasury/models/contact_detail.rbi +124 -0
- data/rbi/modern_treasury/models/contact_detail_create_request.rbi +99 -0
- data/rbi/modern_treasury/models/counterparty.rbi +24 -264
- data/rbi/modern_treasury/models/counterparty_create_params.rbi +47 -1718
- data/rbi/modern_treasury/models/counterparty_list_params.rbi +11 -0
- data/rbi/modern_treasury/models/document.rbi +6 -16
- data/rbi/modern_treasury/models/document_create_params.rbi +0 -10
- data/rbi/modern_treasury/models/document_list_params.rbi +6 -16
- data/rbi/modern_treasury/models/expected_payment.rbi +8 -0
- data/rbi/modern_treasury/models/expected_payment_create_params.rbi +12 -419
- data/rbi/modern_treasury/models/expected_payment_list_params.rbi +9 -0
- data/rbi/modern_treasury/models/expected_payment_update_params.rbi +8 -0
- data/rbi/modern_treasury/models/external_account.rbi +15 -244
- data/rbi/modern_treasury/models/external_account_create_params.rbi +20 -400
- data/rbi/modern_treasury/models/external_account_list_params.rbi +11 -0
- data/rbi/modern_treasury/models/external_account_update_params.rbi +4 -86
- data/rbi/modern_treasury/models/foreign_exchange_quote.rbi +4 -99
- data/rbi/modern_treasury/models/foreign_exchange_rate.rbi +96 -0
- data/rbi/modern_treasury/models/identification_create_request.rbi +212 -0
- data/rbi/modern_treasury/models/internal_account.rbi +4 -115
- data/rbi/modern_treasury/models/internal_account_update_account_capability_params.rbi +54 -0
- data/rbi/modern_treasury/models/internal_account_update_account_capability_response.rbi +304 -0
- data/rbi/modern_treasury/models/invoice.rbi +3 -128
- data/rbi/modern_treasury/models/invoice_create_params.rbi +4 -139
- data/rbi/modern_treasury/models/invoice_update_params.rbi +4 -139
- data/rbi/modern_treasury/models/ledger_account.rbi +12 -218
- data/rbi/modern_treasury/models/ledger_account_balance_monitor.rbi +4 -303
- data/rbi/modern_treasury/models/ledger_account_category.rbi +4 -301
- data/rbi/modern_treasury/models/ledger_account_category_list_params.rbi +14 -7
- data/rbi/modern_treasury/models/ledger_account_category_retrieve_params.rbi +6 -3
- data/rbi/modern_treasury/models/ledger_account_create_params.rbi +5 -173
- data/rbi/modern_treasury/models/ledger_account_create_request.rbi +194 -0
- data/rbi/modern_treasury/models/ledger_account_statement_create_response.rbi +8 -612
- data/rbi/modern_treasury/models/ledger_account_statement_retrieve_response.rbi +8 -612
- data/rbi/modern_treasury/models/ledger_balance.rbi +66 -0
- data/rbi/modern_treasury/models/ledger_balances.rbi +75 -0
- data/rbi/modern_treasury/models/ledger_entry.rbi +4 -309
- data/rbi/modern_treasury/models/ledger_entry_create_request.rbi +137 -0
- data/rbi/modern_treasury/models/ledger_entry_list_params.rbi +99 -16
- data/rbi/modern_treasury/models/ledger_transaction.rbi +17 -11
- data/rbi/modern_treasury/models/ledger_transaction_create_params.rbi +5 -383
- data/rbi/modern_treasury/models/ledger_transaction_create_request.rbi +258 -0
- data/rbi/modern_treasury/models/ledger_transaction_create_reversal_params.rbi +0 -5
- data/rbi/modern_treasury/models/ledger_transaction_list_params.rbi +93 -18
- data/rbi/modern_treasury/models/ledger_transaction_update_params.rbi +7 -158
- data/rbi/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +18 -316
- data/rbi/modern_treasury/models/legal_entity_address_create_request.rbi +157 -0
- data/rbi/modern_treasury/models/legal_entity_association.rbi +5 -0
- data/rbi/modern_treasury/models/legal_entity_association_create_params.rbi +9 -917
- data/rbi/modern_treasury/models/legal_entity_create_params.rbi +17 -1297
- data/rbi/modern_treasury/models/legal_entity_update_params.rbi +8 -378
- data/rbi/modern_treasury/models/line_item.rbi +4 -52
- data/rbi/modern_treasury/models/payment_action_list_params.rbi +5 -0
- data/rbi/modern_treasury/models/payment_order.rbi +43 -159
- data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +28 -882
- data/rbi/modern_treasury/models/payment_order_create_params.rbi +28 -887
- data/rbi/modern_treasury/models/payment_order_update_params.rbi +24 -460
- data/rbi/modern_treasury/models/payment_orders/reversal_create_params.rbi +4 -415
- data/rbi/modern_treasury/models/payment_reference.rbi +35 -5
- data/rbi/modern_treasury/models/return_list_params.rbi +6 -11
- data/rbi/modern_treasury/models/return_object.rbi +35 -12
- data/rbi/modern_treasury/models/routing_detail.rbi +4 -113
- data/rbi/modern_treasury/models/routing_number_lookup_request.rbi +4 -87
- data/rbi/modern_treasury/models/transaction.rbi +14 -103
- data/rbi/modern_treasury/models/transactions/transaction_line_item.rbi +0 -5
- data/rbi/modern_treasury/models/virtual_account_create_params.rbi +4 -203
- data/rbi/modern_treasury/models.rbi +36 -6
- data/rbi/modern_treasury/resources/bulk_requests.rbi +2 -2
- data/rbi/modern_treasury/resources/counterparties.rbi +20 -12
- data/rbi/modern_treasury/resources/documents.rbi +2 -2
- data/rbi/modern_treasury/resources/expected_payments.rbi +9 -1
- data/rbi/modern_treasury/resources/external_accounts.rbi +29 -22
- data/rbi/modern_treasury/resources/internal_accounts.rbi +24 -0
- data/rbi/modern_treasury/resources/invoices.rbi +2 -8
- data/rbi/modern_treasury/resources/ledger_account_categories.rbi +7 -3
- data/rbi/modern_treasury/resources/ledger_accounts.rbi +1 -1
- data/rbi/modern_treasury/resources/ledger_entries.rbi +9 -2
- data/rbi/modern_treasury/resources/ledger_transactions.rbi +13 -13
- data/rbi/modern_treasury/resources/legal_entities.rbi +4 -8
- data/rbi/modern_treasury/resources/legal_entity_associations.rbi +1 -2
- data/rbi/modern_treasury/resources/payment_orders/reversals.rbi +1 -1
- data/rbi/modern_treasury/resources/payment_orders.rbi +5 -8
- data/rbi/modern_treasury/resources/returns.rbi +2 -2
- data/rbi/modern_treasury/resources/virtual_accounts.rbi +1 -2
- data/sig/modern_treasury/client.rbs +0 -6
- data/sig/modern_treasury/internal/transport/base_client.rbs +1 -1
- data/sig/modern_treasury/models/accounting.rbs +15 -0
- data/sig/modern_treasury/models/address.rbs +70 -0
- data/sig/modern_treasury/models/address_request.rbs +45 -0
- data/sig/modern_treasury/models/bulk_request_create_params.rbs +88 -1089
- data/sig/modern_treasury/models/child_legal_entity_create.rbs +220 -0
- data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +21 -548
- data/sig/modern_treasury/models/contact_detail.rbs +67 -0
- data/sig/modern_treasury/models/contact_detail_create_request.rbs +43 -0
- data/sig/modern_treasury/models/counterparty.rbs +20 -141
- data/sig/modern_treasury/models/counterparty_create_params.rbs +49 -737
- data/sig/modern_treasury/models/counterparty_list_params.rbs +7 -0
- data/sig/modern_treasury/models/document.rbs +0 -4
- data/sig/modern_treasury/models/document_create_params.rbs +0 -4
- data/sig/modern_treasury/models/document_list_params.rbs +0 -4
- data/sig/modern_treasury/models/expected_payment.rbs +5 -0
- data/sig/modern_treasury/models/expected_payment_create_params.rbs +11 -173
- data/sig/modern_treasury/models/expected_payment_list_params.rbs +7 -0
- data/sig/modern_treasury/models/expected_payment_update_params.rbs +5 -0
- data/sig/modern_treasury/models/external_account.rbs +13 -139
- data/sig/modern_treasury/models/external_account_create_params.rbs +23 -189
- data/sig/modern_treasury/models/external_account_list_params.rbs +7 -0
- data/sig/modern_treasury/models/external_account_update_params.rbs +6 -48
- data/sig/modern_treasury/models/foreign_exchange_quote.rbs +4 -51
- data/sig/modern_treasury/models/foreign_exchange_rate.rbs +50 -0
- data/sig/modern_treasury/models/identification_create_request.rbs +93 -0
- data/sig/modern_treasury/models/internal_account.rbs +4 -71
- data/sig/modern_treasury/models/internal_account_update_account_capability_params.rbs +28 -0
- data/sig/modern_treasury/models/internal_account_update_account_capability_response.rbs +137 -0
- data/sig/modern_treasury/models/invoice.rbs +4 -68
- data/sig/modern_treasury/models/invoice_create_params.rbs +6 -70
- data/sig/modern_treasury/models/invoice_update_params.rbs +6 -70
- data/sig/modern_treasury/models/ledger_account.rbs +12 -123
- data/sig/modern_treasury/models/ledger_account_balance_monitor.rbs +4 -142
- data/sig/modern_treasury/models/ledger_account_category.rbs +4 -142
- data/sig/modern_treasury/models/ledger_account_category_list_params.rbs +5 -5
- data/sig/modern_treasury/models/ledger_account_create_params.rbs +4 -84
- data/sig/modern_treasury/models/ledger_account_create_request.rbs +89 -0
- data/sig/modern_treasury/models/ledger_account_statement_create_response.rbs +8 -284
- data/sig/modern_treasury/models/ledger_account_statement_retrieve_response.rbs +8 -284
- data/sig/modern_treasury/models/ledger_balance.rbs +40 -0
- data/sig/modern_treasury/models/ledger_balances.rbs +30 -0
- data/sig/modern_treasury/models/ledger_entry.rbs +4 -142
- data/sig/modern_treasury/models/ledger_entry_create_request.rbs +62 -0
- data/sig/modern_treasury/models/ledger_entry_list_params.rbs +21 -3
- data/sig/modern_treasury/models/ledger_transaction.rbs +5 -2
- data/sig/modern_treasury/models/ledger_transaction_create_params.rbs +4 -165
- data/sig/modern_treasury/models/ledger_transaction_create_request.rbs +109 -0
- data/sig/modern_treasury/models/ledger_transaction_create_reversal_params.rbs +0 -2
- data/sig/modern_treasury/models/ledger_transaction_list_params.rbs +21 -5
- data/sig/modern_treasury/models/ledger_transaction_update_params.rbs +6 -67
- data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +9 -144
- data/sig/modern_treasury/models/legal_entity_address_create_request.rbs +68 -0
- data/sig/modern_treasury/models/legal_entity_association.rbs +3 -1
- data/sig/modern_treasury/models/legal_entity_association_create_params.rbs +9 -380
- data/sig/modern_treasury/models/legal_entity_create_params.rbs +21 -548
- data/sig/modern_treasury/models/legal_entity_update_params.rbs +12 -168
- data/sig/modern_treasury/models/line_item.rbs +4 -16
- data/sig/modern_treasury/models/payment_action_list_params.rbs +2 -1
- data/sig/modern_treasury/models/payment_order.rbs +22 -69
- data/sig/modern_treasury/models/payment_order_create_async_params.rbs +35 -380
- data/sig/modern_treasury/models/payment_order_create_params.rbs +35 -384
- data/sig/modern_treasury/models/payment_order_update_params.rbs +29 -207
- data/sig/modern_treasury/models/payment_orders/reversal_create_params.rbs +6 -173
- data/sig/modern_treasury/models/payment_reference.rbs +14 -2
- data/sig/modern_treasury/models/return_list_params.rbs +1 -6
- data/sig/modern_treasury/models/return_object.rbs +15 -10
- data/sig/modern_treasury/models/routing_detail.rbs +4 -71
- data/sig/modern_treasury/models/routing_number_lookup_request.rbs +6 -48
- data/sig/modern_treasury/models/transaction.rbs +8 -53
- data/sig/modern_treasury/models/transactions/transaction_line_item.rbs +0 -2
- data/sig/modern_treasury/models/virtual_account_create_params.rbs +6 -95
- data/sig/modern_treasury/models.rbs +30 -6
- data/sig/modern_treasury/resources/counterparties.rbs +2 -0
- data/sig/modern_treasury/resources/expected_payments.rbs +4 -1
- data/sig/modern_treasury/resources/external_accounts.rbs +6 -4
- data/sig/modern_treasury/resources/internal_accounts.rbs +7 -0
- data/sig/modern_treasury/resources/invoices.rbs +2 -2
- data/sig/modern_treasury/resources/ledger_account_categories.rbs +1 -1
- data/sig/modern_treasury/resources/ledger_accounts.rbs +1 -1
- data/sig/modern_treasury/resources/ledger_transactions.rbs +4 -4
- data/sig/modern_treasury/resources/legal_entities.rbs +4 -4
- data/sig/modern_treasury/resources/legal_entity_associations.rbs +1 -1
- data/sig/modern_treasury/resources/payment_orders/reversals.rbs +1 -1
- data/sig/modern_treasury/resources/payment_orders.rbs +5 -5
- data/sig/modern_treasury/resources/virtual_accounts.rbs +1 -1
- metadata +52 -22
- data/lib/modern_treasury/models/paper_item.rb +0 -178
- data/lib/modern_treasury/models/paper_item_list_params.rb +0 -56
- data/lib/modern_treasury/models/paper_item_retrieve_params.rb +0 -14
- data/lib/modern_treasury/resources/ledger_event_handlers.rb +0 -14
- data/lib/modern_treasury/resources/ledgerable_events.rb +0 -14
- data/lib/modern_treasury/resources/paper_items.rb +0 -68
- data/rbi/modern_treasury/models/paper_item.rbi +0 -204
- data/rbi/modern_treasury/models/paper_item_list_params.rbi +0 -88
- data/rbi/modern_treasury/models/paper_item_retrieve_params.rbi +0 -32
- data/rbi/modern_treasury/resources/ledger_event_handlers.rbi +0 -12
- data/rbi/modern_treasury/resources/ledgerable_events.rbi +0 -12
- data/rbi/modern_treasury/resources/paper_items.rbi +0 -51
- data/sig/modern_treasury/models/paper_item.rbs +0 -122
- data/sig/modern_treasury/models/paper_item_list_params.rbs +0 -54
- data/sig/modern_treasury/models/paper_item_retrieve_params.rbs +0 -15
- data/sig/modern_treasury/resources/ledger_event_handlers.rbs +0 -7
- data/sig/modern_treasury/resources/ledgerable_events.rbs +0 -7
- data/sig/modern_treasury/resources/paper_items.rbs +0 -21
|
@@ -14,14 +14,11 @@ module ModernTreasury
|
|
|
14
14
|
sig { returns(String) }
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
|
|
17
|
-
sig { returns(T.nilable(ModernTreasury::
|
|
17
|
+
sig { returns(T.nilable(ModernTreasury::Address)) }
|
|
18
18
|
attr_reader :bank_address
|
|
19
19
|
|
|
20
20
|
sig do
|
|
21
|
-
params(
|
|
22
|
-
bank_address:
|
|
23
|
-
T.nilable(ModernTreasury::RoutingDetail::BankAddress::OrHash)
|
|
24
|
-
).void
|
|
21
|
+
params(bank_address: T.nilable(ModernTreasury::Address::OrHash)).void
|
|
25
22
|
end
|
|
26
23
|
attr_writer :bank_address
|
|
27
24
|
|
|
@@ -70,8 +67,7 @@ module ModernTreasury
|
|
|
70
67
|
sig do
|
|
71
68
|
params(
|
|
72
69
|
id: String,
|
|
73
|
-
bank_address:
|
|
74
|
-
T.nilable(ModernTreasury::RoutingDetail::BankAddress::OrHash),
|
|
70
|
+
bank_address: T.nilable(ModernTreasury::Address::OrHash),
|
|
75
71
|
bank_name: String,
|
|
76
72
|
created_at: Time,
|
|
77
73
|
discarded_at: T.nilable(Time),
|
|
@@ -113,7 +109,7 @@ module ModernTreasury
|
|
|
113
109
|
override.returns(
|
|
114
110
|
{
|
|
115
111
|
id: String,
|
|
116
|
-
bank_address: T.nilable(ModernTreasury::
|
|
112
|
+
bank_address: T.nilable(ModernTreasury::Address),
|
|
117
113
|
bank_name: String,
|
|
118
114
|
created_at: Time,
|
|
119
115
|
discarded_at: T.nilable(Time),
|
|
@@ -133,111 +129,6 @@ module ModernTreasury
|
|
|
133
129
|
def to_hash
|
|
134
130
|
end
|
|
135
131
|
|
|
136
|
-
class BankAddress < ModernTreasury::Internal::Type::BaseModel
|
|
137
|
-
OrHash =
|
|
138
|
-
T.type_alias do
|
|
139
|
-
T.any(
|
|
140
|
-
ModernTreasury::RoutingDetail::BankAddress,
|
|
141
|
-
ModernTreasury::Internal::AnyHash
|
|
142
|
-
)
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
sig { returns(String) }
|
|
146
|
-
attr_accessor :id
|
|
147
|
-
|
|
148
|
-
# Country code conforms to [ISO 3166-1 alpha-2]
|
|
149
|
-
sig { returns(T.nilable(String)) }
|
|
150
|
-
attr_accessor :country
|
|
151
|
-
|
|
152
|
-
sig { returns(Time) }
|
|
153
|
-
attr_accessor :created_at
|
|
154
|
-
|
|
155
|
-
sig { returns(T.nilable(String)) }
|
|
156
|
-
attr_accessor :line1
|
|
157
|
-
|
|
158
|
-
sig { returns(T.nilable(String)) }
|
|
159
|
-
attr_accessor :line2
|
|
160
|
-
|
|
161
|
-
# This field will be true if this object exists in the live environment or false
|
|
162
|
-
# if it exists in the test environment.
|
|
163
|
-
sig { returns(T::Boolean) }
|
|
164
|
-
attr_accessor :live_mode
|
|
165
|
-
|
|
166
|
-
# Locality or City.
|
|
167
|
-
sig { returns(T.nilable(String)) }
|
|
168
|
-
attr_accessor :locality
|
|
169
|
-
|
|
170
|
-
sig { returns(String) }
|
|
171
|
-
attr_accessor :object
|
|
172
|
-
|
|
173
|
-
# The postal code of the address.
|
|
174
|
-
sig { returns(T.nilable(String)) }
|
|
175
|
-
attr_accessor :postal_code
|
|
176
|
-
|
|
177
|
-
# Region or State.
|
|
178
|
-
sig { returns(T.nilable(String)) }
|
|
179
|
-
attr_accessor :region
|
|
180
|
-
|
|
181
|
-
sig { returns(Time) }
|
|
182
|
-
attr_accessor :updated_at
|
|
183
|
-
|
|
184
|
-
sig do
|
|
185
|
-
params(
|
|
186
|
-
id: String,
|
|
187
|
-
country: T.nilable(String),
|
|
188
|
-
created_at: Time,
|
|
189
|
-
line1: T.nilable(String),
|
|
190
|
-
line2: T.nilable(String),
|
|
191
|
-
live_mode: T::Boolean,
|
|
192
|
-
locality: T.nilable(String),
|
|
193
|
-
object: String,
|
|
194
|
-
postal_code: T.nilable(String),
|
|
195
|
-
region: T.nilable(String),
|
|
196
|
-
updated_at: Time
|
|
197
|
-
).returns(T.attached_class)
|
|
198
|
-
end
|
|
199
|
-
def self.new(
|
|
200
|
-
id:,
|
|
201
|
-
# Country code conforms to [ISO 3166-1 alpha-2]
|
|
202
|
-
country:,
|
|
203
|
-
created_at:,
|
|
204
|
-
line1:,
|
|
205
|
-
line2:,
|
|
206
|
-
# This field will be true if this object exists in the live environment or false
|
|
207
|
-
# if it exists in the test environment.
|
|
208
|
-
live_mode:,
|
|
209
|
-
# Locality or City.
|
|
210
|
-
locality:,
|
|
211
|
-
object:,
|
|
212
|
-
# The postal code of the address.
|
|
213
|
-
postal_code:,
|
|
214
|
-
# Region or State.
|
|
215
|
-
region:,
|
|
216
|
-
updated_at:
|
|
217
|
-
)
|
|
218
|
-
end
|
|
219
|
-
|
|
220
|
-
sig do
|
|
221
|
-
override.returns(
|
|
222
|
-
{
|
|
223
|
-
id: String,
|
|
224
|
-
country: T.nilable(String),
|
|
225
|
-
created_at: Time,
|
|
226
|
-
line1: T.nilable(String),
|
|
227
|
-
line2: T.nilable(String),
|
|
228
|
-
live_mode: T::Boolean,
|
|
229
|
-
locality: T.nilable(String),
|
|
230
|
-
object: String,
|
|
231
|
-
postal_code: T.nilable(String),
|
|
232
|
-
region: T.nilable(String),
|
|
233
|
-
updated_at: Time
|
|
234
|
-
}
|
|
235
|
-
)
|
|
236
|
-
end
|
|
237
|
-
def to_hash
|
|
238
|
-
end
|
|
239
|
-
end
|
|
240
|
-
|
|
241
132
|
# If the routing detail is to be used for a specific payment type this field will
|
|
242
133
|
# be populated, otherwise null.
|
|
243
134
|
module PaymentType
|
|
@@ -12,19 +12,10 @@ module ModernTreasury
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# The address of the bank.
|
|
15
|
-
sig
|
|
16
|
-
returns(
|
|
17
|
-
T.nilable(ModernTreasury::RoutingNumberLookupRequest::BankAddress)
|
|
18
|
-
)
|
|
19
|
-
end
|
|
15
|
+
sig { returns(T.nilable(ModernTreasury::AddressRequest)) }
|
|
20
16
|
attr_reader :bank_address
|
|
21
17
|
|
|
22
|
-
sig
|
|
23
|
-
params(
|
|
24
|
-
bank_address:
|
|
25
|
-
ModernTreasury::RoutingNumberLookupRequest::BankAddress::OrHash
|
|
26
|
-
).void
|
|
27
|
-
end
|
|
18
|
+
sig { params(bank_address: ModernTreasury::AddressRequest::OrHash).void }
|
|
28
19
|
attr_writer :bank_address
|
|
29
20
|
|
|
30
21
|
# The name of the bank.
|
|
@@ -96,8 +87,7 @@ module ModernTreasury
|
|
|
96
87
|
|
|
97
88
|
sig do
|
|
98
89
|
params(
|
|
99
|
-
bank_address:
|
|
100
|
-
ModernTreasury::RoutingNumberLookupRequest::BankAddress::OrHash,
|
|
90
|
+
bank_address: ModernTreasury::AddressRequest::OrHash,
|
|
101
91
|
bank_name: String,
|
|
102
92
|
routing_number: String,
|
|
103
93
|
routing_number_type:
|
|
@@ -134,8 +124,7 @@ module ModernTreasury
|
|
|
134
124
|
sig do
|
|
135
125
|
override.returns(
|
|
136
126
|
{
|
|
137
|
-
bank_address:
|
|
138
|
-
ModernTreasury::RoutingNumberLookupRequest::BankAddress,
|
|
127
|
+
bank_address: ModernTreasury::AddressRequest,
|
|
139
128
|
bank_name: String,
|
|
140
129
|
routing_number: String,
|
|
141
130
|
routing_number_type:
|
|
@@ -151,78 +140,6 @@ module ModernTreasury
|
|
|
151
140
|
def to_hash
|
|
152
141
|
end
|
|
153
142
|
|
|
154
|
-
class BankAddress < ModernTreasury::Internal::Type::BaseModel
|
|
155
|
-
OrHash =
|
|
156
|
-
T.type_alias do
|
|
157
|
-
T.any(
|
|
158
|
-
ModernTreasury::RoutingNumberLookupRequest::BankAddress,
|
|
159
|
-
ModernTreasury::Internal::AnyHash
|
|
160
|
-
)
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
# Country code conforms to [ISO 3166-1 alpha-2]
|
|
164
|
-
sig { returns(T.nilable(String)) }
|
|
165
|
-
attr_accessor :country
|
|
166
|
-
|
|
167
|
-
sig { returns(T.nilable(String)) }
|
|
168
|
-
attr_accessor :line1
|
|
169
|
-
|
|
170
|
-
sig { returns(T.nilable(String)) }
|
|
171
|
-
attr_accessor :line2
|
|
172
|
-
|
|
173
|
-
# Locality or City.
|
|
174
|
-
sig { returns(T.nilable(String)) }
|
|
175
|
-
attr_accessor :locality
|
|
176
|
-
|
|
177
|
-
# The postal code of the address.
|
|
178
|
-
sig { returns(T.nilable(String)) }
|
|
179
|
-
attr_accessor :postal_code
|
|
180
|
-
|
|
181
|
-
# Region or State.
|
|
182
|
-
sig { returns(T.nilable(String)) }
|
|
183
|
-
attr_accessor :region
|
|
184
|
-
|
|
185
|
-
# The address of the bank.
|
|
186
|
-
sig do
|
|
187
|
-
params(
|
|
188
|
-
country: T.nilable(String),
|
|
189
|
-
line1: T.nilable(String),
|
|
190
|
-
line2: T.nilable(String),
|
|
191
|
-
locality: T.nilable(String),
|
|
192
|
-
postal_code: T.nilable(String),
|
|
193
|
-
region: T.nilable(String)
|
|
194
|
-
).returns(T.attached_class)
|
|
195
|
-
end
|
|
196
|
-
def self.new(
|
|
197
|
-
# Country code conforms to [ISO 3166-1 alpha-2]
|
|
198
|
-
country: nil,
|
|
199
|
-
line1: nil,
|
|
200
|
-
line2: nil,
|
|
201
|
-
# Locality or City.
|
|
202
|
-
locality: nil,
|
|
203
|
-
# The postal code of the address.
|
|
204
|
-
postal_code: nil,
|
|
205
|
-
# Region or State.
|
|
206
|
-
region: nil
|
|
207
|
-
)
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
sig do
|
|
211
|
-
override.returns(
|
|
212
|
-
{
|
|
213
|
-
country: T.nilable(String),
|
|
214
|
-
line1: T.nilable(String),
|
|
215
|
-
line2: T.nilable(String),
|
|
216
|
-
locality: T.nilable(String),
|
|
217
|
-
postal_code: T.nilable(String),
|
|
218
|
-
region: T.nilable(String)
|
|
219
|
-
}
|
|
220
|
-
)
|
|
221
|
-
end
|
|
222
|
-
def to_hash
|
|
223
|
-
end
|
|
224
|
-
end
|
|
225
|
-
|
|
226
143
|
# The type of routing number. See
|
|
227
144
|
# https://docs.moderntreasury.com/platform/reference/routing-detail-object for
|
|
228
145
|
# more details. In sandbox mode we currently only support `aba` and `swift` with
|
|
@@ -50,15 +50,13 @@ module ModernTreasury
|
|
|
50
50
|
attr_accessor :discarded_at
|
|
51
51
|
|
|
52
52
|
# Associated serialized foreign exchange rate information.
|
|
53
|
-
sig
|
|
54
|
-
returns(T.nilable(ModernTreasury::Transaction::ForeignExchangeRate))
|
|
55
|
-
end
|
|
53
|
+
sig { returns(T.nilable(ModernTreasury::ForeignExchangeRate)) }
|
|
56
54
|
attr_reader :foreign_exchange_rate
|
|
57
55
|
|
|
58
56
|
sig do
|
|
59
57
|
params(
|
|
60
58
|
foreign_exchange_rate:
|
|
61
|
-
T.nilable(ModernTreasury::
|
|
59
|
+
T.nilable(ModernTreasury::ForeignExchangeRate::OrHash)
|
|
62
60
|
).void
|
|
63
61
|
end
|
|
64
62
|
attr_writer :foreign_exchange_rate
|
|
@@ -153,7 +151,7 @@ module ModernTreasury
|
|
|
153
151
|
direction: String,
|
|
154
152
|
discarded_at: T.nilable(Time),
|
|
155
153
|
foreign_exchange_rate:
|
|
156
|
-
T.nilable(ModernTreasury::
|
|
154
|
+
T.nilable(ModernTreasury::ForeignExchangeRate::OrHash),
|
|
157
155
|
internal_account_id: String,
|
|
158
156
|
live_mode: T::Boolean,
|
|
159
157
|
metadata: T::Hash[Symbol, String],
|
|
@@ -254,7 +252,7 @@ module ModernTreasury
|
|
|
254
252
|
direction: String,
|
|
255
253
|
discarded_at: T.nilable(Time),
|
|
256
254
|
foreign_exchange_rate:
|
|
257
|
-
T.nilable(ModernTreasury::
|
|
255
|
+
T.nilable(ModernTreasury::ForeignExchangeRate),
|
|
258
256
|
internal_account_id: String,
|
|
259
257
|
live_mode: T::Boolean,
|
|
260
258
|
metadata: T::Hash[Symbol, String],
|
|
@@ -278,98 +276,6 @@ module ModernTreasury
|
|
|
278
276
|
def to_hash
|
|
279
277
|
end
|
|
280
278
|
|
|
281
|
-
class ForeignExchangeRate < ModernTreasury::Internal::Type::BaseModel
|
|
282
|
-
OrHash =
|
|
283
|
-
T.type_alias do
|
|
284
|
-
T.any(
|
|
285
|
-
ModernTreasury::Transaction::ForeignExchangeRate,
|
|
286
|
-
ModernTreasury::Internal::AnyHash
|
|
287
|
-
)
|
|
288
|
-
end
|
|
289
|
-
|
|
290
|
-
# Amount in the lowest denomination of the `base_currency` to convert, often
|
|
291
|
-
# called the "sell" amount.
|
|
292
|
-
sig { returns(Integer) }
|
|
293
|
-
attr_accessor :base_amount
|
|
294
|
-
|
|
295
|
-
# Currency to convert, often called the "sell" currency.
|
|
296
|
-
sig { returns(ModernTreasury::Currency::TaggedSymbol) }
|
|
297
|
-
attr_accessor :base_currency
|
|
298
|
-
|
|
299
|
-
# The exponent component of the rate. The decimal is calculated as `value` / (10 ^
|
|
300
|
-
# `exponent`).
|
|
301
|
-
sig { returns(Integer) }
|
|
302
|
-
attr_accessor :exponent
|
|
303
|
-
|
|
304
|
-
# A string representation of the rate.
|
|
305
|
-
sig { returns(String) }
|
|
306
|
-
attr_accessor :rate_string
|
|
307
|
-
|
|
308
|
-
# Amount in the lowest denomination of the `target_currency`, often called the
|
|
309
|
-
# "buy" amount.
|
|
310
|
-
sig { returns(Integer) }
|
|
311
|
-
attr_accessor :target_amount
|
|
312
|
-
|
|
313
|
-
# Currency to convert the `base_currency` to, often called the "buy" currency.
|
|
314
|
-
sig { returns(ModernTreasury::Currency::TaggedSymbol) }
|
|
315
|
-
attr_accessor :target_currency
|
|
316
|
-
|
|
317
|
-
# The whole number component of the rate. The decimal is calculated as `value` /
|
|
318
|
-
# (10 ^ `exponent`).
|
|
319
|
-
sig { returns(Integer) }
|
|
320
|
-
attr_accessor :value
|
|
321
|
-
|
|
322
|
-
# Associated serialized foreign exchange rate information.
|
|
323
|
-
sig do
|
|
324
|
-
params(
|
|
325
|
-
base_amount: Integer,
|
|
326
|
-
base_currency: ModernTreasury::Currency::OrSymbol,
|
|
327
|
-
exponent: Integer,
|
|
328
|
-
rate_string: String,
|
|
329
|
-
target_amount: Integer,
|
|
330
|
-
target_currency: ModernTreasury::Currency::OrSymbol,
|
|
331
|
-
value: Integer
|
|
332
|
-
).returns(T.attached_class)
|
|
333
|
-
end
|
|
334
|
-
def self.new(
|
|
335
|
-
# Amount in the lowest denomination of the `base_currency` to convert, often
|
|
336
|
-
# called the "sell" amount.
|
|
337
|
-
base_amount:,
|
|
338
|
-
# Currency to convert, often called the "sell" currency.
|
|
339
|
-
base_currency:,
|
|
340
|
-
# The exponent component of the rate. The decimal is calculated as `value` / (10 ^
|
|
341
|
-
# `exponent`).
|
|
342
|
-
exponent:,
|
|
343
|
-
# A string representation of the rate.
|
|
344
|
-
rate_string:,
|
|
345
|
-
# Amount in the lowest denomination of the `target_currency`, often called the
|
|
346
|
-
# "buy" amount.
|
|
347
|
-
target_amount:,
|
|
348
|
-
# Currency to convert the `base_currency` to, often called the "buy" currency.
|
|
349
|
-
target_currency:,
|
|
350
|
-
# The whole number component of the rate. The decimal is calculated as `value` /
|
|
351
|
-
# (10 ^ `exponent`).
|
|
352
|
-
value:
|
|
353
|
-
)
|
|
354
|
-
end
|
|
355
|
-
|
|
356
|
-
sig do
|
|
357
|
-
override.returns(
|
|
358
|
-
{
|
|
359
|
-
base_amount: Integer,
|
|
360
|
-
base_currency: ModernTreasury::Currency::TaggedSymbol,
|
|
361
|
-
exponent: Integer,
|
|
362
|
-
rate_string: String,
|
|
363
|
-
target_amount: Integer,
|
|
364
|
-
target_currency: ModernTreasury::Currency::TaggedSymbol,
|
|
365
|
-
value: Integer
|
|
366
|
-
}
|
|
367
|
-
)
|
|
368
|
-
end
|
|
369
|
-
def to_hash
|
|
370
|
-
end
|
|
371
|
-
end
|
|
372
|
-
|
|
373
279
|
# The type of the transaction. Examples could be
|
|
374
280
|
# `card, `ach`, `wire`, `check`, `rtp`, `book`, or `sen`.
|
|
375
281
|
module Type
|
|
@@ -515,6 +421,11 @@ module ModernTreasury
|
|
|
515
421
|
:evolve,
|
|
516
422
|
ModernTreasury::Transaction::VendorCodeType::TaggedSymbol
|
|
517
423
|
)
|
|
424
|
+
FAKE_VENDOR =
|
|
425
|
+
T.let(
|
|
426
|
+
:fake_vendor,
|
|
427
|
+
ModernTreasury::Transaction::VendorCodeType::TaggedSymbol
|
|
428
|
+
)
|
|
518
429
|
GOLDMAN_SACHS =
|
|
519
430
|
T.let(
|
|
520
431
|
:goldman_sachs,
|
|
@@ -549,11 +460,6 @@ module ModernTreasury
|
|
|
549
460
|
)
|
|
550
461
|
PNC =
|
|
551
462
|
T.let(:pnc, ModernTreasury::Transaction::VendorCodeType::TaggedSymbol)
|
|
552
|
-
RSPEC_VENDOR =
|
|
553
|
-
T.let(
|
|
554
|
-
:rspec_vendor,
|
|
555
|
-
ModernTreasury::Transaction::VendorCodeType::TaggedSymbol
|
|
556
|
-
)
|
|
557
463
|
SIGNET =
|
|
558
464
|
T.let(
|
|
559
465
|
:signet,
|
|
@@ -579,6 +485,11 @@ module ModernTreasury
|
|
|
579
485
|
:user,
|
|
580
486
|
ModernTreasury::Transaction::VendorCodeType::TaggedSymbol
|
|
581
487
|
)
|
|
488
|
+
WESTERN_ALLIANCE =
|
|
489
|
+
T.let(
|
|
490
|
+
:western_alliance,
|
|
491
|
+
ModernTreasury::Transaction::VendorCodeType::TaggedSymbol
|
|
492
|
+
)
|
|
582
493
|
|
|
583
494
|
sig do
|
|
584
495
|
override.returns(
|
|
@@ -206,11 +206,6 @@ module ModernTreasury
|
|
|
206
206
|
:incoming_payment_detail,
|
|
207
207
|
ModernTreasury::Transactions::TransactionLineItem::TransactableType::TaggedSymbol
|
|
208
208
|
)
|
|
209
|
-
PAPER_ITEM =
|
|
210
|
-
T.let(
|
|
211
|
-
:paper_item,
|
|
212
|
-
ModernTreasury::Transactions::TransactionLineItem::TransactableType::TaggedSymbol
|
|
213
|
-
)
|
|
214
209
|
PAYMENT_ORDER =
|
|
215
210
|
T.let(
|
|
216
211
|
:payment_order,
|
|
@@ -77,17 +77,12 @@ module ModernTreasury
|
|
|
77
77
|
# Specifies a ledger account object that will be created with the virtual account.
|
|
78
78
|
# The resulting ledger account is linked to the virtual account for auto-ledgering
|
|
79
79
|
# IPDs.
|
|
80
|
-
sig
|
|
81
|
-
returns(
|
|
82
|
-
T.nilable(ModernTreasury::VirtualAccountCreateParams::LedgerAccount)
|
|
83
|
-
)
|
|
84
|
-
end
|
|
80
|
+
sig { returns(T.nilable(ModernTreasury::LedgerAccountCreateRequest)) }
|
|
85
81
|
attr_reader :ledger_account
|
|
86
82
|
|
|
87
83
|
sig do
|
|
88
84
|
params(
|
|
89
|
-
ledger_account:
|
|
90
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::OrHash
|
|
85
|
+
ledger_account: ModernTreasury::LedgerAccountCreateRequest::OrHash
|
|
91
86
|
).void
|
|
92
87
|
end
|
|
93
88
|
attr_writer :ledger_account
|
|
@@ -132,8 +127,7 @@ module ModernTreasury
|
|
|
132
127
|
credit_ledger_account_id: String,
|
|
133
128
|
debit_ledger_account_id: String,
|
|
134
129
|
description: String,
|
|
135
|
-
ledger_account:
|
|
136
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::OrHash,
|
|
130
|
+
ledger_account: ModernTreasury::LedgerAccountCreateRequest::OrHash,
|
|
137
131
|
metadata: T::Hash[Symbol, String],
|
|
138
132
|
routing_details:
|
|
139
133
|
T::Array[
|
|
@@ -187,8 +181,7 @@ module ModernTreasury
|
|
|
187
181
|
credit_ledger_account_id: String,
|
|
188
182
|
debit_ledger_account_id: String,
|
|
189
183
|
description: String,
|
|
190
|
-
ledger_account:
|
|
191
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount,
|
|
184
|
+
ledger_account: ModernTreasury::LedgerAccountCreateRequest,
|
|
192
185
|
metadata: T::Hash[Symbol, String],
|
|
193
186
|
routing_details:
|
|
194
187
|
T::Array[
|
|
@@ -358,198 +351,6 @@ module ModernTreasury
|
|
|
358
351
|
end
|
|
359
352
|
end
|
|
360
353
|
|
|
361
|
-
class LedgerAccount < ModernTreasury::Internal::Type::BaseModel
|
|
362
|
-
OrHash =
|
|
363
|
-
T.type_alias do
|
|
364
|
-
T.any(
|
|
365
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount,
|
|
366
|
-
ModernTreasury::Internal::AnyHash
|
|
367
|
-
)
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
# The currency of the ledger account.
|
|
371
|
-
sig { returns(String) }
|
|
372
|
-
attr_accessor :currency
|
|
373
|
-
|
|
374
|
-
# The id of the ledger that this account belongs to.
|
|
375
|
-
sig { returns(String) }
|
|
376
|
-
attr_accessor :ledger_id
|
|
377
|
-
|
|
378
|
-
# The name of the ledger account.
|
|
379
|
-
sig { returns(String) }
|
|
380
|
-
attr_accessor :name
|
|
381
|
-
|
|
382
|
-
# The normal balance of the ledger account.
|
|
383
|
-
sig { returns(ModernTreasury::TransactionDirection::OrSymbol) }
|
|
384
|
-
attr_accessor :normal_balance
|
|
385
|
-
|
|
386
|
-
# The currency exponent of the ledger account.
|
|
387
|
-
sig { returns(T.nilable(Integer)) }
|
|
388
|
-
attr_accessor :currency_exponent
|
|
389
|
-
|
|
390
|
-
# The description of the ledger account.
|
|
391
|
-
sig { returns(T.nilable(String)) }
|
|
392
|
-
attr_accessor :description
|
|
393
|
-
|
|
394
|
-
# The array of ledger account category ids that this ledger account should be a
|
|
395
|
-
# child of.
|
|
396
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
397
|
-
attr_reader :ledger_account_category_ids
|
|
398
|
-
|
|
399
|
-
sig { params(ledger_account_category_ids: T::Array[String]).void }
|
|
400
|
-
attr_writer :ledger_account_category_ids
|
|
401
|
-
|
|
402
|
-
# If the ledger account links to another object in Modern Treasury, the id will be
|
|
403
|
-
# populated here, otherwise null.
|
|
404
|
-
sig { returns(T.nilable(String)) }
|
|
405
|
-
attr_reader :ledgerable_id
|
|
406
|
-
|
|
407
|
-
sig { params(ledgerable_id: String).void }
|
|
408
|
-
attr_writer :ledgerable_id
|
|
409
|
-
|
|
410
|
-
# If the ledger account links to another object in Modern Treasury, the type will
|
|
411
|
-
# be populated here, otherwise null. The value is one of internal_account or
|
|
412
|
-
# external_account.
|
|
413
|
-
sig do
|
|
414
|
-
returns(
|
|
415
|
-
T.nilable(
|
|
416
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType::OrSymbol
|
|
417
|
-
)
|
|
418
|
-
)
|
|
419
|
-
end
|
|
420
|
-
attr_reader :ledgerable_type
|
|
421
|
-
|
|
422
|
-
sig do
|
|
423
|
-
params(
|
|
424
|
-
ledgerable_type:
|
|
425
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType::OrSymbol
|
|
426
|
-
).void
|
|
427
|
-
end
|
|
428
|
-
attr_writer :ledgerable_type
|
|
429
|
-
|
|
430
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
431
|
-
# strings.
|
|
432
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
433
|
-
attr_reader :metadata
|
|
434
|
-
|
|
435
|
-
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
436
|
-
attr_writer :metadata
|
|
437
|
-
|
|
438
|
-
# Specifies a ledger account object that will be created with the virtual account.
|
|
439
|
-
# The resulting ledger account is linked to the virtual account for auto-ledgering
|
|
440
|
-
# IPDs.
|
|
441
|
-
sig do
|
|
442
|
-
params(
|
|
443
|
-
currency: String,
|
|
444
|
-
ledger_id: String,
|
|
445
|
-
name: String,
|
|
446
|
-
normal_balance: ModernTreasury::TransactionDirection::OrSymbol,
|
|
447
|
-
currency_exponent: T.nilable(Integer),
|
|
448
|
-
description: T.nilable(String),
|
|
449
|
-
ledger_account_category_ids: T::Array[String],
|
|
450
|
-
ledgerable_id: String,
|
|
451
|
-
ledgerable_type:
|
|
452
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType::OrSymbol,
|
|
453
|
-
metadata: T::Hash[Symbol, String]
|
|
454
|
-
).returns(T.attached_class)
|
|
455
|
-
end
|
|
456
|
-
def self.new(
|
|
457
|
-
# The currency of the ledger account.
|
|
458
|
-
currency:,
|
|
459
|
-
# The id of the ledger that this account belongs to.
|
|
460
|
-
ledger_id:,
|
|
461
|
-
# The name of the ledger account.
|
|
462
|
-
name:,
|
|
463
|
-
# The normal balance of the ledger account.
|
|
464
|
-
normal_balance:,
|
|
465
|
-
# The currency exponent of the ledger account.
|
|
466
|
-
currency_exponent: nil,
|
|
467
|
-
# The description of the ledger account.
|
|
468
|
-
description: nil,
|
|
469
|
-
# The array of ledger account category ids that this ledger account should be a
|
|
470
|
-
# child of.
|
|
471
|
-
ledger_account_category_ids: nil,
|
|
472
|
-
# If the ledger account links to another object in Modern Treasury, the id will be
|
|
473
|
-
# populated here, otherwise null.
|
|
474
|
-
ledgerable_id: nil,
|
|
475
|
-
# If the ledger account links to another object in Modern Treasury, the type will
|
|
476
|
-
# be populated here, otherwise null. The value is one of internal_account or
|
|
477
|
-
# external_account.
|
|
478
|
-
ledgerable_type: nil,
|
|
479
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
480
|
-
# strings.
|
|
481
|
-
metadata: nil
|
|
482
|
-
)
|
|
483
|
-
end
|
|
484
|
-
|
|
485
|
-
sig do
|
|
486
|
-
override.returns(
|
|
487
|
-
{
|
|
488
|
-
currency: String,
|
|
489
|
-
ledger_id: String,
|
|
490
|
-
name: String,
|
|
491
|
-
normal_balance: ModernTreasury::TransactionDirection::OrSymbol,
|
|
492
|
-
currency_exponent: T.nilable(Integer),
|
|
493
|
-
description: T.nilable(String),
|
|
494
|
-
ledger_account_category_ids: T::Array[String],
|
|
495
|
-
ledgerable_id: String,
|
|
496
|
-
ledgerable_type:
|
|
497
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType::OrSymbol,
|
|
498
|
-
metadata: T::Hash[Symbol, String]
|
|
499
|
-
}
|
|
500
|
-
)
|
|
501
|
-
end
|
|
502
|
-
def to_hash
|
|
503
|
-
end
|
|
504
|
-
|
|
505
|
-
# If the ledger account links to another object in Modern Treasury, the type will
|
|
506
|
-
# be populated here, otherwise null. The value is one of internal_account or
|
|
507
|
-
# external_account.
|
|
508
|
-
module LedgerableType
|
|
509
|
-
extend ModernTreasury::Internal::Type::Enum
|
|
510
|
-
|
|
511
|
-
TaggedSymbol =
|
|
512
|
-
T.type_alias do
|
|
513
|
-
T.all(
|
|
514
|
-
Symbol,
|
|
515
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType
|
|
516
|
-
)
|
|
517
|
-
end
|
|
518
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
519
|
-
|
|
520
|
-
COUNTERPARTY =
|
|
521
|
-
T.let(
|
|
522
|
-
:counterparty,
|
|
523
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType::TaggedSymbol
|
|
524
|
-
)
|
|
525
|
-
EXTERNAL_ACCOUNT =
|
|
526
|
-
T.let(
|
|
527
|
-
:external_account,
|
|
528
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType::TaggedSymbol
|
|
529
|
-
)
|
|
530
|
-
INTERNAL_ACCOUNT =
|
|
531
|
-
T.let(
|
|
532
|
-
:internal_account,
|
|
533
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType::TaggedSymbol
|
|
534
|
-
)
|
|
535
|
-
VIRTUAL_ACCOUNT =
|
|
536
|
-
T.let(
|
|
537
|
-
:virtual_account,
|
|
538
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType::TaggedSymbol
|
|
539
|
-
)
|
|
540
|
-
|
|
541
|
-
sig do
|
|
542
|
-
override.returns(
|
|
543
|
-
T::Array[
|
|
544
|
-
ModernTreasury::VirtualAccountCreateParams::LedgerAccount::LedgerableType::TaggedSymbol
|
|
545
|
-
]
|
|
546
|
-
)
|
|
547
|
-
end
|
|
548
|
-
def self.values
|
|
549
|
-
end
|
|
550
|
-
end
|
|
551
|
-
end
|
|
552
|
-
|
|
553
354
|
class RoutingDetail < ModernTreasury::Internal::Type::BaseModel
|
|
554
355
|
OrHash =
|
|
555
356
|
T.type_alias do
|