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,820 @@
|
|
|
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
|
+
# PaymentOrder Model.
|
|
9
|
+
class PaymentOrder < 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
|
+
# One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
|
|
37
|
+
# `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.
|
|
38
|
+
# @return [Type5Enum]
|
|
39
|
+
attr_accessor :type
|
|
40
|
+
|
|
41
|
+
# An additional layer of classification for the type of payment order you
|
|
42
|
+
# are doing. This field is only used for `ach` payment orders currently. For
|
|
43
|
+
# `ach` payment orders, the `subtype` represents the SEC code. We
|
|
44
|
+
# currently support `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
45
|
+
# @return [SubtypeEnum]
|
|
46
|
+
attr_accessor :subtype
|
|
47
|
+
|
|
48
|
+
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
49
|
+
# as 1000 (cents). For RTP, the maximum amount allowed by the network is
|
|
50
|
+
# $100,000.
|
|
51
|
+
# @return [Integer]
|
|
52
|
+
attr_accessor :amount
|
|
53
|
+
|
|
54
|
+
# One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
55
|
+
# transaction. A `credit` moves money from your account to someone else's. A
|
|
56
|
+
# `debit` pulls money from someone else's account to your own. Note that
|
|
57
|
+
# wire, rtp, and check payments will always be `credit`.
|
|
58
|
+
# @return [Direction5Enum]
|
|
59
|
+
attr_accessor :direction
|
|
60
|
+
|
|
61
|
+
# Either `normal` or `high`. For ACH and EFT payments, `high` represents a
|
|
62
|
+
# same-day ACH or EFT transfer, respectively. For check payments, `high` can
|
|
63
|
+
# mean an overnight check rather than standard mail.
|
|
64
|
+
# @return [PriorityEnum]
|
|
65
|
+
attr_accessor :priority
|
|
66
|
+
|
|
67
|
+
# The ID of one of your organization's internal accounts.
|
|
68
|
+
# @return [UUID | String]
|
|
69
|
+
attr_accessor :originating_account_id
|
|
70
|
+
|
|
71
|
+
# The receiving account ID. Can be an `external_account` or
|
|
72
|
+
# `internal_account`.
|
|
73
|
+
# @return [UUID | String]
|
|
74
|
+
attr_accessor :receiving_account_id
|
|
75
|
+
|
|
76
|
+
# The receiving account ID. Can be an `external_account` or
|
|
77
|
+
# `internal_account`.
|
|
78
|
+
# @return [Accounting]
|
|
79
|
+
attr_accessor :accounting
|
|
80
|
+
|
|
81
|
+
# The ID of one of your accounting categories. Note that these will only be
|
|
82
|
+
# accessible if your accounting system has been connected.
|
|
83
|
+
# @return [UUID | String]
|
|
84
|
+
attr_accessor :accounting_category_id
|
|
85
|
+
|
|
86
|
+
# The ID of one of your accounting ledger classes. Note that these will only
|
|
87
|
+
# be accessible if your accounting system has been connected.
|
|
88
|
+
# @return [UUID | String]
|
|
89
|
+
attr_accessor :accounting_ledger_class_id
|
|
90
|
+
|
|
91
|
+
# Three-letter ISO currency code.
|
|
92
|
+
# @return [CurrencyEnum]
|
|
93
|
+
attr_accessor :currency
|
|
94
|
+
|
|
95
|
+
# Date transactions are to be posted to the participants' account. Defaults
|
|
96
|
+
# to the current business day or the next business day if the current day is
|
|
97
|
+
# a bank holiday or weekend. Format: yyyy-mm-dd.
|
|
98
|
+
# @return [Date]
|
|
99
|
+
attr_accessor :effective_date
|
|
100
|
+
|
|
101
|
+
# An optional description for internal use.
|
|
102
|
+
# @return [String]
|
|
103
|
+
attr_accessor :description
|
|
104
|
+
|
|
105
|
+
# An optional descriptor which will appear in the receiver's statement. For
|
|
106
|
+
# `check` payments this field will be used as the memo line. For `ach` the
|
|
107
|
+
# maximum length is 10 characters. Note that for ACH payments, the name on
|
|
108
|
+
# your bank account will be included automatically by the bank, so you can
|
|
109
|
+
# use the characters for other useful information. For `eft` the maximum
|
|
110
|
+
# length is 15 characters.
|
|
111
|
+
# @return [String]
|
|
112
|
+
attr_accessor :statement_descriptor
|
|
113
|
+
|
|
114
|
+
# For `ach`, this field will be passed through on an addenda record. For
|
|
115
|
+
# `wire` payments the field will be passed through as the "Originator to
|
|
116
|
+
# Beneficiary Information", also known as OBI or Fedwire tag 6000.
|
|
117
|
+
# @return [String]
|
|
118
|
+
attr_accessor :remittance_information
|
|
119
|
+
|
|
120
|
+
# For `wire`, this is usually the purpose which is transmitted via the
|
|
121
|
+
# "InstrForDbtrAgt" field in the ISO20022 file. If you are using
|
|
122
|
+
# Currencycloud, this is the `payment.purpose_code` field. For `eft`, this
|
|
123
|
+
# field is the 3 digit CPA Code that will be attached to the payment.
|
|
124
|
+
# @return [String]
|
|
125
|
+
attr_accessor :purpose
|
|
126
|
+
|
|
127
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
128
|
+
# must be strings.
|
|
129
|
+
# @return [Hash[String, String]]
|
|
130
|
+
attr_accessor :metadata
|
|
131
|
+
|
|
132
|
+
# The party that will pay the fees for the payment order. Only applies to
|
|
133
|
+
# wire payment orders. Can be one of shared, sender, or receiver, which
|
|
134
|
+
# correspond respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
|
|
135
|
+
# @return [ChargeBearerEnum]
|
|
136
|
+
attr_accessor :charge_bearer
|
|
137
|
+
|
|
138
|
+
# Indicates the type of FX transfer to initiate, can be either
|
|
139
|
+
# `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
|
|
140
|
+
# currency matches the originating account currency.
|
|
141
|
+
# @return [ForeignExchangeIndicatorEnum]
|
|
142
|
+
attr_accessor :foreign_exchange_indicator
|
|
143
|
+
|
|
144
|
+
# If present, indicates a specific foreign exchange contract number that has
|
|
145
|
+
# been generated by your financial institution.
|
|
146
|
+
# @return [String]
|
|
147
|
+
attr_accessor :foreign_exchange_contract
|
|
148
|
+
|
|
149
|
+
# A boolean to determine if NSF Protection is enabled for this payment
|
|
150
|
+
# order. Note that this setting must also be turned on in your organization
|
|
151
|
+
# settings page.
|
|
152
|
+
# @return [TrueClass | FalseClass]
|
|
153
|
+
attr_accessor :nsf_protected
|
|
154
|
+
|
|
155
|
+
# If present, this will replace your default company name on receiver's bank
|
|
156
|
+
# statement. This field can only be used for ACH payments currently. For
|
|
157
|
+
# ACH, only the first 16 characters of this string will be used. Any
|
|
158
|
+
# additional characters will be truncated.
|
|
159
|
+
# @return [String]
|
|
160
|
+
attr_accessor :originating_party_name
|
|
161
|
+
|
|
162
|
+
# Name of the ultimate originator of the payment order.
|
|
163
|
+
# @return [String]
|
|
164
|
+
attr_accessor :ultimate_originating_party_name
|
|
165
|
+
|
|
166
|
+
# Identifier of the ultimate originator of the payment order.
|
|
167
|
+
# @return [String]
|
|
168
|
+
attr_accessor :ultimate_originating_party_identifier
|
|
169
|
+
|
|
170
|
+
# Identifier of the ultimate originator of the payment order.
|
|
171
|
+
# @return [String]
|
|
172
|
+
attr_accessor :ultimate_receiving_party_name
|
|
173
|
+
|
|
174
|
+
# Identifier of the ultimate originator of the payment order.
|
|
175
|
+
# @return [String]
|
|
176
|
+
attr_accessor :ultimate_receiving_party_identifier
|
|
177
|
+
|
|
178
|
+
# Send an email to the counterparty when the payment order is sent to the
|
|
179
|
+
# bank. If `null`, `send_remittance_advice` on the Counterparty is used.
|
|
180
|
+
# @return [TrueClass | FalseClass]
|
|
181
|
+
attr_accessor :send_remittance_advice
|
|
182
|
+
|
|
183
|
+
# RFP payments require an expires_at. This value must be past the
|
|
184
|
+
# effective_date.
|
|
185
|
+
# @return [DateTime]
|
|
186
|
+
attr_accessor :expires_at
|
|
187
|
+
|
|
188
|
+
# The current status of the payment order.
|
|
189
|
+
# @return [Status3Enum]
|
|
190
|
+
attr_accessor :status
|
|
191
|
+
|
|
192
|
+
# The receiving account. Can be an `external_account` or `internal_account`.
|
|
193
|
+
# @return [Object]
|
|
194
|
+
attr_accessor :receiving_account
|
|
195
|
+
|
|
196
|
+
# The receiving account. Can be an `external_account` or `internal_account`.
|
|
197
|
+
# @return [ReceivingAccountTypeEnum]
|
|
198
|
+
attr_accessor :receiving_account_type
|
|
199
|
+
|
|
200
|
+
# If the payment order is tied to a specific Counterparty, their id will
|
|
201
|
+
# appear, otherwise `null`.
|
|
202
|
+
# @return [UUID | String]
|
|
203
|
+
attr_accessor :counterparty_id
|
|
204
|
+
|
|
205
|
+
# The IDs of all the transactions associated to this payment order. Usually,
|
|
206
|
+
# you will only have a single transaction ID. However, if a payment order
|
|
207
|
+
# initially results in a Return, but gets redrafted and is later
|
|
208
|
+
# successfully completed, it can have many transactions.
|
|
209
|
+
# @return [Array[UUID | String]]
|
|
210
|
+
attr_accessor :transaction_ids
|
|
211
|
+
|
|
212
|
+
# The ID of the ledger transaction linked to the payment order.
|
|
213
|
+
# @return [UUID | String]
|
|
214
|
+
attr_accessor :ledger_transaction_id
|
|
215
|
+
|
|
216
|
+
# The ID of the ledger transaction linked to the payment order.
|
|
217
|
+
# @return [Return]
|
|
218
|
+
attr_accessor :current_return
|
|
219
|
+
|
|
220
|
+
# A flag that determines whether a payment order should go through
|
|
221
|
+
# transaction monitoring.
|
|
222
|
+
# @return [TrueClass | FalseClass]
|
|
223
|
+
attr_accessor :transaction_monitoring_enabled
|
|
224
|
+
|
|
225
|
+
# Custom key-value pair for usage in compliance rules. Please contact
|
|
226
|
+
# support before making changes to this field.
|
|
227
|
+
# @return [Object]
|
|
228
|
+
attr_accessor :compliance_rule_metadata
|
|
229
|
+
|
|
230
|
+
# Custom key-value pair for usage in compliance rules. Please contact
|
|
231
|
+
# support before making changes to this field.
|
|
232
|
+
# @return [Array[PaymentReference]]
|
|
233
|
+
attr_accessor :reference_numbers
|
|
234
|
+
|
|
235
|
+
# This field will be populated if a vendor (e.g. Currencycloud) failure
|
|
236
|
+
# occurs. Logic shouldn't be built on its value as it is free-form.
|
|
237
|
+
# @return [String]
|
|
238
|
+
attr_accessor :vendor_failure_reason
|
|
239
|
+
|
|
240
|
+
# The ID of the compliance decision for the payment order, if transaction
|
|
241
|
+
# monitoring is enabled.
|
|
242
|
+
# @return [UUID | String]
|
|
243
|
+
attr_accessor :decision_id
|
|
244
|
+
|
|
245
|
+
# A mapping from model property names to API property names.
|
|
246
|
+
def self.names
|
|
247
|
+
@_hash = {} if @_hash.nil?
|
|
248
|
+
@_hash['id'] = 'id'
|
|
249
|
+
@_hash['object'] = 'object'
|
|
250
|
+
@_hash['live_mode'] = 'live_mode'
|
|
251
|
+
@_hash['created_at'] = 'created_at'
|
|
252
|
+
@_hash['updated_at'] = 'updated_at'
|
|
253
|
+
@_hash['type'] = 'type'
|
|
254
|
+
@_hash['subtype'] = 'subtype'
|
|
255
|
+
@_hash['amount'] = 'amount'
|
|
256
|
+
@_hash['direction'] = 'direction'
|
|
257
|
+
@_hash['priority'] = 'priority'
|
|
258
|
+
@_hash['originating_account_id'] = 'originating_account_id'
|
|
259
|
+
@_hash['receiving_account_id'] = 'receiving_account_id'
|
|
260
|
+
@_hash['accounting'] = 'accounting'
|
|
261
|
+
@_hash['accounting_category_id'] = 'accounting_category_id'
|
|
262
|
+
@_hash['accounting_ledger_class_id'] = 'accounting_ledger_class_id'
|
|
263
|
+
@_hash['currency'] = 'currency'
|
|
264
|
+
@_hash['effective_date'] = 'effective_date'
|
|
265
|
+
@_hash['description'] = 'description'
|
|
266
|
+
@_hash['statement_descriptor'] = 'statement_descriptor'
|
|
267
|
+
@_hash['remittance_information'] = 'remittance_information'
|
|
268
|
+
@_hash['purpose'] = 'purpose'
|
|
269
|
+
@_hash['metadata'] = 'metadata'
|
|
270
|
+
@_hash['charge_bearer'] = 'charge_bearer'
|
|
271
|
+
@_hash['foreign_exchange_indicator'] = 'foreign_exchange_indicator'
|
|
272
|
+
@_hash['foreign_exchange_contract'] = 'foreign_exchange_contract'
|
|
273
|
+
@_hash['nsf_protected'] = 'nsf_protected'
|
|
274
|
+
@_hash['originating_party_name'] = 'originating_party_name'
|
|
275
|
+
@_hash['ultimate_originating_party_name'] =
|
|
276
|
+
'ultimate_originating_party_name'
|
|
277
|
+
@_hash['ultimate_originating_party_identifier'] =
|
|
278
|
+
'ultimate_originating_party_identifier'
|
|
279
|
+
@_hash['ultimate_receiving_party_name'] =
|
|
280
|
+
'ultimate_receiving_party_name'
|
|
281
|
+
@_hash['ultimate_receiving_party_identifier'] =
|
|
282
|
+
'ultimate_receiving_party_identifier'
|
|
283
|
+
@_hash['send_remittance_advice'] = 'send_remittance_advice'
|
|
284
|
+
@_hash['expires_at'] = 'expires_at'
|
|
285
|
+
@_hash['status'] = 'status'
|
|
286
|
+
@_hash['receiving_account'] = 'receiving_account'
|
|
287
|
+
@_hash['receiving_account_type'] = 'receiving_account_type'
|
|
288
|
+
@_hash['counterparty_id'] = 'counterparty_id'
|
|
289
|
+
@_hash['transaction_ids'] = 'transaction_ids'
|
|
290
|
+
@_hash['ledger_transaction_id'] = 'ledger_transaction_id'
|
|
291
|
+
@_hash['current_return'] = 'current_return'
|
|
292
|
+
@_hash['transaction_monitoring_enabled'] =
|
|
293
|
+
'transaction_monitoring_enabled'
|
|
294
|
+
@_hash['compliance_rule_metadata'] = 'compliance_rule_metadata'
|
|
295
|
+
@_hash['reference_numbers'] = 'reference_numbers'
|
|
296
|
+
@_hash['vendor_failure_reason'] = 'vendor_failure_reason'
|
|
297
|
+
@_hash['decision_id'] = 'decision_id'
|
|
298
|
+
@_hash
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# An array for optional fields
|
|
302
|
+
def self.optionals
|
|
303
|
+
[]
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# An array for nullable fields
|
|
307
|
+
def self.nullables
|
|
308
|
+
%w[
|
|
309
|
+
subtype
|
|
310
|
+
accounting_category_id
|
|
311
|
+
accounting_ledger_class_id
|
|
312
|
+
description
|
|
313
|
+
statement_descriptor
|
|
314
|
+
remittance_information
|
|
315
|
+
purpose
|
|
316
|
+
charge_bearer
|
|
317
|
+
foreign_exchange_indicator
|
|
318
|
+
foreign_exchange_contract
|
|
319
|
+
originating_party_name
|
|
320
|
+
ultimate_originating_party_name
|
|
321
|
+
ultimate_originating_party_identifier
|
|
322
|
+
ultimate_receiving_party_name
|
|
323
|
+
ultimate_receiving_party_identifier
|
|
324
|
+
send_remittance_advice
|
|
325
|
+
expires_at
|
|
326
|
+
receiving_account
|
|
327
|
+
counterparty_id
|
|
328
|
+
ledger_transaction_id
|
|
329
|
+
compliance_rule_metadata
|
|
330
|
+
vendor_failure_reason
|
|
331
|
+
decision_id
|
|
332
|
+
]
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
def initialize(id = nil, object = nil, live_mode = nil, created_at = nil,
|
|
336
|
+
updated_at = nil, type = nil, subtype = nil, amount = nil,
|
|
337
|
+
direction = nil, priority = nil,
|
|
338
|
+
originating_account_id = nil, receiving_account_id = nil,
|
|
339
|
+
accounting = nil, accounting_category_id = nil,
|
|
340
|
+
accounting_ledger_class_id = nil, currency = nil,
|
|
341
|
+
effective_date = nil, description = nil,
|
|
342
|
+
statement_descriptor = nil, remittance_information = nil,
|
|
343
|
+
purpose = nil, metadata = nil, charge_bearer = nil,
|
|
344
|
+
foreign_exchange_indicator = nil,
|
|
345
|
+
foreign_exchange_contract = nil, nsf_protected = nil,
|
|
346
|
+
originating_party_name = nil,
|
|
347
|
+
ultimate_originating_party_name = nil,
|
|
348
|
+
ultimate_originating_party_identifier = nil,
|
|
349
|
+
ultimate_receiving_party_name = nil,
|
|
350
|
+
ultimate_receiving_party_identifier = nil,
|
|
351
|
+
send_remittance_advice = nil, expires_at = nil, status = nil,
|
|
352
|
+
receiving_account = nil, receiving_account_type = nil,
|
|
353
|
+
counterparty_id = nil, transaction_ids = nil,
|
|
354
|
+
ledger_transaction_id = nil, current_return = nil,
|
|
355
|
+
transaction_monitoring_enabled = nil,
|
|
356
|
+
compliance_rule_metadata = nil, reference_numbers = nil,
|
|
357
|
+
vendor_failure_reason = nil, decision_id = nil)
|
|
358
|
+
@id = id
|
|
359
|
+
@object = object
|
|
360
|
+
@live_mode = live_mode
|
|
361
|
+
@created_at = created_at
|
|
362
|
+
@updated_at = updated_at
|
|
363
|
+
@type = type
|
|
364
|
+
@subtype = subtype
|
|
365
|
+
@amount = amount
|
|
366
|
+
@direction = direction
|
|
367
|
+
@priority = priority
|
|
368
|
+
@originating_account_id = originating_account_id
|
|
369
|
+
@receiving_account_id = receiving_account_id
|
|
370
|
+
@accounting = accounting
|
|
371
|
+
@accounting_category_id = accounting_category_id
|
|
372
|
+
@accounting_ledger_class_id = accounting_ledger_class_id
|
|
373
|
+
@currency = currency
|
|
374
|
+
@effective_date = effective_date
|
|
375
|
+
@description = description
|
|
376
|
+
@statement_descriptor = statement_descriptor
|
|
377
|
+
@remittance_information = remittance_information
|
|
378
|
+
@purpose = purpose
|
|
379
|
+
@metadata = metadata
|
|
380
|
+
@charge_bearer = charge_bearer
|
|
381
|
+
@foreign_exchange_indicator = foreign_exchange_indicator
|
|
382
|
+
@foreign_exchange_contract = foreign_exchange_contract
|
|
383
|
+
@nsf_protected = nsf_protected
|
|
384
|
+
@originating_party_name = originating_party_name
|
|
385
|
+
@ultimate_originating_party_name = ultimate_originating_party_name
|
|
386
|
+
@ultimate_originating_party_identifier = ultimate_originating_party_identifier
|
|
387
|
+
@ultimate_receiving_party_name = ultimate_receiving_party_name
|
|
388
|
+
@ultimate_receiving_party_identifier = ultimate_receiving_party_identifier
|
|
389
|
+
@send_remittance_advice = send_remittance_advice
|
|
390
|
+
@expires_at = expires_at
|
|
391
|
+
@status = status
|
|
392
|
+
@receiving_account = receiving_account
|
|
393
|
+
@receiving_account_type = receiving_account_type
|
|
394
|
+
@counterparty_id = counterparty_id
|
|
395
|
+
@transaction_ids = transaction_ids
|
|
396
|
+
@ledger_transaction_id = ledger_transaction_id
|
|
397
|
+
@current_return = current_return
|
|
398
|
+
@transaction_monitoring_enabled = transaction_monitoring_enabled
|
|
399
|
+
@compliance_rule_metadata = compliance_rule_metadata
|
|
400
|
+
@reference_numbers = reference_numbers
|
|
401
|
+
@vendor_failure_reason = vendor_failure_reason
|
|
402
|
+
@decision_id = decision_id
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# Creates an instance of the object from a hash.
|
|
406
|
+
def self.from_hash(hash)
|
|
407
|
+
return nil unless hash
|
|
408
|
+
|
|
409
|
+
# Extract variables from the hash.
|
|
410
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
411
|
+
object = hash.key?('object') ? hash['object'] : nil
|
|
412
|
+
live_mode = hash.key?('live_mode') ? hash['live_mode'] : nil
|
|
413
|
+
created_at = if hash.key?('created_at')
|
|
414
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
|
415
|
+
end
|
|
416
|
+
updated_at = if hash.key?('updated_at')
|
|
417
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
|
418
|
+
end
|
|
419
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
420
|
+
subtype = hash.key?('subtype') ? hash['subtype'] : nil
|
|
421
|
+
amount = hash.key?('amount') ? hash['amount'] : nil
|
|
422
|
+
direction = hash.key?('direction') ? hash['direction'] : nil
|
|
423
|
+
priority = hash.key?('priority') ? hash['priority'] : nil
|
|
424
|
+
originating_account_id =
|
|
425
|
+
hash.key?('originating_account_id') ? hash['originating_account_id'] : nil
|
|
426
|
+
receiving_account_id =
|
|
427
|
+
hash.key?('receiving_account_id') ? hash['receiving_account_id'] : nil
|
|
428
|
+
accounting = Accounting.from_hash(hash['accounting']) if hash['accounting']
|
|
429
|
+
accounting_category_id =
|
|
430
|
+
hash.key?('accounting_category_id') ? hash['accounting_category_id'] : nil
|
|
431
|
+
accounting_ledger_class_id =
|
|
432
|
+
hash.key?('accounting_ledger_class_id') ? hash['accounting_ledger_class_id'] : nil
|
|
433
|
+
currency = hash.key?('currency') ? hash['currency'] : nil
|
|
434
|
+
effective_date =
|
|
435
|
+
hash.key?('effective_date') ? hash['effective_date'] : nil
|
|
436
|
+
description = hash.key?('description') ? hash['description'] : nil
|
|
437
|
+
statement_descriptor =
|
|
438
|
+
hash.key?('statement_descriptor') ? hash['statement_descriptor'] : nil
|
|
439
|
+
remittance_information =
|
|
440
|
+
hash.key?('remittance_information') ? hash['remittance_information'] : nil
|
|
441
|
+
purpose = hash.key?('purpose') ? hash['purpose'] : nil
|
|
442
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : nil
|
|
443
|
+
charge_bearer = hash.key?('charge_bearer') ? hash['charge_bearer'] : nil
|
|
444
|
+
foreign_exchange_indicator =
|
|
445
|
+
hash.key?('foreign_exchange_indicator') ? hash['foreign_exchange_indicator'] : nil
|
|
446
|
+
foreign_exchange_contract =
|
|
447
|
+
hash.key?('foreign_exchange_contract') ? hash['foreign_exchange_contract'] : nil
|
|
448
|
+
nsf_protected = hash.key?('nsf_protected') ? hash['nsf_protected'] : nil
|
|
449
|
+
originating_party_name =
|
|
450
|
+
hash.key?('originating_party_name') ? hash['originating_party_name'] : nil
|
|
451
|
+
ultimate_originating_party_name =
|
|
452
|
+
hash.key?('ultimate_originating_party_name') ? hash['ultimate_originating_party_name'] : nil
|
|
453
|
+
ultimate_originating_party_identifier =
|
|
454
|
+
hash.key?('ultimate_originating_party_identifier') ? hash['ultimate_originating_party_identifier'] : nil
|
|
455
|
+
ultimate_receiving_party_name =
|
|
456
|
+
hash.key?('ultimate_receiving_party_name') ? hash['ultimate_receiving_party_name'] : nil
|
|
457
|
+
ultimate_receiving_party_identifier =
|
|
458
|
+
hash.key?('ultimate_receiving_party_identifier') ? hash['ultimate_receiving_party_identifier'] : nil
|
|
459
|
+
send_remittance_advice =
|
|
460
|
+
hash.key?('send_remittance_advice') ? hash['send_remittance_advice'] : nil
|
|
461
|
+
expires_at = if hash.key?('expires_at')
|
|
462
|
+
(DateTimeHelper.from_rfc3339(hash['expires_at']) if hash['expires_at'])
|
|
463
|
+
end
|
|
464
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
465
|
+
receiving_account = hash.key?('receiving_account') ? APIHelper.deserialize_union_type(
|
|
466
|
+
UnionTypeLookUp.get(:PaymentOrderReceivingAccount), hash['receiving_account']
|
|
467
|
+
) : nil
|
|
468
|
+
receiving_account_type =
|
|
469
|
+
hash.key?('receiving_account_type') ? hash['receiving_account_type'] : nil
|
|
470
|
+
counterparty_id =
|
|
471
|
+
hash.key?('counterparty_id') ? hash['counterparty_id'] : nil
|
|
472
|
+
transaction_ids =
|
|
473
|
+
hash.key?('transaction_ids') ? hash['transaction_ids'] : nil
|
|
474
|
+
ledger_transaction_id =
|
|
475
|
+
hash.key?('ledger_transaction_id') ? hash['ledger_transaction_id'] : nil
|
|
476
|
+
current_return = Return.from_hash(hash['current_return']) if hash['current_return']
|
|
477
|
+
transaction_monitoring_enabled =
|
|
478
|
+
hash.key?('transaction_monitoring_enabled') ? hash['transaction_monitoring_enabled'] : nil
|
|
479
|
+
compliance_rule_metadata =
|
|
480
|
+
hash.key?('compliance_rule_metadata') ? hash['compliance_rule_metadata'] : nil
|
|
481
|
+
# Parameter is an array, so we need to iterate through it
|
|
482
|
+
reference_numbers = nil
|
|
483
|
+
unless hash['reference_numbers'].nil?
|
|
484
|
+
reference_numbers = []
|
|
485
|
+
hash['reference_numbers'].each do |structure|
|
|
486
|
+
reference_numbers << (PaymentReference.from_hash(structure) if structure)
|
|
487
|
+
end
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
reference_numbers = nil unless hash.key?('reference_numbers')
|
|
491
|
+
vendor_failure_reason =
|
|
492
|
+
hash.key?('vendor_failure_reason') ? hash['vendor_failure_reason'] : nil
|
|
493
|
+
decision_id = hash.key?('decision_id') ? hash['decision_id'] : nil
|
|
494
|
+
|
|
495
|
+
# Create object from extracted values.
|
|
496
|
+
PaymentOrder.new(id,
|
|
497
|
+
object,
|
|
498
|
+
live_mode,
|
|
499
|
+
created_at,
|
|
500
|
+
updated_at,
|
|
501
|
+
type,
|
|
502
|
+
subtype,
|
|
503
|
+
amount,
|
|
504
|
+
direction,
|
|
505
|
+
priority,
|
|
506
|
+
originating_account_id,
|
|
507
|
+
receiving_account_id,
|
|
508
|
+
accounting,
|
|
509
|
+
accounting_category_id,
|
|
510
|
+
accounting_ledger_class_id,
|
|
511
|
+
currency,
|
|
512
|
+
effective_date,
|
|
513
|
+
description,
|
|
514
|
+
statement_descriptor,
|
|
515
|
+
remittance_information,
|
|
516
|
+
purpose,
|
|
517
|
+
metadata,
|
|
518
|
+
charge_bearer,
|
|
519
|
+
foreign_exchange_indicator,
|
|
520
|
+
foreign_exchange_contract,
|
|
521
|
+
nsf_protected,
|
|
522
|
+
originating_party_name,
|
|
523
|
+
ultimate_originating_party_name,
|
|
524
|
+
ultimate_originating_party_identifier,
|
|
525
|
+
ultimate_receiving_party_name,
|
|
526
|
+
ultimate_receiving_party_identifier,
|
|
527
|
+
send_remittance_advice,
|
|
528
|
+
expires_at,
|
|
529
|
+
status,
|
|
530
|
+
receiving_account,
|
|
531
|
+
receiving_account_type,
|
|
532
|
+
counterparty_id,
|
|
533
|
+
transaction_ids,
|
|
534
|
+
ledger_transaction_id,
|
|
535
|
+
current_return,
|
|
536
|
+
transaction_monitoring_enabled,
|
|
537
|
+
compliance_rule_metadata,
|
|
538
|
+
reference_numbers,
|
|
539
|
+
vendor_failure_reason,
|
|
540
|
+
decision_id)
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
def to_custom_created_at
|
|
544
|
+
DateTimeHelper.to_rfc3339(created_at)
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
def to_custom_updated_at
|
|
548
|
+
DateTimeHelper.to_rfc3339(updated_at)
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
def to_custom_expires_at
|
|
552
|
+
DateTimeHelper.to_rfc3339(expires_at)
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
# Validates an instance of the object from a given value.
|
|
556
|
+
# @param [PaymentOrder | Hash] The value against the validation is performed.
|
|
557
|
+
def self.validate(value)
|
|
558
|
+
if value.instance_of? self
|
|
559
|
+
return (
|
|
560
|
+
APIHelper.valid_type?(value.id,
|
|
561
|
+
->(val) { val.instance_of? String }) and
|
|
562
|
+
APIHelper.valid_type?(value.object,
|
|
563
|
+
->(val) { val.instance_of? String }) and
|
|
564
|
+
APIHelper.valid_type?(value.live_mode,
|
|
565
|
+
->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and
|
|
566
|
+
APIHelper.valid_type?(value.created_at,
|
|
567
|
+
->(val) { val.instance_of? DateTime }) and
|
|
568
|
+
APIHelper.valid_type?(value.updated_at,
|
|
569
|
+
->(val) { val.instance_of? DateTime }) and
|
|
570
|
+
APIHelper.valid_type?(value.type,
|
|
571
|
+
->(val) { Type5Enum.validate(val) }) and
|
|
572
|
+
APIHelper.valid_type?(value.subtype,
|
|
573
|
+
->(val) { SubtypeEnum.validate(val) }) and
|
|
574
|
+
APIHelper.valid_type?(value.amount,
|
|
575
|
+
->(val) { val.instance_of? Integer }) and
|
|
576
|
+
APIHelper.valid_type?(value.direction,
|
|
577
|
+
->(val) { Direction5Enum.validate(val) }) and
|
|
578
|
+
APIHelper.valid_type?(value.priority,
|
|
579
|
+
->(val) { PriorityEnum.validate(val) }) and
|
|
580
|
+
APIHelper.valid_type?(value.originating_account_id,
|
|
581
|
+
->(val) { val.instance_of? String }) and
|
|
582
|
+
APIHelper.valid_type?(value.receiving_account_id,
|
|
583
|
+
->(val) { val.instance_of? String }) and
|
|
584
|
+
APIHelper.valid_type?(value.accounting,
|
|
585
|
+
->(val) { Accounting.validate(val) },
|
|
586
|
+
is_model_hash: true) and
|
|
587
|
+
APIHelper.valid_type?(value.accounting_category_id,
|
|
588
|
+
->(val) { val.instance_of? String }) and
|
|
589
|
+
APIHelper.valid_type?(value.accounting_ledger_class_id,
|
|
590
|
+
->(val) { val.instance_of? String }) and
|
|
591
|
+
APIHelper.valid_type?(value.currency,
|
|
592
|
+
->(val) { CurrencyEnum.validate(val) }) and
|
|
593
|
+
APIHelper.valid_type?(value.effective_date,
|
|
594
|
+
->(val) { val.instance_of? String }) and
|
|
595
|
+
APIHelper.valid_type?(value.description,
|
|
596
|
+
->(val) { val.instance_of? String }) and
|
|
597
|
+
APIHelper.valid_type?(value.statement_descriptor,
|
|
598
|
+
->(val) { val.instance_of? String }) and
|
|
599
|
+
APIHelper.valid_type?(value.remittance_information,
|
|
600
|
+
->(val) { val.instance_of? String }) and
|
|
601
|
+
APIHelper.valid_type?(value.purpose,
|
|
602
|
+
->(val) { val.instance_of? String }) and
|
|
603
|
+
APIHelper.valid_type?(value.metadata,
|
|
604
|
+
->(val) { val.instance_of? String }) and
|
|
605
|
+
APIHelper.valid_type?(value.charge_bearer,
|
|
606
|
+
->(val) { ChargeBearerEnum.validate(val) }) and
|
|
607
|
+
APIHelper.valid_type?(value.foreign_exchange_indicator,
|
|
608
|
+
->(val) { ForeignExchangeIndicatorEnum.validate(val) }) and
|
|
609
|
+
APIHelper.valid_type?(value.foreign_exchange_contract,
|
|
610
|
+
->(val) { val.instance_of? String }) and
|
|
611
|
+
APIHelper.valid_type?(value.nsf_protected,
|
|
612
|
+
->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and
|
|
613
|
+
APIHelper.valid_type?(value.originating_party_name,
|
|
614
|
+
->(val) { val.instance_of? String }) and
|
|
615
|
+
APIHelper.valid_type?(value.ultimate_originating_party_name,
|
|
616
|
+
->(val) { val.instance_of? String }) and
|
|
617
|
+
APIHelper.valid_type?(value.ultimate_originating_party_identifier,
|
|
618
|
+
->(val) { val.instance_of? String }) and
|
|
619
|
+
APIHelper.valid_type?(value.ultimate_receiving_party_name,
|
|
620
|
+
->(val) { val.instance_of? String }) and
|
|
621
|
+
APIHelper.valid_type?(value.ultimate_receiving_party_identifier,
|
|
622
|
+
->(val) { val.instance_of? String }) and
|
|
623
|
+
APIHelper.valid_type?(value.send_remittance_advice,
|
|
624
|
+
->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and
|
|
625
|
+
APIHelper.valid_type?(value.expires_at,
|
|
626
|
+
->(val) { val.instance_of? DateTime }) and
|
|
627
|
+
APIHelper.valid_type?(value.status,
|
|
628
|
+
->(val) { Status3Enum.validate(val) }) and
|
|
629
|
+
UnionTypeLookUp.get(:PaymentOrderReceivingAccount)
|
|
630
|
+
.validate(value.receiving_account) and
|
|
631
|
+
APIHelper.valid_type?(value.receiving_account_type,
|
|
632
|
+
->(val) { ReceivingAccountTypeEnum.validate(val) }) and
|
|
633
|
+
APIHelper.valid_type?(value.counterparty_id,
|
|
634
|
+
->(val) { val.instance_of? String }) and
|
|
635
|
+
APIHelper.valid_type?(value.transaction_ids,
|
|
636
|
+
->(val) { val.instance_of? String }) and
|
|
637
|
+
APIHelper.valid_type?(value.ledger_transaction_id,
|
|
638
|
+
->(val) { val.instance_of? String }) and
|
|
639
|
+
APIHelper.valid_type?(value.current_return,
|
|
640
|
+
->(val) { Return.validate(val) },
|
|
641
|
+
is_model_hash: true) and
|
|
642
|
+
APIHelper.valid_type?(value.transaction_monitoring_enabled,
|
|
643
|
+
->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and
|
|
644
|
+
APIHelper.valid_type?(value.compliance_rule_metadata,
|
|
645
|
+
->(val) { val.instance_of? Object }) and
|
|
646
|
+
APIHelper.valid_type?(value.reference_numbers,
|
|
647
|
+
->(val) { PaymentReference.validate(val) },
|
|
648
|
+
is_model_hash: true,
|
|
649
|
+
is_inner_model_hash: true) and
|
|
650
|
+
APIHelper.valid_type?(value.vendor_failure_reason,
|
|
651
|
+
->(val) { val.instance_of? String }) and
|
|
652
|
+
APIHelper.valid_type?(value.decision_id,
|
|
653
|
+
->(val) { val.instance_of? String })
|
|
654
|
+
)
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
return false unless value.instance_of? Hash
|
|
658
|
+
|
|
659
|
+
(
|
|
660
|
+
APIHelper.valid_type?(value['id'],
|
|
661
|
+
->(val) { val.instance_of? String }) and
|
|
662
|
+
APIHelper.valid_type?(value['object'],
|
|
663
|
+
->(val) { val.instance_of? String }) and
|
|
664
|
+
APIHelper.valid_type?(value['live_mode'],
|
|
665
|
+
->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and
|
|
666
|
+
APIHelper.valid_type?(value['created_at'],
|
|
667
|
+
->(val) { val.instance_of? String }) and
|
|
668
|
+
APIHelper.valid_type?(value['updated_at'],
|
|
669
|
+
->(val) { val.instance_of? String }) and
|
|
670
|
+
APIHelper.valid_type?(value['type'],
|
|
671
|
+
->(val) { Type5Enum.validate(val) }) and
|
|
672
|
+
APIHelper.valid_type?(value['subtype'],
|
|
673
|
+
->(val) { SubtypeEnum.validate(val) }) and
|
|
674
|
+
APIHelper.valid_type?(value['amount'],
|
|
675
|
+
->(val) { val.instance_of? Integer }) and
|
|
676
|
+
APIHelper.valid_type?(value['direction'],
|
|
677
|
+
->(val) { Direction5Enum.validate(val) }) and
|
|
678
|
+
APIHelper.valid_type?(value['priority'],
|
|
679
|
+
->(val) { PriorityEnum.validate(val) }) and
|
|
680
|
+
APIHelper.valid_type?(value['originating_account_id'],
|
|
681
|
+
->(val) { val.instance_of? String }) and
|
|
682
|
+
APIHelper.valid_type?(value['receiving_account_id'],
|
|
683
|
+
->(val) { val.instance_of? String }) and
|
|
684
|
+
APIHelper.valid_type?(value['accounting'],
|
|
685
|
+
->(val) { Accounting.validate(val) },
|
|
686
|
+
is_model_hash: true) and
|
|
687
|
+
APIHelper.valid_type?(value['accounting_category_id'],
|
|
688
|
+
->(val) { val.instance_of? String }) and
|
|
689
|
+
APIHelper.valid_type?(value['accounting_ledger_class_id'],
|
|
690
|
+
->(val) { val.instance_of? String }) and
|
|
691
|
+
APIHelper.valid_type?(value['currency'],
|
|
692
|
+
->(val) { CurrencyEnum.validate(val) }) and
|
|
693
|
+
APIHelper.valid_type?(value['effective_date'],
|
|
694
|
+
->(val) { val.instance_of? String }) and
|
|
695
|
+
APIHelper.valid_type?(value['description'],
|
|
696
|
+
->(val) { val.instance_of? String }) and
|
|
697
|
+
APIHelper.valid_type?(value['statement_descriptor'],
|
|
698
|
+
->(val) { val.instance_of? String }) and
|
|
699
|
+
APIHelper.valid_type?(value['remittance_information'],
|
|
700
|
+
->(val) { val.instance_of? String }) and
|
|
701
|
+
APIHelper.valid_type?(value['purpose'],
|
|
702
|
+
->(val) { val.instance_of? String }) and
|
|
703
|
+
APIHelper.valid_type?(value['metadata'],
|
|
704
|
+
->(val) { val.instance_of? String }) and
|
|
705
|
+
APIHelper.valid_type?(value['charge_bearer'],
|
|
706
|
+
->(val) { ChargeBearerEnum.validate(val) }) and
|
|
707
|
+
APIHelper.valid_type?(value['foreign_exchange_indicator'],
|
|
708
|
+
->(val) { ForeignExchangeIndicatorEnum.validate(val) }) and
|
|
709
|
+
APIHelper.valid_type?(value['foreign_exchange_contract'],
|
|
710
|
+
->(val) { val.instance_of? String }) and
|
|
711
|
+
APIHelper.valid_type?(value['nsf_protected'],
|
|
712
|
+
->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and
|
|
713
|
+
APIHelper.valid_type?(value['originating_party_name'],
|
|
714
|
+
->(val) { val.instance_of? String }) and
|
|
715
|
+
APIHelper.valid_type?(value['ultimate_originating_party_name'],
|
|
716
|
+
->(val) { val.instance_of? String }) and
|
|
717
|
+
APIHelper.valid_type?(value['ultimate_originating_party_identifier'],
|
|
718
|
+
->(val) { val.instance_of? String }) and
|
|
719
|
+
APIHelper.valid_type?(value['ultimate_receiving_party_name'],
|
|
720
|
+
->(val) { val.instance_of? String }) and
|
|
721
|
+
APIHelper.valid_type?(value['ultimate_receiving_party_identifier'],
|
|
722
|
+
->(val) { val.instance_of? String }) and
|
|
723
|
+
APIHelper.valid_type?(value['send_remittance_advice'],
|
|
724
|
+
->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and
|
|
725
|
+
APIHelper.valid_type?(value['expires_at'],
|
|
726
|
+
->(val) { val.instance_of? String }) and
|
|
727
|
+
APIHelper.valid_type?(value['status'],
|
|
728
|
+
->(val) { Status3Enum.validate(val) }) and
|
|
729
|
+
UnionTypeLookUp.get(:PaymentOrderReceivingAccount)
|
|
730
|
+
.validate(value['receiving_account']) and
|
|
731
|
+
APIHelper.valid_type?(value['receiving_account_type'],
|
|
732
|
+
->(val) { ReceivingAccountTypeEnum.validate(val) }) and
|
|
733
|
+
APIHelper.valid_type?(value['counterparty_id'],
|
|
734
|
+
->(val) { val.instance_of? String }) and
|
|
735
|
+
APIHelper.valid_type?(value['transaction_ids'],
|
|
736
|
+
->(val) { val.instance_of? String }) and
|
|
737
|
+
APIHelper.valid_type?(value['ledger_transaction_id'],
|
|
738
|
+
->(val) { val.instance_of? String }) and
|
|
739
|
+
APIHelper.valid_type?(value['current_return'],
|
|
740
|
+
->(val) { Return.validate(val) },
|
|
741
|
+
is_model_hash: true) and
|
|
742
|
+
APIHelper.valid_type?(value['transaction_monitoring_enabled'],
|
|
743
|
+
->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and
|
|
744
|
+
APIHelper.valid_type?(value['compliance_rule_metadata'],
|
|
745
|
+
->(val) { val.instance_of? Object }) and
|
|
746
|
+
APIHelper.valid_type?(value['reference_numbers'],
|
|
747
|
+
->(val) { PaymentReference.validate(val) },
|
|
748
|
+
is_model_hash: true,
|
|
749
|
+
is_inner_model_hash: true) and
|
|
750
|
+
APIHelper.valid_type?(value['vendor_failure_reason'],
|
|
751
|
+
->(val) { val.instance_of? String }) and
|
|
752
|
+
APIHelper.valid_type?(value['decision_id'],
|
|
753
|
+
->(val) { val.instance_of? String })
|
|
754
|
+
)
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
# Provides a human-readable string representation of the object.
|
|
758
|
+
def to_s
|
|
759
|
+
class_name = self.class.name.split('::').last
|
|
760
|
+
"<#{class_name} id: #{@id}, object: #{@object}, live_mode: #{@live_mode}, created_at:"\
|
|
761
|
+
" #{@created_at}, updated_at: #{@updated_at}, type: #{@type}, subtype: #{@subtype}, amount:"\
|
|
762
|
+
" #{@amount}, direction: #{@direction}, priority: #{@priority}, originating_account_id:"\
|
|
763
|
+
" #{@originating_account_id}, receiving_account_id: #{@receiving_account_id}, accounting:"\
|
|
764
|
+
" #{@accounting}, accounting_category_id: #{@accounting_category_id},"\
|
|
765
|
+
" accounting_ledger_class_id: #{@accounting_ledger_class_id}, currency: #{@currency},"\
|
|
766
|
+
" effective_date: #{@effective_date}, description: #{@description}, statement_descriptor:"\
|
|
767
|
+
" #{@statement_descriptor}, remittance_information: #{@remittance_information}, purpose:"\
|
|
768
|
+
" #{@purpose}, metadata: #{@metadata}, charge_bearer: #{@charge_bearer},"\
|
|
769
|
+
" foreign_exchange_indicator: #{@foreign_exchange_indicator}, foreign_exchange_contract:"\
|
|
770
|
+
" #{@foreign_exchange_contract}, nsf_protected: #{@nsf_protected}, originating_party_name:"\
|
|
771
|
+
" #{@originating_party_name}, ultimate_originating_party_name:"\
|
|
772
|
+
" #{@ultimate_originating_party_name}, ultimate_originating_party_identifier:"\
|
|
773
|
+
" #{@ultimate_originating_party_identifier}, ultimate_receiving_party_name:"\
|
|
774
|
+
" #{@ultimate_receiving_party_name}, ultimate_receiving_party_identifier:"\
|
|
775
|
+
" #{@ultimate_receiving_party_identifier}, send_remittance_advice:"\
|
|
776
|
+
" #{@send_remittance_advice}, expires_at: #{@expires_at}, status: #{@status},"\
|
|
777
|
+
" receiving_account: #{@receiving_account}, receiving_account_type:"\
|
|
778
|
+
" #{@receiving_account_type}, counterparty_id: #{@counterparty_id}, transaction_ids:"\
|
|
779
|
+
" #{@transaction_ids}, ledger_transaction_id: #{@ledger_transaction_id}, current_return:"\
|
|
780
|
+
" #{@current_return}, transaction_monitoring_enabled: #{@transaction_monitoring_enabled},"\
|
|
781
|
+
" compliance_rule_metadata: #{@compliance_rule_metadata}, reference_numbers:"\
|
|
782
|
+
" #{@reference_numbers}, vendor_failure_reason: #{@vendor_failure_reason}, decision_id:"\
|
|
783
|
+
" #{@decision_id}>"
|
|
784
|
+
end
|
|
785
|
+
|
|
786
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
787
|
+
def inspect
|
|
788
|
+
class_name = self.class.name.split('::').last
|
|
789
|
+
"<#{class_name} id: #{@id.inspect}, object: #{@object.inspect}, live_mode:"\
|
|
790
|
+
" #{@live_mode.inspect}, created_at: #{@created_at.inspect}, updated_at:"\
|
|
791
|
+
" #{@updated_at.inspect}, type: #{@type.inspect}, subtype: #{@subtype.inspect}, amount:"\
|
|
792
|
+
" #{@amount.inspect}, direction: #{@direction.inspect}, priority: #{@priority.inspect},"\
|
|
793
|
+
" originating_account_id: #{@originating_account_id.inspect}, receiving_account_id:"\
|
|
794
|
+
" #{@receiving_account_id.inspect}, accounting: #{@accounting.inspect},"\
|
|
795
|
+
" accounting_category_id: #{@accounting_category_id.inspect}, accounting_ledger_class_id:"\
|
|
796
|
+
" #{@accounting_ledger_class_id.inspect}, currency: #{@currency.inspect}, effective_date:"\
|
|
797
|
+
" #{@effective_date.inspect}, description: #{@description.inspect}, statement_descriptor:"\
|
|
798
|
+
" #{@statement_descriptor.inspect}, remittance_information:"\
|
|
799
|
+
" #{@remittance_information.inspect}, purpose: #{@purpose.inspect}, metadata:"\
|
|
800
|
+
" #{@metadata.inspect}, charge_bearer: #{@charge_bearer.inspect},"\
|
|
801
|
+
" foreign_exchange_indicator: #{@foreign_exchange_indicator.inspect},"\
|
|
802
|
+
" foreign_exchange_contract: #{@foreign_exchange_contract.inspect}, nsf_protected:"\
|
|
803
|
+
" #{@nsf_protected.inspect}, originating_party_name: #{@originating_party_name.inspect},"\
|
|
804
|
+
" ultimate_originating_party_name: #{@ultimate_originating_party_name.inspect},"\
|
|
805
|
+
" ultimate_originating_party_identifier: #{@ultimate_originating_party_identifier.inspect},"\
|
|
806
|
+
" ultimate_receiving_party_name: #{@ultimate_receiving_party_name.inspect},"\
|
|
807
|
+
" ultimate_receiving_party_identifier: #{@ultimate_receiving_party_identifier.inspect},"\
|
|
808
|
+
" send_remittance_advice: #{@send_remittance_advice.inspect}, expires_at:"\
|
|
809
|
+
" #{@expires_at.inspect}, status: #{@status.inspect}, receiving_account:"\
|
|
810
|
+
" #{@receiving_account.inspect}, receiving_account_type: #{@receiving_account_type.inspect},"\
|
|
811
|
+
" counterparty_id: #{@counterparty_id.inspect}, transaction_ids:"\
|
|
812
|
+
" #{@transaction_ids.inspect}, ledger_transaction_id: #{@ledger_transaction_id.inspect},"\
|
|
813
|
+
" current_return: #{@current_return.inspect}, transaction_monitoring_enabled:"\
|
|
814
|
+
" #{@transaction_monitoring_enabled.inspect}, compliance_rule_metadata:"\
|
|
815
|
+
" #{@compliance_rule_metadata.inspect}, reference_numbers: #{@reference_numbers.inspect},"\
|
|
816
|
+
" vendor_failure_reason: #{@vendor_failure_reason.inspect}, decision_id:"\
|
|
817
|
+
" #{@decision_id.inspect}>"
|
|
818
|
+
end
|
|
819
|
+
end
|
|
820
|
+
end
|