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,239 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# ExpectedPaymentUpdateRequest Model.
|
|
8
|
+
class ExpectedPaymentUpdateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The highest amount this expected payment may be equal to. Value in
|
|
13
|
+
# specified currency's smallest unit. e.g. $10 would be represented as 1000.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :amount_upper_bound
|
|
16
|
+
|
|
17
|
+
# The lowest amount this expected payment may be equal to. Value in
|
|
18
|
+
# specified currency's smallest unit. e.g. $10 would be represented as 1000.
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
attr_accessor :amount_lower_bound
|
|
21
|
+
|
|
22
|
+
# One of credit or debit. When you are receiving money, use credit. When you
|
|
23
|
+
# are being charged, use debit.
|
|
24
|
+
# @return [Direction1Enum]
|
|
25
|
+
attr_accessor :direction
|
|
26
|
+
|
|
27
|
+
# The ID of the Internal Account for the expected payment.
|
|
28
|
+
# @return [UUID | String]
|
|
29
|
+
attr_accessor :internal_account_id
|
|
30
|
+
|
|
31
|
+
# One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp,
|
|
32
|
+
# sen, sepa, signet, wire.
|
|
33
|
+
# @return [Type1Enum]
|
|
34
|
+
attr_accessor :type
|
|
35
|
+
|
|
36
|
+
# Three-letter ISO currency code.
|
|
37
|
+
# @return [CurrencyEnum]
|
|
38
|
+
attr_accessor :currency
|
|
39
|
+
|
|
40
|
+
# The latest date the payment may come in. Format: yyyy-mm-dd
|
|
41
|
+
# @return [Date]
|
|
42
|
+
attr_accessor :date_upper_bound
|
|
43
|
+
|
|
44
|
+
# The earliest date the payment may come in. Format: yyyy-mm-dd
|
|
45
|
+
# @return [Date]
|
|
46
|
+
attr_accessor :date_lower_bound
|
|
47
|
+
|
|
48
|
+
# An optional description for internal use.
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :description
|
|
51
|
+
|
|
52
|
+
# The statement description you expect to see on the transaction. For ACH
|
|
53
|
+
# payments, this will be the full line item passed from the bank. For wire
|
|
54
|
+
# payments, this will be the OBI field on the wire. For check payments, this
|
|
55
|
+
# will be the memo field.
|
|
56
|
+
# @return [String]
|
|
57
|
+
attr_accessor :statement_descriptor
|
|
58
|
+
|
|
59
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
60
|
+
# must be strings.
|
|
61
|
+
# @return [Hash[String, String]]
|
|
62
|
+
attr_accessor :metadata
|
|
63
|
+
|
|
64
|
+
# The ID of the counterparty you expect for this payment.
|
|
65
|
+
# @return [UUID | String]
|
|
66
|
+
attr_accessor :counterparty_id
|
|
67
|
+
|
|
68
|
+
# For `ach`, this field will be passed through on an addenda record. For
|
|
69
|
+
# `wire` payments the field will be passed through as the "Originator to
|
|
70
|
+
# Beneficiary Information", also known as OBI or Fedwire tag 6000.
|
|
71
|
+
# @return [String]
|
|
72
|
+
attr_accessor :remittance_information
|
|
73
|
+
|
|
74
|
+
# The reconciliation groups you have for this payment.
|
|
75
|
+
# @return [Object]
|
|
76
|
+
attr_accessor :reconciliation_groups
|
|
77
|
+
|
|
78
|
+
# The reconciliation filters you have for this payment.
|
|
79
|
+
# @return [Object]
|
|
80
|
+
attr_accessor :reconciliation_filters
|
|
81
|
+
|
|
82
|
+
# A mapping from model property names to API property names.
|
|
83
|
+
def self.names
|
|
84
|
+
@_hash = {} if @_hash.nil?
|
|
85
|
+
@_hash['amount_upper_bound'] = 'amount_upper_bound'
|
|
86
|
+
@_hash['amount_lower_bound'] = 'amount_lower_bound'
|
|
87
|
+
@_hash['direction'] = 'direction'
|
|
88
|
+
@_hash['internal_account_id'] = 'internal_account_id'
|
|
89
|
+
@_hash['type'] = 'type'
|
|
90
|
+
@_hash['currency'] = 'currency'
|
|
91
|
+
@_hash['date_upper_bound'] = 'date_upper_bound'
|
|
92
|
+
@_hash['date_lower_bound'] = 'date_lower_bound'
|
|
93
|
+
@_hash['description'] = 'description'
|
|
94
|
+
@_hash['statement_descriptor'] = 'statement_descriptor'
|
|
95
|
+
@_hash['metadata'] = 'metadata'
|
|
96
|
+
@_hash['counterparty_id'] = 'counterparty_id'
|
|
97
|
+
@_hash['remittance_information'] = 'remittance_information'
|
|
98
|
+
@_hash['reconciliation_groups'] = 'reconciliation_groups'
|
|
99
|
+
@_hash['reconciliation_filters'] = 'reconciliation_filters'
|
|
100
|
+
@_hash
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# An array for optional fields
|
|
104
|
+
def self.optionals
|
|
105
|
+
%w[
|
|
106
|
+
amount_upper_bound
|
|
107
|
+
amount_lower_bound
|
|
108
|
+
direction
|
|
109
|
+
internal_account_id
|
|
110
|
+
type
|
|
111
|
+
currency
|
|
112
|
+
date_upper_bound
|
|
113
|
+
date_lower_bound
|
|
114
|
+
description
|
|
115
|
+
statement_descriptor
|
|
116
|
+
metadata
|
|
117
|
+
counterparty_id
|
|
118
|
+
remittance_information
|
|
119
|
+
reconciliation_groups
|
|
120
|
+
reconciliation_filters
|
|
121
|
+
]
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# An array for nullable fields
|
|
125
|
+
def self.nullables
|
|
126
|
+
%w[
|
|
127
|
+
type
|
|
128
|
+
date_upper_bound
|
|
129
|
+
date_lower_bound
|
|
130
|
+
description
|
|
131
|
+
statement_descriptor
|
|
132
|
+
counterparty_id
|
|
133
|
+
remittance_information
|
|
134
|
+
reconciliation_groups
|
|
135
|
+
reconciliation_filters
|
|
136
|
+
]
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def initialize(amount_upper_bound = SKIP, amount_lower_bound = SKIP,
|
|
140
|
+
direction = SKIP, internal_account_id = SKIP, type = SKIP,
|
|
141
|
+
currency = SKIP, date_upper_bound = SKIP,
|
|
142
|
+
date_lower_bound = SKIP, description = SKIP,
|
|
143
|
+
statement_descriptor = SKIP, metadata = SKIP,
|
|
144
|
+
counterparty_id = SKIP, remittance_information = SKIP,
|
|
145
|
+
reconciliation_groups = SKIP, reconciliation_filters = SKIP)
|
|
146
|
+
@amount_upper_bound = amount_upper_bound unless amount_upper_bound == SKIP
|
|
147
|
+
@amount_lower_bound = amount_lower_bound unless amount_lower_bound == SKIP
|
|
148
|
+
@direction = direction unless direction == SKIP
|
|
149
|
+
@internal_account_id = internal_account_id unless internal_account_id == SKIP
|
|
150
|
+
@type = type unless type == SKIP
|
|
151
|
+
@currency = currency unless currency == SKIP
|
|
152
|
+
@date_upper_bound = date_upper_bound unless date_upper_bound == SKIP
|
|
153
|
+
@date_lower_bound = date_lower_bound unless date_lower_bound == SKIP
|
|
154
|
+
@description = description unless description == SKIP
|
|
155
|
+
@statement_descriptor = statement_descriptor unless statement_descriptor == SKIP
|
|
156
|
+
@metadata = metadata unless metadata == SKIP
|
|
157
|
+
@counterparty_id = counterparty_id unless counterparty_id == SKIP
|
|
158
|
+
@remittance_information = remittance_information unless remittance_information == SKIP
|
|
159
|
+
@reconciliation_groups = reconciliation_groups unless reconciliation_groups == SKIP
|
|
160
|
+
@reconciliation_filters = reconciliation_filters unless reconciliation_filters == SKIP
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Creates an instance of the object from a hash.
|
|
164
|
+
def self.from_hash(hash)
|
|
165
|
+
return nil unless hash
|
|
166
|
+
|
|
167
|
+
# Extract variables from the hash.
|
|
168
|
+
amount_upper_bound =
|
|
169
|
+
hash.key?('amount_upper_bound') ? hash['amount_upper_bound'] : SKIP
|
|
170
|
+
amount_lower_bound =
|
|
171
|
+
hash.key?('amount_lower_bound') ? hash['amount_lower_bound'] : SKIP
|
|
172
|
+
direction = hash.key?('direction') ? hash['direction'] : SKIP
|
|
173
|
+
internal_account_id =
|
|
174
|
+
hash.key?('internal_account_id') ? hash['internal_account_id'] : SKIP
|
|
175
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
176
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
177
|
+
date_upper_bound =
|
|
178
|
+
hash.key?('date_upper_bound') ? hash['date_upper_bound'] : SKIP
|
|
179
|
+
date_lower_bound =
|
|
180
|
+
hash.key?('date_lower_bound') ? hash['date_lower_bound'] : SKIP
|
|
181
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
182
|
+
statement_descriptor =
|
|
183
|
+
hash.key?('statement_descriptor') ? hash['statement_descriptor'] : SKIP
|
|
184
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
185
|
+
counterparty_id =
|
|
186
|
+
hash.key?('counterparty_id') ? hash['counterparty_id'] : SKIP
|
|
187
|
+
remittance_information =
|
|
188
|
+
hash.key?('remittance_information') ? hash['remittance_information'] : SKIP
|
|
189
|
+
reconciliation_groups =
|
|
190
|
+
hash.key?('reconciliation_groups') ? hash['reconciliation_groups'] : SKIP
|
|
191
|
+
reconciliation_filters =
|
|
192
|
+
hash.key?('reconciliation_filters') ? hash['reconciliation_filters'] : SKIP
|
|
193
|
+
|
|
194
|
+
# Create object from extracted values.
|
|
195
|
+
ExpectedPaymentUpdateRequest.new(amount_upper_bound,
|
|
196
|
+
amount_lower_bound,
|
|
197
|
+
direction,
|
|
198
|
+
internal_account_id,
|
|
199
|
+
type,
|
|
200
|
+
currency,
|
|
201
|
+
date_upper_bound,
|
|
202
|
+
date_lower_bound,
|
|
203
|
+
description,
|
|
204
|
+
statement_descriptor,
|
|
205
|
+
metadata,
|
|
206
|
+
counterparty_id,
|
|
207
|
+
remittance_information,
|
|
208
|
+
reconciliation_groups,
|
|
209
|
+
reconciliation_filters)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Provides a human-readable string representation of the object.
|
|
213
|
+
def to_s
|
|
214
|
+
class_name = self.class.name.split('::').last
|
|
215
|
+
"<#{class_name} amount_upper_bound: #{@amount_upper_bound}, amount_lower_bound:"\
|
|
216
|
+
" #{@amount_lower_bound}, direction: #{@direction}, internal_account_id:"\
|
|
217
|
+
" #{@internal_account_id}, type: #{@type}, currency: #{@currency}, date_upper_bound:"\
|
|
218
|
+
" #{@date_upper_bound}, date_lower_bound: #{@date_lower_bound}, description:"\
|
|
219
|
+
" #{@description}, statement_descriptor: #{@statement_descriptor}, metadata: #{@metadata},"\
|
|
220
|
+
" counterparty_id: #{@counterparty_id}, remittance_information: #{@remittance_information},"\
|
|
221
|
+
" reconciliation_groups: #{@reconciliation_groups}, reconciliation_filters:"\
|
|
222
|
+
" #{@reconciliation_filters}>"
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
226
|
+
def inspect
|
|
227
|
+
class_name = self.class.name.split('::').last
|
|
228
|
+
"<#{class_name} amount_upper_bound: #{@amount_upper_bound.inspect}, amount_lower_bound:"\
|
|
229
|
+
" #{@amount_lower_bound.inspect}, direction: #{@direction.inspect}, internal_account_id:"\
|
|
230
|
+
" #{@internal_account_id.inspect}, type: #{@type.inspect}, currency: #{@currency.inspect},"\
|
|
231
|
+
" date_upper_bound: #{@date_upper_bound.inspect}, date_lower_bound:"\
|
|
232
|
+
" #{@date_lower_bound.inspect}, description: #{@description.inspect}, statement_descriptor:"\
|
|
233
|
+
" #{@statement_descriptor.inspect}, metadata: #{@metadata.inspect}, counterparty_id:"\
|
|
234
|
+
" #{@counterparty_id.inspect}, remittance_information: #{@remittance_information.inspect},"\
|
|
235
|
+
" reconciliation_groups: #{@reconciliation_groups.inspect}, reconciliation_filters:"\
|
|
236
|
+
" #{@reconciliation_filters.inspect}>"
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
end
|
|
@@ -0,0 +1,283 @@
|
|
|
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
|
+
# ExternalAccount Model.
|
|
9
|
+
class ExternalAccount < 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
|
+
# This field will be true if this object exists in the live environment or
|
|
37
|
+
# false if it exists in the test environment.
|
|
38
|
+
# @return [DateTime]
|
|
39
|
+
attr_accessor :discarded_at
|
|
40
|
+
|
|
41
|
+
# Can be `checking`, `savings` or `other`.
|
|
42
|
+
# @return [AccountTypeEnum]
|
|
43
|
+
attr_accessor :account_type
|
|
44
|
+
|
|
45
|
+
# Either `individual` or `business`.
|
|
46
|
+
# @return [PartyTypeEnum]
|
|
47
|
+
attr_accessor :party_type
|
|
48
|
+
|
|
49
|
+
# Either `individual` or `business`.
|
|
50
|
+
# @return [Address]
|
|
51
|
+
attr_accessor :party_address
|
|
52
|
+
|
|
53
|
+
# A nickname for the external account. This is only for internal usage and
|
|
54
|
+
# won't affect any payments
|
|
55
|
+
# @return [String]
|
|
56
|
+
attr_accessor :name
|
|
57
|
+
|
|
58
|
+
# A nickname for the external account. This is only for internal usage and
|
|
59
|
+
# won't affect any payments
|
|
60
|
+
# @return [UUID | String]
|
|
61
|
+
attr_accessor :counterparty_id
|
|
62
|
+
|
|
63
|
+
# A nickname for the external account. This is only for internal usage and
|
|
64
|
+
# won't affect any payments
|
|
65
|
+
# @return [Array[AccountDetail]]
|
|
66
|
+
attr_accessor :account_details
|
|
67
|
+
|
|
68
|
+
# A nickname for the external account. This is only for internal usage and
|
|
69
|
+
# won't affect any payments
|
|
70
|
+
# @return [Array[RoutingDetail]]
|
|
71
|
+
attr_accessor :routing_details
|
|
72
|
+
|
|
73
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
74
|
+
# must be strings.
|
|
75
|
+
# @return [Hash[String, String]]
|
|
76
|
+
attr_accessor :metadata
|
|
77
|
+
|
|
78
|
+
# The legal name of the entity which owns the account.
|
|
79
|
+
# @return [String]
|
|
80
|
+
attr_accessor :party_name
|
|
81
|
+
|
|
82
|
+
# The legal name of the entity which owns the account.
|
|
83
|
+
# @return [Array[ContactDetail]]
|
|
84
|
+
attr_accessor :contact_details
|
|
85
|
+
|
|
86
|
+
# If the external account links to a ledger account in Modern Treasury, the
|
|
87
|
+
# id of the ledger account will be populated here.
|
|
88
|
+
# @return [UUID | String]
|
|
89
|
+
attr_accessor :ledger_account_id
|
|
90
|
+
|
|
91
|
+
# If the external account links to a ledger account in Modern Treasury, the
|
|
92
|
+
# id of the ledger account will be populated here.
|
|
93
|
+
# @return [VerificationStatusEnum]
|
|
94
|
+
attr_accessor :verification_status
|
|
95
|
+
|
|
96
|
+
# A mapping from model property names to API property names.
|
|
97
|
+
def self.names
|
|
98
|
+
@_hash = {} if @_hash.nil?
|
|
99
|
+
@_hash['id'] = 'id'
|
|
100
|
+
@_hash['object'] = 'object'
|
|
101
|
+
@_hash['live_mode'] = 'live_mode'
|
|
102
|
+
@_hash['created_at'] = 'created_at'
|
|
103
|
+
@_hash['updated_at'] = 'updated_at'
|
|
104
|
+
@_hash['discarded_at'] = 'discarded_at'
|
|
105
|
+
@_hash['account_type'] = 'account_type'
|
|
106
|
+
@_hash['party_type'] = 'party_type'
|
|
107
|
+
@_hash['party_address'] = 'party_address'
|
|
108
|
+
@_hash['name'] = 'name'
|
|
109
|
+
@_hash['counterparty_id'] = 'counterparty_id'
|
|
110
|
+
@_hash['account_details'] = 'account_details'
|
|
111
|
+
@_hash['routing_details'] = 'routing_details'
|
|
112
|
+
@_hash['metadata'] = 'metadata'
|
|
113
|
+
@_hash['party_name'] = 'party_name'
|
|
114
|
+
@_hash['contact_details'] = 'contact_details'
|
|
115
|
+
@_hash['ledger_account_id'] = 'ledger_account_id'
|
|
116
|
+
@_hash['verification_status'] = 'verification_status'
|
|
117
|
+
@_hash
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# An array for optional fields
|
|
121
|
+
def self.optionals
|
|
122
|
+
[]
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# An array for nullable fields
|
|
126
|
+
def self.nullables
|
|
127
|
+
%w[
|
|
128
|
+
discarded_at
|
|
129
|
+
party_type
|
|
130
|
+
party_address
|
|
131
|
+
name
|
|
132
|
+
counterparty_id
|
|
133
|
+
ledger_account_id
|
|
134
|
+
]
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def initialize(id = nil, object = nil, live_mode = nil, created_at = nil,
|
|
138
|
+
updated_at = nil, discarded_at = nil, account_type = nil,
|
|
139
|
+
party_type = nil, party_address = nil, name = nil,
|
|
140
|
+
counterparty_id = nil, account_details = nil,
|
|
141
|
+
routing_details = nil, metadata = nil, party_name = nil,
|
|
142
|
+
contact_details = nil, ledger_account_id = nil,
|
|
143
|
+
verification_status = nil)
|
|
144
|
+
@id = id
|
|
145
|
+
@object = object
|
|
146
|
+
@live_mode = live_mode
|
|
147
|
+
@created_at = created_at
|
|
148
|
+
@updated_at = updated_at
|
|
149
|
+
@discarded_at = discarded_at
|
|
150
|
+
@account_type = account_type
|
|
151
|
+
@party_type = party_type
|
|
152
|
+
@party_address = party_address
|
|
153
|
+
@name = name
|
|
154
|
+
@counterparty_id = counterparty_id
|
|
155
|
+
@account_details = account_details
|
|
156
|
+
@routing_details = routing_details
|
|
157
|
+
@metadata = metadata
|
|
158
|
+
@party_name = party_name
|
|
159
|
+
@contact_details = contact_details
|
|
160
|
+
@ledger_account_id = ledger_account_id
|
|
161
|
+
@verification_status = verification_status
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Creates an instance of the object from a hash.
|
|
165
|
+
def self.from_hash(hash)
|
|
166
|
+
return nil unless hash
|
|
167
|
+
|
|
168
|
+
# Extract variables from the hash.
|
|
169
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
170
|
+
object = hash.key?('object') ? hash['object'] : nil
|
|
171
|
+
live_mode = hash.key?('live_mode') ? hash['live_mode'] : nil
|
|
172
|
+
created_at = if hash.key?('created_at')
|
|
173
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
|
174
|
+
end
|
|
175
|
+
updated_at = if hash.key?('updated_at')
|
|
176
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
|
177
|
+
end
|
|
178
|
+
discarded_at = if hash.key?('discarded_at')
|
|
179
|
+
(DateTimeHelper.from_rfc3339(hash['discarded_at']) if hash['discarded_at'])
|
|
180
|
+
end
|
|
181
|
+
account_type = hash.key?('account_type') ? hash['account_type'] : nil
|
|
182
|
+
party_type = hash.key?('party_type') ? hash['party_type'] : nil
|
|
183
|
+
party_address = Address.from_hash(hash['party_address']) if hash['party_address']
|
|
184
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
185
|
+
counterparty_id =
|
|
186
|
+
hash.key?('counterparty_id') ? hash['counterparty_id'] : nil
|
|
187
|
+
# Parameter is an array, so we need to iterate through it
|
|
188
|
+
account_details = nil
|
|
189
|
+
unless hash['account_details'].nil?
|
|
190
|
+
account_details = []
|
|
191
|
+
hash['account_details'].each do |structure|
|
|
192
|
+
account_details << (AccountDetail.from_hash(structure) if structure)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
account_details = nil unless hash.key?('account_details')
|
|
197
|
+
# Parameter is an array, so we need to iterate through it
|
|
198
|
+
routing_details = nil
|
|
199
|
+
unless hash['routing_details'].nil?
|
|
200
|
+
routing_details = []
|
|
201
|
+
hash['routing_details'].each do |structure|
|
|
202
|
+
routing_details << (RoutingDetail.from_hash(structure) if structure)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
routing_details = nil unless hash.key?('routing_details')
|
|
207
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : nil
|
|
208
|
+
party_name = hash.key?('party_name') ? hash['party_name'] : nil
|
|
209
|
+
# Parameter is an array, so we need to iterate through it
|
|
210
|
+
contact_details = nil
|
|
211
|
+
unless hash['contact_details'].nil?
|
|
212
|
+
contact_details = []
|
|
213
|
+
hash['contact_details'].each do |structure|
|
|
214
|
+
contact_details << (ContactDetail.from_hash(structure) if structure)
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
contact_details = nil unless hash.key?('contact_details')
|
|
219
|
+
ledger_account_id =
|
|
220
|
+
hash.key?('ledger_account_id') ? hash['ledger_account_id'] : nil
|
|
221
|
+
verification_status =
|
|
222
|
+
hash.key?('verification_status') ? hash['verification_status'] : nil
|
|
223
|
+
|
|
224
|
+
# Create object from extracted values.
|
|
225
|
+
ExternalAccount.new(id,
|
|
226
|
+
object,
|
|
227
|
+
live_mode,
|
|
228
|
+
created_at,
|
|
229
|
+
updated_at,
|
|
230
|
+
discarded_at,
|
|
231
|
+
account_type,
|
|
232
|
+
party_type,
|
|
233
|
+
party_address,
|
|
234
|
+
name,
|
|
235
|
+
counterparty_id,
|
|
236
|
+
account_details,
|
|
237
|
+
routing_details,
|
|
238
|
+
metadata,
|
|
239
|
+
party_name,
|
|
240
|
+
contact_details,
|
|
241
|
+
ledger_account_id,
|
|
242
|
+
verification_status)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
def to_custom_created_at
|
|
246
|
+
DateTimeHelper.to_rfc3339(created_at)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
def to_custom_updated_at
|
|
250
|
+
DateTimeHelper.to_rfc3339(updated_at)
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
def to_custom_discarded_at
|
|
254
|
+
DateTimeHelper.to_rfc3339(discarded_at)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Provides a human-readable string representation of the object.
|
|
258
|
+
def to_s
|
|
259
|
+
class_name = self.class.name.split('::').last
|
|
260
|
+
"<#{class_name} id: #{@id}, object: #{@object}, live_mode: #{@live_mode}, created_at:"\
|
|
261
|
+
" #{@created_at}, updated_at: #{@updated_at}, discarded_at: #{@discarded_at}, account_type:"\
|
|
262
|
+
" #{@account_type}, party_type: #{@party_type}, party_address: #{@party_address}, name:"\
|
|
263
|
+
" #{@name}, counterparty_id: #{@counterparty_id}, account_details: #{@account_details},"\
|
|
264
|
+
" routing_details: #{@routing_details}, metadata: #{@metadata}, party_name: #{@party_name},"\
|
|
265
|
+
" contact_details: #{@contact_details}, ledger_account_id: #{@ledger_account_id},"\
|
|
266
|
+
" verification_status: #{@verification_status}>"
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
270
|
+
def inspect
|
|
271
|
+
class_name = self.class.name.split('::').last
|
|
272
|
+
"<#{class_name} id: #{@id.inspect}, object: #{@object.inspect}, live_mode:"\
|
|
273
|
+
" #{@live_mode.inspect}, created_at: #{@created_at.inspect}, updated_at:"\
|
|
274
|
+
" #{@updated_at.inspect}, discarded_at: #{@discarded_at.inspect}, account_type:"\
|
|
275
|
+
" #{@account_type.inspect}, party_type: #{@party_type.inspect}, party_address:"\
|
|
276
|
+
" #{@party_address.inspect}, name: #{@name.inspect}, counterparty_id:"\
|
|
277
|
+
" #{@counterparty_id.inspect}, account_details: #{@account_details.inspect},"\
|
|
278
|
+
" routing_details: #{@routing_details.inspect}, metadata: #{@metadata.inspect}, party_name:"\
|
|
279
|
+
" #{@party_name.inspect}, contact_details: #{@contact_details.inspect}, ledger_account_id:"\
|
|
280
|
+
" #{@ledger_account_id.inspect}, verification_status: #{@verification_status.inspect}>"
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# ExternalAccountCompleteVerificationRequest Model.
|
|
8
|
+
class ExternalAccountCompleteVerificationRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[Integer]]
|
|
14
|
+
attr_accessor :amounts
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['amounts'] = 'amounts'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
amounts
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(amounts = SKIP)
|
|
36
|
+
@amounts = amounts unless amounts == SKIP
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Creates an instance of the object from a hash.
|
|
40
|
+
def self.from_hash(hash)
|
|
41
|
+
return nil unless hash
|
|
42
|
+
|
|
43
|
+
# Extract variables from the hash.
|
|
44
|
+
amounts = hash.key?('amounts') ? hash['amounts'] : SKIP
|
|
45
|
+
|
|
46
|
+
# Create object from extracted values.
|
|
47
|
+
ExternalAccountCompleteVerificationRequest.new(amounts)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Provides a human-readable string representation of the object.
|
|
51
|
+
def to_s
|
|
52
|
+
class_name = self.class.name.split('::').last
|
|
53
|
+
"<#{class_name} amounts: #{@amounts}>"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
57
|
+
def inspect
|
|
58
|
+
class_name = self.class.name.split('::').last
|
|
59
|
+
"<#{class_name} amounts: #{@amounts.inspect}>"
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|