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,214 @@
|
|
|
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
|
+
# LedgerEntryOfTransactionVersion Model.
|
|
9
|
+
class LedgerEntryOfTransactionVersion < 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
|
+
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
32
|
+
# as 1000. Can be any integer up to 36 digits.
|
|
33
|
+
# @return [Integer]
|
|
34
|
+
attr_accessor :amount
|
|
35
|
+
|
|
36
|
+
# One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
37
|
+
# transaction. A `credit` moves money from your account to someone else's. A
|
|
38
|
+
# `debit` pulls money from someone else's account to your own. Note that
|
|
39
|
+
# wire, rtp, and check payments will always be `credit`.
|
|
40
|
+
# @return [Direction5Enum]
|
|
41
|
+
attr_accessor :direction
|
|
42
|
+
|
|
43
|
+
# Equal to the state of the ledger transaction when the ledger entry was
|
|
44
|
+
# created. One of `pending`, `posted`, or `archived`.
|
|
45
|
+
# @return [Status9Enum]
|
|
46
|
+
attr_accessor :status
|
|
47
|
+
|
|
48
|
+
# The ledger account that this ledger entry is associated with.
|
|
49
|
+
# @return [UUID | String]
|
|
50
|
+
attr_accessor :ledger_account_id
|
|
51
|
+
|
|
52
|
+
# Lock version of the ledger account. This can be passed when creating a
|
|
53
|
+
# ledger transaction to only succeed if no ledger transactions have posted
|
|
54
|
+
# since the given version. See our post about Designing the Ledgers API with
|
|
55
|
+
# Optimistic Locking for more details.
|
|
56
|
+
# @return [Integer]
|
|
57
|
+
attr_accessor :ledger_account_lock_version
|
|
58
|
+
|
|
59
|
+
# The currency of the ledger account.
|
|
60
|
+
# @return [String]
|
|
61
|
+
attr_accessor :ledger_account_currency
|
|
62
|
+
|
|
63
|
+
# The currency exponent of the ledger account.
|
|
64
|
+
# @return [Integer]
|
|
65
|
+
attr_accessor :ledger_account_currency_exponent
|
|
66
|
+
|
|
67
|
+
# The ledger transaction that this ledger entry is associated with.
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :ledger_transaction_id
|
|
70
|
+
|
|
71
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
72
|
+
# must be strings.
|
|
73
|
+
# @return [Hash[String, String]]
|
|
74
|
+
attr_accessor :metadata
|
|
75
|
+
|
|
76
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
77
|
+
# must be strings.
|
|
78
|
+
# @return [LedgerBalances]
|
|
79
|
+
attr_accessor :resulting_ledger_account_balances
|
|
80
|
+
|
|
81
|
+
# A mapping from model property names to API property names.
|
|
82
|
+
def self.names
|
|
83
|
+
@_hash = {} if @_hash.nil?
|
|
84
|
+
@_hash['id'] = 'id'
|
|
85
|
+
@_hash['object'] = 'object'
|
|
86
|
+
@_hash['live_mode'] = 'live_mode'
|
|
87
|
+
@_hash['created_at'] = 'created_at'
|
|
88
|
+
@_hash['amount'] = 'amount'
|
|
89
|
+
@_hash['direction'] = 'direction'
|
|
90
|
+
@_hash['status'] = 'status'
|
|
91
|
+
@_hash['ledger_account_id'] = 'ledger_account_id'
|
|
92
|
+
@_hash['ledger_account_lock_version'] = 'ledger_account_lock_version'
|
|
93
|
+
@_hash['ledger_account_currency'] = 'ledger_account_currency'
|
|
94
|
+
@_hash['ledger_account_currency_exponent'] =
|
|
95
|
+
'ledger_account_currency_exponent'
|
|
96
|
+
@_hash['ledger_transaction_id'] = 'ledger_transaction_id'
|
|
97
|
+
@_hash['metadata'] = 'metadata'
|
|
98
|
+
@_hash['resulting_ledger_account_balances'] =
|
|
99
|
+
'resulting_ledger_account_balances'
|
|
100
|
+
@_hash
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# An array for optional fields
|
|
104
|
+
def self.optionals
|
|
105
|
+
[]
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# An array for nullable fields
|
|
109
|
+
def self.nullables
|
|
110
|
+
%w[
|
|
111
|
+
ledger_account_lock_version
|
|
112
|
+
]
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def initialize(id = nil, object = nil, live_mode = nil, created_at = nil,
|
|
116
|
+
amount = nil, direction = nil, status = nil,
|
|
117
|
+
ledger_account_id = nil, ledger_account_lock_version = nil,
|
|
118
|
+
ledger_account_currency = nil,
|
|
119
|
+
ledger_account_currency_exponent = nil,
|
|
120
|
+
ledger_transaction_id = nil, metadata = nil,
|
|
121
|
+
resulting_ledger_account_balances = nil)
|
|
122
|
+
@id = id
|
|
123
|
+
@object = object
|
|
124
|
+
@live_mode = live_mode
|
|
125
|
+
@created_at = created_at
|
|
126
|
+
@amount = amount
|
|
127
|
+
@direction = direction
|
|
128
|
+
@status = status
|
|
129
|
+
@ledger_account_id = ledger_account_id
|
|
130
|
+
@ledger_account_lock_version = ledger_account_lock_version
|
|
131
|
+
@ledger_account_currency = ledger_account_currency
|
|
132
|
+
@ledger_account_currency_exponent = ledger_account_currency_exponent
|
|
133
|
+
@ledger_transaction_id = ledger_transaction_id
|
|
134
|
+
@metadata = metadata
|
|
135
|
+
@resulting_ledger_account_balances = resulting_ledger_account_balances
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Creates an instance of the object from a hash.
|
|
139
|
+
def self.from_hash(hash)
|
|
140
|
+
return nil unless hash
|
|
141
|
+
|
|
142
|
+
# Extract variables from the hash.
|
|
143
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
144
|
+
object = hash.key?('object') ? hash['object'] : nil
|
|
145
|
+
live_mode = hash.key?('live_mode') ? hash['live_mode'] : nil
|
|
146
|
+
created_at = if hash.key?('created_at')
|
|
147
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
|
148
|
+
end
|
|
149
|
+
amount = hash.key?('amount') ? hash['amount'] : nil
|
|
150
|
+
direction = hash.key?('direction') ? hash['direction'] : nil
|
|
151
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
152
|
+
ledger_account_id =
|
|
153
|
+
hash.key?('ledger_account_id') ? hash['ledger_account_id'] : nil
|
|
154
|
+
ledger_account_lock_version =
|
|
155
|
+
hash.key?('ledger_account_lock_version') ? hash['ledger_account_lock_version'] : nil
|
|
156
|
+
ledger_account_currency =
|
|
157
|
+
hash.key?('ledger_account_currency') ? hash['ledger_account_currency'] : nil
|
|
158
|
+
ledger_account_currency_exponent =
|
|
159
|
+
hash.key?('ledger_account_currency_exponent') ? hash['ledger_account_currency_exponent'] : nil
|
|
160
|
+
ledger_transaction_id =
|
|
161
|
+
hash.key?('ledger_transaction_id') ? hash['ledger_transaction_id'] : nil
|
|
162
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : nil
|
|
163
|
+
if hash['resulting_ledger_account_balances']
|
|
164
|
+
resulting_ledger_account_balances = LedgerBalances.from_hash(hash['resulting_ledger_account_balances'])
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Create object from extracted values.
|
|
168
|
+
LedgerEntryOfTransactionVersion.new(id,
|
|
169
|
+
object,
|
|
170
|
+
live_mode,
|
|
171
|
+
created_at,
|
|
172
|
+
amount,
|
|
173
|
+
direction,
|
|
174
|
+
status,
|
|
175
|
+
ledger_account_id,
|
|
176
|
+
ledger_account_lock_version,
|
|
177
|
+
ledger_account_currency,
|
|
178
|
+
ledger_account_currency_exponent,
|
|
179
|
+
ledger_transaction_id,
|
|
180
|
+
metadata,
|
|
181
|
+
resulting_ledger_account_balances)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def to_custom_created_at
|
|
185
|
+
DateTimeHelper.to_rfc3339(created_at)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Provides a human-readable string representation of the object.
|
|
189
|
+
def to_s
|
|
190
|
+
class_name = self.class.name.split('::').last
|
|
191
|
+
"<#{class_name} id: #{@id}, object: #{@object}, live_mode: #{@live_mode}, created_at:"\
|
|
192
|
+
" #{@created_at}, amount: #{@amount}, direction: #{@direction}, status: #{@status},"\
|
|
193
|
+
" ledger_account_id: #{@ledger_account_id}, ledger_account_lock_version:"\
|
|
194
|
+
" #{@ledger_account_lock_version}, ledger_account_currency: #{@ledger_account_currency},"\
|
|
195
|
+
" ledger_account_currency_exponent: #{@ledger_account_currency_exponent},"\
|
|
196
|
+
" ledger_transaction_id: #{@ledger_transaction_id}, metadata: #{@metadata},"\
|
|
197
|
+
" resulting_ledger_account_balances: #{@resulting_ledger_account_balances}>"
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
201
|
+
def inspect
|
|
202
|
+
class_name = self.class.name.split('::').last
|
|
203
|
+
"<#{class_name} id: #{@id.inspect}, object: #{@object.inspect}, live_mode:"\
|
|
204
|
+
" #{@live_mode.inspect}, created_at: #{@created_at.inspect}, amount: #{@amount.inspect},"\
|
|
205
|
+
" direction: #{@direction.inspect}, status: #{@status.inspect}, ledger_account_id:"\
|
|
206
|
+
" #{@ledger_account_id.inspect}, ledger_account_lock_version:"\
|
|
207
|
+
" #{@ledger_account_lock_version.inspect}, ledger_account_currency:"\
|
|
208
|
+
" #{@ledger_account_currency.inspect}, ledger_account_currency_exponent:"\
|
|
209
|
+
" #{@ledger_account_currency_exponent.inspect}, ledger_transaction_id:"\
|
|
210
|
+
" #{@ledger_transaction_id.inspect}, metadata: #{@metadata.inspect},"\
|
|
211
|
+
" resulting_ledger_account_balances: #{@resulting_ledger_account_balances.inspect}>"
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
@@ -0,0 +1,182 @@
|
|
|
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
|
+
# LedgerEventHandler Model.
|
|
9
|
+
class LedgerEventHandler < 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
|
+
# Name of the ledger event handler.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :name
|
|
44
|
+
|
|
45
|
+
# An optional description.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :description
|
|
48
|
+
|
|
49
|
+
# An optional description.
|
|
50
|
+
# @return [LedgerEventHandlerLedgerTransactionTemplate]
|
|
51
|
+
attr_accessor :ledger_transaction_template
|
|
52
|
+
|
|
53
|
+
# An optional description.
|
|
54
|
+
# @return [LedgerEventHandlerConditions]
|
|
55
|
+
attr_accessor :conditions
|
|
56
|
+
|
|
57
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
58
|
+
# must be strings.
|
|
59
|
+
# @return [Hash[String, String]]
|
|
60
|
+
attr_accessor :metadata
|
|
61
|
+
|
|
62
|
+
# A mapping from model property names to API property names.
|
|
63
|
+
def self.names
|
|
64
|
+
@_hash = {} if @_hash.nil?
|
|
65
|
+
@_hash['id'] = 'id'
|
|
66
|
+
@_hash['object'] = 'object'
|
|
67
|
+
@_hash['live_mode'] = 'live_mode'
|
|
68
|
+
@_hash['created_at'] = 'created_at'
|
|
69
|
+
@_hash['updated_at'] = 'updated_at'
|
|
70
|
+
@_hash['discarded_at'] = 'discarded_at'
|
|
71
|
+
@_hash['name'] = 'name'
|
|
72
|
+
@_hash['description'] = 'description'
|
|
73
|
+
@_hash['ledger_transaction_template'] = 'ledger_transaction_template'
|
|
74
|
+
@_hash['conditions'] = 'conditions'
|
|
75
|
+
@_hash['metadata'] = 'metadata'
|
|
76
|
+
@_hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# An array for optional fields
|
|
80
|
+
def self.optionals
|
|
81
|
+
[]
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# An array for nullable fields
|
|
85
|
+
def self.nullables
|
|
86
|
+
%w[
|
|
87
|
+
discarded_at
|
|
88
|
+
description
|
|
89
|
+
metadata
|
|
90
|
+
]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def initialize(id = nil, object = nil, live_mode = nil, created_at = nil,
|
|
94
|
+
updated_at = nil, discarded_at = nil, name = nil,
|
|
95
|
+
description = nil, ledger_transaction_template = nil,
|
|
96
|
+
conditions = nil, metadata = nil)
|
|
97
|
+
@id = id
|
|
98
|
+
@object = object
|
|
99
|
+
@live_mode = live_mode
|
|
100
|
+
@created_at = created_at
|
|
101
|
+
@updated_at = updated_at
|
|
102
|
+
@discarded_at = discarded_at
|
|
103
|
+
@name = name
|
|
104
|
+
@description = description
|
|
105
|
+
@ledger_transaction_template = ledger_transaction_template
|
|
106
|
+
@conditions = conditions
|
|
107
|
+
@metadata = metadata
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Creates an instance of the object from a hash.
|
|
111
|
+
def self.from_hash(hash)
|
|
112
|
+
return nil unless hash
|
|
113
|
+
|
|
114
|
+
# Extract variables from the hash.
|
|
115
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
116
|
+
object = hash.key?('object') ? hash['object'] : nil
|
|
117
|
+
live_mode = hash.key?('live_mode') ? hash['live_mode'] : nil
|
|
118
|
+
created_at = if hash.key?('created_at')
|
|
119
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
|
120
|
+
end
|
|
121
|
+
updated_at = if hash.key?('updated_at')
|
|
122
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
|
123
|
+
end
|
|
124
|
+
discarded_at = if hash.key?('discarded_at')
|
|
125
|
+
(DateTimeHelper.from_rfc3339(hash['discarded_at']) if hash['discarded_at'])
|
|
126
|
+
end
|
|
127
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
128
|
+
description = hash.key?('description') ? hash['description'] : nil
|
|
129
|
+
if hash['ledger_transaction_template']
|
|
130
|
+
ledger_transaction_template = LedgerEventHandlerLedgerTransactionTemplate.from_hash(hash['ledger_transaction_template'])
|
|
131
|
+
end
|
|
132
|
+
conditions = LedgerEventHandlerConditions.from_hash(hash['conditions']) if
|
|
133
|
+
hash['conditions']
|
|
134
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : nil
|
|
135
|
+
|
|
136
|
+
# Create object from extracted values.
|
|
137
|
+
LedgerEventHandler.new(id,
|
|
138
|
+
object,
|
|
139
|
+
live_mode,
|
|
140
|
+
created_at,
|
|
141
|
+
updated_at,
|
|
142
|
+
discarded_at,
|
|
143
|
+
name,
|
|
144
|
+
description,
|
|
145
|
+
ledger_transaction_template,
|
|
146
|
+
conditions,
|
|
147
|
+
metadata)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def to_custom_created_at
|
|
151
|
+
DateTimeHelper.to_rfc3339(created_at)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
def to_custom_updated_at
|
|
155
|
+
DateTimeHelper.to_rfc3339(updated_at)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
def to_custom_discarded_at
|
|
159
|
+
DateTimeHelper.to_rfc3339(discarded_at)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Provides a human-readable string representation of the object.
|
|
163
|
+
def to_s
|
|
164
|
+
class_name = self.class.name.split('::').last
|
|
165
|
+
"<#{class_name} id: #{@id}, object: #{@object}, live_mode: #{@live_mode}, created_at:"\
|
|
166
|
+
" #{@created_at}, updated_at: #{@updated_at}, discarded_at: #{@discarded_at}, name:"\
|
|
167
|
+
" #{@name}, description: #{@description}, ledger_transaction_template:"\
|
|
168
|
+
" #{@ledger_transaction_template}, conditions: #{@conditions}, metadata: #{@metadata}>"
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
172
|
+
def inspect
|
|
173
|
+
class_name = self.class.name.split('::').last
|
|
174
|
+
"<#{class_name} id: #{@id.inspect}, object: #{@object.inspect}, live_mode:"\
|
|
175
|
+
" #{@live_mode.inspect}, created_at: #{@created_at.inspect}, updated_at:"\
|
|
176
|
+
" #{@updated_at.inspect}, discarded_at: #{@discarded_at.inspect}, name: #{@name.inspect},"\
|
|
177
|
+
" description: #{@description.inspect}, ledger_transaction_template:"\
|
|
178
|
+
" #{@ledger_transaction_template.inspect}, conditions: #{@conditions.inspect}, metadata:"\
|
|
179
|
+
" #{@metadata.inspect}>"
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# LedgerEventHandlerConditions Model.
|
|
8
|
+
class LedgerEventHandlerConditions < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The field you're fetching from the `ledgerable_event`.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :field
|
|
15
|
+
|
|
16
|
+
# What the operator between the `field` and `value` is. Currently only
|
|
17
|
+
# supports `equals`.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :operator
|
|
20
|
+
|
|
21
|
+
# What raw string you are comparing the `field` against.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :value
|
|
24
|
+
|
|
25
|
+
# A mapping from model property names to API property names.
|
|
26
|
+
def self.names
|
|
27
|
+
@_hash = {} if @_hash.nil?
|
|
28
|
+
@_hash['field'] = 'field'
|
|
29
|
+
@_hash['operator'] = 'operator'
|
|
30
|
+
@_hash['value'] = 'value'
|
|
31
|
+
@_hash
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# An array for optional fields
|
|
35
|
+
def self.optionals
|
|
36
|
+
[]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for nullable fields
|
|
40
|
+
def self.nullables
|
|
41
|
+
[]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def initialize(field = nil, operator = nil, value = nil)
|
|
45
|
+
@field = field
|
|
46
|
+
@operator = operator
|
|
47
|
+
@value = value
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
field = hash.key?('field') ? hash['field'] : nil
|
|
56
|
+
operator = hash.key?('operator') ? hash['operator'] : nil
|
|
57
|
+
value = hash.key?('value') ? hash['value'] : nil
|
|
58
|
+
|
|
59
|
+
# Create object from extracted values.
|
|
60
|
+
LedgerEventHandlerConditions.new(field,
|
|
61
|
+
operator,
|
|
62
|
+
value)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Provides a human-readable string representation of the object.
|
|
66
|
+
def to_s
|
|
67
|
+
class_name = self.class.name.split('::').last
|
|
68
|
+
"<#{class_name} field: #{@field}, operator: #{@operator}, value: #{@value}>"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
72
|
+
def inspect
|
|
73
|
+
class_name = self.class.name.split('::').last
|
|
74
|
+
"<#{class_name} field: #{@field.inspect}, operator: #{@operator.inspect}, value:"\
|
|
75
|
+
" #{@value.inspect}>"
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# LedgerEventHandlerCreateRequest Model.
|
|
8
|
+
class LedgerEventHandlerCreateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Name of the ledger event handler.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :name
|
|
15
|
+
|
|
16
|
+
# An optional description.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :description
|
|
19
|
+
|
|
20
|
+
# The id of the ledger that this account belongs to.
|
|
21
|
+
# @return [UUID | String]
|
|
22
|
+
attr_accessor :ledger_id
|
|
23
|
+
|
|
24
|
+
# The id of the ledger that this account belongs to.
|
|
25
|
+
# @return [LedgerEventHandlerLedgerTransactionTemplate]
|
|
26
|
+
attr_accessor :ledger_transaction_template
|
|
27
|
+
|
|
28
|
+
# The id of the ledger that this account belongs to.
|
|
29
|
+
# @return [LedgerEventHandlerConditions]
|
|
30
|
+
attr_accessor :conditions
|
|
31
|
+
|
|
32
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
33
|
+
# must be strings.
|
|
34
|
+
# @return [Hash[String, String]]
|
|
35
|
+
attr_accessor :metadata
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['name'] = 'name'
|
|
41
|
+
@_hash['description'] = 'description'
|
|
42
|
+
@_hash['ledger_id'] = 'ledger_id'
|
|
43
|
+
@_hash['ledger_transaction_template'] = 'ledger_transaction_template'
|
|
44
|
+
@_hash['conditions'] = 'conditions'
|
|
45
|
+
@_hash['metadata'] = 'metadata'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
description
|
|
53
|
+
ledger_id
|
|
54
|
+
conditions
|
|
55
|
+
metadata
|
|
56
|
+
]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
%w[
|
|
62
|
+
description
|
|
63
|
+
metadata
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def initialize(name = nil, ledger_transaction_template = nil,
|
|
68
|
+
description = SKIP, ledger_id = SKIP, conditions = SKIP,
|
|
69
|
+
metadata = SKIP)
|
|
70
|
+
@name = name
|
|
71
|
+
@description = description unless description == SKIP
|
|
72
|
+
@ledger_id = ledger_id unless ledger_id == SKIP
|
|
73
|
+
@ledger_transaction_template = ledger_transaction_template
|
|
74
|
+
@conditions = conditions unless conditions == SKIP
|
|
75
|
+
@metadata = metadata unless metadata == SKIP
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Creates an instance of the object from a hash.
|
|
79
|
+
def self.from_hash(hash)
|
|
80
|
+
return nil unless hash
|
|
81
|
+
|
|
82
|
+
# Extract variables from the hash.
|
|
83
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
84
|
+
if hash['ledger_transaction_template']
|
|
85
|
+
ledger_transaction_template = LedgerEventHandlerLedgerTransactionTemplate.from_hash(hash['ledger_transaction_template'])
|
|
86
|
+
end
|
|
87
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
88
|
+
ledger_id = hash.key?('ledger_id') ? hash['ledger_id'] : SKIP
|
|
89
|
+
conditions = LedgerEventHandlerConditions.from_hash(hash['conditions']) if
|
|
90
|
+
hash['conditions']
|
|
91
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
92
|
+
|
|
93
|
+
# Create object from extracted values.
|
|
94
|
+
LedgerEventHandlerCreateRequest.new(name,
|
|
95
|
+
ledger_transaction_template,
|
|
96
|
+
description,
|
|
97
|
+
ledger_id,
|
|
98
|
+
conditions,
|
|
99
|
+
metadata)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Provides a human-readable string representation of the object.
|
|
103
|
+
def to_s
|
|
104
|
+
class_name = self.class.name.split('::').last
|
|
105
|
+
"<#{class_name} name: #{@name}, description: #{@description}, ledger_id: #{@ledger_id},"\
|
|
106
|
+
" ledger_transaction_template: #{@ledger_transaction_template}, conditions: #{@conditions},"\
|
|
107
|
+
" metadata: #{@metadata}>"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
111
|
+
def inspect
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} name: #{@name.inspect}, description: #{@description.inspect}, ledger_id:"\
|
|
114
|
+
" #{@ledger_id.inspect}, ledger_transaction_template:"\
|
|
115
|
+
" #{@ledger_transaction_template.inspect}, conditions: #{@conditions.inspect}, metadata:"\
|
|
116
|
+
" #{@metadata.inspect}>"
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# LedgerEventHandlerLedgerEntries Model.
|
|
8
|
+
class LedgerEventHandlerLedgerEntries < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The field you're fetching from the `ledgerable_event`.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :amount
|
|
15
|
+
|
|
16
|
+
# What the operator between the `field` and `value` is. Currently only
|
|
17
|
+
# supports `equals`.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :direction
|
|
20
|
+
|
|
21
|
+
# What raw string you are comparing the `field` against.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :ledger_account_id
|
|
24
|
+
|
|
25
|
+
# A mapping from model property names to API property names.
|
|
26
|
+
def self.names
|
|
27
|
+
@_hash = {} if @_hash.nil?
|
|
28
|
+
@_hash['amount'] = 'amount'
|
|
29
|
+
@_hash['direction'] = 'direction'
|
|
30
|
+
@_hash['ledger_account_id'] = 'ledger_account_id'
|
|
31
|
+
@_hash
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# An array for optional fields
|
|
35
|
+
def self.optionals
|
|
36
|
+
[]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for nullable fields
|
|
40
|
+
def self.nullables
|
|
41
|
+
[]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def initialize(amount = nil, direction = nil, ledger_account_id = nil)
|
|
45
|
+
@amount = amount
|
|
46
|
+
@direction = direction
|
|
47
|
+
@ledger_account_id = ledger_account_id
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
amount = hash.key?('amount') ? hash['amount'] : nil
|
|
56
|
+
direction = hash.key?('direction') ? hash['direction'] : nil
|
|
57
|
+
ledger_account_id =
|
|
58
|
+
hash.key?('ledger_account_id') ? hash['ledger_account_id'] : nil
|
|
59
|
+
|
|
60
|
+
# Create object from extracted values.
|
|
61
|
+
LedgerEventHandlerLedgerEntries.new(amount,
|
|
62
|
+
direction,
|
|
63
|
+
ledger_account_id)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Provides a human-readable string representation of the object.
|
|
67
|
+
def to_s
|
|
68
|
+
class_name = self.class.name.split('::').last
|
|
69
|
+
"<#{class_name} amount: #{@amount}, direction: #{@direction}, ledger_account_id:"\
|
|
70
|
+
" #{@ledger_account_id}>"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
74
|
+
def inspect
|
|
75
|
+
class_name = self.class.name.split('::').last
|
|
76
|
+
"<#{class_name} amount: #{@amount.inspect}, direction: #{@direction.inspect},"\
|
|
77
|
+
" ledger_account_id: #{@ledger_account_id.inspect}>"
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|