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,171 @@
|
|
|
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
|
+
# InvoiceLineItem Model.
|
|
9
|
+
class InvoiceLineItem < 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 name of the line item, typically a product or SKU name.
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :name
|
|
39
|
+
|
|
40
|
+
# An optional free-form description of the line item.
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :description
|
|
43
|
+
|
|
44
|
+
# The number of units of a product or service that this line item is for.
|
|
45
|
+
# Must be a whole number. Defaults to 1 if not provided.
|
|
46
|
+
# @return [Integer]
|
|
47
|
+
attr_accessor :quantity
|
|
48
|
+
|
|
49
|
+
# The cost per unit of the product or service that this line item is for,
|
|
50
|
+
# specified in the invoice currency's smallest unit.
|
|
51
|
+
# @return [Integer]
|
|
52
|
+
attr_accessor :unit_amount
|
|
53
|
+
|
|
54
|
+
# Either `debit` or `credit`. `debit` indicates that a client owes the
|
|
55
|
+
# business money and increases the invoice's `total_amount` due.
|
|
56
|
+
# `credit` has the opposite intention and effect.
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :direction
|
|
59
|
+
|
|
60
|
+
# The total amount for this line item specified in the invoice currency's
|
|
61
|
+
# smallest unit.
|
|
62
|
+
# @return [Integer]
|
|
63
|
+
attr_accessor :amount
|
|
64
|
+
|
|
65
|
+
# A mapping from model property names to API property names.
|
|
66
|
+
def self.names
|
|
67
|
+
@_hash = {} if @_hash.nil?
|
|
68
|
+
@_hash['id'] = 'id'
|
|
69
|
+
@_hash['object'] = 'object'
|
|
70
|
+
@_hash['live_mode'] = 'live_mode'
|
|
71
|
+
@_hash['created_at'] = 'created_at'
|
|
72
|
+
@_hash['updated_at'] = 'updated_at'
|
|
73
|
+
@_hash['name'] = 'name'
|
|
74
|
+
@_hash['description'] = 'description'
|
|
75
|
+
@_hash['quantity'] = 'quantity'
|
|
76
|
+
@_hash['unit_amount'] = 'unit_amount'
|
|
77
|
+
@_hash['direction'] = 'direction'
|
|
78
|
+
@_hash['amount'] = 'amount'
|
|
79
|
+
@_hash
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# An array for optional fields
|
|
83
|
+
def self.optionals
|
|
84
|
+
[]
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# An array for nullable fields
|
|
88
|
+
def self.nullables
|
|
89
|
+
[]
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def initialize(id = nil, object = nil, live_mode = nil, created_at = nil,
|
|
93
|
+
updated_at = nil, name = nil, description = nil,
|
|
94
|
+
quantity = nil, unit_amount = nil, direction = nil,
|
|
95
|
+
amount = nil)
|
|
96
|
+
@id = id
|
|
97
|
+
@object = object
|
|
98
|
+
@live_mode = live_mode
|
|
99
|
+
@created_at = created_at
|
|
100
|
+
@updated_at = updated_at
|
|
101
|
+
@name = name
|
|
102
|
+
@description = description
|
|
103
|
+
@quantity = quantity
|
|
104
|
+
@unit_amount = unit_amount
|
|
105
|
+
@direction = direction
|
|
106
|
+
@amount = amount
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Creates an instance of the object from a hash.
|
|
110
|
+
def self.from_hash(hash)
|
|
111
|
+
return nil unless hash
|
|
112
|
+
|
|
113
|
+
# Extract variables from the hash.
|
|
114
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
115
|
+
object = hash.key?('object') ? hash['object'] : nil
|
|
116
|
+
live_mode = hash.key?('live_mode') ? hash['live_mode'] : nil
|
|
117
|
+
created_at = if hash.key?('created_at')
|
|
118
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
|
119
|
+
end
|
|
120
|
+
updated_at = if hash.key?('updated_at')
|
|
121
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
|
122
|
+
end
|
|
123
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
124
|
+
description = hash.key?('description') ? hash['description'] : nil
|
|
125
|
+
quantity = hash.key?('quantity') ? hash['quantity'] : nil
|
|
126
|
+
unit_amount = hash.key?('unit_amount') ? hash['unit_amount'] : nil
|
|
127
|
+
direction = hash.key?('direction') ? hash['direction'] : nil
|
|
128
|
+
amount = hash.key?('amount') ? hash['amount'] : nil
|
|
129
|
+
|
|
130
|
+
# Create object from extracted values.
|
|
131
|
+
InvoiceLineItem.new(id,
|
|
132
|
+
object,
|
|
133
|
+
live_mode,
|
|
134
|
+
created_at,
|
|
135
|
+
updated_at,
|
|
136
|
+
name,
|
|
137
|
+
description,
|
|
138
|
+
quantity,
|
|
139
|
+
unit_amount,
|
|
140
|
+
direction,
|
|
141
|
+
amount)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
def to_custom_created_at
|
|
145
|
+
DateTimeHelper.to_rfc3339(created_at)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def to_custom_updated_at
|
|
149
|
+
DateTimeHelper.to_rfc3339(updated_at)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Provides a human-readable string representation of the object.
|
|
153
|
+
def to_s
|
|
154
|
+
class_name = self.class.name.split('::').last
|
|
155
|
+
"<#{class_name} id: #{@id}, object: #{@object}, live_mode: #{@live_mode}, created_at:"\
|
|
156
|
+
" #{@created_at}, updated_at: #{@updated_at}, name: #{@name}, description: #{@description},"\
|
|
157
|
+
" quantity: #{@quantity}, unit_amount: #{@unit_amount}, direction: #{@direction}, amount:"\
|
|
158
|
+
" #{@amount}>"
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
162
|
+
def inspect
|
|
163
|
+
class_name = self.class.name.split('::').last
|
|
164
|
+
"<#{class_name} id: #{@id.inspect}, object: #{@object.inspect}, live_mode:"\
|
|
165
|
+
" #{@live_mode.inspect}, created_at: #{@created_at.inspect}, updated_at:"\
|
|
166
|
+
" #{@updated_at.inspect}, name: #{@name.inspect}, description: #{@description.inspect},"\
|
|
167
|
+
" quantity: #{@quantity.inspect}, unit_amount: #{@unit_amount.inspect}, direction:"\
|
|
168
|
+
" #{@direction.inspect}, amount: #{@amount.inspect}>"
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
end
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# modern_treasury
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ModernTreasury
|
|
7
|
+
# InvoiceLineItemCreateRequest Model.
|
|
8
|
+
class InvoiceLineItemCreateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The name of the line item, typically a product or SKU name.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :name
|
|
15
|
+
|
|
16
|
+
# An optional free-form description of the line item.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :description
|
|
19
|
+
|
|
20
|
+
# The number of units of a product or service that this line item is for.
|
|
21
|
+
# Must be a whole number. Defaults to 1 if not provided.
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
attr_accessor :quantity
|
|
24
|
+
|
|
25
|
+
# The cost per unit of the product or service that this line item is for,
|
|
26
|
+
# specified in the invoice currency's smallest unit.
|
|
27
|
+
# @return [Integer]
|
|
28
|
+
attr_accessor :unit_amount
|
|
29
|
+
|
|
30
|
+
# Either `debit` or `credit`. `debit` indicates that a client owes the
|
|
31
|
+
# business money and increases the invoice's `total_amount` due.
|
|
32
|
+
# `credit` has the opposite intention and effect.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :direction
|
|
35
|
+
|
|
36
|
+
# A mapping from model property names to API property names.
|
|
37
|
+
def self.names
|
|
38
|
+
@_hash = {} if @_hash.nil?
|
|
39
|
+
@_hash['name'] = 'name'
|
|
40
|
+
@_hash['description'] = 'description'
|
|
41
|
+
@_hash['quantity'] = 'quantity'
|
|
42
|
+
@_hash['unit_amount'] = 'unit_amount'
|
|
43
|
+
@_hash['direction'] = 'direction'
|
|
44
|
+
@_hash
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for optional fields
|
|
48
|
+
def self.optionals
|
|
49
|
+
%w[
|
|
50
|
+
description
|
|
51
|
+
quantity
|
|
52
|
+
direction
|
|
53
|
+
]
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# An array for nullable fields
|
|
57
|
+
def self.nullables
|
|
58
|
+
[]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def initialize(name = nil, unit_amount = nil, description = SKIP,
|
|
62
|
+
quantity = SKIP, direction = SKIP)
|
|
63
|
+
@name = name
|
|
64
|
+
@description = description unless description == SKIP
|
|
65
|
+
@quantity = quantity unless quantity == SKIP
|
|
66
|
+
@unit_amount = unit_amount
|
|
67
|
+
@direction = direction unless direction == SKIP
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Creates an instance of the object from a hash.
|
|
71
|
+
def self.from_hash(hash)
|
|
72
|
+
return nil unless hash
|
|
73
|
+
|
|
74
|
+
# Extract variables from the hash.
|
|
75
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
76
|
+
unit_amount = hash.key?('unit_amount') ? hash['unit_amount'] : nil
|
|
77
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
78
|
+
quantity = hash.key?('quantity') ? hash['quantity'] : SKIP
|
|
79
|
+
direction = hash.key?('direction') ? hash['direction'] : SKIP
|
|
80
|
+
|
|
81
|
+
# Create object from extracted values.
|
|
82
|
+
InvoiceLineItemCreateRequest.new(name,
|
|
83
|
+
unit_amount,
|
|
84
|
+
description,
|
|
85
|
+
quantity,
|
|
86
|
+
direction)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Provides a human-readable string representation of the object.
|
|
90
|
+
def to_s
|
|
91
|
+
class_name = self.class.name.split('::').last
|
|
92
|
+
"<#{class_name} name: #{@name}, description: #{@description}, quantity: #{@quantity},"\
|
|
93
|
+
" unit_amount: #{@unit_amount}, direction: #{@direction}>"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
97
|
+
def inspect
|
|
98
|
+
class_name = self.class.name.split('::').last
|
|
99
|
+
"<#{class_name} name: #{@name.inspect}, description: #{@description.inspect}, quantity:"\
|
|
100
|
+
" #{@quantity.inspect}, unit_amount: #{@unit_amount.inspect}, direction:"\
|
|
101
|
+
" #{@direction.inspect}>"
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,240 @@
|
|
|
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
|
+
# InvoiceLineItemUpdateRequest Model.
|
|
9
|
+
class InvoiceLineItemUpdateRequest < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The invoicer's contact details displayed at the top of the invoice.
|
|
14
|
+
# @return [Array[ContactDetail]]
|
|
15
|
+
attr_accessor :contact_details
|
|
16
|
+
|
|
17
|
+
# The ID of the counterparty receiving the invoice.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :counterparty_id
|
|
20
|
+
|
|
21
|
+
# The counterparty's billing address.
|
|
22
|
+
# @return [CounterpartyBillingAddress]
|
|
23
|
+
attr_accessor :counterparty_billing_address
|
|
24
|
+
|
|
25
|
+
# The counterparty's shipping address where physical goods should be
|
|
26
|
+
# delivered.
|
|
27
|
+
# @return [CounterpartyShippingAddress]
|
|
28
|
+
attr_accessor :counterparty_shipping_address
|
|
29
|
+
|
|
30
|
+
# Three-letter ISO currency code.
|
|
31
|
+
# @return [CurrencyEnum]
|
|
32
|
+
attr_accessor :currency
|
|
33
|
+
|
|
34
|
+
# A free-form description of the invoice.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :description
|
|
37
|
+
|
|
38
|
+
# A future date by when the invoice needs to be paid.
|
|
39
|
+
# @return [DateTime]
|
|
40
|
+
attr_accessor :due_date
|
|
41
|
+
|
|
42
|
+
# The invoice issuer's business address.
|
|
43
|
+
# @return [InvoicerAddress]
|
|
44
|
+
attr_accessor :invoicer_address
|
|
45
|
+
|
|
46
|
+
# The ID of the internal account the invoice should be paid to.
|
|
47
|
+
# @return [String]
|
|
48
|
+
attr_accessor :originating_account_id
|
|
49
|
+
|
|
50
|
+
# The receiving account ID. Can be an `external_account`.
|
|
51
|
+
# @return [UUID | String]
|
|
52
|
+
attr_accessor :receiving_account_id
|
|
53
|
+
|
|
54
|
+
# Date transactions are to be posted to the participants' account. Defaults
|
|
55
|
+
# to the current business day or the next business day if the current day is
|
|
56
|
+
# a bank holiday or weekend. Format: yyyy-mm-dd.
|
|
57
|
+
# @return [Date]
|
|
58
|
+
attr_accessor :payment_effective_date
|
|
59
|
+
|
|
60
|
+
# One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
|
|
61
|
+
# `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.
|
|
62
|
+
# @return [PaymentType6Enum]
|
|
63
|
+
attr_accessor :payment_type
|
|
64
|
+
|
|
65
|
+
# The method by which the invoice can be paid. `ui` will show the embedded
|
|
66
|
+
# payment collection flow. `automatic` will automatically initiate payment
|
|
67
|
+
# based upon the account details of the receiving_account id.\nIf the
|
|
68
|
+
# invoice amount is positive, the automatically initiated payment order's
|
|
69
|
+
# direction will be debit. If the invoice amount is negative, the
|
|
70
|
+
# automatically initiated payment order's direction will be credit. One of
|
|
71
|
+
# `manual`, `ui`, or `automatic`.
|
|
72
|
+
# @return [PaymentMethod1Enum]
|
|
73
|
+
attr_accessor :payment_method
|
|
74
|
+
|
|
75
|
+
# A mapping from model property names to API property names.
|
|
76
|
+
def self.names
|
|
77
|
+
@_hash = {} if @_hash.nil?
|
|
78
|
+
@_hash['contact_details'] = 'contact_details'
|
|
79
|
+
@_hash['counterparty_id'] = 'counterparty_id'
|
|
80
|
+
@_hash['counterparty_billing_address'] = 'counterparty_billing_address'
|
|
81
|
+
@_hash['counterparty_shipping_address'] =
|
|
82
|
+
'counterparty_shipping_address'
|
|
83
|
+
@_hash['currency'] = 'currency'
|
|
84
|
+
@_hash['description'] = 'description'
|
|
85
|
+
@_hash['due_date'] = 'due_date'
|
|
86
|
+
@_hash['invoicer_address'] = 'invoicer_address'
|
|
87
|
+
@_hash['originating_account_id'] = 'originating_account_id'
|
|
88
|
+
@_hash['receiving_account_id'] = 'receiving_account_id'
|
|
89
|
+
@_hash['payment_effective_date'] = 'payment_effective_date'
|
|
90
|
+
@_hash['payment_type'] = 'payment_type'
|
|
91
|
+
@_hash['payment_method'] = 'payment_method'
|
|
92
|
+
@_hash
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# An array for optional fields
|
|
96
|
+
def self.optionals
|
|
97
|
+
%w[
|
|
98
|
+
contact_details
|
|
99
|
+
counterparty_id
|
|
100
|
+
counterparty_billing_address
|
|
101
|
+
counterparty_shipping_address
|
|
102
|
+
currency
|
|
103
|
+
description
|
|
104
|
+
due_date
|
|
105
|
+
invoicer_address
|
|
106
|
+
originating_account_id
|
|
107
|
+
receiving_account_id
|
|
108
|
+
payment_effective_date
|
|
109
|
+
payment_type
|
|
110
|
+
payment_method
|
|
111
|
+
]
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# An array for nullable fields
|
|
115
|
+
def self.nullables
|
|
116
|
+
%w[
|
|
117
|
+
counterparty_billing_address
|
|
118
|
+
counterparty_shipping_address
|
|
119
|
+
invoicer_address
|
|
120
|
+
]
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def initialize(contact_details = SKIP, counterparty_id = SKIP,
|
|
124
|
+
counterparty_billing_address = SKIP,
|
|
125
|
+
counterparty_shipping_address = SKIP, currency = SKIP,
|
|
126
|
+
description = SKIP, due_date = SKIP, invoicer_address = SKIP,
|
|
127
|
+
originating_account_id = SKIP, receiving_account_id = SKIP,
|
|
128
|
+
payment_effective_date = SKIP, payment_type = SKIP,
|
|
129
|
+
payment_method = SKIP)
|
|
130
|
+
@contact_details = contact_details unless contact_details == SKIP
|
|
131
|
+
@counterparty_id = counterparty_id unless counterparty_id == SKIP
|
|
132
|
+
unless counterparty_billing_address == SKIP
|
|
133
|
+
@counterparty_billing_address =
|
|
134
|
+
counterparty_billing_address
|
|
135
|
+
end
|
|
136
|
+
unless counterparty_shipping_address == SKIP
|
|
137
|
+
@counterparty_shipping_address =
|
|
138
|
+
counterparty_shipping_address
|
|
139
|
+
end
|
|
140
|
+
@currency = currency unless currency == SKIP
|
|
141
|
+
@description = description unless description == SKIP
|
|
142
|
+
@due_date = due_date unless due_date == SKIP
|
|
143
|
+
@invoicer_address = invoicer_address unless invoicer_address == SKIP
|
|
144
|
+
@originating_account_id = originating_account_id unless originating_account_id == SKIP
|
|
145
|
+
@receiving_account_id = receiving_account_id unless receiving_account_id == SKIP
|
|
146
|
+
@payment_effective_date = payment_effective_date unless payment_effective_date == SKIP
|
|
147
|
+
@payment_type = payment_type unless payment_type == SKIP
|
|
148
|
+
@payment_method = payment_method unless payment_method == SKIP
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Creates an instance of the object from a hash.
|
|
152
|
+
def self.from_hash(hash)
|
|
153
|
+
return nil unless hash
|
|
154
|
+
|
|
155
|
+
# Extract variables from the hash.
|
|
156
|
+
# Parameter is an array, so we need to iterate through it
|
|
157
|
+
contact_details = nil
|
|
158
|
+
unless hash['contact_details'].nil?
|
|
159
|
+
contact_details = []
|
|
160
|
+
hash['contact_details'].each do |structure|
|
|
161
|
+
contact_details << (ContactDetail.from_hash(structure) if structure)
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
contact_details = SKIP unless hash.key?('contact_details')
|
|
166
|
+
counterparty_id =
|
|
167
|
+
hash.key?('counterparty_id') ? hash['counterparty_id'] : SKIP
|
|
168
|
+
if hash['counterparty_billing_address']
|
|
169
|
+
counterparty_billing_address = CounterpartyBillingAddress.from_hash(hash['counterparty_billing_address'])
|
|
170
|
+
end
|
|
171
|
+
if hash['counterparty_shipping_address']
|
|
172
|
+
counterparty_shipping_address = CounterpartyShippingAddress.from_hash(hash['counterparty_shipping_address'])
|
|
173
|
+
end
|
|
174
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
175
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
176
|
+
due_date = if hash.key?('due_date')
|
|
177
|
+
(DateTimeHelper.from_rfc3339(hash['due_date']) if hash['due_date'])
|
|
178
|
+
else
|
|
179
|
+
SKIP
|
|
180
|
+
end
|
|
181
|
+
invoicer_address = InvoicerAddress.from_hash(hash['invoicer_address']) if
|
|
182
|
+
hash['invoicer_address']
|
|
183
|
+
originating_account_id =
|
|
184
|
+
hash.key?('originating_account_id') ? hash['originating_account_id'] : SKIP
|
|
185
|
+
receiving_account_id =
|
|
186
|
+
hash.key?('receiving_account_id') ? hash['receiving_account_id'] : SKIP
|
|
187
|
+
payment_effective_date =
|
|
188
|
+
hash.key?('payment_effective_date') ? hash['payment_effective_date'] : SKIP
|
|
189
|
+
payment_type = hash.key?('payment_type') ? hash['payment_type'] : SKIP
|
|
190
|
+
payment_method =
|
|
191
|
+
hash.key?('payment_method') ? hash['payment_method'] : SKIP
|
|
192
|
+
|
|
193
|
+
# Create object from extracted values.
|
|
194
|
+
InvoiceLineItemUpdateRequest.new(contact_details,
|
|
195
|
+
counterparty_id,
|
|
196
|
+
counterparty_billing_address,
|
|
197
|
+
counterparty_shipping_address,
|
|
198
|
+
currency,
|
|
199
|
+
description,
|
|
200
|
+
due_date,
|
|
201
|
+
invoicer_address,
|
|
202
|
+
originating_account_id,
|
|
203
|
+
receiving_account_id,
|
|
204
|
+
payment_effective_date,
|
|
205
|
+
payment_type,
|
|
206
|
+
payment_method)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
def to_custom_due_date
|
|
210
|
+
DateTimeHelper.to_rfc3339(due_date)
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Provides a human-readable string representation of the object.
|
|
214
|
+
def to_s
|
|
215
|
+
class_name = self.class.name.split('::').last
|
|
216
|
+
"<#{class_name} contact_details: #{@contact_details}, counterparty_id: #{@counterparty_id},"\
|
|
217
|
+
" counterparty_billing_address: #{@counterparty_billing_address},"\
|
|
218
|
+
" counterparty_shipping_address: #{@counterparty_shipping_address}, currency: #{@currency},"\
|
|
219
|
+
" description: #{@description}, due_date: #{@due_date}, invoicer_address:"\
|
|
220
|
+
" #{@invoicer_address}, originating_account_id: #{@originating_account_id},"\
|
|
221
|
+
" receiving_account_id: #{@receiving_account_id}, payment_effective_date:"\
|
|
222
|
+
" #{@payment_effective_date}, payment_type: #{@payment_type}, payment_method:"\
|
|
223
|
+
" #{@payment_method}>"
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
227
|
+
def inspect
|
|
228
|
+
class_name = self.class.name.split('::').last
|
|
229
|
+
"<#{class_name} contact_details: #{@contact_details.inspect}, counterparty_id:"\
|
|
230
|
+
" #{@counterparty_id.inspect}, counterparty_billing_address:"\
|
|
231
|
+
" #{@counterparty_billing_address.inspect}, counterparty_shipping_address:"\
|
|
232
|
+
" #{@counterparty_shipping_address.inspect}, currency: #{@currency.inspect}, description:"\
|
|
233
|
+
" #{@description.inspect}, due_date: #{@due_date.inspect}, invoicer_address:"\
|
|
234
|
+
" #{@invoicer_address.inspect}, originating_account_id: #{@originating_account_id.inspect},"\
|
|
235
|
+
" receiving_account_id: #{@receiving_account_id.inspect}, payment_effective_date:"\
|
|
236
|
+
" #{@payment_effective_date.inspect}, payment_type: #{@payment_type.inspect},"\
|
|
237
|
+
" payment_method: #{@payment_method.inspect}>"
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|