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,71 @@
|
|
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
|
+
# BeneficiariesResponseData Model.
|
8
|
+
class BeneficiariesResponseData < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Beneficiary
|
13
|
+
# @return [Array[BeneficiaryModel]]
|
14
|
+
attr_accessor :beneficiary
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['beneficiary'] = 'Beneficiary'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
# An array for optional fields
|
24
|
+
def self.optionals
|
25
|
+
%w[
|
26
|
+
beneficiary
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
# An array for nullable fields
|
31
|
+
def self.nullables
|
32
|
+
[]
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(beneficiary = SKIP)
|
36
|
+
@beneficiary = beneficiary unless beneficiary == SKIP
|
37
|
+
end
|
38
|
+
|
39
|
+
# Creates an instance of the object from a hash.
|
40
|
+
def self.from_hash(hash)
|
41
|
+
return nil unless hash
|
42
|
+
|
43
|
+
# Extract variables from the hash.
|
44
|
+
# Parameter is an array, so we need to iterate through it
|
45
|
+
beneficiary = nil
|
46
|
+
unless hash['Beneficiary'].nil?
|
47
|
+
beneficiary = []
|
48
|
+
hash['Beneficiary'].each do |structure|
|
49
|
+
beneficiary << (BeneficiaryModel.from_hash(structure) if structure)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
beneficiary = SKIP unless hash.key?('Beneficiary')
|
54
|
+
|
55
|
+
# Create object from extracted values.
|
56
|
+
BeneficiariesResponseData.new(beneficiary)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Provides a human-readable string representation of the object.
|
60
|
+
def to_s
|
61
|
+
class_name = self.class.name.split('::').last
|
62
|
+
"<#{class_name} beneficiary: #{@beneficiary}>"
|
63
|
+
end
|
64
|
+
|
65
|
+
# Provides a debugging-friendly string with detailed object information.
|
66
|
+
def inspect
|
67
|
+
class_name = self.class.name.split('::').last
|
68
|
+
"<#{class_name} beneficiary: #{@beneficiary.inspect}>"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,110 @@
|
|
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
|
+
# BeneficiaryModel Model.
|
8
|
+
class BeneficiaryModel < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# A unique and immutable identifier used to identify the account resource.
|
13
|
+
# This identifier has no meaning to the account owner.
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :account_id
|
16
|
+
|
17
|
+
# A unique and immutable identifier used to identify the beneficiary
|
18
|
+
# resource. This identifier has no meaning to the account owner.
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :beneficiary_id
|
21
|
+
|
22
|
+
# A unique and immutable identifier used to identify the beneficiary
|
23
|
+
# resource. This identifier has no meaning to the account owner.
|
24
|
+
# @return [Reference]
|
25
|
+
attr_accessor :reference
|
26
|
+
|
27
|
+
# Party that manages the account on behalf of the account owner, that is
|
28
|
+
# manages the registration and booking of entries on the account, calculates
|
29
|
+
# balances on the account and provides information about the account.
|
30
|
+
# This is the servicer of the beneficiary account.
|
31
|
+
# @return [CreditorAgent]
|
32
|
+
attr_accessor :creditor_agent
|
33
|
+
|
34
|
+
# Unambiguous identification of the account of the creditor, in the case of
|
35
|
+
# a debit transaction.
|
36
|
+
# @return [CreditorAccount]
|
37
|
+
attr_accessor :creditor_account
|
38
|
+
|
39
|
+
# A mapping from model property names to API property names.
|
40
|
+
def self.names
|
41
|
+
@_hash = {} if @_hash.nil?
|
42
|
+
@_hash['account_id'] = 'AccountId'
|
43
|
+
@_hash['beneficiary_id'] = 'BeneficiaryId'
|
44
|
+
@_hash['reference'] = 'Reference'
|
45
|
+
@_hash['creditor_agent'] = 'CreditorAgent'
|
46
|
+
@_hash['creditor_account'] = 'CreditorAccount'
|
47
|
+
@_hash
|
48
|
+
end
|
49
|
+
|
50
|
+
# An array for optional fields
|
51
|
+
def self.optionals
|
52
|
+
%w[
|
53
|
+
beneficiary_id
|
54
|
+
reference
|
55
|
+
creditor_agent
|
56
|
+
creditor_account
|
57
|
+
]
|
58
|
+
end
|
59
|
+
|
60
|
+
# An array for nullable fields
|
61
|
+
def self.nullables
|
62
|
+
[]
|
63
|
+
end
|
64
|
+
|
65
|
+
def initialize(account_id = nil, beneficiary_id = SKIP, reference = SKIP,
|
66
|
+
creditor_agent = SKIP, creditor_account = SKIP)
|
67
|
+
@account_id = account_id
|
68
|
+
@beneficiary_id = beneficiary_id unless beneficiary_id == SKIP
|
69
|
+
@reference = reference unless reference == SKIP
|
70
|
+
@creditor_agent = creditor_agent unless creditor_agent == SKIP
|
71
|
+
@creditor_account = creditor_account unless creditor_account == SKIP
|
72
|
+
end
|
73
|
+
|
74
|
+
# Creates an instance of the object from a hash.
|
75
|
+
def self.from_hash(hash)
|
76
|
+
return nil unless hash
|
77
|
+
|
78
|
+
# Extract variables from the hash.
|
79
|
+
account_id = hash.key?('AccountId') ? hash['AccountId'] : nil
|
80
|
+
beneficiary_id = hash.key?('BeneficiaryId') ? hash['BeneficiaryId'] : SKIP
|
81
|
+
reference = Reference.from_hash(hash['Reference']) if hash['Reference']
|
82
|
+
creditor_agent = CreditorAgent.from_hash(hash['CreditorAgent']) if hash['CreditorAgent']
|
83
|
+
creditor_account = CreditorAccount.from_hash(hash['CreditorAccount']) if
|
84
|
+
hash['CreditorAccount']
|
85
|
+
|
86
|
+
# Create object from extracted values.
|
87
|
+
BeneficiaryModel.new(account_id,
|
88
|
+
beneficiary_id,
|
89
|
+
reference,
|
90
|
+
creditor_agent,
|
91
|
+
creditor_account)
|
92
|
+
end
|
93
|
+
|
94
|
+
# Provides a human-readable string representation of the object.
|
95
|
+
def to_s
|
96
|
+
class_name = self.class.name.split('::').last
|
97
|
+
"<#{class_name} account_id: #{@account_id}, beneficiary_id: #{@beneficiary_id}, reference:"\
|
98
|
+
" #{@reference}, creditor_agent: #{@creditor_agent}, creditor_account:"\
|
99
|
+
" #{@creditor_account}>"
|
100
|
+
end
|
101
|
+
|
102
|
+
# Provides a debugging-friendly string with detailed object information.
|
103
|
+
def inspect
|
104
|
+
class_name = self.class.name.split('::').last
|
105
|
+
"<#{class_name} account_id: #{@account_id.inspect}, beneficiary_id:"\
|
106
|
+
" #{@beneficiary_id.inspect}, reference: #{@reference.inspect}, creditor_agent:"\
|
107
|
+
" #{@creditor_agent.inspect}, creditor_account: #{@creditor_account.inspect}>"
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,97 @@
|
|
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 to describe the card instrument used in the transaction.
|
8
|
+
class CardInstrument < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Name of the card scheme.
|
13
|
+
# @return [CardSchemeNameEnum]
|
14
|
+
attr_accessor :card_scheme_name
|
15
|
+
|
16
|
+
# The card authorisation type.
|
17
|
+
# @return [AuthorisationTypeEnum]
|
18
|
+
attr_accessor :authorisation_type
|
19
|
+
|
20
|
+
# Name of the cardholder using the card instrument.
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :name
|
23
|
+
|
24
|
+
# Identification assigned by an institution to identify the card instrument
|
25
|
+
# used in the transaction. This identification is known by the account
|
26
|
+
# owner, and may be masked.
|
27
|
+
# @return [String]
|
28
|
+
attr_accessor :identification
|
29
|
+
|
30
|
+
# A mapping from model property names to API property names.
|
31
|
+
def self.names
|
32
|
+
@_hash = {} if @_hash.nil?
|
33
|
+
@_hash['card_scheme_name'] = 'CardSchemeName'
|
34
|
+
@_hash['authorisation_type'] = 'AuthorisationType'
|
35
|
+
@_hash['name'] = 'Name'
|
36
|
+
@_hash['identification'] = 'Identification'
|
37
|
+
@_hash
|
38
|
+
end
|
39
|
+
|
40
|
+
# An array for optional fields
|
41
|
+
def self.optionals
|
42
|
+
%w[
|
43
|
+
authorisation_type
|
44
|
+
name
|
45
|
+
identification
|
46
|
+
]
|
47
|
+
end
|
48
|
+
|
49
|
+
# An array for nullable fields
|
50
|
+
def self.nullables
|
51
|
+
[]
|
52
|
+
end
|
53
|
+
|
54
|
+
def initialize(card_scheme_name = nil, authorisation_type = SKIP,
|
55
|
+
name = SKIP, identification = SKIP)
|
56
|
+
@card_scheme_name = card_scheme_name
|
57
|
+
@authorisation_type = authorisation_type unless authorisation_type == SKIP
|
58
|
+
@name = name unless name == SKIP
|
59
|
+
@identification = identification unless identification == SKIP
|
60
|
+
end
|
61
|
+
|
62
|
+
# Creates an instance of the object from a hash.
|
63
|
+
def self.from_hash(hash)
|
64
|
+
return nil unless hash
|
65
|
+
|
66
|
+
# Extract variables from the hash.
|
67
|
+
card_scheme_name =
|
68
|
+
hash.key?('CardSchemeName') ? hash['CardSchemeName'] : nil
|
69
|
+
authorisation_type =
|
70
|
+
hash.key?('AuthorisationType') ? hash['AuthorisationType'] : SKIP
|
71
|
+
name = hash.key?('Name') ? hash['Name'] : SKIP
|
72
|
+
identification =
|
73
|
+
hash.key?('Identification') ? hash['Identification'] : SKIP
|
74
|
+
|
75
|
+
# Create object from extracted values.
|
76
|
+
CardInstrument.new(card_scheme_name,
|
77
|
+
authorisation_type,
|
78
|
+
name,
|
79
|
+
identification)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Provides a human-readable string representation of the object.
|
83
|
+
def to_s
|
84
|
+
class_name = self.class.name.split('::').last
|
85
|
+
"<#{class_name} card_scheme_name: #{@card_scheme_name}, authorisation_type:"\
|
86
|
+
" #{@authorisation_type}, name: #{@name}, identification: #{@identification}>"
|
87
|
+
end
|
88
|
+
|
89
|
+
# Provides a debugging-friendly string with detailed object information.
|
90
|
+
def inspect
|
91
|
+
class_name = self.class.name.split('::').last
|
92
|
+
"<#{class_name} card_scheme_name: #{@card_scheme_name.inspect}, authorisation_type:"\
|
93
|
+
" #{@authorisation_type.inspect}, name: #{@name.inspect}, identification:"\
|
94
|
+
" #{@identification.inspect}>"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
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
|
+
# Name of the card scheme.
|
8
|
+
class CardSchemeNameEnum
|
9
|
+
CARD_SCHEME_NAME_ENUM = [
|
10
|
+
# TODO: Write general description for AMERICANEXPRESS
|
11
|
+
AMERICANEXPRESS = 'AmericanExpress'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for DINERS
|
14
|
+
DINERS = 'Diners'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for DISCOVER
|
17
|
+
DISCOVER = 'Discover'.freeze,
|
18
|
+
|
19
|
+
# TODO: Write general description for MASTERCARD
|
20
|
+
MASTERCARD = 'MasterCard'.freeze,
|
21
|
+
|
22
|
+
# TODO: Write general description for VISA
|
23
|
+
VISA = 'VISA'.freeze
|
24
|
+
].freeze
|
25
|
+
|
26
|
+
def self.validate(value)
|
27
|
+
return false if value.nil?
|
28
|
+
|
29
|
+
CARD_SCHEME_NAME_ENUM.include?(value)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,145 @@
|
|
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
|
+
# Contains the requested consent
|
9
|
+
class Consent < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# Specifies the Open Banking account access consent types. This is a list of
|
14
|
+
# the data clusters being consented by the Customer, and requested for
|
15
|
+
# authorisation with the API Provider.
|
16
|
+
# @return [Array[PermissionEnum]]
|
17
|
+
attr_accessor :permissions
|
18
|
+
|
19
|
+
# Specified date and time the permissions will expire. If this is not
|
20
|
+
# populated, the permissions will be open ended.
|
21
|
+
# All dates in the JSON payloads are represented in ISO 8601 date-time
|
22
|
+
# format.
|
23
|
+
# All date-time fields in responses must include the timezone. An example is
|
24
|
+
# below:
|
25
|
+
# 2017-04-05T10:43:07+00:00
|
26
|
+
# @return [DateTime]
|
27
|
+
attr_accessor :expiration_date_time
|
28
|
+
|
29
|
+
# Specified start date and time for the transaction query period. If this is
|
30
|
+
# not populated, the start date will be open ended, and data will be
|
31
|
+
# returned from the earliest available transaction.
|
32
|
+
# All dates in the JSON payloads are represented in ISO 8601 date-time
|
33
|
+
# format.
|
34
|
+
# All date-time fields in responses must include the timezone. An example is
|
35
|
+
# below:
|
36
|
+
# 2017-04-05T10:43:07+00:00
|
37
|
+
# @return [DateTime]
|
38
|
+
attr_accessor :transaction_from_date_time
|
39
|
+
|
40
|
+
# Specified end date and time for the transaction query period. If this is
|
41
|
+
# not populated, the end date will be open ended, and data will be returned
|
42
|
+
# to the latest available transaction.
|
43
|
+
# All dates in the JSON payloads are represented in ISO 8601 date-time
|
44
|
+
# format.
|
45
|
+
# All date-time fields in responses must include the timezone. An example is
|
46
|
+
# below:
|
47
|
+
# 2017-04-05T10:43:07+00:00
|
48
|
+
# @return [DateTime]
|
49
|
+
attr_accessor :transaction_to_date_time
|
50
|
+
|
51
|
+
# A mapping from model property names to API property names.
|
52
|
+
def self.names
|
53
|
+
@_hash = {} if @_hash.nil?
|
54
|
+
@_hash['permissions'] = 'Permissions'
|
55
|
+
@_hash['expiration_date_time'] = 'ExpirationDateTime'
|
56
|
+
@_hash['transaction_from_date_time'] = 'TransactionFromDateTime'
|
57
|
+
@_hash['transaction_to_date_time'] = 'TransactionToDateTime'
|
58
|
+
@_hash
|
59
|
+
end
|
60
|
+
|
61
|
+
# An array for optional fields
|
62
|
+
def self.optionals
|
63
|
+
%w[
|
64
|
+
expiration_date_time
|
65
|
+
transaction_from_date_time
|
66
|
+
transaction_to_date_time
|
67
|
+
]
|
68
|
+
end
|
69
|
+
|
70
|
+
# An array for nullable fields
|
71
|
+
def self.nullables
|
72
|
+
[]
|
73
|
+
end
|
74
|
+
|
75
|
+
def initialize(permissions = nil, expiration_date_time = SKIP,
|
76
|
+
transaction_from_date_time = SKIP,
|
77
|
+
transaction_to_date_time = SKIP)
|
78
|
+
@permissions = permissions
|
79
|
+
@expiration_date_time = expiration_date_time unless expiration_date_time == SKIP
|
80
|
+
unless transaction_from_date_time == SKIP
|
81
|
+
@transaction_from_date_time =
|
82
|
+
transaction_from_date_time
|
83
|
+
end
|
84
|
+
@transaction_to_date_time = transaction_to_date_time unless transaction_to_date_time == SKIP
|
85
|
+
end
|
86
|
+
|
87
|
+
# Creates an instance of the object from a hash.
|
88
|
+
def self.from_hash(hash)
|
89
|
+
return nil unless hash
|
90
|
+
|
91
|
+
# Extract variables from the hash.
|
92
|
+
permissions = hash.key?('Permissions') ? hash['Permissions'] : nil
|
93
|
+
expiration_date_time = if hash.key?('ExpirationDateTime')
|
94
|
+
(DateTimeHelper.from_rfc3339(hash['ExpirationDateTime']) if hash['ExpirationDateTime'])
|
95
|
+
else
|
96
|
+
SKIP
|
97
|
+
end
|
98
|
+
transaction_from_date_time = if hash.key?('TransactionFromDateTime')
|
99
|
+
(DateTimeHelper.from_rfc3339(hash['TransactionFromDateTime']) if hash['TransactionFromDateTime'])
|
100
|
+
else
|
101
|
+
SKIP
|
102
|
+
end
|
103
|
+
transaction_to_date_time = if hash.key?('TransactionToDateTime')
|
104
|
+
(DateTimeHelper.from_rfc3339(hash['TransactionToDateTime']) if hash['TransactionToDateTime'])
|
105
|
+
else
|
106
|
+
SKIP
|
107
|
+
end
|
108
|
+
|
109
|
+
# Create object from extracted values.
|
110
|
+
Consent.new(permissions,
|
111
|
+
expiration_date_time,
|
112
|
+
transaction_from_date_time,
|
113
|
+
transaction_to_date_time)
|
114
|
+
end
|
115
|
+
|
116
|
+
def to_custom_expiration_date_time
|
117
|
+
DateTimeHelper.to_rfc3339(expiration_date_time)
|
118
|
+
end
|
119
|
+
|
120
|
+
def to_custom_transaction_from_date_time
|
121
|
+
DateTimeHelper.to_rfc3339(transaction_from_date_time)
|
122
|
+
end
|
123
|
+
|
124
|
+
def to_custom_transaction_to_date_time
|
125
|
+
DateTimeHelper.to_rfc3339(transaction_to_date_time)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Provides a human-readable string representation of the object.
|
129
|
+
def to_s
|
130
|
+
class_name = self.class.name.split('::').last
|
131
|
+
"<#{class_name} permissions: #{@permissions}, expiration_date_time:"\
|
132
|
+
" #{@expiration_date_time}, transaction_from_date_time: #{@transaction_from_date_time},"\
|
133
|
+
" transaction_to_date_time: #{@transaction_to_date_time}>"
|
134
|
+
end
|
135
|
+
|
136
|
+
# Provides a debugging-friendly string with detailed object information.
|
137
|
+
def inspect
|
138
|
+
class_name = self.class.name.split('::').last
|
139
|
+
"<#{class_name} permissions: #{@permissions.inspect}, expiration_date_time:"\
|
140
|
+
" #{@expiration_date_time.inspect}, transaction_from_date_time:"\
|
141
|
+
" #{@transaction_from_date_time.inspect}, transaction_to_date_time:"\
|
142
|
+
" #{@transaction_to_date_time.inspect}>"
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
@@ -0,0 +1,24 @@
|
|
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
|
+
# Indicates whether the balance is a credit or a debit balance. Usage: A zero
|
8
|
+
# balance is considered to be a credit balance.
|
9
|
+
class CreditDebitIndicatorEnum
|
10
|
+
CREDIT_DEBIT_INDICATOR_ENUM = [
|
11
|
+
# TODO: Write general description for CREDIT
|
12
|
+
CREDIT = 'Credit'.freeze,
|
13
|
+
|
14
|
+
# TODO: Write general description for DEBIT
|
15
|
+
DEBIT = 'Debit'.freeze
|
16
|
+
].freeze
|
17
|
+
|
18
|
+
def self.validate(value)
|
19
|
+
return false if value.nil?
|
20
|
+
|
21
|
+
CREDIT_DEBIT_INDICATOR_ENUM.include?(value)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,82 @@
|
|
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
|
+
# CreditLine Model.
|
8
|
+
class CreditLine < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Indicates whether or not the credit line is included in the balance of the
|
13
|
+
# account. Usage: If not present, credit line is not included in the balance
|
14
|
+
# amount of the account.
|
15
|
+
# @return [TrueClass | FalseClass]
|
16
|
+
attr_accessor :included
|
17
|
+
|
18
|
+
# Amount of money of the cash balance.
|
19
|
+
# @return [Amount]
|
20
|
+
attr_accessor :amount
|
21
|
+
|
22
|
+
# Limit type, in a coded form.
|
23
|
+
# @return [CreditLineTypeEnum]
|
24
|
+
attr_accessor :type
|
25
|
+
|
26
|
+
# A mapping from model property names to API property names.
|
27
|
+
def self.names
|
28
|
+
@_hash = {} if @_hash.nil?
|
29
|
+
@_hash['included'] = 'Included'
|
30
|
+
@_hash['amount'] = 'Amount'
|
31
|
+
@_hash['type'] = 'Type'
|
32
|
+
@_hash
|
33
|
+
end
|
34
|
+
|
35
|
+
# An array for optional fields
|
36
|
+
def self.optionals
|
37
|
+
%w[
|
38
|
+
amount
|
39
|
+
type
|
40
|
+
]
|
41
|
+
end
|
42
|
+
|
43
|
+
# An array for nullable fields
|
44
|
+
def self.nullables
|
45
|
+
[]
|
46
|
+
end
|
47
|
+
|
48
|
+
def initialize(included = nil, amount = SKIP, type = SKIP)
|
49
|
+
@included = included
|
50
|
+
@amount = amount unless amount == SKIP
|
51
|
+
@type = type unless type == SKIP
|
52
|
+
end
|
53
|
+
|
54
|
+
# Creates an instance of the object from a hash.
|
55
|
+
def self.from_hash(hash)
|
56
|
+
return nil unless hash
|
57
|
+
|
58
|
+
# Extract variables from the hash.
|
59
|
+
included = hash.key?('Included') ? hash['Included'] : nil
|
60
|
+
amount = Amount.from_hash(hash['Amount']) if hash['Amount']
|
61
|
+
type = hash.key?('Type') ? hash['Type'] : SKIP
|
62
|
+
|
63
|
+
# Create object from extracted values.
|
64
|
+
CreditLine.new(included,
|
65
|
+
amount,
|
66
|
+
type)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Provides a human-readable string representation of the object.
|
70
|
+
def to_s
|
71
|
+
class_name = self.class.name.split('::').last
|
72
|
+
"<#{class_name} included: #{@included}, amount: #{@amount}, type: #{@type}>"
|
73
|
+
end
|
74
|
+
|
75
|
+
# Provides a debugging-friendly string with detailed object information.
|
76
|
+
def inspect
|
77
|
+
class_name = self.class.name.split('::').last
|
78
|
+
"<#{class_name} included: #{@included.inspect}, amount: #{@amount.inspect}, type:"\
|
79
|
+
" #{@type.inspect}>"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,26 @@
|
|
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
|
+
# Limit type, in a coded form.
|
8
|
+
class CreditLineTypeEnum
|
9
|
+
CREDIT_LINE_TYPE_ENUM = [
|
10
|
+
# TODO: Write general description for PREAGREED
|
11
|
+
PREAGREED = 'Pre-Agreed'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for EMERGENCY
|
14
|
+
EMERGENCY = 'Emergency'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for TEMPORARY
|
17
|
+
TEMPORARY = 'Temporary'.freeze
|
18
|
+
].freeze
|
19
|
+
|
20
|
+
def self.validate(value)
|
21
|
+
return false if value.nil?
|
22
|
+
|
23
|
+
CREDIT_LINE_TYPE_ENUM.include?(value)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,102 @@
|
|
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
|
+
# Unambiguous identification of the account of the creditor, in the case of a
|
8
|
+
# debit transaction.
|
9
|
+
class CreditorAccount < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# TODO: Write general description for this method
|
14
|
+
# @return [AccountSchemeModelEnum]
|
15
|
+
attr_accessor :scheme_name
|
16
|
+
|
17
|
+
# Identification assigned by an institution to identify an account. This
|
18
|
+
# identification is known by the account owner.
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :identification
|
21
|
+
|
22
|
+
# Name of the account, as assigned by the account servicing institution, in
|
23
|
+
# agreement with the account owner in order to provide an additional means
|
24
|
+
# of identification of the account.
|
25
|
+
# Usage: The account name is different from the account owner name. The
|
26
|
+
# account name is used in certain user communities to provide a means of
|
27
|
+
# identifying the account, in addition to the account owner's identity and
|
28
|
+
# the account number.
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :name
|
31
|
+
|
32
|
+
# This is secondary identification of the account, as assigned by the
|
33
|
+
# account servicing institution.
|
34
|
+
# @return [String]
|
35
|
+
attr_accessor :secondary_identification
|
36
|
+
|
37
|
+
# A mapping from model property names to API property names.
|
38
|
+
def self.names
|
39
|
+
@_hash = {} if @_hash.nil?
|
40
|
+
@_hash['scheme_name'] = 'SchemeName'
|
41
|
+
@_hash['identification'] = 'Identification'
|
42
|
+
@_hash['name'] = 'Name'
|
43
|
+
@_hash['secondary_identification'] = 'SecondaryIdentification'
|
44
|
+
@_hash
|
45
|
+
end
|
46
|
+
|
47
|
+
# An array for optional fields
|
48
|
+
def self.optionals
|
49
|
+
%w[
|
50
|
+
name
|
51
|
+
secondary_identification
|
52
|
+
]
|
53
|
+
end
|
54
|
+
|
55
|
+
# An array for nullable fields
|
56
|
+
def self.nullables
|
57
|
+
[]
|
58
|
+
end
|
59
|
+
|
60
|
+
def initialize(scheme_name = nil, identification = nil, name = SKIP,
|
61
|
+
secondary_identification = SKIP)
|
62
|
+
@scheme_name = scheme_name
|
63
|
+
@identification = identification
|
64
|
+
@name = name unless name == SKIP
|
65
|
+
@secondary_identification = secondary_identification unless secondary_identification == SKIP
|
66
|
+
end
|
67
|
+
|
68
|
+
# Creates an instance of the object from a hash.
|
69
|
+
def self.from_hash(hash)
|
70
|
+
return nil unless hash
|
71
|
+
|
72
|
+
# Extract variables from the hash.
|
73
|
+
scheme_name = hash.key?('SchemeName') ? hash['SchemeName'] : nil
|
74
|
+
identification =
|
75
|
+
hash.key?('Identification') ? hash['Identification'] : nil
|
76
|
+
name = hash.key?('Name') ? hash['Name'] : SKIP
|
77
|
+
secondary_identification =
|
78
|
+
hash.key?('SecondaryIdentification') ? hash['SecondaryIdentification'] : SKIP
|
79
|
+
|
80
|
+
# Create object from extracted values.
|
81
|
+
CreditorAccount.new(scheme_name,
|
82
|
+
identification,
|
83
|
+
name,
|
84
|
+
secondary_identification)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Provides a human-readable string representation of the object.
|
88
|
+
def to_s
|
89
|
+
class_name = self.class.name.split('::').last
|
90
|
+
"<#{class_name} scheme_name: #{@scheme_name}, identification: #{@identification}, name:"\
|
91
|
+
" #{@name}, secondary_identification: #{@secondary_identification}>"
|
92
|
+
end
|
93
|
+
|
94
|
+
# Provides a debugging-friendly string with detailed object information.
|
95
|
+
def inspect
|
96
|
+
class_name = self.class.name.split('::').last
|
97
|
+
"<#{class_name} scheme_name: #{@scheme_name.inspect}, identification:"\
|
98
|
+
" #{@identification.inspect}, name: #{@name.inspect}, secondary_identification:"\
|
99
|
+
" #{@secondary_identification.inspect}>"
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|