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
|
@@ -51,7 +51,7 @@ module ModernTreasury
|
|
|
51
51
|
attr_accessor :counterparty_shipping_address
|
|
52
52
|
|
|
53
53
|
# Three-letter ISO currency code.
|
|
54
|
-
# @return [
|
|
54
|
+
# @return [Currency]
|
|
55
55
|
attr_accessor :currency
|
|
56
56
|
|
|
57
57
|
# A free-form description of the invoice.
|
|
@@ -81,13 +81,13 @@ module ModernTreasury
|
|
|
81
81
|
attr_accessor :payment_effective_date
|
|
82
82
|
|
|
83
83
|
# One of `ach` or `eft`
|
|
84
|
-
# @return [
|
|
84
|
+
# @return [PaymentType5]
|
|
85
85
|
attr_accessor :payment_type
|
|
86
86
|
|
|
87
87
|
# When opening an invoice, whether to show the embedded payment UI ,
|
|
88
88
|
# automatically debit the recipient, or rely on manual payment from the
|
|
89
89
|
# recipient.
|
|
90
|
-
# @return [
|
|
90
|
+
# @return [PaymentMethod]
|
|
91
91
|
attr_accessor :payment_method
|
|
92
92
|
|
|
93
93
|
# The URL of the hosted web UI where the invoice can be viewed.
|
|
@@ -108,7 +108,7 @@ module ModernTreasury
|
|
|
108
108
|
attr_accessor :pdf_url
|
|
109
109
|
|
|
110
110
|
# The status of the invoice.
|
|
111
|
-
# @return [
|
|
111
|
+
# @return [Status5]
|
|
112
112
|
attr_accessor :status
|
|
113
113
|
|
|
114
114
|
# Total amount due in specified currency's smallest unit, e.g., $10 USD
|
|
@@ -166,16 +166,14 @@ module ModernTreasury
|
|
|
166
166
|
]
|
|
167
167
|
end
|
|
168
168
|
|
|
169
|
-
def initialize(id
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
counterparty_shipping_address
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
payment_orders = nil, pdf_url = nil, status = nil,
|
|
178
|
-
total_amount = nil)
|
|
169
|
+
def initialize(id:, object:, live_mode:, created_at:, updated_at:,
|
|
170
|
+
contact_details:, counterparty_id:,
|
|
171
|
+
counterparty_billing_address:,
|
|
172
|
+
counterparty_shipping_address:, currency:, description:,
|
|
173
|
+
due_date:, invoicer_address:, originating_account_id:,
|
|
174
|
+
receiving_account_id:, payment_effective_date:,
|
|
175
|
+
payment_type:, payment_method:, hosted_url:, number:,
|
|
176
|
+
payment_orders:, pdf_url:, status:, total_amount:)
|
|
179
177
|
@id = id
|
|
180
178
|
@object = object
|
|
181
179
|
@live_mode = live_mode
|
|
@@ -267,30 +265,30 @@ module ModernTreasury
|
|
|
267
265
|
total_amount = hash.key?('total_amount') ? hash['total_amount'] : nil
|
|
268
266
|
|
|
269
267
|
# Create object from extracted values.
|
|
270
|
-
Invoice.new(id,
|
|
271
|
-
object,
|
|
272
|
-
live_mode,
|
|
273
|
-
created_at,
|
|
274
|
-
updated_at,
|
|
275
|
-
contact_details,
|
|
276
|
-
counterparty_id,
|
|
277
|
-
counterparty_billing_address,
|
|
278
|
-
counterparty_shipping_address,
|
|
279
|
-
currency,
|
|
280
|
-
description,
|
|
281
|
-
due_date,
|
|
282
|
-
invoicer_address,
|
|
283
|
-
originating_account_id,
|
|
284
|
-
receiving_account_id,
|
|
285
|
-
payment_effective_date,
|
|
286
|
-
payment_type,
|
|
287
|
-
payment_method,
|
|
288
|
-
hosted_url,
|
|
289
|
-
number,
|
|
290
|
-
payment_orders,
|
|
291
|
-
pdf_url,
|
|
292
|
-
status,
|
|
293
|
-
total_amount)
|
|
268
|
+
Invoice.new(id: id,
|
|
269
|
+
object: object,
|
|
270
|
+
live_mode: live_mode,
|
|
271
|
+
created_at: created_at,
|
|
272
|
+
updated_at: updated_at,
|
|
273
|
+
contact_details: contact_details,
|
|
274
|
+
counterparty_id: counterparty_id,
|
|
275
|
+
counterparty_billing_address: counterparty_billing_address,
|
|
276
|
+
counterparty_shipping_address: counterparty_shipping_address,
|
|
277
|
+
currency: currency,
|
|
278
|
+
description: description,
|
|
279
|
+
due_date: due_date,
|
|
280
|
+
invoicer_address: invoicer_address,
|
|
281
|
+
originating_account_id: originating_account_id,
|
|
282
|
+
receiving_account_id: receiving_account_id,
|
|
283
|
+
payment_effective_date: payment_effective_date,
|
|
284
|
+
payment_type: payment_type,
|
|
285
|
+
payment_method: payment_method,
|
|
286
|
+
hosted_url: hosted_url,
|
|
287
|
+
number: number,
|
|
288
|
+
payment_orders: payment_orders,
|
|
289
|
+
pdf_url: pdf_url,
|
|
290
|
+
status: status,
|
|
291
|
+
total_amount: total_amount)
|
|
294
292
|
end
|
|
295
293
|
|
|
296
294
|
def to_custom_created_at
|
|
@@ -28,7 +28,7 @@ module ModernTreasury
|
|
|
28
28
|
attr_accessor :counterparty_shipping_address
|
|
29
29
|
|
|
30
30
|
# Three-letter ISO currency code.
|
|
31
|
-
# @return [
|
|
31
|
+
# @return [Currency]
|
|
32
32
|
attr_accessor :currency
|
|
33
33
|
|
|
34
34
|
# A free-form description of the invoice.
|
|
@@ -59,7 +59,7 @@ module ModernTreasury
|
|
|
59
59
|
|
|
60
60
|
# One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
|
|
61
61
|
# `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.
|
|
62
|
-
# @return [
|
|
62
|
+
# @return [PaymentType6]
|
|
63
63
|
attr_accessor :payment_type
|
|
64
64
|
|
|
65
65
|
# The method by which the invoice can be paid. `ui` will show the embedded
|
|
@@ -69,7 +69,7 @@ module ModernTreasury
|
|
|
69
69
|
# direction will be debit. If the invoice amount is negative, the
|
|
70
70
|
# automatically initiated payment order's direction will be credit. One of
|
|
71
71
|
# `manual`, `ui`, or `automatic`.
|
|
72
|
-
# @return [
|
|
72
|
+
# @return [PaymentMethod1]
|
|
73
73
|
attr_accessor :payment_method
|
|
74
74
|
|
|
75
75
|
# A mapping from model property names to API property names.
|
|
@@ -117,13 +117,16 @@ module ModernTreasury
|
|
|
117
117
|
]
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
-
def initialize(counterparty_id
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
def initialize(counterparty_id:, due_date:, originating_account_id:,
|
|
121
|
+
contact_details: SKIP, counterparty_billing_address: SKIP,
|
|
122
|
+
counterparty_shipping_address: SKIP, currency: SKIP,
|
|
123
|
+
description: SKIP, invoicer_address: SKIP,
|
|
124
|
+
receiving_account_id: SKIP, payment_effective_date: SKIP,
|
|
125
|
+
payment_type: SKIP, payment_method: SKIP,
|
|
126
|
+
additional_properties: nil)
|
|
127
|
+
# Add additional model properties to the instance
|
|
128
|
+
additional_properties = {} if additional_properties.nil?
|
|
129
|
+
|
|
127
130
|
@contact_details = contact_details unless contact_details == SKIP
|
|
128
131
|
@counterparty_id = counterparty_id
|
|
129
132
|
unless counterparty_billing_address == SKIP
|
|
@@ -143,6 +146,7 @@ module ModernTreasury
|
|
|
143
146
|
@payment_effective_date = payment_effective_date unless payment_effective_date == SKIP
|
|
144
147
|
@payment_type = payment_type unless payment_type == SKIP
|
|
145
148
|
@payment_method = payment_method unless payment_method == SKIP
|
|
149
|
+
@additional_properties = additional_properties
|
|
146
150
|
end
|
|
147
151
|
|
|
148
152
|
# Creates an instance of the object from a hash.
|
|
@@ -185,20 +189,28 @@ module ModernTreasury
|
|
|
185
189
|
payment_method =
|
|
186
190
|
hash.key?('payment_method') ? hash['payment_method'] : SKIP
|
|
187
191
|
|
|
192
|
+
# Create a new hash for additional properties, removing known properties.
|
|
193
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
194
|
+
|
|
195
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
196
|
+
new_hash, proc { |value| value }
|
|
197
|
+
)
|
|
198
|
+
|
|
188
199
|
# Create object from extracted values.
|
|
189
|
-
InvoiceCreateRequest.new(counterparty_id,
|
|
190
|
-
due_date,
|
|
191
|
-
originating_account_id,
|
|
192
|
-
contact_details,
|
|
193
|
-
counterparty_billing_address,
|
|
194
|
-
counterparty_shipping_address,
|
|
195
|
-
currency,
|
|
196
|
-
description,
|
|
197
|
-
invoicer_address,
|
|
198
|
-
receiving_account_id,
|
|
199
|
-
payment_effective_date,
|
|
200
|
-
payment_type,
|
|
201
|
-
payment_method
|
|
200
|
+
InvoiceCreateRequest.new(counterparty_id: counterparty_id,
|
|
201
|
+
due_date: due_date,
|
|
202
|
+
originating_account_id: originating_account_id,
|
|
203
|
+
contact_details: contact_details,
|
|
204
|
+
counterparty_billing_address: counterparty_billing_address,
|
|
205
|
+
counterparty_shipping_address: counterparty_shipping_address,
|
|
206
|
+
currency: currency,
|
|
207
|
+
description: description,
|
|
208
|
+
invoicer_address: invoicer_address,
|
|
209
|
+
receiving_account_id: receiving_account_id,
|
|
210
|
+
payment_effective_date: payment_effective_date,
|
|
211
|
+
payment_type: payment_type,
|
|
212
|
+
payment_method: payment_method,
|
|
213
|
+
additional_properties: additional_properties)
|
|
202
214
|
end
|
|
203
215
|
|
|
204
216
|
def to_custom_due_date
|
|
@@ -215,7 +227,7 @@ module ModernTreasury
|
|
|
215
227
|
" #{@invoicer_address}, originating_account_id: #{@originating_account_id},"\
|
|
216
228
|
" receiving_account_id: #{@receiving_account_id}, payment_effective_date:"\
|
|
217
229
|
" #{@payment_effective_date}, payment_type: #{@payment_type}, payment_method:"\
|
|
218
|
-
" #{@payment_method}>"
|
|
230
|
+
" #{@payment_method}, additional_properties: #{@additional_properties}>"
|
|
219
231
|
end
|
|
220
232
|
|
|
221
233
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -229,7 +241,8 @@ module ModernTreasury
|
|
|
229
241
|
" #{@invoicer_address.inspect}, originating_account_id: #{@originating_account_id.inspect},"\
|
|
230
242
|
" receiving_account_id: #{@receiving_account_id.inspect}, payment_effective_date:"\
|
|
231
243
|
" #{@payment_effective_date.inspect}, payment_type: #{@payment_type.inspect},"\
|
|
232
|
-
" payment_method: #{@payment_method.inspect}
|
|
244
|
+
" payment_method: #{@payment_method.inspect}, additional_properties:"\
|
|
245
|
+
" #{@additional_properties}>"
|
|
233
246
|
end
|
|
234
247
|
end
|
|
235
248
|
end
|
|
@@ -89,10 +89,8 @@ module ModernTreasury
|
|
|
89
89
|
[]
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
-
def initialize(id
|
|
93
|
-
|
|
94
|
-
quantity = nil, unit_amount = nil, direction = nil,
|
|
95
|
-
amount = nil)
|
|
92
|
+
def initialize(id:, object:, live_mode:, created_at:, updated_at:, name:,
|
|
93
|
+
description:, quantity:, unit_amount:, direction:, amount:)
|
|
96
94
|
@id = id
|
|
97
95
|
@object = object
|
|
98
96
|
@live_mode = live_mode
|
|
@@ -128,17 +126,17 @@ module ModernTreasury
|
|
|
128
126
|
amount = hash.key?('amount') ? hash['amount'] : nil
|
|
129
127
|
|
|
130
128
|
# Create object from extracted values.
|
|
131
|
-
InvoiceLineItem.new(id,
|
|
132
|
-
object,
|
|
133
|
-
live_mode,
|
|
134
|
-
created_at,
|
|
135
|
-
updated_at,
|
|
136
|
-
name,
|
|
137
|
-
description,
|
|
138
|
-
quantity,
|
|
139
|
-
unit_amount,
|
|
140
|
-
direction,
|
|
141
|
-
amount)
|
|
129
|
+
InvoiceLineItem.new(id: id,
|
|
130
|
+
object: object,
|
|
131
|
+
live_mode: live_mode,
|
|
132
|
+
created_at: created_at,
|
|
133
|
+
updated_at: updated_at,
|
|
134
|
+
name: name,
|
|
135
|
+
description: description,
|
|
136
|
+
quantity: quantity,
|
|
137
|
+
unit_amount: unit_amount,
|
|
138
|
+
direction: direction,
|
|
139
|
+
amount: amount)
|
|
142
140
|
end
|
|
143
141
|
|
|
144
142
|
def to_custom_created_at
|
|
@@ -58,13 +58,17 @@ module ModernTreasury
|
|
|
58
58
|
[]
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
-
def initialize(name
|
|
62
|
-
|
|
61
|
+
def initialize(name:, unit_amount:, description: SKIP, quantity: SKIP,
|
|
62
|
+
direction: SKIP, additional_properties: nil)
|
|
63
|
+
# Add additional model properties to the instance
|
|
64
|
+
additional_properties = {} if additional_properties.nil?
|
|
65
|
+
|
|
63
66
|
@name = name
|
|
64
67
|
@description = description unless description == SKIP
|
|
65
68
|
@quantity = quantity unless quantity == SKIP
|
|
66
69
|
@unit_amount = unit_amount
|
|
67
70
|
@direction = direction unless direction == SKIP
|
|
71
|
+
@additional_properties = additional_properties
|
|
68
72
|
end
|
|
69
73
|
|
|
70
74
|
# Creates an instance of the object from a hash.
|
|
@@ -78,19 +82,28 @@ module ModernTreasury
|
|
|
78
82
|
quantity = hash.key?('quantity') ? hash['quantity'] : SKIP
|
|
79
83
|
direction = hash.key?('direction') ? hash['direction'] : SKIP
|
|
80
84
|
|
|
85
|
+
# Create a new hash for additional properties, removing known properties.
|
|
86
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
87
|
+
|
|
88
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
89
|
+
new_hash, proc { |value| value }
|
|
90
|
+
)
|
|
91
|
+
|
|
81
92
|
# Create object from extracted values.
|
|
82
|
-
InvoiceLineItemCreateRequest.new(name,
|
|
83
|
-
unit_amount,
|
|
84
|
-
description,
|
|
85
|
-
quantity,
|
|
86
|
-
direction
|
|
93
|
+
InvoiceLineItemCreateRequest.new(name: name,
|
|
94
|
+
unit_amount: unit_amount,
|
|
95
|
+
description: description,
|
|
96
|
+
quantity: quantity,
|
|
97
|
+
direction: direction,
|
|
98
|
+
additional_properties: additional_properties)
|
|
87
99
|
end
|
|
88
100
|
|
|
89
101
|
# Provides a human-readable string representation of the object.
|
|
90
102
|
def to_s
|
|
91
103
|
class_name = self.class.name.split('::').last
|
|
92
104
|
"<#{class_name} name: #{@name}, description: #{@description}, quantity: #{@quantity},"\
|
|
93
|
-
" unit_amount: #{@unit_amount}, direction: #{@direction}
|
|
105
|
+
" unit_amount: #{@unit_amount}, direction: #{@direction}, additional_properties:"\
|
|
106
|
+
" #{@additional_properties}>"
|
|
94
107
|
end
|
|
95
108
|
|
|
96
109
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -98,7 +111,7 @@ module ModernTreasury
|
|
|
98
111
|
class_name = self.class.name.split('::').last
|
|
99
112
|
"<#{class_name} name: #{@name.inspect}, description: #{@description.inspect}, quantity:"\
|
|
100
113
|
" #{@quantity.inspect}, unit_amount: #{@unit_amount.inspect}, direction:"\
|
|
101
|
-
" #{@direction.inspect}>"
|
|
114
|
+
" #{@direction.inspect}, additional_properties: #{@additional_properties}>"
|
|
102
115
|
end
|
|
103
116
|
end
|
|
104
117
|
end
|
|
@@ -28,7 +28,7 @@ module ModernTreasury
|
|
|
28
28
|
attr_accessor :counterparty_shipping_address
|
|
29
29
|
|
|
30
30
|
# Three-letter ISO currency code.
|
|
31
|
-
# @return [
|
|
31
|
+
# @return [Currency]
|
|
32
32
|
attr_accessor :currency
|
|
33
33
|
|
|
34
34
|
# A free-form description of the invoice.
|
|
@@ -59,7 +59,7 @@ module ModernTreasury
|
|
|
59
59
|
|
|
60
60
|
# One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
|
|
61
61
|
# `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.
|
|
62
|
-
# @return [
|
|
62
|
+
# @return [PaymentType6]
|
|
63
63
|
attr_accessor :payment_type
|
|
64
64
|
|
|
65
65
|
# The method by which the invoice can be paid. `ui` will show the embedded
|
|
@@ -69,7 +69,7 @@ module ModernTreasury
|
|
|
69
69
|
# direction will be debit. If the invoice amount is negative, the
|
|
70
70
|
# automatically initiated payment order's direction will be credit. One of
|
|
71
71
|
# `manual`, `ui`, or `automatic`.
|
|
72
|
-
# @return [
|
|
72
|
+
# @return [PaymentMethod1]
|
|
73
73
|
attr_accessor :payment_method
|
|
74
74
|
|
|
75
75
|
# A mapping from model property names to API property names.
|
|
@@ -120,13 +120,16 @@ module ModernTreasury
|
|
|
120
120
|
]
|
|
121
121
|
end
|
|
122
122
|
|
|
123
|
-
def initialize(contact_details
|
|
124
|
-
counterparty_billing_address
|
|
125
|
-
counterparty_shipping_address
|
|
126
|
-
description
|
|
127
|
-
originating_account_id
|
|
128
|
-
payment_effective_date
|
|
129
|
-
payment_method
|
|
123
|
+
def initialize(contact_details: SKIP, counterparty_id: SKIP,
|
|
124
|
+
counterparty_billing_address: SKIP,
|
|
125
|
+
counterparty_shipping_address: SKIP, currency: SKIP,
|
|
126
|
+
description: SKIP, due_date: SKIP, invoicer_address: SKIP,
|
|
127
|
+
originating_account_id: SKIP, receiving_account_id: SKIP,
|
|
128
|
+
payment_effective_date: SKIP, payment_type: SKIP,
|
|
129
|
+
payment_method: SKIP, additional_properties: nil)
|
|
130
|
+
# Add additional model properties to the instance
|
|
131
|
+
additional_properties = {} if additional_properties.nil?
|
|
132
|
+
|
|
130
133
|
@contact_details = contact_details unless contact_details == SKIP
|
|
131
134
|
@counterparty_id = counterparty_id unless counterparty_id == SKIP
|
|
132
135
|
unless counterparty_billing_address == SKIP
|
|
@@ -146,6 +149,7 @@ module ModernTreasury
|
|
|
146
149
|
@payment_effective_date = payment_effective_date unless payment_effective_date == SKIP
|
|
147
150
|
@payment_type = payment_type unless payment_type == SKIP
|
|
148
151
|
@payment_method = payment_method unless payment_method == SKIP
|
|
152
|
+
@additional_properties = additional_properties
|
|
149
153
|
end
|
|
150
154
|
|
|
151
155
|
# Creates an instance of the object from a hash.
|
|
@@ -190,20 +194,28 @@ module ModernTreasury
|
|
|
190
194
|
payment_method =
|
|
191
195
|
hash.key?('payment_method') ? hash['payment_method'] : SKIP
|
|
192
196
|
|
|
197
|
+
# Create a new hash for additional properties, removing known properties.
|
|
198
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
199
|
+
|
|
200
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
201
|
+
new_hash, proc { |value| value }
|
|
202
|
+
)
|
|
203
|
+
|
|
193
204
|
# Create object from extracted values.
|
|
194
|
-
InvoiceLineItemUpdateRequest.new(contact_details,
|
|
195
|
-
counterparty_id,
|
|
196
|
-
counterparty_billing_address,
|
|
197
|
-
counterparty_shipping_address,
|
|
198
|
-
currency,
|
|
199
|
-
description,
|
|
200
|
-
due_date,
|
|
201
|
-
invoicer_address,
|
|
202
|
-
originating_account_id,
|
|
203
|
-
receiving_account_id,
|
|
204
|
-
payment_effective_date,
|
|
205
|
-
payment_type,
|
|
206
|
-
payment_method
|
|
205
|
+
InvoiceLineItemUpdateRequest.new(contact_details: contact_details,
|
|
206
|
+
counterparty_id: counterparty_id,
|
|
207
|
+
counterparty_billing_address: counterparty_billing_address,
|
|
208
|
+
counterparty_shipping_address: counterparty_shipping_address,
|
|
209
|
+
currency: currency,
|
|
210
|
+
description: description,
|
|
211
|
+
due_date: due_date,
|
|
212
|
+
invoicer_address: invoicer_address,
|
|
213
|
+
originating_account_id: originating_account_id,
|
|
214
|
+
receiving_account_id: receiving_account_id,
|
|
215
|
+
payment_effective_date: payment_effective_date,
|
|
216
|
+
payment_type: payment_type,
|
|
217
|
+
payment_method: payment_method,
|
|
218
|
+
additional_properties: additional_properties)
|
|
207
219
|
end
|
|
208
220
|
|
|
209
221
|
def to_custom_due_date
|
|
@@ -220,7 +232,7 @@ module ModernTreasury
|
|
|
220
232
|
" #{@invoicer_address}, originating_account_id: #{@originating_account_id},"\
|
|
221
233
|
" receiving_account_id: #{@receiving_account_id}, payment_effective_date:"\
|
|
222
234
|
" #{@payment_effective_date}, payment_type: #{@payment_type}, payment_method:"\
|
|
223
|
-
" #{@payment_method}>"
|
|
235
|
+
" #{@payment_method}, additional_properties: #{@additional_properties}>"
|
|
224
236
|
end
|
|
225
237
|
|
|
226
238
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -234,7 +246,8 @@ module ModernTreasury
|
|
|
234
246
|
" #{@invoicer_address.inspect}, originating_account_id: #{@originating_account_id.inspect},"\
|
|
235
247
|
" receiving_account_id: #{@receiving_account_id.inspect}, payment_effective_date:"\
|
|
236
248
|
" #{@payment_effective_date.inspect}, payment_type: #{@payment_type.inspect},"\
|
|
237
|
-
" payment_method: #{@payment_method.inspect}
|
|
249
|
+
" payment_method: #{@payment_method.inspect}, additional_properties:"\
|
|
250
|
+
" #{@additional_properties}>"
|
|
238
251
|
end
|
|
239
252
|
end
|
|
240
253
|
end
|
|
@@ -28,7 +28,7 @@ module ModernTreasury
|
|
|
28
28
|
attr_accessor :counterparty_shipping_address
|
|
29
29
|
|
|
30
30
|
# Three-letter ISO currency code.
|
|
31
|
-
# @return [
|
|
31
|
+
# @return [Currency]
|
|
32
32
|
attr_accessor :currency
|
|
33
33
|
|
|
34
34
|
# A free-form description of the invoice.
|
|
@@ -59,7 +59,7 @@ module ModernTreasury
|
|
|
59
59
|
|
|
60
60
|
# One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
|
|
61
61
|
# `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.
|
|
62
|
-
# @return [
|
|
62
|
+
# @return [PaymentType6]
|
|
63
63
|
attr_accessor :payment_type
|
|
64
64
|
|
|
65
65
|
# The method by which the invoice can be paid. `ui` will show the embedded
|
|
@@ -69,7 +69,7 @@ module ModernTreasury
|
|
|
69
69
|
# direction will be debit. If the invoice amount is negative, the
|
|
70
70
|
# automatically initiated payment order's direction will be credit. One of
|
|
71
71
|
# `manual`, `ui`, or `automatic`.
|
|
72
|
-
# @return [
|
|
72
|
+
# @return [PaymentMethod1]
|
|
73
73
|
attr_accessor :payment_method
|
|
74
74
|
|
|
75
75
|
# Invoice status must be updated in a `PATCH` request that does not modify
|
|
@@ -128,13 +128,17 @@ module ModernTreasury
|
|
|
128
128
|
]
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
-
def initialize(contact_details
|
|
132
|
-
counterparty_billing_address
|
|
133
|
-
counterparty_shipping_address
|
|
134
|
-
description
|
|
135
|
-
originating_account_id
|
|
136
|
-
payment_effective_date
|
|
137
|
-
payment_method
|
|
131
|
+
def initialize(contact_details: SKIP, counterparty_id: SKIP,
|
|
132
|
+
counterparty_billing_address: SKIP,
|
|
133
|
+
counterparty_shipping_address: SKIP, currency: SKIP,
|
|
134
|
+
description: SKIP, due_date: SKIP, invoicer_address: SKIP,
|
|
135
|
+
originating_account_id: SKIP, receiving_account_id: SKIP,
|
|
136
|
+
payment_effective_date: SKIP, payment_type: SKIP,
|
|
137
|
+
payment_method: SKIP, status: SKIP,
|
|
138
|
+
additional_properties: nil)
|
|
139
|
+
# Add additional model properties to the instance
|
|
140
|
+
additional_properties = {} if additional_properties.nil?
|
|
141
|
+
|
|
138
142
|
@contact_details = contact_details unless contact_details == SKIP
|
|
139
143
|
@counterparty_id = counterparty_id unless counterparty_id == SKIP
|
|
140
144
|
unless counterparty_billing_address == SKIP
|
|
@@ -155,6 +159,7 @@ module ModernTreasury
|
|
|
155
159
|
@payment_type = payment_type unless payment_type == SKIP
|
|
156
160
|
@payment_method = payment_method unless payment_method == SKIP
|
|
157
161
|
@status = status unless status == SKIP
|
|
162
|
+
@additional_properties = additional_properties
|
|
158
163
|
end
|
|
159
164
|
|
|
160
165
|
# Creates an instance of the object from a hash.
|
|
@@ -200,21 +205,29 @@ module ModernTreasury
|
|
|
200
205
|
hash.key?('payment_method') ? hash['payment_method'] : SKIP
|
|
201
206
|
status = hash.key?('status') ? hash['status'] : SKIP
|
|
202
207
|
|
|
208
|
+
# Create a new hash for additional properties, removing known properties.
|
|
209
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
210
|
+
|
|
211
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
212
|
+
new_hash, proc { |value| value }
|
|
213
|
+
)
|
|
214
|
+
|
|
203
215
|
# Create object from extracted values.
|
|
204
|
-
InvoiceUpdateRequest.new(contact_details,
|
|
205
|
-
counterparty_id,
|
|
206
|
-
counterparty_billing_address,
|
|
207
|
-
counterparty_shipping_address,
|
|
208
|
-
currency,
|
|
209
|
-
description,
|
|
210
|
-
due_date,
|
|
211
|
-
invoicer_address,
|
|
212
|
-
originating_account_id,
|
|
213
|
-
receiving_account_id,
|
|
214
|
-
payment_effective_date,
|
|
215
|
-
payment_type,
|
|
216
|
-
payment_method,
|
|
217
|
-
status
|
|
216
|
+
InvoiceUpdateRequest.new(contact_details: contact_details,
|
|
217
|
+
counterparty_id: counterparty_id,
|
|
218
|
+
counterparty_billing_address: counterparty_billing_address,
|
|
219
|
+
counterparty_shipping_address: counterparty_shipping_address,
|
|
220
|
+
currency: currency,
|
|
221
|
+
description: description,
|
|
222
|
+
due_date: due_date,
|
|
223
|
+
invoicer_address: invoicer_address,
|
|
224
|
+
originating_account_id: originating_account_id,
|
|
225
|
+
receiving_account_id: receiving_account_id,
|
|
226
|
+
payment_effective_date: payment_effective_date,
|
|
227
|
+
payment_type: payment_type,
|
|
228
|
+
payment_method: payment_method,
|
|
229
|
+
status: status,
|
|
230
|
+
additional_properties: additional_properties)
|
|
218
231
|
end
|
|
219
232
|
|
|
220
233
|
def to_custom_due_date
|
|
@@ -231,7 +244,7 @@ module ModernTreasury
|
|
|
231
244
|
" #{@invoicer_address}, originating_account_id: #{@originating_account_id},"\
|
|
232
245
|
" receiving_account_id: #{@receiving_account_id}, payment_effective_date:"\
|
|
233
246
|
" #{@payment_effective_date}, payment_type: #{@payment_type}, payment_method:"\
|
|
234
|
-
" #{@payment_method}, status: #{@status}>"
|
|
247
|
+
" #{@payment_method}, status: #{@status}, additional_properties: #{@additional_properties}>"
|
|
235
248
|
end
|
|
236
249
|
|
|
237
250
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -245,7 +258,8 @@ module ModernTreasury
|
|
|
245
258
|
" #{@invoicer_address.inspect}, originating_account_id: #{@originating_account_id.inspect},"\
|
|
246
259
|
" receiving_account_id: #{@receiving_account_id.inspect}, payment_effective_date:"\
|
|
247
260
|
" #{@payment_effective_date.inspect}, payment_type: #{@payment_type.inspect},"\
|
|
248
|
-
" payment_method: #{@payment_method.inspect}, status: #{@status.inspect}
|
|
261
|
+
" payment_method: #{@payment_method.inspect}, status: #{@status.inspect},"\
|
|
262
|
+
" additional_properties: #{@additional_properties}>"
|
|
249
263
|
end
|
|
250
264
|
end
|
|
251
265
|
end
|
|
@@ -57,14 +57,18 @@ module ModernTreasury
|
|
|
57
57
|
[]
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
def initialize(line1
|
|
61
|
-
|
|
60
|
+
def initialize(line1:, locality:, region:, postal_code:, country:,
|
|
61
|
+
line2: SKIP, additional_properties: nil)
|
|
62
|
+
# Add additional model properties to the instance
|
|
63
|
+
additional_properties = {} if additional_properties.nil?
|
|
64
|
+
|
|
62
65
|
@line1 = line1
|
|
63
66
|
@line2 = line2 unless line2 == SKIP
|
|
64
67
|
@locality = locality
|
|
65
68
|
@region = region
|
|
66
69
|
@postal_code = postal_code
|
|
67
70
|
@country = country
|
|
71
|
+
@additional_properties = additional_properties
|
|
68
72
|
end
|
|
69
73
|
|
|
70
74
|
# Creates an instance of the object from a hash.
|
|
@@ -79,20 +83,29 @@ module ModernTreasury
|
|
|
79
83
|
country = hash.key?('country') ? hash['country'] : nil
|
|
80
84
|
line2 = hash.key?('line2') ? hash['line2'] : SKIP
|
|
81
85
|
|
|
86
|
+
# Create a new hash for additional properties, removing known properties.
|
|
87
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
88
|
+
|
|
89
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
90
|
+
new_hash, proc { |value| value }
|
|
91
|
+
)
|
|
92
|
+
|
|
82
93
|
# Create object from extracted values.
|
|
83
|
-
InvoicerAddress.new(line1,
|
|
84
|
-
locality,
|
|
85
|
-
region,
|
|
86
|
-
postal_code,
|
|
87
|
-
country,
|
|
88
|
-
line2
|
|
94
|
+
InvoicerAddress.new(line1: line1,
|
|
95
|
+
locality: locality,
|
|
96
|
+
region: region,
|
|
97
|
+
postal_code: postal_code,
|
|
98
|
+
country: country,
|
|
99
|
+
line2: line2,
|
|
100
|
+
additional_properties: additional_properties)
|
|
89
101
|
end
|
|
90
102
|
|
|
91
103
|
# Provides a human-readable string representation of the object.
|
|
92
104
|
def to_s
|
|
93
105
|
class_name = self.class.name.split('::').last
|
|
94
106
|
"<#{class_name} line1: #{@line1}, line2: #{@line2}, locality: #{@locality}, region:"\
|
|
95
|
-
" #{@region}, postal_code: #{@postal_code}, country: #{@country}
|
|
107
|
+
" #{@region}, postal_code: #{@postal_code}, country: #{@country}, additional_properties:"\
|
|
108
|
+
" #{@additional_properties}>"
|
|
96
109
|
end
|
|
97
110
|
|
|
98
111
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -100,7 +113,7 @@ module ModernTreasury
|
|
|
100
113
|
class_name = self.class.name.split('::').last
|
|
101
114
|
"<#{class_name} line1: #{@line1.inspect}, line2: #{@line2.inspect}, locality:"\
|
|
102
115
|
" #{@locality.inspect}, region: #{@region.inspect}, postal_code: #{@postal_code.inspect},"\
|
|
103
|
-
" country: #{@country.inspect}>"
|
|
116
|
+
" country: #{@country.inspect}, additional_properties: #{@additional_properties}>"
|
|
104
117
|
end
|
|
105
118
|
end
|
|
106
119
|
end
|