mt-sdk 0.0.1 → 0.0.2
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/README.md +67 -60
- data/lib/modern_treasury/{controllers/account_collection_flow_controller.rb → apis/account_collection_flow_api.rb} +19 -13
- data/lib/modern_treasury/{controllers/account_detail_controller.rb → apis/account_detail_api.rb} +25 -11
- data/lib/modern_treasury/{controllers/balance_report_controller.rb → apis/balance_report_api.rb} +11 -6
- data/lib/modern_treasury/{controllers/base_controller.rb → apis/base_api.rb} +10 -3
- data/lib/modern_treasury/{controllers/connection_controller.rb → apis/connection_api.rb} +10 -9
- data/lib/modern_treasury/{controllers/counterparty_controller.rb → apis/counterparty_api.rb} +25 -15
- data/lib/modern_treasury/{controllers/document_controller.rb → apis/document_api.rb} +52 -28
- data/lib/modern_treasury/{controllers/event_controller.rb → apis/event_api.rb} +13 -10
- data/lib/modern_treasury/{controllers/expected_payment_controller.rb → apis/expected_payment_api.rb} +26 -19
- data/lib/modern_treasury/{controllers/external_account_controller.rb → apis/external_account_api.rb} +28 -16
- data/lib/modern_treasury/{controllers/incoming_payment_detail_controller.rb → apis/incoming_payment_detail_api.rb} +22 -16
- data/lib/modern_treasury/{controllers/internal_account_controller.rb → apis/internal_account_api.rb} +21 -15
- data/lib/modern_treasury/{controllers/invoice_controller.rb → apis/invoice_api.rb} +20 -14
- data/lib/modern_treasury/{controllers/invoice_line_item_controller.rb → apis/invoice_line_item_api.rb} +24 -11
- data/lib/modern_treasury/{controllers/ledger_account_controller.rb → apis/ledger_account_api.rb} +21 -13
- data/lib/modern_treasury/{controllers/ledger_account_category_controller.rb → apis/ledger_account_category_api.rb} +37 -17
- data/lib/modern_treasury/{controllers/ledger_account_payout_controller.rb → apis/ledger_account_payout_api.rb} +18 -12
- data/lib/modern_treasury/{controllers/ledger_account_statement_controller.rb → apis/ledger_account_statement_api.rb} +7 -4
- data/lib/modern_treasury/{controllers/ledger_controller.rb → apis/ledger_api.rb} +21 -13
- data/lib/modern_treasury/{controllers/ledger_entry_controller.rb → apis/ledger_entry_api.rb} +17 -15
- data/lib/modern_treasury/{controllers/ledger_event_handler_controller.rb → apis/ledger_event_handler_api.rb} +18 -12
- data/lib/modern_treasury/{controllers/ledger_transaction_controller.rb → apis/ledger_transaction_api.rb} +34 -24
- data/lib/modern_treasury/{controllers/ledgerable_event_controller.rb → apis/ledgerable_event_api.rb} +7 -4
- data/lib/modern_treasury/{controllers/line_item_controller.rb → apis/line_item_api.rb} +20 -9
- data/lib/modern_treasury/{controllers/paper_item_controller.rb → apis/paper_item_api.rb} +12 -9
- data/lib/modern_treasury/{controllers/payment_flow_controller.rb → apis/payment_flow_api.rb} +19 -13
- data/lib/modern_treasury/{controllers/payment_order_controller.rb → apis/payment_order_api.rb} +47 -36
- data/lib/modern_treasury/{controllers/payment_reference_controller.rb → apis/payment_reference_api.rb} +16 -13
- data/lib/modern_treasury/{controllers/ping_controller.rb → apis/ping_api.rb} +4 -3
- data/lib/modern_treasury/{controllers/return_controller.rb → apis/return_api.rb} +16 -12
- data/lib/modern_treasury/{controllers/reversal_controller.rb → apis/reversal_api.rb} +12 -5
- data/lib/modern_treasury/{controllers/routing_detail_controller.rb → apis/routing_detail_api.rb} +25 -11
- data/lib/modern_treasury/{controllers/transaction_controller.rb → apis/transaction_api.rb} +16 -11
- data/lib/modern_treasury/{controllers/transaction_line_item_controller.rb → apis/transaction_line_item_api.rb} +6 -4
- data/lib/modern_treasury/{controllers/validation_controller.rb → apis/validation_api.rb} +10 -7
- data/lib/modern_treasury/{controllers/virtual_account_controller.rb → apis/virtual_account_api.rb} +23 -15
- data/lib/modern_treasury/client.rb +80 -78
- data/lib/modern_treasury/configuration.rb +18 -47
- data/lib/modern_treasury/http/api_response.rb +19 -0
- data/lib/modern_treasury/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/modern_treasury/logging/sdk_logger.rb +17 -0
- data/lib/modern_treasury/models/account.rb +26 -26
- data/lib/modern_treasury/models/account1.rb +34 -21
- data/lib/modern_treasury/models/account_collection_flow.rb +15 -16
- data/lib/modern_treasury/models/account_collection_flow_create_request.rb +18 -5
- data/lib/modern_treasury/models/account_collection_flow_update_request.rb +16 -4
- data/lib/modern_treasury/models/account_detail.rb +15 -16
- data/lib/modern_treasury/models/account_detail1.rb +19 -6
- data/lib/modern_treasury/models/account_detail_create_request.rb +19 -6
- data/lib/modern_treasury/models/{account_number_type_enum.rb → account_number_type.rb} +3 -3
- data/lib/modern_treasury/models/{account_number_type2_enum.rb → account_number_type2.rb} +3 -3
- data/lib/modern_treasury/models/{account_type_enum.rb → account_type.rb} +3 -3
- data/lib/modern_treasury/models/{account_type5_enum.rb → account_type5.rb} +3 -3
- data/lib/modern_treasury/models/accounting.rb +19 -5
- data/lib/modern_treasury/models/accounting1.rb +17 -5
- data/lib/modern_treasury/models/{accounts_type_enum.rb → accounts_type.rb} +3 -3
- data/lib/modern_treasury/models/{accounts_type1_enum.rb → accounts_type1.rb} +3 -3
- data/lib/modern_treasury/models/address.rb +13 -14
- data/lib/modern_treasury/models/address_request.rb +23 -10
- data/lib/modern_treasury/models/async_response.rb +3 -3
- data/lib/modern_treasury/models/balance.rb +15 -17
- data/lib/modern_treasury/models/balance_report.rb +14 -15
- data/lib/modern_treasury/models/{balance_report_type_enum.rb → balance_report_type.rb} +3 -3
- data/lib/modern_treasury/models/{balance_report_type1_enum.rb → balance_report_type1.rb} +3 -3
- data/lib/modern_treasury/models/{balance_type_enum.rb → balance_type.rb} +3 -3
- data/lib/modern_treasury/models/balances.rb +2 -2
- data/lib/modern_treasury/models/balances1.rb +3 -3
- data/lib/modern_treasury/models/balances2.rb +7 -7
- data/lib/modern_treasury/models/balances3.rb +8 -8
- data/lib/modern_treasury/models/{charge_bearer_enum.rb → charge_bearer.rb} +3 -3
- data/lib/modern_treasury/models/{code_enum.rb → code.rb} +3 -3
- data/lib/modern_treasury/models/{code1_enum.rb → code1.rb} +3 -3
- data/lib/modern_treasury/models/connection.rb +11 -12
- data/lib/modern_treasury/models/contact_detail.rb +13 -14
- data/lib/modern_treasury/models/contact_detail_create_request.rb +20 -6
- data/lib/modern_treasury/models/{contact_identifier_type_enum.rb → contact_identifier_type.rb} +3 -3
- data/lib/modern_treasury/models/{content_type_enum.rb → content_type.rb} +3 -3
- data/lib/modern_treasury/models/counterparty.rb +16 -17
- data/lib/modern_treasury/models/counterparty_billing_address.rb +23 -10
- data/lib/modern_treasury/models/counterparty_collect_account_request.rb +23 -10
- data/lib/modern_treasury/models/counterparty_collect_account_response.rb +4 -4
- data/lib/modern_treasury/models/counterparty_create_request.rb +31 -17
- data/lib/modern_treasury/models/counterparty_shipping_address.rb +23 -10
- data/lib/modern_treasury/models/counterparty_update_request.rb +23 -9
- data/lib/modern_treasury/models/{created_at_enum.rb → created_at.rb} +3 -3
- data/lib/modern_treasury/models/{currency_enum.rb → currency.rb} +3 -3
- data/lib/modern_treasury/models/{currency1_enum.rb → currency1.rb} +3 -3
- data/lib/modern_treasury/models/{direction_enum.rb → direction.rb} +3 -3
- data/lib/modern_treasury/models/{direction1_enum.rb → direction1.rb} +3 -3
- data/lib/modern_treasury/models/{direction10_enum.rb → direction10.rb} +3 -3
- data/lib/modern_treasury/models/{direction14_enum.rb → direction14.rb} +3 -3
- data/lib/modern_treasury/models/{direction15_enum.rb → direction15.rb} +3 -3
- data/lib/modern_treasury/models/{direction4_enum.rb → direction4.rb} +3 -3
- data/lib/modern_treasury/models/{direction5_enum.rb → direction5.rb} +3 -3
- data/lib/modern_treasury/models/{direction9_enum.rb → direction9.rb} +3 -3
- data/lib/modern_treasury/models/document.rb +16 -17
- data/lib/modern_treasury/models/document_create_request.rb +22 -9
- data/lib/modern_treasury/models/document_detail.rb +11 -11
- data/lib/modern_treasury/models/{documentable_type_enum.rb → documentable_type.rb} +3 -3
- data/lib/modern_treasury/models/{documentable_type1_enum.rb → documentable_type1.rb} +3 -3
- data/lib/modern_treasury/models/{documentable_type2_enum.rb → documentable_type2.rb} +3 -3
- data/lib/modern_treasury/models/{effective_at_enum.rb → effective_at.rb} +3 -3
- data/lib/modern_treasury/models/errors.rb +21 -7
- data/lib/modern_treasury/models/event.rb +12 -13
- data/lib/modern_treasury/models/expected_payment.rb +38 -41
- data/lib/modern_treasury/models/expected_payment_create_request.rb +43 -29
- data/lib/modern_treasury/models/expected_payment_update_request.rb +40 -27
- data/lib/modern_treasury/models/external_account.rb +26 -28
- data/lib/modern_treasury/models/external_account_complete_verification_request.rb +17 -4
- data/lib/modern_treasury/models/external_account_create_request.rb +36 -23
- data/lib/modern_treasury/models/external_account_update_request.rb +27 -14
- data/lib/modern_treasury/models/external_account_verify_request.rb +23 -9
- data/lib/modern_treasury/models/{fallback_type_enum.rb → fallback_type.rb} +3 -3
- data/lib/modern_treasury/models/{field_enum.rb → field.rb} +3 -3
- data/lib/modern_treasury/models/file.rb +4 -4
- data/lib/modern_treasury/models/{foreign_exchange_indicator_enum.rb → foreign_exchange_indicator.rb} +3 -3
- data/lib/modern_treasury/models/incoming_payment_detail.rb +41 -43
- data/lib/modern_treasury/models/incoming_payment_detail_create_request.rb +31 -17
- data/lib/modern_treasury/models/incoming_payment_detail_update_request.rb +17 -4
- data/lib/modern_treasury/models/internal_account.rb +32 -34
- data/lib/modern_treasury/models/internal_account_create_request.rb +28 -15
- data/lib/modern_treasury/models/internal_account_update_request.rb +22 -8
- data/lib/modern_treasury/models/invoice.rb +36 -38
- data/lib/modern_treasury/models/invoice_create_request.rb +38 -25
- data/lib/modern_treasury/models/invoice_line_item.rb +13 -15
- data/lib/modern_treasury/models/invoice_line_item_create_request.rb +22 -9
- data/lib/modern_treasury/models/invoice_line_item_update_request.rb +38 -25
- data/lib/modern_treasury/models/invoice_update_request.rb +40 -26
- data/lib/modern_treasury/models/invoicer_address.rb +23 -10
- data/lib/modern_treasury/models/{itemizable_type_enum.rb → itemizable_type.rb} +3 -3
- data/lib/modern_treasury/models/{itemizable_type1_enum.rb → itemizable_type1.rb} +3 -3
- data/lib/modern_treasury/models/ledger.rb +28 -14
- data/lib/modern_treasury/models/ledger_account.rb +21 -22
- data/lib/modern_treasury/models/ledger_account_category.rb +16 -17
- data/lib/modern_treasury/models/ledger_account_category_create_request.rb +26 -13
- data/lib/modern_treasury/models/ledger_account_category_update_request.rb +20 -6
- data/lib/modern_treasury/models/ledger_account_create_request.rb +30 -17
- data/lib/modern_treasury/models/{ledger_account_normal_balance_enum.rb → ledger_account_normal_balance.rb} +3 -3
- data/lib/modern_treasury/models/ledger_account_payout.rb +22 -24
- data/lib/modern_treasury/models/ledger_account_payout_create_request.rb +29 -14
- data/lib/modern_treasury/models/ledger_account_payout_update_request.rb +21 -7
- data/lib/modern_treasury/models/ledger_account_statement.rb +21 -23
- data/lib/modern_treasury/models/ledger_account_statement_create_request.rb +24 -10
- data/lib/modern_treasury/models/ledger_account_update_request.rb +20 -6
- data/lib/modern_treasury/models/ledger_balance.rb +6 -7
- data/lib/modern_treasury/models/ledger_balances.rb +4 -5
- data/lib/modern_treasury/models/ledger_balances_with_effective_at.rb +7 -8
- data/lib/modern_treasury/models/ledger_create_request.rb +20 -6
- data/lib/modern_treasury/models/ledger_entry.rb +24 -26
- data/lib/modern_treasury/models/ledger_entry_create_request.rb +30 -18
- data/lib/modern_treasury/models/ledger_entry_of_transaction_version.rb +21 -23
- data/lib/modern_treasury/models/ledger_event_handler.rb +14 -15
- data/lib/modern_treasury/models/ledger_event_handler_conditions.rb +4 -4
- data/lib/modern_treasury/models/ledger_event_handler_create_request.rb +23 -11
- data/lib/modern_treasury/models/ledger_event_handler_ledger_entries.rb +4 -4
- data/lib/modern_treasury/models/ledger_event_handler_ledger_transaction_template.rb +5 -6
- data/lib/modern_treasury/models/ledger_transaction.rb +24 -25
- data/lib/modern_treasury/models/ledger_transaction_create_request.rb +29 -17
- data/lib/modern_treasury/models/ledger_transaction_reversal_create_request.rb +27 -14
- data/lib/modern_treasury/models/ledger_transaction_update_request.rb +24 -10
- data/lib/modern_treasury/models/ledger_transaction_version.rb +24 -25
- data/lib/modern_treasury/models/{ledger_type_enum.rb → ledger_type.rb} +3 -3
- data/lib/modern_treasury/models/ledger_update_request.rb +20 -6
- data/lib/modern_treasury/models/ledgerable_event.rb +18 -19
- data/lib/modern_treasury/models/ledgerable_event_create_request.rb +26 -13
- data/lib/modern_treasury/models/{ledgerable_type_enum.rb → ledgerable_type.rb} +3 -3
- data/lib/modern_treasury/models/{ledgerable_type2_enum.rb → ledgerable_type2.rb} +3 -3
- data/lib/modern_treasury/models/{ledgerable_type5_enum.rb → ledgerable_type5.rb} +3 -3
- data/lib/modern_treasury/models/{ledgerable_type6_enum.rb → ledgerable_type6.rb} +3 -3
- data/lib/modern_treasury/models/legacy_document_create_request.rb +19 -5
- data/lib/modern_treasury/models/line_item.rb +18 -19
- data/lib/modern_treasury/models/line_item_request.rb +22 -8
- data/lib/modern_treasury/models/line_item_update_request.rb +17 -4
- data/lib/modern_treasury/models/mreturn.rb +48 -50
- data/lib/modern_treasury/models/{normal_balance_enum.rb → normal_balance.rb} +3 -3
- data/lib/modern_treasury/models/{normal_balance2_enum.rb → normal_balance2.rb} +3 -3
- data/lib/modern_treasury/models/order_by.rb +5 -5
- data/lib/modern_treasury/models/{originating_account_number_type_enum.rb → originating_account_number_type.rb} +3 -3
- data/lib/modern_treasury/models/{originating_routing_number_type_enum.rb → originating_routing_number_type.rb} +3 -3
- data/lib/modern_treasury/models/paper_item.rb +25 -27
- data/lib/modern_treasury/models/party_address.rb +23 -10
- data/lib/modern_treasury/models/{party_type_enum.rb → party_type.rb} +3 -3
- data/lib/modern_treasury/models/{party_type5_enum.rb → party_type5.rb} +3 -3
- data/lib/modern_treasury/models/{payment_direction_enum.rb → payment_direction.rb} +3 -3
- data/lib/modern_treasury/models/payment_flow.rb +21 -22
- data/lib/modern_treasury/models/payment_flow_create_request.rb +24 -10
- data/lib/modern_treasury/models/payment_flow_update_request.rb +16 -4
- data/lib/modern_treasury/models/{payment_method_enum.rb → payment_method.rb} +3 -3
- data/lib/modern_treasury/models/{payment_method1_enum.rb → payment_method1.rb} +3 -3
- data/lib/modern_treasury/models/payment_order.rb +90 -95
- data/lib/modern_treasury/models/payment_order_async_create_request.rb +75 -62
- data/lib/modern_treasury/models/payment_order_create_request.rb +77 -63
- data/lib/modern_treasury/models/payment_order_update_request.rb +77 -62
- data/lib/modern_treasury/models/payment_reference.rb +12 -13
- data/lib/modern_treasury/models/payment_reference_object.rb +14 -15
- data/lib/modern_treasury/models/{payment_type_enum.rb → payment_type.rb} +3 -3
- data/lib/modern_treasury/models/{payment_type1_enum.rb → payment_type1.rb} +3 -3
- data/lib/modern_treasury/models/{payment_type13_enum.rb → payment_type13.rb} +3 -3
- data/lib/modern_treasury/models/{payment_type2_enum.rb → payment_type2.rb} +3 -3
- data/lib/modern_treasury/models/{payment_type4_enum.rb → payment_type4.rb} +3 -3
- data/lib/modern_treasury/models/{payment_type5_enum.rb → payment_type5.rb} +3 -3
- data/lib/modern_treasury/models/{payment_type6_enum.rb → payment_type6.rb} +3 -3
- data/lib/modern_treasury/models/ping_response.rb +2 -2
- data/lib/modern_treasury/models/{priority_enum.rb → priority.rb} +3 -3
- data/lib/modern_treasury/models/{priority4_enum.rb → priority4.rb} +3 -3
- data/lib/modern_treasury/models/{reason_enum.rb → reason.rb} +3 -3
- data/lib/modern_treasury/models/{reason1_enum.rb → reason1.rb} +3 -3
- data/lib/modern_treasury/models/receiving_account.rb +43 -28
- data/lib/modern_treasury/models/receiving_account1.rb +34 -21
- data/lib/modern_treasury/models/{receiving_account_type_enum.rb → receiving_account_type.rb} +3 -3
- data/lib/modern_treasury/models/{reconciliation_method_enum.rb → reconciliation_method.rb} +3 -3
- data/lib/modern_treasury/models/{reference_number_type_enum.rb → reference_number_type.rb} +3 -3
- data/lib/modern_treasury/models/{reference_number_type1_enum.rb → reference_number_type1.rb} +3 -3
- data/lib/modern_treasury/models/{referenceable_type_enum.rb → referenceable_type.rb} +3 -3
- data/lib/modern_treasury/models/{referenceable_type1_enum.rb → referenceable_type1.rb} +3 -3
- data/lib/modern_treasury/models/return_create_request.rb +24 -10
- data/lib/modern_treasury/models/{returnable_type_enum.rb → returnable_type.rb} +3 -3
- data/lib/modern_treasury/models/{returnable_type1_enum.rb → returnable_type1.rb} +3 -3
- data/lib/modern_treasury/models/reversal.rb +13 -14
- data/lib/modern_treasury/models/reversal_create_request.rb +21 -7
- data/lib/modern_treasury/models/{role_enum.rb → role.rb} +3 -3
- data/lib/modern_treasury/models/routing_detail.rb +20 -21
- data/lib/modern_treasury/models/routing_detail1.rb +23 -9
- data/lib/modern_treasury/models/routing_detail_create_request.rb +23 -9
- data/lib/modern_treasury/models/routing_number_lookup_request.rb +11 -11
- data/lib/modern_treasury/models/{routing_number_type_enum.rb → routing_number_type.rb} +3 -3
- data/lib/modern_treasury/models/{routing_number_type1_enum.rb → routing_number_type1.rb} +3 -3
- data/lib/modern_treasury/models/{routing_number_type7_enum.rb → routing_number_type7.rb} +3 -3
- data/lib/modern_treasury/models/{routing_number_type8_enum.rb → routing_number_type8.rb} +3 -3
- data/lib/modern_treasury/models/{status_enum.rb → status.rb} +3 -3
- data/lib/modern_treasury/models/{status1_enum.rb → status1.rb} +3 -3
- data/lib/modern_treasury/models/{status11_enum.rb → status11.rb} +3 -3
- data/lib/modern_treasury/models/{status12_enum.rb → status12.rb} +3 -3
- data/lib/modern_treasury/models/{status15_enum.rb → status15.rb} +3 -3
- data/lib/modern_treasury/models/{status16_enum.rb → status16.rb} +3 -3
- data/lib/modern_treasury/models/{status17_enum.rb → status17.rb} +3 -3
- data/lib/modern_treasury/models/{status18_enum.rb → status18.rb} +3 -3
- data/lib/modern_treasury/models/{status19_enum.rb → status19.rb} +3 -3
- data/lib/modern_treasury/models/{status2_enum.rb → status2.rb} +3 -3
- data/lib/modern_treasury/models/{status20_enum.rb → status20.rb} +3 -3
- data/lib/modern_treasury/models/{status21_enum.rb → status21.rb} +3 -3
- data/lib/modern_treasury/models/{status22_enum.rb → status22.rb} +3 -3
- data/lib/modern_treasury/models/{status24_enum.rb → status24.rb} +3 -3
- data/lib/modern_treasury/models/{status3_enum.rb → status3.rb} +3 -3
- data/lib/modern_treasury/models/{status4_enum.rb → status4.rb} +3 -3
- data/lib/modern_treasury/models/{status5_enum.rb → status5.rb} +3 -3
- data/lib/modern_treasury/models/{status6_enum.rb → status6.rb} +3 -3
- data/lib/modern_treasury/models/{status7_enum.rb → status7.rb} +3 -3
- data/lib/modern_treasury/models/{status8_enum.rb → status8.rb} +3 -3
- data/lib/modern_treasury/models/{status9_enum.rb → status9.rb} +3 -3
- data/lib/modern_treasury/models/{subtype_enum.rb → subtype.rb} +3 -3
- data/lib/modern_treasury/models/{supported_payment_type_enum.rb → supported_payment_type.rb} +3 -3
- data/lib/modern_treasury/models/{transactable_type_enum.rb → transactable_type.rb} +3 -3
- data/lib/modern_treasury/models/transaction.rb +31 -33
- data/lib/modern_treasury/models/transaction_line_item.rb +19 -20
- data/lib/modern_treasury/models/{type_enum.rb → type.rb} +3 -3
- data/lib/modern_treasury/models/{type1_enum.rb → type1.rb} +3 -3
- data/lib/modern_treasury/models/{type10_enum.rb → type10.rb} +3 -3
- data/lib/modern_treasury/models/{type11_enum.rb → type11.rb} +3 -3
- data/lib/modern_treasury/models/{type12_enum.rb → type12.rb} +3 -3
- data/lib/modern_treasury/models/{type13_enum.rb → type13.rb} +3 -3
- data/lib/modern_treasury/models/{type14_enum.rb → type14.rb} +3 -3
- data/lib/modern_treasury/models/{type16_enum.rb → type16.rb} +3 -3
- data/lib/modern_treasury/models/{type4_enum.rb → type4.rb} +3 -3
- data/lib/modern_treasury/models/{type5_enum.rb → type5.rb} +3 -3
- data/lib/modern_treasury/models/{type6_enum.rb → type6.rb} +3 -3
- data/lib/modern_treasury/models/{vendor_code_type_enum.rb → vendor_code_type.rb} +3 -3
- data/lib/modern_treasury/models/{vendor_code_type1_enum.rb → vendor_code_type1.rb} +3 -3
- data/lib/modern_treasury/models/{verification_status_enum.rb → verification_status.rb} +3 -3
- data/lib/modern_treasury/models/{verification_status1_enum.rb → verification_status1.rb} +3 -3
- data/lib/modern_treasury/models/virtual_account.rb +20 -21
- data/lib/modern_treasury/models/virtual_account_create_request.rb +29 -15
- data/lib/modern_treasury/models/virtual_account_update_request.rb +19 -6
- data/lib/modern_treasury.rb +153 -152
- metadata +152 -206
- data/test/controllers/controller_test_base.rb +0 -23
- data/test/controllers/test_account_collection_flow_controller.rb +0 -64
- data/test/controllers/test_connection_controller.rb +0 -41
- data/test/controllers/test_counterparty_controller.rb +0 -65
- data/test/controllers/test_document_controller.rb +0 -41
- data/test/controllers/test_event_controller.rb +0 -46
- data/test/controllers/test_expected_payment_controller.rb +0 -71
- data/test/controllers/test_external_account_controller.rb +0 -63
- data/test/controllers/test_incoming_payment_detail_controller.rb +0 -68
- data/test/controllers/test_internal_account_controller.rb +0 -65
- data/test/controllers/test_invoice_controller.rb +0 -56
- data/test/controllers/test_ledger_account_category_controller.rb +0 -67
- data/test/controllers/test_ledger_account_controller.rb +0 -70
- data/test/controllers/test_ledger_account_payout_controller.rb +0 -62
- data/test/controllers/test_ledger_account_statement_controller.rb +0 -36
- data/test/controllers/test_ledger_controller.rb +0 -59
- data/test/controllers/test_ledger_entry_controller.rb +0 -65
- data/test/controllers/test_ledger_event_handler_controller.rb +0 -63
- data/test/controllers/test_ledger_transaction_controller.rb +0 -112
- data/test/controllers/test_ledgerable_event_controller.rb +0 -36
- data/test/controllers/test_paper_item_controller.rb +0 -43
- data/test/controllers/test_payment_flow_controller.rb +0 -67
- data/test/controllers/test_payment_order_controller.rb +0 -76
- data/test/controllers/test_payment_reference_controller.rb +0 -43
- data/test/controllers/test_ping_controller.rb +0 -31
- data/test/controllers/test_return_controller.rb +0 -64
- data/test/controllers/test_transaction_controller.rb +0 -56
- data/test/controllers/test_virtual_account_controller.rb +0 -63
- data/test/http_response_catcher.rb +0 -19
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# Represents the generic logger facade
|
|
8
|
+
class AbstractLogger < Logger
|
|
9
|
+
# Logs a message with a specified log level and additional parameters.
|
|
10
|
+
# @param level [Symbol] The log level of the message.
|
|
11
|
+
# @param message [String] The message to log.
|
|
12
|
+
# @param params [Hash] Additional parameters to include in the log message.
|
|
13
|
+
def log(level, message, params)
|
|
14
|
+
raise NotImplementedError, 'This method needs to be implemented in a child class.'
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -39,11 +39,11 @@ module ModernTreasury
|
|
|
39
39
|
attr_accessor :discarded_at
|
|
40
40
|
|
|
41
41
|
# Can be `checking`, `savings` or `other`.
|
|
42
|
-
# @return [
|
|
42
|
+
# @return [AccountType]
|
|
43
43
|
attr_accessor :account_type
|
|
44
44
|
|
|
45
45
|
# Either `individual` or `business`.
|
|
46
|
-
# @return [
|
|
46
|
+
# @return [PartyType]
|
|
47
47
|
attr_accessor :party_type
|
|
48
48
|
|
|
49
49
|
# Either `individual` or `business`.
|
|
@@ -85,7 +85,7 @@ module ModernTreasury
|
|
|
85
85
|
|
|
86
86
|
# If the external account links to a ledger account in Modern Treasury, the
|
|
87
87
|
# id of the ledger account will be populated here.
|
|
88
|
-
# @return [
|
|
88
|
+
# @return [VerificationStatus]
|
|
89
89
|
attr_accessor :verification_status
|
|
90
90
|
|
|
91
91
|
# A mapping from model property names to API property names.
|
|
@@ -145,12 +145,12 @@ module ModernTreasury
|
|
|
145
145
|
]
|
|
146
146
|
end
|
|
147
147
|
|
|
148
|
-
def initialize(id
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
ledger_account_id
|
|
148
|
+
def initialize(id: SKIP, object: SKIP, live_mode: SKIP, created_at: SKIP,
|
|
149
|
+
updated_at: SKIP, discarded_at: SKIP, account_type: SKIP,
|
|
150
|
+
party_type: SKIP, party_address: SKIP, name: SKIP,
|
|
151
|
+
account_details: SKIP, routing_details: SKIP, metadata: SKIP,
|
|
152
|
+
party_name: SKIP, contact_details: SKIP,
|
|
153
|
+
ledger_account_id: SKIP, verification_status: SKIP)
|
|
154
154
|
@id = id unless id == SKIP
|
|
155
155
|
@object = object unless object == SKIP
|
|
156
156
|
@live_mode = live_mode unless live_mode == SKIP
|
|
@@ -235,23 +235,23 @@ module ModernTreasury
|
|
|
235
235
|
hash.key?('verification_status') ? hash['verification_status'] : SKIP
|
|
236
236
|
|
|
237
237
|
# Create object from extracted values.
|
|
238
|
-
Account.new(id,
|
|
239
|
-
object,
|
|
240
|
-
live_mode,
|
|
241
|
-
created_at,
|
|
242
|
-
updated_at,
|
|
243
|
-
discarded_at,
|
|
244
|
-
account_type,
|
|
245
|
-
party_type,
|
|
246
|
-
party_address,
|
|
247
|
-
name,
|
|
248
|
-
account_details,
|
|
249
|
-
routing_details,
|
|
250
|
-
metadata,
|
|
251
|
-
party_name,
|
|
252
|
-
contact_details,
|
|
253
|
-
ledger_account_id,
|
|
254
|
-
verification_status)
|
|
238
|
+
Account.new(id: id,
|
|
239
|
+
object: object,
|
|
240
|
+
live_mode: live_mode,
|
|
241
|
+
created_at: created_at,
|
|
242
|
+
updated_at: updated_at,
|
|
243
|
+
discarded_at: discarded_at,
|
|
244
|
+
account_type: account_type,
|
|
245
|
+
party_type: party_type,
|
|
246
|
+
party_address: party_address,
|
|
247
|
+
name: name,
|
|
248
|
+
account_details: account_details,
|
|
249
|
+
routing_details: routing_details,
|
|
250
|
+
metadata: metadata,
|
|
251
|
+
party_name: party_name,
|
|
252
|
+
contact_details: contact_details,
|
|
253
|
+
ledger_account_id: ledger_account_id,
|
|
254
|
+
verification_status: verification_status)
|
|
255
255
|
end
|
|
256
256
|
|
|
257
257
|
def to_custom_created_at
|
|
@@ -10,11 +10,11 @@ module ModernTreasury
|
|
|
10
10
|
private_constant :SKIP
|
|
11
11
|
|
|
12
12
|
# Can be `checking`, `savings` or `other`.
|
|
13
|
-
# @return [
|
|
13
|
+
# @return [AccountType]
|
|
14
14
|
attr_accessor :account_type
|
|
15
15
|
|
|
16
16
|
# Either `individual` or `business`.
|
|
17
|
-
# @return [
|
|
17
|
+
# @return [PartyType]
|
|
18
18
|
attr_accessor :party_type
|
|
19
19
|
|
|
20
20
|
# Either `individual` or `business`.
|
|
@@ -110,11 +110,14 @@ module ModernTreasury
|
|
|
110
110
|
]
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
-
def initialize(account_type
|
|
114
|
-
name
|
|
115
|
-
metadata
|
|
116
|
-
ledger_account
|
|
117
|
-
contact_details
|
|
113
|
+
def initialize(account_type: SKIP, party_type: SKIP, party_address: SKIP,
|
|
114
|
+
name: SKIP, account_details: SKIP, routing_details: SKIP,
|
|
115
|
+
metadata: SKIP, party_name: SKIP, party_identifier: SKIP,
|
|
116
|
+
ledger_account: SKIP, plaid_processor_token: SKIP,
|
|
117
|
+
contact_details: SKIP, additional_properties: nil)
|
|
118
|
+
# Add additional model properties to the instance
|
|
119
|
+
additional_properties = {} if additional_properties.nil?
|
|
120
|
+
|
|
118
121
|
@account_type = account_type unless account_type == SKIP
|
|
119
122
|
@party_type = party_type unless party_type == SKIP
|
|
120
123
|
@party_address = party_address unless party_address == SKIP
|
|
@@ -127,6 +130,7 @@ module ModernTreasury
|
|
|
127
130
|
@ledger_account = ledger_account unless ledger_account == SKIP
|
|
128
131
|
@plaid_processor_token = plaid_processor_token unless plaid_processor_token == SKIP
|
|
129
132
|
@contact_details = contact_details unless contact_details == SKIP
|
|
133
|
+
@additional_properties = additional_properties
|
|
130
134
|
end
|
|
131
135
|
|
|
132
136
|
# Creates an instance of the object from a hash.
|
|
@@ -177,19 +181,27 @@ module ModernTreasury
|
|
|
177
181
|
|
|
178
182
|
contact_details = SKIP unless hash.key?('contact_details')
|
|
179
183
|
|
|
184
|
+
# Create a new hash for additional properties, removing known properties.
|
|
185
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
186
|
+
|
|
187
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
188
|
+
new_hash, proc { |value| value }
|
|
189
|
+
)
|
|
190
|
+
|
|
180
191
|
# Create object from extracted values.
|
|
181
|
-
Account1.new(account_type,
|
|
182
|
-
party_type,
|
|
183
|
-
party_address,
|
|
184
|
-
name,
|
|
185
|
-
account_details,
|
|
186
|
-
routing_details,
|
|
187
|
-
metadata,
|
|
188
|
-
party_name,
|
|
189
|
-
party_identifier,
|
|
190
|
-
ledger_account,
|
|
191
|
-
plaid_processor_token,
|
|
192
|
-
contact_details
|
|
192
|
+
Account1.new(account_type: account_type,
|
|
193
|
+
party_type: party_type,
|
|
194
|
+
party_address: party_address,
|
|
195
|
+
name: name,
|
|
196
|
+
account_details: account_details,
|
|
197
|
+
routing_details: routing_details,
|
|
198
|
+
metadata: metadata,
|
|
199
|
+
party_name: party_name,
|
|
200
|
+
party_identifier: party_identifier,
|
|
201
|
+
ledger_account: ledger_account,
|
|
202
|
+
plaid_processor_token: plaid_processor_token,
|
|
203
|
+
contact_details: contact_details,
|
|
204
|
+
additional_properties: additional_properties)
|
|
193
205
|
end
|
|
194
206
|
|
|
195
207
|
# Provides a human-readable string representation of the object.
|
|
@@ -199,7 +211,8 @@ module ModernTreasury
|
|
|
199
211
|
" #{@party_address}, name: #{@name}, account_details: #{@account_details}, routing_details:"\
|
|
200
212
|
" #{@routing_details}, metadata: #{@metadata}, party_name: #{@party_name}, party_identifier:"\
|
|
201
213
|
" #{@party_identifier}, ledger_account: #{@ledger_account}, plaid_processor_token:"\
|
|
202
|
-
" #{@plaid_processor_token}, contact_details: #{@contact_details}
|
|
214
|
+
" #{@plaid_processor_token}, contact_details: #{@contact_details}, additional_properties:"\
|
|
215
|
+
" #{@additional_properties}>"
|
|
203
216
|
end
|
|
204
217
|
|
|
205
218
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -211,7 +224,7 @@ module ModernTreasury
|
|
|
211
224
|
" #{@metadata.inspect}, party_name: #{@party_name.inspect}, party_identifier:"\
|
|
212
225
|
" #{@party_identifier.inspect}, ledger_account: #{@ledger_account.inspect},"\
|
|
213
226
|
" plaid_processor_token: #{@plaid_processor_token.inspect}, contact_details:"\
|
|
214
|
-
" #{@contact_details.inspect}>"
|
|
227
|
+
" #{@contact_details.inspect}, additional_properties: #{@additional_properties}>"
|
|
215
228
|
end
|
|
216
229
|
end
|
|
217
230
|
end
|
|
@@ -40,7 +40,7 @@ module ModernTreasury
|
|
|
40
40
|
|
|
41
41
|
# The current status of the account collection flow. One of `pending`,
|
|
42
42
|
# `completed`, `expired`, or `cancelled`.
|
|
43
|
-
# @return [
|
|
43
|
+
# @return [Status]
|
|
44
44
|
attr_accessor :status
|
|
45
45
|
|
|
46
46
|
# The ID of a counterparty. An external account created with this flow will
|
|
@@ -53,7 +53,7 @@ module ModernTreasury
|
|
|
53
53
|
attr_accessor :external_account_id
|
|
54
54
|
|
|
55
55
|
# If present, the ID of the external account created using this flow.
|
|
56
|
-
# @return [Array[
|
|
56
|
+
# @return [Array[PaymentType]]
|
|
57
57
|
attr_accessor :payment_types
|
|
58
58
|
|
|
59
59
|
# A mapping from model property names to API property names.
|
|
@@ -93,10 +93,9 @@ module ModernTreasury
|
|
|
93
93
|
]
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
-
def initialize(counterparty_id
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
external_account_id = SKIP)
|
|
96
|
+
def initialize(counterparty_id:, payment_types:, id: SKIP, object: SKIP,
|
|
97
|
+
live_mode: SKIP, created_at: SKIP, updated_at: SKIP,
|
|
98
|
+
client_token: SKIP, status: SKIP, external_account_id: SKIP)
|
|
100
99
|
@id = id unless id == SKIP
|
|
101
100
|
@object = object unless object == SKIP
|
|
102
101
|
@live_mode = live_mode unless live_mode == SKIP
|
|
@@ -136,16 +135,16 @@ module ModernTreasury
|
|
|
136
135
|
hash.key?('external_account_id') ? hash['external_account_id'] : SKIP
|
|
137
136
|
|
|
138
137
|
# Create object from extracted values.
|
|
139
|
-
AccountCollectionFlow.new(counterparty_id,
|
|
140
|
-
payment_types,
|
|
141
|
-
id,
|
|
142
|
-
object,
|
|
143
|
-
live_mode,
|
|
144
|
-
created_at,
|
|
145
|
-
updated_at,
|
|
146
|
-
client_token,
|
|
147
|
-
status,
|
|
148
|
-
external_account_id)
|
|
138
|
+
AccountCollectionFlow.new(counterparty_id: counterparty_id,
|
|
139
|
+
payment_types: payment_types,
|
|
140
|
+
id: id,
|
|
141
|
+
object: object,
|
|
142
|
+
live_mode: live_mode,
|
|
143
|
+
created_at: created_at,
|
|
144
|
+
updated_at: updated_at,
|
|
145
|
+
client_token: client_token,
|
|
146
|
+
status: status,
|
|
147
|
+
external_account_id: external_account_id)
|
|
149
148
|
end
|
|
150
149
|
|
|
151
150
|
def to_custom_created_at
|
|
@@ -35,9 +35,13 @@ module ModernTreasury
|
|
|
35
35
|
[]
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
def initialize(counterparty_id
|
|
38
|
+
def initialize(counterparty_id:, payment_types:, additional_properties: nil)
|
|
39
|
+
# Add additional model properties to the instance
|
|
40
|
+
additional_properties = {} if additional_properties.nil?
|
|
41
|
+
|
|
39
42
|
@counterparty_id = counterparty_id
|
|
40
43
|
@payment_types = payment_types
|
|
44
|
+
@additional_properties = additional_properties
|
|
41
45
|
end
|
|
42
46
|
|
|
43
47
|
# Creates an instance of the object from a hash.
|
|
@@ -49,22 +53,31 @@ module ModernTreasury
|
|
|
49
53
|
hash.key?('counterparty_id') ? hash['counterparty_id'] : nil
|
|
50
54
|
payment_types = hash.key?('payment_types') ? hash['payment_types'] : nil
|
|
51
55
|
|
|
56
|
+
# Create a new hash for additional properties, removing known properties.
|
|
57
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
58
|
+
|
|
59
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
60
|
+
new_hash, proc { |value| value }
|
|
61
|
+
)
|
|
62
|
+
|
|
52
63
|
# Create object from extracted values.
|
|
53
|
-
AccountCollectionFlowCreateRequest.new(counterparty_id,
|
|
54
|
-
payment_types
|
|
64
|
+
AccountCollectionFlowCreateRequest.new(counterparty_id: counterparty_id,
|
|
65
|
+
payment_types: payment_types,
|
|
66
|
+
additional_properties: additional_properties)
|
|
55
67
|
end
|
|
56
68
|
|
|
57
69
|
# Provides a human-readable string representation of the object.
|
|
58
70
|
def to_s
|
|
59
71
|
class_name = self.class.name.split('::').last
|
|
60
|
-
"<#{class_name} counterparty_id: #{@counterparty_id}, payment_types: #{@payment_types}
|
|
72
|
+
"<#{class_name} counterparty_id: #{@counterparty_id}, payment_types: #{@payment_types},"\
|
|
73
|
+
" additional_properties: #{@additional_properties}>"
|
|
61
74
|
end
|
|
62
75
|
|
|
63
76
|
# Provides a debugging-friendly string with detailed object information.
|
|
64
77
|
def inspect
|
|
65
78
|
class_name = self.class.name.split('::').last
|
|
66
79
|
"<#{class_name} counterparty_id: #{@counterparty_id.inspect}, payment_types:"\
|
|
67
|
-
" #{@payment_types.inspect}>"
|
|
80
|
+
" #{@payment_types.inspect}, additional_properties: #{@additional_properties}>"
|
|
68
81
|
end
|
|
69
82
|
end
|
|
70
83
|
end
|
|
@@ -31,8 +31,12 @@ module ModernTreasury
|
|
|
31
31
|
[]
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
def initialize
|
|
34
|
+
def initialize(additional_properties: nil)
|
|
35
|
+
# Add additional model properties to the instance
|
|
36
|
+
additional_properties = {} if additional_properties.nil?
|
|
37
|
+
|
|
35
38
|
@status = 'cancelled'
|
|
39
|
+
@additional_properties = additional_properties
|
|
36
40
|
end
|
|
37
41
|
|
|
38
42
|
# Creates an instance of the object from a hash.
|
|
@@ -42,20 +46,28 @@ module ModernTreasury
|
|
|
42
46
|
# Extract variables from the hash.
|
|
43
47
|
|
|
44
48
|
|
|
49
|
+
# Create a new hash for additional properties, removing known properties.
|
|
50
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
51
|
+
|
|
52
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
53
|
+
new_hash, proc { |value| value }
|
|
54
|
+
)
|
|
55
|
+
|
|
45
56
|
# Create object from extracted values.
|
|
46
|
-
AccountCollectionFlowUpdateRequest.new
|
|
57
|
+
AccountCollectionFlowUpdateRequest.new(additional_properties: additional_properties)
|
|
47
58
|
end
|
|
48
59
|
|
|
49
60
|
# Provides a human-readable string representation of the object.
|
|
50
61
|
def to_s
|
|
51
62
|
class_name = self.class.name.split('::').last
|
|
52
|
-
"<#{class_name} status: #{@status}>"
|
|
63
|
+
"<#{class_name} status: #{@status}, additional_properties: #{@additional_properties}>"
|
|
53
64
|
end
|
|
54
65
|
|
|
55
66
|
# Provides a debugging-friendly string with detailed object information.
|
|
56
67
|
def inspect
|
|
57
68
|
class_name = self.class.name.split('::').last
|
|
58
|
-
"<#{class_name} status: #{@status.inspect}
|
|
69
|
+
"<#{class_name} status: #{@status.inspect}, additional_properties:"\
|
|
70
|
+
" #{@additional_properties}>"
|
|
59
71
|
end
|
|
60
72
|
end
|
|
61
73
|
end
|
|
@@ -44,7 +44,7 @@ module ModernTreasury
|
|
|
44
44
|
|
|
45
45
|
# One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the
|
|
46
46
|
# bank account number is in a generic format.
|
|
47
|
-
# @return [
|
|
47
|
+
# @return [AccountNumberType]
|
|
48
48
|
attr_accessor :account_number_type
|
|
49
49
|
|
|
50
50
|
# The last 4 digits of the account_number.
|
|
@@ -80,10 +80,9 @@ module ModernTreasury
|
|
|
80
80
|
]
|
|
81
81
|
end
|
|
82
82
|
|
|
83
|
-
def initialize(id
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
account_number = SKIP)
|
|
83
|
+
def initialize(id:, object:, live_mode:, created_at:, updated_at:,
|
|
84
|
+
discarded_at:, account_number_type:, account_number_safe:,
|
|
85
|
+
account_number: SKIP)
|
|
87
86
|
@id = id
|
|
88
87
|
@object = object
|
|
89
88
|
@live_mode = live_mode
|
|
@@ -120,15 +119,15 @@ module ModernTreasury
|
|
|
120
119
|
hash.key?('account_number') ? hash['account_number'] : SKIP
|
|
121
120
|
|
|
122
121
|
# Create object from extracted values.
|
|
123
|
-
AccountDetail.new(id,
|
|
124
|
-
object,
|
|
125
|
-
live_mode,
|
|
126
|
-
created_at,
|
|
127
|
-
updated_at,
|
|
128
|
-
discarded_at,
|
|
129
|
-
account_number_type,
|
|
130
|
-
account_number_safe,
|
|
131
|
-
account_number)
|
|
122
|
+
AccountDetail.new(id: id,
|
|
123
|
+
object: object,
|
|
124
|
+
live_mode: live_mode,
|
|
125
|
+
created_at: created_at,
|
|
126
|
+
updated_at: updated_at,
|
|
127
|
+
discarded_at: discarded_at,
|
|
128
|
+
account_number_type: account_number_type,
|
|
129
|
+
account_number_safe: account_number_safe,
|
|
130
|
+
account_number: account_number)
|
|
132
131
|
end
|
|
133
132
|
|
|
134
133
|
def to_custom_created_at
|
|
@@ -161,7 +160,7 @@ module ModernTreasury
|
|
|
161
160
|
APIHelper.valid_type?(value.discarded_at,
|
|
162
161
|
->(val) { val.instance_of? DateTime }) and
|
|
163
162
|
APIHelper.valid_type?(value.account_number_type,
|
|
164
|
-
->(val) {
|
|
163
|
+
->(val) { AccountNumberType.validate(val) }) and
|
|
165
164
|
APIHelper.valid_type?(value.account_number_safe,
|
|
166
165
|
->(val) { val.instance_of? String })
|
|
167
166
|
)
|
|
@@ -183,7 +182,7 @@ module ModernTreasury
|
|
|
183
182
|
APIHelper.valid_type?(value['discarded_at'],
|
|
184
183
|
->(val) { val.instance_of? String }) and
|
|
185
184
|
APIHelper.valid_type?(value['account_number_type'],
|
|
186
|
-
->(val) {
|
|
185
|
+
->(val) { AccountNumberType.validate(val) }) and
|
|
187
186
|
APIHelper.valid_type?(value['account_number_safe'],
|
|
188
187
|
->(val) { val.instance_of? String })
|
|
189
188
|
)
|
|
@@ -14,7 +14,7 @@ module ModernTreasury
|
|
|
14
14
|
attr_accessor :account_number
|
|
15
15
|
|
|
16
16
|
# TODO: Write general description for this method
|
|
17
|
-
# @return [
|
|
17
|
+
# @return [AccountNumberType2]
|
|
18
18
|
attr_accessor :account_number_type
|
|
19
19
|
|
|
20
20
|
# A mapping from model property names to API property names.
|
|
@@ -37,9 +37,14 @@ module ModernTreasury
|
|
|
37
37
|
[]
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
def initialize(account_number
|
|
40
|
+
def initialize(account_number:, account_number_type: SKIP,
|
|
41
|
+
additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
41
45
|
@account_number = account_number
|
|
42
46
|
@account_number_type = account_number_type unless account_number_type == SKIP
|
|
47
|
+
@additional_properties = additional_properties
|
|
43
48
|
end
|
|
44
49
|
|
|
45
50
|
# Creates an instance of the object from a hash.
|
|
@@ -52,23 +57,31 @@ module ModernTreasury
|
|
|
52
57
|
account_number_type =
|
|
53
58
|
hash.key?('account_number_type') ? hash['account_number_type'] : SKIP
|
|
54
59
|
|
|
60
|
+
# Create a new hash for additional properties, removing known properties.
|
|
61
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
62
|
+
|
|
63
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
64
|
+
new_hash, proc { |value| value }
|
|
65
|
+
)
|
|
66
|
+
|
|
55
67
|
# Create object from extracted values.
|
|
56
|
-
AccountDetail1.new(account_number,
|
|
57
|
-
account_number_type
|
|
68
|
+
AccountDetail1.new(account_number: account_number,
|
|
69
|
+
account_number_type: account_number_type,
|
|
70
|
+
additional_properties: additional_properties)
|
|
58
71
|
end
|
|
59
72
|
|
|
60
73
|
# Provides a human-readable string representation of the object.
|
|
61
74
|
def to_s
|
|
62
75
|
class_name = self.class.name.split('::').last
|
|
63
76
|
"<#{class_name} account_number: #{@account_number}, account_number_type:"\
|
|
64
|
-
" #{@account_number_type}>"
|
|
77
|
+
" #{@account_number_type}, additional_properties: #{@additional_properties}>"
|
|
65
78
|
end
|
|
66
79
|
|
|
67
80
|
# Provides a debugging-friendly string with detailed object information.
|
|
68
81
|
def inspect
|
|
69
82
|
class_name = self.class.name.split('::').last
|
|
70
83
|
"<#{class_name} account_number: #{@account_number.inspect}, account_number_type:"\
|
|
71
|
-
" #{@account_number_type.inspect}>"
|
|
84
|
+
" #{@account_number_type.inspect}, additional_properties: #{@additional_properties}>"
|
|
72
85
|
end
|
|
73
86
|
end
|
|
74
87
|
end
|
|
@@ -15,7 +15,7 @@ module ModernTreasury
|
|
|
15
15
|
|
|
16
16
|
# One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the
|
|
17
17
|
# bank account number is in a generic format.
|
|
18
|
-
# @return [
|
|
18
|
+
# @return [AccountNumberType]
|
|
19
19
|
attr_accessor :account_number_type
|
|
20
20
|
|
|
21
21
|
# A mapping from model property names to API property names.
|
|
@@ -38,9 +38,14 @@ module ModernTreasury
|
|
|
38
38
|
[]
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
def initialize(account_number
|
|
41
|
+
def initialize(account_number:, account_number_type: SKIP,
|
|
42
|
+
additional_properties: nil)
|
|
43
|
+
# Add additional model properties to the instance
|
|
44
|
+
additional_properties = {} if additional_properties.nil?
|
|
45
|
+
|
|
42
46
|
@account_number = account_number
|
|
43
47
|
@account_number_type = account_number_type unless account_number_type == SKIP
|
|
48
|
+
@additional_properties = additional_properties
|
|
44
49
|
end
|
|
45
50
|
|
|
46
51
|
# Creates an instance of the object from a hash.
|
|
@@ -53,23 +58,31 @@ module ModernTreasury
|
|
|
53
58
|
account_number_type =
|
|
54
59
|
hash.key?('account_number_type') ? hash['account_number_type'] : SKIP
|
|
55
60
|
|
|
61
|
+
# Create a new hash for additional properties, removing known properties.
|
|
62
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
63
|
+
|
|
64
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
65
|
+
new_hash, proc { |value| value }
|
|
66
|
+
)
|
|
67
|
+
|
|
56
68
|
# Create object from extracted values.
|
|
57
|
-
AccountDetailCreateRequest.new(account_number,
|
|
58
|
-
account_number_type
|
|
69
|
+
AccountDetailCreateRequest.new(account_number: account_number,
|
|
70
|
+
account_number_type: account_number_type,
|
|
71
|
+
additional_properties: additional_properties)
|
|
59
72
|
end
|
|
60
73
|
|
|
61
74
|
# Provides a human-readable string representation of the object.
|
|
62
75
|
def to_s
|
|
63
76
|
class_name = self.class.name.split('::').last
|
|
64
77
|
"<#{class_name} account_number: #{@account_number}, account_number_type:"\
|
|
65
|
-
" #{@account_number_type}>"
|
|
78
|
+
" #{@account_number_type}, additional_properties: #{@additional_properties}>"
|
|
66
79
|
end
|
|
67
80
|
|
|
68
81
|
# Provides a debugging-friendly string with detailed object information.
|
|
69
82
|
def inspect
|
|
70
83
|
class_name = self.class.name.split('::').last
|
|
71
84
|
"<#{class_name} account_number: #{@account_number.inspect}, account_number_type:"\
|
|
72
|
-
" #{@account_number_type.inspect}>"
|
|
85
|
+
" #{@account_number_type.inspect}, additional_properties: #{@additional_properties}>"
|
|
73
86
|
end
|
|
74
87
|
end
|
|
75
88
|
end
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
module ModernTreasury
|
|
7
7
|
# One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the
|
|
8
8
|
# bank account number is in a generic format.
|
|
9
|
-
class
|
|
10
|
-
|
|
9
|
+
class AccountNumberType
|
|
10
|
+
ACCOUNT_NUMBER_TYPE = [
|
|
11
11
|
# TODO: Write general description for CLABE
|
|
12
12
|
CLABE = 'clabe'.freeze,
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ module ModernTreasury
|
|
|
27
27
|
def self.validate(value)
|
|
28
28
|
return false if value.nil?
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
ACCOUNT_NUMBER_TYPE.include?(value)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def self.from_value(value, default_value = CLABE)
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
module ModernTreasury
|
|
7
7
|
# AccountNumberType2.
|
|
8
|
-
class
|
|
9
|
-
|
|
8
|
+
class AccountNumberType2
|
|
9
|
+
ACCOUNT_NUMBER_TYPE2 = [
|
|
10
10
|
# TODO: Write general description for IBAN
|
|
11
11
|
IBAN = 'iban'.freeze,
|
|
12
12
|
|
|
@@ -26,7 +26,7 @@ module ModernTreasury
|
|
|
26
26
|
def self.validate(value)
|
|
27
27
|
return false if value.nil?
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
ACCOUNT_NUMBER_TYPE2.include?(value)
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def self.from_value(value, default_value = IBAN)
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
module ModernTreasury
|
|
7
7
|
# Can be `checking`, `savings` or `other`.
|
|
8
|
-
class
|
|
9
|
-
|
|
8
|
+
class AccountType
|
|
9
|
+
ACCOUNT_TYPE = [
|
|
10
10
|
# TODO: Write general description for CASH
|
|
11
11
|
CASH = 'cash'.freeze,
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ module ModernTreasury
|
|
|
32
32
|
def self.validate(value)
|
|
33
33
|
return false if value.nil?
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
ACCOUNT_TYPE.include?(value)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def self.from_value(value, default_value = CASH)
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
module ModernTreasury
|
|
7
7
|
# Can be checking, savings or other.
|
|
8
|
-
class
|
|
9
|
-
|
|
8
|
+
class AccountType5
|
|
9
|
+
ACCOUNT_TYPE5 = [
|
|
10
10
|
# TODO: Write general description for CASH
|
|
11
11
|
CASH = 'cash'.freeze,
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ module ModernTreasury
|
|
|
32
32
|
def self.validate(value)
|
|
33
33
|
return false if value.nil?
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
ACCOUNT_TYPE5.include?(value)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def self.from_value(value, default_value = CASH)
|