mt-sdk 0.0.1
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 +7 -0
- data/LICENSE +28 -0
- data/README.md +188 -0
- data/bin/console +15 -0
- data/lib/modern_treasury/api_helper.rb +10 -0
- data/lib/modern_treasury/client.rb +275 -0
- data/lib/modern_treasury/configuration.rb +206 -0
- data/lib/modern_treasury/controllers/account_collection_flow_controller.rb +130 -0
- data/lib/modern_treasury/controllers/account_detail_controller.rb +131 -0
- data/lib/modern_treasury/controllers/balance_report_controller.rb +76 -0
- data/lib/modern_treasury/controllers/base_controller.rb +60 -0
- data/lib/modern_treasury/controllers/connection_controller.rb +40 -0
- data/lib/modern_treasury/controllers/counterparty_controller.rb +188 -0
- data/lib/modern_treasury/controllers/document_controller.rb +285 -0
- data/lib/modern_treasury/controllers/event_controller.rb +72 -0
- data/lib/modern_treasury/controllers/expected_payment_controller.rb +162 -0
- data/lib/modern_treasury/controllers/external_account_controller.rb +202 -0
- data/lib/modern_treasury/controllers/incoming_payment_detail_controller.rb +150 -0
- data/lib/modern_treasury/controllers/internal_account_controller.rb +134 -0
- data/lib/modern_treasury/controllers/invoice_controller.rb +98 -0
- data/lib/modern_treasury/controllers/invoice_line_item_controller.rb +136 -0
- data/lib/modern_treasury/controllers/ledger_account_category_controller.rb +292 -0
- data/lib/modern_treasury/controllers/ledger_account_controller.rb +202 -0
- data/lib/modern_treasury/controllers/ledger_account_payout_controller.rb +126 -0
- data/lib/modern_treasury/controllers/ledger_account_statement_controller.rb +60 -0
- data/lib/modern_treasury/controllers/ledger_controller.rb +152 -0
- data/lib/modern_treasury/controllers/ledger_entry_controller.rb +148 -0
- data/lib/modern_treasury/controllers/ledger_event_handler_controller.rb +119 -0
- data/lib/modern_treasury/controllers/ledger_transaction_controller.rb +328 -0
- data/lib/modern_treasury/controllers/ledgerable_event_controller.rb +61 -0
- data/lib/modern_treasury/controllers/line_item_controller.rb +107 -0
- data/lib/modern_treasury/controllers/paper_item_controller.rb +69 -0
- data/lib/modern_treasury/controllers/payment_flow_controller.rb +138 -0
- data/lib/modern_treasury/controllers/payment_order_controller.rb +368 -0
- data/lib/modern_treasury/controllers/payment_reference_controller.rb +64 -0
- data/lib/modern_treasury/controllers/ping_controller.rb +34 -0
- data/lib/modern_treasury/controllers/return_controller.rb +105 -0
- data/lib/modern_treasury/controllers/reversal_controller.rb +99 -0
- data/lib/modern_treasury/controllers/routing_detail_controller.rb +131 -0
- data/lib/modern_treasury/controllers/transaction_controller.rb +133 -0
- data/lib/modern_treasury/controllers/transaction_line_item_controller.rb +39 -0
- data/lib/modern_treasury/controllers/validation_controller.rb +41 -0
- data/lib/modern_treasury/controllers/virtual_account_controller.rb +142 -0
- data/lib/modern_treasury/exceptions/api_exception.rb +21 -0
- data/lib/modern_treasury/exceptions/error_message_exception.rb +46 -0
- data/lib/modern_treasury/http/auth/basic_auth.rb +62 -0
- data/lib/modern_treasury/http/http_call_back.rb +10 -0
- data/lib/modern_treasury/http/http_method_enum.rb +10 -0
- data/lib/modern_treasury/http/http_request.rb +10 -0
- data/lib/modern_treasury/http/http_response.rb +10 -0
- data/lib/modern_treasury/http/proxy_settings.rb +22 -0
- data/lib/modern_treasury/models/account.rb +304 -0
- data/lib/modern_treasury/models/account1.rb +217 -0
- data/lib/modern_treasury/models/account_collection_flow.rb +178 -0
- data/lib/modern_treasury/models/account_collection_flow_create_request.rb +70 -0
- data/lib/modern_treasury/models/account_collection_flow_update_request.rb +61 -0
- data/lib/modern_treasury/models/account_detail.rb +211 -0
- data/lib/modern_treasury/models/account_detail1.rb +74 -0
- data/lib/modern_treasury/models/account_detail_create_request.rb +75 -0
- data/lib/modern_treasury/models/account_number_type2_enum.rb +48 -0
- data/lib/modern_treasury/models/account_number_type_enum.rb +49 -0
- data/lib/modern_treasury/models/account_type5_enum.rb +56 -0
- data/lib/modern_treasury/models/account_type_enum.rb +56 -0
- data/lib/modern_treasury/models/accounting.rb +88 -0
- data/lib/modern_treasury/models/accounting1.rb +63 -0
- data/lib/modern_treasury/models/accounts_type1_enum.rb +26 -0
- data/lib/modern_treasury/models/accounts_type_enum.rb +36 -0
- data/lib/modern_treasury/models/address.rb +231 -0
- data/lib/modern_treasury/models/address_request.rb +118 -0
- data/lib/modern_treasury/models/async_response.rb +68 -0
- data/lib/modern_treasury/models/balance.rb +164 -0
- data/lib/modern_treasury/models/balance_report.rb +178 -0
- data/lib/modern_treasury/models/balance_report_type1_enum.rb +44 -0
- data/lib/modern_treasury/models/balance_report_type_enum.rb +45 -0
- data/lib/modern_treasury/models/balance_type_enum.rb +63 -0
- data/lib/modern_treasury/models/balances.rb +71 -0
- data/lib/modern_treasury/models/balances1.rb +81 -0
- data/lib/modern_treasury/models/balances2.rb +120 -0
- data/lib/modern_treasury/models/balances3.rb +130 -0
- data/lib/modern_treasury/models/base_model.rb +110 -0
- data/lib/modern_treasury/models/charge_bearer_enum.rb +42 -0
- data/lib/modern_treasury/models/code1_enum.rb +200 -0
- data/lib/modern_treasury/models/code_enum.rb +68 -0
- data/lib/modern_treasury/models/connection.rb +209 -0
- data/lib/modern_treasury/models/contact_detail.rb +200 -0
- data/lib/modern_treasury/models/contact_detail_create_request.rb +75 -0
- data/lib/modern_treasury/models/contact_identifier_type_enum.rb +40 -0
- data/lib/modern_treasury/models/content_type_enum.rb +36 -0
- data/lib/modern_treasury/models/counterparty.rb +200 -0
- data/lib/modern_treasury/models/counterparty_billing_address.rb +106 -0
- data/lib/modern_treasury/models/counterparty_collect_account_request.rb +104 -0
- data/lib/modern_treasury/models/counterparty_collect_account_response.rb +82 -0
- data/lib/modern_treasury/models/counterparty_create_request.rb +161 -0
- data/lib/modern_treasury/models/counterparty_shipping_address.rb +107 -0
- data/lib/modern_treasury/models/counterparty_update_request.rb +107 -0
- data/lib/modern_treasury/models/created_at_enum.rb +36 -0
- data/lib/modern_treasury/models/currency1_enum.rb +37 -0
- data/lib/modern_treasury/models/currency_enum.rb +784 -0
- data/lib/modern_treasury/models/direction10_enum.rb +38 -0
- data/lib/modern_treasury/models/direction14_enum.rb +36 -0
- data/lib/modern_treasury/models/direction15_enum.rb +36 -0
- data/lib/modern_treasury/models/direction1_enum.rb +37 -0
- data/lib/modern_treasury/models/direction4_enum.rb +36 -0
- data/lib/modern_treasury/models/direction5_enum.rb +39 -0
- data/lib/modern_treasury/models/direction9_enum.rb +37 -0
- data/lib/modern_treasury/models/direction_enum.rb +38 -0
- data/lib/modern_treasury/models/document.rb +207 -0
- data/lib/modern_treasury/models/document_create_request.rb +92 -0
- data/lib/modern_treasury/models/document_detail.rb +154 -0
- data/lib/modern_treasury/models/documentable_type1_enum.rb +72 -0
- data/lib/modern_treasury/models/documentable_type2_enum.rb +72 -0
- data/lib/modern_treasury/models/documentable_type_enum.rb +75 -0
- data/lib/modern_treasury/models/effective_at_enum.rb +36 -0
- data/lib/modern_treasury/models/errors.rb +81 -0
- data/lib/modern_treasury/models/event.rb +162 -0
- data/lib/modern_treasury/models/expected_payment.rb +343 -0
- data/lib/modern_treasury/models/expected_payment_create_request.rb +254 -0
- data/lib/modern_treasury/models/expected_payment_update_request.rb +239 -0
- data/lib/modern_treasury/models/external_account.rb +283 -0
- data/lib/modern_treasury/models/external_account_complete_verification_request.rb +62 -0
- data/lib/modern_treasury/models/external_account_create_request.rb +230 -0
- data/lib/modern_treasury/models/external_account_update_request.rb +132 -0
- data/lib/modern_treasury/models/external_account_verify_request.rb +83 -0
- data/lib/modern_treasury/models/fallback_type_enum.rb +28 -0
- data/lib/modern_treasury/models/field_enum.rb +112 -0
- data/lib/modern_treasury/models/file.rb +81 -0
- data/lib/modern_treasury/models/foreign_exchange_indicator_enum.rb +38 -0
- data/lib/modern_treasury/models/incoming_payment_detail.rb +348 -0
- data/lib/modern_treasury/models/incoming_payment_detail_create_request.rb +141 -0
- data/lib/modern_treasury/models/incoming_payment_detail_update_request.rb +63 -0
- data/lib/modern_treasury/models/internal_account.rb +361 -0
- data/lib/modern_treasury/models/internal_account_create_request.rb +135 -0
- data/lib/modern_treasury/models/internal_account_update_request.rb +95 -0
- data/lib/modern_treasury/models/invoice.rb +342 -0
- data/lib/modern_treasury/models/invoice_create_request.rb +235 -0
- data/lib/modern_treasury/models/invoice_line_item.rb +171 -0
- data/lib/modern_treasury/models/invoice_line_item_create_request.rb +104 -0
- data/lib/modern_treasury/models/invoice_line_item_update_request.rb +240 -0
- data/lib/modern_treasury/models/invoice_update_request.rb +251 -0
- data/lib/modern_treasury/models/invoicer_address.rb +106 -0
- data/lib/modern_treasury/models/itemizable_type1_enum.rb +36 -0
- data/lib/modern_treasury/models/itemizable_type_enum.rb +36 -0
- data/lib/modern_treasury/models/ledger.rb +158 -0
- data/lib/modern_treasury/models/ledger_account.rb +220 -0
- data/lib/modern_treasury/models/ledger_account_category.rb +187 -0
- data/lib/modern_treasury/models/ledger_account_category_create_request.rb +125 -0
- data/lib/modern_treasury/models/ledger_account_category_update_request.rb +84 -0
- data/lib/modern_treasury/models/ledger_account_create_request.rb +150 -0
- data/lib/modern_treasury/models/ledger_account_normal_balance_enum.rb +36 -0
- data/lib/modern_treasury/models/ledger_account_payout.rb +238 -0
- data/lib/modern_treasury/models/ledger_account_payout_create_request.rb +152 -0
- data/lib/modern_treasury/models/ledger_account_payout_update_request.rb +85 -0
- data/lib/modern_treasury/models/ledger_account_statement.rb +233 -0
- data/lib/modern_treasury/models/ledger_account_statement_create_request.rb +122 -0
- data/lib/modern_treasury/models/ledger_account_update_request.rb +84 -0
- data/lib/modern_treasury/models/ledger_balance.rb +97 -0
- data/lib/modern_treasury/models/ledger_balances.rb +81 -0
- data/lib/modern_treasury/models/ledger_balances_with_effective_at.rb +123 -0
- data/lib/modern_treasury/models/ledger_create_request.rb +83 -0
- data/lib/modern_treasury/models/ledger_entry.rb +247 -0
- data/lib/modern_treasury/models/ledger_entry_create_request.rb +177 -0
- data/lib/modern_treasury/models/ledger_entry_of_transaction_version.rb +214 -0
- data/lib/modern_treasury/models/ledger_event_handler.rb +182 -0
- data/lib/modern_treasury/models/ledger_event_handler_conditions.rb +78 -0
- data/lib/modern_treasury/models/ledger_event_handler_create_request.rb +119 -0
- data/lib/modern_treasury/models/ledger_event_handler_ledger_entries.rb +80 -0
- data/lib/modern_treasury/models/ledger_event_handler_ledger_transaction_template.rb +103 -0
- data/lib/modern_treasury/models/ledger_transaction.rb +259 -0
- data/lib/modern_treasury/models/ledger_transaction_create_request.rb +164 -0
- data/lib/modern_treasury/models/ledger_transaction_reversal_create_request.rb +142 -0
- data/lib/modern_treasury/models/ledger_transaction_update_request.rb +115 -0
- data/lib/modern_treasury/models/ledger_transaction_version.rb +254 -0
- data/lib/modern_treasury/models/ledger_type_enum.rb +37 -0
- data/lib/modern_treasury/models/ledger_update_request.rb +84 -0
- data/lib/modern_treasury/models/ledgerable_event.rb +206 -0
- data/lib/modern_treasury/models/ledgerable_event_create_request.rb +140 -0
- data/lib/modern_treasury/models/ledgerable_type2_enum.rb +71 -0
- data/lib/modern_treasury/models/ledgerable_type5_enum.rb +69 -0
- data/lib/modern_treasury/models/ledgerable_type6_enum.rb +68 -0
- data/lib/modern_treasury/models/ledgerable_type_enum.rb +38 -0
- data/lib/modern_treasury/models/legacy_document_create_request.rb +70 -0
- data/lib/modern_treasury/models/line_item.rb +200 -0
- data/lib/modern_treasury/models/line_item_request.rb +98 -0
- data/lib/modern_treasury/models/line_item_update_request.rb +63 -0
- data/lib/modern_treasury/models/mreturn.rb +425 -0
- data/lib/modern_treasury/models/normal_balance2_enum.rb +36 -0
- data/lib/modern_treasury/models/normal_balance_enum.rb +36 -0
- data/lib/modern_treasury/models/order_by.rb +72 -0
- data/lib/modern_treasury/models/originating_account_number_type_enum.rb +48 -0
- data/lib/modern_treasury/models/originating_routing_number_type_enum.rb +68 -0
- data/lib/modern_treasury/models/paper_item.rb +249 -0
- data/lib/modern_treasury/models/party_address.rb +106 -0
- data/lib/modern_treasury/models/party_type5_enum.rb +36 -0
- data/lib/modern_treasury/models/party_type_enum.rb +36 -0
- data/lib/modern_treasury/models/payment_direction_enum.rb +36 -0
- data/lib/modern_treasury/models/payment_flow.rb +230 -0
- data/lib/modern_treasury/models/payment_flow_create_request.rb +103 -0
- data/lib/modern_treasury/models/payment_flow_update_request.rb +61 -0
- data/lib/modern_treasury/models/payment_method1_enum.rb +46 -0
- data/lib/modern_treasury/models/payment_method_enum.rb +42 -0
- data/lib/modern_treasury/models/payment_order.rb +820 -0
- data/lib/modern_treasury/models/payment_order_async_create_request.rb +536 -0
- data/lib/modern_treasury/models/payment_order_create_request.rb +556 -0
- data/lib/modern_treasury/models/payment_order_update_request.rb +543 -0
- data/lib/modern_treasury/models/payment_reference.rb +175 -0
- data/lib/modern_treasury/models/payment_reference_object.rb +156 -0
- data/lib/modern_treasury/models/payment_type13_enum.rb +96 -0
- data/lib/modern_treasury/models/payment_type1_enum.rb +97 -0
- data/lib/modern_treasury/models/payment_type2_enum.rb +96 -0
- data/lib/modern_treasury/models/payment_type4_enum.rb +96 -0
- data/lib/modern_treasury/models/payment_type5_enum.rb +36 -0
- data/lib/modern_treasury/models/payment_type6_enum.rb +97 -0
- data/lib/modern_treasury/models/payment_type_enum.rb +37 -0
- data/lib/modern_treasury/models/ping_response.rb +60 -0
- data/lib/modern_treasury/models/priority4_enum.rb +36 -0
- data/lib/modern_treasury/models/priority_enum.rb +38 -0
- data/lib/modern_treasury/models/reason1_enum.rb +50 -0
- data/lib/modern_treasury/models/reason_enum.rb +48 -0
- data/lib/modern_treasury/models/receiving_account.rb +304 -0
- data/lib/modern_treasury/models/receiving_account1.rb +219 -0
- data/lib/modern_treasury/models/receiving_account_type_enum.rb +36 -0
- data/lib/modern_treasury/models/reconciliation_method_enum.rb +38 -0
- data/lib/modern_treasury/models/reference_number_type1_enum.rb +248 -0
- data/lib/modern_treasury/models/reference_number_type_enum.rb +248 -0
- data/lib/modern_treasury/models/referenceable_type1_enum.rb +40 -0
- data/lib/modern_treasury/models/referenceable_type_enum.rb +41 -0
- data/lib/modern_treasury/models/return_create_request.rb +119 -0
- data/lib/modern_treasury/models/returnable_type1_enum.rb +48 -0
- data/lib/modern_treasury/models/returnable_type_enum.rb +48 -0
- data/lib/modern_treasury/models/reversal.rb +151 -0
- data/lib/modern_treasury/models/reversal_create_request.rb +86 -0
- data/lib/modern_treasury/models/role_enum.rb +36 -0
- data/lib/modern_treasury/models/routing_detail.rb +242 -0
- data/lib/modern_treasury/models/routing_detail1.rb +83 -0
- data/lib/modern_treasury/models/routing_detail_create_request.rb +87 -0
- data/lib/modern_treasury/models/routing_number_lookup_request.rb +124 -0
- data/lib/modern_treasury/models/routing_number_type1_enum.rb +68 -0
- data/lib/modern_treasury/models/routing_number_type7_enum.rb +55 -0
- data/lib/modern_treasury/models/routing_number_type8_enum.rb +68 -0
- data/lib/modern_treasury/models/routing_number_type_enum.rb +69 -0
- data/lib/modern_treasury/models/status11_enum.rb +40 -0
- data/lib/modern_treasury/models/status12_enum.rb +40 -0
- data/lib/modern_treasury/models/status15_enum.rb +41 -0
- data/lib/modern_treasury/models/status16_enum.rb +41 -0
- data/lib/modern_treasury/models/status17_enum.rb +45 -0
- data/lib/modern_treasury/models/status18_enum.rb +74 -0
- data/lib/modern_treasury/models/status19_enum.rb +52 -0
- data/lib/modern_treasury/models/status1_enum.rb +40 -0
- data/lib/modern_treasury/models/status20_enum.rb +40 -0
- data/lib/modern_treasury/models/status21_enum.rb +40 -0
- data/lib/modern_treasury/models/status22_enum.rb +40 -0
- data/lib/modern_treasury/models/status24_enum.rb +72 -0
- data/lib/modern_treasury/models/status2_enum.rb +41 -0
- data/lib/modern_treasury/models/status3_enum.rb +72 -0
- data/lib/modern_treasury/models/status4_enum.rb +52 -0
- data/lib/modern_treasury/models/status5_enum.rb +48 -0
- data/lib/modern_treasury/models/status6_enum.rb +49 -0
- data/lib/modern_treasury/models/status7_enum.rb +37 -0
- data/lib/modern_treasury/models/status8_enum.rb +37 -0
- data/lib/modern_treasury/models/status9_enum.rb +41 -0
- data/lib/modern_treasury/models/status_enum.rb +45 -0
- data/lib/modern_treasury/models/subtype_enum.rb +71 -0
- data/lib/modern_treasury/models/supported_payment_type_enum.rb +96 -0
- data/lib/modern_treasury/models/transactable_type_enum.rb +53 -0
- data/lib/modern_treasury/models/transaction.rb +311 -0
- data/lib/modern_treasury/models/transaction_line_item.rb +211 -0
- data/lib/modern_treasury/models/type10_enum.rb +64 -0
- data/lib/modern_treasury/models/type11_enum.rb +97 -0
- data/lib/modern_treasury/models/type12_enum.rb +37 -0
- data/lib/modern_treasury/models/type13_enum.rb +96 -0
- data/lib/modern_treasury/models/type14_enum.rb +64 -0
- data/lib/modern_treasury/models/type16_enum.rb +36 -0
- data/lib/modern_treasury/models/type1_enum.rb +97 -0
- data/lib/modern_treasury/models/type4_enum.rb +65 -0
- data/lib/modern_treasury/models/type5_enum.rb +97 -0
- data/lib/modern_treasury/models/type6_enum.rb +77 -0
- data/lib/modern_treasury/models/type_enum.rb +37 -0
- data/lib/modern_treasury/models/vendor_code_type1_enum.rb +111 -0
- data/lib/modern_treasury/models/vendor_code_type_enum.rb +108 -0
- data/lib/modern_treasury/models/verification_status1_enum.rb +44 -0
- data/lib/modern_treasury/models/verification_status_enum.rb +40 -0
- data/lib/modern_treasury/models/virtual_account.rb +247 -0
- data/lib/modern_treasury/models/virtual_account_create_request.rb +172 -0
- data/lib/modern_treasury/models/virtual_account_update_request.rb +85 -0
- data/lib/modern_treasury/utilities/date_time_helper.rb +11 -0
- data/lib/modern_treasury/utilities/file_wrapper.rb +28 -0
- data/lib/modern_treasury/utilities/union_type_lookup.rb +32 -0
- data/lib/modern_treasury.rb +316 -0
- data/test/controllers/controller_test_base.rb +23 -0
- data/test/controllers/test_account_collection_flow_controller.rb +64 -0
- data/test/controllers/test_connection_controller.rb +41 -0
- data/test/controllers/test_counterparty_controller.rb +65 -0
- data/test/controllers/test_document_controller.rb +41 -0
- data/test/controllers/test_event_controller.rb +46 -0
- data/test/controllers/test_expected_payment_controller.rb +71 -0
- data/test/controllers/test_external_account_controller.rb +63 -0
- data/test/controllers/test_incoming_payment_detail_controller.rb +68 -0
- data/test/controllers/test_internal_account_controller.rb +65 -0
- data/test/controllers/test_invoice_controller.rb +56 -0
- data/test/controllers/test_ledger_account_category_controller.rb +67 -0
- data/test/controllers/test_ledger_account_controller.rb +70 -0
- data/test/controllers/test_ledger_account_payout_controller.rb +62 -0
- data/test/controllers/test_ledger_account_statement_controller.rb +36 -0
- data/test/controllers/test_ledger_controller.rb +59 -0
- data/test/controllers/test_ledger_entry_controller.rb +65 -0
- data/test/controllers/test_ledger_event_handler_controller.rb +63 -0
- data/test/controllers/test_ledger_transaction_controller.rb +112 -0
- data/test/controllers/test_ledgerable_event_controller.rb +36 -0
- data/test/controllers/test_paper_item_controller.rb +43 -0
- data/test/controllers/test_payment_flow_controller.rb +67 -0
- data/test/controllers/test_payment_order_controller.rb +76 -0
- data/test/controllers/test_payment_reference_controller.rb +43 -0
- data/test/controllers/test_ping_controller.rb +31 -0
- data/test/controllers/test_return_controller.rb +64 -0
- data/test/controllers/test_transaction_controller.rb +56 -0
- data/test/controllers/test_virtual_account_controller.rb +63 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +429 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# Indicates the type of FX transfer to initiate, can be either
|
|
8
|
+
# `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
|
|
9
|
+
# currency matches the originating account currency.
|
|
10
|
+
class ForeignExchangeIndicatorEnum
|
|
11
|
+
FOREIGN_EXCHANGE_INDICATOR_ENUM = [
|
|
12
|
+
# TODO: Write general description for FIXED_TO_VARIABLE
|
|
13
|
+
FIXED_TO_VARIABLE = 'fixed_to_variable'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for VARIABLE_TO_FIXED
|
|
16
|
+
VARIABLE_TO_FIXED = 'variable_to_fixed'.freeze
|
|
17
|
+
].freeze
|
|
18
|
+
|
|
19
|
+
def self.validate(value)
|
|
20
|
+
return false if value.nil?
|
|
21
|
+
|
|
22
|
+
FOREIGN_EXCHANGE_INDICATOR_ENUM.include?(value)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.from_value(value, default_value = FIXED_TO_VARIABLE)
|
|
26
|
+
return default_value if value.nil?
|
|
27
|
+
|
|
28
|
+
str = value.to_s.strip
|
|
29
|
+
|
|
30
|
+
case str.downcase
|
|
31
|
+
when 'fixed_to_variable' then FIXED_TO_VARIABLE
|
|
32
|
+
when 'variable_to_fixed' then VARIABLE_TO_FIXED
|
|
33
|
+
else
|
|
34
|
+
default_value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module ModernTreasury
|
|
8
|
+
# IncomingPaymentDetail Model.
|
|
9
|
+
class IncomingPaymentDetail < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for this method
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for this method
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :object
|
|
20
|
+
|
|
21
|
+
# This field will be true if this object exists in the live environment or
|
|
22
|
+
# false if it exists in the test environment.
|
|
23
|
+
# @return [TrueClass | FalseClass]
|
|
24
|
+
attr_accessor :live_mode
|
|
25
|
+
|
|
26
|
+
# This field will be true if this object exists in the live environment or
|
|
27
|
+
# false if it exists in the test environment.
|
|
28
|
+
# @return [DateTime]
|
|
29
|
+
attr_accessor :created_at
|
|
30
|
+
|
|
31
|
+
# This field will be true if this object exists in the live environment or
|
|
32
|
+
# false if it exists in the test environment.
|
|
33
|
+
# @return [DateTime]
|
|
34
|
+
attr_accessor :updated_at
|
|
35
|
+
|
|
36
|
+
# The ID of the Internal Account for the incoming payment detail. This is
|
|
37
|
+
# always present.
|
|
38
|
+
# @return [UUID | String]
|
|
39
|
+
attr_accessor :internal_account_id
|
|
40
|
+
|
|
41
|
+
# If the incoming payment detail is in a virtual account, the ID of the
|
|
42
|
+
# Virtual Account.
|
|
43
|
+
# @return [UUID | String]
|
|
44
|
+
attr_accessor :virtual_account_id
|
|
45
|
+
|
|
46
|
+
# If the incoming payment detail is in a virtual account, the ID of the
|
|
47
|
+
# Virtual Account.
|
|
48
|
+
# @return [VirtualAccount]
|
|
49
|
+
attr_accessor :virtual_account
|
|
50
|
+
|
|
51
|
+
# The ID of the reconciled Transaction Line Item or `null`.
|
|
52
|
+
# @return [UUID | String]
|
|
53
|
+
attr_accessor :transaction_line_item_id
|
|
54
|
+
|
|
55
|
+
# The ID of the reconciled Transaction or `null`.
|
|
56
|
+
# @return [UUID | String]
|
|
57
|
+
attr_accessor :transaction_id
|
|
58
|
+
|
|
59
|
+
# The ID of the ledger transaction linked to the incoming payment detail or
|
|
60
|
+
# `null`.
|
|
61
|
+
# @return [UUID | String]
|
|
62
|
+
attr_accessor :ledger_transaction_id
|
|
63
|
+
|
|
64
|
+
# One of: `ach`, `book`, `check`, `eft`, `interac`, `rtp`, `sepa`, `signet`,
|
|
65
|
+
# or `wire`.
|
|
66
|
+
# @return [Type4Enum]
|
|
67
|
+
attr_accessor :type
|
|
68
|
+
|
|
69
|
+
# The raw data from the payment pre-notification file that we get from the
|
|
70
|
+
# bank.
|
|
71
|
+
# @return [Object]
|
|
72
|
+
attr_accessor :data
|
|
73
|
+
|
|
74
|
+
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
75
|
+
# as 1000.
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
attr_accessor :amount
|
|
78
|
+
|
|
79
|
+
# Three-letter ISO currency code.
|
|
80
|
+
# @return [CurrencyEnum]
|
|
81
|
+
attr_accessor :currency
|
|
82
|
+
|
|
83
|
+
# One of `credit` or `debit`.
|
|
84
|
+
# @return [Direction4Enum]
|
|
85
|
+
attr_accessor :direction
|
|
86
|
+
|
|
87
|
+
# The current status of the incoming payment order. One of `pending`,
|
|
88
|
+
# `completed`, or `returned`.
|
|
89
|
+
# @return [Status2Enum]
|
|
90
|
+
attr_accessor :status
|
|
91
|
+
|
|
92
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
93
|
+
# must be strings.
|
|
94
|
+
# @return [Hash[String, String]]
|
|
95
|
+
attr_accessor :metadata
|
|
96
|
+
|
|
97
|
+
# The date on which the corresponding transaction will occur.
|
|
98
|
+
# @return [Date]
|
|
99
|
+
attr_accessor :as_of_date
|
|
100
|
+
|
|
101
|
+
# The identifier of the vendor bank.
|
|
102
|
+
# @return [UUID | String]
|
|
103
|
+
attr_accessor :vendor_id
|
|
104
|
+
|
|
105
|
+
# The routing number of the originating account for the incoming payment
|
|
106
|
+
# detail.
|
|
107
|
+
# @return [String]
|
|
108
|
+
attr_accessor :originating_routing_number
|
|
109
|
+
|
|
110
|
+
# The type of the originating routing number for the incoming payment
|
|
111
|
+
# detail.
|
|
112
|
+
# @return [OriginatingRoutingNumberTypeEnum]
|
|
113
|
+
attr_accessor :originating_routing_number_type
|
|
114
|
+
|
|
115
|
+
# The account number of the originating account for the incoming payment
|
|
116
|
+
# detail.
|
|
117
|
+
# @return [String]
|
|
118
|
+
attr_accessor :originating_account_number
|
|
119
|
+
|
|
120
|
+
# The last 4 digits of the originating account_number for the incoming
|
|
121
|
+
# payment detail.
|
|
122
|
+
# @return [String]
|
|
123
|
+
attr_accessor :originating_account_number_safe
|
|
124
|
+
|
|
125
|
+
# The type of the originating account number for the incoming payment
|
|
126
|
+
# detail.
|
|
127
|
+
# @return [OriginatingAccountNumberTypeEnum]
|
|
128
|
+
attr_accessor :originating_account_number_type
|
|
129
|
+
|
|
130
|
+
# A mapping from model property names to API property names.
|
|
131
|
+
def self.names
|
|
132
|
+
@_hash = {} if @_hash.nil?
|
|
133
|
+
@_hash['id'] = 'id'
|
|
134
|
+
@_hash['object'] = 'object'
|
|
135
|
+
@_hash['live_mode'] = 'live_mode'
|
|
136
|
+
@_hash['created_at'] = 'created_at'
|
|
137
|
+
@_hash['updated_at'] = 'updated_at'
|
|
138
|
+
@_hash['internal_account_id'] = 'internal_account_id'
|
|
139
|
+
@_hash['virtual_account_id'] = 'virtual_account_id'
|
|
140
|
+
@_hash['virtual_account'] = 'virtual_account'
|
|
141
|
+
@_hash['transaction_line_item_id'] = 'transaction_line_item_id'
|
|
142
|
+
@_hash['transaction_id'] = 'transaction_id'
|
|
143
|
+
@_hash['ledger_transaction_id'] = 'ledger_transaction_id'
|
|
144
|
+
@_hash['type'] = 'type'
|
|
145
|
+
@_hash['data'] = 'data'
|
|
146
|
+
@_hash['amount'] = 'amount'
|
|
147
|
+
@_hash['currency'] = 'currency'
|
|
148
|
+
@_hash['direction'] = 'direction'
|
|
149
|
+
@_hash['status'] = 'status'
|
|
150
|
+
@_hash['metadata'] = 'metadata'
|
|
151
|
+
@_hash['as_of_date'] = 'as_of_date'
|
|
152
|
+
@_hash['vendor_id'] = 'vendor_id'
|
|
153
|
+
@_hash['originating_routing_number'] = 'originating_routing_number'
|
|
154
|
+
@_hash['originating_routing_number_type'] =
|
|
155
|
+
'originating_routing_number_type'
|
|
156
|
+
@_hash['originating_account_number'] = 'originating_account_number'
|
|
157
|
+
@_hash['originating_account_number_safe'] =
|
|
158
|
+
'originating_account_number_safe'
|
|
159
|
+
@_hash['originating_account_number_type'] =
|
|
160
|
+
'originating_account_number_type'
|
|
161
|
+
@_hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# An array for optional fields
|
|
165
|
+
def self.optionals
|
|
166
|
+
%w[
|
|
167
|
+
originating_account_number
|
|
168
|
+
]
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# An array for nullable fields
|
|
172
|
+
def self.nullables
|
|
173
|
+
%w[
|
|
174
|
+
virtual_account_id
|
|
175
|
+
transaction_line_item_id
|
|
176
|
+
transaction_id
|
|
177
|
+
ledger_transaction_id
|
|
178
|
+
vendor_id
|
|
179
|
+
originating_routing_number
|
|
180
|
+
originating_routing_number_type
|
|
181
|
+
originating_account_number
|
|
182
|
+
originating_account_number_safe
|
|
183
|
+
originating_account_number_type
|
|
184
|
+
]
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
def initialize(id = nil, object = nil, live_mode = nil, created_at = nil,
|
|
188
|
+
updated_at = nil, internal_account_id = nil,
|
|
189
|
+
virtual_account_id = nil, virtual_account = nil,
|
|
190
|
+
transaction_line_item_id = nil, transaction_id = nil,
|
|
191
|
+
ledger_transaction_id = nil, type = nil, data = nil,
|
|
192
|
+
amount = nil, currency = nil, direction = nil, status = nil,
|
|
193
|
+
metadata = nil, as_of_date = nil, vendor_id = nil,
|
|
194
|
+
originating_routing_number = nil,
|
|
195
|
+
originating_routing_number_type = nil,
|
|
196
|
+
originating_account_number_safe = nil,
|
|
197
|
+
originating_account_number_type = nil,
|
|
198
|
+
originating_account_number = SKIP)
|
|
199
|
+
@id = id
|
|
200
|
+
@object = object
|
|
201
|
+
@live_mode = live_mode
|
|
202
|
+
@created_at = created_at
|
|
203
|
+
@updated_at = updated_at
|
|
204
|
+
@internal_account_id = internal_account_id
|
|
205
|
+
@virtual_account_id = virtual_account_id
|
|
206
|
+
@virtual_account = virtual_account
|
|
207
|
+
@transaction_line_item_id = transaction_line_item_id
|
|
208
|
+
@transaction_id = transaction_id
|
|
209
|
+
@ledger_transaction_id = ledger_transaction_id
|
|
210
|
+
@type = type
|
|
211
|
+
@data = data
|
|
212
|
+
@amount = amount
|
|
213
|
+
@currency = currency
|
|
214
|
+
@direction = direction
|
|
215
|
+
@status = status
|
|
216
|
+
@metadata = metadata
|
|
217
|
+
@as_of_date = as_of_date
|
|
218
|
+
@vendor_id = vendor_id
|
|
219
|
+
@originating_routing_number = originating_routing_number
|
|
220
|
+
@originating_routing_number_type = originating_routing_number_type
|
|
221
|
+
unless originating_account_number == SKIP
|
|
222
|
+
@originating_account_number =
|
|
223
|
+
originating_account_number
|
|
224
|
+
end
|
|
225
|
+
@originating_account_number_safe = originating_account_number_safe
|
|
226
|
+
@originating_account_number_type = originating_account_number_type
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Creates an instance of the object from a hash.
|
|
230
|
+
def self.from_hash(hash)
|
|
231
|
+
return nil unless hash
|
|
232
|
+
|
|
233
|
+
# Extract variables from the hash.
|
|
234
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
235
|
+
object = hash.key?('object') ? hash['object'] : nil
|
|
236
|
+
live_mode = hash.key?('live_mode') ? hash['live_mode'] : nil
|
|
237
|
+
created_at = if hash.key?('created_at')
|
|
238
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
|
239
|
+
end
|
|
240
|
+
updated_at = if hash.key?('updated_at')
|
|
241
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
|
242
|
+
end
|
|
243
|
+
internal_account_id =
|
|
244
|
+
hash.key?('internal_account_id') ? hash['internal_account_id'] : nil
|
|
245
|
+
virtual_account_id =
|
|
246
|
+
hash.key?('virtual_account_id') ? hash['virtual_account_id'] : nil
|
|
247
|
+
virtual_account = VirtualAccount.from_hash(hash['virtual_account']) if
|
|
248
|
+
hash['virtual_account']
|
|
249
|
+
transaction_line_item_id =
|
|
250
|
+
hash.key?('transaction_line_item_id') ? hash['transaction_line_item_id'] : nil
|
|
251
|
+
transaction_id =
|
|
252
|
+
hash.key?('transaction_id') ? hash['transaction_id'] : nil
|
|
253
|
+
ledger_transaction_id =
|
|
254
|
+
hash.key?('ledger_transaction_id') ? hash['ledger_transaction_id'] : nil
|
|
255
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
256
|
+
data = hash.key?('data') ? hash['data'] : nil
|
|
257
|
+
amount = hash.key?('amount') ? hash['amount'] : nil
|
|
258
|
+
currency = hash.key?('currency') ? hash['currency'] : nil
|
|
259
|
+
direction = hash.key?('direction') ? hash['direction'] : nil
|
|
260
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
261
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : nil
|
|
262
|
+
as_of_date = hash.key?('as_of_date') ? hash['as_of_date'] : nil
|
|
263
|
+
vendor_id = hash.key?('vendor_id') ? hash['vendor_id'] : nil
|
|
264
|
+
originating_routing_number =
|
|
265
|
+
hash.key?('originating_routing_number') ? hash['originating_routing_number'] : nil
|
|
266
|
+
originating_routing_number_type =
|
|
267
|
+
hash.key?('originating_routing_number_type') ? hash['originating_routing_number_type'] : nil
|
|
268
|
+
originating_account_number_safe =
|
|
269
|
+
hash.key?('originating_account_number_safe') ? hash['originating_account_number_safe'] : nil
|
|
270
|
+
originating_account_number_type =
|
|
271
|
+
hash.key?('originating_account_number_type') ? hash['originating_account_number_type'] : nil
|
|
272
|
+
originating_account_number =
|
|
273
|
+
hash.key?('originating_account_number') ? hash['originating_account_number'] : SKIP
|
|
274
|
+
|
|
275
|
+
# Create object from extracted values.
|
|
276
|
+
IncomingPaymentDetail.new(id,
|
|
277
|
+
object,
|
|
278
|
+
live_mode,
|
|
279
|
+
created_at,
|
|
280
|
+
updated_at,
|
|
281
|
+
internal_account_id,
|
|
282
|
+
virtual_account_id,
|
|
283
|
+
virtual_account,
|
|
284
|
+
transaction_line_item_id,
|
|
285
|
+
transaction_id,
|
|
286
|
+
ledger_transaction_id,
|
|
287
|
+
type,
|
|
288
|
+
data,
|
|
289
|
+
amount,
|
|
290
|
+
currency,
|
|
291
|
+
direction,
|
|
292
|
+
status,
|
|
293
|
+
metadata,
|
|
294
|
+
as_of_date,
|
|
295
|
+
vendor_id,
|
|
296
|
+
originating_routing_number,
|
|
297
|
+
originating_routing_number_type,
|
|
298
|
+
originating_account_number_safe,
|
|
299
|
+
originating_account_number_type,
|
|
300
|
+
originating_account_number)
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
def to_custom_created_at
|
|
304
|
+
DateTimeHelper.to_rfc3339(created_at)
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
def to_custom_updated_at
|
|
308
|
+
DateTimeHelper.to_rfc3339(updated_at)
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Provides a human-readable string representation of the object.
|
|
312
|
+
def to_s
|
|
313
|
+
class_name = self.class.name.split('::').last
|
|
314
|
+
"<#{class_name} id: #{@id}, object: #{@object}, live_mode: #{@live_mode}, created_at:"\
|
|
315
|
+
" #{@created_at}, updated_at: #{@updated_at}, internal_account_id: #{@internal_account_id},"\
|
|
316
|
+
" virtual_account_id: #{@virtual_account_id}, virtual_account: #{@virtual_account},"\
|
|
317
|
+
" transaction_line_item_id: #{@transaction_line_item_id}, transaction_id:"\
|
|
318
|
+
" #{@transaction_id}, ledger_transaction_id: #{@ledger_transaction_id}, type: #{@type},"\
|
|
319
|
+
" data: #{@data}, amount: #{@amount}, currency: #{@currency}, direction: #{@direction},"\
|
|
320
|
+
" status: #{@status}, metadata: #{@metadata}, as_of_date: #{@as_of_date}, vendor_id:"\
|
|
321
|
+
" #{@vendor_id}, originating_routing_number: #{@originating_routing_number},"\
|
|
322
|
+
" originating_routing_number_type: #{@originating_routing_number_type},"\
|
|
323
|
+
" originating_account_number: #{@originating_account_number},"\
|
|
324
|
+
" originating_account_number_safe: #{@originating_account_number_safe},"\
|
|
325
|
+
" originating_account_number_type: #{@originating_account_number_type}>"
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
329
|
+
def inspect
|
|
330
|
+
class_name = self.class.name.split('::').last
|
|
331
|
+
"<#{class_name} id: #{@id.inspect}, object: #{@object.inspect}, live_mode:"\
|
|
332
|
+
" #{@live_mode.inspect}, created_at: #{@created_at.inspect}, updated_at:"\
|
|
333
|
+
" #{@updated_at.inspect}, internal_account_id: #{@internal_account_id.inspect},"\
|
|
334
|
+
" virtual_account_id: #{@virtual_account_id.inspect}, virtual_account:"\
|
|
335
|
+
" #{@virtual_account.inspect}, transaction_line_item_id:"\
|
|
336
|
+
" #{@transaction_line_item_id.inspect}, transaction_id: #{@transaction_id.inspect},"\
|
|
337
|
+
" ledger_transaction_id: #{@ledger_transaction_id.inspect}, type: #{@type.inspect}, data:"\
|
|
338
|
+
" #{@data.inspect}, amount: #{@amount.inspect}, currency: #{@currency.inspect}, direction:"\
|
|
339
|
+
" #{@direction.inspect}, status: #{@status.inspect}, metadata: #{@metadata.inspect},"\
|
|
340
|
+
" as_of_date: #{@as_of_date.inspect}, vendor_id: #{@vendor_id.inspect},"\
|
|
341
|
+
" originating_routing_number: #{@originating_routing_number.inspect},"\
|
|
342
|
+
" originating_routing_number_type: #{@originating_routing_number_type.inspect},"\
|
|
343
|
+
" originating_account_number: #{@originating_account_number.inspect},"\
|
|
344
|
+
" originating_account_number_safe: #{@originating_account_number_safe.inspect},"\
|
|
345
|
+
" originating_account_number_type: #{@originating_account_number_type.inspect}>"
|
|
346
|
+
end
|
|
347
|
+
end
|
|
348
|
+
end
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# IncomingPaymentDetailCreateRequest Model.
|
|
8
|
+
class IncomingPaymentDetailCreateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# One of `ach`, `wire`, `check`.
|
|
13
|
+
# @return [Type10Enum]
|
|
14
|
+
attr_accessor :type
|
|
15
|
+
|
|
16
|
+
# One of `credit`, `debit`.
|
|
17
|
+
# @return [Direction14Enum]
|
|
18
|
+
attr_accessor :direction
|
|
19
|
+
|
|
20
|
+
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
21
|
+
# as 1000.
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
attr_accessor :amount
|
|
24
|
+
|
|
25
|
+
# Three-letter ISO currency code.
|
|
26
|
+
# @return [CurrencyEnum]
|
|
27
|
+
attr_accessor :currency
|
|
28
|
+
|
|
29
|
+
# The ID of one of your internal accounts.
|
|
30
|
+
# @return [UUID | String]
|
|
31
|
+
attr_accessor :internal_account_id
|
|
32
|
+
|
|
33
|
+
# An optional parameter to associate the incoming payment detail to a
|
|
34
|
+
# virtual account.
|
|
35
|
+
# @return [UUID | String]
|
|
36
|
+
attr_accessor :virtual_account_id
|
|
37
|
+
|
|
38
|
+
# Defaults to today.
|
|
39
|
+
# @return [Date]
|
|
40
|
+
attr_accessor :as_of_date
|
|
41
|
+
|
|
42
|
+
# Defaults to a random description.
|
|
43
|
+
# @return [String]
|
|
44
|
+
attr_accessor :description
|
|
45
|
+
|
|
46
|
+
# A mapping from model property names to API property names.
|
|
47
|
+
def self.names
|
|
48
|
+
@_hash = {} if @_hash.nil?
|
|
49
|
+
@_hash['type'] = 'type'
|
|
50
|
+
@_hash['direction'] = 'direction'
|
|
51
|
+
@_hash['amount'] = 'amount'
|
|
52
|
+
@_hash['currency'] = 'currency'
|
|
53
|
+
@_hash['internal_account_id'] = 'internal_account_id'
|
|
54
|
+
@_hash['virtual_account_id'] = 'virtual_account_id'
|
|
55
|
+
@_hash['as_of_date'] = 'as_of_date'
|
|
56
|
+
@_hash['description'] = 'description'
|
|
57
|
+
@_hash
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# An array for optional fields
|
|
61
|
+
def self.optionals
|
|
62
|
+
%w[
|
|
63
|
+
type
|
|
64
|
+
direction
|
|
65
|
+
amount
|
|
66
|
+
currency
|
|
67
|
+
internal_account_id
|
|
68
|
+
virtual_account_id
|
|
69
|
+
as_of_date
|
|
70
|
+
description
|
|
71
|
+
]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# An array for nullable fields
|
|
75
|
+
def self.nullables
|
|
76
|
+
%w[
|
|
77
|
+
virtual_account_id
|
|
78
|
+
as_of_date
|
|
79
|
+
description
|
|
80
|
+
]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def initialize(type = SKIP, direction = SKIP, amount = SKIP,
|
|
84
|
+
currency = SKIP, internal_account_id = SKIP,
|
|
85
|
+
virtual_account_id = SKIP, as_of_date = SKIP,
|
|
86
|
+
description = SKIP)
|
|
87
|
+
@type = type unless type == SKIP
|
|
88
|
+
@direction = direction unless direction == SKIP
|
|
89
|
+
@amount = amount unless amount == SKIP
|
|
90
|
+
@currency = currency unless currency == SKIP
|
|
91
|
+
@internal_account_id = internal_account_id unless internal_account_id == SKIP
|
|
92
|
+
@virtual_account_id = virtual_account_id unless virtual_account_id == SKIP
|
|
93
|
+
@as_of_date = as_of_date unless as_of_date == SKIP
|
|
94
|
+
@description = description unless description == SKIP
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Creates an instance of the object from a hash.
|
|
98
|
+
def self.from_hash(hash)
|
|
99
|
+
return nil unless hash
|
|
100
|
+
|
|
101
|
+
# Extract variables from the hash.
|
|
102
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
103
|
+
direction = hash.key?('direction') ? hash['direction'] : SKIP
|
|
104
|
+
amount = hash.key?('amount') ? hash['amount'] : SKIP
|
|
105
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
106
|
+
internal_account_id =
|
|
107
|
+
hash.key?('internal_account_id') ? hash['internal_account_id'] : SKIP
|
|
108
|
+
virtual_account_id =
|
|
109
|
+
hash.key?('virtual_account_id') ? hash['virtual_account_id'] : SKIP
|
|
110
|
+
as_of_date = hash.key?('as_of_date') ? hash['as_of_date'] : SKIP
|
|
111
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
112
|
+
|
|
113
|
+
# Create object from extracted values.
|
|
114
|
+
IncomingPaymentDetailCreateRequest.new(type,
|
|
115
|
+
direction,
|
|
116
|
+
amount,
|
|
117
|
+
currency,
|
|
118
|
+
internal_account_id,
|
|
119
|
+
virtual_account_id,
|
|
120
|
+
as_of_date,
|
|
121
|
+
description)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Provides a human-readable string representation of the object.
|
|
125
|
+
def to_s
|
|
126
|
+
class_name = self.class.name.split('::').last
|
|
127
|
+
"<#{class_name} type: #{@type}, direction: #{@direction}, amount: #{@amount}, currency:"\
|
|
128
|
+
" #{@currency}, internal_account_id: #{@internal_account_id}, virtual_account_id:"\
|
|
129
|
+
" #{@virtual_account_id}, as_of_date: #{@as_of_date}, description: #{@description}>"
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
133
|
+
def inspect
|
|
134
|
+
class_name = self.class.name.split('::').last
|
|
135
|
+
"<#{class_name} type: #{@type.inspect}, direction: #{@direction.inspect}, amount:"\
|
|
136
|
+
" #{@amount.inspect}, currency: #{@currency.inspect}, internal_account_id:"\
|
|
137
|
+
" #{@internal_account_id.inspect}, virtual_account_id: #{@virtual_account_id.inspect},"\
|
|
138
|
+
" as_of_date: #{@as_of_date.inspect}, description: #{@description.inspect}>"
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# IncomingPaymentDetailUpdateRequest Model.
|
|
8
|
+
class IncomingPaymentDetailUpdateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Additional data in the form of key-value pairs. Pairs can be removed by
|
|
13
|
+
# passing an empty string or `null` as the value.
|
|
14
|
+
# @return [Hash[String, String]]
|
|
15
|
+
attr_accessor :metadata
|
|
16
|
+
|
|
17
|
+
# A mapping from model property names to API property names.
|
|
18
|
+
def self.names
|
|
19
|
+
@_hash = {} if @_hash.nil?
|
|
20
|
+
@_hash['metadata'] = 'metadata'
|
|
21
|
+
@_hash
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# An array for optional fields
|
|
25
|
+
def self.optionals
|
|
26
|
+
%w[
|
|
27
|
+
metadata
|
|
28
|
+
]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for nullable fields
|
|
32
|
+
def self.nullables
|
|
33
|
+
[]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def initialize(metadata = SKIP)
|
|
37
|
+
@metadata = metadata unless metadata == SKIP
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Creates an instance of the object from a hash.
|
|
41
|
+
def self.from_hash(hash)
|
|
42
|
+
return nil unless hash
|
|
43
|
+
|
|
44
|
+
# Extract variables from the hash.
|
|
45
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
46
|
+
|
|
47
|
+
# Create object from extracted values.
|
|
48
|
+
IncomingPaymentDetailUpdateRequest.new(metadata)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Provides a human-readable string representation of the object.
|
|
52
|
+
def to_s
|
|
53
|
+
class_name = self.class.name.split('::').last
|
|
54
|
+
"<#{class_name} metadata: #{@metadata}>"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
58
|
+
def inspect
|
|
59
|
+
class_name = self.class.name.split('::').last
|
|
60
|
+
"<#{class_name} metadata: #{@metadata.inspect}>"
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|