pnz-payments-sdk 1.0.0
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 +98 -0
- data/lib/account_and_transaction_api_specification/api_helper.rb +10 -0
- data/lib/account_and_transaction_api_specification/client.rb +114 -0
- data/lib/account_and_transaction_api_specification/configuration.rb +127 -0
- data/lib/account_and_transaction_api_specification/controllers/accounts_controller.rb +146 -0
- data/lib/account_and_transaction_api_specification/controllers/balances_controller.rb +146 -0
- data/lib/account_and_transaction_api_specification/controllers/base_controller.rb +66 -0
- data/lib/account_and_transaction_api_specification/controllers/beneficiaries_controller.rb +146 -0
- data/lib/account_and_transaction_api_specification/controllers/direct_debits_controller.rb +146 -0
- data/lib/account_and_transaction_api_specification/controllers/offers_controller.rb +146 -0
- data/lib/account_and_transaction_api_specification/controllers/party_controller.rb +146 -0
- data/lib/account_and_transaction_api_specification/controllers/scheduled_payments_controller.rb +146 -0
- data/lib/account_and_transaction_api_specification/controllers/standing_orders_controller.rb +146 -0
- data/lib/account_and_transaction_api_specification/controllers/statements_controller.rb +421 -0
- data/lib/account_and_transaction_api_specification/controllers/transactions_controller.rb +170 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_balances400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_balances403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_balances500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_balances503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_beneficiaries400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_beneficiaries403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_beneficiaries500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_beneficiaries503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_direct_debits400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_direct_debits403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_direct_debits500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_direct_debits503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_offers400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_offers403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_offers500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_offers503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_party400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_party403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_party500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_party503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_scheduled_payments400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_scheduled_payments403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_scheduled_payments500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_scheduled_payments503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_standing_orders400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_standing_orders403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_standing_orders500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_standing_orders503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_statements400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_statements403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_statements500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_statements503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_statements_transactions400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_statements_transactions403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_statements_transactions500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_statements_transactions503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_transactions400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_transactions403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_transactions500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/accounts_transactions503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/api_exception.rb +21 -0
- data/lib/account_and_transaction_api_specification/exceptions/balances400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/balances403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/balances500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/balances503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/beneficiaries400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/beneficiaries403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/beneficiaries500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/beneficiaries503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/direct_debits400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/direct_debits403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/direct_debits500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/direct_debits503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/offers400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/offers403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/offers500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/offers503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/party400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/party403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/party500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/party503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/scheduled_payments400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/scheduled_payments403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/scheduled_payments500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/scheduled_payments503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/standing_orders400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/standing_orders403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/standing_orders500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/standing_orders503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/statements400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/statements403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/statements500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/statements503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/transactions400_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/transactions403_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/transactions500_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/exceptions/transactions503_error_exception.rb +72 -0
- data/lib/account_and_transaction_api_specification/http/auth/o_auth2.rb +43 -0
- data/lib/account_and_transaction_api_specification/http/http_call_back.rb +10 -0
- data/lib/account_and_transaction_api_specification/http/http_method_enum.rb +10 -0
- data/lib/account_and_transaction_api_specification/http/http_request.rb +10 -0
- data/lib/account_and_transaction_api_specification/http/http_response.rb +10 -0
- data/lib/account_and_transaction_api_specification/models/account.rb +100 -0
- data/lib/account_and_transaction_api_specification/models/account_access_consent.rb +69 -0
- data/lib/account_and_transaction_api_specification/models/account_access_consent_model.rb +60 -0
- data/lib/account_and_transaction_api_specification/models/account_access_consent_pos_tresponse.rb +86 -0
- data/lib/account_and_transaction_api_specification/models/account_access_consent_response.rb +86 -0
- data/lib/account_and_transaction_api_specification/models/account_access_consent_response_model.rb +120 -0
- data/lib/account_and_transaction_api_specification/models/account_access_status_enum.rb +29 -0
- data/lib/account_and_transaction_api_specification/models/account_model.rb +137 -0
- data/lib/account_and_transaction_api_specification/models/account_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/account_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/account_scheme_model_enum.rb +23 -0
- data/lib/account_and_transaction_api_specification/models/account_sub_type_enum.rb +41 -0
- data/lib/account_and_transaction_api_specification/models/account_type_enum.rb +23 -0
- data/lib/account_and_transaction_api_specification/models/address.rb +137 -0
- data/lib/account_and_transaction_api_specification/models/address_type_enum.rb +20 -0
- data/lib/account_and_transaction_api_specification/models/address_type_option_enum.rb +41 -0
- data/lib/account_and_transaction_api_specification/models/amount.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/authorisation_type_enum.rb +26 -0
- data/lib/account_and_transaction_api_specification/models/balance.rb +82 -0
- data/lib/account_and_transaction_api_specification/models/balance_model.rb +136 -0
- data/lib/account_and_transaction_api_specification/models/balance_model_type_enum.rb +47 -0
- data/lib/account_and_transaction_api_specification/models/balances_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/balances_response_data.rb +69 -0
- data/lib/account_and_transaction_api_specification/models/bank_transaction_code.rb +69 -0
- data/lib/account_and_transaction_api_specification/models/base_model.rb +110 -0
- data/lib/account_and_transaction_api_specification/models/becs_remittance.rb +109 -0
- data/lib/account_and_transaction_api_specification/models/beneficiaries_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/beneficiaries_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/beneficiary_model.rb +110 -0
- data/lib/account_and_transaction_api_specification/models/card_instrument.rb +97 -0
- data/lib/account_and_transaction_api_specification/models/card_scheme_name_enum.rb +32 -0
- data/lib/account_and_transaction_api_specification/models/consent.rb +145 -0
- data/lib/account_and_transaction_api_specification/models/credit_debit_indicator_enum.rb +24 -0
- data/lib/account_and_transaction_api_specification/models/credit_line.rb +82 -0
- data/lib/account_and_transaction_api_specification/models/credit_line_type_enum.rb +26 -0
- data/lib/account_and_transaction_api_specification/models/creditor_account.rb +102 -0
- data/lib/account_and_transaction_api_specification/models/creditor_agent.rb +100 -0
- data/lib/account_and_transaction_api_specification/models/creditor_reference.rb +81 -0
- data/lib/account_and_transaction_api_specification/models/currency_exchange.rb +147 -0
- data/lib/account_and_transaction_api_specification/models/data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/debtor_account.rb +102 -0
- data/lib/account_and_transaction_api_specification/models/debtor_agent.rb +70 -0
- data/lib/account_and_transaction_api_specification/models/debtor_reference.rb +81 -0
- data/lib/account_and_transaction_api_specification/models/delivery_address.rb +138 -0
- data/lib/account_and_transaction_api_specification/models/direct_debit_model.rb +146 -0
- data/lib/account_and_transaction_api_specification/models/direct_debit_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/direct_debit_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/direct_debit_status_code_enum.rb +23 -0
- data/lib/account_and_transaction_api_specification/models/error.rb +92 -0
- data/lib/account_and_transaction_api_specification/models/error_code_enum.rb +100 -0
- data/lib/account_and_transaction_api_specification/models/error_response.rb +100 -0
- data/lib/account_and_transaction_api_specification/models/fee.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/final_payment_amount.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/first_payment_amount.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/geo_location.rb +72 -0
- data/lib/account_and_transaction_api_specification/models/get_account_offers_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_account_party_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_account_party_response_data.rb +62 -0
- data/lib/account_and_transaction_api_specification/models/get_account_scheduled_payments_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_account_statement_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_account_statement_response_data.rb +62 -0
- data/lib/account_and_transaction_api_specification/models/get_account_statement_transactions_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_account_statement_transactions_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/get_account_statements_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_account_statements_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/get_offers_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_offers_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/get_party_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_scheduled_payments_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_scheduled_payments_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/get_statements_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/get_statements_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/instructed_amount.rb +73 -0
- data/lib/account_and_transaction_api_specification/models/links.rb +100 -0
- data/lib/account_and_transaction_api_specification/models/merchant_details.rb +75 -0
- data/lib/account_and_transaction_api_specification/models/meta.rb +112 -0
- data/lib/account_and_transaction_api_specification/models/meta_data.rb +112 -0
- data/lib/account_and_transaction_api_specification/models/next_payment_amount.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/offer_model.rb +199 -0
- data/lib/account_and_transaction_api_specification/models/offer_type_enum.rb +32 -0
- data/lib/account_and_transaction_api_specification/models/party_model.rb +144 -0
- data/lib/account_and_transaction_api_specification/models/party_type_enum.rb +26 -0
- data/lib/account_and_transaction_api_specification/models/payment_context_code_enum.rb +32 -0
- data/lib/account_and_transaction_api_specification/models/permission_enum.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/postal_address.rb +138 -0
- data/lib/account_and_transaction_api_specification/models/previous_payment_amount.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/proprietary_bank_transaction_code.rb +70 -0
- data/lib/account_and_transaction_api_specification/models/reference.rb +95 -0
- data/lib/account_and_transaction_api_specification/models/risk.rb +164 -0
- data/lib/account_and_transaction_api_specification/models/scheduled_payment_model.rb +155 -0
- data/lib/account_and_transaction_api_specification/models/scheduled_type_enum.rb +23 -0
- data/lib/account_and_transaction_api_specification/models/scheme_name_enum.rb +21 -0
- data/lib/account_and_transaction_api_specification/models/servicer.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/standing_order_model.rb +289 -0
- data/lib/account_and_transaction_api_specification/models/standing_order_status_code_enum.rb +23 -0
- data/lib/account_and_transaction_api_specification/models/standing_orders_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/standing_orders_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/models/statement.rb +313 -0
- data/lib/account_and_transaction_api_specification/models/statement_amount.rb +81 -0
- data/lib/account_and_transaction_api_specification/models/statement_amount_type_enum.rb +83 -0
- data/lib/account_and_transaction_api_specification/models/statement_benefit.rb +69 -0
- data/lib/account_and_transaction_api_specification/models/statement_benefit_type_enum.rb +29 -0
- data/lib/account_and_transaction_api_specification/models/statement_date_time.rb +81 -0
- data/lib/account_and_transaction_api_specification/models/statement_date_time_type_enum.rb +41 -0
- data/lib/account_and_transaction_api_specification/models/statement_fee.rb +80 -0
- data/lib/account_and_transaction_api_specification/models/statement_fee_type_enum.rb +59 -0
- data/lib/account_and_transaction_api_specification/models/statement_interest.rb +81 -0
- data/lib/account_and_transaction_api_specification/models/statement_interest_type_enum.rb +32 -0
- data/lib/account_and_transaction_api_specification/models/statement_model.rb +313 -0
- data/lib/account_and_transaction_api_specification/models/statement_rate.rb +69 -0
- data/lib/account_and_transaction_api_specification/models/statement_rate_type_enum.rb +47 -0
- data/lib/account_and_transaction_api_specification/models/statement_type_enum.rb +32 -0
- data/lib/account_and_transaction_api_specification/models/statement_value.rb +69 -0
- data/lib/account_and_transaction_api_specification/models/statement_value_type_enum.rb +41 -0
- data/lib/account_and_transaction_api_specification/models/transaction_model.rb +333 -0
- data/lib/account_and_transaction_api_specification/models/transaction_reference.rb +95 -0
- data/lib/account_and_transaction_api_specification/models/transaction_status_enum.rb +23 -0
- data/lib/account_and_transaction_api_specification/models/transactions_response.rb +76 -0
- data/lib/account_and_transaction_api_specification/models/transactions_response_data.rb +71 -0
- data/lib/account_and_transaction_api_specification/utilities/date_time_helper.rb +11 -0
- data/lib/account_and_transaction_api_specification/utilities/file_wrapper.rb +28 -0
- data/lib/account_and_transaction_api_specification.rb +439 -0
- data/test/controllers/controller_test_base.rb +29 -0
- data/test/controllers/test_accounts_controller.rb +45 -0
- data/test/controllers/test_balances_controller.rb +45 -0
- data/test/controllers/test_beneficiaries_controller.rb +45 -0
- data/test/controllers/test_direct_debits_controller.rb +45 -0
- data/test/controllers/test_offers_controller.rb +45 -0
- data/test/controllers/test_party_controller.rb +45 -0
- data/test/controllers/test_scheduled_payments_controller.rb +45 -0
- data/test/controllers/test_standing_orders_controller.rb +45 -0
- data/test/controllers/test_statements_controller.rb +49 -0
- data/test/controllers/test_transactions_controller.rb +49 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +349 -0
@@ -0,0 +1,47 @@
|
|
1
|
+
# account_and_transaction_api_specification
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AccountAndTransactionApiSpecification
|
7
|
+
# Statement rate type, in a coded form.
|
8
|
+
class StatementRateTypeEnum
|
9
|
+
STATEMENT_RATE_TYPE_ENUM = [
|
10
|
+
# TODO: Write general description for ANNUALBALANCETRANSFER
|
11
|
+
ANNUALBALANCETRANSFER = 'AnnualBalanceTransfer'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for ANNUALBALANCETRANSFERAFTERPROMO
|
14
|
+
ANNUALBALANCETRANSFERAFTERPROMO = 'AnnualBalanceTransferAfterPromo'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for ANNUALBALANCETRANSFERPROMO
|
17
|
+
ANNUALBALANCETRANSFERPROMO = 'AnnualBalanceTransferPromo'.freeze,
|
18
|
+
|
19
|
+
# TODO: Write general description for ANNUALCASH
|
20
|
+
ANNUALCASH = 'AnnualCash'.freeze,
|
21
|
+
|
22
|
+
# TODO: Write general description for ANNUALPURCHASE
|
23
|
+
ANNUALPURCHASE = 'AnnualPurchase'.freeze,
|
24
|
+
|
25
|
+
# TODO: Write general description for ANNUALPURCHASEAFTERPROMO
|
26
|
+
ANNUALPURCHASEAFTERPROMO = 'AnnualPurchaseAfterPromo'.freeze,
|
27
|
+
|
28
|
+
# TODO: Write general description for ANNUALPURCHASEPROMO
|
29
|
+
ANNUALPURCHASEPROMO = 'AnnualPurchasePromo'.freeze,
|
30
|
+
|
31
|
+
# TODO: Write general description for MONTHLYBALANCETRANSFER
|
32
|
+
MONTHLYBALANCETRANSFER = 'MonthlyBalanceTransfer'.freeze,
|
33
|
+
|
34
|
+
# TODO: Write general description for MONTHLYCASH
|
35
|
+
MONTHLYCASH = 'MonthlyCash'.freeze,
|
36
|
+
|
37
|
+
# TODO: Write general description for MONTHLYPURCHASE
|
38
|
+
MONTHLYPURCHASE = 'MonthlyPurchase'.freeze
|
39
|
+
].freeze
|
40
|
+
|
41
|
+
def self.validate(value)
|
42
|
+
return false if value.nil?
|
43
|
+
|
44
|
+
STATEMENT_RATE_TYPE_ENUM.include?(value)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# account_and_transaction_api_specification
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AccountAndTransactionApiSpecification
|
7
|
+
# Statement type, in a coded form.
|
8
|
+
class StatementTypeEnum
|
9
|
+
STATEMENT_TYPE_ENUM = [
|
10
|
+
# TODO: Write general description for ACCOUNTCLOSURE
|
11
|
+
ACCOUNTCLOSURE = 'AccountClosure'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for ACCOUNTOPENING
|
14
|
+
ACCOUNTOPENING = 'AccountOpening'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for ANNUAL
|
17
|
+
ANNUAL = 'Annual'.freeze,
|
18
|
+
|
19
|
+
# TODO: Write general description for INTERIM
|
20
|
+
INTERIM = 'Interim'.freeze,
|
21
|
+
|
22
|
+
# TODO: Write general description for REGULARPERIODIC
|
23
|
+
REGULARPERIODIC = 'RegularPeriodic'.freeze
|
24
|
+
].freeze
|
25
|
+
|
26
|
+
def self.validate(value)
|
27
|
+
return false if value.nil?
|
28
|
+
|
29
|
+
STATEMENT_TYPE_ENUM.include?(value)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# account_and_transaction_api_specification
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AccountAndTransactionApiSpecification
|
7
|
+
# Set of elements used to provide details of a generic number value related to
|
8
|
+
# the statement resource.
|
9
|
+
class StatementValue < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# Value associated with the statement value type.
|
14
|
+
# @return [Integer]
|
15
|
+
attr_accessor :value
|
16
|
+
|
17
|
+
# Statement value type, in a coded form.
|
18
|
+
# @return [StatementValueTypeEnum]
|
19
|
+
attr_accessor :type
|
20
|
+
|
21
|
+
# A mapping from model property names to API property names.
|
22
|
+
def self.names
|
23
|
+
@_hash = {} if @_hash.nil?
|
24
|
+
@_hash['value'] = 'Value'
|
25
|
+
@_hash['type'] = 'Type'
|
26
|
+
@_hash
|
27
|
+
end
|
28
|
+
|
29
|
+
# An array for optional fields
|
30
|
+
def self.optionals
|
31
|
+
[]
|
32
|
+
end
|
33
|
+
|
34
|
+
# An array for nullable fields
|
35
|
+
def self.nullables
|
36
|
+
[]
|
37
|
+
end
|
38
|
+
|
39
|
+
def initialize(value = nil, type = nil)
|
40
|
+
@value = value
|
41
|
+
@type = type
|
42
|
+
end
|
43
|
+
|
44
|
+
# Creates an instance of the object from a hash.
|
45
|
+
def self.from_hash(hash)
|
46
|
+
return nil unless hash
|
47
|
+
|
48
|
+
# Extract variables from the hash.
|
49
|
+
value = hash.key?('Value') ? hash['Value'] : nil
|
50
|
+
type = hash.key?('Type') ? hash['Type'] : nil
|
51
|
+
|
52
|
+
# Create object from extracted values.
|
53
|
+
StatementValue.new(value,
|
54
|
+
type)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Provides a human-readable string representation of the object.
|
58
|
+
def to_s
|
59
|
+
class_name = self.class.name.split('::').last
|
60
|
+
"<#{class_name} value: #{@value}, type: #{@type}>"
|
61
|
+
end
|
62
|
+
|
63
|
+
# Provides a debugging-friendly string with detailed object information.
|
64
|
+
def inspect
|
65
|
+
class_name = self.class.name.split('::').last
|
66
|
+
"<#{class_name} value: #{@value.inspect}, type: #{@type.inspect}>"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# account_and_transaction_api_specification
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AccountAndTransactionApiSpecification
|
7
|
+
# Statement value type, in a coded form.
|
8
|
+
class StatementValueTypeEnum
|
9
|
+
STATEMENT_VALUE_TYPE_ENUM = [
|
10
|
+
# TODO: Write general description for AIRMILESPOINTS
|
11
|
+
AIRMILESPOINTS = 'AirMilesPoints'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for AIRMILESPOINTSBALANCE
|
14
|
+
AIRMILESPOINTSBALANCE = 'AirMilesPointsBalance'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for CREDITS
|
17
|
+
CREDITS = 'Credits'.freeze,
|
18
|
+
|
19
|
+
# TODO: Write general description for DEBITS
|
20
|
+
DEBITS = 'Debits'.freeze,
|
21
|
+
|
22
|
+
# TODO: Write general description for HOTELPOINTS
|
23
|
+
HOTELPOINTS = 'HotelPoints'.freeze,
|
24
|
+
|
25
|
+
# TODO: Write general description for HOTELPOINTSBALANCE
|
26
|
+
HOTELPOINTSBALANCE = 'HotelPointsBalance'.freeze,
|
27
|
+
|
28
|
+
# TODO: Write general description for RETAILSHOPPINGPOINTS
|
29
|
+
RETAILSHOPPINGPOINTS = 'RetailShoppingPoints'.freeze,
|
30
|
+
|
31
|
+
# TODO: Write general description for RETAILSHOPPINGPOINTSBALANCE
|
32
|
+
RETAILSHOPPINGPOINTSBALANCE = 'RetailShoppingPointsBalance'.freeze
|
33
|
+
].freeze
|
34
|
+
|
35
|
+
def self.validate(value)
|
36
|
+
return false if value.nil?
|
37
|
+
|
38
|
+
STATEMENT_VALUE_TYPE_ENUM.include?(value)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,333 @@
|
|
1
|
+
# account_and_transaction_api_specification
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'date'
|
7
|
+
module AccountAndTransactionApiSpecification
|
8
|
+
# TransactionModel Model.
|
9
|
+
class TransactionModel < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# A unique and immutable identifier used to identify the account resource.
|
14
|
+
# This identifier has no meaning to the account owner.
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :account_id
|
17
|
+
|
18
|
+
# Unique identifier for the transaction within an servicing institution.
|
19
|
+
# This identifier is both unique and immutable.
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :transaction_id
|
22
|
+
|
23
|
+
# Unique identifier for the transaction within an servicing institution.
|
24
|
+
# This identifier is both unique and immutable.
|
25
|
+
# @return [TransactionReference]
|
26
|
+
attr_accessor :transaction_reference
|
27
|
+
|
28
|
+
# Unique reference for the statement. This reference may be optionally
|
29
|
+
# populated if available.
|
30
|
+
# @return [Array[String]]
|
31
|
+
attr_accessor :statement_reference
|
32
|
+
|
33
|
+
# Amount of money of the cash balance.
|
34
|
+
# @return [Amount]
|
35
|
+
attr_accessor :amount
|
36
|
+
|
37
|
+
# Indicates whether the balance is a credit or a debit balance. Usage: A
|
38
|
+
# zero balance is considered to be a credit balance.
|
39
|
+
# @return [CreditDebitIndicatorEnum]
|
40
|
+
attr_accessor :credit_debit_indicator
|
41
|
+
|
42
|
+
# Status of a transaction entry on the books of the account servicer.
|
43
|
+
# @return [TransactionStatusEnum]
|
44
|
+
attr_accessor :status
|
45
|
+
|
46
|
+
# Date and time when a transaction entry is posted to an account on the
|
47
|
+
# account servicer's books. Usage: Booking date is the expected booking
|
48
|
+
# date, unless the status is booked, in which case it is the actual booking
|
49
|
+
# date.
|
50
|
+
# All dates in the JSON payloads are represented in ISO 8601 date-time
|
51
|
+
# format.
|
52
|
+
# All date-time fields in responses must include the timezone. An example is
|
53
|
+
# below:
|
54
|
+
# 2017-04-05T10:43:07+00:00
|
55
|
+
# @return [DateTime]
|
56
|
+
attr_accessor :booking_date_time
|
57
|
+
|
58
|
+
# Date and time at which assets become available to the account owner in
|
59
|
+
# case of a credit entry, or cease to be available to the account owner in
|
60
|
+
# case of a debit entry. Usage: If entry status is pending and value date
|
61
|
+
# is present, then the value date refers to an expected/requested value
|
62
|
+
# date. For entries subject to availability/float and for which availability
|
63
|
+
# information is provided, the value date must not be used. In this case the
|
64
|
+
# availability component identifies the number of availability days.
|
65
|
+
# All dates in the JSON payloads are represented in ISO 8601 date-time
|
66
|
+
# format.
|
67
|
+
# All date-time fields in responses must include the timezone. An example is
|
68
|
+
# below:
|
69
|
+
# 2017-04-05T10:43:07+00:00
|
70
|
+
# @return [DateTime]
|
71
|
+
attr_accessor :value_date_time
|
72
|
+
|
73
|
+
# Information that locates and identifies a specific address, as defined by
|
74
|
+
# postal services, that is presented in free format text.
|
75
|
+
# @return [String]
|
76
|
+
attr_accessor :address_line
|
77
|
+
|
78
|
+
# Set of elements used to fully identify the type of underlying transaction
|
79
|
+
# resulting in an entry.
|
80
|
+
# @return [BankTransactionCode]
|
81
|
+
attr_accessor :bank_transaction_code
|
82
|
+
|
83
|
+
# Set of elements to fully identify a proprietary bank transaction code.
|
84
|
+
# @return [ProprietaryBankTransactionCode]
|
85
|
+
attr_accessor :proprietary_bank_transaction_code
|
86
|
+
|
87
|
+
# Set of elements used to provide details on the currency exchange.
|
88
|
+
# @return [CurrencyExchange]
|
89
|
+
attr_accessor :currency_exchange
|
90
|
+
|
91
|
+
# Party that manages the account on behalf of the account owner, that is
|
92
|
+
# manages the registration and booking of entries on the account, calculates
|
93
|
+
# balances on the account and provides information about the account.
|
94
|
+
# This is the servicer of the beneficiary account.
|
95
|
+
# @return [CreditorAgent]
|
96
|
+
attr_accessor :creditor_agent
|
97
|
+
|
98
|
+
# Financial institution servicing an account for the debtor.
|
99
|
+
# @return [DebtorAgent]
|
100
|
+
attr_accessor :debtor_agent
|
101
|
+
|
102
|
+
# Set of elements to describe the card instrument used in the transaction.
|
103
|
+
# @return [CardInstrument]
|
104
|
+
attr_accessor :card_instrument
|
105
|
+
|
106
|
+
# Further details of the transaction. This is the transaction narrative,
|
107
|
+
# which is unstructured text.
|
108
|
+
# @return [String]
|
109
|
+
attr_accessor :transaction_information
|
110
|
+
|
111
|
+
# Set of elements used to define the balance as a numerical representation
|
112
|
+
# of the net increases and decreases in an account after a transaction entry
|
113
|
+
# is applied to the account.
|
114
|
+
# @return [Balance]
|
115
|
+
attr_accessor :balance
|
116
|
+
|
117
|
+
# Details of the merchant involved in the transaction.
|
118
|
+
# @return [MerchantDetails]
|
119
|
+
attr_accessor :merchant_details
|
120
|
+
|
121
|
+
# Unambiguous identification of the account of the creditor, in the case of
|
122
|
+
# a debit transaction.
|
123
|
+
# @return [CreditorAccount]
|
124
|
+
attr_accessor :creditor_account
|
125
|
+
|
126
|
+
# Unambiguous identification of the account of the debtor, in the case of a
|
127
|
+
# crebit transaction.
|
128
|
+
# @return [DebtorAccount]
|
129
|
+
attr_accessor :debtor_account
|
130
|
+
|
131
|
+
# A mapping from model property names to API property names.
|
132
|
+
def self.names
|
133
|
+
@_hash = {} if @_hash.nil?
|
134
|
+
@_hash['account_id'] = 'AccountId'
|
135
|
+
@_hash['transaction_id'] = 'TransactionId'
|
136
|
+
@_hash['transaction_reference'] = 'TransactionReference'
|
137
|
+
@_hash['statement_reference'] = 'StatementReference'
|
138
|
+
@_hash['amount'] = 'Amount'
|
139
|
+
@_hash['credit_debit_indicator'] = 'CreditDebitIndicator'
|
140
|
+
@_hash['status'] = 'Status'
|
141
|
+
@_hash['booking_date_time'] = 'BookingDateTime'
|
142
|
+
@_hash['value_date_time'] = 'ValueDateTime'
|
143
|
+
@_hash['address_line'] = 'AddressLine'
|
144
|
+
@_hash['bank_transaction_code'] = 'BankTransactionCode'
|
145
|
+
@_hash['proprietary_bank_transaction_code'] =
|
146
|
+
'ProprietaryBankTransactionCode'
|
147
|
+
@_hash['currency_exchange'] = 'CurrencyExchange'
|
148
|
+
@_hash['creditor_agent'] = 'CreditorAgent'
|
149
|
+
@_hash['debtor_agent'] = 'DebtorAgent'
|
150
|
+
@_hash['card_instrument'] = 'CardInstrument'
|
151
|
+
@_hash['transaction_information'] = 'TransactionInformation'
|
152
|
+
@_hash['balance'] = 'Balance'
|
153
|
+
@_hash['merchant_details'] = 'MerchantDetails'
|
154
|
+
@_hash['creditor_account'] = 'CreditorAccount'
|
155
|
+
@_hash['debtor_account'] = 'DebtorAccount'
|
156
|
+
@_hash
|
157
|
+
end
|
158
|
+
|
159
|
+
# An array for optional fields
|
160
|
+
def self.optionals
|
161
|
+
%w[
|
162
|
+
transaction_id
|
163
|
+
transaction_reference
|
164
|
+
statement_reference
|
165
|
+
value_date_time
|
166
|
+
address_line
|
167
|
+
bank_transaction_code
|
168
|
+
proprietary_bank_transaction_code
|
169
|
+
currency_exchange
|
170
|
+
creditor_agent
|
171
|
+
debtor_agent
|
172
|
+
card_instrument
|
173
|
+
transaction_information
|
174
|
+
balance
|
175
|
+
merchant_details
|
176
|
+
creditor_account
|
177
|
+
debtor_account
|
178
|
+
]
|
179
|
+
end
|
180
|
+
|
181
|
+
# An array for nullable fields
|
182
|
+
def self.nullables
|
183
|
+
[]
|
184
|
+
end
|
185
|
+
|
186
|
+
def initialize(account_id = nil, amount = nil, credit_debit_indicator = nil,
|
187
|
+
status = nil, booking_date_time = nil, transaction_id = SKIP,
|
188
|
+
transaction_reference = SKIP, statement_reference = SKIP,
|
189
|
+
value_date_time = SKIP, address_line = SKIP,
|
190
|
+
bank_transaction_code = SKIP,
|
191
|
+
proprietary_bank_transaction_code = SKIP,
|
192
|
+
currency_exchange = SKIP, creditor_agent = SKIP,
|
193
|
+
debtor_agent = SKIP, card_instrument = SKIP,
|
194
|
+
transaction_information = SKIP, balance = SKIP,
|
195
|
+
merchant_details = SKIP, creditor_account = SKIP,
|
196
|
+
debtor_account = SKIP)
|
197
|
+
@account_id = account_id
|
198
|
+
@transaction_id = transaction_id unless transaction_id == SKIP
|
199
|
+
@transaction_reference = transaction_reference unless transaction_reference == SKIP
|
200
|
+
@statement_reference = statement_reference unless statement_reference == SKIP
|
201
|
+
@amount = amount
|
202
|
+
@credit_debit_indicator = credit_debit_indicator
|
203
|
+
@status = status
|
204
|
+
@booking_date_time = booking_date_time
|
205
|
+
@value_date_time = value_date_time unless value_date_time == SKIP
|
206
|
+
@address_line = address_line unless address_line == SKIP
|
207
|
+
@bank_transaction_code = bank_transaction_code unless bank_transaction_code == SKIP
|
208
|
+
unless proprietary_bank_transaction_code == SKIP
|
209
|
+
@proprietary_bank_transaction_code =
|
210
|
+
proprietary_bank_transaction_code
|
211
|
+
end
|
212
|
+
@currency_exchange = currency_exchange unless currency_exchange == SKIP
|
213
|
+
@creditor_agent = creditor_agent unless creditor_agent == SKIP
|
214
|
+
@debtor_agent = debtor_agent unless debtor_agent == SKIP
|
215
|
+
@card_instrument = card_instrument unless card_instrument == SKIP
|
216
|
+
@transaction_information = transaction_information unless transaction_information == SKIP
|
217
|
+
@balance = balance unless balance == SKIP
|
218
|
+
@merchant_details = merchant_details unless merchant_details == SKIP
|
219
|
+
@creditor_account = creditor_account unless creditor_account == SKIP
|
220
|
+
@debtor_account = debtor_account unless debtor_account == SKIP
|
221
|
+
end
|
222
|
+
|
223
|
+
# Creates an instance of the object from a hash.
|
224
|
+
def self.from_hash(hash)
|
225
|
+
return nil unless hash
|
226
|
+
|
227
|
+
# Extract variables from the hash.
|
228
|
+
account_id = hash.key?('AccountId') ? hash['AccountId'] : nil
|
229
|
+
amount = Amount.from_hash(hash['Amount']) if hash['Amount']
|
230
|
+
credit_debit_indicator =
|
231
|
+
hash.key?('CreditDebitIndicator') ? hash['CreditDebitIndicator'] : nil
|
232
|
+
status = hash.key?('Status') ? hash['Status'] : nil
|
233
|
+
booking_date_time = if hash.key?('BookingDateTime')
|
234
|
+
(DateTimeHelper.from_rfc3339(hash['BookingDateTime']) if hash['BookingDateTime'])
|
235
|
+
end
|
236
|
+
transaction_id = hash.key?('TransactionId') ? hash['TransactionId'] : SKIP
|
237
|
+
transaction_reference = TransactionReference.from_hash(hash['TransactionReference']) if
|
238
|
+
hash['TransactionReference']
|
239
|
+
statement_reference =
|
240
|
+
hash.key?('StatementReference') ? hash['StatementReference'] : SKIP
|
241
|
+
value_date_time = if hash.key?('ValueDateTime')
|
242
|
+
(DateTimeHelper.from_rfc3339(hash['ValueDateTime']) if hash['ValueDateTime'])
|
243
|
+
else
|
244
|
+
SKIP
|
245
|
+
end
|
246
|
+
address_line = hash.key?('AddressLine') ? hash['AddressLine'] : SKIP
|
247
|
+
bank_transaction_code = BankTransactionCode.from_hash(hash['BankTransactionCode']) if
|
248
|
+
hash['BankTransactionCode']
|
249
|
+
if hash['ProprietaryBankTransactionCode']
|
250
|
+
proprietary_bank_transaction_code = ProprietaryBankTransactionCode.from_hash(hash['ProprietaryBankTransactionCode'])
|
251
|
+
end
|
252
|
+
currency_exchange = CurrencyExchange.from_hash(hash['CurrencyExchange']) if
|
253
|
+
hash['CurrencyExchange']
|
254
|
+
creditor_agent = CreditorAgent.from_hash(hash['CreditorAgent']) if hash['CreditorAgent']
|
255
|
+
debtor_agent = DebtorAgent.from_hash(hash['DebtorAgent']) if hash['DebtorAgent']
|
256
|
+
card_instrument = CardInstrument.from_hash(hash['CardInstrument']) if hash['CardInstrument']
|
257
|
+
transaction_information =
|
258
|
+
hash.key?('TransactionInformation') ? hash['TransactionInformation'] : SKIP
|
259
|
+
balance = Balance.from_hash(hash['Balance']) if hash['Balance']
|
260
|
+
merchant_details = MerchantDetails.from_hash(hash['MerchantDetails']) if
|
261
|
+
hash['MerchantDetails']
|
262
|
+
creditor_account = CreditorAccount.from_hash(hash['CreditorAccount']) if
|
263
|
+
hash['CreditorAccount']
|
264
|
+
debtor_account = DebtorAccount.from_hash(hash['DebtorAccount']) if hash['DebtorAccount']
|
265
|
+
|
266
|
+
# Create object from extracted values.
|
267
|
+
TransactionModel.new(account_id,
|
268
|
+
amount,
|
269
|
+
credit_debit_indicator,
|
270
|
+
status,
|
271
|
+
booking_date_time,
|
272
|
+
transaction_id,
|
273
|
+
transaction_reference,
|
274
|
+
statement_reference,
|
275
|
+
value_date_time,
|
276
|
+
address_line,
|
277
|
+
bank_transaction_code,
|
278
|
+
proprietary_bank_transaction_code,
|
279
|
+
currency_exchange,
|
280
|
+
creditor_agent,
|
281
|
+
debtor_agent,
|
282
|
+
card_instrument,
|
283
|
+
transaction_information,
|
284
|
+
balance,
|
285
|
+
merchant_details,
|
286
|
+
creditor_account,
|
287
|
+
debtor_account)
|
288
|
+
end
|
289
|
+
|
290
|
+
def to_custom_booking_date_time
|
291
|
+
DateTimeHelper.to_rfc3339(booking_date_time)
|
292
|
+
end
|
293
|
+
|
294
|
+
def to_custom_value_date_time
|
295
|
+
DateTimeHelper.to_rfc3339(value_date_time)
|
296
|
+
end
|
297
|
+
|
298
|
+
# Provides a human-readable string representation of the object.
|
299
|
+
def to_s
|
300
|
+
class_name = self.class.name.split('::').last
|
301
|
+
"<#{class_name} account_id: #{@account_id}, transaction_id: #{@transaction_id},"\
|
302
|
+
" transaction_reference: #{@transaction_reference}, statement_reference:"\
|
303
|
+
" #{@statement_reference}, amount: #{@amount}, credit_debit_indicator:"\
|
304
|
+
" #{@credit_debit_indicator}, status: #{@status}, booking_date_time: #{@booking_date_time},"\
|
305
|
+
" value_date_time: #{@value_date_time}, address_line: #{@address_line},"\
|
306
|
+
" bank_transaction_code: #{@bank_transaction_code}, proprietary_bank_transaction_code:"\
|
307
|
+
" #{@proprietary_bank_transaction_code}, currency_exchange: #{@currency_exchange},"\
|
308
|
+
" creditor_agent: #{@creditor_agent}, debtor_agent: #{@debtor_agent}, card_instrument:"\
|
309
|
+
" #{@card_instrument}, transaction_information: #{@transaction_information}, balance:"\
|
310
|
+
" #{@balance}, merchant_details: #{@merchant_details}, creditor_account:"\
|
311
|
+
" #{@creditor_account}, debtor_account: #{@debtor_account}>"
|
312
|
+
end
|
313
|
+
|
314
|
+
# Provides a debugging-friendly string with detailed object information.
|
315
|
+
def inspect
|
316
|
+
class_name = self.class.name.split('::').last
|
317
|
+
"<#{class_name} account_id: #{@account_id.inspect}, transaction_id:"\
|
318
|
+
" #{@transaction_id.inspect}, transaction_reference: #{@transaction_reference.inspect},"\
|
319
|
+
" statement_reference: #{@statement_reference.inspect}, amount: #{@amount.inspect},"\
|
320
|
+
" credit_debit_indicator: #{@credit_debit_indicator.inspect}, status: #{@status.inspect},"\
|
321
|
+
" booking_date_time: #{@booking_date_time.inspect}, value_date_time:"\
|
322
|
+
" #{@value_date_time.inspect}, address_line: #{@address_line.inspect},"\
|
323
|
+
" bank_transaction_code: #{@bank_transaction_code.inspect},"\
|
324
|
+
" proprietary_bank_transaction_code: #{@proprietary_bank_transaction_code.inspect},"\
|
325
|
+
" currency_exchange: #{@currency_exchange.inspect}, creditor_agent:"\
|
326
|
+
" #{@creditor_agent.inspect}, debtor_agent: #{@debtor_agent.inspect}, card_instrument:"\
|
327
|
+
" #{@card_instrument.inspect}, transaction_information: #{@transaction_information.inspect},"\
|
328
|
+
" balance: #{@balance.inspect}, merchant_details: #{@merchant_details.inspect},"\
|
329
|
+
" creditor_account: #{@creditor_account.inspect}, debtor_account:"\
|
330
|
+
" #{@debtor_account.inspect}>"
|
331
|
+
end
|
332
|
+
end
|
333
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# account_and_transaction_api_specification
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AccountAndTransactionApiSpecification
|
7
|
+
# TransactionReference Model.
|
8
|
+
class TransactionReference < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :creditor_name
|
15
|
+
|
16
|
+
# TODO: Write general description for this method
|
17
|
+
# @return [CreditorReference]
|
18
|
+
attr_accessor :creditor_reference
|
19
|
+
|
20
|
+
# TODO: Write general description for this method
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :debtor_name
|
23
|
+
|
24
|
+
# TODO: Write general description for this method
|
25
|
+
# @return [CreditorReference]
|
26
|
+
attr_accessor :debtor_reference
|
27
|
+
|
28
|
+
# A mapping from model property names to API property names.
|
29
|
+
def self.names
|
30
|
+
@_hash = {} if @_hash.nil?
|
31
|
+
@_hash['creditor_name'] = 'CreditorName'
|
32
|
+
@_hash['creditor_reference'] = 'CreditorReference'
|
33
|
+
@_hash['debtor_name'] = 'DebtorName'
|
34
|
+
@_hash['debtor_reference'] = 'DebtorReference'
|
35
|
+
@_hash
|
36
|
+
end
|
37
|
+
|
38
|
+
# An array for optional fields
|
39
|
+
def self.optionals
|
40
|
+
%w[
|
41
|
+
creditor_reference
|
42
|
+
debtor_name
|
43
|
+
debtor_reference
|
44
|
+
]
|
45
|
+
end
|
46
|
+
|
47
|
+
# An array for nullable fields
|
48
|
+
def self.nullables
|
49
|
+
[]
|
50
|
+
end
|
51
|
+
|
52
|
+
def initialize(creditor_name = nil, creditor_reference = SKIP,
|
53
|
+
debtor_name = SKIP, debtor_reference = SKIP)
|
54
|
+
@creditor_name = creditor_name
|
55
|
+
@creditor_reference = creditor_reference unless creditor_reference == SKIP
|
56
|
+
@debtor_name = debtor_name unless debtor_name == SKIP
|
57
|
+
@debtor_reference = debtor_reference unless debtor_reference == SKIP
|
58
|
+
end
|
59
|
+
|
60
|
+
# Creates an instance of the object from a hash.
|
61
|
+
def self.from_hash(hash)
|
62
|
+
return nil unless hash
|
63
|
+
|
64
|
+
# Extract variables from the hash.
|
65
|
+
creditor_name = hash.key?('CreditorName') ? hash['CreditorName'] : nil
|
66
|
+
creditor_reference = CreditorReference.from_hash(hash['CreditorReference']) if
|
67
|
+
hash['CreditorReference']
|
68
|
+
debtor_name = hash.key?('DebtorName') ? hash['DebtorName'] : SKIP
|
69
|
+
debtor_reference = CreditorReference.from_hash(hash['DebtorReference']) if
|
70
|
+
hash['DebtorReference']
|
71
|
+
|
72
|
+
# Create object from extracted values.
|
73
|
+
TransactionReference.new(creditor_name,
|
74
|
+
creditor_reference,
|
75
|
+
debtor_name,
|
76
|
+
debtor_reference)
|
77
|
+
end
|
78
|
+
|
79
|
+
# Provides a human-readable string representation of the object.
|
80
|
+
def to_s
|
81
|
+
class_name = self.class.name.split('::').last
|
82
|
+
"<#{class_name} creditor_name: #{@creditor_name}, creditor_reference:"\
|
83
|
+
" #{@creditor_reference}, debtor_name: #{@debtor_name}, debtor_reference:"\
|
84
|
+
" #{@debtor_reference}>"
|
85
|
+
end
|
86
|
+
|
87
|
+
# Provides a debugging-friendly string with detailed object information.
|
88
|
+
def inspect
|
89
|
+
class_name = self.class.name.split('::').last
|
90
|
+
"<#{class_name} creditor_name: #{@creditor_name.inspect}, creditor_reference:"\
|
91
|
+
" #{@creditor_reference.inspect}, debtor_name: #{@debtor_name.inspect}, debtor_reference:"\
|
92
|
+
" #{@debtor_reference.inspect}>"
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# account_and_transaction_api_specification
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AccountAndTransactionApiSpecification
|
7
|
+
# Status of a transaction entry on the books of the account servicer.
|
8
|
+
class TransactionStatusEnum
|
9
|
+
TRANSACTION_STATUS_ENUM = [
|
10
|
+
# TODO: Write general description for BOOKED
|
11
|
+
BOOKED = 'Booked'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for PENDING
|
14
|
+
PENDING = 'Pending'.freeze
|
15
|
+
].freeze
|
16
|
+
|
17
|
+
def self.validate(value)
|
18
|
+
return false if value.nil?
|
19
|
+
|
20
|
+
TRANSACTION_STATUS_ENUM.include?(value)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|