mt-sdk 0.0.1 → 0.0.4
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/client.rb +9 -7
- data/lib/modern_treasury/configuration.rb +18 -47
- data/lib/modern_treasury/controllers/account_collection_flow_controller.rb +17 -11
- data/lib/modern_treasury/controllers/account_detail_controller.rb +23 -9
- data/lib/modern_treasury/controllers/balance_report_controller.rb +9 -4
- data/lib/modern_treasury/controllers/base_controller.rb +8 -1
- data/lib/modern_treasury/controllers/connection_controller.rb +8 -7
- data/lib/modern_treasury/controllers/counterparty_controller.rb +23 -13
- data/lib/modern_treasury/controllers/document_controller.rb +50 -26
- data/lib/modern_treasury/controllers/event_controller.rb +11 -8
- data/lib/modern_treasury/controllers/expected_payment_controller.rb +24 -17
- data/lib/modern_treasury/controllers/external_account_controller.rb +26 -14
- data/lib/modern_treasury/controllers/incoming_payment_detail_controller.rb +20 -14
- data/lib/modern_treasury/controllers/internal_account_controller.rb +19 -13
- data/lib/modern_treasury/controllers/invoice_controller.rb +18 -12
- data/lib/modern_treasury/controllers/invoice_line_item_controller.rb +22 -9
- data/lib/modern_treasury/controllers/ledger_account_category_controller.rb +35 -15
- data/lib/modern_treasury/controllers/ledger_account_controller.rb +19 -11
- data/lib/modern_treasury/controllers/ledger_account_payout_controller.rb +16 -10
- data/lib/modern_treasury/controllers/ledger_account_statement_controller.rb +5 -2
- data/lib/modern_treasury/controllers/ledger_controller.rb +19 -11
- data/lib/modern_treasury/controllers/ledger_entry_controller.rb +15 -13
- data/lib/modern_treasury/controllers/ledger_event_handler_controller.rb +16 -10
- data/lib/modern_treasury/controllers/ledger_transaction_controller.rb +32 -22
- data/lib/modern_treasury/controllers/ledgerable_event_controller.rb +5 -2
- data/lib/modern_treasury/controllers/line_item_controller.rb +18 -7
- data/lib/modern_treasury/controllers/paper_item_controller.rb +10 -7
- data/lib/modern_treasury/controllers/payment_flow_controller.rb +17 -11
- data/lib/modern_treasury/controllers/payment_order_controller.rb +45 -34
- data/lib/modern_treasury/controllers/payment_reference_controller.rb +14 -11
- data/lib/modern_treasury/controllers/ping_controller.rb +2 -1
- data/lib/modern_treasury/controllers/return_controller.rb +14 -10
- data/lib/modern_treasury/controllers/reversal_controller.rb +10 -3
- data/lib/modern_treasury/controllers/routing_detail_controller.rb +23 -9
- data/lib/modern_treasury/controllers/transaction_controller.rb +14 -9
- data/lib/modern_treasury/controllers/transaction_line_item_controller.rb +4 -2
- data/lib/modern_treasury/controllers/validation_controller.rb +8 -5
- data/lib/modern_treasury/controllers/virtual_account_controller.rb +21 -13
- 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 +117 -112
- metadata +116 -170
- 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
|
@@ -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
|
-
LedgerUpdateRequest.new(name,
|
|
67
|
-
description,
|
|
68
|
-
metadata
|
|
78
|
+
LedgerUpdateRequest.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
|
|
@@ -109,11 +109,10 @@ module ModernTreasury
|
|
|
109
109
|
]
|
|
110
110
|
end
|
|
111
111
|
|
|
112
|
-
def initialize(id
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
ledger_event_handler_id = nil, metadata = nil)
|
|
112
|
+
def initialize(id:, object:, live_mode:, created_at:, updated_at:, name:,
|
|
113
|
+
description:, direction:, amount:, currency:,
|
|
114
|
+
currency_exponent:, custom_data:, ledger_event_handler_id:,
|
|
115
|
+
metadata:)
|
|
117
116
|
@id = id
|
|
118
117
|
@object = object
|
|
119
118
|
@live_mode = live_mode
|
|
@@ -157,20 +156,20 @@ module ModernTreasury
|
|
|
157
156
|
metadata = hash.key?('metadata') ? hash['metadata'] : nil
|
|
158
157
|
|
|
159
158
|
# Create object from extracted values.
|
|
160
|
-
LedgerableEvent.new(id,
|
|
161
|
-
object,
|
|
162
|
-
live_mode,
|
|
163
|
-
created_at,
|
|
164
|
-
updated_at,
|
|
165
|
-
name,
|
|
166
|
-
description,
|
|
167
|
-
direction,
|
|
168
|
-
amount,
|
|
169
|
-
currency,
|
|
170
|
-
currency_exponent,
|
|
171
|
-
custom_data,
|
|
172
|
-
ledger_event_handler_id,
|
|
173
|
-
metadata)
|
|
159
|
+
LedgerableEvent.new(id: id,
|
|
160
|
+
object: object,
|
|
161
|
+
live_mode: live_mode,
|
|
162
|
+
created_at: created_at,
|
|
163
|
+
updated_at: updated_at,
|
|
164
|
+
name: name,
|
|
165
|
+
description: description,
|
|
166
|
+
direction: direction,
|
|
167
|
+
amount: amount,
|
|
168
|
+
currency: currency,
|
|
169
|
+
currency_exponent: currency_exponent,
|
|
170
|
+
custom_data: custom_data,
|
|
171
|
+
ledger_event_handler_id: ledger_event_handler_id,
|
|
172
|
+
metadata: metadata)
|
|
174
173
|
end
|
|
175
174
|
|
|
176
175
|
def to_custom_created_at
|
|
@@ -81,9 +81,12 @@ module ModernTreasury
|
|
|
81
81
|
]
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
-
def initialize(name
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
def initialize(name:, amount:, description: SKIP, direction: SKIP,
|
|
85
|
+
currency: SKIP, currency_exponent: SKIP, custom_data: SKIP,
|
|
86
|
+
metadata: SKIP, additional_properties: nil)
|
|
87
|
+
# Add additional model properties to the instance
|
|
88
|
+
additional_properties = {} if additional_properties.nil?
|
|
89
|
+
|
|
87
90
|
@name = name
|
|
88
91
|
@description = description unless description == SKIP
|
|
89
92
|
@direction = direction unless direction == SKIP
|
|
@@ -92,6 +95,7 @@ module ModernTreasury
|
|
|
92
95
|
@currency_exponent = currency_exponent unless currency_exponent == SKIP
|
|
93
96
|
@custom_data = custom_data unless custom_data == SKIP
|
|
94
97
|
@metadata = metadata unless metadata == SKIP
|
|
98
|
+
@additional_properties = additional_properties
|
|
95
99
|
end
|
|
96
100
|
|
|
97
101
|
# Creates an instance of the object from a hash.
|
|
@@ -109,15 +113,23 @@ module ModernTreasury
|
|
|
109
113
|
custom_data = hash.key?('custom_data') ? hash['custom_data'] : SKIP
|
|
110
114
|
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
111
115
|
|
|
116
|
+
# Create a new hash for additional properties, removing known properties.
|
|
117
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
118
|
+
|
|
119
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
120
|
+
new_hash, proc { |value| value }
|
|
121
|
+
)
|
|
122
|
+
|
|
112
123
|
# Create object from extracted values.
|
|
113
|
-
LedgerableEventCreateRequest.new(name,
|
|
114
|
-
amount,
|
|
115
|
-
description,
|
|
116
|
-
direction,
|
|
117
|
-
currency,
|
|
118
|
-
currency_exponent,
|
|
119
|
-
custom_data,
|
|
120
|
-
metadata
|
|
124
|
+
LedgerableEventCreateRequest.new(name: name,
|
|
125
|
+
amount: amount,
|
|
126
|
+
description: description,
|
|
127
|
+
direction: direction,
|
|
128
|
+
currency: currency,
|
|
129
|
+
currency_exponent: currency_exponent,
|
|
130
|
+
custom_data: custom_data,
|
|
131
|
+
metadata: metadata,
|
|
132
|
+
additional_properties: additional_properties)
|
|
121
133
|
end
|
|
122
134
|
|
|
123
135
|
# Provides a human-readable string representation of the object.
|
|
@@ -125,7 +137,8 @@ module ModernTreasury
|
|
|
125
137
|
class_name = self.class.name.split('::').last
|
|
126
138
|
"<#{class_name} name: #{@name}, description: #{@description}, direction: #{@direction},"\
|
|
127
139
|
" amount: #{@amount}, currency: #{@currency}, currency_exponent: #{@currency_exponent},"\
|
|
128
|
-
" custom_data: #{@custom_data}, metadata: #{@metadata}
|
|
140
|
+
" custom_data: #{@custom_data}, metadata: #{@metadata}, additional_properties:"\
|
|
141
|
+
" #{@additional_properties}>"
|
|
129
142
|
end
|
|
130
143
|
|
|
131
144
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -134,7 +147,7 @@ module ModernTreasury
|
|
|
134
147
|
"<#{class_name} name: #{@name.inspect}, description: #{@description.inspect}, direction:"\
|
|
135
148
|
" #{@direction.inspect}, amount: #{@amount.inspect}, currency: #{@currency.inspect},"\
|
|
136
149
|
" currency_exponent: #{@currency_exponent.inspect}, custom_data: #{@custom_data.inspect},"\
|
|
137
|
-
" metadata: #{@metadata.inspect}>"
|
|
150
|
+
" metadata: #{@metadata.inspect}, additional_properties: #{@additional_properties}>"
|
|
138
151
|
end
|
|
139
152
|
end
|
|
140
153
|
end
|
|
@@ -7,8 +7,8 @@ module ModernTreasury
|
|
|
7
7
|
# If the ledger account links to another object in Modern Treasury, the type
|
|
8
8
|
# will be populated here, otherwise null. The value is one of internal_account
|
|
9
9
|
# or external_account.
|
|
10
|
-
class
|
|
11
|
-
|
|
10
|
+
class LedgerableType
|
|
11
|
+
LEDGERABLE_TYPE = [
|
|
12
12
|
# TODO: Write general description for EXTERNAL_ACCOUNT
|
|
13
13
|
EXTERNAL_ACCOUNT = 'external_account'.freeze,
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ module ModernTreasury
|
|
|
19
19
|
def self.validate(value)
|
|
20
20
|
return false if value.nil?
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
LEDGERABLE_TYPE.include?(value)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def self.from_value(value, default_value = EXTERNAL_ACCOUNT)
|
|
@@ -8,8 +8,8 @@ module ModernTreasury
|
|
|
8
8
|
# Treasury, the type will be populated here, otherwise null. This can be one
|
|
9
9
|
# of payment_order, incoming_payment_detail, expected_payment, return, or
|
|
10
10
|
# reversal.
|
|
11
|
-
class
|
|
12
|
-
|
|
11
|
+
class LedgerableType2
|
|
12
|
+
LEDGERABLE_TYPE2 = [
|
|
13
13
|
# TODO: Write general description for COUNTERPARTY
|
|
14
14
|
COUNTERPARTY = 'counterparty'.freeze,
|
|
15
15
|
|
|
@@ -44,7 +44,7 @@ module ModernTreasury
|
|
|
44
44
|
def self.validate(value)
|
|
45
45
|
return false if value.nil?
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
LEDGERABLE_TYPE2.include?(value)
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def self.from_value(value, default_value = COUNTERPARTY)
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
module ModernTreasury
|
|
7
7
|
# Specify this if you'd like to link the reversal ledger transaction to a
|
|
8
8
|
# Payment object like Return or Reversal.
|
|
9
|
-
class
|
|
10
|
-
|
|
9
|
+
class LedgerableType5
|
|
10
|
+
LEDGERABLE_TYPE5 = [
|
|
11
11
|
# TODO: Write general description for COUNTERPARTY
|
|
12
12
|
COUNTERPARTY = 'counterparty'.freeze,
|
|
13
13
|
|
|
@@ -42,7 +42,7 @@ module ModernTreasury
|
|
|
42
42
|
def self.validate(value)
|
|
43
43
|
return false if value.nil?
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
LEDGERABLE_TYPE5.include?(value)
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def self.from_value(value, default_value = COUNTERPARTY)
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
module ModernTreasury
|
|
7
7
|
# ledgerable_type6.
|
|
8
|
-
class
|
|
9
|
-
|
|
8
|
+
class LedgerableType6
|
|
9
|
+
LEDGERABLE_TYPE6 = [
|
|
10
10
|
# TODO: Write general description for COUNTERPARTY
|
|
11
11
|
COUNTERPARTY = 'counterparty'.freeze,
|
|
12
12
|
|
|
@@ -41,7 +41,7 @@ module ModernTreasury
|
|
|
41
41
|
def self.validate(value)
|
|
42
42
|
return false if value.nil?
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
LEDGERABLE_TYPE6.include?(value)
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def self.from_value(value, default_value = COUNTERPARTY)
|
|
@@ -37,9 +37,13 @@ module ModernTreasury
|
|
|
37
37
|
[]
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
def initialize(file
|
|
40
|
+
def initialize(file:, document_type: SKIP, additional_properties: nil)
|
|
41
|
+
# Add additional model properties to the instance
|
|
42
|
+
additional_properties = {} if additional_properties.nil?
|
|
43
|
+
|
|
41
44
|
@document_type = document_type unless document_type == SKIP
|
|
42
45
|
@file = file
|
|
46
|
+
@additional_properties = additional_properties
|
|
43
47
|
end
|
|
44
48
|
|
|
45
49
|
# Creates an instance of the object from a hash.
|
|
@@ -50,21 +54,31 @@ module ModernTreasury
|
|
|
50
54
|
file = hash.key?('file') ? hash['file'] : nil
|
|
51
55
|
document_type = hash.key?('document_type') ? hash['document_type'] : SKIP
|
|
52
56
|
|
|
57
|
+
# Create a new hash for additional properties, removing known properties.
|
|
58
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
59
|
+
|
|
60
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
61
|
+
new_hash, proc { |value| value }
|
|
62
|
+
)
|
|
63
|
+
|
|
53
64
|
# Create object from extracted values.
|
|
54
|
-
LegacyDocumentCreateRequest.new(file,
|
|
55
|
-
document_type
|
|
65
|
+
LegacyDocumentCreateRequest.new(file: file,
|
|
66
|
+
document_type: document_type,
|
|
67
|
+
additional_properties: additional_properties)
|
|
56
68
|
end
|
|
57
69
|
|
|
58
70
|
# Provides a human-readable string representation of the object.
|
|
59
71
|
def to_s
|
|
60
72
|
class_name = self.class.name.split('::').last
|
|
61
|
-
"<#{class_name} document_type: #{@document_type}, file: #{@file}
|
|
73
|
+
"<#{class_name} document_type: #{@document_type}, file: #{@file}, additional_properties:"\
|
|
74
|
+
" #{@additional_properties}>"
|
|
62
75
|
end
|
|
63
76
|
|
|
64
77
|
# Provides a debugging-friendly string with detailed object information.
|
|
65
78
|
def inspect
|
|
66
79
|
class_name = self.class.name.split('::').last
|
|
67
|
-
"<#{class_name} document_type: #{@document_type.inspect}, file: #{@file.inspect}
|
|
80
|
+
"<#{class_name} document_type: #{@document_type.inspect}, file: #{@file.inspect},"\
|
|
81
|
+
" additional_properties: #{@additional_properties}>"
|
|
68
82
|
end
|
|
69
83
|
end
|
|
70
84
|
end
|
|
@@ -38,7 +38,7 @@ module ModernTreasury
|
|
|
38
38
|
attr_accessor :itemizable_id
|
|
39
39
|
|
|
40
40
|
# One of `payment_orders` or `expected_payments`.
|
|
41
|
-
# @return [
|
|
41
|
+
# @return [ItemizableType]
|
|
42
42
|
attr_accessor :itemizable_type
|
|
43
43
|
|
|
44
44
|
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
@@ -105,11 +105,10 @@ module ModernTreasury
|
|
|
105
105
|
]
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
-
def initialize(id
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
accounting_ledger_class_id = nil)
|
|
108
|
+
def initialize(id:, object:, live_mode:, created_at:, updated_at:,
|
|
109
|
+
itemizable_id:, itemizable_type:, amount:, description:,
|
|
110
|
+
metadata:, accounting:, accounting_category_id:,
|
|
111
|
+
accounting_ledger_class_id:)
|
|
113
112
|
@id = id
|
|
114
113
|
@object = object
|
|
115
114
|
@live_mode = live_mode
|
|
@@ -152,19 +151,19 @@ module ModernTreasury
|
|
|
152
151
|
hash.key?('accounting_ledger_class_id') ? hash['accounting_ledger_class_id'] : nil
|
|
153
152
|
|
|
154
153
|
# Create object from extracted values.
|
|
155
|
-
LineItem.new(id,
|
|
156
|
-
object,
|
|
157
|
-
live_mode,
|
|
158
|
-
created_at,
|
|
159
|
-
updated_at,
|
|
160
|
-
itemizable_id,
|
|
161
|
-
itemizable_type,
|
|
162
|
-
amount,
|
|
163
|
-
description,
|
|
164
|
-
metadata,
|
|
165
|
-
accounting,
|
|
166
|
-
accounting_category_id,
|
|
167
|
-
accounting_ledger_class_id)
|
|
154
|
+
LineItem.new(id: id,
|
|
155
|
+
object: object,
|
|
156
|
+
live_mode: live_mode,
|
|
157
|
+
created_at: created_at,
|
|
158
|
+
updated_at: updated_at,
|
|
159
|
+
itemizable_id: itemizable_id,
|
|
160
|
+
itemizable_type: itemizable_type,
|
|
161
|
+
amount: amount,
|
|
162
|
+
description: description,
|
|
163
|
+
metadata: metadata,
|
|
164
|
+
accounting: accounting,
|
|
165
|
+
accounting_category_id: accounting_category_id,
|
|
166
|
+
accounting_ledger_class_id: accounting_ledger_class_id)
|
|
168
167
|
end
|
|
169
168
|
|
|
170
169
|
def to_custom_created_at
|
|
@@ -55,12 +55,16 @@ module ModernTreasury
|
|
|
55
55
|
]
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
def initialize(amount
|
|
59
|
-
accounting_category_id
|
|
58
|
+
def initialize(amount:, metadata: SKIP, description: SKIP,
|
|
59
|
+
accounting_category_id: SKIP, additional_properties: nil)
|
|
60
|
+
# Add additional model properties to the instance
|
|
61
|
+
additional_properties = {} if additional_properties.nil?
|
|
62
|
+
|
|
60
63
|
@amount = amount
|
|
61
64
|
@metadata = metadata unless metadata == SKIP
|
|
62
65
|
@description = description unless description == SKIP
|
|
63
66
|
@accounting_category_id = accounting_category_id unless accounting_category_id == SKIP
|
|
67
|
+
@additional_properties = additional_properties
|
|
64
68
|
end
|
|
65
69
|
|
|
66
70
|
# Creates an instance of the object from a hash.
|
|
@@ -74,25 +78,35 @@ module ModernTreasury
|
|
|
74
78
|
accounting_category_id =
|
|
75
79
|
hash.key?('accounting_category_id') ? hash['accounting_category_id'] : SKIP
|
|
76
80
|
|
|
81
|
+
# Create a new hash for additional properties, removing known properties.
|
|
82
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
83
|
+
|
|
84
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
85
|
+
new_hash, proc { |value| value }
|
|
86
|
+
)
|
|
87
|
+
|
|
77
88
|
# Create object from extracted values.
|
|
78
|
-
LineItemRequest.new(amount,
|
|
79
|
-
metadata,
|
|
80
|
-
description,
|
|
81
|
-
accounting_category_id
|
|
89
|
+
LineItemRequest.new(amount: amount,
|
|
90
|
+
metadata: metadata,
|
|
91
|
+
description: description,
|
|
92
|
+
accounting_category_id: accounting_category_id,
|
|
93
|
+
additional_properties: additional_properties)
|
|
82
94
|
end
|
|
83
95
|
|
|
84
96
|
# Provides a human-readable string representation of the object.
|
|
85
97
|
def to_s
|
|
86
98
|
class_name = self.class.name.split('::').last
|
|
87
99
|
"<#{class_name} amount: #{@amount}, metadata: #{@metadata}, description: #{@description},"\
|
|
88
|
-
" accounting_category_id: #{@accounting_category_id}
|
|
100
|
+
" accounting_category_id: #{@accounting_category_id}, additional_properties:"\
|
|
101
|
+
" #{@additional_properties}>"
|
|
89
102
|
end
|
|
90
103
|
|
|
91
104
|
# Provides a debugging-friendly string with detailed object information.
|
|
92
105
|
def inspect
|
|
93
106
|
class_name = self.class.name.split('::').last
|
|
94
107
|
"<#{class_name} amount: #{@amount.inspect}, metadata: #{@metadata.inspect}, description:"\
|
|
95
|
-
" #{@description.inspect}, accounting_category_id: #{@accounting_category_id.inspect}
|
|
108
|
+
" #{@description.inspect}, accounting_category_id: #{@accounting_category_id.inspect},"\
|
|
109
|
+
" additional_properties: #{@additional_properties}>"
|
|
96
110
|
end
|
|
97
111
|
end
|
|
98
112
|
end
|
|
@@ -33,8 +33,12 @@ module ModernTreasury
|
|
|
33
33
|
[]
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
def initialize(metadata
|
|
36
|
+
def initialize(metadata: SKIP, additional_properties: nil)
|
|
37
|
+
# Add additional model properties to the instance
|
|
38
|
+
additional_properties = {} if additional_properties.nil?
|
|
39
|
+
|
|
37
40
|
@metadata = metadata unless metadata == SKIP
|
|
41
|
+
@additional_properties = additional_properties
|
|
38
42
|
end
|
|
39
43
|
|
|
40
44
|
# Creates an instance of the object from a hash.
|
|
@@ -44,20 +48,29 @@ module ModernTreasury
|
|
|
44
48
|
# Extract variables from the hash.
|
|
45
49
|
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
46
50
|
|
|
51
|
+
# Create a new hash for additional properties, removing known properties.
|
|
52
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
53
|
+
|
|
54
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
55
|
+
new_hash, proc { |value| value }
|
|
56
|
+
)
|
|
57
|
+
|
|
47
58
|
# Create object from extracted values.
|
|
48
|
-
LineItemUpdateRequest.new(metadata
|
|
59
|
+
LineItemUpdateRequest.new(metadata: metadata,
|
|
60
|
+
additional_properties: additional_properties)
|
|
49
61
|
end
|
|
50
62
|
|
|
51
63
|
# Provides a human-readable string representation of the object.
|
|
52
64
|
def to_s
|
|
53
65
|
class_name = self.class.name.split('::').last
|
|
54
|
-
"<#{class_name} metadata: #{@metadata}>"
|
|
66
|
+
"<#{class_name} metadata: #{@metadata}, additional_properties: #{@additional_properties}>"
|
|
55
67
|
end
|
|
56
68
|
|
|
57
69
|
# Provides a debugging-friendly string with detailed object information.
|
|
58
70
|
def inspect
|
|
59
71
|
class_name = self.class.name.split('::').last
|
|
60
|
-
"<#{class_name} metadata: #{@metadata.inspect}
|
|
72
|
+
"<#{class_name} metadata: #{@metadata.inspect}, additional_properties:"\
|
|
73
|
+
" #{@additional_properties}>"
|
|
61
74
|
end
|
|
62
75
|
end
|
|
63
76
|
end
|