modern_treasury 0.1.0.pre.alpha.19 → 0.1.0.pre.alpha.20
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 +31 -0
- data/README.md +108 -59
- data/SECURITY.md +2 -2
- data/lib/modern_treasury/client.rb +9 -5
- data/lib/modern_treasury/internal/transport/pooled_net_requester.rb +3 -1
- data/lib/modern_treasury/internal/type/array_of.rb +8 -0
- data/lib/modern_treasury/internal/type/base_model.rb +14 -0
- data/lib/modern_treasury/internal/type/boolean.rb +8 -0
- data/lib/modern_treasury/internal/type/enum.rb +12 -0
- data/lib/modern_treasury/internal/type/file_input.rb +7 -0
- data/lib/modern_treasury/internal/type/hash_of.rb +8 -0
- data/lib/modern_treasury/internal/type/union.rb +12 -0
- data/lib/modern_treasury/internal/type/unknown.rb +8 -0
- data/lib/modern_treasury/internal/util.rb +50 -1
- data/lib/modern_treasury/internal.rb +3 -0
- data/lib/modern_treasury/models/account_collection_flow.rb +8 -8
- data/lib/modern_treasury/models/account_collection_flow_create_params.rb +2 -2
- data/lib/modern_treasury/models/account_collection_flow_update_params.rb +2 -2
- data/lib/modern_treasury/models/account_detail.rb +8 -4
- data/lib/modern_treasury/models/account_detail_create_params.rb +8 -4
- data/lib/modern_treasury/models/account_detail_delete_params.rb +2 -2
- data/lib/modern_treasury/models/account_detail_list_params.rb +2 -2
- data/lib/modern_treasury/models/account_detail_retrieve_params.rb +2 -2
- data/lib/modern_treasury/models/bank_settings.rb +1 -1
- data/lib/modern_treasury/models/bulk_request.rb +11 -10
- data/lib/modern_treasury/models/bulk_request_create_params.rb +252 -247
- data/lib/modern_treasury/models/bulk_request_list_params.rb +7 -6
- data/lib/modern_treasury/models/bulk_result.rb +18 -29
- data/lib/modern_treasury/models/bulk_result_list_params.rb +7 -6
- data/lib/modern_treasury/models/connection.rb +1 -1
- data/lib/modern_treasury/models/connection_legal_entity.rb +4 -4
- data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +108 -72
- data/lib/modern_treasury/models/connection_legal_entity_list_params.rb +2 -2
- data/lib/modern_treasury/models/connection_legal_entity_update_params.rb +2 -2
- data/lib/modern_treasury/models/counterparty.rb +32 -32
- data/lib/modern_treasury/models/counterparty_collect_account_params.rb +4 -4
- data/lib/modern_treasury/models/counterparty_collect_account_response.rb +1 -1
- data/lib/modern_treasury/models/counterparty_create_params.rb +166 -121
- data/lib/modern_treasury/models/currency.rb +7 -0
- data/lib/modern_treasury/models/document.rb +13 -13
- data/lib/modern_treasury/models/document_create_params.rb +6 -6
- data/lib/modern_treasury/models/document_list_params.rb +4 -4
- data/lib/modern_treasury/models/event.rb +2 -2
- data/lib/modern_treasury/models/expected_payment.rb +16 -16
- data/lib/modern_treasury/models/expected_payment_create_params.rb +27 -26
- data/lib/modern_treasury/models/expected_payment_list_params.rb +27 -7
- data/lib/modern_treasury/models/expected_payment_type.rb +4 -0
- data/lib/modern_treasury/models/expected_payment_update_params.rb +10 -10
- data/lib/modern_treasury/models/external_account.rb +26 -26
- data/lib/modern_treasury/models/external_account_create_params.rb +41 -32
- data/lib/modern_treasury/models/external_account_type.rb +5 -0
- data/lib/modern_treasury/models/external_account_update_params.rb +6 -6
- data/lib/modern_treasury/models/external_account_verify_params.rb +12 -8
- data/lib/modern_treasury/models/external_account_verify_response.rb +5 -10
- data/lib/modern_treasury/models/foreign_exchange_quote.rb +10 -9
- data/lib/modern_treasury/models/foreign_exchange_quote_create_params.rb +4 -4
- data/lib/modern_treasury/models/incoming_payment_detail.rb +23 -19
- data/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rb +6 -6
- data/lib/modern_treasury/models/incoming_payment_detail_list_params.rb +6 -6
- data/lib/modern_treasury/models/internal_account.rb +24 -19
- data/lib/modern_treasury/models/internal_account_create_params.rb +37 -5
- data/lib/modern_treasury/models/internal_account_list_params.rb +10 -6
- data/lib/modern_treasury/models/internal_accounts/balance_report.rb +13 -12
- data/lib/modern_treasury/models/internal_accounts/balance_report_create_params.rb +9 -9
- data/lib/modern_treasury/models/internal_accounts/balance_report_list_params.rb +2 -2
- data/lib/modern_treasury/models/invoice.rb +34 -34
- data/lib/modern_treasury/models/invoice_create_params.rb +21 -21
- data/lib/modern_treasury/models/invoice_list_params.rb +2 -2
- data/lib/modern_treasury/models/invoice_update_params.rb +21 -21
- data/lib/modern_treasury/models/invoices/invoice_line_item.rb +10 -2
- data/lib/modern_treasury/models/ledger.rb +2 -2
- data/lib/modern_treasury/models/ledger_account.rb +19 -19
- data/lib/modern_treasury/models/ledger_account_balance_monitor.rb +23 -22
- data/lib/modern_treasury/models/ledger_account_balance_monitor_create_params.rb +4 -4
- data/lib/modern_treasury/models/ledger_account_category.rb +16 -16
- data/lib/modern_treasury/models/ledger_account_category_create_params.rb +2 -2
- data/lib/modern_treasury/models/ledger_account_category_list_params.rb +2 -2
- data/lib/modern_treasury/models/ledger_account_category_retrieve_params.rb +2 -2
- data/lib/modern_treasury/models/ledger_account_create_params.rb +4 -4
- data/lib/modern_treasury/models/ledger_account_list_params.rb +8 -8
- data/lib/modern_treasury/models/ledger_account_retrieve_params.rb +2 -2
- data/lib/modern_treasury/models/ledger_account_settlement.rb +4 -4
- data/lib/modern_treasury/models/ledger_account_settlement_create_params.rb +2 -2
- data/lib/modern_treasury/models/ledger_account_settlement_update_params.rb +2 -2
- data/lib/modern_treasury/models/ledger_account_statement_create_response.rb +2 -2
- data/lib/modern_treasury/models/ledger_account_statement_retrieve_response.rb +2 -2
- data/lib/modern_treasury/models/ledger_entry.rb +20 -19
- data/lib/modern_treasury/models/ledger_entry_list_params.rb +12 -12
- data/lib/modern_treasury/models/ledger_event_handler.rb +12 -12
- data/lib/modern_treasury/models/ledger_event_handler_create_params.rb +10 -10
- data/lib/modern_treasury/models/ledger_event_handler_variable.rb +4 -4
- data/lib/modern_treasury/models/ledger_transaction.rb +9 -9
- data/lib/modern_treasury/models/ledger_transaction_create_params.rb +10 -9
- data/lib/modern_treasury/models/ledger_transaction_create_partial_post_params.rb +6 -6
- data/lib/modern_treasury/models/ledger_transaction_create_reversal_params.rb +4 -4
- data/lib/modern_treasury/models/ledger_transaction_list_params.rb +12 -12
- data/lib/modern_treasury/models/ledger_transaction_update_params.rb +10 -9
- data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +30 -29
- data/lib/modern_treasury/models/ledgerable_event.rb +1 -1
- data/lib/modern_treasury/models/legal_entity.rb +52 -34
- data/lib/modern_treasury/models/legal_entity_association.rb +59 -40
- data/lib/modern_treasury/models/legal_entity_association_create_params.rb +54 -36
- data/lib/modern_treasury/models/legal_entity_compliance_detail.rb +1 -1
- data/lib/modern_treasury/models/legal_entity_create_params.rb +102 -65
- data/lib/modern_treasury/models/legal_entity_industry_classification.rb +4 -4
- data/lib/modern_treasury/models/legal_entity_list_params.rb +2 -2
- data/lib/modern_treasury/models/legal_entity_update_params.rb +44 -25
- data/lib/modern_treasury/models/line_item.rb +9 -9
- data/lib/modern_treasury/models/line_item_list_params.rb +2 -2
- data/lib/modern_treasury/models/line_item_retrieve_params.rb +2 -2
- data/lib/modern_treasury/models/line_item_update_params.rb +2 -2
- data/lib/modern_treasury/models/paper_item.rb +16 -7
- data/lib/modern_treasury/models/payment_action_create_params.rb +59 -0
- data/lib/modern_treasury/models/payment_action_create_response.rb +100 -0
- data/lib/modern_treasury/models/payment_action_list_params.rb +157 -0
- data/lib/modern_treasury/models/payment_action_list_response.rb +100 -0
- data/lib/modern_treasury/models/payment_action_retrieve_params.rb +14 -0
- data/lib/modern_treasury/models/payment_action_retrieve_response.rb +100 -0
- data/lib/modern_treasury/models/payment_action_update_params.rb +44 -0
- data/lib/modern_treasury/models/payment_action_update_response.rb +100 -0
- data/lib/modern_treasury/models/payment_flow.rb +13 -13
- data/lib/modern_treasury/models/payment_flow_create_params.rb +2 -2
- data/lib/modern_treasury/models/payment_flow_update_params.rb +2 -2
- data/lib/modern_treasury/models/payment_order.rb +57 -86
- data/lib/modern_treasury/models/payment_order_create_async_params.rb +86 -76
- data/lib/modern_treasury/models/payment_order_create_params.rb +95 -85
- data/lib/modern_treasury/models/payment_order_list_params.rb +12 -8
- data/lib/modern_treasury/models/payment_order_type.rb +4 -0
- data/lib/modern_treasury/models/payment_order_update_params.rb +72 -63
- data/lib/modern_treasury/models/payment_orders/reversal.rb +7 -7
- data/lib/modern_treasury/models/payment_orders/reversal_create_params.rb +17 -17
- data/lib/modern_treasury/models/payment_reference.rb +11 -7
- data/lib/modern_treasury/models/payment_reference_list_params.rb +2 -2
- data/lib/modern_treasury/models/reconciliation_rule.rb +13 -9
- data/lib/modern_treasury/models/return_create_params.rb +44 -4
- data/lib/modern_treasury/models/return_list_params.rb +2 -2
- data/lib/modern_treasury/models/return_object.rb +78 -27
- data/lib/modern_treasury/models/routing_detail.rb +15 -11
- data/lib/modern_treasury/models/routing_detail_create_params.rb +10 -6
- data/lib/modern_treasury/models/routing_detail_delete_params.rb +2 -2
- data/lib/modern_treasury/models/routing_detail_list_params.rb +2 -2
- data/lib/modern_treasury/models/routing_detail_retrieve_params.rb +2 -2
- data/lib/modern_treasury/models/routing_number_lookup_request.rb +13 -9
- data/lib/modern_treasury/models/transaction.rb +23 -17
- data/lib/modern_treasury/models/transaction_create_params.rb +6 -2
- data/lib/modern_treasury/models/transactions/line_item_list_params.rb +2 -2
- data/lib/modern_treasury/models/transactions/transaction_line_item.rb +7 -7
- data/lib/modern_treasury/models/validation_validate_routing_number_params.rb +2 -2
- data/lib/modern_treasury/models/virtual_account.rb +5 -5
- data/lib/modern_treasury/models/virtual_account_create_params.rb +34 -23
- data/lib/modern_treasury/models/wealth_and_employment_details.rb +19 -19
- data/lib/modern_treasury/models.rb +38 -19
- data/lib/modern_treasury/resources/account_collection_flows.rb +6 -6
- data/lib/modern_treasury/resources/account_details.rb +8 -8
- data/lib/modern_treasury/resources/bulk_requests.rb +9 -9
- data/lib/modern_treasury/resources/bulk_results.rb +5 -5
- data/lib/modern_treasury/resources/connection_legal_entities.rb +7 -7
- data/lib/modern_treasury/resources/connections.rb +1 -1
- data/lib/modern_treasury/resources/counterparties.rb +12 -12
- data/lib/modern_treasury/resources/documents.rb +6 -6
- data/lib/modern_treasury/resources/events.rb +2 -2
- data/lib/modern_treasury/resources/expected_payments.rb +24 -20
- data/lib/modern_treasury/resources/external_accounts.rb +20 -20
- data/lib/modern_treasury/resources/foreign_exchange_quotes.rb +5 -5
- data/lib/modern_treasury/resources/incoming_payment_details.rb +10 -10
- data/lib/modern_treasury/resources/internal_accounts/balance_reports.rb +6 -6
- data/lib/modern_treasury/resources/internal_accounts.rb +12 -10
- data/lib/modern_treasury/resources/invoices/line_items.rb +5 -5
- data/lib/modern_treasury/resources/invoices.rb +21 -21
- data/lib/modern_treasury/resources/ledger_account_balance_monitors.rb +6 -6
- data/lib/modern_treasury/resources/ledger_account_categories.rb +8 -8
- data/lib/modern_treasury/resources/ledger_account_settlements.rb +6 -6
- data/lib/modern_treasury/resources/ledger_accounts.rb +12 -12
- data/lib/modern_treasury/resources/ledger_entries.rb +6 -6
- data/lib/modern_treasury/resources/ledger_event_handlers.rb +7 -7
- data/lib/modern_treasury/resources/ledger_transactions/versions.rb +1 -1
- data/lib/modern_treasury/resources/ledger_transactions.rb +18 -18
- data/lib/modern_treasury/resources/ledgerable_events.rb +2 -2
- data/lib/modern_treasury/resources/ledgers.rb +5 -5
- data/lib/modern_treasury/resources/legal_entities.rb +25 -25
- data/lib/modern_treasury/resources/legal_entity_associations.rb +3 -3
- data/lib/modern_treasury/resources/line_items.rb +6 -6
- data/lib/modern_treasury/resources/paper_items.rb +2 -2
- data/lib/modern_treasury/resources/payment_actions.rb +137 -0
- data/lib/modern_treasury/resources/payment_flows.rb +6 -6
- data/lib/modern_treasury/resources/payment_orders/reversals.rb +5 -5
- data/lib/modern_treasury/resources/payment_orders.rb +46 -46
- data/lib/modern_treasury/resources/payment_references.rb +3 -3
- data/lib/modern_treasury/resources/returns.rb +6 -6
- data/lib/modern_treasury/resources/routing_details.rb +9 -9
- data/lib/modern_treasury/resources/transactions/line_items.rb +4 -4
- data/lib/modern_treasury/resources/transactions.rb +5 -5
- data/lib/modern_treasury/resources/validations.rb +2 -2
- data/lib/modern_treasury/resources/virtual_accounts.rb +8 -8
- data/lib/modern_treasury/version.rb +1 -1
- data/lib/modern_treasury.rb +9 -0
- data/rbi/modern_treasury/client.rbi +3 -0
- data/rbi/modern_treasury/internal/transport/pooled_net_requester.rbi +5 -1
- data/rbi/modern_treasury/internal/type/array_of.rbi +6 -0
- data/rbi/modern_treasury/internal/type/base_model.rbi +5 -0
- data/rbi/modern_treasury/internal/type/boolean.rbi +6 -0
- data/rbi/modern_treasury/internal/type/enum.rbi +5 -0
- data/rbi/modern_treasury/internal/type/file_input.rbi +5 -0
- data/rbi/modern_treasury/internal/type/hash_of.rbi +6 -0
- data/rbi/modern_treasury/internal/type/union.rbi +5 -0
- data/rbi/modern_treasury/internal/type/unknown.rbi +6 -0
- data/rbi/modern_treasury/internal/util.rbi +34 -0
- data/rbi/modern_treasury/internal.rbi +5 -0
- data/rbi/modern_treasury/models/account_detail.rbi +20 -0
- data/rbi/modern_treasury/models/account_detail_create_params.rbi +20 -0
- data/rbi/modern_treasury/models/bulk_request.rbi +5 -0
- data/rbi/modern_treasury/models/bulk_request_create_params.rbi +105 -0
- data/rbi/modern_treasury/models/bulk_request_list_params.rbi +5 -0
- data/rbi/modern_treasury/models/bulk_result.rbi +7 -19
- data/rbi/modern_treasury/models/bulk_result_list_params.rbi +5 -0
- data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +52 -6
- data/rbi/modern_treasury/models/counterparty_create_params.rbi +92 -6
- data/rbi/modern_treasury/models/currency.rbi +7 -0
- data/rbi/modern_treasury/models/document.rbi +9 -6
- data/rbi/modern_treasury/models/document_create_params.rbi +12 -12
- data/rbi/modern_treasury/models/document_list_params.rbi +9 -9
- data/rbi/modern_treasury/models/expected_payment_list_params.rbi +42 -0
- data/rbi/modern_treasury/models/expected_payment_type.rbi +6 -0
- data/rbi/modern_treasury/models/external_account_create_params.rbi +40 -0
- data/rbi/modern_treasury/models/external_account_type.rbi +16 -0
- data/rbi/modern_treasury/models/external_account_verify_params.rbi +20 -0
- data/rbi/modern_treasury/models/external_account_verify_response.rbi +20 -0
- data/rbi/modern_treasury/models/incoming_payment_detail.rbi +20 -0
- data/rbi/modern_treasury/models/internal_account.rbi +25 -0
- data/rbi/modern_treasury/models/internal_account_create_params.rbi +117 -0
- data/rbi/modern_treasury/models/internal_account_list_params.rbi +20 -0
- data/rbi/modern_treasury/models/invoice.rbi +2 -2
- data/rbi/modern_treasury/models/invoices/invoice_line_item.rbi +8 -0
- data/rbi/modern_treasury/models/legal_entity.rbi +23 -0
- data/rbi/modern_treasury/models/legal_entity_association.rbi +23 -0
- data/rbi/modern_treasury/models/legal_entity_association_create_params.rbi +26 -3
- data/rbi/modern_treasury/models/legal_entity_create_params.rbi +52 -6
- data/rbi/modern_treasury/models/legal_entity_update_params.rbi +26 -3
- data/rbi/modern_treasury/models/paper_item.rbi +10 -0
- data/rbi/modern_treasury/models/payment_action_create_params.rbi +94 -0
- data/rbi/modern_treasury/models/payment_action_create_response.rbi +118 -0
- data/rbi/modern_treasury/models/payment_action_list_params.rbi +306 -0
- data/rbi/modern_treasury/models/payment_action_list_response.rbi +118 -0
- data/rbi/modern_treasury/models/payment_action_retrieve_params.rbi +32 -0
- data/rbi/modern_treasury/models/payment_action_retrieve_response.rbi +118 -0
- data/rbi/modern_treasury/models/payment_action_update_params.rbi +106 -0
- data/rbi/modern_treasury/models/payment_action_update_response.rbi +118 -0
- data/rbi/modern_treasury/models/payment_order.rbi +22 -38
- data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +40 -0
- data/rbi/modern_treasury/models/payment_order_create_params.rbi +52 -12
- data/rbi/modern_treasury/models/payment_order_list_params.rbi +20 -0
- data/rbi/modern_treasury/models/payment_order_type.rbi +5 -0
- data/rbi/modern_treasury/models/payment_order_update_params.rbi +40 -0
- data/rbi/modern_treasury/models/payment_reference.rbi +20 -0
- data/rbi/modern_treasury/models/reconciliation_rule.rbi +14 -0
- data/rbi/modern_treasury/models/return_create_params.rbi +80 -0
- data/rbi/modern_treasury/models/return_object.rbi +66 -0
- data/rbi/modern_treasury/models/routing_detail.rbi +17 -0
- data/rbi/modern_treasury/models/routing_detail_create_params.rbi +20 -0
- data/rbi/modern_treasury/models/routing_number_lookup_request.rbi +20 -0
- data/rbi/modern_treasury/models/transaction.rbi +16 -0
- data/rbi/modern_treasury/models/transaction_create_params.rbi +20 -0
- data/rbi/modern_treasury/models/virtual_account_create_params.rbi +40 -0
- data/rbi/modern_treasury/models.rbi +9 -0
- data/rbi/modern_treasury/resources/documents.rbi +1 -1
- data/rbi/modern_treasury/resources/expected_payments.rbi +6 -0
- data/rbi/modern_treasury/resources/external_accounts.rbi +1 -4
- data/rbi/modern_treasury/resources/internal_accounts.rbi +5 -0
- data/rbi/modern_treasury/resources/payment_actions.rbi +119 -0
- data/sig/modern_treasury/client.rbs +2 -0
- data/sig/modern_treasury/internal/transport/pooled_net_requester.rbs +2 -0
- data/sig/modern_treasury/internal/type/array_of.rbs +3 -0
- data/sig/modern_treasury/internal/type/base_model.rbs +2 -0
- data/sig/modern_treasury/internal/type/boolean.rbs +3 -0
- data/sig/modern_treasury/internal/type/enum.rbs +2 -0
- data/sig/modern_treasury/internal/type/file_input.rbs +2 -0
- data/sig/modern_treasury/internal/type/hash_of.rbs +3 -0
- data/sig/modern_treasury/internal/type/union.rbs +2 -0
- data/sig/modern_treasury/internal/type/unknown.rbs +3 -0
- data/sig/modern_treasury/internal/util.rbs +12 -0
- data/sig/modern_treasury/internal.rbs +3 -0
- data/sig/modern_treasury/models/account_collection_flow.rbs +30 -16
- data/sig/modern_treasury/models/account_collection_flow_create_params.rbs +13 -6
- data/sig/modern_treasury/models/account_collection_flow_list_params.rbs +10 -0
- data/sig/modern_treasury/models/account_collection_flow_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/account_collection_flow_update_params.rbs +5 -0
- data/sig/modern_treasury/models/account_detail.rbs +24 -4
- data/sig/modern_treasury/models/account_detail_create_params.rbs +15 -0
- data/sig/modern_treasury/models/account_detail_delete_params.rbs +6 -0
- data/sig/modern_treasury/models/account_detail_list_params.rbs +7 -0
- data/sig/modern_treasury/models/account_detail_retrieve_params.rbs +6 -0
- data/sig/modern_treasury/models/async_response.rbs +2 -0
- data/sig/modern_treasury/models/bank_settings.rbs +13 -0
- data/sig/modern_treasury/models/bulk_request.rbs +29 -12
- data/sig/modern_treasury/models/bulk_request_create_params.rbs +600 -188
- data/sig/modern_treasury/models/bulk_request_list_params.rbs +12 -0
- data/sig/modern_treasury/models/bulk_request_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/bulk_result.rbs +44 -16
- data/sig/modern_treasury/models/bulk_result_list_params.rbs +13 -0
- data/sig/modern_treasury/models/bulk_result_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/client_ping_params.rbs +2 -0
- data/sig/modern_treasury/models/connection.rbs +12 -0
- data/sig/modern_treasury/models/connection_legal_entity.rbs +17 -4
- data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +188 -56
- data/sig/modern_treasury/models/connection_legal_entity_list_params.rbs +9 -0
- data/sig/modern_treasury/models/connection_legal_entity_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/connection_legal_entity_update_params.rbs +5 -0
- data/sig/modern_treasury/models/connection_list_params.rbs +8 -0
- data/sig/modern_treasury/models/counterparty.rbs +84 -22
- data/sig/modern_treasury/models/counterparty_collect_account_params.rbs +14 -6
- data/sig/modern_treasury/models/counterparty_collect_account_response.rbs +2 -0
- data/sig/modern_treasury/models/counterparty_create_params.rbs +307 -92
- data/sig/modern_treasury/models/counterparty_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/counterparty_list_params.rbs +12 -0
- data/sig/modern_treasury/models/counterparty_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/counterparty_update_params.rbs +10 -0
- data/sig/modern_treasury/models/currency.rbs +14 -0
- data/sig/modern_treasury/models/document.rbs +41 -9
- data/sig/modern_treasury/models/document_create_params.rbs +16 -8
- data/sig/modern_treasury/models/document_list_params.rbs +13 -5
- data/sig/modern_treasury/models/document_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/event.rbs +13 -0
- data/sig/modern_treasury/models/event_list_params.rbs +11 -0
- data/sig/modern_treasury/models/event_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/expected_payment.rbs +41 -12
- data/sig/modern_treasury/models/expected_payment_create_params.rbs +66 -12
- data/sig/modern_treasury/models/expected_payment_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/expected_payment_list_params.rbs +37 -1
- data/sig/modern_treasury/models/expected_payment_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/expected_payment_type.rbs +8 -0
- data/sig/modern_treasury/models/expected_payment_update_params.rbs +21 -0
- data/sig/modern_treasury/models/external_account.rbs +63 -16
- data/sig/modern_treasury/models/external_account_complete_verification_params.rbs +5 -0
- data/sig/modern_treasury/models/external_account_create_params.rbs +99 -28
- data/sig/modern_treasury/models/external_account_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/external_account_list_params.rbs +9 -0
- data/sig/modern_treasury/models/external_account_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/external_account_type.rbs +11 -1
- data/sig/modern_treasury/models/external_account_update_params.rbs +20 -0
- data/sig/modern_treasury/models/external_account_verify_params.rbs +17 -0
- data/sig/modern_treasury/models/external_account_verify_response.rbs +21 -0
- data/sig/modern_treasury/models/foreign_exchange_quote.rbs +25 -0
- data/sig/modern_treasury/models/foreign_exchange_quote_create_params.rbs +10 -0
- data/sig/modern_treasury/models/foreign_exchange_quote_list_params.rbs +13 -0
- data/sig/modern_treasury/models/foreign_exchange_quote_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/incoming_payment_detail.rbs +52 -16
- data/sig/modern_treasury/models/incoming_payment_detail_create_async_params.rbs +13 -0
- data/sig/modern_treasury/models/incoming_payment_detail_list_params.rbs +13 -0
- data/sig/modern_treasury/models/incoming_payment_detail_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/incoming_payment_detail_update_params.rbs +5 -0
- data/sig/modern_treasury/models/internal_account.rbs +55 -9
- data/sig/modern_treasury/models/internal_account_create_params.rbs +66 -0
- data/sig/modern_treasury/models/internal_account_list_params.rbs +20 -0
- data/sig/modern_treasury/models/internal_account_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/internal_account_update_params.rbs +9 -0
- data/sig/modern_treasury/models/internal_accounts/balance_report.rbs +37 -8
- data/sig/modern_treasury/models/internal_accounts/balance_report_create_params.rbs +19 -4
- data/sig/modern_treasury/models/internal_accounts/balance_report_delete_params.rbs +5 -0
- data/sig/modern_treasury/models/internal_accounts/balance_report_list_params.rbs +8 -0
- data/sig/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rbs +5 -0
- data/sig/modern_treasury/models/invoice.rbs +94 -16
- data/sig/modern_treasury/models/invoice_add_payment_order_params.rbs +5 -0
- data/sig/modern_treasury/models/invoice_create_params.rbs +81 -4
- data/sig/modern_treasury/models/invoice_list_params.rbs +15 -0
- data/sig/modern_treasury/models/invoice_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/invoice_update_params.rbs +81 -4
- data/sig/modern_treasury/models/invoices/invoice_line_item.rbs +21 -0
- data/sig/modern_treasury/models/invoices/line_item_create_params.rbs +11 -0
- data/sig/modern_treasury/models/invoices/line_item_delete_params.rbs +5 -0
- data/sig/modern_treasury/models/invoices/line_item_list_params.rbs +6 -0
- data/sig/modern_treasury/models/invoices/line_item_retrieve_params.rbs +5 -0
- data/sig/modern_treasury/models/invoices/line_item_update_params.rbs +12 -0
- data/sig/modern_treasury/models/ledger.rbs +12 -0
- data/sig/modern_treasury/models/ledger_account.rbs +54 -4
- data/sig/modern_treasury/models/ledger_account_balance_monitor.rbs +52 -0
- data/sig/modern_treasury/models/ledger_account_balance_monitor_create_params.rbs +10 -0
- data/sig/modern_treasury/models/ledger_account_balance_monitor_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_account_balance_monitor_list_params.rbs +9 -0
- data/sig/modern_treasury/models/ledger_account_balance_monitor_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_account_balance_monitor_update_params.rbs +6 -0
- data/sig/modern_treasury/models/ledger_account_category.rbs +45 -0
- data/sig/modern_treasury/models/ledger_account_category_add_ledger_account_params.rbs +5 -0
- data/sig/modern_treasury/models/ledger_account_category_add_nested_category_params.rbs +5 -0
- data/sig/modern_treasury/models/ledger_account_category_create_params.rbs +12 -0
- data/sig/modern_treasury/models/ledger_account_category_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_account_category_list_params.rbs +16 -0
- data/sig/modern_treasury/models/ledger_account_category_remove_ledger_account_params.rbs +5 -0
- data/sig/modern_treasury/models/ledger_account_category_remove_nested_category_params.rbs +5 -0
- data/sig/modern_treasury/models/ledger_account_category_retrieve_params.rbs +7 -0
- data/sig/modern_treasury/models/ledger_account_category_update_params.rbs +7 -0
- data/sig/modern_treasury/models/ledger_account_create_params.rbs +14 -0
- data/sig/modern_treasury/models/ledger_account_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_account_list_params.rbs +52 -0
- data/sig/modern_treasury/models/ledger_account_retrieve_params.rbs +13 -0
- data/sig/modern_treasury/models/ledger_account_settlement.rbs +24 -4
- data/sig/modern_treasury/models/ledger_account_settlement_create_params.rbs +12 -0
- data/sig/modern_treasury/models/ledger_account_settlement_list_params.rbs +14 -0
- data/sig/modern_treasury/models/ledger_account_settlement_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_account_settlement_update_params.rbs +7 -0
- data/sig/modern_treasury/models/ledger_account_settlements/account_entry_delete_params.rbs +5 -0
- data/sig/modern_treasury/models/ledger_account_settlements/account_entry_update_params.rbs +5 -0
- data/sig/modern_treasury/models/ledger_account_statement_create_params.rbs +9 -0
- data/sig/modern_treasury/models/ledger_account_statement_create_response.rbs +78 -0
- data/sig/modern_treasury/models/ledger_account_statement_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_account_statement_retrieve_response.rbs +78 -0
- data/sig/modern_treasury/models/ledger_account_update_params.rbs +7 -0
- data/sig/modern_treasury/models/ledger_create_params.rbs +7 -0
- data/sig/modern_treasury/models/ledger_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_entry.rbs +53 -4
- data/sig/modern_treasury/models/ledger_entry_list_params.rbs +41 -12
- data/sig/modern_treasury/models/ledger_entry_retrieve_params.rbs +5 -0
- data/sig/modern_treasury/models/ledger_entry_update_params.rbs +5 -0
- data/sig/modern_treasury/models/ledger_event_handler.rbs +31 -0
- data/sig/modern_treasury/models/ledger_event_handler_create_params.rbs +26 -0
- data/sig/modern_treasury/models/ledger_event_handler_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_event_handler_list_params.rbs +9 -0
- data/sig/modern_treasury/models/ledger_event_handler_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_event_handler_variable.rbs +7 -0
- data/sig/modern_treasury/models/ledger_list_params.rbs +9 -0
- data/sig/modern_treasury/models/ledger_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_transaction.rbs +30 -8
- data/sig/modern_treasury/models/ledger_transaction_create_params.rbs +25 -0
- data/sig/modern_treasury/models/ledger_transaction_create_partial_post_params.rbs +19 -4
- data/sig/modern_treasury/models/ledger_transaction_create_reversal_params.rbs +11 -0
- data/sig/modern_treasury/models/ledger_transaction_list_params.rbs +40 -12
- data/sig/modern_treasury/models/ledger_transaction_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/ledger_transaction_update_params.rbs +23 -0
- data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +82 -12
- data/sig/modern_treasury/models/ledger_transactions/version_list_params.rbs +10 -0
- data/sig/modern_treasury/models/ledger_update_params.rbs +7 -0
- data/sig/modern_treasury/models/ledgerable_event.rbs +13 -0
- data/sig/modern_treasury/models/ledgerable_event_create_params.rbs +8 -0
- data/sig/modern_treasury/models/ledgerable_event_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/legal_entity.rbs +96 -20
- data/sig/modern_treasury/models/legal_entity_association.rbs +113 -24
- data/sig/modern_treasury/models/legal_entity_association_create_params.rbs +98 -30
- data/sig/modern_treasury/models/legal_entity_compliance_detail.rbs +15 -0
- data/sig/modern_treasury/models/legal_entity_create_params.rbs +168 -42
- data/sig/modern_treasury/models/legal_entity_industry_classification.rbs +15 -4
- data/sig/modern_treasury/models/legal_entity_list_params.rbs +9 -0
- data/sig/modern_treasury/models/legal_entity_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/legal_entity_update_params.rbs +70 -12
- data/sig/modern_treasury/models/line_item.rbs +22 -4
- data/sig/modern_treasury/models/line_item_list_params.rbs +7 -0
- data/sig/modern_treasury/models/line_item_retrieve_params.rbs +6 -0
- data/sig/modern_treasury/models/line_item_update_params.rbs +7 -0
- data/sig/modern_treasury/models/paper_item.rbs +30 -4
- data/sig/modern_treasury/models/paper_item_list_params.rbs +9 -0
- data/sig/modern_treasury/models/paper_item_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/payment_action_create_params.rbs +54 -0
- data/sig/modern_treasury/models/payment_action_create_response.rbs +70 -0
- data/sig/modern_treasury/models/payment_action_list_params.rbs +149 -0
- data/sig/modern_treasury/models/payment_action_list_response.rbs +70 -0
- data/sig/modern_treasury/models/payment_action_retrieve_params.rbs +15 -0
- data/sig/modern_treasury/models/payment_action_retrieve_response.rbs +70 -0
- data/sig/modern_treasury/models/payment_action_update_params.rbs +40 -0
- data/sig/modern_treasury/models/payment_action_update_response.rbs +70 -0
- data/sig/modern_treasury/models/payment_flow.rbs +44 -22
- data/sig/modern_treasury/models/payment_flow_create_params.rbs +10 -0
- data/sig/modern_treasury/models/payment_flow_list_params.rbs +12 -0
- data/sig/modern_treasury/models/payment_flow_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/payment_flow_update_params.rbs +5 -0
- data/sig/modern_treasury/models/payment_order.rbs +116 -48
- data/sig/modern_treasury/models/payment_order_create_async_params.rbs +185 -44
- data/sig/modern_treasury/models/payment_order_create_params.rbs +205 -56
- data/sig/modern_treasury/models/payment_order_list_params.rbs +29 -0
- data/sig/modern_treasury/models/payment_order_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/payment_order_type.rbs +8 -0
- data/sig/modern_treasury/models/payment_order_update_params.rbs +148 -32
- data/sig/modern_treasury/models/payment_orders/reversal.rbs +22 -8
- data/sig/modern_treasury/models/payment_orders/reversal_create_params.rbs +43 -12
- data/sig/modern_treasury/models/payment_orders/reversal_list_params.rbs +6 -0
- data/sig/modern_treasury/models/payment_orders/reversal_retrieve_params.rbs +5 -0
- data/sig/modern_treasury/models/payment_reference.rbs +28 -8
- data/sig/modern_treasury/models/payment_reference_list_params.rbs +9 -0
- data/sig/modern_treasury/models/payment_reference_retireve_params.rbs +2 -0
- data/sig/modern_treasury/models/payment_reference_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/ping_response.rbs +2 -0
- data/sig/modern_treasury/models/reconciliation_rule.rbs +29 -8
- data/sig/modern_treasury/models/return_create_params.rbs +91 -0
- data/sig/modern_treasury/models/return_list_params.rbs +10 -0
- data/sig/modern_treasury/models/return_object.rbs +154 -24
- data/sig/modern_treasury/models/return_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/routing_detail.rbs +44 -8
- data/sig/modern_treasury/models/routing_detail_create_params.rbs +16 -0
- data/sig/modern_treasury/models/routing_detail_delete_params.rbs +6 -0
- data/sig/modern_treasury/models/routing_detail_list_params.rbs +7 -0
- data/sig/modern_treasury/models/routing_detail_retrieve_params.rbs +6 -0
- data/sig/modern_treasury/models/routing_number_lookup_request.rbs +38 -12
- data/sig/modern_treasury/models/transaction.rbs +58 -8
- data/sig/modern_treasury/models/transaction_create_params.rbs +22 -0
- data/sig/modern_treasury/models/transaction_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/transaction_list_params.rbs +18 -0
- data/sig/modern_treasury/models/transaction_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/transaction_update_params.rbs +5 -0
- data/sig/modern_treasury/models/transactions/line_item_create_params.rbs +7 -0
- data/sig/modern_treasury/models/transactions/line_item_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/transactions/line_item_list_params.rbs +9 -0
- data/sig/modern_treasury/models/transactions/line_item_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/transactions/transaction_line_item.rbs +26 -8
- data/sig/modern_treasury/models/validation_validate_routing_number_params.rbs +6 -0
- data/sig/modern_treasury/models/virtual_account.rbs +19 -0
- data/sig/modern_treasury/models/virtual_account_create_params.rbs +74 -20
- data/sig/modern_treasury/models/virtual_account_delete_params.rbs +2 -0
- data/sig/modern_treasury/models/virtual_account_list_params.rbs +9 -0
- data/sig/modern_treasury/models/virtual_account_retrieve_params.rbs +2 -0
- data/sig/modern_treasury/models/virtual_account_update_params.rbs +8 -0
- data/sig/modern_treasury/models/wealth_and_employment_details.rbs +45 -24
- data/sig/modern_treasury/models.rbs +8 -0
- data/sig/modern_treasury/resources/account_collection_flows.rbs +1 -1
- data/sig/modern_treasury/resources/bulk_requests.rbs +1 -1
- data/sig/modern_treasury/resources/counterparties.rbs +1 -1
- data/sig/modern_treasury/resources/documents.rbs +1 -1
- data/sig/modern_treasury/resources/expected_payments.rbs +2 -0
- data/sig/modern_treasury/resources/internal_accounts.rbs +1 -0
- data/sig/modern_treasury/resources/legal_entity_associations.rbs +1 -1
- data/sig/modern_treasury/resources/payment_actions.rbs +40 -0
- metadata +29 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd1003cb64621e98061d4ea560dfbbae6f3a45716922765fcca9e3041ac78f90
|
4
|
+
data.tar.gz: a1991e3bf60a3ac44bcd607c4777dafbdef7d6ecb3368f1808abd420bbf547c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9864551a559538d8ea3e34bea4057e64f4d68d775458b822cfdaa5a696c08b1747a3e03e78be226b8d4019568a03356286aa569e432ae39808c3b7b05c06a2c9
|
7
|
+
data.tar.gz: 82eb2cbb206557691cf3aafc61e0fd69ade2801145f8e9d0300292c7abbe92ec44f70421d0f244a75df8350381254f80e0f46be8943474b5f1438adbe2d3ca6f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,36 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.0-alpha.20 (2025-05-23)
|
4
|
+
|
5
|
+
Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/Modern-Treasury/modern-treasury-ruby/compare/v0.1.0-alpha.19...v0.1.0-alpha.20)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** api update ([51f2558](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/51f2558e2bc2a89aa925e1e3f1dc64d5e3c5c162))
|
10
|
+
* **api:** manual updates ([452bb1c](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/452bb1cbf073c0763b7b5e542042a320ab88c817))
|
11
|
+
* bump default connection pool size limit to minimum of 99 ([f9b80ac](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/f9b80ace0577c91d113b36f8c02906cd2df41495))
|
12
|
+
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
* correctly instantiate sorbet type aliases for enums and unions ([c2c4dba](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/c2c4dba8a02c3c7bf84fed51cc8d9d06dd94d7a6))
|
17
|
+
* prevent rubocop from mangling `===` to `is_a?` check ([18009bb](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/18009bbd0286587025edead104ea029abaa71278))
|
18
|
+
|
19
|
+
|
20
|
+
### Chores
|
21
|
+
|
22
|
+
* **docs:** grammar improvements ([e533b50](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/e533b5028d204cc9537f17a88167b8c2f40e9d6c))
|
23
|
+
* force utf-8 locale via `RUBYOPT` when formatting ([cf86688](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/cf866885c2f426bc3f129f12e7320c62d9a9e2c0))
|
24
|
+
* refine Yard and Sorbet types and ensure linting is turned on for examples ([601bc22](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/601bc22d020b65bc19362566685aabc295d0598d))
|
25
|
+
* use fully qualified names for yard annotations and rbs aliases ([621ed43](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/621ed43f77f526d2623989a48f3f1e9149ff800a))
|
26
|
+
* use sorbet union aliases where available ([6701427](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/6701427854edd85ae958c7c53c8177af7fa68ec5))
|
27
|
+
* whitespaces ([45f3cea](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/45f3cea94c88bb71356d502cce7f4fceb033f613))
|
28
|
+
|
29
|
+
|
30
|
+
### Documentation
|
31
|
+
|
32
|
+
* rewrite much of README.md for readability ([e426334](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/e426334cca1f4df82faa6675a909601f3480c186))
|
33
|
+
|
3
34
|
## 0.1.0-alpha.19 (2025-05-13)
|
4
35
|
|
5
36
|
Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/Modern-Treasury/modern-treasury-ruby/compare/v0.1.0-alpha.18...v0.1.0-alpha.19)
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Modern Treasury Ruby API library
|
2
2
|
|
3
|
-
The Modern Treasury Ruby library provides convenient access to the Modern Treasury REST API from any Ruby 3.2.0+ application.
|
3
|
+
The Modern Treasury Ruby library provides convenient access to the Modern Treasury REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/Modern-Treasury/modern-treasury-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
|
4
4
|
|
5
5
|
## Documentation
|
6
6
|
|
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
15
15
|
<!-- x-release-please-start-version -->
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
gem "modern_treasury", "~> 0.1.0.pre.alpha.
|
18
|
+
gem "modern_treasury", "~> 0.1.0.pre.alpha.20"
|
19
19
|
```
|
20
20
|
|
21
21
|
<!-- x-release-please-end -->
|
@@ -36,16 +36,6 @@ counterparty = modern_treasury.counterparties.create(name: "my first counterpart
|
|
36
36
|
puts(counterparty.id)
|
37
37
|
```
|
38
38
|
|
39
|
-
## Sorbet
|
40
|
-
|
41
|
-
This library is written with [Sorbet type definitions](https://sorbet.org/docs/rbi). However, there is no runtime dependency on the `sorbet-runtime`.
|
42
|
-
|
43
|
-
When using sorbet, it is recommended to use model classes as below. This provides stronger type checking and tooling integration.
|
44
|
-
|
45
|
-
```ruby
|
46
|
-
modern_treasury.counterparties.create(name: "my first counterparty")
|
47
|
-
```
|
48
|
-
|
49
39
|
### Pagination
|
50
40
|
|
51
41
|
List methods in the Modern Treasury API are paginated.
|
@@ -65,40 +55,64 @@ page.auto_paging_each do |counterparty|
|
|
65
55
|
end
|
66
56
|
```
|
67
57
|
|
58
|
+
Alternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
if page.next_page?
|
62
|
+
new_page = page.next_page
|
63
|
+
puts(new_page.items[0].id)
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
68
67
|
### File uploads
|
69
68
|
|
70
|
-
Request parameters that correspond to file uploads can be passed as
|
69
|
+
Request parameters that correspond to file uploads can be passed as raw contents, a [`Pathname`](https://rubyapi.org/3.2/o/pathname) instance, [`StringIO`](https://rubyapi.org/3.2/o/stringio), or more.
|
71
70
|
|
72
71
|
```ruby
|
73
72
|
require "pathname"
|
74
73
|
|
75
|
-
#
|
74
|
+
# Use `Pathname` to send the filename and/or avoid paging a large file into memory:
|
76
75
|
document = modern_treasury.documents.create(
|
77
76
|
documentable_id: "24c6b7a3-02...",
|
78
77
|
documentable_type: "counterparties",
|
79
78
|
file: Pathname("my/file.txt")
|
80
79
|
)
|
81
80
|
|
82
|
-
file
|
83
|
-
# using `StringIO`, useful if you already have the data in memory
|
81
|
+
# Alternatively, pass file contents or a `StringIO` directly:
|
84
82
|
document = modern_treasury.documents.create(
|
85
83
|
documentable_id: "24c6b7a3-02...",
|
86
84
|
documentable_type: "counterparties",
|
87
|
-
file:
|
85
|
+
file: File.read("my/file.txt")
|
86
|
+
)
|
87
|
+
|
88
|
+
# Or, to control the filename and/or content type:
|
89
|
+
file = ModernTreasury::FilePart.new(File.read("my/file.txt"), filename: "my/file.txt", content_type: "…")
|
90
|
+
document = modern_treasury.documents.create(
|
91
|
+
documentable_id: "24c6b7a3-02...",
|
92
|
+
documentable_type: "counterparties",
|
93
|
+
file: file
|
88
94
|
)
|
89
95
|
|
90
96
|
puts(document.id)
|
91
97
|
```
|
92
98
|
|
93
|
-
|
99
|
+
Note that you can also pass a raw `IO` descriptor, but this disables retries, as the library can't be sure if the descriptor is a file or pipe (which cannot be rewound).
|
100
|
+
|
101
|
+
### Handling errors
|
94
102
|
|
95
103
|
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `ModernTreasury::Errors::APIError` will be thrown:
|
96
104
|
|
97
105
|
```ruby
|
98
106
|
begin
|
99
107
|
external_account = modern_treasury.external_accounts.create(counterparty_id: "missing")
|
100
|
-
rescue ModernTreasury::Errors::
|
101
|
-
puts(
|
108
|
+
rescue ModernTreasury::Errors::APIConnectionError => e
|
109
|
+
puts("The server could not be reached")
|
110
|
+
puts(e.cause) # an underlying Exception, likely raised within `net/http`
|
111
|
+
rescue ModernTreasury::Errors::RateLimitError => e
|
112
|
+
puts("A 429 status code was received; we should back off a bit.")
|
113
|
+
rescue ModernTreasury::Errors::APIStatusError => e
|
114
|
+
puts("Another non-200-range status code was received")
|
115
|
+
puts(e.status)
|
102
116
|
end
|
103
117
|
```
|
104
118
|
|
@@ -138,11 +152,7 @@ modern_treasury.counterparties.create(name: "my first counterparty", request_opt
|
|
138
152
|
|
139
153
|
### Timeouts
|
140
154
|
|
141
|
-
By default, requests will time out after 60 seconds.
|
142
|
-
|
143
|
-
Timeouts are applied separately to the initial connection and the overall request time, so in some cases a request could wait 2\*timeout seconds before it fails.
|
144
|
-
|
145
|
-
You can use the `timeout` option to configure or disable this:
|
155
|
+
By default, requests will time out after 60 seconds. You can use the timeout option to configure or disable this:
|
146
156
|
|
147
157
|
```ruby
|
148
158
|
# Configure the default for all requests:
|
@@ -154,39 +164,53 @@ modern_treasury = ModernTreasury::Client.new(
|
|
154
164
|
modern_treasury.counterparties.create(name: "my first counterparty", request_options: {timeout: 5})
|
155
165
|
```
|
156
166
|
|
157
|
-
|
167
|
+
On timeout, `ModernTreasury::Errors::APITimeoutError` is raised.
|
158
168
|
|
159
|
-
|
169
|
+
Note that requests that time out are retried by default.
|
160
170
|
|
161
|
-
|
171
|
+
## Advanced concepts
|
162
172
|
|
163
|
-
|
173
|
+
### BaseModel
|
164
174
|
|
165
|
-
|
166
|
-
# This has tooling readability, for auto-completion, static analysis, and goto definition with supported language services
|
167
|
-
params = ModernTreasury::Models::CounterpartyCreateParams.new(name: "my first counterparty")
|
175
|
+
All parameter and response objects inherit from `ModernTreasury::Internal::Type::BaseModel`, which provides several conveniences, including:
|
168
176
|
|
169
|
-
|
170
|
-
params = {
|
171
|
-
name: "my first counterparty"
|
172
|
-
}
|
173
|
-
```
|
177
|
+
1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.
|
174
178
|
|
175
|
-
|
179
|
+
2. Structural equivalence for equality; if two API calls return the same values, comparing the responses with == will return true.
|
176
180
|
|
177
|
-
|
181
|
+
3. Both instances and the classes themselves can be pretty-printed.
|
178
182
|
|
179
|
-
|
183
|
+
4. Helpers such as `#to_h`, `#deep_to_h`, `#to_json`, and `#to_yaml`.
|
180
184
|
|
181
|
-
### Making custom
|
185
|
+
### Making custom or undocumented requests
|
186
|
+
|
187
|
+
#### Undocumented properties
|
188
|
+
|
189
|
+
You can send undocumented parameters to any endpoint, and read undocumented response properties, like so:
|
190
|
+
|
191
|
+
Note: the `extra_` parameters of the same name overrides the documented parameters.
|
192
|
+
|
193
|
+
```ruby
|
194
|
+
counterparty =
|
195
|
+
modern_treasury.counterparties.create(
|
196
|
+
name: "my first counterparty",
|
197
|
+
request_options: {
|
198
|
+
extra_query: {my_query_parameter: value},
|
199
|
+
extra_body: {my_body_parameter: value},
|
200
|
+
extra_headers: {"my-header": value}
|
201
|
+
}
|
202
|
+
)
|
203
|
+
|
204
|
+
puts(counterparty[:my_undocumented_property])
|
205
|
+
```
|
182
206
|
|
183
207
|
#### Undocumented request params
|
184
208
|
|
185
|
-
If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a
|
209
|
+
If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.
|
186
210
|
|
187
211
|
#### Undocumented endpoints
|
188
212
|
|
189
|
-
To make requests to undocumented endpoints, you can make requests using `client.request
|
213
|
+
To make requests to undocumented endpoints while retaining the benefit of auth, retries, and so on, you can make requests using `client.request`, like so:
|
190
214
|
|
191
215
|
```ruby
|
192
216
|
response = client.request(
|
@@ -194,42 +218,67 @@ response = client.request(
|
|
194
218
|
path: '/undocumented/endpoint',
|
195
219
|
query: {"dog": "woof"},
|
196
220
|
headers: {"useful-header": "interesting-value"},
|
197
|
-
body: {"
|
221
|
+
body: {"hello": "world"}
|
198
222
|
)
|
199
223
|
```
|
200
224
|
|
201
225
|
### Concurrency & connection pooling
|
202
226
|
|
203
|
-
The `ModernTreasury::Client` instances are
|
227
|
+
The `ModernTreasury::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
|
204
228
|
|
205
|
-
|
229
|
+
Each instance of `ModernTreasury::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
|
230
|
+
|
231
|
+
When all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.
|
206
232
|
|
207
233
|
Unless otherwise specified, other classes in the SDK do not have locks protecting their underlying data structure.
|
208
234
|
|
209
|
-
|
235
|
+
## Sorbet
|
210
236
|
|
211
|
-
|
237
|
+
This library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitions, and has no dependency on sorbet-runtime.
|
212
238
|
|
213
|
-
|
239
|
+
You can provide typesafe request parameters like so:
|
214
240
|
|
215
|
-
|
241
|
+
```ruby
|
242
|
+
modern_treasury.counterparties.create(name: "my first counterparty")
|
243
|
+
```
|
216
244
|
|
217
|
-
|
245
|
+
Or, equivalently:
|
218
246
|
|
219
247
|
```ruby
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
248
|
+
# Hashes work, but are not typesafe:
|
249
|
+
modern_treasury.counterparties.create(name: "my first counterparty")
|
250
|
+
|
251
|
+
# You can also splat a full Params class:
|
252
|
+
params = ModernTreasury::CounterpartyCreateParams.new(name: "my first counterparty")
|
253
|
+
modern_treasury.counterparties.create(**params)
|
224
254
|
```
|
225
255
|
|
226
|
-
|
256
|
+
### Enums
|
227
257
|
|
228
|
-
|
258
|
+
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:
|
229
259
|
|
230
260
|
```ruby
|
231
|
-
|
232
|
-
|
261
|
+
# :denied
|
262
|
+
puts(ModernTreasury::CounterpartyCreateParams::VerificationStatus::DENIED)
|
263
|
+
|
264
|
+
# Revealed type: `T.all(ModernTreasury::CounterpartyCreateParams::VerificationStatus, Symbol)`
|
265
|
+
T.reveal_type(ModernTreasury::CounterpartyCreateParams::VerificationStatus::DENIED)
|
266
|
+
```
|
267
|
+
|
268
|
+
Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
|
269
|
+
|
270
|
+
```ruby
|
271
|
+
# Using the enum constants preserves the tagged type information:
|
272
|
+
modern_treasury.counterparties.create(
|
273
|
+
verification_status: ModernTreasury::CounterpartyCreateParams::VerificationStatus::DENIED,
|
274
|
+
# …
|
275
|
+
)
|
276
|
+
|
277
|
+
# Literal values are also permissible:
|
278
|
+
modern_treasury.counterparties.create(
|
279
|
+
verification_status: :denied,
|
280
|
+
# …
|
281
|
+
)
|
233
282
|
```
|
234
283
|
|
235
284
|
## Versioning
|
data/SECURITY.md
CHANGED
@@ -16,11 +16,11 @@ before making any information public.
|
|
16
16
|
## Reporting Non-SDK Related Security Issues
|
17
17
|
|
18
18
|
If you encounter security issues that are not directly related to SDKs but pertain to the services
|
19
|
-
or products provided by Modern Treasury please follow the respective company's security reporting guidelines.
|
19
|
+
or products provided by Modern Treasury, please follow the respective company's security reporting guidelines.
|
20
20
|
|
21
21
|
### Modern Treasury Terms and Policies
|
22
22
|
|
23
|
-
Please contact sdk-feedback@moderntreasury.com for any questions or concerns regarding security of our services.
|
23
|
+
Please contact sdk-feedback@moderntreasury.com for any questions or concerns regarding the security of our services.
|
24
24
|
|
25
25
|
---
|
26
26
|
|
@@ -132,6 +132,9 @@ module ModernTreasury
|
|
132
132
|
# @return [ModernTreasury::Resources::LegalEntityAssociations]
|
133
133
|
attr_reader :legal_entity_associations
|
134
134
|
|
135
|
+
# @return [ModernTreasury::Resources::PaymentActions]
|
136
|
+
attr_reader :payment_actions
|
137
|
+
|
135
138
|
# A test endpoint often used to confirm credentials and headers are being passed
|
136
139
|
# in correctly.
|
137
140
|
#
|
@@ -139,7 +142,7 @@ module ModernTreasury
|
|
139
142
|
#
|
140
143
|
# @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}, nil]
|
141
144
|
#
|
142
|
-
# @return [ModernTreasury::PingResponse]
|
145
|
+
# @return [ModernTreasury::Models::PingResponse]
|
143
146
|
#
|
144
147
|
# @see ModernTreasury::Models::ClientPingParams
|
145
148
|
def ping(params = {})
|
@@ -183,10 +186,10 @@ module ModernTreasury
|
|
183
186
|
api_key: ENV["MODERN_TREASURY_API_KEY"],
|
184
187
|
organization_id: ENV["MODERN_TREASURY_ORGANIZATION_ID"],
|
185
188
|
base_url: ENV["MODERN_TREASURY_BASE_URL"],
|
186
|
-
max_retries:
|
187
|
-
timeout:
|
188
|
-
initial_retry_delay:
|
189
|
-
max_retry_delay:
|
189
|
+
max_retries: self.class::DEFAULT_MAX_RETRIES,
|
190
|
+
timeout: self.class::DEFAULT_TIMEOUT_IN_SECONDS,
|
191
|
+
initial_retry_delay: self.class::DEFAULT_INITIAL_RETRY_DELAY,
|
192
|
+
max_retry_delay: self.class::DEFAULT_MAX_RETRY_DELAY,
|
190
193
|
idempotency_header: "Idempotency-Key"
|
191
194
|
)
|
192
195
|
base_url ||= "https://app.moderntreasury.com"
|
@@ -248,6 +251,7 @@ module ModernTreasury
|
|
248
251
|
@connection_legal_entities = ModernTreasury::Resources::ConnectionLegalEntities.new(client: self)
|
249
252
|
@legal_entities = ModernTreasury::Resources::LegalEntities.new(client: self)
|
250
253
|
@legal_entity_associations = ModernTreasury::Resources::LegalEntityAssociations.new(client: self)
|
254
|
+
@payment_actions = ModernTreasury::Resources::PaymentActions.new(client: self)
|
251
255
|
end
|
252
256
|
end
|
253
257
|
end
|
@@ -11,6 +11,8 @@ module ModernTreasury
|
|
11
11
|
# https://github.com/golang/go/blob/c8eced8580028328fde7c03cbfcb720ce15b2358/src/net/http/transport.go#L49
|
12
12
|
KEEP_ALIVE_TIMEOUT = 30
|
13
13
|
|
14
|
+
DEFAULT_MAX_CONNECTIONS = [Etc.nprocessors, 99].max
|
15
|
+
|
14
16
|
class << self
|
15
17
|
# @api private
|
16
18
|
#
|
@@ -184,7 +186,7 @@ module ModernTreasury
|
|
184
186
|
# @api private
|
185
187
|
#
|
186
188
|
# @param size [Integer]
|
187
|
-
def initialize(size:
|
189
|
+
def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS)
|
188
190
|
@mutex = Mutex.new
|
189
191
|
@size = size
|
190
192
|
@pools = {}
|
@@ -12,6 +12,7 @@ module ModernTreasury
|
|
12
12
|
# Array of items of a given type.
|
13
13
|
class ArrayOf
|
14
14
|
include ModernTreasury::Internal::Type::Converter
|
15
|
+
include ModernTreasury::Internal::Util::SorbetRuntimeSupport
|
15
16
|
|
16
17
|
private_class_method :new
|
17
18
|
|
@@ -110,6 +111,13 @@ module ModernTreasury
|
|
110
111
|
end
|
111
112
|
end
|
112
113
|
|
114
|
+
# @api private
|
115
|
+
#
|
116
|
+
# @return [Object]
|
117
|
+
def to_sorbet_type
|
118
|
+
T::Array[ModernTreasury::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)]
|
119
|
+
end
|
120
|
+
|
113
121
|
# @api private
|
114
122
|
#
|
115
123
|
# @return [generic<Elem>]
|
@@ -312,6 +312,13 @@ module ModernTreasury
|
|
312
312
|
|
313
313
|
acc
|
314
314
|
end
|
315
|
+
|
316
|
+
# @api private
|
317
|
+
#
|
318
|
+
# @return [Object]
|
319
|
+
def to_sorbet_type
|
320
|
+
self
|
321
|
+
end
|
315
322
|
end
|
316
323
|
|
317
324
|
class << self
|
@@ -394,6 +401,13 @@ module ModernTreasury
|
|
394
401
|
# @param keys [Array<Symbol>, nil]
|
395
402
|
#
|
396
403
|
# @return [Hash{Symbol=>Object}]
|
404
|
+
#
|
405
|
+
# @example
|
406
|
+
# # `async_response` is a `ModernTreasury::AsyncResponse`
|
407
|
+
# async_response => {
|
408
|
+
# id: id,
|
409
|
+
# object: object
|
410
|
+
# }
|
397
411
|
def deconstruct_keys(keys)
|
398
412
|
(keys || self.class.known_fields.keys)
|
399
413
|
.filter_map do |k|
|
@@ -10,6 +10,7 @@ module ModernTreasury
|
|
10
10
|
# Ruby has no Boolean class; this is something for models to refer to.
|
11
11
|
class Boolean
|
12
12
|
extend ModernTreasury::Internal::Type::Converter
|
13
|
+
extend ModernTreasury::Internal::Util::SorbetRuntimeSupport
|
13
14
|
|
14
15
|
private_class_method :new
|
15
16
|
|
@@ -56,6 +57,13 @@ module ModernTreasury
|
|
56
57
|
# @option state [Boolean] :can_retry
|
57
58
|
#
|
58
59
|
# @return [Boolean, Object]
|
60
|
+
|
61
|
+
# @api private
|
62
|
+
#
|
63
|
+
# @return [Object]
|
64
|
+
def to_sorbet_type
|
65
|
+
T::Boolean
|
66
|
+
end
|
59
67
|
end
|
60
68
|
end
|
61
69
|
end
|
@@ -108,6 +108,18 @@ module ModernTreasury
|
|
108
108
|
#
|
109
109
|
# @return [Symbol, Object]
|
110
110
|
|
111
|
+
# @api private
|
112
|
+
#
|
113
|
+
# @return [Object]
|
114
|
+
def to_sorbet_type
|
115
|
+
case values
|
116
|
+
in []
|
117
|
+
T.noreturn
|
118
|
+
in [value, *_]
|
119
|
+
T.all(ModernTreasury::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
111
123
|
# @api private
|
112
124
|
#
|
113
125
|
# @param depth [Integer]
|
@@ -12,6 +12,7 @@ module ModernTreasury
|
|
12
12
|
# Hash of items of a given type.
|
13
13
|
class HashOf
|
14
14
|
include ModernTreasury::Internal::Type::Converter
|
15
|
+
include ModernTreasury::Internal::Util::SorbetRuntimeSupport
|
15
16
|
|
16
17
|
private_class_method :new
|
17
18
|
|
@@ -130,6 +131,13 @@ module ModernTreasury
|
|
130
131
|
end
|
131
132
|
end
|
132
133
|
|
134
|
+
# @api private
|
135
|
+
#
|
136
|
+
# @return [Object]
|
137
|
+
def to_sorbet_type
|
138
|
+
T::Hash[ModernTreasury::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)]
|
139
|
+
end
|
140
|
+
|
133
141
|
# @api private
|
134
142
|
#
|
135
143
|
# @return [generic<Elem>]
|
@@ -208,6 +208,18 @@ module ModernTreasury
|
|
208
208
|
super
|
209
209
|
end
|
210
210
|
|
211
|
+
# @api private
|
212
|
+
#
|
213
|
+
# @return [Object]
|
214
|
+
def to_sorbet_type
|
215
|
+
case (v = variants)
|
216
|
+
in []
|
217
|
+
T.noreturn
|
218
|
+
else
|
219
|
+
T.any(*v.map { ModernTreasury::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
211
223
|
# rubocop:enable Style/CaseEquality
|
212
224
|
# rubocop:enable Style/HashEachMethods
|
213
225
|
|
@@ -10,6 +10,7 @@ module ModernTreasury
|
|
10
10
|
# When we don't know what to expect for the value.
|
11
11
|
class Unknown
|
12
12
|
extend ModernTreasury::Internal::Type::Converter
|
13
|
+
extend ModernTreasury::Internal::Util::SorbetRuntimeSupport
|
13
14
|
|
14
15
|
# rubocop:disable Lint/UnusedMethodArgument
|
15
16
|
|
@@ -58,6 +59,13 @@ module ModernTreasury
|
|
58
59
|
# @option state [Boolean] :can_retry
|
59
60
|
#
|
60
61
|
# @return [Object]
|
62
|
+
|
63
|
+
# @api private
|
64
|
+
#
|
65
|
+
# @return [Object]
|
66
|
+
def to_sorbet_type
|
67
|
+
T.anything
|
68
|
+
end
|
61
69
|
end
|
62
70
|
|
63
71
|
# rubocop:enable Lint/UnusedMethodArgument
|
@@ -9,6 +9,23 @@ module ModernTreasury
|
|
9
9
|
# @return [Float]
|
10
10
|
def self.monotonic_secs = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
11
11
|
|
12
|
+
# @api private
|
13
|
+
#
|
14
|
+
# @param ns [Module, Class]
|
15
|
+
#
|
16
|
+
# @return [Enumerable<Module, Class>]
|
17
|
+
def self.walk_namespaces(ns)
|
18
|
+
ns.constants(false).lazy.flat_map do
|
19
|
+
case (c = ns.const_get(_1, false))
|
20
|
+
in Module | Class
|
21
|
+
walk_namespaces(c)
|
22
|
+
else
|
23
|
+
[]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
.chain([ns])
|
27
|
+
end
|
28
|
+
|
12
29
|
class << self
|
13
30
|
# @api private
|
14
31
|
#
|
@@ -583,11 +600,13 @@ module ModernTreasury
|
|
583
600
|
#
|
584
601
|
# @return [Object]
|
585
602
|
def encode_content(headers, body)
|
603
|
+
# rubocop:disable Style/CaseEquality
|
604
|
+
# rubocop:disable Layout/LineLength
|
586
605
|
content_type = headers["content-type"]
|
587
606
|
case [content_type, body]
|
588
607
|
in [ModernTreasury::Internal::Util::JSON_CONTENT, Hash | Array | -> { primitive?(_1) }]
|
589
608
|
[headers, JSON.generate(body)]
|
590
|
-
in [ModernTreasury::Internal::Util::JSONL_CONTENT, Enumerable] unless
|
609
|
+
in [ModernTreasury::Internal::Util::JSONL_CONTENT, Enumerable] unless ModernTreasury::Internal::Type::FileInput === body
|
591
610
|
[headers, body.lazy.map { JSON.generate(_1) }]
|
592
611
|
in [%r{^multipart/form-data}, Hash | ModernTreasury::Internal::Type::FileInput]
|
593
612
|
boundary, strio = encode_multipart_streaming(body)
|
@@ -602,6 +621,8 @@ module ModernTreasury
|
|
602
621
|
else
|
603
622
|
[headers, body]
|
604
623
|
end
|
624
|
+
# rubocop:enable Layout/LineLength
|
625
|
+
# rubocop:enable Style/CaseEquality
|
605
626
|
end
|
606
627
|
|
607
628
|
# @api private
|
@@ -826,11 +847,39 @@ module ModernTreasury
|
|
826
847
|
sorbet_runtime_constants.fetch(name).call
|
827
848
|
end
|
828
849
|
|
850
|
+
# @api private
|
851
|
+
#
|
852
|
+
# @param name [Symbol]
|
853
|
+
#
|
854
|
+
# @return [Boolean]
|
855
|
+
def sorbet_constant_defined?(name) = sorbet_runtime_constants.key?(name)
|
856
|
+
|
829
857
|
# @api private
|
830
858
|
#
|
831
859
|
# @param name [Symbol]
|
832
860
|
# @param blk [Proc]
|
833
861
|
def define_sorbet_constant!(name, &blk) = sorbet_runtime_constants.store(name, blk)
|
862
|
+
|
863
|
+
# @api private
|
864
|
+
#
|
865
|
+
# @return [Object]
|
866
|
+
def to_sorbet_type = raise NotImplementedError
|
867
|
+
|
868
|
+
class << self
|
869
|
+
# @api private
|
870
|
+
#
|
871
|
+
# @param type [ModernTreasury::Internal::Util::SorbetRuntimeSupport, Object]
|
872
|
+
#
|
873
|
+
# @return [Object]
|
874
|
+
def to_sorbet_type(type)
|
875
|
+
case type
|
876
|
+
in ModernTreasury::Internal::Util::SorbetRuntimeSupport
|
877
|
+
type.to_sorbet_type
|
878
|
+
else
|
879
|
+
type
|
880
|
+
end
|
881
|
+
end
|
882
|
+
end
|
834
883
|
end
|
835
884
|
|
836
885
|
extend ModernTreasury::Internal::Util::SorbetRuntimeSupport
|