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,150 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# LedgerAccountCreateRequest Model.
|
|
8
|
+
class LedgerAccountCreateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The name of the ledger account.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :name
|
|
15
|
+
|
|
16
|
+
# The description of the ledger account.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :description
|
|
19
|
+
|
|
20
|
+
# The normal balance of the ledger account.
|
|
21
|
+
# @return [NormalBalanceEnum]
|
|
22
|
+
attr_accessor :normal_balance
|
|
23
|
+
|
|
24
|
+
# The id of the ledger that this account belongs to.
|
|
25
|
+
# @return [UUID | String]
|
|
26
|
+
attr_accessor :ledger_id
|
|
27
|
+
|
|
28
|
+
# The currency of the ledger account.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :currency
|
|
31
|
+
|
|
32
|
+
# The currency exponent of the ledger account.
|
|
33
|
+
# @return [Integer]
|
|
34
|
+
attr_accessor :currency_exponent
|
|
35
|
+
|
|
36
|
+
# If the ledger account links to another object in Modern Treasury, the id
|
|
37
|
+
# will be populated here, otherwise null.
|
|
38
|
+
# @return [UUID | String]
|
|
39
|
+
attr_accessor :ledgerable_id
|
|
40
|
+
|
|
41
|
+
# If the ledger account links to another object in Modern Treasury, the type
|
|
42
|
+
# will be populated here, otherwise null. The value is one of
|
|
43
|
+
# internal_account or external_account.
|
|
44
|
+
# @return [LedgerableTypeEnum]
|
|
45
|
+
attr_accessor :ledgerable_type
|
|
46
|
+
|
|
47
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
48
|
+
# must be strings.
|
|
49
|
+
# @return [Hash[String, String]]
|
|
50
|
+
attr_accessor :metadata
|
|
51
|
+
|
|
52
|
+
# A mapping from model property names to API property names.
|
|
53
|
+
def self.names
|
|
54
|
+
@_hash = {} if @_hash.nil?
|
|
55
|
+
@_hash['name'] = 'name'
|
|
56
|
+
@_hash['description'] = 'description'
|
|
57
|
+
@_hash['normal_balance'] = 'normal_balance'
|
|
58
|
+
@_hash['ledger_id'] = 'ledger_id'
|
|
59
|
+
@_hash['currency'] = 'currency'
|
|
60
|
+
@_hash['currency_exponent'] = 'currency_exponent'
|
|
61
|
+
@_hash['ledgerable_id'] = 'ledgerable_id'
|
|
62
|
+
@_hash['ledgerable_type'] = 'ledgerable_type'
|
|
63
|
+
@_hash['metadata'] = 'metadata'
|
|
64
|
+
@_hash
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# An array for optional fields
|
|
68
|
+
def self.optionals
|
|
69
|
+
%w[
|
|
70
|
+
description
|
|
71
|
+
currency_exponent
|
|
72
|
+
ledgerable_id
|
|
73
|
+
ledgerable_type
|
|
74
|
+
metadata
|
|
75
|
+
]
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# An array for nullable fields
|
|
79
|
+
def self.nullables
|
|
80
|
+
%w[
|
|
81
|
+
description
|
|
82
|
+
currency_exponent
|
|
83
|
+
]
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def initialize(name = nil, normal_balance = nil, ledger_id = nil,
|
|
87
|
+
currency = nil, description = SKIP, currency_exponent = SKIP,
|
|
88
|
+
ledgerable_id = SKIP, ledgerable_type = SKIP,
|
|
89
|
+
metadata = SKIP)
|
|
90
|
+
@name = name
|
|
91
|
+
@description = description unless description == SKIP
|
|
92
|
+
@normal_balance = normal_balance
|
|
93
|
+
@ledger_id = ledger_id
|
|
94
|
+
@currency = currency
|
|
95
|
+
@currency_exponent = currency_exponent unless currency_exponent == SKIP
|
|
96
|
+
@ledgerable_id = ledgerable_id unless ledgerable_id == SKIP
|
|
97
|
+
@ledgerable_type = ledgerable_type unless ledgerable_type == SKIP
|
|
98
|
+
@metadata = metadata unless metadata == SKIP
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Creates an instance of the object from a hash.
|
|
102
|
+
def self.from_hash(hash)
|
|
103
|
+
return nil unless hash
|
|
104
|
+
|
|
105
|
+
# Extract variables from the hash.
|
|
106
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
107
|
+
normal_balance =
|
|
108
|
+
hash.key?('normal_balance') ? hash['normal_balance'] : nil
|
|
109
|
+
ledger_id = hash.key?('ledger_id') ? hash['ledger_id'] : nil
|
|
110
|
+
currency = hash.key?('currency') ? hash['currency'] : nil
|
|
111
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
112
|
+
currency_exponent =
|
|
113
|
+
hash.key?('currency_exponent') ? hash['currency_exponent'] : SKIP
|
|
114
|
+
ledgerable_id = hash.key?('ledgerable_id') ? hash['ledgerable_id'] : SKIP
|
|
115
|
+
ledgerable_type =
|
|
116
|
+
hash.key?('ledgerable_type') ? hash['ledgerable_type'] : SKIP
|
|
117
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
118
|
+
|
|
119
|
+
# Create object from extracted values.
|
|
120
|
+
LedgerAccountCreateRequest.new(name,
|
|
121
|
+
normal_balance,
|
|
122
|
+
ledger_id,
|
|
123
|
+
currency,
|
|
124
|
+
description,
|
|
125
|
+
currency_exponent,
|
|
126
|
+
ledgerable_id,
|
|
127
|
+
ledgerable_type,
|
|
128
|
+
metadata)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Provides a human-readable string representation of the object.
|
|
132
|
+
def to_s
|
|
133
|
+
class_name = self.class.name.split('::').last
|
|
134
|
+
"<#{class_name} name: #{@name}, description: #{@description}, normal_balance:"\
|
|
135
|
+
" #{@normal_balance}, ledger_id: #{@ledger_id}, currency: #{@currency}, currency_exponent:"\
|
|
136
|
+
" #{@currency_exponent}, ledgerable_id: #{@ledgerable_id}, ledgerable_type:"\
|
|
137
|
+
" #{@ledgerable_type}, metadata: #{@metadata}>"
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
141
|
+
def inspect
|
|
142
|
+
class_name = self.class.name.split('::').last
|
|
143
|
+
"<#{class_name} name: #{@name.inspect}, description: #{@description.inspect},"\
|
|
144
|
+
" normal_balance: #{@normal_balance.inspect}, ledger_id: #{@ledger_id.inspect}, currency:"\
|
|
145
|
+
" #{@currency.inspect}, currency_exponent: #{@currency_exponent.inspect}, ledgerable_id:"\
|
|
146
|
+
" #{@ledgerable_id.inspect}, ledgerable_type: #{@ledgerable_type.inspect}, metadata:"\
|
|
147
|
+
" #{@metadata.inspect}>"
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# The normal balance of the ledger account.
|
|
8
|
+
class LedgerAccountNormalBalanceEnum
|
|
9
|
+
LEDGER_ACCOUNT_NORMAL_BALANCE_ENUM = [
|
|
10
|
+
# TODO: Write general description for CREDIT
|
|
11
|
+
CREDIT = 'credit'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for DEBIT
|
|
14
|
+
DEBIT = 'debit'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
LEDGER_ACCOUNT_NORMAL_BALANCE_ENUM.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = CREDIT)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'credit' then CREDIT
|
|
30
|
+
when 'debit' then DEBIT
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,238 @@
|
|
|
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
|
+
# LedgerAccountPayout Model.
|
|
9
|
+
class LedgerAccountPayout < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for this method
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for this method
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :object
|
|
20
|
+
|
|
21
|
+
# This field will be true if this object exists in the live environment or
|
|
22
|
+
# false if it exists in the test environment.
|
|
23
|
+
# @return [TrueClass | FalseClass]
|
|
24
|
+
attr_accessor :live_mode
|
|
25
|
+
|
|
26
|
+
# This field will be true if this object exists in the live environment or
|
|
27
|
+
# false if it exists in the test environment.
|
|
28
|
+
# @return [DateTime]
|
|
29
|
+
attr_accessor :created_at
|
|
30
|
+
|
|
31
|
+
# This field will be true if this object exists in the live environment or
|
|
32
|
+
# false if it exists in the test environment.
|
|
33
|
+
# @return [DateTime]
|
|
34
|
+
attr_accessor :updated_at
|
|
35
|
+
|
|
36
|
+
# The id of the ledger that this ledger account payout belongs to.
|
|
37
|
+
# @return [UUID | String]
|
|
38
|
+
attr_accessor :ledger_id
|
|
39
|
+
|
|
40
|
+
# The description of the ledger account payout.
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :description
|
|
43
|
+
|
|
44
|
+
# The status of the ledger account payout. One of `processing`, `pending`,
|
|
45
|
+
# `posted`, `archiving` or `archived`.
|
|
46
|
+
# @return [Status6Enum]
|
|
47
|
+
attr_accessor :status
|
|
48
|
+
|
|
49
|
+
# The id of the payout ledger account whose ledger entries are queried
|
|
50
|
+
# against, and its balance is reduced as a result.
|
|
51
|
+
# @return [UUID | String]
|
|
52
|
+
attr_accessor :payout_ledger_account_id
|
|
53
|
+
|
|
54
|
+
# The id of the funding ledger account that sends to or receives funds from
|
|
55
|
+
# the payout ledger account.
|
|
56
|
+
# @return [UUID | String]
|
|
57
|
+
attr_accessor :funding_ledger_account_id
|
|
58
|
+
|
|
59
|
+
# The exclusive upper bound of the effective_at timestamp of the ledger
|
|
60
|
+
# entries to be included in the ledger account payout. The default value is
|
|
61
|
+
# the created_at timestamp of the ledger account payout.
|
|
62
|
+
# @return [DateTime]
|
|
63
|
+
attr_accessor :effective_at_upper_bound
|
|
64
|
+
|
|
65
|
+
# The id of the ledger transaction that this payout is associated with.
|
|
66
|
+
# @return [UUID | String]
|
|
67
|
+
attr_accessor :ledger_transaction_id
|
|
68
|
+
|
|
69
|
+
# The amount of the ledger account payout.
|
|
70
|
+
# @return [Integer]
|
|
71
|
+
attr_accessor :amount
|
|
72
|
+
|
|
73
|
+
# The currency of the ledger account payout.
|
|
74
|
+
# @return [String]
|
|
75
|
+
attr_accessor :currency
|
|
76
|
+
|
|
77
|
+
# The currency exponent of the ledger account payout.
|
|
78
|
+
# @return [Integer]
|
|
79
|
+
attr_accessor :currency_exponent
|
|
80
|
+
|
|
81
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
82
|
+
# must be strings.
|
|
83
|
+
# @return [Hash[String, String]]
|
|
84
|
+
attr_accessor :metadata
|
|
85
|
+
|
|
86
|
+
# A mapping from model property names to API property names.
|
|
87
|
+
def self.names
|
|
88
|
+
@_hash = {} if @_hash.nil?
|
|
89
|
+
@_hash['id'] = 'id'
|
|
90
|
+
@_hash['object'] = 'object'
|
|
91
|
+
@_hash['live_mode'] = 'live_mode'
|
|
92
|
+
@_hash['created_at'] = 'created_at'
|
|
93
|
+
@_hash['updated_at'] = 'updated_at'
|
|
94
|
+
@_hash['ledger_id'] = 'ledger_id'
|
|
95
|
+
@_hash['description'] = 'description'
|
|
96
|
+
@_hash['status'] = 'status'
|
|
97
|
+
@_hash['payout_ledger_account_id'] = 'payout_ledger_account_id'
|
|
98
|
+
@_hash['funding_ledger_account_id'] = 'funding_ledger_account_id'
|
|
99
|
+
@_hash['effective_at_upper_bound'] = 'effective_at_upper_bound'
|
|
100
|
+
@_hash['ledger_transaction_id'] = 'ledger_transaction_id'
|
|
101
|
+
@_hash['amount'] = 'amount'
|
|
102
|
+
@_hash['currency'] = 'currency'
|
|
103
|
+
@_hash['currency_exponent'] = 'currency_exponent'
|
|
104
|
+
@_hash['metadata'] = 'metadata'
|
|
105
|
+
@_hash
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# An array for optional fields
|
|
109
|
+
def self.optionals
|
|
110
|
+
[]
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# An array for nullable fields
|
|
114
|
+
def self.nullables
|
|
115
|
+
%w[
|
|
116
|
+
description
|
|
117
|
+
ledger_transaction_id
|
|
118
|
+
amount
|
|
119
|
+
currency_exponent
|
|
120
|
+
]
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def initialize(id = nil, object = nil, live_mode = nil, created_at = nil,
|
|
124
|
+
updated_at = nil, ledger_id = nil, description = nil,
|
|
125
|
+
status = nil, payout_ledger_account_id = nil,
|
|
126
|
+
funding_ledger_account_id = nil,
|
|
127
|
+
effective_at_upper_bound = nil, ledger_transaction_id = nil,
|
|
128
|
+
amount = nil, currency = nil, currency_exponent = nil,
|
|
129
|
+
metadata = nil)
|
|
130
|
+
@id = id
|
|
131
|
+
@object = object
|
|
132
|
+
@live_mode = live_mode
|
|
133
|
+
@created_at = created_at
|
|
134
|
+
@updated_at = updated_at
|
|
135
|
+
@ledger_id = ledger_id
|
|
136
|
+
@description = description
|
|
137
|
+
@status = status
|
|
138
|
+
@payout_ledger_account_id = payout_ledger_account_id
|
|
139
|
+
@funding_ledger_account_id = funding_ledger_account_id
|
|
140
|
+
@effective_at_upper_bound = effective_at_upper_bound
|
|
141
|
+
@ledger_transaction_id = ledger_transaction_id
|
|
142
|
+
@amount = amount
|
|
143
|
+
@currency = currency
|
|
144
|
+
@currency_exponent = currency_exponent
|
|
145
|
+
@metadata = metadata
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Creates an instance of the object from a hash.
|
|
149
|
+
def self.from_hash(hash)
|
|
150
|
+
return nil unless hash
|
|
151
|
+
|
|
152
|
+
# Extract variables from the hash.
|
|
153
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
154
|
+
object = hash.key?('object') ? hash['object'] : nil
|
|
155
|
+
live_mode = hash.key?('live_mode') ? hash['live_mode'] : nil
|
|
156
|
+
created_at = if hash.key?('created_at')
|
|
157
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
|
158
|
+
end
|
|
159
|
+
updated_at = if hash.key?('updated_at')
|
|
160
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
|
161
|
+
end
|
|
162
|
+
ledger_id = hash.key?('ledger_id') ? hash['ledger_id'] : nil
|
|
163
|
+
description = hash.key?('description') ? hash['description'] : nil
|
|
164
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
165
|
+
payout_ledger_account_id =
|
|
166
|
+
hash.key?('payout_ledger_account_id') ? hash['payout_ledger_account_id'] : nil
|
|
167
|
+
funding_ledger_account_id =
|
|
168
|
+
hash.key?('funding_ledger_account_id') ? hash['funding_ledger_account_id'] : nil
|
|
169
|
+
effective_at_upper_bound = if hash.key?('effective_at_upper_bound')
|
|
170
|
+
(DateTimeHelper.from_rfc3339(hash['effective_at_upper_bound']) if hash['effective_at_upper_bound'])
|
|
171
|
+
end
|
|
172
|
+
ledger_transaction_id =
|
|
173
|
+
hash.key?('ledger_transaction_id') ? hash['ledger_transaction_id'] : nil
|
|
174
|
+
amount = hash.key?('amount') ? hash['amount'] : nil
|
|
175
|
+
currency = hash.key?('currency') ? hash['currency'] : nil
|
|
176
|
+
currency_exponent =
|
|
177
|
+
hash.key?('currency_exponent') ? hash['currency_exponent'] : nil
|
|
178
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : nil
|
|
179
|
+
|
|
180
|
+
# Create object from extracted values.
|
|
181
|
+
LedgerAccountPayout.new(id,
|
|
182
|
+
object,
|
|
183
|
+
live_mode,
|
|
184
|
+
created_at,
|
|
185
|
+
updated_at,
|
|
186
|
+
ledger_id,
|
|
187
|
+
description,
|
|
188
|
+
status,
|
|
189
|
+
payout_ledger_account_id,
|
|
190
|
+
funding_ledger_account_id,
|
|
191
|
+
effective_at_upper_bound,
|
|
192
|
+
ledger_transaction_id,
|
|
193
|
+
amount,
|
|
194
|
+
currency,
|
|
195
|
+
currency_exponent,
|
|
196
|
+
metadata)
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
def to_custom_created_at
|
|
200
|
+
DateTimeHelper.to_rfc3339(created_at)
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
def to_custom_updated_at
|
|
204
|
+
DateTimeHelper.to_rfc3339(updated_at)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def to_custom_effective_at_upper_bound
|
|
208
|
+
DateTimeHelper.to_rfc3339(effective_at_upper_bound)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Provides a human-readable string representation of the object.
|
|
212
|
+
def to_s
|
|
213
|
+
class_name = self.class.name.split('::').last
|
|
214
|
+
"<#{class_name} id: #{@id}, object: #{@object}, live_mode: #{@live_mode}, created_at:"\
|
|
215
|
+
" #{@created_at}, updated_at: #{@updated_at}, ledger_id: #{@ledger_id}, description:"\
|
|
216
|
+
" #{@description}, status: #{@status}, payout_ledger_account_id:"\
|
|
217
|
+
" #{@payout_ledger_account_id}, funding_ledger_account_id: #{@funding_ledger_account_id},"\
|
|
218
|
+
" effective_at_upper_bound: #{@effective_at_upper_bound}, ledger_transaction_id:"\
|
|
219
|
+
" #{@ledger_transaction_id}, amount: #{@amount}, currency: #{@currency}, currency_exponent:"\
|
|
220
|
+
" #{@currency_exponent}, metadata: #{@metadata}>"
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
224
|
+
def inspect
|
|
225
|
+
class_name = self.class.name.split('::').last
|
|
226
|
+
"<#{class_name} id: #{@id.inspect}, object: #{@object.inspect}, live_mode:"\
|
|
227
|
+
" #{@live_mode.inspect}, created_at: #{@created_at.inspect}, updated_at:"\
|
|
228
|
+
" #{@updated_at.inspect}, ledger_id: #{@ledger_id.inspect}, description:"\
|
|
229
|
+
" #{@description.inspect}, status: #{@status.inspect}, payout_ledger_account_id:"\
|
|
230
|
+
" #{@payout_ledger_account_id.inspect}, funding_ledger_account_id:"\
|
|
231
|
+
" #{@funding_ledger_account_id.inspect}, effective_at_upper_bound:"\
|
|
232
|
+
" #{@effective_at_upper_bound.inspect}, ledger_transaction_id:"\
|
|
233
|
+
" #{@ledger_transaction_id.inspect}, amount: #{@amount.inspect}, currency:"\
|
|
234
|
+
" #{@currency.inspect}, currency_exponent: #{@currency_exponent.inspect}, metadata:"\
|
|
235
|
+
" #{@metadata.inspect}>"
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
end
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
# LedgerAccountPayoutCreateRequest Model.
|
|
9
|
+
class LedgerAccountPayoutCreateRequest < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The description of the ledger account payout.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :description
|
|
16
|
+
|
|
17
|
+
# The status of the ledger account payout. It is set to `pending` by
|
|
18
|
+
# default. To post a ledger account payout at creation, use `posted`.
|
|
19
|
+
# @return [Status7Enum]
|
|
20
|
+
attr_accessor :status
|
|
21
|
+
|
|
22
|
+
# The id of the payout ledger account whose ledger entries are queried
|
|
23
|
+
# against, and its balance is reduced as a result.
|
|
24
|
+
# @return [UUID | String]
|
|
25
|
+
attr_accessor :payout_ledger_account_id
|
|
26
|
+
|
|
27
|
+
# The id of the funding ledger account that sends to or receives funds from
|
|
28
|
+
# the payout ledger account.
|
|
29
|
+
# @return [UUID | String]
|
|
30
|
+
attr_accessor :funding_ledger_account_id
|
|
31
|
+
|
|
32
|
+
# The exclusive upper bound of the effective_at timestamp of the ledger
|
|
33
|
+
# entries to be included in the ledger account payout. The default value is
|
|
34
|
+
# the created_at timestamp of the ledger account payout.
|
|
35
|
+
# @return [DateTime]
|
|
36
|
+
attr_accessor :effective_at_upper_bound
|
|
37
|
+
|
|
38
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
39
|
+
# must be strings.
|
|
40
|
+
# @return [Hash[String, String]]
|
|
41
|
+
attr_accessor :metadata
|
|
42
|
+
|
|
43
|
+
# It is set to `false` by default. It should be set to `true` when migrating
|
|
44
|
+
# existing payouts.
|
|
45
|
+
# @return [TrueClass | FalseClass]
|
|
46
|
+
attr_accessor :skip_payout_ledger_transaction
|
|
47
|
+
|
|
48
|
+
# A mapping from model property names to API property names.
|
|
49
|
+
def self.names
|
|
50
|
+
@_hash = {} if @_hash.nil?
|
|
51
|
+
@_hash['description'] = 'description'
|
|
52
|
+
@_hash['status'] = 'status'
|
|
53
|
+
@_hash['payout_ledger_account_id'] = 'payout_ledger_account_id'
|
|
54
|
+
@_hash['funding_ledger_account_id'] = 'funding_ledger_account_id'
|
|
55
|
+
@_hash['effective_at_upper_bound'] = 'effective_at_upper_bound'
|
|
56
|
+
@_hash['metadata'] = 'metadata'
|
|
57
|
+
@_hash['skip_payout_ledger_transaction'] =
|
|
58
|
+
'skip_payout_ledger_transaction'
|
|
59
|
+
@_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# An array for optional fields
|
|
63
|
+
def self.optionals
|
|
64
|
+
%w[
|
|
65
|
+
description
|
|
66
|
+
status
|
|
67
|
+
effective_at_upper_bound
|
|
68
|
+
metadata
|
|
69
|
+
skip_payout_ledger_transaction
|
|
70
|
+
]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# An array for nullable fields
|
|
74
|
+
def self.nullables
|
|
75
|
+
%w[
|
|
76
|
+
description
|
|
77
|
+
status
|
|
78
|
+
effective_at_upper_bound
|
|
79
|
+
skip_payout_ledger_transaction
|
|
80
|
+
]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def initialize(payout_ledger_account_id = nil,
|
|
84
|
+
funding_ledger_account_id = nil, description = SKIP,
|
|
85
|
+
status = SKIP, effective_at_upper_bound = SKIP,
|
|
86
|
+
metadata = SKIP, skip_payout_ledger_transaction = SKIP)
|
|
87
|
+
@description = description unless description == SKIP
|
|
88
|
+
@status = status unless status == SKIP
|
|
89
|
+
@payout_ledger_account_id = payout_ledger_account_id
|
|
90
|
+
@funding_ledger_account_id = funding_ledger_account_id
|
|
91
|
+
@effective_at_upper_bound = effective_at_upper_bound unless effective_at_upper_bound == SKIP
|
|
92
|
+
@metadata = metadata unless metadata == SKIP
|
|
93
|
+
unless skip_payout_ledger_transaction == SKIP
|
|
94
|
+
@skip_payout_ledger_transaction =
|
|
95
|
+
skip_payout_ledger_transaction
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Creates an instance of the object from a hash.
|
|
100
|
+
def self.from_hash(hash)
|
|
101
|
+
return nil unless hash
|
|
102
|
+
|
|
103
|
+
# Extract variables from the hash.
|
|
104
|
+
payout_ledger_account_id =
|
|
105
|
+
hash.key?('payout_ledger_account_id') ? hash['payout_ledger_account_id'] : nil
|
|
106
|
+
funding_ledger_account_id =
|
|
107
|
+
hash.key?('funding_ledger_account_id') ? hash['funding_ledger_account_id'] : nil
|
|
108
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
109
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
110
|
+
effective_at_upper_bound = if hash.key?('effective_at_upper_bound')
|
|
111
|
+
(DateTimeHelper.from_rfc3339(hash['effective_at_upper_bound']) if hash['effective_at_upper_bound'])
|
|
112
|
+
else
|
|
113
|
+
SKIP
|
|
114
|
+
end
|
|
115
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
116
|
+
skip_payout_ledger_transaction =
|
|
117
|
+
hash.key?('skip_payout_ledger_transaction') ? hash['skip_payout_ledger_transaction'] : SKIP
|
|
118
|
+
|
|
119
|
+
# Create object from extracted values.
|
|
120
|
+
LedgerAccountPayoutCreateRequest.new(payout_ledger_account_id,
|
|
121
|
+
funding_ledger_account_id,
|
|
122
|
+
description,
|
|
123
|
+
status,
|
|
124
|
+
effective_at_upper_bound,
|
|
125
|
+
metadata,
|
|
126
|
+
skip_payout_ledger_transaction)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def to_custom_effective_at_upper_bound
|
|
130
|
+
DateTimeHelper.to_rfc3339(effective_at_upper_bound)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Provides a human-readable string representation of the object.
|
|
134
|
+
def to_s
|
|
135
|
+
class_name = self.class.name.split('::').last
|
|
136
|
+
"<#{class_name} description: #{@description}, status: #{@status}, payout_ledger_account_id:"\
|
|
137
|
+
" #{@payout_ledger_account_id}, funding_ledger_account_id: #{@funding_ledger_account_id},"\
|
|
138
|
+
" effective_at_upper_bound: #{@effective_at_upper_bound}, metadata: #{@metadata},"\
|
|
139
|
+
" skip_payout_ledger_transaction: #{@skip_payout_ledger_transaction}>"
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
143
|
+
def inspect
|
|
144
|
+
class_name = self.class.name.split('::').last
|
|
145
|
+
"<#{class_name} description: #{@description.inspect}, status: #{@status.inspect},"\
|
|
146
|
+
" payout_ledger_account_id: #{@payout_ledger_account_id.inspect}, funding_ledger_account_id:"\
|
|
147
|
+
" #{@funding_ledger_account_id.inspect}, effective_at_upper_bound:"\
|
|
148
|
+
" #{@effective_at_upper_bound.inspect}, metadata: #{@metadata.inspect},"\
|
|
149
|
+
" skip_payout_ledger_transaction: #{@skip_payout_ledger_transaction.inspect}>"
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# LedgerAccountPayoutUpdateRequest Model.
|
|
8
|
+
class LedgerAccountPayoutUpdateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The description of the ledger account payout.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :description
|
|
15
|
+
|
|
16
|
+
# To post a pending ledger account payout, use `posted`. To archive a
|
|
17
|
+
# pending ledger transaction, use `archived`.
|
|
18
|
+
# @return [Status8Enum]
|
|
19
|
+
attr_accessor :status
|
|
20
|
+
|
|
21
|
+
# Additional data represented as key-value pairs. Both the key and value
|
|
22
|
+
# must be strings.
|
|
23
|
+
# @return [Hash[String, String]]
|
|
24
|
+
attr_accessor :metadata
|
|
25
|
+
|
|
26
|
+
# A mapping from model property names to API property names.
|
|
27
|
+
def self.names
|
|
28
|
+
@_hash = {} if @_hash.nil?
|
|
29
|
+
@_hash['description'] = 'description'
|
|
30
|
+
@_hash['status'] = 'status'
|
|
31
|
+
@_hash['metadata'] = 'metadata'
|
|
32
|
+
@_hash
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for optional fields
|
|
36
|
+
def self.optionals
|
|
37
|
+
%w[
|
|
38
|
+
description
|
|
39
|
+
status
|
|
40
|
+
metadata
|
|
41
|
+
]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An array for nullable fields
|
|
45
|
+
def self.nullables
|
|
46
|
+
%w[
|
|
47
|
+
description
|
|
48
|
+
]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def initialize(description = SKIP, status = SKIP, metadata = SKIP)
|
|
52
|
+
@description = description unless description == SKIP
|
|
53
|
+
@status = status unless status == SKIP
|
|
54
|
+
@metadata = metadata unless metadata == SKIP
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Creates an instance of the object from a hash.
|
|
58
|
+
def self.from_hash(hash)
|
|
59
|
+
return nil unless hash
|
|
60
|
+
|
|
61
|
+
# Extract variables from the hash.
|
|
62
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
63
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
64
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
65
|
+
|
|
66
|
+
# Create object from extracted values.
|
|
67
|
+
LedgerAccountPayoutUpdateRequest.new(description,
|
|
68
|
+
status,
|
|
69
|
+
metadata)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Provides a human-readable string representation of the object.
|
|
73
|
+
def to_s
|
|
74
|
+
class_name = self.class.name.split('::').last
|
|
75
|
+
"<#{class_name} description: #{@description}, status: #{@status}, metadata: #{@metadata}>"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
79
|
+
def inspect
|
|
80
|
+
class_name = self.class.name.split('::').last
|
|
81
|
+
"<#{class_name} description: #{@description.inspect}, status: #{@status.inspect}, metadata:"\
|
|
82
|
+
" #{@metadata.inspect}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|