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
|
@@ -40,19 +40,10 @@ module ModernTreasury
|
|
|
40
40
|
sig { returns(ModernTreasury::PaymentOrderType::OrSymbol) }
|
|
41
41
|
attr_accessor :type
|
|
42
42
|
|
|
43
|
-
sig
|
|
44
|
-
returns(
|
|
45
|
-
T.nilable(ModernTreasury::PaymentOrderCreateAsyncParams::Accounting)
|
|
46
|
-
)
|
|
47
|
-
end
|
|
43
|
+
sig { returns(T.nilable(ModernTreasury::Accounting)) }
|
|
48
44
|
attr_reader :accounting
|
|
49
45
|
|
|
50
|
-
sig
|
|
51
|
-
params(
|
|
52
|
-
accounting:
|
|
53
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::Accounting::OrHash
|
|
54
|
-
).void
|
|
55
|
-
end
|
|
46
|
+
sig { params(accounting: ModernTreasury::Accounting::OrHash).void }
|
|
56
47
|
attr_writer :accounting
|
|
57
48
|
|
|
58
49
|
# The ID of one of your accounting categories. Note that these will only be
|
|
@@ -142,19 +133,13 @@ module ModernTreasury
|
|
|
142
133
|
# order. If the ledger transaction cannot be created, then the payment order
|
|
143
134
|
# creation will fail. The resulting ledger transaction will mirror the status of
|
|
144
135
|
# the payment order.
|
|
145
|
-
sig
|
|
146
|
-
returns(
|
|
147
|
-
T.nilable(
|
|
148
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction
|
|
149
|
-
)
|
|
150
|
-
)
|
|
151
|
-
end
|
|
136
|
+
sig { returns(T.nilable(ModernTreasury::LedgerTransactionCreateRequest)) }
|
|
152
137
|
attr_reader :ledger_transaction
|
|
153
138
|
|
|
154
139
|
sig do
|
|
155
140
|
params(
|
|
156
141
|
ledger_transaction:
|
|
157
|
-
ModernTreasury::
|
|
142
|
+
ModernTreasury::LedgerTransactionCreateRequest::OrHash
|
|
158
143
|
).void
|
|
159
144
|
end
|
|
160
145
|
attr_writer :ledger_transaction
|
|
@@ -333,8 +318,7 @@ module ModernTreasury
|
|
|
333
318
|
ModernTreasury::PaymentOrderCreateAsyncParams::Direction::OrSymbol,
|
|
334
319
|
originating_account_id: String,
|
|
335
320
|
type: ModernTreasury::PaymentOrderType::OrSymbol,
|
|
336
|
-
accounting:
|
|
337
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::Accounting::OrHash,
|
|
321
|
+
accounting: ModernTreasury::Accounting::OrHash,
|
|
338
322
|
accounting_category_id: T.nilable(String),
|
|
339
323
|
accounting_ledger_class_id: T.nilable(String),
|
|
340
324
|
charge_bearer:
|
|
@@ -353,7 +337,7 @@ module ModernTreasury
|
|
|
353
337
|
ModernTreasury::PaymentOrderCreateAsyncParams::ForeignExchangeIndicator::OrSymbol
|
|
354
338
|
),
|
|
355
339
|
ledger_transaction:
|
|
356
|
-
ModernTreasury::
|
|
340
|
+
ModernTreasury::LedgerTransactionCreateRequest::OrHash,
|
|
357
341
|
ledger_transaction_id: String,
|
|
358
342
|
line_items:
|
|
359
343
|
T::Array[
|
|
@@ -515,8 +499,7 @@ module ModernTreasury
|
|
|
515
499
|
ModernTreasury::PaymentOrderCreateAsyncParams::Direction::OrSymbol,
|
|
516
500
|
originating_account_id: String,
|
|
517
501
|
type: ModernTreasury::PaymentOrderType::OrSymbol,
|
|
518
|
-
accounting:
|
|
519
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::Accounting,
|
|
502
|
+
accounting: ModernTreasury::Accounting,
|
|
520
503
|
accounting_category_id: T.nilable(String),
|
|
521
504
|
accounting_ledger_class_id: T.nilable(String),
|
|
522
505
|
charge_bearer:
|
|
@@ -534,8 +517,7 @@ module ModernTreasury
|
|
|
534
517
|
T.nilable(
|
|
535
518
|
ModernTreasury::PaymentOrderCreateAsyncParams::ForeignExchangeIndicator::OrSymbol
|
|
536
519
|
),
|
|
537
|
-
ledger_transaction:
|
|
538
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction,
|
|
520
|
+
ledger_transaction: ModernTreasury::LedgerTransactionCreateRequest,
|
|
539
521
|
ledger_transaction_id: String,
|
|
540
522
|
line_items:
|
|
541
523
|
T::Array[ModernTreasury::PaymentOrderCreateAsyncParams::LineItem],
|
|
@@ -603,52 +585,6 @@ module ModernTreasury
|
|
|
603
585
|
end
|
|
604
586
|
end
|
|
605
587
|
|
|
606
|
-
class Accounting < ModernTreasury::Internal::Type::BaseModel
|
|
607
|
-
OrHash =
|
|
608
|
-
T.type_alias do
|
|
609
|
-
T.any(
|
|
610
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::Accounting,
|
|
611
|
-
ModernTreasury::Internal::AnyHash
|
|
612
|
-
)
|
|
613
|
-
end
|
|
614
|
-
|
|
615
|
-
# The ID of one of your accounting categories. Note that these will only be
|
|
616
|
-
# accessible if your accounting system has been connected.
|
|
617
|
-
sig { returns(T.nilable(String)) }
|
|
618
|
-
attr_accessor :account_id
|
|
619
|
-
|
|
620
|
-
# The ID of one of the class objects in your accounting system. Class objects
|
|
621
|
-
# track segments of your business independent of client or project. Note that
|
|
622
|
-
# these will only be accessible if your accounting system has been connected.
|
|
623
|
-
sig { returns(T.nilable(String)) }
|
|
624
|
-
attr_accessor :class_id
|
|
625
|
-
|
|
626
|
-
sig do
|
|
627
|
-
params(
|
|
628
|
-
account_id: T.nilable(String),
|
|
629
|
-
class_id: T.nilable(String)
|
|
630
|
-
).returns(T.attached_class)
|
|
631
|
-
end
|
|
632
|
-
def self.new(
|
|
633
|
-
# The ID of one of your accounting categories. Note that these will only be
|
|
634
|
-
# accessible if your accounting system has been connected.
|
|
635
|
-
account_id: nil,
|
|
636
|
-
# The ID of one of the class objects in your accounting system. Class objects
|
|
637
|
-
# track segments of your business independent of client or project. Note that
|
|
638
|
-
# these will only be accessible if your accounting system has been connected.
|
|
639
|
-
class_id: nil
|
|
640
|
-
)
|
|
641
|
-
end
|
|
642
|
-
|
|
643
|
-
sig do
|
|
644
|
-
override.returns(
|
|
645
|
-
{ account_id: T.nilable(String), class_id: T.nilable(String) }
|
|
646
|
-
)
|
|
647
|
-
end
|
|
648
|
-
def to_hash
|
|
649
|
-
end
|
|
650
|
-
end
|
|
651
|
-
|
|
652
588
|
# The party that will pay the fees for the payment order. See
|
|
653
589
|
# https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
|
|
654
590
|
# differences between the options.
|
|
@@ -760,414 +696,6 @@ module ModernTreasury
|
|
|
760
696
|
end
|
|
761
697
|
end
|
|
762
698
|
|
|
763
|
-
class LedgerTransaction < ModernTreasury::Internal::Type::BaseModel
|
|
764
|
-
OrHash =
|
|
765
|
-
T.type_alias do
|
|
766
|
-
T.any(
|
|
767
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction,
|
|
768
|
-
ModernTreasury::Internal::AnyHash
|
|
769
|
-
)
|
|
770
|
-
end
|
|
771
|
-
|
|
772
|
-
# An array of ledger entry objects.
|
|
773
|
-
sig do
|
|
774
|
-
returns(
|
|
775
|
-
T::Array[
|
|
776
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerEntry
|
|
777
|
-
]
|
|
778
|
-
)
|
|
779
|
-
end
|
|
780
|
-
attr_accessor :ledger_entries
|
|
781
|
-
|
|
782
|
-
# An optional description for internal use.
|
|
783
|
-
sig { returns(T.nilable(String)) }
|
|
784
|
-
attr_accessor :description
|
|
785
|
-
|
|
786
|
-
# The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
787
|
-
# reporting purposes.
|
|
788
|
-
sig { returns(T.nilable(Time)) }
|
|
789
|
-
attr_reader :effective_at
|
|
790
|
-
|
|
791
|
-
sig { params(effective_at: Time).void }
|
|
792
|
-
attr_writer :effective_at
|
|
793
|
-
|
|
794
|
-
# The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
|
|
795
|
-
# purposes.
|
|
796
|
-
sig { returns(T.nilable(Date)) }
|
|
797
|
-
attr_reader :effective_date
|
|
798
|
-
|
|
799
|
-
sig { params(effective_date: Date).void }
|
|
800
|
-
attr_writer :effective_date
|
|
801
|
-
|
|
802
|
-
# A unique string to represent the ledger transaction. Only one pending or posted
|
|
803
|
-
# ledger transaction may have this ID in the ledger.
|
|
804
|
-
sig { returns(T.nilable(String)) }
|
|
805
|
-
attr_reader :external_id
|
|
806
|
-
|
|
807
|
-
sig { params(external_id: String).void }
|
|
808
|
-
attr_writer :external_id
|
|
809
|
-
|
|
810
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
811
|
-
# Treasury, the id will be populated here, otherwise null.
|
|
812
|
-
sig { returns(T.nilable(String)) }
|
|
813
|
-
attr_reader :ledgerable_id
|
|
814
|
-
|
|
815
|
-
sig { params(ledgerable_id: String).void }
|
|
816
|
-
attr_writer :ledgerable_id
|
|
817
|
-
|
|
818
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
819
|
-
# Treasury, the type will be populated here, otherwise null. This can be one of
|
|
820
|
-
# payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
|
|
821
|
-
# reversal.
|
|
822
|
-
sig do
|
|
823
|
-
returns(
|
|
824
|
-
T.nilable(
|
|
825
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::OrSymbol
|
|
826
|
-
)
|
|
827
|
-
)
|
|
828
|
-
end
|
|
829
|
-
attr_reader :ledgerable_type
|
|
830
|
-
|
|
831
|
-
sig do
|
|
832
|
-
params(
|
|
833
|
-
ledgerable_type:
|
|
834
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::OrSymbol
|
|
835
|
-
).void
|
|
836
|
-
end
|
|
837
|
-
attr_writer :ledgerable_type
|
|
838
|
-
|
|
839
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
840
|
-
# strings.
|
|
841
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
842
|
-
attr_reader :metadata
|
|
843
|
-
|
|
844
|
-
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
845
|
-
attr_writer :metadata
|
|
846
|
-
|
|
847
|
-
# To post a ledger transaction at creation, use `posted`.
|
|
848
|
-
sig do
|
|
849
|
-
returns(
|
|
850
|
-
T.nilable(
|
|
851
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::Status::OrSymbol
|
|
852
|
-
)
|
|
853
|
-
)
|
|
854
|
-
end
|
|
855
|
-
attr_reader :status
|
|
856
|
-
|
|
857
|
-
sig do
|
|
858
|
-
params(
|
|
859
|
-
status:
|
|
860
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::Status::OrSymbol
|
|
861
|
-
).void
|
|
862
|
-
end
|
|
863
|
-
attr_writer :status
|
|
864
|
-
|
|
865
|
-
# Specifies a ledger transaction object that will be created with the payment
|
|
866
|
-
# order. If the ledger transaction cannot be created, then the payment order
|
|
867
|
-
# creation will fail. The resulting ledger transaction will mirror the status of
|
|
868
|
-
# the payment order.
|
|
869
|
-
sig do
|
|
870
|
-
params(
|
|
871
|
-
ledger_entries:
|
|
872
|
-
T::Array[
|
|
873
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerEntry::OrHash
|
|
874
|
-
],
|
|
875
|
-
description: T.nilable(String),
|
|
876
|
-
effective_at: Time,
|
|
877
|
-
effective_date: Date,
|
|
878
|
-
external_id: String,
|
|
879
|
-
ledgerable_id: String,
|
|
880
|
-
ledgerable_type:
|
|
881
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::OrSymbol,
|
|
882
|
-
metadata: T::Hash[Symbol, String],
|
|
883
|
-
status:
|
|
884
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::Status::OrSymbol
|
|
885
|
-
).returns(T.attached_class)
|
|
886
|
-
end
|
|
887
|
-
def self.new(
|
|
888
|
-
# An array of ledger entry objects.
|
|
889
|
-
ledger_entries:,
|
|
890
|
-
# An optional description for internal use.
|
|
891
|
-
description: nil,
|
|
892
|
-
# The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
893
|
-
# reporting purposes.
|
|
894
|
-
effective_at: nil,
|
|
895
|
-
# The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
|
|
896
|
-
# purposes.
|
|
897
|
-
effective_date: nil,
|
|
898
|
-
# A unique string to represent the ledger transaction. Only one pending or posted
|
|
899
|
-
# ledger transaction may have this ID in the ledger.
|
|
900
|
-
external_id: nil,
|
|
901
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
902
|
-
# Treasury, the id will be populated here, otherwise null.
|
|
903
|
-
ledgerable_id: nil,
|
|
904
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
905
|
-
# Treasury, the type will be populated here, otherwise null. This can be one of
|
|
906
|
-
# payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
|
|
907
|
-
# reversal.
|
|
908
|
-
ledgerable_type: nil,
|
|
909
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
910
|
-
# strings.
|
|
911
|
-
metadata: nil,
|
|
912
|
-
# To post a ledger transaction at creation, use `posted`.
|
|
913
|
-
status: nil
|
|
914
|
-
)
|
|
915
|
-
end
|
|
916
|
-
|
|
917
|
-
sig do
|
|
918
|
-
override.returns(
|
|
919
|
-
{
|
|
920
|
-
ledger_entries:
|
|
921
|
-
T::Array[
|
|
922
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerEntry
|
|
923
|
-
],
|
|
924
|
-
description: T.nilable(String),
|
|
925
|
-
effective_at: Time,
|
|
926
|
-
effective_date: Date,
|
|
927
|
-
external_id: String,
|
|
928
|
-
ledgerable_id: String,
|
|
929
|
-
ledgerable_type:
|
|
930
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::OrSymbol,
|
|
931
|
-
metadata: T::Hash[Symbol, String],
|
|
932
|
-
status:
|
|
933
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::Status::OrSymbol
|
|
934
|
-
}
|
|
935
|
-
)
|
|
936
|
-
end
|
|
937
|
-
def to_hash
|
|
938
|
-
end
|
|
939
|
-
|
|
940
|
-
class LedgerEntry < ModernTreasury::Internal::Type::BaseModel
|
|
941
|
-
OrHash =
|
|
942
|
-
T.type_alias do
|
|
943
|
-
T.any(
|
|
944
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerEntry,
|
|
945
|
-
ModernTreasury::Internal::AnyHash
|
|
946
|
-
)
|
|
947
|
-
end
|
|
948
|
-
|
|
949
|
-
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
950
|
-
# as 1000. Can be any integer up to 36 digits.
|
|
951
|
-
sig { returns(Integer) }
|
|
952
|
-
attr_accessor :amount
|
|
953
|
-
|
|
954
|
-
# One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
955
|
-
# transaction. A `credit` moves money from your account to someone else's. A
|
|
956
|
-
# `debit` pulls money from someone else's account to your own. Note that wire,
|
|
957
|
-
# rtp, and check payments will always be `credit`.
|
|
958
|
-
sig { returns(ModernTreasury::TransactionDirection::OrSymbol) }
|
|
959
|
-
attr_accessor :direction
|
|
960
|
-
|
|
961
|
-
# The ledger account that this ledger entry is associated with.
|
|
962
|
-
sig { returns(String) }
|
|
963
|
-
attr_accessor :ledger_account_id
|
|
964
|
-
|
|
965
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
966
|
-
# account’s available balance. If any of these conditions would be false after the
|
|
967
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
968
|
-
sig { returns(T.nilable(T::Hash[Symbol, Integer])) }
|
|
969
|
-
attr_accessor :available_balance_amount
|
|
970
|
-
|
|
971
|
-
# Lock version of the ledger account. This can be passed when creating a ledger
|
|
972
|
-
# transaction to only succeed if no ledger transactions have posted since the
|
|
973
|
-
# given version. See our post about Designing the Ledgers API with Optimistic
|
|
974
|
-
# Locking for more details.
|
|
975
|
-
sig { returns(T.nilable(Integer)) }
|
|
976
|
-
attr_accessor :lock_version
|
|
977
|
-
|
|
978
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
979
|
-
# strings.
|
|
980
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
981
|
-
attr_reader :metadata
|
|
982
|
-
|
|
983
|
-
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
984
|
-
attr_writer :metadata
|
|
985
|
-
|
|
986
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
987
|
-
# account’s pending balance. If any of these conditions would be false after the
|
|
988
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
989
|
-
sig { returns(T.nilable(T::Hash[Symbol, Integer])) }
|
|
990
|
-
attr_accessor :pending_balance_amount
|
|
991
|
-
|
|
992
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
993
|
-
# account’s posted balance. If any of these conditions would be false after the
|
|
994
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
995
|
-
sig { returns(T.nilable(T::Hash[Symbol, Integer])) }
|
|
996
|
-
attr_accessor :posted_balance_amount
|
|
997
|
-
|
|
998
|
-
# If true, response will include the balance of the associated ledger account for
|
|
999
|
-
# the entry.
|
|
1000
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
1001
|
-
attr_accessor :show_resulting_ledger_account_balances
|
|
1002
|
-
|
|
1003
|
-
sig do
|
|
1004
|
-
params(
|
|
1005
|
-
amount: Integer,
|
|
1006
|
-
direction: ModernTreasury::TransactionDirection::OrSymbol,
|
|
1007
|
-
ledger_account_id: String,
|
|
1008
|
-
available_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1009
|
-
lock_version: T.nilable(Integer),
|
|
1010
|
-
metadata: T::Hash[Symbol, String],
|
|
1011
|
-
pending_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1012
|
-
posted_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1013
|
-
show_resulting_ledger_account_balances: T.nilable(T::Boolean)
|
|
1014
|
-
).returns(T.attached_class)
|
|
1015
|
-
end
|
|
1016
|
-
def self.new(
|
|
1017
|
-
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
1018
|
-
# as 1000. Can be any integer up to 36 digits.
|
|
1019
|
-
amount:,
|
|
1020
|
-
# One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
1021
|
-
# transaction. A `credit` moves money from your account to someone else's. A
|
|
1022
|
-
# `debit` pulls money from someone else's account to your own. Note that wire,
|
|
1023
|
-
# rtp, and check payments will always be `credit`.
|
|
1024
|
-
direction:,
|
|
1025
|
-
# The ledger account that this ledger entry is associated with.
|
|
1026
|
-
ledger_account_id:,
|
|
1027
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
1028
|
-
# account’s available balance. If any of these conditions would be false after the
|
|
1029
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
1030
|
-
available_balance_amount: nil,
|
|
1031
|
-
# Lock version of the ledger account. This can be passed when creating a ledger
|
|
1032
|
-
# transaction to only succeed if no ledger transactions have posted since the
|
|
1033
|
-
# given version. See our post about Designing the Ledgers API with Optimistic
|
|
1034
|
-
# Locking for more details.
|
|
1035
|
-
lock_version: nil,
|
|
1036
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
1037
|
-
# strings.
|
|
1038
|
-
metadata: nil,
|
|
1039
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
1040
|
-
# account’s pending balance. If any of these conditions would be false after the
|
|
1041
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
1042
|
-
pending_balance_amount: nil,
|
|
1043
|
-
# Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
1044
|
-
# account’s posted balance. If any of these conditions would be false after the
|
|
1045
|
-
# transaction is created, the entire call will fail with error code 422.
|
|
1046
|
-
posted_balance_amount: nil,
|
|
1047
|
-
# If true, response will include the balance of the associated ledger account for
|
|
1048
|
-
# the entry.
|
|
1049
|
-
show_resulting_ledger_account_balances: nil
|
|
1050
|
-
)
|
|
1051
|
-
end
|
|
1052
|
-
|
|
1053
|
-
sig do
|
|
1054
|
-
override.returns(
|
|
1055
|
-
{
|
|
1056
|
-
amount: Integer,
|
|
1057
|
-
direction: ModernTreasury::TransactionDirection::OrSymbol,
|
|
1058
|
-
ledger_account_id: String,
|
|
1059
|
-
available_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1060
|
-
lock_version: T.nilable(Integer),
|
|
1061
|
-
metadata: T::Hash[Symbol, String],
|
|
1062
|
-
pending_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1063
|
-
posted_balance_amount: T.nilable(T::Hash[Symbol, Integer]),
|
|
1064
|
-
show_resulting_ledger_account_balances: T.nilable(T::Boolean)
|
|
1065
|
-
}
|
|
1066
|
-
)
|
|
1067
|
-
end
|
|
1068
|
-
def to_hash
|
|
1069
|
-
end
|
|
1070
|
-
end
|
|
1071
|
-
|
|
1072
|
-
# If the ledger transaction can be reconciled to another object in Modern
|
|
1073
|
-
# Treasury, the type will be populated here, otherwise null. This can be one of
|
|
1074
|
-
# payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
|
|
1075
|
-
# reversal.
|
|
1076
|
-
module LedgerableType
|
|
1077
|
-
extend ModernTreasury::Internal::Type::Enum
|
|
1078
|
-
|
|
1079
|
-
TaggedSymbol =
|
|
1080
|
-
T.type_alias do
|
|
1081
|
-
T.all(
|
|
1082
|
-
Symbol,
|
|
1083
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType
|
|
1084
|
-
)
|
|
1085
|
-
end
|
|
1086
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1087
|
-
|
|
1088
|
-
EXPECTED_PAYMENT =
|
|
1089
|
-
T.let(
|
|
1090
|
-
:expected_payment,
|
|
1091
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1092
|
-
)
|
|
1093
|
-
INCOMING_PAYMENT_DETAIL =
|
|
1094
|
-
T.let(
|
|
1095
|
-
:incoming_payment_detail,
|
|
1096
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1097
|
-
)
|
|
1098
|
-
PAPER_ITEM =
|
|
1099
|
-
T.let(
|
|
1100
|
-
:paper_item,
|
|
1101
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1102
|
-
)
|
|
1103
|
-
PAYMENT_ORDER =
|
|
1104
|
-
T.let(
|
|
1105
|
-
:payment_order,
|
|
1106
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1107
|
-
)
|
|
1108
|
-
RETURN =
|
|
1109
|
-
T.let(
|
|
1110
|
-
:return,
|
|
1111
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1112
|
-
)
|
|
1113
|
-
REVERSAL =
|
|
1114
|
-
T.let(
|
|
1115
|
-
:reversal,
|
|
1116
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1117
|
-
)
|
|
1118
|
-
|
|
1119
|
-
sig do
|
|
1120
|
-
override.returns(
|
|
1121
|
-
T::Array[
|
|
1122
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::LedgerableType::TaggedSymbol
|
|
1123
|
-
]
|
|
1124
|
-
)
|
|
1125
|
-
end
|
|
1126
|
-
def self.values
|
|
1127
|
-
end
|
|
1128
|
-
end
|
|
1129
|
-
|
|
1130
|
-
# To post a ledger transaction at creation, use `posted`.
|
|
1131
|
-
module Status
|
|
1132
|
-
extend ModernTreasury::Internal::Type::Enum
|
|
1133
|
-
|
|
1134
|
-
TaggedSymbol =
|
|
1135
|
-
T.type_alias do
|
|
1136
|
-
T.all(
|
|
1137
|
-
Symbol,
|
|
1138
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::Status
|
|
1139
|
-
)
|
|
1140
|
-
end
|
|
1141
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1142
|
-
|
|
1143
|
-
ARCHIVED =
|
|
1144
|
-
T.let(
|
|
1145
|
-
:archived,
|
|
1146
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::Status::TaggedSymbol
|
|
1147
|
-
)
|
|
1148
|
-
PENDING =
|
|
1149
|
-
T.let(
|
|
1150
|
-
:pending,
|
|
1151
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::Status::TaggedSymbol
|
|
1152
|
-
)
|
|
1153
|
-
POSTED =
|
|
1154
|
-
T.let(
|
|
1155
|
-
:posted,
|
|
1156
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::Status::TaggedSymbol
|
|
1157
|
-
)
|
|
1158
|
-
|
|
1159
|
-
sig do
|
|
1160
|
-
override.returns(
|
|
1161
|
-
T::Array[
|
|
1162
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::LedgerTransaction::Status::TaggedSymbol
|
|
1163
|
-
]
|
|
1164
|
-
)
|
|
1165
|
-
end
|
|
1166
|
-
def self.values
|
|
1167
|
-
end
|
|
1168
|
-
end
|
|
1169
|
-
end
|
|
1170
|
-
|
|
1171
699
|
class LineItem < ModernTreasury::Internal::Type::BaseModel
|
|
1172
700
|
OrHash =
|
|
1173
701
|
T.type_alias do
|
|
@@ -1318,11 +846,7 @@ module ModernTreasury
|
|
|
1318
846
|
|
|
1319
847
|
sig do
|
|
1320
848
|
returns(
|
|
1321
|
-
T.nilable(
|
|
1322
|
-
T::Array[
|
|
1323
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail
|
|
1324
|
-
]
|
|
1325
|
-
)
|
|
849
|
+
T.nilable(T::Array[ModernTreasury::ContactDetailCreateRequest])
|
|
1326
850
|
)
|
|
1327
851
|
end
|
|
1328
852
|
attr_reader :contact_details
|
|
@@ -1330,31 +854,26 @@ module ModernTreasury
|
|
|
1330
854
|
sig do
|
|
1331
855
|
params(
|
|
1332
856
|
contact_details:
|
|
1333
|
-
T::Array[
|
|
1334
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::OrHash
|
|
1335
|
-
]
|
|
857
|
+
T::Array[ModernTreasury::ContactDetailCreateRequest::OrHash]
|
|
1336
858
|
).void
|
|
1337
859
|
end
|
|
1338
860
|
attr_writer :contact_details
|
|
1339
861
|
|
|
862
|
+
# An optional user-defined 180 character unique identifier.
|
|
863
|
+
sig { returns(T.nilable(String)) }
|
|
864
|
+
attr_accessor :external_id
|
|
865
|
+
|
|
1340
866
|
# Specifies a ledger account object that will be created with the external
|
|
1341
867
|
# account. The resulting ledger account is linked to the external account for
|
|
1342
868
|
# auto-ledgering Payment objects. See
|
|
1343
869
|
# https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
|
|
1344
870
|
# for more details.
|
|
1345
|
-
sig
|
|
1346
|
-
returns(
|
|
1347
|
-
T.nilable(
|
|
1348
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount
|
|
1349
|
-
)
|
|
1350
|
-
)
|
|
1351
|
-
end
|
|
871
|
+
sig { returns(T.nilable(ModernTreasury::LedgerAccountCreateRequest)) }
|
|
1352
872
|
attr_reader :ledger_account
|
|
1353
873
|
|
|
1354
874
|
sig do
|
|
1355
875
|
params(
|
|
1356
|
-
ledger_account:
|
|
1357
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::OrHash
|
|
876
|
+
ledger_account: ModernTreasury::LedgerAccountCreateRequest::OrHash
|
|
1358
877
|
).void
|
|
1359
878
|
end
|
|
1360
879
|
attr_writer :ledger_account
|
|
@@ -1373,20 +892,11 @@ module ModernTreasury
|
|
|
1373
892
|
attr_accessor :name
|
|
1374
893
|
|
|
1375
894
|
# Required if receiving wire payments.
|
|
1376
|
-
sig
|
|
1377
|
-
returns(
|
|
1378
|
-
T.nilable(
|
|
1379
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::PartyAddress
|
|
1380
|
-
)
|
|
1381
|
-
)
|
|
1382
|
-
end
|
|
895
|
+
sig { returns(T.nilable(ModernTreasury::AddressRequest)) }
|
|
1383
896
|
attr_reader :party_address
|
|
1384
897
|
|
|
1385
898
|
sig do
|
|
1386
|
-
params(
|
|
1387
|
-
party_address:
|
|
1388
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::PartyAddress::OrHash
|
|
1389
|
-
).void
|
|
899
|
+
params(party_address: ModernTreasury::AddressRequest::OrHash).void
|
|
1390
900
|
end
|
|
1391
901
|
attr_writer :party_address
|
|
1392
902
|
|
|
@@ -1453,15 +963,12 @@ module ModernTreasury
|
|
|
1453
963
|
],
|
|
1454
964
|
account_type: ModernTreasury::ExternalAccountType::OrSymbol,
|
|
1455
965
|
contact_details:
|
|
1456
|
-
T::Array[
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
ledger_account:
|
|
1460
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::OrHash,
|
|
966
|
+
T::Array[ModernTreasury::ContactDetailCreateRequest::OrHash],
|
|
967
|
+
external_id: T.nilable(String),
|
|
968
|
+
ledger_account: ModernTreasury::LedgerAccountCreateRequest::OrHash,
|
|
1461
969
|
metadata: T::Hash[Symbol, String],
|
|
1462
970
|
name: T.nilable(String),
|
|
1463
|
-
party_address:
|
|
1464
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::PartyAddress::OrHash,
|
|
971
|
+
party_address: ModernTreasury::AddressRequest::OrHash,
|
|
1465
972
|
party_identifier: String,
|
|
1466
973
|
party_name: String,
|
|
1467
974
|
party_type:
|
|
@@ -1480,6 +987,8 @@ module ModernTreasury
|
|
|
1480
987
|
# Can be `checking`, `savings` or `other`.
|
|
1481
988
|
account_type: nil,
|
|
1482
989
|
contact_details: nil,
|
|
990
|
+
# An optional user-defined 180 character unique identifier.
|
|
991
|
+
external_id: nil,
|
|
1483
992
|
# Specifies a ledger account object that will be created with the external
|
|
1484
993
|
# account. The resulting ledger account is linked to the external account for
|
|
1485
994
|
# auto-ledgering Payment objects. See
|
|
@@ -1515,15 +1024,12 @@ module ModernTreasury
|
|
|
1515
1024
|
],
|
|
1516
1025
|
account_type: ModernTreasury::ExternalAccountType::OrSymbol,
|
|
1517
1026
|
contact_details:
|
|
1518
|
-
T::Array[
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
ledger_account:
|
|
1522
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount,
|
|
1027
|
+
T::Array[ModernTreasury::ContactDetailCreateRequest],
|
|
1028
|
+
external_id: T.nilable(String),
|
|
1029
|
+
ledger_account: ModernTreasury::LedgerAccountCreateRequest,
|
|
1523
1030
|
metadata: T::Hash[Symbol, String],
|
|
1524
1031
|
name: T.nilable(String),
|
|
1525
|
-
party_address:
|
|
1526
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::PartyAddress,
|
|
1032
|
+
party_address: ModernTreasury::AddressRequest,
|
|
1527
1033
|
party_identifier: String,
|
|
1528
1034
|
party_name: String,
|
|
1529
1035
|
party_type:
|
|
@@ -1687,366 +1193,6 @@ module ModernTreasury
|
|
|
1687
1193
|
end
|
|
1688
1194
|
end
|
|
1689
1195
|
|
|
1690
|
-
class ContactDetail < ModernTreasury::Internal::Type::BaseModel
|
|
1691
|
-
OrHash =
|
|
1692
|
-
T.type_alias do
|
|
1693
|
-
T.any(
|
|
1694
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail,
|
|
1695
|
-
ModernTreasury::Internal::AnyHash
|
|
1696
|
-
)
|
|
1697
|
-
end
|
|
1698
|
-
|
|
1699
|
-
sig { returns(T.nilable(String)) }
|
|
1700
|
-
attr_reader :contact_identifier
|
|
1701
|
-
|
|
1702
|
-
sig { params(contact_identifier: String).void }
|
|
1703
|
-
attr_writer :contact_identifier
|
|
1704
|
-
|
|
1705
|
-
sig do
|
|
1706
|
-
returns(
|
|
1707
|
-
T.nilable(
|
|
1708
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
|
|
1709
|
-
)
|
|
1710
|
-
)
|
|
1711
|
-
end
|
|
1712
|
-
attr_reader :contact_identifier_type
|
|
1713
|
-
|
|
1714
|
-
sig do
|
|
1715
|
-
params(
|
|
1716
|
-
contact_identifier_type:
|
|
1717
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
|
|
1718
|
-
).void
|
|
1719
|
-
end
|
|
1720
|
-
attr_writer :contact_identifier_type
|
|
1721
|
-
|
|
1722
|
-
sig do
|
|
1723
|
-
params(
|
|
1724
|
-
contact_identifier: String,
|
|
1725
|
-
contact_identifier_type:
|
|
1726
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
|
|
1727
|
-
).returns(T.attached_class)
|
|
1728
|
-
end
|
|
1729
|
-
def self.new(contact_identifier: nil, contact_identifier_type: nil)
|
|
1730
|
-
end
|
|
1731
|
-
|
|
1732
|
-
sig do
|
|
1733
|
-
override.returns(
|
|
1734
|
-
{
|
|
1735
|
-
contact_identifier: String,
|
|
1736
|
-
contact_identifier_type:
|
|
1737
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
|
|
1738
|
-
}
|
|
1739
|
-
)
|
|
1740
|
-
end
|
|
1741
|
-
def to_hash
|
|
1742
|
-
end
|
|
1743
|
-
|
|
1744
|
-
module ContactIdentifierType
|
|
1745
|
-
extend ModernTreasury::Internal::Type::Enum
|
|
1746
|
-
|
|
1747
|
-
TaggedSymbol =
|
|
1748
|
-
T.type_alias do
|
|
1749
|
-
T.all(
|
|
1750
|
-
Symbol,
|
|
1751
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::ContactIdentifierType
|
|
1752
|
-
)
|
|
1753
|
-
end
|
|
1754
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1755
|
-
|
|
1756
|
-
EMAIL =
|
|
1757
|
-
T.let(
|
|
1758
|
-
:email,
|
|
1759
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
|
|
1760
|
-
)
|
|
1761
|
-
PHONE_NUMBER =
|
|
1762
|
-
T.let(
|
|
1763
|
-
:phone_number,
|
|
1764
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
|
|
1765
|
-
)
|
|
1766
|
-
WEBSITE =
|
|
1767
|
-
T.let(
|
|
1768
|
-
:website,
|
|
1769
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
|
|
1770
|
-
)
|
|
1771
|
-
|
|
1772
|
-
sig do
|
|
1773
|
-
override.returns(
|
|
1774
|
-
T::Array[
|
|
1775
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
|
|
1776
|
-
]
|
|
1777
|
-
)
|
|
1778
|
-
end
|
|
1779
|
-
def self.values
|
|
1780
|
-
end
|
|
1781
|
-
end
|
|
1782
|
-
end
|
|
1783
|
-
|
|
1784
|
-
class LedgerAccount < ModernTreasury::Internal::Type::BaseModel
|
|
1785
|
-
OrHash =
|
|
1786
|
-
T.type_alias do
|
|
1787
|
-
T.any(
|
|
1788
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount,
|
|
1789
|
-
ModernTreasury::Internal::AnyHash
|
|
1790
|
-
)
|
|
1791
|
-
end
|
|
1792
|
-
|
|
1793
|
-
# The currency of the ledger account.
|
|
1794
|
-
sig { returns(String) }
|
|
1795
|
-
attr_accessor :currency
|
|
1796
|
-
|
|
1797
|
-
# The id of the ledger that this account belongs to.
|
|
1798
|
-
sig { returns(String) }
|
|
1799
|
-
attr_accessor :ledger_id
|
|
1800
|
-
|
|
1801
|
-
# The name of the ledger account.
|
|
1802
|
-
sig { returns(String) }
|
|
1803
|
-
attr_accessor :name
|
|
1804
|
-
|
|
1805
|
-
# The normal balance of the ledger account.
|
|
1806
|
-
sig { returns(ModernTreasury::TransactionDirection::OrSymbol) }
|
|
1807
|
-
attr_accessor :normal_balance
|
|
1808
|
-
|
|
1809
|
-
# The currency exponent of the ledger account.
|
|
1810
|
-
sig { returns(T.nilable(Integer)) }
|
|
1811
|
-
attr_accessor :currency_exponent
|
|
1812
|
-
|
|
1813
|
-
# The description of the ledger account.
|
|
1814
|
-
sig { returns(T.nilable(String)) }
|
|
1815
|
-
attr_accessor :description
|
|
1816
|
-
|
|
1817
|
-
# The array of ledger account category ids that this ledger account should be a
|
|
1818
|
-
# child of.
|
|
1819
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
1820
|
-
attr_reader :ledger_account_category_ids
|
|
1821
|
-
|
|
1822
|
-
sig { params(ledger_account_category_ids: T::Array[String]).void }
|
|
1823
|
-
attr_writer :ledger_account_category_ids
|
|
1824
|
-
|
|
1825
|
-
# If the ledger account links to another object in Modern Treasury, the id will be
|
|
1826
|
-
# populated here, otherwise null.
|
|
1827
|
-
sig { returns(T.nilable(String)) }
|
|
1828
|
-
attr_reader :ledgerable_id
|
|
1829
|
-
|
|
1830
|
-
sig { params(ledgerable_id: String).void }
|
|
1831
|
-
attr_writer :ledgerable_id
|
|
1832
|
-
|
|
1833
|
-
# If the ledger account links to another object in Modern Treasury, the type will
|
|
1834
|
-
# be populated here, otherwise null. The value is one of internal_account or
|
|
1835
|
-
# external_account.
|
|
1836
|
-
sig do
|
|
1837
|
-
returns(
|
|
1838
|
-
T.nilable(
|
|
1839
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol
|
|
1840
|
-
)
|
|
1841
|
-
)
|
|
1842
|
-
end
|
|
1843
|
-
attr_reader :ledgerable_type
|
|
1844
|
-
|
|
1845
|
-
sig do
|
|
1846
|
-
params(
|
|
1847
|
-
ledgerable_type:
|
|
1848
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol
|
|
1849
|
-
).void
|
|
1850
|
-
end
|
|
1851
|
-
attr_writer :ledgerable_type
|
|
1852
|
-
|
|
1853
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
1854
|
-
# strings.
|
|
1855
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
1856
|
-
attr_reader :metadata
|
|
1857
|
-
|
|
1858
|
-
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
1859
|
-
attr_writer :metadata
|
|
1860
|
-
|
|
1861
|
-
# Specifies a ledger account object that will be created with the external
|
|
1862
|
-
# account. The resulting ledger account is linked to the external account for
|
|
1863
|
-
# auto-ledgering Payment objects. See
|
|
1864
|
-
# https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
|
|
1865
|
-
# for more details.
|
|
1866
|
-
sig do
|
|
1867
|
-
params(
|
|
1868
|
-
currency: String,
|
|
1869
|
-
ledger_id: String,
|
|
1870
|
-
name: String,
|
|
1871
|
-
normal_balance: ModernTreasury::TransactionDirection::OrSymbol,
|
|
1872
|
-
currency_exponent: T.nilable(Integer),
|
|
1873
|
-
description: T.nilable(String),
|
|
1874
|
-
ledger_account_category_ids: T::Array[String],
|
|
1875
|
-
ledgerable_id: String,
|
|
1876
|
-
ledgerable_type:
|
|
1877
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol,
|
|
1878
|
-
metadata: T::Hash[Symbol, String]
|
|
1879
|
-
).returns(T.attached_class)
|
|
1880
|
-
end
|
|
1881
|
-
def self.new(
|
|
1882
|
-
# The currency of the ledger account.
|
|
1883
|
-
currency:,
|
|
1884
|
-
# The id of the ledger that this account belongs to.
|
|
1885
|
-
ledger_id:,
|
|
1886
|
-
# The name of the ledger account.
|
|
1887
|
-
name:,
|
|
1888
|
-
# The normal balance of the ledger account.
|
|
1889
|
-
normal_balance:,
|
|
1890
|
-
# The currency exponent of the ledger account.
|
|
1891
|
-
currency_exponent: nil,
|
|
1892
|
-
# The description of the ledger account.
|
|
1893
|
-
description: nil,
|
|
1894
|
-
# The array of ledger account category ids that this ledger account should be a
|
|
1895
|
-
# child of.
|
|
1896
|
-
ledger_account_category_ids: nil,
|
|
1897
|
-
# If the ledger account links to another object in Modern Treasury, the id will be
|
|
1898
|
-
# populated here, otherwise null.
|
|
1899
|
-
ledgerable_id: nil,
|
|
1900
|
-
# If the ledger account links to another object in Modern Treasury, the type will
|
|
1901
|
-
# be populated here, otherwise null. The value is one of internal_account or
|
|
1902
|
-
# external_account.
|
|
1903
|
-
ledgerable_type: nil,
|
|
1904
|
-
# Additional data represented as key-value pairs. Both the key and value must be
|
|
1905
|
-
# strings.
|
|
1906
|
-
metadata: nil
|
|
1907
|
-
)
|
|
1908
|
-
end
|
|
1909
|
-
|
|
1910
|
-
sig do
|
|
1911
|
-
override.returns(
|
|
1912
|
-
{
|
|
1913
|
-
currency: String,
|
|
1914
|
-
ledger_id: String,
|
|
1915
|
-
name: String,
|
|
1916
|
-
normal_balance: ModernTreasury::TransactionDirection::OrSymbol,
|
|
1917
|
-
currency_exponent: T.nilable(Integer),
|
|
1918
|
-
description: T.nilable(String),
|
|
1919
|
-
ledger_account_category_ids: T::Array[String],
|
|
1920
|
-
ledgerable_id: String,
|
|
1921
|
-
ledgerable_type:
|
|
1922
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol,
|
|
1923
|
-
metadata: T::Hash[Symbol, String]
|
|
1924
|
-
}
|
|
1925
|
-
)
|
|
1926
|
-
end
|
|
1927
|
-
def to_hash
|
|
1928
|
-
end
|
|
1929
|
-
|
|
1930
|
-
# If the ledger account links to another object in Modern Treasury, the type will
|
|
1931
|
-
# be populated here, otherwise null. The value is one of internal_account or
|
|
1932
|
-
# external_account.
|
|
1933
|
-
module LedgerableType
|
|
1934
|
-
extend ModernTreasury::Internal::Type::Enum
|
|
1935
|
-
|
|
1936
|
-
TaggedSymbol =
|
|
1937
|
-
T.type_alias do
|
|
1938
|
-
T.all(
|
|
1939
|
-
Symbol,
|
|
1940
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType
|
|
1941
|
-
)
|
|
1942
|
-
end
|
|
1943
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1944
|
-
|
|
1945
|
-
COUNTERPARTY =
|
|
1946
|
-
T.let(
|
|
1947
|
-
:counterparty,
|
|
1948
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
1949
|
-
)
|
|
1950
|
-
EXTERNAL_ACCOUNT =
|
|
1951
|
-
T.let(
|
|
1952
|
-
:external_account,
|
|
1953
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
1954
|
-
)
|
|
1955
|
-
INTERNAL_ACCOUNT =
|
|
1956
|
-
T.let(
|
|
1957
|
-
:internal_account,
|
|
1958
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
1959
|
-
)
|
|
1960
|
-
VIRTUAL_ACCOUNT =
|
|
1961
|
-
T.let(
|
|
1962
|
-
:virtual_account,
|
|
1963
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
1964
|
-
)
|
|
1965
|
-
|
|
1966
|
-
sig do
|
|
1967
|
-
override.returns(
|
|
1968
|
-
T::Array[
|
|
1969
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
|
|
1970
|
-
]
|
|
1971
|
-
)
|
|
1972
|
-
end
|
|
1973
|
-
def self.values
|
|
1974
|
-
end
|
|
1975
|
-
end
|
|
1976
|
-
end
|
|
1977
|
-
|
|
1978
|
-
class PartyAddress < ModernTreasury::Internal::Type::BaseModel
|
|
1979
|
-
OrHash =
|
|
1980
|
-
T.type_alias do
|
|
1981
|
-
T.any(
|
|
1982
|
-
ModernTreasury::PaymentOrderCreateAsyncParams::ReceivingAccount::PartyAddress,
|
|
1983
|
-
ModernTreasury::Internal::AnyHash
|
|
1984
|
-
)
|
|
1985
|
-
end
|
|
1986
|
-
|
|
1987
|
-
# Country code conforms to [ISO 3166-1 alpha-2]
|
|
1988
|
-
sig { returns(T.nilable(String)) }
|
|
1989
|
-
attr_accessor :country
|
|
1990
|
-
|
|
1991
|
-
sig { returns(T.nilable(String)) }
|
|
1992
|
-
attr_accessor :line1
|
|
1993
|
-
|
|
1994
|
-
sig { returns(T.nilable(String)) }
|
|
1995
|
-
attr_accessor :line2
|
|
1996
|
-
|
|
1997
|
-
# Locality or City.
|
|
1998
|
-
sig { returns(T.nilable(String)) }
|
|
1999
|
-
attr_accessor :locality
|
|
2000
|
-
|
|
2001
|
-
# The postal code of the address.
|
|
2002
|
-
sig { returns(T.nilable(String)) }
|
|
2003
|
-
attr_accessor :postal_code
|
|
2004
|
-
|
|
2005
|
-
# Region or State.
|
|
2006
|
-
sig { returns(T.nilable(String)) }
|
|
2007
|
-
attr_accessor :region
|
|
2008
|
-
|
|
2009
|
-
# Required if receiving wire payments.
|
|
2010
|
-
sig do
|
|
2011
|
-
params(
|
|
2012
|
-
country: T.nilable(String),
|
|
2013
|
-
line1: T.nilable(String),
|
|
2014
|
-
line2: T.nilable(String),
|
|
2015
|
-
locality: T.nilable(String),
|
|
2016
|
-
postal_code: T.nilable(String),
|
|
2017
|
-
region: T.nilable(String)
|
|
2018
|
-
).returns(T.attached_class)
|
|
2019
|
-
end
|
|
2020
|
-
def self.new(
|
|
2021
|
-
# Country code conforms to [ISO 3166-1 alpha-2]
|
|
2022
|
-
country: nil,
|
|
2023
|
-
line1: nil,
|
|
2024
|
-
line2: nil,
|
|
2025
|
-
# Locality or City.
|
|
2026
|
-
locality: nil,
|
|
2027
|
-
# The postal code of the address.
|
|
2028
|
-
postal_code: nil,
|
|
2029
|
-
# Region or State.
|
|
2030
|
-
region: nil
|
|
2031
|
-
)
|
|
2032
|
-
end
|
|
2033
|
-
|
|
2034
|
-
sig do
|
|
2035
|
-
override.returns(
|
|
2036
|
-
{
|
|
2037
|
-
country: T.nilable(String),
|
|
2038
|
-
line1: T.nilable(String),
|
|
2039
|
-
line2: T.nilable(String),
|
|
2040
|
-
locality: T.nilable(String),
|
|
2041
|
-
postal_code: T.nilable(String),
|
|
2042
|
-
region: T.nilable(String)
|
|
2043
|
-
}
|
|
2044
|
-
)
|
|
2045
|
-
end
|
|
2046
|
-
def to_hash
|
|
2047
|
-
end
|
|
2048
|
-
end
|
|
2049
|
-
|
|
2050
1196
|
# Either `individual` or `business`.
|
|
2051
1197
|
module PartyType
|
|
2052
1198
|
extend ModernTreasury::Internal::Type::Enum
|