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
|
@@ -15,7 +15,7 @@ module ModernTreasury
|
|
|
15
15
|
|
|
16
16
|
# To post a pending ledger account payout, use `posted`. To archive a
|
|
17
17
|
# pending ledger transaction, use `archived`.
|
|
18
|
-
# @return [
|
|
18
|
+
# @return [Status8]
|
|
19
19
|
attr_accessor :status
|
|
20
20
|
|
|
21
21
|
# Additional data represented as key-value pairs. Both the key and value
|
|
@@ -48,10 +48,15 @@ module ModernTreasury
|
|
|
48
48
|
]
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
def initialize(description
|
|
51
|
+
def initialize(description: SKIP, status: SKIP, metadata: SKIP,
|
|
52
|
+
additional_properties: nil)
|
|
53
|
+
# Add additional model properties to the instance
|
|
54
|
+
additional_properties = {} if additional_properties.nil?
|
|
55
|
+
|
|
52
56
|
@description = description unless description == SKIP
|
|
53
57
|
@status = status unless status == SKIP
|
|
54
58
|
@metadata = metadata unless metadata == SKIP
|
|
59
|
+
@additional_properties = additional_properties
|
|
55
60
|
end
|
|
56
61
|
|
|
57
62
|
# Creates an instance of the object from a hash.
|
|
@@ -63,23 +68,32 @@ module ModernTreasury
|
|
|
63
68
|
status = hash.key?('status') ? hash['status'] : SKIP
|
|
64
69
|
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
65
70
|
|
|
71
|
+
# Create a new hash for additional properties, removing known properties.
|
|
72
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
73
|
+
|
|
74
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
75
|
+
new_hash, proc { |value| value }
|
|
76
|
+
)
|
|
77
|
+
|
|
66
78
|
# Create object from extracted values.
|
|
67
|
-
LedgerAccountPayoutUpdateRequest.new(description,
|
|
68
|
-
status,
|
|
69
|
-
metadata
|
|
79
|
+
LedgerAccountPayoutUpdateRequest.new(description: description,
|
|
80
|
+
status: status,
|
|
81
|
+
metadata: metadata,
|
|
82
|
+
additional_properties: additional_properties)
|
|
70
83
|
end
|
|
71
84
|
|
|
72
85
|
# Provides a human-readable string representation of the object.
|
|
73
86
|
def to_s
|
|
74
87
|
class_name = self.class.name.split('::').last
|
|
75
|
-
"<#{class_name} description: #{@description}, status: #{@status}, metadata: #{@metadata}
|
|
88
|
+
"<#{class_name} description: #{@description}, status: #{@status}, metadata: #{@metadata},"\
|
|
89
|
+
" additional_properties: #{@additional_properties}>"
|
|
76
90
|
end
|
|
77
91
|
|
|
78
92
|
# Provides a debugging-friendly string with detailed object information.
|
|
79
93
|
def inspect
|
|
80
94
|
class_name = self.class.name.split('::').last
|
|
81
95
|
"<#{class_name} description: #{@description.inspect}, status: #{@status.inspect}, metadata:"\
|
|
82
|
-
" #{@metadata.inspect}>"
|
|
96
|
+
" #{@metadata.inspect}, additional_properties: #{@additional_properties}>"
|
|
83
97
|
end
|
|
84
98
|
end
|
|
85
99
|
end
|
|
@@ -51,7 +51,7 @@ module ModernTreasury
|
|
|
51
51
|
attr_accessor :ledger_account_lock_version
|
|
52
52
|
|
|
53
53
|
# The normal balance of the ledger account.
|
|
54
|
-
# @return [
|
|
54
|
+
# @return [LedgerAccountNormalBalance]
|
|
55
55
|
attr_accessor :ledger_account_normal_balance
|
|
56
56
|
|
|
57
57
|
# The inclusive lower bound of the effective_at timestamp of the ledger
|
|
@@ -113,13 +113,11 @@ module ModernTreasury
|
|
|
113
113
|
]
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
-
def initialize(id
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
effective_at_upper_bound = nil, starting_balance = nil,
|
|
122
|
-
ending_balance = nil, metadata = nil)
|
|
116
|
+
def initialize(id:, object:, live_mode:, created_at:, updated_at:,
|
|
117
|
+
ledger_id:, description:, ledger_account_id:,
|
|
118
|
+
ledger_account_lock_version:, ledger_account_normal_balance:,
|
|
119
|
+
effective_at_lower_bound:, effective_at_upper_bound:,
|
|
120
|
+
starting_balance:, ending_balance:, metadata:)
|
|
123
121
|
@id = id
|
|
124
122
|
@object = object
|
|
125
123
|
@live_mode = live_mode
|
|
@@ -171,21 +169,21 @@ module ModernTreasury
|
|
|
171
169
|
metadata = hash.key?('metadata') ? hash['metadata'] : nil
|
|
172
170
|
|
|
173
171
|
# Create object from extracted values.
|
|
174
|
-
LedgerAccountStatement.new(id,
|
|
175
|
-
object,
|
|
176
|
-
live_mode,
|
|
177
|
-
created_at,
|
|
178
|
-
updated_at,
|
|
179
|
-
ledger_id,
|
|
180
|
-
description,
|
|
181
|
-
ledger_account_id,
|
|
182
|
-
ledger_account_lock_version,
|
|
183
|
-
ledger_account_normal_balance,
|
|
184
|
-
effective_at_lower_bound,
|
|
185
|
-
effective_at_upper_bound,
|
|
186
|
-
starting_balance,
|
|
187
|
-
ending_balance,
|
|
188
|
-
metadata)
|
|
172
|
+
LedgerAccountStatement.new(id: id,
|
|
173
|
+
object: object,
|
|
174
|
+
live_mode: live_mode,
|
|
175
|
+
created_at: created_at,
|
|
176
|
+
updated_at: updated_at,
|
|
177
|
+
ledger_id: ledger_id,
|
|
178
|
+
description: description,
|
|
179
|
+
ledger_account_id: ledger_account_id,
|
|
180
|
+
ledger_account_lock_version: ledger_account_lock_version,
|
|
181
|
+
ledger_account_normal_balance: ledger_account_normal_balance,
|
|
182
|
+
effective_at_lower_bound: effective_at_lower_bound,
|
|
183
|
+
effective_at_upper_bound: effective_at_upper_bound,
|
|
184
|
+
starting_balance: starting_balance,
|
|
185
|
+
ending_balance: ending_balance,
|
|
186
|
+
metadata: metadata)
|
|
189
187
|
end
|
|
190
188
|
|
|
191
189
|
def to_custom_created_at
|
|
@@ -60,14 +60,18 @@ module ModernTreasury
|
|
|
60
60
|
]
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
def initialize(ledger_account_id
|
|
64
|
-
effective_at_upper_bound
|
|
65
|
-
|
|
63
|
+
def initialize(ledger_account_id:, effective_at_lower_bound:,
|
|
64
|
+
effective_at_upper_bound:, description: SKIP, metadata: SKIP,
|
|
65
|
+
additional_properties: nil)
|
|
66
|
+
# Add additional model properties to the instance
|
|
67
|
+
additional_properties = {} if additional_properties.nil?
|
|
68
|
+
|
|
66
69
|
@description = description unless description == SKIP
|
|
67
70
|
@ledger_account_id = ledger_account_id
|
|
68
71
|
@effective_at_lower_bound = effective_at_lower_bound
|
|
69
72
|
@effective_at_upper_bound = effective_at_upper_bound
|
|
70
73
|
@metadata = metadata unless metadata == SKIP
|
|
74
|
+
@additional_properties = additional_properties
|
|
71
75
|
end
|
|
72
76
|
|
|
73
77
|
# Creates an instance of the object from a hash.
|
|
@@ -86,12 +90,20 @@ module ModernTreasury
|
|
|
86
90
|
description = hash.key?('description') ? hash['description'] : SKIP
|
|
87
91
|
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
88
92
|
|
|
93
|
+
# Create a new hash for additional properties, removing known properties.
|
|
94
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
95
|
+
|
|
96
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
97
|
+
new_hash, proc { |value| value }
|
|
98
|
+
)
|
|
99
|
+
|
|
89
100
|
# Create object from extracted values.
|
|
90
|
-
LedgerAccountStatementCreateRequest.new(ledger_account_id,
|
|
91
|
-
effective_at_lower_bound,
|
|
92
|
-
effective_at_upper_bound,
|
|
93
|
-
description,
|
|
94
|
-
metadata
|
|
101
|
+
LedgerAccountStatementCreateRequest.new(ledger_account_id: ledger_account_id,
|
|
102
|
+
effective_at_lower_bound: effective_at_lower_bound,
|
|
103
|
+
effective_at_upper_bound: effective_at_upper_bound,
|
|
104
|
+
description: description,
|
|
105
|
+
metadata: metadata,
|
|
106
|
+
additional_properties: additional_properties)
|
|
95
107
|
end
|
|
96
108
|
|
|
97
109
|
def to_custom_effective_at_lower_bound
|
|
@@ -107,7 +119,8 @@ module ModernTreasury
|
|
|
107
119
|
class_name = self.class.name.split('::').last
|
|
108
120
|
"<#{class_name} description: #{@description}, ledger_account_id: #{@ledger_account_id},"\
|
|
109
121
|
" effective_at_lower_bound: #{@effective_at_lower_bound}, effective_at_upper_bound:"\
|
|
110
|
-
" #{@effective_at_upper_bound}, metadata: #{@metadata}
|
|
122
|
+
" #{@effective_at_upper_bound}, metadata: #{@metadata}, additional_properties:"\
|
|
123
|
+
" #{@additional_properties}>"
|
|
111
124
|
end
|
|
112
125
|
|
|
113
126
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -116,7 +129,8 @@ module ModernTreasury
|
|
|
116
129
|
"<#{class_name} description: #{@description.inspect}, ledger_account_id:"\
|
|
117
130
|
" #{@ledger_account_id.inspect}, effective_at_lower_bound:"\
|
|
118
131
|
" #{@effective_at_lower_bound.inspect}, effective_at_upper_bound:"\
|
|
119
|
-
" #{@effective_at_upper_bound.inspect}, metadata: #{@metadata.inspect}
|
|
132
|
+
" #{@effective_at_upper_bound.inspect}, metadata: #{@metadata.inspect},"\
|
|
133
|
+
" additional_properties: #{@additional_properties}>"
|
|
120
134
|
end
|
|
121
135
|
end
|
|
122
136
|
end
|
|
@@ -47,10 +47,15 @@ module ModernTreasury
|
|
|
47
47
|
]
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
def initialize(name
|
|
50
|
+
def initialize(name: SKIP, description: SKIP, metadata: SKIP,
|
|
51
|
+
additional_properties: nil)
|
|
52
|
+
# Add additional model properties to the instance
|
|
53
|
+
additional_properties = {} if additional_properties.nil?
|
|
54
|
+
|
|
51
55
|
@name = name unless name == SKIP
|
|
52
56
|
@description = description unless description == SKIP
|
|
53
57
|
@metadata = metadata unless metadata == SKIP
|
|
58
|
+
@additional_properties = additional_properties
|
|
54
59
|
end
|
|
55
60
|
|
|
56
61
|
# Creates an instance of the object from a hash.
|
|
@@ -62,23 +67,32 @@ module ModernTreasury
|
|
|
62
67
|
description = hash.key?('description') ? hash['description'] : SKIP
|
|
63
68
|
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
64
69
|
|
|
70
|
+
# Create a new hash for additional properties, removing known properties.
|
|
71
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
72
|
+
|
|
73
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
74
|
+
new_hash, proc { |value| value }
|
|
75
|
+
)
|
|
76
|
+
|
|
65
77
|
# Create object from extracted values.
|
|
66
|
-
LedgerAccountUpdateRequest.new(name,
|
|
67
|
-
description,
|
|
68
|
-
metadata
|
|
78
|
+
LedgerAccountUpdateRequest.new(name: name,
|
|
79
|
+
description: description,
|
|
80
|
+
metadata: metadata,
|
|
81
|
+
additional_properties: additional_properties)
|
|
69
82
|
end
|
|
70
83
|
|
|
71
84
|
# Provides a human-readable string representation of the object.
|
|
72
85
|
def to_s
|
|
73
86
|
class_name = self.class.name.split('::').last
|
|
74
|
-
"<#{class_name} name: #{@name}, description: #{@description}, metadata: #{@metadata}
|
|
87
|
+
"<#{class_name} name: #{@name}, description: #{@description}, metadata: #{@metadata},"\
|
|
88
|
+
" additional_properties: #{@additional_properties}>"
|
|
75
89
|
end
|
|
76
90
|
|
|
77
91
|
# Provides a debugging-friendly string with detailed object information.
|
|
78
92
|
def inspect
|
|
79
93
|
class_name = self.class.name.split('::').last
|
|
80
94
|
"<#{class_name} name: #{@name.inspect}, description: #{@description.inspect}, metadata:"\
|
|
81
|
-
" #{@metadata.inspect}>"
|
|
95
|
+
" #{@metadata.inspect}, additional_properties: #{@additional_properties}>"
|
|
82
96
|
end
|
|
83
97
|
end
|
|
84
98
|
end
|
|
@@ -50,8 +50,7 @@ module ModernTreasury
|
|
|
50
50
|
[]
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
def initialize(credits
|
|
54
|
-
currency_exponent = nil)
|
|
53
|
+
def initialize(credits:, debits:, amount:, currency:, currency_exponent:)
|
|
55
54
|
@credits = credits
|
|
56
55
|
@debits = debits
|
|
57
56
|
@amount = amount
|
|
@@ -72,11 +71,11 @@ module ModernTreasury
|
|
|
72
71
|
hash.key?('currency_exponent') ? hash['currency_exponent'] : nil
|
|
73
72
|
|
|
74
73
|
# Create object from extracted values.
|
|
75
|
-
LedgerBalance.new(credits,
|
|
76
|
-
debits,
|
|
77
|
-
amount,
|
|
78
|
-
currency,
|
|
79
|
-
currency_exponent)
|
|
74
|
+
LedgerBalance.new(credits: credits,
|
|
75
|
+
debits: debits,
|
|
76
|
+
amount: amount,
|
|
77
|
+
currency: currency,
|
|
78
|
+
currency_exponent: currency_exponent)
|
|
80
79
|
end
|
|
81
80
|
|
|
82
81
|
# Provides a human-readable string representation of the object.
|
|
@@ -40,8 +40,7 @@ module ModernTreasury
|
|
|
40
40
|
[]
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
def initialize(pending_balance
|
|
44
|
-
available_balance = nil)
|
|
43
|
+
def initialize(pending_balance:, posted_balance:, available_balance:)
|
|
45
44
|
@pending_balance = pending_balance
|
|
46
45
|
@posted_balance = posted_balance
|
|
47
46
|
@available_balance = available_balance
|
|
@@ -59,9 +58,9 @@ module ModernTreasury
|
|
|
59
58
|
hash['available_balance']
|
|
60
59
|
|
|
61
60
|
# Create object from extracted values.
|
|
62
|
-
LedgerBalances.new(pending_balance,
|
|
63
|
-
posted_balance,
|
|
64
|
-
available_balance)
|
|
61
|
+
LedgerBalances.new(pending_balance: pending_balance,
|
|
62
|
+
posted_balance: posted_balance,
|
|
63
|
+
available_balance: available_balance)
|
|
65
64
|
end
|
|
66
65
|
|
|
67
66
|
# Provides a human-readable string representation of the object.
|
|
@@ -59,9 +59,8 @@ module ModernTreasury
|
|
|
59
59
|
]
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
-
def initialize(effective_at_lower_bound
|
|
63
|
-
|
|
64
|
-
posted_balance = nil, available_balance = nil)
|
|
62
|
+
def initialize(effective_at_lower_bound:, effective_at_upper_bound:,
|
|
63
|
+
pending_balance:, posted_balance:, available_balance:)
|
|
65
64
|
@effective_at_lower_bound = effective_at_lower_bound
|
|
66
65
|
@effective_at_upper_bound = effective_at_upper_bound
|
|
67
66
|
@pending_balance = pending_balance
|
|
@@ -87,11 +86,11 @@ module ModernTreasury
|
|
|
87
86
|
hash['available_balance']
|
|
88
87
|
|
|
89
88
|
# Create object from extracted values.
|
|
90
|
-
LedgerBalancesWithEffectiveAt.new(effective_at_lower_bound,
|
|
91
|
-
effective_at_upper_bound,
|
|
92
|
-
pending_balance,
|
|
93
|
-
posted_balance,
|
|
94
|
-
available_balance)
|
|
89
|
+
LedgerBalancesWithEffectiveAt.new(effective_at_lower_bound: effective_at_lower_bound,
|
|
90
|
+
effective_at_upper_bound: effective_at_upper_bound,
|
|
91
|
+
pending_balance: pending_balance,
|
|
92
|
+
posted_balance: posted_balance,
|
|
93
|
+
available_balance: available_balance)
|
|
95
94
|
end
|
|
96
95
|
|
|
97
96
|
def to_custom_effective_at_lower_bound
|
|
@@ -46,10 +46,15 @@ module ModernTreasury
|
|
|
46
46
|
]
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
def initialize(name
|
|
49
|
+
def initialize(name:, description: SKIP, metadata: SKIP,
|
|
50
|
+
additional_properties: nil)
|
|
51
|
+
# Add additional model properties to the instance
|
|
52
|
+
additional_properties = {} if additional_properties.nil?
|
|
53
|
+
|
|
50
54
|
@name = name
|
|
51
55
|
@description = description unless description == SKIP
|
|
52
56
|
@metadata = metadata unless metadata == SKIP
|
|
57
|
+
@additional_properties = additional_properties
|
|
53
58
|
end
|
|
54
59
|
|
|
55
60
|
# Creates an instance of the object from a hash.
|
|
@@ -61,23 +66,32 @@ module ModernTreasury
|
|
|
61
66
|
description = hash.key?('description') ? hash['description'] : SKIP
|
|
62
67
|
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
63
68
|
|
|
69
|
+
# Create a new hash for additional properties, removing known properties.
|
|
70
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
71
|
+
|
|
72
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
73
|
+
new_hash, proc { |value| value }
|
|
74
|
+
)
|
|
75
|
+
|
|
64
76
|
# Create object from extracted values.
|
|
65
|
-
LedgerCreateRequest.new(name,
|
|
66
|
-
description,
|
|
67
|
-
metadata
|
|
77
|
+
LedgerCreateRequest.new(name: name,
|
|
78
|
+
description: description,
|
|
79
|
+
metadata: metadata,
|
|
80
|
+
additional_properties: additional_properties)
|
|
68
81
|
end
|
|
69
82
|
|
|
70
83
|
# Provides a human-readable string representation of the object.
|
|
71
84
|
def to_s
|
|
72
85
|
class_name = self.class.name.split('::').last
|
|
73
|
-
"<#{class_name} name: #{@name}, description: #{@description}, metadata: #{@metadata}
|
|
86
|
+
"<#{class_name} name: #{@name}, description: #{@description}, metadata: #{@metadata},"\
|
|
87
|
+
" additional_properties: #{@additional_properties}>"
|
|
74
88
|
end
|
|
75
89
|
|
|
76
90
|
# Provides a debugging-friendly string with detailed object information.
|
|
77
91
|
def inspect
|
|
78
92
|
class_name = self.class.name.split('::').last
|
|
79
93
|
"<#{class_name} name: #{@name.inspect}, description: #{@description.inspect}, metadata:"\
|
|
80
|
-
" #{@metadata.inspect}>"
|
|
94
|
+
" #{@metadata.inspect}, additional_properties: #{@additional_properties}>"
|
|
81
95
|
end
|
|
82
96
|
end
|
|
83
97
|
end
|
|
@@ -47,12 +47,12 @@ module ModernTreasury
|
|
|
47
47
|
# transaction. A `credit` moves money from your account to someone else's. A
|
|
48
48
|
# `debit` pulls money from someone else's account to your own. Note that
|
|
49
49
|
# wire, rtp, and check payments will always be `credit`.
|
|
50
|
-
# @return [
|
|
50
|
+
# @return [Direction5]
|
|
51
51
|
attr_accessor :direction
|
|
52
52
|
|
|
53
53
|
# Equal to the state of the ledger transaction when the ledger entry was
|
|
54
54
|
# created. One of `pending`, `posted`, or `archived`.
|
|
55
|
-
# @return [
|
|
55
|
+
# @return [Status9]
|
|
56
56
|
attr_accessor :status
|
|
57
57
|
|
|
58
58
|
# The ledger account that this ledger entry is associated with.
|
|
@@ -124,14 +124,12 @@ module ModernTreasury
|
|
|
124
124
|
]
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
-
def initialize(id
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
ledger_transaction_id = nil,
|
|
134
|
-
resulting_ledger_account_balances = nil, metadata = nil)
|
|
127
|
+
def initialize(id:, object:, live_mode:, created_at:, updated_at:,
|
|
128
|
+
discarded_at:, amount:, direction:, status:,
|
|
129
|
+
ledger_account_id:, ledger_account_lock_version:,
|
|
130
|
+
ledger_account_currency:, ledger_account_currency_exponent:,
|
|
131
|
+
ledger_transaction_id:, resulting_ledger_account_balances:,
|
|
132
|
+
metadata:)
|
|
135
133
|
@id = id
|
|
136
134
|
@object = object
|
|
137
135
|
@live_mode = live_mode
|
|
@@ -186,22 +184,22 @@ module ModernTreasury
|
|
|
186
184
|
metadata = hash.key?('metadata') ? hash['metadata'] : nil
|
|
187
185
|
|
|
188
186
|
# Create object from extracted values.
|
|
189
|
-
LedgerEntry.new(id,
|
|
190
|
-
object,
|
|
191
|
-
live_mode,
|
|
192
|
-
created_at,
|
|
193
|
-
updated_at,
|
|
194
|
-
discarded_at,
|
|
195
|
-
amount,
|
|
196
|
-
direction,
|
|
197
|
-
status,
|
|
198
|
-
ledger_account_id,
|
|
199
|
-
ledger_account_lock_version,
|
|
200
|
-
ledger_account_currency,
|
|
201
|
-
ledger_account_currency_exponent,
|
|
202
|
-
ledger_transaction_id,
|
|
203
|
-
resulting_ledger_account_balances,
|
|
204
|
-
metadata)
|
|
187
|
+
LedgerEntry.new(id: id,
|
|
188
|
+
object: object,
|
|
189
|
+
live_mode: live_mode,
|
|
190
|
+
created_at: created_at,
|
|
191
|
+
updated_at: updated_at,
|
|
192
|
+
discarded_at: discarded_at,
|
|
193
|
+
amount: amount,
|
|
194
|
+
direction: direction,
|
|
195
|
+
status: status,
|
|
196
|
+
ledger_account_id: ledger_account_id,
|
|
197
|
+
ledger_account_lock_version: ledger_account_lock_version,
|
|
198
|
+
ledger_account_currency: ledger_account_currency,
|
|
199
|
+
ledger_account_currency_exponent: ledger_account_currency_exponent,
|
|
200
|
+
ledger_transaction_id: ledger_transaction_id,
|
|
201
|
+
resulting_ledger_account_balances: resulting_ledger_account_balances,
|
|
202
|
+
metadata: metadata)
|
|
205
203
|
end
|
|
206
204
|
|
|
207
205
|
def to_custom_created_at
|
|
@@ -18,7 +18,7 @@ module ModernTreasury
|
|
|
18
18
|
# transaction. A `credit` moves money from your account to someone else's. A
|
|
19
19
|
# `debit` pulls money from someone else's account to your own. Note that
|
|
20
20
|
# wire, rtp, and check payments will always be `credit`.
|
|
21
|
-
# @return [
|
|
21
|
+
# @return [Direction5]
|
|
22
22
|
attr_accessor :direction
|
|
23
23
|
|
|
24
24
|
# The ledger account that this ledger entry is associated with.
|
|
@@ -100,12 +100,14 @@ module ModernTreasury
|
|
|
100
100
|
]
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
def initialize(amount
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
def initialize(amount:, direction:, ledger_account_id:, lock_version: SKIP,
|
|
104
|
+
pending_balance_amount: SKIP, posted_balance_amount: SKIP,
|
|
105
|
+
available_balance_amount: SKIP,
|
|
106
|
+
show_resulting_ledger_account_balances: SKIP, metadata: SKIP,
|
|
107
|
+
additional_properties: nil)
|
|
108
|
+
# Add additional model properties to the instance
|
|
109
|
+
additional_properties = {} if additional_properties.nil?
|
|
110
|
+
|
|
109
111
|
@amount = amount
|
|
110
112
|
@direction = direction
|
|
111
113
|
@ledger_account_id = ledger_account_id
|
|
@@ -118,6 +120,7 @@ module ModernTreasury
|
|
|
118
120
|
show_resulting_ledger_account_balances
|
|
119
121
|
end
|
|
120
122
|
@metadata = metadata unless metadata == SKIP
|
|
123
|
+
@additional_properties = additional_properties
|
|
121
124
|
end
|
|
122
125
|
|
|
123
126
|
# Creates an instance of the object from a hash.
|
|
@@ -140,16 +143,24 @@ module ModernTreasury
|
|
|
140
143
|
hash.key?('show_resulting_ledger_account_balances') ? hash['show_resulting_ledger_account_balances'] : SKIP
|
|
141
144
|
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
142
145
|
|
|
146
|
+
# Create a new hash for additional properties, removing known properties.
|
|
147
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
148
|
+
|
|
149
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
150
|
+
new_hash, proc { |value| value }
|
|
151
|
+
)
|
|
152
|
+
|
|
143
153
|
# Create object from extracted values.
|
|
144
|
-
LedgerEntryCreateRequest.new(amount,
|
|
145
|
-
direction,
|
|
146
|
-
ledger_account_id,
|
|
147
|
-
lock_version,
|
|
148
|
-
pending_balance_amount,
|
|
149
|
-
posted_balance_amount,
|
|
150
|
-
available_balance_amount,
|
|
151
|
-
show_resulting_ledger_account_balances,
|
|
152
|
-
metadata
|
|
154
|
+
LedgerEntryCreateRequest.new(amount: amount,
|
|
155
|
+
direction: direction,
|
|
156
|
+
ledger_account_id: ledger_account_id,
|
|
157
|
+
lock_version: lock_version,
|
|
158
|
+
pending_balance_amount: pending_balance_amount,
|
|
159
|
+
posted_balance_amount: posted_balance_amount,
|
|
160
|
+
available_balance_amount: available_balance_amount,
|
|
161
|
+
show_resulting_ledger_account_balances: show_resulting_ledger_account_balances,
|
|
162
|
+
metadata: metadata,
|
|
163
|
+
additional_properties: additional_properties)
|
|
153
164
|
end
|
|
154
165
|
|
|
155
166
|
# Provides a human-readable string representation of the object.
|
|
@@ -160,7 +171,7 @@ module ModernTreasury
|
|
|
160
171
|
" #{@pending_balance_amount}, posted_balance_amount: #{@posted_balance_amount},"\
|
|
161
172
|
" available_balance_amount: #{@available_balance_amount},"\
|
|
162
173
|
" show_resulting_ledger_account_balances: #{@show_resulting_ledger_account_balances},"\
|
|
163
|
-
" metadata: #{@metadata}>"
|
|
174
|
+
" metadata: #{@metadata}, additional_properties: #{@additional_properties}>"
|
|
164
175
|
end
|
|
165
176
|
|
|
166
177
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -171,7 +182,8 @@ module ModernTreasury
|
|
|
171
182
|
" pending_balance_amount: #{@pending_balance_amount.inspect}, posted_balance_amount:"\
|
|
172
183
|
" #{@posted_balance_amount.inspect}, available_balance_amount:"\
|
|
173
184
|
" #{@available_balance_amount.inspect}, show_resulting_ledger_account_balances:"\
|
|
174
|
-
" #{@show_resulting_ledger_account_balances.inspect}, metadata: #{@metadata.inspect}
|
|
185
|
+
" #{@show_resulting_ledger_account_balances.inspect}, metadata: #{@metadata.inspect},"\
|
|
186
|
+
" additional_properties: #{@additional_properties}>"
|
|
175
187
|
end
|
|
176
188
|
end
|
|
177
189
|
end
|
|
@@ -37,12 +37,12 @@ module ModernTreasury
|
|
|
37
37
|
# transaction. A `credit` moves money from your account to someone else's. A
|
|
38
38
|
# `debit` pulls money from someone else's account to your own. Note that
|
|
39
39
|
# wire, rtp, and check payments will always be `credit`.
|
|
40
|
-
# @return [
|
|
40
|
+
# @return [Direction5]
|
|
41
41
|
attr_accessor :direction
|
|
42
42
|
|
|
43
43
|
# Equal to the state of the ledger transaction when the ledger entry was
|
|
44
44
|
# created. One of `pending`, `posted`, or `archived`.
|
|
45
|
-
# @return [
|
|
45
|
+
# @return [Status9]
|
|
46
46
|
attr_accessor :status
|
|
47
47
|
|
|
48
48
|
# The ledger account that this ledger entry is associated with.
|
|
@@ -112,13 +112,11 @@ module ModernTreasury
|
|
|
112
112
|
]
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
def initialize(id
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
ledger_transaction_id = nil, metadata = nil,
|
|
121
|
-
resulting_ledger_account_balances = nil)
|
|
115
|
+
def initialize(id:, object:, live_mode:, created_at:, amount:, direction:,
|
|
116
|
+
status:, ledger_account_id:, ledger_account_lock_version:,
|
|
117
|
+
ledger_account_currency:, ledger_account_currency_exponent:,
|
|
118
|
+
ledger_transaction_id:, metadata:,
|
|
119
|
+
resulting_ledger_account_balances:)
|
|
122
120
|
@id = id
|
|
123
121
|
@object = object
|
|
124
122
|
@live_mode = live_mode
|
|
@@ -165,20 +163,20 @@ module ModernTreasury
|
|
|
165
163
|
end
|
|
166
164
|
|
|
167
165
|
# Create object from extracted values.
|
|
168
|
-
LedgerEntryOfTransactionVersion.new(id,
|
|
169
|
-
object,
|
|
170
|
-
live_mode,
|
|
171
|
-
created_at,
|
|
172
|
-
amount,
|
|
173
|
-
direction,
|
|
174
|
-
status,
|
|
175
|
-
ledger_account_id,
|
|
176
|
-
ledger_account_lock_version,
|
|
177
|
-
ledger_account_currency,
|
|
178
|
-
ledger_account_currency_exponent,
|
|
179
|
-
ledger_transaction_id,
|
|
180
|
-
metadata,
|
|
181
|
-
resulting_ledger_account_balances)
|
|
166
|
+
LedgerEntryOfTransactionVersion.new(id: id,
|
|
167
|
+
object: object,
|
|
168
|
+
live_mode: live_mode,
|
|
169
|
+
created_at: created_at,
|
|
170
|
+
amount: amount,
|
|
171
|
+
direction: direction,
|
|
172
|
+
status: status,
|
|
173
|
+
ledger_account_id: ledger_account_id,
|
|
174
|
+
ledger_account_lock_version: ledger_account_lock_version,
|
|
175
|
+
ledger_account_currency: ledger_account_currency,
|
|
176
|
+
ledger_account_currency_exponent: ledger_account_currency_exponent,
|
|
177
|
+
ledger_transaction_id: ledger_transaction_id,
|
|
178
|
+
metadata: metadata,
|
|
179
|
+
resulting_ledger_account_balances: resulting_ledger_account_balances)
|
|
182
180
|
end
|
|
183
181
|
|
|
184
182
|
def to_custom_created_at
|