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,230 @@
|
|
|
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
|
+
# PaymentFlow Model.
|
|
9
|
+
class PaymentFlow < 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 client token of the payment flow. This token can be used to embed a
|
|
37
|
+
# payment workflow in your client-side application.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :client_token
|
|
40
|
+
|
|
41
|
+
# The current status of the payment flow. One of `pending`, `completed`,
|
|
42
|
+
# `expired`, or `cancelled`.
|
|
43
|
+
# @return [Status17Enum]
|
|
44
|
+
attr_accessor :status
|
|
45
|
+
|
|
46
|
+
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
47
|
+
# as 1000. Can be any integer up to 36 digits.
|
|
48
|
+
# @return [Integer]
|
|
49
|
+
attr_accessor :amount
|
|
50
|
+
|
|
51
|
+
# The currency of the payment.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :currency
|
|
54
|
+
|
|
55
|
+
# Describes the direction money is flowing in the transaction. Can only be
|
|
56
|
+
# `debit`. A `debit` pulls money from someone else's account to your own.
|
|
57
|
+
# @return [Direction9Enum]
|
|
58
|
+
attr_accessor :direction
|
|
59
|
+
|
|
60
|
+
# The ID of a counterparty associated with the payment. As part of the
|
|
61
|
+
# payment workflow an external account will be associated with this
|
|
62
|
+
# counterparty.
|
|
63
|
+
# @return [UUID | String]
|
|
64
|
+
attr_accessor :counterparty_id
|
|
65
|
+
|
|
66
|
+
# If present, the ID of the external account created using this flow.
|
|
67
|
+
# @return [UUID | String]
|
|
68
|
+
attr_accessor :receiving_account_id
|
|
69
|
+
|
|
70
|
+
# The ID of one of your organization's internal accounts.
|
|
71
|
+
# @return [UUID | String]
|
|
72
|
+
attr_accessor :originating_account_id
|
|
73
|
+
|
|
74
|
+
# If present, the ID of the payment order created using this flow.
|
|
75
|
+
# @return [UUID | String]
|
|
76
|
+
attr_accessor :payment_order_id
|
|
77
|
+
|
|
78
|
+
# A mapping from model property names to API property names.
|
|
79
|
+
def self.names
|
|
80
|
+
@_hash = {} if @_hash.nil?
|
|
81
|
+
@_hash['id'] = 'id'
|
|
82
|
+
@_hash['object'] = 'object'
|
|
83
|
+
@_hash['live_mode'] = 'live_mode'
|
|
84
|
+
@_hash['created_at'] = 'created_at'
|
|
85
|
+
@_hash['updated_at'] = 'updated_at'
|
|
86
|
+
@_hash['client_token'] = 'client_token'
|
|
87
|
+
@_hash['status'] = 'status'
|
|
88
|
+
@_hash['amount'] = 'amount'
|
|
89
|
+
@_hash['currency'] = 'currency'
|
|
90
|
+
@_hash['direction'] = 'direction'
|
|
91
|
+
@_hash['counterparty_id'] = 'counterparty_id'
|
|
92
|
+
@_hash['receiving_account_id'] = 'receiving_account_id'
|
|
93
|
+
@_hash['originating_account_id'] = 'originating_account_id'
|
|
94
|
+
@_hash['payment_order_id'] = 'payment_order_id'
|
|
95
|
+
@_hash
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# An array for optional fields
|
|
99
|
+
def self.optionals
|
|
100
|
+
%w[
|
|
101
|
+
id
|
|
102
|
+
object
|
|
103
|
+
live_mode
|
|
104
|
+
created_at
|
|
105
|
+
updated_at
|
|
106
|
+
client_token
|
|
107
|
+
status
|
|
108
|
+
amount
|
|
109
|
+
currency
|
|
110
|
+
direction
|
|
111
|
+
counterparty_id
|
|
112
|
+
receiving_account_id
|
|
113
|
+
originating_account_id
|
|
114
|
+
payment_order_id
|
|
115
|
+
]
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# An array for nullable fields
|
|
119
|
+
def self.nullables
|
|
120
|
+
%w[
|
|
121
|
+
counterparty_id
|
|
122
|
+
receiving_account_id
|
|
123
|
+
originating_account_id
|
|
124
|
+
payment_order_id
|
|
125
|
+
]
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def initialize(id = SKIP, object = SKIP, live_mode = SKIP,
|
|
129
|
+
created_at = SKIP, updated_at = SKIP, client_token = SKIP,
|
|
130
|
+
status = SKIP, amount = SKIP, currency = SKIP,
|
|
131
|
+
direction = SKIP, counterparty_id = SKIP,
|
|
132
|
+
receiving_account_id = SKIP, originating_account_id = SKIP,
|
|
133
|
+
payment_order_id = SKIP)
|
|
134
|
+
@id = id unless id == SKIP
|
|
135
|
+
@object = object unless object == SKIP
|
|
136
|
+
@live_mode = live_mode unless live_mode == SKIP
|
|
137
|
+
@created_at = created_at unless created_at == SKIP
|
|
138
|
+
@updated_at = updated_at unless updated_at == SKIP
|
|
139
|
+
@client_token = client_token unless client_token == SKIP
|
|
140
|
+
@status = status unless status == SKIP
|
|
141
|
+
@amount = amount unless amount == SKIP
|
|
142
|
+
@currency = currency unless currency == SKIP
|
|
143
|
+
@direction = direction unless direction == SKIP
|
|
144
|
+
@counterparty_id = counterparty_id unless counterparty_id == SKIP
|
|
145
|
+
@receiving_account_id = receiving_account_id unless receiving_account_id == SKIP
|
|
146
|
+
@originating_account_id = originating_account_id unless originating_account_id == SKIP
|
|
147
|
+
@payment_order_id = payment_order_id unless payment_order_id == SKIP
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Creates an instance of the object from a hash.
|
|
151
|
+
def self.from_hash(hash)
|
|
152
|
+
return nil unless hash
|
|
153
|
+
|
|
154
|
+
# Extract variables from the hash.
|
|
155
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
156
|
+
object = hash.key?('object') ? hash['object'] : SKIP
|
|
157
|
+
live_mode = hash.key?('live_mode') ? hash['live_mode'] : SKIP
|
|
158
|
+
created_at = if hash.key?('created_at')
|
|
159
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
|
160
|
+
else
|
|
161
|
+
SKIP
|
|
162
|
+
end
|
|
163
|
+
updated_at = if hash.key?('updated_at')
|
|
164
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
|
165
|
+
else
|
|
166
|
+
SKIP
|
|
167
|
+
end
|
|
168
|
+
client_token = hash.key?('client_token') ? hash['client_token'] : SKIP
|
|
169
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
170
|
+
amount = hash.key?('amount') ? hash['amount'] : SKIP
|
|
171
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
172
|
+
direction = hash.key?('direction') ? hash['direction'] : SKIP
|
|
173
|
+
counterparty_id =
|
|
174
|
+
hash.key?('counterparty_id') ? hash['counterparty_id'] : SKIP
|
|
175
|
+
receiving_account_id =
|
|
176
|
+
hash.key?('receiving_account_id') ? hash['receiving_account_id'] : SKIP
|
|
177
|
+
originating_account_id =
|
|
178
|
+
hash.key?('originating_account_id') ? hash['originating_account_id'] : SKIP
|
|
179
|
+
payment_order_id =
|
|
180
|
+
hash.key?('payment_order_id') ? hash['payment_order_id'] : SKIP
|
|
181
|
+
|
|
182
|
+
# Create object from extracted values.
|
|
183
|
+
PaymentFlow.new(id,
|
|
184
|
+
object,
|
|
185
|
+
live_mode,
|
|
186
|
+
created_at,
|
|
187
|
+
updated_at,
|
|
188
|
+
client_token,
|
|
189
|
+
status,
|
|
190
|
+
amount,
|
|
191
|
+
currency,
|
|
192
|
+
direction,
|
|
193
|
+
counterparty_id,
|
|
194
|
+
receiving_account_id,
|
|
195
|
+
originating_account_id,
|
|
196
|
+
payment_order_id)
|
|
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
|
+
# Provides a human-readable string representation of the object.
|
|
208
|
+
def to_s
|
|
209
|
+
class_name = self.class.name.split('::').last
|
|
210
|
+
"<#{class_name} id: #{@id}, object: #{@object}, live_mode: #{@live_mode}, created_at:"\
|
|
211
|
+
" #{@created_at}, updated_at: #{@updated_at}, client_token: #{@client_token}, status:"\
|
|
212
|
+
" #{@status}, amount: #{@amount}, currency: #{@currency}, direction: #{@direction},"\
|
|
213
|
+
" counterparty_id: #{@counterparty_id}, receiving_account_id: #{@receiving_account_id},"\
|
|
214
|
+
" originating_account_id: #{@originating_account_id}, payment_order_id:"\
|
|
215
|
+
" #{@payment_order_id}>"
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
219
|
+
def inspect
|
|
220
|
+
class_name = self.class.name.split('::').last
|
|
221
|
+
"<#{class_name} id: #{@id.inspect}, object: #{@object.inspect}, live_mode:"\
|
|
222
|
+
" #{@live_mode.inspect}, created_at: #{@created_at.inspect}, updated_at:"\
|
|
223
|
+
" #{@updated_at.inspect}, client_token: #{@client_token.inspect}, status:"\
|
|
224
|
+
" #{@status.inspect}, amount: #{@amount.inspect}, currency: #{@currency.inspect}, direction:"\
|
|
225
|
+
" #{@direction.inspect}, counterparty_id: #{@counterparty_id.inspect}, receiving_account_id:"\
|
|
226
|
+
" #{@receiving_account_id.inspect}, originating_account_id:"\
|
|
227
|
+
" #{@originating_account_id.inspect}, payment_order_id: #{@payment_order_id.inspect}>"
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# PaymentFlowCreateRequest Model.
|
|
8
|
+
class PaymentFlowCreateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Required. Value in specified currency's smallest unit. e.g. $10 would be
|
|
13
|
+
# represented as 1000. Can be any integer up to 36 digits.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :amount
|
|
16
|
+
|
|
17
|
+
# Required. The currency of the payment.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :currency
|
|
20
|
+
|
|
21
|
+
# Required. Describes the direction money is flowing in the transaction. Can
|
|
22
|
+
# only be `debit`. A `debit` pulls money from someone else's account to your
|
|
23
|
+
# own.
|
|
24
|
+
# @return [Direction10Enum]
|
|
25
|
+
attr_accessor :direction
|
|
26
|
+
|
|
27
|
+
# Required. The ID of a counterparty associated with the payment. As part of
|
|
28
|
+
# the payment workflow an external account will be associated with this
|
|
29
|
+
# model.
|
|
30
|
+
# @return [UUID | String]
|
|
31
|
+
attr_accessor :counterparty_id
|
|
32
|
+
|
|
33
|
+
# Required. The ID of one of your organization's internal accounts.
|
|
34
|
+
# @return [UUID | String]
|
|
35
|
+
attr_accessor :originating_account_id
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['amount'] = 'amount'
|
|
41
|
+
@_hash['currency'] = 'currency'
|
|
42
|
+
@_hash['direction'] = 'direction'
|
|
43
|
+
@_hash['counterparty_id'] = 'counterparty_id'
|
|
44
|
+
@_hash['originating_account_id'] = 'originating_account_id'
|
|
45
|
+
@_hash
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for optional fields
|
|
49
|
+
def self.optionals
|
|
50
|
+
[]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for nullable fields
|
|
54
|
+
def self.nullables
|
|
55
|
+
[]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def initialize(amount = nil, currency = nil, direction = nil,
|
|
59
|
+
counterparty_id = nil, originating_account_id = nil)
|
|
60
|
+
@amount = amount
|
|
61
|
+
@currency = currency
|
|
62
|
+
@direction = direction
|
|
63
|
+
@counterparty_id = counterparty_id
|
|
64
|
+
@originating_account_id = originating_account_id
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Creates an instance of the object from a hash.
|
|
68
|
+
def self.from_hash(hash)
|
|
69
|
+
return nil unless hash
|
|
70
|
+
|
|
71
|
+
# Extract variables from the hash.
|
|
72
|
+
amount = hash.key?('amount') ? hash['amount'] : nil
|
|
73
|
+
currency = hash.key?('currency') ? hash['currency'] : nil
|
|
74
|
+
direction = hash.key?('direction') ? hash['direction'] : nil
|
|
75
|
+
counterparty_id =
|
|
76
|
+
hash.key?('counterparty_id') ? hash['counterparty_id'] : nil
|
|
77
|
+
originating_account_id =
|
|
78
|
+
hash.key?('originating_account_id') ? hash['originating_account_id'] : nil
|
|
79
|
+
|
|
80
|
+
# Create object from extracted values.
|
|
81
|
+
PaymentFlowCreateRequest.new(amount,
|
|
82
|
+
currency,
|
|
83
|
+
direction,
|
|
84
|
+
counterparty_id,
|
|
85
|
+
originating_account_id)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Provides a human-readable string representation of the object.
|
|
89
|
+
def to_s
|
|
90
|
+
class_name = self.class.name.split('::').last
|
|
91
|
+
"<#{class_name} amount: #{@amount}, currency: #{@currency}, direction: #{@direction},"\
|
|
92
|
+
" counterparty_id: #{@counterparty_id}, originating_account_id: #{@originating_account_id}>"
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
96
|
+
def inspect
|
|
97
|
+
class_name = self.class.name.split('::').last
|
|
98
|
+
"<#{class_name} amount: #{@amount.inspect}, currency: #{@currency.inspect}, direction:"\
|
|
99
|
+
" #{@direction.inspect}, counterparty_id: #{@counterparty_id.inspect},"\
|
|
100
|
+
" originating_account_id: #{@originating_account_id.inspect}>"
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# PaymentFlowUpdateRequest Model.
|
|
8
|
+
class PaymentFlowUpdateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Required. The updated status of the payment flow. Can only be used to mark
|
|
13
|
+
# a flow as `cancelled`.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_reader :status
|
|
16
|
+
|
|
17
|
+
# A mapping from model property names to API property names.
|
|
18
|
+
def self.names
|
|
19
|
+
@_hash = {} if @_hash.nil?
|
|
20
|
+
@_hash['status'] = 'status'
|
|
21
|
+
@_hash
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# An array for optional fields
|
|
25
|
+
def self.optionals
|
|
26
|
+
[]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# An array for nullable fields
|
|
30
|
+
def self.nullables
|
|
31
|
+
[]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def initialize
|
|
35
|
+
@status = 'cancelled'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Creates an instance of the object from a hash.
|
|
39
|
+
def self.from_hash(hash)
|
|
40
|
+
return nil unless hash
|
|
41
|
+
|
|
42
|
+
# Extract variables from the hash.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# Create object from extracted values.
|
|
46
|
+
PaymentFlowUpdateRequest.new
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Provides a human-readable string representation of the object.
|
|
50
|
+
def to_s
|
|
51
|
+
class_name = self.class.name.split('::').last
|
|
52
|
+
"<#{class_name} status: #{@status}>"
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
56
|
+
def inspect
|
|
57
|
+
class_name = self.class.name.split('::').last
|
|
58
|
+
"<#{class_name} status: #{@status.inspect}>"
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
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 method by which the invoice can be paid. `ui` will show the embedded
|
|
8
|
+
# payment collection flow. `automatic` will automatically initiate payment
|
|
9
|
+
# based upon the account details of the receiving_account id.\nIf the invoice
|
|
10
|
+
# amount is positive, the automatically initiated payment order's direction
|
|
11
|
+
# will be debit. If the invoice amount is negative, the automatically
|
|
12
|
+
# initiated payment order's direction will be credit. One of `manual`, `ui`,
|
|
13
|
+
# or `automatic`.
|
|
14
|
+
class PaymentMethod1Enum
|
|
15
|
+
PAYMENT_METHOD1_ENUM = [
|
|
16
|
+
# TODO: Write general description for UI
|
|
17
|
+
UI = 'ui'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for MANUAL
|
|
20
|
+
MANUAL = 'manual'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for AUTOMATIC
|
|
23
|
+
AUTOMATIC = 'automatic'.freeze
|
|
24
|
+
].freeze
|
|
25
|
+
|
|
26
|
+
def self.validate(value)
|
|
27
|
+
return false if value.nil?
|
|
28
|
+
|
|
29
|
+
PAYMENT_METHOD1_ENUM.include?(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = UI)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'ui' then UI
|
|
39
|
+
when 'manual' then MANUAL
|
|
40
|
+
when 'automatic' then AUTOMATIC
|
|
41
|
+
else
|
|
42
|
+
default_value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# When opening an invoice, whether to show the embedded payment UI ,
|
|
8
|
+
# automatically debit the recipient, or rely on manual payment from the
|
|
9
|
+
# recipient.
|
|
10
|
+
class PaymentMethodEnum
|
|
11
|
+
PAYMENT_METHOD_ENUM = [
|
|
12
|
+
# TODO: Write general description for UI
|
|
13
|
+
UI = 'ui'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for MANUAL
|
|
16
|
+
MANUAL = 'manual'.freeze,
|
|
17
|
+
|
|
18
|
+
# TODO: Write general description for AUTOMATIC
|
|
19
|
+
AUTOMATIC = 'automatic'.freeze
|
|
20
|
+
].freeze
|
|
21
|
+
|
|
22
|
+
def self.validate(value)
|
|
23
|
+
return false if value.nil?
|
|
24
|
+
|
|
25
|
+
PAYMENT_METHOD_ENUM.include?(value)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.from_value(value, default_value = UI)
|
|
29
|
+
return default_value if value.nil?
|
|
30
|
+
|
|
31
|
+
str = value.to_s.strip
|
|
32
|
+
|
|
33
|
+
case str.downcase
|
|
34
|
+
when 'ui' then UI
|
|
35
|
+
when 'manual' then MANUAL
|
|
36
|
+
when 'automatic' then AUTOMATIC
|
|
37
|
+
else
|
|
38
|
+
default_value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|