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,136 @@
|
|
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
|
+
# Balance object schema
|
9
|
+
class BalanceModel < 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
|
+
# Amount of money of the cash balance.
|
19
|
+
# @return [Amount]
|
20
|
+
attr_accessor :amount
|
21
|
+
|
22
|
+
# Indicates whether the balance is a credit or a debit balance. Usage: A
|
23
|
+
# zero balance is considered to be a credit balance.
|
24
|
+
# @return [CreditDebitIndicatorEnum]
|
25
|
+
attr_accessor :credit_debit_indicator
|
26
|
+
|
27
|
+
# Balance type, in a coded form.
|
28
|
+
# @return [BalanceModelTypeEnum]
|
29
|
+
attr_accessor :type
|
30
|
+
|
31
|
+
# Indicates the date (and time) of the balance.
|
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 :date_time
|
39
|
+
|
40
|
+
# Indicates the date (and time) of the balance.
|
41
|
+
# All dates in the JSON payloads are represented in ISO 8601 date-time
|
42
|
+
# format.
|
43
|
+
# All date-time fields in responses must include the timezone. An example is
|
44
|
+
# below:
|
45
|
+
# 2017-04-05T10:43:07+00:00
|
46
|
+
# @return [Array[CreditLine]]
|
47
|
+
attr_accessor :credit_line
|
48
|
+
|
49
|
+
# A mapping from model property names to API property names.
|
50
|
+
def self.names
|
51
|
+
@_hash = {} if @_hash.nil?
|
52
|
+
@_hash['account_id'] = 'AccountId'
|
53
|
+
@_hash['amount'] = 'Amount'
|
54
|
+
@_hash['credit_debit_indicator'] = 'CreditDebitIndicator'
|
55
|
+
@_hash['type'] = 'Type'
|
56
|
+
@_hash['date_time'] = 'DateTime'
|
57
|
+
@_hash['credit_line'] = 'CreditLine'
|
58
|
+
@_hash
|
59
|
+
end
|
60
|
+
|
61
|
+
# An array for optional fields
|
62
|
+
def self.optionals
|
63
|
+
%w[
|
64
|
+
credit_line
|
65
|
+
]
|
66
|
+
end
|
67
|
+
|
68
|
+
# An array for nullable fields
|
69
|
+
def self.nullables
|
70
|
+
[]
|
71
|
+
end
|
72
|
+
|
73
|
+
def initialize(account_id = nil, amount = nil, credit_debit_indicator = nil,
|
74
|
+
type = nil, date_time = nil, credit_line = SKIP)
|
75
|
+
@account_id = account_id
|
76
|
+
@amount = amount
|
77
|
+
@credit_debit_indicator = credit_debit_indicator
|
78
|
+
@type = type
|
79
|
+
@date_time = date_time
|
80
|
+
@credit_line = credit_line unless credit_line == SKIP
|
81
|
+
end
|
82
|
+
|
83
|
+
# Creates an instance of the object from a hash.
|
84
|
+
def self.from_hash(hash)
|
85
|
+
return nil unless hash
|
86
|
+
|
87
|
+
# Extract variables from the hash.
|
88
|
+
account_id = hash.key?('AccountId') ? hash['AccountId'] : nil
|
89
|
+
amount = Amount.from_hash(hash['Amount']) if hash['Amount']
|
90
|
+
credit_debit_indicator =
|
91
|
+
hash.key?('CreditDebitIndicator') ? hash['CreditDebitIndicator'] : nil
|
92
|
+
type = hash.key?('Type') ? hash['Type'] : nil
|
93
|
+
date_time = if hash.key?('DateTime')
|
94
|
+
(DateTimeHelper.from_rfc3339(hash['DateTime']) if hash['DateTime'])
|
95
|
+
end
|
96
|
+
# Parameter is an array, so we need to iterate through it
|
97
|
+
credit_line = nil
|
98
|
+
unless hash['CreditLine'].nil?
|
99
|
+
credit_line = []
|
100
|
+
hash['CreditLine'].each do |structure|
|
101
|
+
credit_line << (CreditLine.from_hash(structure) if structure)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
credit_line = SKIP unless hash.key?('CreditLine')
|
106
|
+
|
107
|
+
# Create object from extracted values.
|
108
|
+
BalanceModel.new(account_id,
|
109
|
+
amount,
|
110
|
+
credit_debit_indicator,
|
111
|
+
type,
|
112
|
+
date_time,
|
113
|
+
credit_line)
|
114
|
+
end
|
115
|
+
|
116
|
+
def to_custom_date_time
|
117
|
+
DateTimeHelper.to_rfc3339(date_time)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Provides a human-readable string representation of the object.
|
121
|
+
def to_s
|
122
|
+
class_name = self.class.name.split('::').last
|
123
|
+
"<#{class_name} account_id: #{@account_id}, amount: #{@amount}, credit_debit_indicator:"\
|
124
|
+
" #{@credit_debit_indicator}, type: #{@type}, date_time: #{@date_time}, credit_line:"\
|
125
|
+
" #{@credit_line}>"
|
126
|
+
end
|
127
|
+
|
128
|
+
# Provides a debugging-friendly string with detailed object information.
|
129
|
+
def inspect
|
130
|
+
class_name = self.class.name.split('::').last
|
131
|
+
"<#{class_name} account_id: #{@account_id.inspect}, amount: #{@amount.inspect},"\
|
132
|
+
" credit_debit_indicator: #{@credit_debit_indicator.inspect}, type: #{@type.inspect},"\
|
133
|
+
" date_time: #{@date_time.inspect}, credit_line: #{@credit_line.inspect}>"
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -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
|
+
# Balance type, in a coded form.
|
8
|
+
class BalanceModelTypeEnum
|
9
|
+
BALANCE_MODEL_TYPE_ENUM = [
|
10
|
+
# TODO: Write general description for CLOSINGAVAILABLE
|
11
|
+
CLOSINGAVAILABLE = 'ClosingAvailable'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for CLOSINGBOOKED
|
14
|
+
CLOSINGBOOKED = 'ClosingBooked'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for EXPECTED
|
17
|
+
EXPECTED = 'Expected'.freeze,
|
18
|
+
|
19
|
+
# TODO: Write general description for FORWARDAVAILABLE
|
20
|
+
FORWARDAVAILABLE = 'ForwardAvailable'.freeze,
|
21
|
+
|
22
|
+
# TODO: Write general description for INFORMATION
|
23
|
+
INFORMATION = 'Information'.freeze,
|
24
|
+
|
25
|
+
# TODO: Write general description for INTERIMAVAILABLE
|
26
|
+
INTERIMAVAILABLE = 'InterimAvailable'.freeze,
|
27
|
+
|
28
|
+
# TODO: Write general description for INTERIMBOOKED
|
29
|
+
INTERIMBOOKED = 'InterimBooked'.freeze,
|
30
|
+
|
31
|
+
# TODO: Write general description for OPENINGAVAILABLE
|
32
|
+
OPENINGAVAILABLE = 'OpeningAvailable'.freeze,
|
33
|
+
|
34
|
+
# TODO: Write general description for OPENINGBOOKED
|
35
|
+
OPENINGBOOKED = 'OpeningBooked'.freeze,
|
36
|
+
|
37
|
+
# TODO: Write general description for PREVIOUSLYCLOSEDBOOKED
|
38
|
+
PREVIOUSLYCLOSEDBOOKED = 'PreviouslyClosedBooked'.freeze
|
39
|
+
].freeze
|
40
|
+
|
41
|
+
def self.validate(value)
|
42
|
+
return false if value.nil?
|
43
|
+
|
44
|
+
BALANCE_MODEL_TYPE_ENUM.include?(value)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,76 @@
|
|
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
|
+
# BalancesResponse Model.
|
8
|
+
class BalancesResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [BalancesResponseData]
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
# Links relevant to the payload
|
17
|
+
# @return [Links]
|
18
|
+
attr_accessor :links
|
19
|
+
|
20
|
+
# Links relevant to the payload
|
21
|
+
# @return [Meta]
|
22
|
+
attr_accessor :meta
|
23
|
+
|
24
|
+
# A mapping from model property names to API property names.
|
25
|
+
def self.names
|
26
|
+
@_hash = {} if @_hash.nil?
|
27
|
+
@_hash['data'] = 'Data'
|
28
|
+
@_hash['links'] = 'Links'
|
29
|
+
@_hash['meta'] = 'Meta'
|
30
|
+
@_hash
|
31
|
+
end
|
32
|
+
|
33
|
+
# An array for optional fields
|
34
|
+
def self.optionals
|
35
|
+
[]
|
36
|
+
end
|
37
|
+
|
38
|
+
# An array for nullable fields
|
39
|
+
def self.nullables
|
40
|
+
[]
|
41
|
+
end
|
42
|
+
|
43
|
+
def initialize(data = nil, links = nil, meta = nil)
|
44
|
+
@data = data
|
45
|
+
@links = links
|
46
|
+
@meta = meta
|
47
|
+
end
|
48
|
+
|
49
|
+
# Creates an instance of the object from a hash.
|
50
|
+
def self.from_hash(hash)
|
51
|
+
return nil unless hash
|
52
|
+
|
53
|
+
# Extract variables from the hash.
|
54
|
+
data = BalancesResponseData.from_hash(hash['Data']) if hash['Data']
|
55
|
+
links = Links.from_hash(hash['Links']) if hash['Links']
|
56
|
+
meta = Meta.from_hash(hash['Meta']) if hash['Meta']
|
57
|
+
|
58
|
+
# Create object from extracted values.
|
59
|
+
BalancesResponse.new(data,
|
60
|
+
links,
|
61
|
+
meta)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Provides a human-readable string representation of the object.
|
65
|
+
def to_s
|
66
|
+
class_name = self.class.name.split('::').last
|
67
|
+
"<#{class_name} data: #{@data}, links: #{@links}, meta: #{@meta}>"
|
68
|
+
end
|
69
|
+
|
70
|
+
# Provides a debugging-friendly string with detailed object information.
|
71
|
+
def inspect
|
72
|
+
class_name = self.class.name.split('::').last
|
73
|
+
"<#{class_name} data: #{@data.inspect}, links: #{@links.inspect}, meta: #{@meta.inspect}>"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
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
|
+
# BalancesResponseData Model.
|
8
|
+
class BalancesResponseData < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Balance
|
13
|
+
# @return [Array[BalanceModel]]
|
14
|
+
attr_accessor :balance
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['balance'] = 'Balance'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
# An array for optional fields
|
24
|
+
def self.optionals
|
25
|
+
[]
|
26
|
+
end
|
27
|
+
|
28
|
+
# An array for nullable fields
|
29
|
+
def self.nullables
|
30
|
+
[]
|
31
|
+
end
|
32
|
+
|
33
|
+
def initialize(balance = nil)
|
34
|
+
@balance = balance
|
35
|
+
end
|
36
|
+
|
37
|
+
# Creates an instance of the object from a hash.
|
38
|
+
def self.from_hash(hash)
|
39
|
+
return nil unless hash
|
40
|
+
|
41
|
+
# Extract variables from the hash.
|
42
|
+
# Parameter is an array, so we need to iterate through it
|
43
|
+
balance = nil
|
44
|
+
unless hash['Balance'].nil?
|
45
|
+
balance = []
|
46
|
+
hash['Balance'].each do |structure|
|
47
|
+
balance << (BalanceModel.from_hash(structure) if structure)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
balance = nil unless hash.key?('Balance')
|
52
|
+
|
53
|
+
# Create object from extracted values.
|
54
|
+
BalancesResponseData.new(balance)
|
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} balance: #{@balance}>"
|
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} balance: #{@balance.inspect}>"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
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 fully identify the type of underlying transaction
|
8
|
+
# resulting in an entry.
|
9
|
+
class BankTransactionCode < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# Specifies the family within a domain.
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :code
|
16
|
+
|
17
|
+
# Specifies the sub-product family within a specific family.
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :sub_code
|
20
|
+
|
21
|
+
# A mapping from model property names to API property names.
|
22
|
+
def self.names
|
23
|
+
@_hash = {} if @_hash.nil?
|
24
|
+
@_hash['code'] = 'Code'
|
25
|
+
@_hash['sub_code'] = 'SubCode'
|
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(code = nil, sub_code = nil)
|
40
|
+
@code = code
|
41
|
+
@sub_code = sub_code
|
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
|
+
code = hash.key?('Code') ? hash['Code'] : nil
|
50
|
+
sub_code = hash.key?('SubCode') ? hash['SubCode'] : nil
|
51
|
+
|
52
|
+
# Create object from extracted values.
|
53
|
+
BankTransactionCode.new(code,
|
54
|
+
sub_code)
|
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} code: #{@code}, sub_code: #{@sub_code}>"
|
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} code: #{@code.inspect}, sub_code: #{@sub_code.inspect}>"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
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
|
+
# Base model.
|
8
|
+
# rubocop:disable all
|
9
|
+
class BaseModel < CoreLibrary::BaseModel
|
10
|
+
# Returns a Hash representation of the current object.
|
11
|
+
def to_hash
|
12
|
+
# validating the model being serialized
|
13
|
+
self.class.validate(self) if self.class.respond_to?(:validate)
|
14
|
+
|
15
|
+
hash = {}
|
16
|
+
instance_variables.each do |name|
|
17
|
+
value = instance_variable_get(name)
|
18
|
+
name = name[1..]
|
19
|
+
if name == 'additional_properties'
|
20
|
+
additional_properties = process_additional_properties(value, self.class.names)
|
21
|
+
hash.merge!(additional_properties)
|
22
|
+
else
|
23
|
+
key = self.class.names.key?(name) ? self.class.names[name] : name
|
24
|
+
optional_fields = self.class.optionals
|
25
|
+
nullable_fields = self.class.nullables
|
26
|
+
if value.nil?
|
27
|
+
next unless nullable_fields.include?(name)
|
28
|
+
|
29
|
+
if !optional_fields.include?(name) && !nullable_fields.include?(name)
|
30
|
+
raise ArgumentError,
|
31
|
+
"`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
hash[key] = nil
|
36
|
+
unless value.nil?
|
37
|
+
if respond_to?("to_custom_#{name}")
|
38
|
+
if (value.instance_of? Array) || (value.instance_of? Hash)
|
39
|
+
params = [hash, key]
|
40
|
+
hash[key] = send("to_custom_#{name}", *params)
|
41
|
+
else
|
42
|
+
hash[key] = send("to_custom_#{name}")
|
43
|
+
end
|
44
|
+
elsif respond_to?("to_union_type_#{name}")
|
45
|
+
hash[key] = send("to_union_type_#{name}")
|
46
|
+
elsif value.instance_of? Array
|
47
|
+
hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
48
|
+
elsif value.instance_of? Hash
|
49
|
+
hash[key] = {}
|
50
|
+
value.each do |k, v|
|
51
|
+
hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
|
52
|
+
end
|
53
|
+
else
|
54
|
+
hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
hash
|
60
|
+
end
|
61
|
+
|
62
|
+
# Processes additional properties, ensuring no conflicts with existing properties.
|
63
|
+
def process_additional_properties(additional_properties, existing_prop_names)
|
64
|
+
hash = {}
|
65
|
+
additional_properties.each do |name, value|
|
66
|
+
check_for_conflict(name, existing_prop_names)
|
67
|
+
|
68
|
+
hash[name] = if value.is_a?(Array)
|
69
|
+
process_array(value)
|
70
|
+
elsif value.is_a?(Hash)
|
71
|
+
process_hash(value)
|
72
|
+
else
|
73
|
+
process_basic_value(value)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
hash
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks if an additional property conflicts with a model's existing property.
|
80
|
+
def check_for_conflict(name, existing_prop_names)
|
81
|
+
return unless existing_prop_names.key?(name)
|
82
|
+
|
83
|
+
raise ArgumentError, "An additional property key, '#{name}' conflicts with one of the model's properties"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Processes an array of values, recursively calling `to_hash` on BaseModel objects.
|
87
|
+
def process_array(value)
|
88
|
+
value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
89
|
+
end
|
90
|
+
|
91
|
+
# Processes a hash of values, recursively calling `to_hash` on BaseModel objects.
|
92
|
+
def process_hash(value)
|
93
|
+
value.transform_values do |v|
|
94
|
+
v.is_a?(BaseModel) ? v.to_hash : v
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Processes a basic value (non-array, non-hash).
|
99
|
+
def process_basic_value(value)
|
100
|
+
value.is_a?(BaseModel) ? value.to_hash : value
|
101
|
+
end
|
102
|
+
|
103
|
+
# Returns a JSON representation of the curent object.
|
104
|
+
def to_json(options = {})
|
105
|
+
hash = to_hash
|
106
|
+
hash.to_json(options)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
# rubocop:enable all
|
110
|
+
end
|
@@ -0,0 +1,109 @@
|
|
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
|
+
# Unique reference, as assigned by the creditor, to unambiguously refer to the
|
8
|
+
# payment transaction. Usage: If available, the initiating party should
|
9
|
+
# provide this reference in the structured remittance information, to enable
|
10
|
+
# reconciliation by the creditor upon receipt of the amount of money. If the
|
11
|
+
# business context requires the use of a creditor reference or a payment remit
|
12
|
+
# identification, and only one identifier can be passed through the end-to-end
|
13
|
+
# chain, the creditor's reference or payment remittance identification should
|
14
|
+
# be quoted in the end-to-end transaction identification. NZ - Remittance
|
15
|
+
# information for use with BECS Electronic Credit payment scheme. The
|
16
|
+
# Particulars, Code and Reference fields are currently constrained by
|
17
|
+
# providers. The design choice has been made not to constrain through schema
|
18
|
+
# restrictions, to allow for future changes that remove the constraint. Note
|
19
|
+
# that not all banks will accept all valid characters, in which case a
|
20
|
+
# descriptive 400 Bad Request will be returned. Constraining to a-z, A-Z, -
|
21
|
+
# (dash) and 0-9 is advised. One example is abc-XYZ-123
|
22
|
+
class BECSRemittance < BaseModel
|
23
|
+
SKIP = Object.new
|
24
|
+
private_constant :SKIP
|
25
|
+
|
26
|
+
# TODO: Write general description for this method
|
27
|
+
# @return [String]
|
28
|
+
attr_accessor :creditor_name
|
29
|
+
|
30
|
+
# TODO: Write general description for this method
|
31
|
+
# @return [CreditorReference]
|
32
|
+
attr_accessor :creditor_reference
|
33
|
+
|
34
|
+
# TODO: Write general description for this method
|
35
|
+
# @return [String]
|
36
|
+
attr_accessor :debtor_name
|
37
|
+
|
38
|
+
# TODO: Write general description for this method
|
39
|
+
# @return [CreditorReference]
|
40
|
+
attr_accessor :debtor_reference
|
41
|
+
|
42
|
+
# A mapping from model property names to API property names.
|
43
|
+
def self.names
|
44
|
+
@_hash = {} if @_hash.nil?
|
45
|
+
@_hash['creditor_name'] = 'CreditorName'
|
46
|
+
@_hash['creditor_reference'] = 'CreditorReference'
|
47
|
+
@_hash['debtor_name'] = 'DebtorName'
|
48
|
+
@_hash['debtor_reference'] = 'DebtorReference'
|
49
|
+
@_hash
|
50
|
+
end
|
51
|
+
|
52
|
+
# An array for optional fields
|
53
|
+
def self.optionals
|
54
|
+
%w[
|
55
|
+
creditor_reference
|
56
|
+
debtor_name
|
57
|
+
debtor_reference
|
58
|
+
]
|
59
|
+
end
|
60
|
+
|
61
|
+
# An array for nullable fields
|
62
|
+
def self.nullables
|
63
|
+
[]
|
64
|
+
end
|
65
|
+
|
66
|
+
def initialize(creditor_name = nil, creditor_reference = SKIP,
|
67
|
+
debtor_name = SKIP, debtor_reference = SKIP)
|
68
|
+
@creditor_name = creditor_name
|
69
|
+
@creditor_reference = creditor_reference unless creditor_reference == SKIP
|
70
|
+
@debtor_name = debtor_name unless debtor_name == SKIP
|
71
|
+
@debtor_reference = debtor_reference unless debtor_reference == 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
|
+
creditor_name = hash.key?('CreditorName') ? hash['CreditorName'] : nil
|
80
|
+
creditor_reference = CreditorReference.from_hash(hash['CreditorReference']) if
|
81
|
+
hash['CreditorReference']
|
82
|
+
debtor_name = hash.key?('DebtorName') ? hash['DebtorName'] : SKIP
|
83
|
+
debtor_reference = CreditorReference.from_hash(hash['DebtorReference']) if
|
84
|
+
hash['DebtorReference']
|
85
|
+
|
86
|
+
# Create object from extracted values.
|
87
|
+
BECSRemittance.new(creditor_name,
|
88
|
+
creditor_reference,
|
89
|
+
debtor_name,
|
90
|
+
debtor_reference)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Provides a human-readable string representation of the object.
|
94
|
+
def to_s
|
95
|
+
class_name = self.class.name.split('::').last
|
96
|
+
"<#{class_name} creditor_name: #{@creditor_name}, creditor_reference:"\
|
97
|
+
" #{@creditor_reference}, debtor_name: #{@debtor_name}, debtor_reference:"\
|
98
|
+
" #{@debtor_reference}>"
|
99
|
+
end
|
100
|
+
|
101
|
+
# Provides a debugging-friendly string with detailed object information.
|
102
|
+
def inspect
|
103
|
+
class_name = self.class.name.split('::').last
|
104
|
+
"<#{class_name} creditor_name: #{@creditor_name.inspect}, creditor_reference:"\
|
105
|
+
" #{@creditor_reference.inspect}, debtor_name: #{@debtor_name.inspect}, debtor_reference:"\
|
106
|
+
" #{@debtor_reference.inspect}>"
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,76 @@
|
|
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
|
+
# BeneficiariesResponse Model.
|
8
|
+
class BeneficiariesResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [BeneficiariesResponseData]
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
# Links relevant to the payload
|
17
|
+
# @return [Links]
|
18
|
+
attr_accessor :links
|
19
|
+
|
20
|
+
# Links relevant to the payload
|
21
|
+
# @return [Meta]
|
22
|
+
attr_accessor :meta
|
23
|
+
|
24
|
+
# A mapping from model property names to API property names.
|
25
|
+
def self.names
|
26
|
+
@_hash = {} if @_hash.nil?
|
27
|
+
@_hash['data'] = 'Data'
|
28
|
+
@_hash['links'] = 'Links'
|
29
|
+
@_hash['meta'] = 'Meta'
|
30
|
+
@_hash
|
31
|
+
end
|
32
|
+
|
33
|
+
# An array for optional fields
|
34
|
+
def self.optionals
|
35
|
+
[]
|
36
|
+
end
|
37
|
+
|
38
|
+
# An array for nullable fields
|
39
|
+
def self.nullables
|
40
|
+
[]
|
41
|
+
end
|
42
|
+
|
43
|
+
def initialize(data = nil, links = nil, meta = nil)
|
44
|
+
@data = data
|
45
|
+
@links = links
|
46
|
+
@meta = meta
|
47
|
+
end
|
48
|
+
|
49
|
+
# Creates an instance of the object from a hash.
|
50
|
+
def self.from_hash(hash)
|
51
|
+
return nil unless hash
|
52
|
+
|
53
|
+
# Extract variables from the hash.
|
54
|
+
data = BeneficiariesResponseData.from_hash(hash['Data']) if hash['Data']
|
55
|
+
links = Links.from_hash(hash['Links']) if hash['Links']
|
56
|
+
meta = Meta.from_hash(hash['Meta']) if hash['Meta']
|
57
|
+
|
58
|
+
# Create object from extracted values.
|
59
|
+
BeneficiariesResponse.new(data,
|
60
|
+
links,
|
61
|
+
meta)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Provides a human-readable string representation of the object.
|
65
|
+
def to_s
|
66
|
+
class_name = self.class.name.split('::').last
|
67
|
+
"<#{class_name} data: #{@data}, links: #{@links}, meta: #{@meta}>"
|
68
|
+
end
|
69
|
+
|
70
|
+
# Provides a debugging-friendly string with detailed object information.
|
71
|
+
def inspect
|
72
|
+
class_name = self.class.name.split('::').last
|
73
|
+
"<#{class_name} data: #{@data.inspect}, links: #{@links.inspect}, meta: #{@meta.inspect}>"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|