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
|
@@ -38,17 +38,10 @@ module ModernTreasury
|
|
|
38
38
|
sig { returns(ModernTreasury::PaymentOrderType::OrSymbol) }
|
|
39
39
|
attr_accessor :type
|
|
40
40
|
|
|
41
|
-
sig
|
|
42
|
-
returns(T.nilable(ModernTreasury::PaymentOrderCreateParams::Accounting))
|
|
43
|
-
end
|
|
41
|
+
sig { returns(T.nilable(ModernTreasury::Accounting)) }
|
|
44
42
|
attr_reader :accounting
|
|
45
43
|
|
|
46
|
-
sig
|
|
47
|
-
params(
|
|
48
|
-
accounting:
|
|
49
|
-
ModernTreasury::PaymentOrderCreateParams::Accounting::OrHash
|
|
50
|
-
).void
|
|
51
|
-
end
|
|
44
|
+
sig { params(accounting: ModernTreasury::Accounting::OrHash).void }
|
|
52
45
|
attr_writer :accounting
|
|
53
46
|
|
|
54
47
|
# The ID of one of your accounting categories. Note that these will only be
|
|
@@ -157,17 +150,13 @@ module ModernTreasury
|
|
|
157
150
|
# order. If the ledger transaction cannot be created, then the payment order
|
|
158
151
|
# creation will fail. The resulting ledger transaction will mirror the status of
|
|
159
152
|
# the payment order.
|
|
160
|
-
sig
|
|
161
|
-
returns(
|
|
162
|
-
T.nilable(ModernTreasury::PaymentOrderCreateParams::LedgerTransaction)
|
|
163
|
-
)
|
|
164
|
-
end
|
|
153
|
+
sig { returns(T.nilable(ModernTreasury::LedgerTransactionCreateRequest)) }
|
|
165
154
|
attr_reader :ledger_transaction
|
|
166
155
|
|
|
167
156
|
sig do
|
|
168
157
|
params(
|
|
169
158
|
ledger_transaction:
|
|
170
|
-
ModernTreasury::
|
|
159
|
+
ModernTreasury::LedgerTransactionCreateRequest::OrHash
|
|
171
160
|
).void
|
|
172
161
|
end
|
|
173
162
|
attr_writer :ledger_transaction
|
|
@@ -341,8 +330,7 @@ module ModernTreasury
|
|
|
341
330
|
ModernTreasury::PaymentOrderCreateParams::Direction::OrSymbol,
|
|
342
331
|
originating_account_id: String,
|
|
343
332
|
type: ModernTreasury::PaymentOrderType::OrSymbol,
|
|
344
|
-
accounting:
|
|
345
|
-
ModernTreasury::PaymentOrderCreateParams::Accounting::OrHash,
|
|
333
|
+
accounting: ModernTreasury::Accounting::OrHash,
|
|
346
334
|
accounting_category_id: T.nilable(String),
|
|
347
335
|
accounting_ledger_class_id: T.nilable(String),
|
|
348
336
|
charge_bearer:
|
|
@@ -365,7 +353,7 @@ module ModernTreasury
|
|
|
365
353
|
ModernTreasury::PaymentOrderCreateParams::ForeignExchangeIndicator::OrSymbol
|
|
366
354
|
),
|
|
367
355
|
ledger_transaction:
|
|
368
|
-
ModernTreasury::
|
|
356
|
+
ModernTreasury::LedgerTransactionCreateRequest::OrHash,
|
|
369
357
|
ledger_transaction_id: String,
|
|
370
358
|
line_items:
|
|
371
359
|
T::Array[
|
|
@@ -530,7 +518,7 @@ module ModernTreasury
|
|
|
530
518
|
ModernTreasury::PaymentOrderCreateParams::Direction::OrSymbol,
|
|
531
519
|
originating_account_id: String,
|
|
532
520
|
type: ModernTreasury::PaymentOrderType::OrSymbol,
|
|
533
|
-
accounting: ModernTreasury::
|
|
521
|
+
accounting: ModernTreasury::Accounting,
|
|
534
522
|
accounting_category_id: T.nilable(String),
|
|
535
523
|
accounting_ledger_class_id: T.nilable(String),
|
|
536
524
|
charge_bearer:
|
|
@@ -550,8 +538,7 @@ module ModernTreasury
|
|
|
550
538
|
T.nilable(
|
|
551
539
|
ModernTreasury::PaymentOrderCreateParams::ForeignExchangeIndicator::OrSymbol
|
|
552
540
|
),
|
|
553
|
-
ledger_transaction:
|
|
554
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction,
|
|
541
|
+
ledger_transaction: ModernTreasury::LedgerTransactionCreateRequest,
|
|
555
542
|
ledger_transaction_id: String,
|
|
556
543
|
line_items:
|
|
557
544
|
T::Array[ModernTreasury::PaymentOrderCreateParams::LineItem],
|
|
@@ -616,52 +603,6 @@ module ModernTreasury
|
|
|
616
603
|
end
|
|
617
604
|
end
|
|
618
605
|
|
|
619
|
-
class Accounting < ModernTreasury::Internal::Type::BaseModel
|
|
620
|
-
OrHash =
|
|
621
|
-
T.type_alias do
|
|
622
|
-
T.any(
|
|
623
|
-
ModernTreasury::PaymentOrderCreateParams::Accounting,
|
|
624
|
-
ModernTreasury::Internal::AnyHash
|
|
625
|
-
)
|
|
626
|
-
end
|
|
627
|
-
|
|
628
|
-
# The ID of one of your accounting categories. Note that these will only be
|
|
629
|
-
# accessible if your accounting system has been connected.
|
|
630
|
-
sig { returns(T.nilable(String)) }
|
|
631
|
-
attr_accessor :account_id
|
|
632
|
-
|
|
633
|
-
# The ID of one of the class objects in your accounting system. Class objects
|
|
634
|
-
# track segments of your business independent of client or project. Note that
|
|
635
|
-
# these will only be accessible if your accounting system has been connected.
|
|
636
|
-
sig { returns(T.nilable(String)) }
|
|
637
|
-
attr_accessor :class_id
|
|
638
|
-
|
|
639
|
-
sig do
|
|
640
|
-
params(
|
|
641
|
-
account_id: T.nilable(String),
|
|
642
|
-
class_id: T.nilable(String)
|
|
643
|
-
).returns(T.attached_class)
|
|
644
|
-
end
|
|
645
|
-
def self.new(
|
|
646
|
-
# The ID of one of your accounting categories. Note that these will only be
|
|
647
|
-
# accessible if your accounting system has been connected.
|
|
648
|
-
account_id: nil,
|
|
649
|
-
# The ID of one of the class objects in your accounting system. Class objects
|
|
650
|
-
# track segments of your business independent of client or project. Note that
|
|
651
|
-
# these will only be accessible if your accounting system has been connected.
|
|
652
|
-
class_id: nil
|
|
653
|
-
)
|
|
654
|
-
end
|
|
655
|
-
|
|
656
|
-
sig do
|
|
657
|
-
override.returns(
|
|
658
|
-
{ account_id: T.nilable(String), class_id: T.nilable(String) }
|
|
659
|
-
)
|
|
660
|
-
end
|
|
661
|
-
def to_hash
|
|
662
|
-
end
|
|
663
|
-
end
|
|
664
|
-
|
|
665
606
|
# The party that will pay the fees for the payment order. See
|
|
666
607
|
# https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
|
|
667
608
|
# differences between the options.
|
|
@@ -814,11 +755,6 @@ module ModernTreasury
|
|
|
814
755
|
:organizations,
|
|
815
756
|
ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::TaggedSymbol
|
|
816
757
|
)
|
|
817
|
-
PAPER_ITEMS =
|
|
818
|
-
T.let(
|
|
819
|
-
:paper_items,
|
|
820
|
-
ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::TaggedSymbol
|
|
821
|
-
)
|
|
822
758
|
PAYMENT_ORDERS =
|
|
823
759
|
T.let(
|
|
824
760
|
:payment_orders,
|
|
@@ -834,11 +770,6 @@ module ModernTreasury
|
|
|
834
770
|
:connections,
|
|
835
771
|
ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::TaggedSymbol
|
|
836
772
|
)
|
|
837
|
-
CONVERSATIONS =
|
|
838
|
-
T.let(
|
|
839
|
-
:conversations,
|
|
840
|
-
ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::TaggedSymbol
|
|
841
|
-
)
|
|
842
773
|
|
|
843
774
|
sig do
|
|
844
775
|
override.returns(
|
|
@@ -921,414 +852,6 @@ module ModernTreasury
|
|
|
921
852
|
end
|
|
922
853
|
end
|
|
923
854
|
|
|
924
|
-
class LedgerTransaction < ModernTreasury::Internal::Type::BaseModel
|
|
925
|
-
OrHash =
|
|
926
|
-
T.type_alias do
|
|
927
|
-
T.any(
|
|
928
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction,
|
|
929
|
-
ModernTreasury::Internal::AnyHash
|
|
930
|
-
)
|
|
931
|
-
end
|
|
932
|
-
|
|
933
|
-
# An array of ledger entry objects.
|
|
934
|
-
sig do
|
|
935
|
-
returns(
|
|
936
|
-
T::Array[
|
|
937
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerEntry
|
|
938
|
-
]
|
|
939
|
-
)
|
|
940
|
-
end
|
|
941
|
-
attr_accessor :ledger_entries
|
|
942
|
-
|
|
943
|
-
# An optional description for internal use.
|
|
944
|
-
sig { returns(T.nilable(String)) }
|
|
945
|
-
attr_accessor :description
|
|
946
|
-
|
|
947
|
-
# The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
948
|
-
# reporting purposes.
|
|
949
|
-
sig { returns(T.nilable(Time)) }
|
|
950
|
-
attr_reader :effective_at
|
|
951
|
-
|
|
952
|
-
sig { params(effective_at: Time).void }
|
|
953
|
-
attr_writer :effective_at
|
|
954
|
-
|
|
955
|
-
# The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
|
|
956
|
-
# purposes.
|
|
957
|
-
sig { returns(T.nilable(Date)) }
|
|
958
|
-
attr_reader :effective_date
|
|
959
|
-
|
|
960
|
-
sig { params(effective_date: Date).void }
|
|
961
|
-
attr_writer :effective_date
|
|
962
|
-
|
|
963
|
-
# A unique string to represent the ledger transaction. Only one pending or posted
|
|
964
|
-
# ledger transaction may have this ID in the ledger.
|
|
965
|
-
sig { returns(T.nilable(String)) }
|
|
966
|
-
attr_reader :external_id
|
|
967
|
-
|
|
968
|
-
sig { params(external_id: String).void }
|
|
969
|
-
attr_writer :external_id
|
|
970
|
-
|
|
971
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
972
|
-
# Treasury, the id will be populated here, otherwise null.
|
|
973
|
-
sig { returns(T.nilable(String)) }
|
|
974
|
-
attr_reader :ledgerable_id
|
|
975
|
-
|
|
976
|
-
sig { params(ledgerable_id: String).void }
|
|
977
|
-
attr_writer :ledgerable_id
|
|
978
|
-
|
|
979
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
980
|
-
# Treasury, the type will be populated here, otherwise null. This can be one of
|
|
981
|
-
# payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
|
|
982
|
-
# reversal.
|
|
983
|
-
sig do
|
|
984
|
-
returns(
|
|
985
|
-
T.nilable(
|
|
986
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::OrSymbol
|
|
987
|
-
)
|
|
988
|
-
)
|
|
989
|
-
end
|
|
990
|
-
attr_reader :ledgerable_type
|
|
991
|
-
|
|
992
|
-
sig do
|
|
993
|
-
params(
|
|
994
|
-
ledgerable_type:
|
|
995
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::OrSymbol
|
|
996
|
-
).void
|
|
997
|
-
end
|
|
998
|
-
attr_writer :ledgerable_type
|
|
999
|
-
|
|
1000
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
1001
|
-
# strings.
|
|
1002
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
1003
|
-
attr_reader :metadata
|
|
1004
|
-
|
|
1005
|
-
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
1006
|
-
attr_writer :metadata
|
|
1007
|
-
|
|
1008
|
-
# To post a ledger transaction at creation, use `posted`.
|
|
1009
|
-
sig do
|
|
1010
|
-
returns(
|
|
1011
|
-
T.nilable(
|
|
1012
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::Status::OrSymbol
|
|
1013
|
-
)
|
|
1014
|
-
)
|
|
1015
|
-
end
|
|
1016
|
-
attr_reader :status
|
|
1017
|
-
|
|
1018
|
-
sig do
|
|
1019
|
-
params(
|
|
1020
|
-
status:
|
|
1021
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::Status::OrSymbol
|
|
1022
|
-
).void
|
|
1023
|
-
end
|
|
1024
|
-
attr_writer :status
|
|
1025
|
-
|
|
1026
|
-
# Specifies a ledger transaction object that will be created with the payment
|
|
1027
|
-
# order. If the ledger transaction cannot be created, then the payment order
|
|
1028
|
-
# creation will fail. The resulting ledger transaction will mirror the status of
|
|
1029
|
-
# the payment order.
|
|
1030
|
-
sig do
|
|
1031
|
-
params(
|
|
1032
|
-
ledger_entries:
|
|
1033
|
-
T::Array[
|
|
1034
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerEntry::OrHash
|
|
1035
|
-
],
|
|
1036
|
-
description: T.nilable(String),
|
|
1037
|
-
effective_at: Time,
|
|
1038
|
-
effective_date: Date,
|
|
1039
|
-
external_id: String,
|
|
1040
|
-
ledgerable_id: String,
|
|
1041
|
-
ledgerable_type:
|
|
1042
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::OrSymbol,
|
|
1043
|
-
metadata: T::Hash[Symbol, String],
|
|
1044
|
-
status:
|
|
1045
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::Status::OrSymbol
|
|
1046
|
-
).returns(T.attached_class)
|
|
1047
|
-
end
|
|
1048
|
-
def self.new(
|
|
1049
|
-
# An array of ledger entry objects.
|
|
1050
|
-
ledger_entries:,
|
|
1051
|
-
# An optional description for internal use.
|
|
1052
|
-
description: nil,
|
|
1053
|
-
# The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
1054
|
-
# reporting purposes.
|
|
1055
|
-
effective_at: nil,
|
|
1056
|
-
# The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
|
|
1057
|
-
# purposes.
|
|
1058
|
-
effective_date: nil,
|
|
1059
|
-
# A unique string to represent the ledger transaction. Only one pending or posted
|
|
1060
|
-
# ledger transaction may have this ID in the ledger.
|
|
1061
|
-
external_id: nil,
|
|
1062
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
1063
|
-
# Treasury, the id will be populated here, otherwise null.
|
|
1064
|
-
ledgerable_id: nil,
|
|
1065
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
1066
|
-
# Treasury, the type will be populated here, otherwise null. This can be one of
|
|
1067
|
-
# payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
|
|
1068
|
-
# reversal.
|
|
1069
|
-
ledgerable_type: nil,
|
|
1070
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
1071
|
-
# strings.
|
|
1072
|
-
metadata: nil,
|
|
1073
|
-
# To post a ledger transaction at creation, use `posted`.
|
|
1074
|
-
status: nil
|
|
1075
|
-
)
|
|
1076
|
-
end
|
|
1077
|
-
|
|
1078
|
-
sig do
|
|
1079
|
-
override.returns(
|
|
1080
|
-
{
|
|
1081
|
-
ledger_entries:
|
|
1082
|
-
T::Array[
|
|
1083
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerEntry
|
|
1084
|
-
],
|
|
1085
|
-
description: T.nilable(String),
|
|
1086
|
-
effective_at: Time,
|
|
1087
|
-
effective_date: Date,
|
|
1088
|
-
external_id: String,
|
|
1089
|
-
ledgerable_id: String,
|
|
1090
|
-
ledgerable_type:
|
|
1091
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::OrSymbol,
|
|
1092
|
-
metadata: T::Hash[Symbol, String],
|
|
1093
|
-
status:
|
|
1094
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::Status::OrSymbol
|
|
1095
|
-
}
|
|
1096
|
-
)
|
|
1097
|
-
end
|
|
1098
|
-
def to_hash
|
|
1099
|
-
end
|
|
1100
|
-
|
|
1101
|
-
class LedgerEntry < ModernTreasury::Internal::Type::BaseModel
|
|
1102
|
-
OrHash =
|
|
1103
|
-
T.type_alias do
|
|
1104
|
-
T.any(
|
|
1105
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerEntry,
|
|
1106
|
-
ModernTreasury::Internal::AnyHash
|
|
1107
|
-
)
|
|
1108
|
-
end
|
|
1109
|
-
|
|
1110
|
-
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
1111
|
-
# as 1000. Can be any integer up to 36 digits.
|
|
1112
|
-
sig { returns(Integer) }
|
|
1113
|
-
attr_accessor :amount
|
|
1114
|
-
|
|
1115
|
-
# One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
1116
|
-
# transaction. A `credit` moves money from your account to someone else's. A
|
|
1117
|
-
# `debit` pulls money from someone else's account to your own. Note that wire,
|
|
1118
|
-
# rtp, and check payments will always be `credit`.
|
|
1119
|
-
sig { returns(ModernTreasury::TransactionDirection::OrSymbol) }
|
|
1120
|
-
attr_accessor :direction
|
|
1121
|
-
|
|
1122
|
-
# The ledger account that this ledger entry is associated with.
|
|
1123
|
-
sig { returns(String) }
|
|
1124
|
-
attr_accessor :ledger_account_id
|
|
1125
|
-
|
|
1126
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
1127
|
-
# account’s available balance. If any of these conditions would be false after the
|
|
1128
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
1129
|
-
sig { returns(T.nilable(T::Hash[Symbol, Integer])) }
|
|
1130
|
-
attr_accessor :available_balance_amount
|
|
1131
|
-
|
|
1132
|
-
# Lock version of the ledger account. This can be passed when creating a ledger
|
|
1133
|
-
# transaction to only succeed if no ledger transactions have posted since the
|
|
1134
|
-
# given version. See our post about Designing the Ledgers API with Optimistic
|
|
1135
|
-
# Locking for more details.
|
|
1136
|
-
sig { returns(T.nilable(Integer)) }
|
|
1137
|
-
attr_accessor :lock_version
|
|
1138
|
-
|
|
1139
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
1140
|
-
# strings.
|
|
1141
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
1142
|
-
attr_reader :metadata
|
|
1143
|
-
|
|
1144
|
-
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
1145
|
-
attr_writer :metadata
|
|
1146
|
-
|
|
1147
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
1148
|
-
# account’s pending balance. If any of these conditions would be false after the
|
|
1149
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
1150
|
-
sig { returns(T.nilable(T::Hash[Symbol, Integer])) }
|
|
1151
|
-
attr_accessor :pending_balance_amount
|
|
1152
|
-
|
|
1153
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
1154
|
-
# account’s posted balance. If any of these conditions would be false after the
|
|
1155
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
1156
|
-
sig { returns(T.nilable(T::Hash[Symbol, Integer])) }
|
|
1157
|
-
attr_accessor :posted_balance_amount
|
|
1158
|
-
|
|
1159
|
-
# If true, response will include the balance of the associated ledger account for
|
|
1160
|
-
# the entry.
|
|
1161
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
1162
|
-
attr_accessor :show_resulting_ledger_account_balances
|
|
1163
|
-
|
|
1164
|
-
sig do
|
|
1165
|
-
params(
|
|
1166
|
-
amount: Integer,
|
|
1167
|
-
direction: ModernTreasury::TransactionDirection::OrSymbol,
|
|
1168
|
-
ledger_account_id: String,
|
|
1169
|
-
available_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1170
|
-
lock_version: T.nilable(Integer),
|
|
1171
|
-
metadata: T::Hash[Symbol, String],
|
|
1172
|
-
pending_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1173
|
-
posted_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1174
|
-
show_resulting_ledger_account_balances: T.nilable(T::Boolean)
|
|
1175
|
-
).returns(T.attached_class)
|
|
1176
|
-
end
|
|
1177
|
-
def self.new(
|
|
1178
|
-
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
1179
|
-
# as 1000. Can be any integer up to 36 digits.
|
|
1180
|
-
amount:,
|
|
1181
|
-
# One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
1182
|
-
# transaction. A `credit` moves money from your account to someone else's. A
|
|
1183
|
-
# `debit` pulls money from someone else's account to your own. Note that wire,
|
|
1184
|
-
# rtp, and check payments will always be `credit`.
|
|
1185
|
-
direction:,
|
|
1186
|
-
# The ledger account that this ledger entry is associated with.
|
|
1187
|
-
ledger_account_id:,
|
|
1188
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
1189
|
-
# account’s available balance. If any of these conditions would be false after the
|
|
1190
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
1191
|
-
available_balance_amount: nil,
|
|
1192
|
-
# Lock version of the ledger account. This can be passed when creating a ledger
|
|
1193
|
-
# transaction to only succeed if no ledger transactions have posted since the
|
|
1194
|
-
# given version. See our post about Designing the Ledgers API with Optimistic
|
|
1195
|
-
# Locking for more details.
|
|
1196
|
-
lock_version: nil,
|
|
1197
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
1198
|
-
# strings.
|
|
1199
|
-
metadata: nil,
|
|
1200
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
1201
|
-
# account’s pending balance. If any of these conditions would be false after the
|
|
1202
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
1203
|
-
pending_balance_amount: nil,
|
|
1204
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
1205
|
-
# account’s posted balance. If any of these conditions would be false after the
|
|
1206
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
1207
|
-
posted_balance_amount: nil,
|
|
1208
|
-
# If true, response will include the balance of the associated ledger account for
|
|
1209
|
-
# the entry.
|
|
1210
|
-
show_resulting_ledger_account_balances: nil
|
|
1211
|
-
)
|
|
1212
|
-
end
|
|
1213
|
-
|
|
1214
|
-
sig do
|
|
1215
|
-
override.returns(
|
|
1216
|
-
{
|
|
1217
|
-
amount: Integer,
|
|
1218
|
-
direction: ModernTreasury::TransactionDirection::OrSymbol,
|
|
1219
|
-
ledger_account_id: String,
|
|
1220
|
-
available_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1221
|
-
lock_version: T.nilable(Integer),
|
|
1222
|
-
metadata: T::Hash[Symbol, String],
|
|
1223
|
-
pending_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1224
|
-
posted_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1225
|
-
show_resulting_ledger_account_balances: T.nilable(T::Boolean)
|
|
1226
|
-
}
|
|
1227
|
-
)
|
|
1228
|
-
end
|
|
1229
|
-
def to_hash
|
|
1230
|
-
end
|
|
1231
|
-
end
|
|
1232
|
-
|
|
1233
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
1234
|
-
# Treasury, the type will be populated here, otherwise null. This can be one of
|
|
1235
|
-
# payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
|
|
1236
|
-
# reversal.
|
|
1237
|
-
module LedgerableType
|
|
1238
|
-
extend ModernTreasury::Internal::Type::Enum
|
|
1239
|
-
|
|
1240
|
-
TaggedSymbol =
|
|
1241
|
-
T.type_alias do
|
|
1242
|
-
T.all(
|
|
1243
|
-
Symbol,
|
|
1244
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType
|
|
1245
|
-
)
|
|
1246
|
-
end
|
|
1247
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1248
|
-
|
|
1249
|
-
EXPECTED_PAYMENT =
|
|
1250
|
-
T.let(
|
|
1251
|
-
:expected_payment,
|
|
1252
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1253
|
-
)
|
|
1254
|
-
INCOMING_PAYMENT_DETAIL =
|
|
1255
|
-
T.let(
|
|
1256
|
-
:incoming_payment_detail,
|
|
1257
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1258
|
-
)
|
|
1259
|
-
PAPER_ITEM =
|
|
1260
|
-
T.let(
|
|
1261
|
-
:paper_item,
|
|
1262
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1263
|
-
)
|
|
1264
|
-
PAYMENT_ORDER =
|
|
1265
|
-
T.let(
|
|
1266
|
-
:payment_order,
|
|
1267
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1268
|
-
)
|
|
1269
|
-
RETURN =
|
|
1270
|
-
T.let(
|
|
1271
|
-
:return,
|
|
1272
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1273
|
-
)
|
|
1274
|
-
REVERSAL =
|
|
1275
|
-
T.let(
|
|
1276
|
-
:reversal,
|
|
1277
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1278
|
-
)
|
|
1279
|
-
|
|
1280
|
-
sig do
|
|
1281
|
-
override.returns(
|
|
1282
|
-
T::Array[
|
|
1283
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1284
|
-
]
|
|
1285
|
-
)
|
|
1286
|
-
end
|
|
1287
|
-
def self.values
|
|
1288
|
-
end
|
|
1289
|
-
end
|
|
1290
|
-
|
|
1291
|
-
# To post a ledger transaction at creation, use `posted`.
|
|
1292
|
-
module Status
|
|
1293
|
-
extend ModernTreasury::Internal::Type::Enum
|
|
1294
|
-
|
|
1295
|
-
TaggedSymbol =
|
|
1296
|
-
T.type_alias do
|
|
1297
|
-
T.all(
|
|
1298
|
-
Symbol,
|
|
1299
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::Status
|
|
1300
|
-
)
|
|
1301
|
-
end
|
|
1302
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1303
|
-
|
|
1304
|
-
ARCHIVED =
|
|
1305
|
-
T.let(
|
|
1306
|
-
:archived,
|
|
1307
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::Status::TaggedSymbol
|
|
1308
|
-
)
|
|
1309
|
-
PENDING =
|
|
1310
|
-
T.let(
|
|
1311
|
-
:pending,
|
|
1312
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::Status::TaggedSymbol
|
|
1313
|
-
)
|
|
1314
|
-
POSTED =
|
|
1315
|
-
T.let(
|
|
1316
|
-
:posted,
|
|
1317
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::Status::TaggedSymbol
|
|
1318
|
-
)
|
|
1319
|
-
|
|
1320
|
-
sig do
|
|
1321
|
-
override.returns(
|
|
1322
|
-
T::Array[
|
|
1323
|
-
ModernTreasury::PaymentOrderCreateParams::LedgerTransaction::Status::TaggedSymbol
|
|
1324
|
-
]
|
|
1325
|
-
)
|
|
1326
|
-
end
|
|
1327
|
-
def self.values
|
|
1328
|
-
end
|
|
1329
|
-
end
|
|
1330
|
-
end
|
|
1331
|
-
|
|
1332
855
|
class LineItem < ModernTreasury::Internal::Type::BaseModel
|
|
1333
856
|
OrHash =
|
|
1334
857
|
T.type_alias do
|
|
@@ -1476,11 +999,7 @@ module ModernTreasury
|
|
|
1476
999
|
|
|
1477
1000
|
sig do
|
|
1478
1001
|
returns(
|
|
1479
|
-
T.nilable(
|
|
1480
|
-
T::Array[
|
|
1481
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail
|
|
1482
|
-
]
|
|
1483
|
-
)
|
|
1002
|
+
T.nilable(T::Array[ModernTreasury::ContactDetailCreateRequest])
|
|
1484
1003
|
)
|
|
1485
1004
|
end
|
|
1486
1005
|
attr_reader :contact_details
|
|
@@ -1488,31 +1007,26 @@ module ModernTreasury
|
|
|
1488
1007
|
sig do
|
|
1489
1008
|
params(
|
|
1490
1009
|
contact_details:
|
|
1491
|
-
T::Array[
|
|
1492
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::OrHash
|
|
1493
|
-
]
|
|
1010
|
+
T::Array[ModernTreasury::ContactDetailCreateRequest::OrHash]
|
|
1494
1011
|
).void
|
|
1495
1012
|
end
|
|
1496
1013
|
attr_writer :contact_details
|
|
1497
1014
|
|
|
1015
|
+
# An optional user-defined 180 character unique identifier.
|
|
1016
|
+
sig { returns(T.nilable(String)) }
|
|
1017
|
+
attr_accessor :external_id
|
|
1018
|
+
|
|
1498
1019
|
# Specifies a ledger account object that will be created with the external
|
|
1499
1020
|
# account. The resulting ledger account is linked to the external account for
|
|
1500
1021
|
# auto-ledgering Payment objects. See
|
|
1501
1022
|
# https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
|
|
1502
1023
|
# for more details.
|
|
1503
|
-
sig
|
|
1504
|
-
returns(
|
|
1505
|
-
T.nilable(
|
|
1506
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount
|
|
1507
|
-
)
|
|
1508
|
-
)
|
|
1509
|
-
end
|
|
1024
|
+
sig { returns(T.nilable(ModernTreasury::LedgerAccountCreateRequest)) }
|
|
1510
1025
|
attr_reader :ledger_account
|
|
1511
1026
|
|
|
1512
1027
|
sig do
|
|
1513
1028
|
params(
|
|
1514
|
-
ledger_account:
|
|
1515
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::OrHash
|
|
1029
|
+
ledger_account: ModernTreasury::LedgerAccountCreateRequest::OrHash
|
|
1516
1030
|
).void
|
|
1517
1031
|
end
|
|
1518
1032
|
attr_writer :ledger_account
|
|
@@ -1531,20 +1045,11 @@ module ModernTreasury
|
|
|
1531
1045
|
attr_accessor :name
|
|
1532
1046
|
|
|
1533
1047
|
# Required if receiving wire payments.
|
|
1534
|
-
sig
|
|
1535
|
-
returns(
|
|
1536
|
-
T.nilable(
|
|
1537
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::PartyAddress
|
|
1538
|
-
)
|
|
1539
|
-
)
|
|
1540
|
-
end
|
|
1048
|
+
sig { returns(T.nilable(ModernTreasury::AddressRequest)) }
|
|
1541
1049
|
attr_reader :party_address
|
|
1542
1050
|
|
|
1543
1051
|
sig do
|
|
1544
|
-
params(
|
|
1545
|
-
party_address:
|
|
1546
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::PartyAddress::OrHash
|
|
1547
|
-
).void
|
|
1052
|
+
params(party_address: ModernTreasury::AddressRequest::OrHash).void
|
|
1548
1053
|
end
|
|
1549
1054
|
attr_writer :party_address
|
|
1550
1055
|
|
|
@@ -1611,15 +1116,12 @@ module ModernTreasury
|
|
|
1611
1116
|
],
|
|
1612
1117
|
account_type: ModernTreasury::ExternalAccountType::OrSymbol,
|
|
1613
1118
|
contact_details:
|
|
1614
|
-
T::Array[
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
ledger_account:
|
|
1618
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::OrHash,
|
|
1119
|
+
T::Array[ModernTreasury::ContactDetailCreateRequest::OrHash],
|
|
1120
|
+
external_id: T.nilable(String),
|
|
1121
|
+
ledger_account: ModernTreasury::LedgerAccountCreateRequest::OrHash,
|
|
1619
1122
|
metadata: T::Hash[Symbol, String],
|
|
1620
1123
|
name: T.nilable(String),
|
|
1621
|
-
party_address:
|
|
1622
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::PartyAddress::OrHash,
|
|
1124
|
+
party_address: ModernTreasury::AddressRequest::OrHash,
|
|
1623
1125
|
party_identifier: String,
|
|
1624
1126
|
party_name: String,
|
|
1625
1127
|
party_type:
|
|
@@ -1638,6 +1140,8 @@ module ModernTreasury
|
|
|
1638
1140
|
# Can be `checking`, `savings` or `other`.
|
|
1639
1141
|
account_type: nil,
|
|
1640
1142
|
contact_details: nil,
|
|
1143
|
+
# An optional user-defined 180 character unique identifier.
|
|
1144
|
+
external_id: nil,
|
|
1641
1145
|
# Specifies a ledger account object that will be created with the external
|
|
1642
1146
|
# account. The resulting ledger account is linked to the external account for
|
|
1643
1147
|
# auto-ledgering Payment objects. See
|
|
@@ -1673,15 +1177,12 @@ module ModernTreasury
|
|
|
1673
1177
|
],
|
|
1674
1178
|
account_type: ModernTreasury::ExternalAccountType::OrSymbol,
|
|
1675
1179
|
contact_details:
|
|
1676
|
-
T::Array[
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
ledger_account:
|
|
1680
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount,
|
|
1180
|
+
T::Array[ModernTreasury::ContactDetailCreateRequest],
|
|
1181
|
+
external_id: T.nilable(String),
|
|
1182
|
+
ledger_account: ModernTreasury::LedgerAccountCreateRequest,
|
|
1681
1183
|
metadata: T::Hash[Symbol, String],
|
|
1682
1184
|
name: T.nilable(String),
|
|
1683
|
-
party_address:
|
|
1684
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::PartyAddress,
|
|
1185
|
+
party_address: ModernTreasury::AddressRequest,
|
|
1685
1186
|
party_identifier: String,
|
|
1686
1187
|
party_name: String,
|
|
1687
1188
|
party_type:
|
|
@@ -1845,366 +1346,6 @@ module ModernTreasury
|
|
|
1845
1346
|
end
|
|
1846
1347
|
end
|
|
1847
1348
|
|
|
1848
|
-
class ContactDetail < ModernTreasury::Internal::Type::BaseModel
|
|
1849
|
-
OrHash =
|
|
1850
|
-
T.type_alias do
|
|
1851
|
-
T.any(
|
|
1852
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail,
|
|
1853
|
-
ModernTreasury::Internal::AnyHash
|
|
1854
|
-
)
|
|
1855
|
-
end
|
|
1856
|
-
|
|
1857
|
-
sig { returns(T.nilable(String)) }
|
|
1858
|
-
attr_reader :contact_identifier
|
|
1859
|
-
|
|
1860
|
-
sig { params(contact_identifier: String).void }
|
|
1861
|
-
attr_writer :contact_identifier
|
|
1862
|
-
|
|
1863
|
-
sig do
|
|
1864
|
-
returns(
|
|
1865
|
-
T.nilable(
|
|
1866
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
|
|
1867
|
-
)
|
|
1868
|
-
)
|
|
1869
|
-
end
|
|
1870
|
-
attr_reader :contact_identifier_type
|
|
1871
|
-
|
|
1872
|
-
sig do
|
|
1873
|
-
params(
|
|
1874
|
-
contact_identifier_type:
|
|
1875
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
|
|
1876
|
-
).void
|
|
1877
|
-
end
|
|
1878
|
-
attr_writer :contact_identifier_type
|
|
1879
|
-
|
|
1880
|
-
sig do
|
|
1881
|
-
params(
|
|
1882
|
-
contact_identifier: String,
|
|
1883
|
-
contact_identifier_type:
|
|
1884
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
|
|
1885
|
-
).returns(T.attached_class)
|
|
1886
|
-
end
|
|
1887
|
-
def self.new(contact_identifier: nil, contact_identifier_type: nil)
|
|
1888
|
-
end
|
|
1889
|
-
|
|
1890
|
-
sig do
|
|
1891
|
-
override.returns(
|
|
1892
|
-
{
|
|
1893
|
-
contact_identifier: String,
|
|
1894
|
-
contact_identifier_type:
|
|
1895
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
|
|
1896
|
-
}
|
|
1897
|
-
)
|
|
1898
|
-
end
|
|
1899
|
-
def to_hash
|
|
1900
|
-
end
|
|
1901
|
-
|
|
1902
|
-
module ContactIdentifierType
|
|
1903
|
-
extend ModernTreasury::Internal::Type::Enum
|
|
1904
|
-
|
|
1905
|
-
TaggedSymbol =
|
|
1906
|
-
T.type_alias do
|
|
1907
|
-
T.all(
|
|
1908
|
-
Symbol,
|
|
1909
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::ContactIdentifierType
|
|
1910
|
-
)
|
|
1911
|
-
end
|
|
1912
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1913
|
-
|
|
1914
|
-
EMAIL =
|
|
1915
|
-
T.let(
|
|
1916
|
-
:email,
|
|
1917
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
|
|
1918
|
-
)
|
|
1919
|
-
PHONE_NUMBER =
|
|
1920
|
-
T.let(
|
|
1921
|
-
:phone_number,
|
|
1922
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
|
|
1923
|
-
)
|
|
1924
|
-
WEBSITE =
|
|
1925
|
-
T.let(
|
|
1926
|
-
:website,
|
|
1927
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
|
|
1928
|
-
)
|
|
1929
|
-
|
|
1930
|
-
sig do
|
|
1931
|
-
override.returns(
|
|
1932
|
-
T::Array[
|
|
1933
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
|
|
1934
|
-
]
|
|
1935
|
-
)
|
|
1936
|
-
end
|
|
1937
|
-
def self.values
|
|
1938
|
-
end
|
|
1939
|
-
end
|
|
1940
|
-
end
|
|
1941
|
-
|
|
1942
|
-
class LedgerAccount < ModernTreasury::Internal::Type::BaseModel
|
|
1943
|
-
OrHash =
|
|
1944
|
-
T.type_alias do
|
|
1945
|
-
T.any(
|
|
1946
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount,
|
|
1947
|
-
ModernTreasury::Internal::AnyHash
|
|
1948
|
-
)
|
|
1949
|
-
end
|
|
1950
|
-
|
|
1951
|
-
# The currency of the ledger account.
|
|
1952
|
-
sig { returns(String) }
|
|
1953
|
-
attr_accessor :currency
|
|
1954
|
-
|
|
1955
|
-
# The id of the ledger that this account belongs to.
|
|
1956
|
-
sig { returns(String) }
|
|
1957
|
-
attr_accessor :ledger_id
|
|
1958
|
-
|
|
1959
|
-
# The name of the ledger account.
|
|
1960
|
-
sig { returns(String) }
|
|
1961
|
-
attr_accessor :name
|
|
1962
|
-
|
|
1963
|
-
# The normal balance of the ledger account.
|
|
1964
|
-
sig { returns(ModernTreasury::TransactionDirection::OrSymbol) }
|
|
1965
|
-
attr_accessor :normal_balance
|
|
1966
|
-
|
|
1967
|
-
# The currency exponent of the ledger account.
|
|
1968
|
-
sig { returns(T.nilable(Integer)) }
|
|
1969
|
-
attr_accessor :currency_exponent
|
|
1970
|
-
|
|
1971
|
-
# The description of the ledger account.
|
|
1972
|
-
sig { returns(T.nilable(String)) }
|
|
1973
|
-
attr_accessor :description
|
|
1974
|
-
|
|
1975
|
-
# The array of ledger account category ids that this ledger account should be a
|
|
1976
|
-
# child of.
|
|
1977
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
1978
|
-
attr_reader :ledger_account_category_ids
|
|
1979
|
-
|
|
1980
|
-
sig { params(ledger_account_category_ids: T::Array[String]).void }
|
|
1981
|
-
attr_writer :ledger_account_category_ids
|
|
1982
|
-
|
|
1983
|
-
# If the ledger account links to another object in Modern Treasury, the id will be
|
|
1984
|
-
# populated here, otherwise null.
|
|
1985
|
-
sig { returns(T.nilable(String)) }
|
|
1986
|
-
attr_reader :ledgerable_id
|
|
1987
|
-
|
|
1988
|
-
sig { params(ledgerable_id: String).void }
|
|
1989
|
-
attr_writer :ledgerable_id
|
|
1990
|
-
|
|
1991
|
-
# If the ledger account links to another object in Modern Treasury, the type will
|
|
1992
|
-
# be populated here, otherwise null. The value is one of internal_account or
|
|
1993
|
-
# external_account.
|
|
1994
|
-
sig do
|
|
1995
|
-
returns(
|
|
1996
|
-
T.nilable(
|
|
1997
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol
|
|
1998
|
-
)
|
|
1999
|
-
)
|
|
2000
|
-
end
|
|
2001
|
-
attr_reader :ledgerable_type
|
|
2002
|
-
|
|
2003
|
-
sig do
|
|
2004
|
-
params(
|
|
2005
|
-
ledgerable_type:
|
|
2006
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol
|
|
2007
|
-
).void
|
|
2008
|
-
end
|
|
2009
|
-
attr_writer :ledgerable_type
|
|
2010
|
-
|
|
2011
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
2012
|
-
# strings.
|
|
2013
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
2014
|
-
attr_reader :metadata
|
|
2015
|
-
|
|
2016
|
-
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
2017
|
-
attr_writer :metadata
|
|
2018
|
-
|
|
2019
|
-
# Specifies a ledger account object that will be created with the external
|
|
2020
|
-
# account. The resulting ledger account is linked to the external account for
|
|
2021
|
-
# auto-ledgering Payment objects. See
|
|
2022
|
-
# https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
|
|
2023
|
-
# for more details.
|
|
2024
|
-
sig do
|
|
2025
|
-
params(
|
|
2026
|
-
currency: String,
|
|
2027
|
-
ledger_id: String,
|
|
2028
|
-
name: String,
|
|
2029
|
-
normal_balance: ModernTreasury::TransactionDirection::OrSymbol,
|
|
2030
|
-
currency_exponent: T.nilable(Integer),
|
|
2031
|
-
description: T.nilable(String),
|
|
2032
|
-
ledger_account_category_ids: T::Array[String],
|
|
2033
|
-
ledgerable_id: String,
|
|
2034
|
-
ledgerable_type:
|
|
2035
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol,
|
|
2036
|
-
metadata: T::Hash[Symbol, String]
|
|
2037
|
-
).returns(T.attached_class)
|
|
2038
|
-
end
|
|
2039
|
-
def self.new(
|
|
2040
|
-
# The currency of the ledger account.
|
|
2041
|
-
currency:,
|
|
2042
|
-
# The id of the ledger that this account belongs to.
|
|
2043
|
-
ledger_id:,
|
|
2044
|
-
# The name of the ledger account.
|
|
2045
|
-
name:,
|
|
2046
|
-
# The normal balance of the ledger account.
|
|
2047
|
-
normal_balance:,
|
|
2048
|
-
# The currency exponent of the ledger account.
|
|
2049
|
-
currency_exponent: nil,
|
|
2050
|
-
# The description of the ledger account.
|
|
2051
|
-
description: nil,
|
|
2052
|
-
# The array of ledger account category ids that this ledger account should be a
|
|
2053
|
-
# child of.
|
|
2054
|
-
ledger_account_category_ids: nil,
|
|
2055
|
-
# If the ledger account links to another object in Modern Treasury, the id will be
|
|
2056
|
-
# populated here, otherwise null.
|
|
2057
|
-
ledgerable_id: nil,
|
|
2058
|
-
# If the ledger account links to another object in Modern Treasury, the type will
|
|
2059
|
-
# be populated here, otherwise null. The value is one of internal_account or
|
|
2060
|
-
# external_account.
|
|
2061
|
-
ledgerable_type: nil,
|
|
2062
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
2063
|
-
# strings.
|
|
2064
|
-
metadata: nil
|
|
2065
|
-
)
|
|
2066
|
-
end
|
|
2067
|
-
|
|
2068
|
-
sig do
|
|
2069
|
-
override.returns(
|
|
2070
|
-
{
|
|
2071
|
-
currency: String,
|
|
2072
|
-
ledger_id: String,
|
|
2073
|
-
name: String,
|
|
2074
|
-
normal_balance: ModernTreasury::TransactionDirection::OrSymbol,
|
|
2075
|
-
currency_exponent: T.nilable(Integer),
|
|
2076
|
-
description: T.nilable(String),
|
|
2077
|
-
ledger_account_category_ids: T::Array[String],
|
|
2078
|
-
ledgerable_id: String,
|
|
2079
|
-
ledgerable_type:
|
|
2080
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol,
|
|
2081
|
-
metadata: T::Hash[Symbol, String]
|
|
2082
|
-
}
|
|
2083
|
-
)
|
|
2084
|
-
end
|
|
2085
|
-
def to_hash
|
|
2086
|
-
end
|
|
2087
|
-
|
|
2088
|
-
# If the ledger account links to another object in Modern Treasury, the type will
|
|
2089
|
-
# be populated here, otherwise null. The value is one of internal_account or
|
|
2090
|
-
# external_account.
|
|
2091
|
-
module LedgerableType
|
|
2092
|
-
extend ModernTreasury::Internal::Type::Enum
|
|
2093
|
-
|
|
2094
|
-
TaggedSymbol =
|
|
2095
|
-
T.type_alias do
|
|
2096
|
-
T.all(
|
|
2097
|
-
Symbol,
|
|
2098
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType
|
|
2099
|
-
)
|
|
2100
|
-
end
|
|
2101
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2102
|
-
|
|
2103
|
-
COUNTERPARTY =
|
|
2104
|
-
T.let(
|
|
2105
|
-
:counterparty,
|
|
2106
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
2107
|
-
)
|
|
2108
|
-
EXTERNAL_ACCOUNT =
|
|
2109
|
-
T.let(
|
|
2110
|
-
:external_account,
|
|
2111
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
2112
|
-
)
|
|
2113
|
-
INTERNAL_ACCOUNT =
|
|
2114
|
-
T.let(
|
|
2115
|
-
:internal_account,
|
|
2116
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
2117
|
-
)
|
|
2118
|
-
VIRTUAL_ACCOUNT =
|
|
2119
|
-
T.let(
|
|
2120
|
-
:virtual_account,
|
|
2121
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
2122
|
-
)
|
|
2123
|
-
|
|
2124
|
-
sig do
|
|
2125
|
-
override.returns(
|
|
2126
|
-
T::Array[
|
|
2127
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
2128
|
-
]
|
|
2129
|
-
)
|
|
2130
|
-
end
|
|
2131
|
-
def self.values
|
|
2132
|
-
end
|
|
2133
|
-
end
|
|
2134
|
-
end
|
|
2135
|
-
|
|
2136
|
-
class PartyAddress < ModernTreasury::Internal::Type::BaseModel
|
|
2137
|
-
OrHash =
|
|
2138
|
-
T.type_alias do
|
|
2139
|
-
T.any(
|
|
2140
|
-
ModernTreasury::PaymentOrderCreateParams::ReceivingAccount::PartyAddress,
|
|
2141
|
-
ModernTreasury::Internal::AnyHash
|
|
2142
|
-
)
|
|
2143
|
-
end
|
|
2144
|
-
|
|
2145
|
-
# Country code conforms to [ISO 3166-1 alpha-2]
|
|
2146
|
-
sig { returns(T.nilable(String)) }
|
|
2147
|
-
attr_accessor :country
|
|
2148
|
-
|
|
2149
|
-
sig { returns(T.nilable(String)) }
|
|
2150
|
-
attr_accessor :line1
|
|
2151
|
-
|
|
2152
|
-
sig { returns(T.nilable(String)) }
|
|
2153
|
-
attr_accessor :line2
|
|
2154
|
-
|
|
2155
|
-
# Locality or City.
|
|
2156
|
-
sig { returns(T.nilable(String)) }
|
|
2157
|
-
attr_accessor :locality
|
|
2158
|
-
|
|
2159
|
-
# The postal code of the address.
|
|
2160
|
-
sig { returns(T.nilable(String)) }
|
|
2161
|
-
attr_accessor :postal_code
|
|
2162
|
-
|
|
2163
|
-
# Region or State.
|
|
2164
|
-
sig { returns(T.nilable(String)) }
|
|
2165
|
-
attr_accessor :region
|
|
2166
|
-
|
|
2167
|
-
# Required if receiving wire payments.
|
|
2168
|
-
sig do
|
|
2169
|
-
params(
|
|
2170
|
-
country: T.nilable(String),
|
|
2171
|
-
line1: T.nilable(String),
|
|
2172
|
-
line2: T.nilable(String),
|
|
2173
|
-
locality: T.nilable(String),
|
|
2174
|
-
postal_code: T.nilable(String),
|
|
2175
|
-
region: T.nilable(String)
|
|
2176
|
-
).returns(T.attached_class)
|
|
2177
|
-
end
|
|
2178
|
-
def self.new(
|
|
2179
|
-
# Country code conforms to [ISO 3166-1 alpha-2]
|
|
2180
|
-
country: nil,
|
|
2181
|
-
line1: nil,
|
|
2182
|
-
line2: nil,
|
|
2183
|
-
# Locality or City.
|
|
2184
|
-
locality: nil,
|
|
2185
|
-
# The postal code of the address.
|
|
2186
|
-
postal_code: nil,
|
|
2187
|
-
# Region or State.
|
|
2188
|
-
region: nil
|
|
2189
|
-
)
|
|
2190
|
-
end
|
|
2191
|
-
|
|
2192
|
-
sig do
|
|
2193
|
-
override.returns(
|
|
2194
|
-
{
|
|
2195
|
-
country: T.nilable(String),
|
|
2196
|
-
line1: T.nilable(String),
|
|
2197
|
-
line2: T.nilable(String),
|
|
2198
|
-
locality: T.nilable(String),
|
|
2199
|
-
postal_code: T.nilable(String),
|
|
2200
|
-
region: T.nilable(String)
|
|
2201
|
-
}
|
|
2202
|
-
)
|
|
2203
|
-
end
|
|
2204
|
-
def to_hash
|
|
2205
|
-
end
|
|
2206
|
-
end
|
|
2207
|
-
|
|
2208
1349
|
# Either `individual` or `business`.
|
|
2209
1350
|
module PartyType
|
|
2210
1351
|
extend ModernTreasury::Internal::Type::Enum
|