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,23 @@
|
|
1
|
+
# account_and_transaction_api_specification
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AccountAndTransactionApiSpecification
|
7
|
+
# Specifies the scheduled payment date type requested
|
8
|
+
class ScheduledTypeEnum
|
9
|
+
SCHEDULED_TYPE_ENUM = [
|
10
|
+
# TODO: Write general description for ARRIVAL
|
11
|
+
ARRIVAL = 'Arrival'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for EXECUTION
|
14
|
+
EXECUTION = 'Execution'.freeze
|
15
|
+
].freeze
|
16
|
+
|
17
|
+
def self.validate(value)
|
18
|
+
return false if value.nil?
|
19
|
+
|
20
|
+
SCHEDULED_TYPE_ENUM.include?(value)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,21 @@
|
|
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 identification scheme, in a coded form as published in an
|
8
|
+
# external list.
|
9
|
+
class SchemeNameEnum
|
10
|
+
SCHEME_NAME_ENUM = [
|
11
|
+
# TODO: Write general description for BICFI
|
12
|
+
BICFI = 'BICFI'.freeze
|
13
|
+
].freeze
|
14
|
+
|
15
|
+
def self.validate(value)
|
16
|
+
return false if value.nil?
|
17
|
+
|
18
|
+
SCHEME_NAME_ENUM.include?(value)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -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
|
+
# Party that manages the account on behalf of the account owner, that is
|
8
|
+
# manages the registration and booking of entries on the account, calculates
|
9
|
+
# balances on the account and provides information about the account.
|
10
|
+
class Servicer < BaseModel
|
11
|
+
SKIP = Object.new
|
12
|
+
private_constant :SKIP
|
13
|
+
|
14
|
+
# Name of the identification scheme, in a coded form as published in an
|
15
|
+
# external list.
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :scheme_name
|
18
|
+
|
19
|
+
# Unique and unambiguous identification of the servicing institution.
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :identification
|
22
|
+
|
23
|
+
# A mapping from model property names to API property names.
|
24
|
+
def self.names
|
25
|
+
@_hash = {} if @_hash.nil?
|
26
|
+
@_hash['scheme_name'] = 'SchemeName'
|
27
|
+
@_hash['identification'] = 'Identification'
|
28
|
+
@_hash
|
29
|
+
end
|
30
|
+
|
31
|
+
# An array for optional fields
|
32
|
+
def self.optionals
|
33
|
+
[]
|
34
|
+
end
|
35
|
+
|
36
|
+
# An array for nullable fields
|
37
|
+
def self.nullables
|
38
|
+
[]
|
39
|
+
end
|
40
|
+
|
41
|
+
def initialize(identification = nil)
|
42
|
+
@scheme_name = 'BICFI'
|
43
|
+
@identification = identification
|
44
|
+
end
|
45
|
+
|
46
|
+
# Creates an instance of the object from a hash.
|
47
|
+
def self.from_hash(hash)
|
48
|
+
return nil unless hash
|
49
|
+
|
50
|
+
# Extract variables from the hash.
|
51
|
+
identification =
|
52
|
+
hash.key?('Identification') ? hash['Identification'] : nil
|
53
|
+
|
54
|
+
# Create object from extracted values.
|
55
|
+
Servicer.new(identification)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Provides a human-readable string representation of the object.
|
59
|
+
def to_s
|
60
|
+
class_name = self.class.name.split('::').last
|
61
|
+
"<#{class_name} scheme_name: #{@scheme_name}, identification: #{@identification}>"
|
62
|
+
end
|
63
|
+
|
64
|
+
# Provides a debugging-friendly string with detailed object information.
|
65
|
+
def inspect
|
66
|
+
class_name = self.class.name.split('::').last
|
67
|
+
"<#{class_name} scheme_name: #{@scheme_name.inspect}, identification:"\
|
68
|
+
" #{@identification.inspect}>"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,289 @@
|
|
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
|
+
# StandingOrderModel Model.
|
9
|
+
class StandingOrderModel < 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
|
+
# A unique and immutable identifier used to identify the standing order
|
19
|
+
# resource. This identifier has no meaning to the account owner.
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :standing_order_id
|
22
|
+
|
23
|
+
# EvryDay - Every day
|
24
|
+
# EvryWorkgDay - Every working day
|
25
|
+
# IntrvlWkDay - An interval specified in weeks (01 to 09), and the day
|
26
|
+
# within the week (01 to 07)
|
27
|
+
# WkInMnthDay - A monthly interval, specifying the week of the month (01 to
|
28
|
+
# 05) and day within the week (01 to 07)
|
29
|
+
# IntrvlMnthDay - An interval specified in months (between 01 to 06, 12,
|
30
|
+
# 24), specifying the day within the month (-5 to -1, 1 to 31)
|
31
|
+
# Patterns:
|
32
|
+
# EvryDay (ScheduleCode)
|
33
|
+
# EvryWorkgDay (ScheduleCode)
|
34
|
+
# IntrvlWkDay:IntervalInWeeks:DayInWeek (ScheduleCode + IntervalInWeeks +
|
35
|
+
# DayInWeek)
|
36
|
+
# WkInMnthDay:WeekInMonth:DayInWeek (ScheduleCode + WeekInMonth + DayInWeek)
|
37
|
+
# IntrvlMnthDay:IntervalInMonths:DayInMonth (ScheduleCode + IntervalInMonths
|
38
|
+
# + DayInMonth)
|
39
|
+
# The regular expression for this element combines five smaller versions for
|
40
|
+
# each permitted pattern. To aid legibility - the components are presented
|
41
|
+
# individually here:
|
42
|
+
# EvryDay
|
43
|
+
# EvryWorkgDay
|
44
|
+
# IntrvlWkDay:0[1-9]:0[1-7]
|
45
|
+
# WkInMnthDay:0[1-5]:0[1-7]
|
46
|
+
# IntrvlMnthDay:(0[1-6]|12|24):(-0[1-5]|0[1-9]|[12][0-9]|3[01])
|
47
|
+
# @return [String]
|
48
|
+
attr_accessor :frequency
|
49
|
+
|
50
|
+
# EvryDay - Every day
|
51
|
+
# EvryWorkgDay - Every working day
|
52
|
+
# IntrvlWkDay - An interval specified in weeks (01 to 09), and the day
|
53
|
+
# within the week (01 to 07)
|
54
|
+
# WkInMnthDay - A monthly interval, specifying the week of the month (01 to
|
55
|
+
# 05) and day within the week (01 to 07)
|
56
|
+
# IntrvlMnthDay - An interval specified in months (between 01 to 06, 12,
|
57
|
+
# 24), specifying the day within the month (-5 to -1, 1 to 31)
|
58
|
+
# Patterns:
|
59
|
+
# EvryDay (ScheduleCode)
|
60
|
+
# EvryWorkgDay (ScheduleCode)
|
61
|
+
# IntrvlWkDay:IntervalInWeeks:DayInWeek (ScheduleCode + IntervalInWeeks +
|
62
|
+
# DayInWeek)
|
63
|
+
# WkInMnthDay:WeekInMonth:DayInWeek (ScheduleCode + WeekInMonth + DayInWeek)
|
64
|
+
# IntrvlMnthDay:IntervalInMonths:DayInMonth (ScheduleCode + IntervalInMonths
|
65
|
+
# + DayInMonth)
|
66
|
+
# The regular expression for this element combines five smaller versions for
|
67
|
+
# each permitted pattern. To aid legibility - the components are presented
|
68
|
+
# individually here:
|
69
|
+
# EvryDay
|
70
|
+
# EvryWorkgDay
|
71
|
+
# IntrvlWkDay:0[1-9]:0[1-7]
|
72
|
+
# WkInMnthDay:0[1-5]:0[1-7]
|
73
|
+
# IntrvlMnthDay:(0[1-6]|12|24):(-0[1-5]|0[1-9]|[12][0-9]|3[01])
|
74
|
+
# @return [Reference]
|
75
|
+
attr_accessor :reference
|
76
|
+
|
77
|
+
# The date on which the first payment for a Standing Order schedule will be
|
78
|
+
# made.
|
79
|
+
# All dates in the JSON payloads are represented in ISO 8601 date-time
|
80
|
+
# format.
|
81
|
+
# All date-time fields in responses must include the timezone. An example is
|
82
|
+
# below:
|
83
|
+
# 2017-04-05T10:43:07+00:00
|
84
|
+
# @return [DateTime]
|
85
|
+
attr_accessor :first_payment_date_time
|
86
|
+
|
87
|
+
# The amount of the first Standing Order
|
88
|
+
# @return [FirstPaymentAmount]
|
89
|
+
attr_accessor :first_payment_amount
|
90
|
+
|
91
|
+
# The date on which the next payment for a Standing Order schedule will be
|
92
|
+
# made.
|
93
|
+
# All dates in the JSON payloads are represented in ISO 8601 date-time
|
94
|
+
# format.
|
95
|
+
# All date-time fields in responses must include the timezone. An example is
|
96
|
+
# below:
|
97
|
+
# 2017-04-05T10:43:07+00:00
|
98
|
+
# @return [DateTime]
|
99
|
+
attr_accessor :next_payment_date_time
|
100
|
+
|
101
|
+
# The amount of the next Standing Order
|
102
|
+
# @return [NextPaymentAmount]
|
103
|
+
attr_accessor :next_payment_amount
|
104
|
+
|
105
|
+
# The date on which the final payment for a Standing Order schedule will be
|
106
|
+
# made.
|
107
|
+
# All dates in the JSON payloads are represented in ISO 8601 date-time
|
108
|
+
# format.
|
109
|
+
# All date-time fields in responses must include the timezone. An example is
|
110
|
+
# below:
|
111
|
+
# 2017-04-05T10:43:07+00:00
|
112
|
+
# @return [DateTime]
|
113
|
+
attr_accessor :final_payment_date_time
|
114
|
+
|
115
|
+
# The amount of the final Standing Order
|
116
|
+
# @return [FinalPaymentAmount]
|
117
|
+
attr_accessor :final_payment_amount
|
118
|
+
|
119
|
+
# Specifies the status of the standing order in code form.
|
120
|
+
# @return [StandingOrderStatusCodeEnum]
|
121
|
+
attr_accessor :standing_order_status_code
|
122
|
+
|
123
|
+
# Party that manages the account on behalf of the account owner, that is
|
124
|
+
# manages the registration and booking of entries on the account, calculates
|
125
|
+
# balances on the account and provides information about the account.
|
126
|
+
# This is the servicer of the beneficiary account.
|
127
|
+
# @return [CreditorAgent]
|
128
|
+
attr_accessor :creditor_agent
|
129
|
+
|
130
|
+
# Unambiguous identification of the account of the creditor, in the case of
|
131
|
+
# a debit transaction.
|
132
|
+
# @return [CreditorAccount]
|
133
|
+
attr_accessor :creditor_account
|
134
|
+
|
135
|
+
# A mapping from model property names to API property names.
|
136
|
+
def self.names
|
137
|
+
@_hash = {} if @_hash.nil?
|
138
|
+
@_hash['account_id'] = 'AccountId'
|
139
|
+
@_hash['standing_order_id'] = 'StandingOrderId'
|
140
|
+
@_hash['frequency'] = 'Frequency'
|
141
|
+
@_hash['reference'] = 'Reference'
|
142
|
+
@_hash['first_payment_date_time'] = 'FirstPaymentDateTime'
|
143
|
+
@_hash['first_payment_amount'] = 'FirstPaymentAmount'
|
144
|
+
@_hash['next_payment_date_time'] = 'NextPaymentDateTime'
|
145
|
+
@_hash['next_payment_amount'] = 'NextPaymentAmount'
|
146
|
+
@_hash['final_payment_date_time'] = 'FinalPaymentDateTime'
|
147
|
+
@_hash['final_payment_amount'] = 'FinalPaymentAmount'
|
148
|
+
@_hash['standing_order_status_code'] = 'StandingOrderStatusCode'
|
149
|
+
@_hash['creditor_agent'] = 'CreditorAgent'
|
150
|
+
@_hash['creditor_account'] = 'CreditorAccount'
|
151
|
+
@_hash
|
152
|
+
end
|
153
|
+
|
154
|
+
# An array for optional fields
|
155
|
+
def self.optionals
|
156
|
+
%w[
|
157
|
+
standing_order_id
|
158
|
+
reference
|
159
|
+
first_payment_date_time
|
160
|
+
first_payment_amount
|
161
|
+
final_payment_date_time
|
162
|
+
final_payment_amount
|
163
|
+
standing_order_status_code
|
164
|
+
creditor_agent
|
165
|
+
creditor_account
|
166
|
+
]
|
167
|
+
end
|
168
|
+
|
169
|
+
# An array for nullable fields
|
170
|
+
def self.nullables
|
171
|
+
[]
|
172
|
+
end
|
173
|
+
|
174
|
+
def initialize(account_id = nil, frequency = nil,
|
175
|
+
next_payment_date_time = nil, next_payment_amount = nil,
|
176
|
+
standing_order_id = SKIP, reference = SKIP,
|
177
|
+
first_payment_date_time = SKIP, first_payment_amount = SKIP,
|
178
|
+
final_payment_date_time = SKIP, final_payment_amount = SKIP,
|
179
|
+
standing_order_status_code = SKIP, creditor_agent = SKIP,
|
180
|
+
creditor_account = SKIP)
|
181
|
+
@account_id = account_id
|
182
|
+
@standing_order_id = standing_order_id unless standing_order_id == SKIP
|
183
|
+
@frequency = frequency
|
184
|
+
@reference = reference unless reference == SKIP
|
185
|
+
@first_payment_date_time = first_payment_date_time unless first_payment_date_time == SKIP
|
186
|
+
@first_payment_amount = first_payment_amount unless first_payment_amount == SKIP
|
187
|
+
@next_payment_date_time = next_payment_date_time
|
188
|
+
@next_payment_amount = next_payment_amount
|
189
|
+
@final_payment_date_time = final_payment_date_time unless final_payment_date_time == SKIP
|
190
|
+
@final_payment_amount = final_payment_amount unless final_payment_amount == SKIP
|
191
|
+
unless standing_order_status_code == SKIP
|
192
|
+
@standing_order_status_code =
|
193
|
+
standing_order_status_code
|
194
|
+
end
|
195
|
+
@creditor_agent = creditor_agent unless creditor_agent == SKIP
|
196
|
+
@creditor_account = creditor_account unless creditor_account == SKIP
|
197
|
+
end
|
198
|
+
|
199
|
+
# Creates an instance of the object from a hash.
|
200
|
+
def self.from_hash(hash)
|
201
|
+
return nil unless hash
|
202
|
+
|
203
|
+
# Extract variables from the hash.
|
204
|
+
account_id = hash.key?('AccountId') ? hash['AccountId'] : nil
|
205
|
+
frequency = hash.key?('Frequency') ? hash['Frequency'] : nil
|
206
|
+
next_payment_date_time = if hash.key?('NextPaymentDateTime')
|
207
|
+
(DateTimeHelper.from_rfc3339(hash['NextPaymentDateTime']) if hash['NextPaymentDateTime'])
|
208
|
+
end
|
209
|
+
next_payment_amount = NextPaymentAmount.from_hash(hash['NextPaymentAmount']) if
|
210
|
+
hash['NextPaymentAmount']
|
211
|
+
standing_order_id =
|
212
|
+
hash.key?('StandingOrderId') ? hash['StandingOrderId'] : SKIP
|
213
|
+
reference = Reference.from_hash(hash['Reference']) if hash['Reference']
|
214
|
+
first_payment_date_time = if hash.key?('FirstPaymentDateTime')
|
215
|
+
(DateTimeHelper.from_rfc3339(hash['FirstPaymentDateTime']) if hash['FirstPaymentDateTime'])
|
216
|
+
else
|
217
|
+
SKIP
|
218
|
+
end
|
219
|
+
first_payment_amount = FirstPaymentAmount.from_hash(hash['FirstPaymentAmount']) if
|
220
|
+
hash['FirstPaymentAmount']
|
221
|
+
final_payment_date_time = if hash.key?('FinalPaymentDateTime')
|
222
|
+
(DateTimeHelper.from_rfc3339(hash['FinalPaymentDateTime']) if hash['FinalPaymentDateTime'])
|
223
|
+
else
|
224
|
+
SKIP
|
225
|
+
end
|
226
|
+
final_payment_amount = FinalPaymentAmount.from_hash(hash['FinalPaymentAmount']) if
|
227
|
+
hash['FinalPaymentAmount']
|
228
|
+
standing_order_status_code =
|
229
|
+
hash.key?('StandingOrderStatusCode') ? hash['StandingOrderStatusCode'] : SKIP
|
230
|
+
creditor_agent = CreditorAgent.from_hash(hash['CreditorAgent']) if hash['CreditorAgent']
|
231
|
+
creditor_account = CreditorAccount.from_hash(hash['CreditorAccount']) if
|
232
|
+
hash['CreditorAccount']
|
233
|
+
|
234
|
+
# Create object from extracted values.
|
235
|
+
StandingOrderModel.new(account_id,
|
236
|
+
frequency,
|
237
|
+
next_payment_date_time,
|
238
|
+
next_payment_amount,
|
239
|
+
standing_order_id,
|
240
|
+
reference,
|
241
|
+
first_payment_date_time,
|
242
|
+
first_payment_amount,
|
243
|
+
final_payment_date_time,
|
244
|
+
final_payment_amount,
|
245
|
+
standing_order_status_code,
|
246
|
+
creditor_agent,
|
247
|
+
creditor_account)
|
248
|
+
end
|
249
|
+
|
250
|
+
def to_custom_first_payment_date_time
|
251
|
+
DateTimeHelper.to_rfc3339(first_payment_date_time)
|
252
|
+
end
|
253
|
+
|
254
|
+
def to_custom_next_payment_date_time
|
255
|
+
DateTimeHelper.to_rfc3339(next_payment_date_time)
|
256
|
+
end
|
257
|
+
|
258
|
+
def to_custom_final_payment_date_time
|
259
|
+
DateTimeHelper.to_rfc3339(final_payment_date_time)
|
260
|
+
end
|
261
|
+
|
262
|
+
# Provides a human-readable string representation of the object.
|
263
|
+
def to_s
|
264
|
+
class_name = self.class.name.split('::').last
|
265
|
+
"<#{class_name} account_id: #{@account_id}, standing_order_id: #{@standing_order_id},"\
|
266
|
+
" frequency: #{@frequency}, reference: #{@reference}, first_payment_date_time:"\
|
267
|
+
" #{@first_payment_date_time}, first_payment_amount: #{@first_payment_amount},"\
|
268
|
+
" next_payment_date_time: #{@next_payment_date_time}, next_payment_amount:"\
|
269
|
+
" #{@next_payment_amount}, final_payment_date_time: #{@final_payment_date_time},"\
|
270
|
+
" final_payment_amount: #{@final_payment_amount}, standing_order_status_code:"\
|
271
|
+
" #{@standing_order_status_code}, creditor_agent: #{@creditor_agent}, creditor_account:"\
|
272
|
+
" #{@creditor_account}>"
|
273
|
+
end
|
274
|
+
|
275
|
+
# Provides a debugging-friendly string with detailed object information.
|
276
|
+
def inspect
|
277
|
+
class_name = self.class.name.split('::').last
|
278
|
+
"<#{class_name} account_id: #{@account_id.inspect}, standing_order_id:"\
|
279
|
+
" #{@standing_order_id.inspect}, frequency: #{@frequency.inspect}, reference:"\
|
280
|
+
" #{@reference.inspect}, first_payment_date_time: #{@first_payment_date_time.inspect},"\
|
281
|
+
" first_payment_amount: #{@first_payment_amount.inspect}, next_payment_date_time:"\
|
282
|
+
" #{@next_payment_date_time.inspect}, next_payment_amount: #{@next_payment_amount.inspect},"\
|
283
|
+
" final_payment_date_time: #{@final_payment_date_time.inspect}, final_payment_amount:"\
|
284
|
+
" #{@final_payment_amount.inspect}, standing_order_status_code:"\
|
285
|
+
" #{@standing_order_status_code.inspect}, creditor_agent: #{@creditor_agent.inspect},"\
|
286
|
+
" creditor_account: #{@creditor_account.inspect}>"
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# account_and_transaction_api_specification
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AccountAndTransactionApiSpecification
|
7
|
+
# Specifies the status of the standing order in code form.
|
8
|
+
class StandingOrderStatusCodeEnum
|
9
|
+
STANDING_ORDER_STATUS_CODE_ENUM = [
|
10
|
+
# TODO: Write general description for ACTIVE
|
11
|
+
ACTIVE = 'Active'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for INACTIVE
|
14
|
+
INACTIVE = 'Inactive'.freeze
|
15
|
+
].freeze
|
16
|
+
|
17
|
+
def self.validate(value)
|
18
|
+
return false if value.nil?
|
19
|
+
|
20
|
+
STANDING_ORDER_STATUS_CODE_ENUM.include?(value)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
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
|
+
# StandingOrdersResponse Model.
|
8
|
+
class StandingOrdersResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [StandingOrdersResponseData]
|
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 = StandingOrdersResponseData.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
|
+
StandingOrdersResponse.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,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
|
+
# StandingOrdersResponseData Model.
|
8
|
+
class StandingOrdersResponseData < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# StandingOrder
|
13
|
+
# @return [Array[StandingOrderModel]]
|
14
|
+
attr_accessor :standing_order
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['standing_order'] = 'StandingOrder'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
# An array for optional fields
|
24
|
+
def self.optionals
|
25
|
+
%w[
|
26
|
+
standing_order
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
# An array for nullable fields
|
31
|
+
def self.nullables
|
32
|
+
[]
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(standing_order = SKIP)
|
36
|
+
@standing_order = standing_order unless standing_order == 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
|
+
standing_order = nil
|
46
|
+
unless hash['StandingOrder'].nil?
|
47
|
+
standing_order = []
|
48
|
+
hash['StandingOrder'].each do |structure|
|
49
|
+
standing_order << (StandingOrderModel.from_hash(structure) if structure)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
standing_order = SKIP unless hash.key?('StandingOrder')
|
54
|
+
|
55
|
+
# Create object from extracted values.
|
56
|
+
StandingOrdersResponseData.new(standing_order)
|
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} standing_order: #{@standing_order}>"
|
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} standing_order: #{@standing_order.inspect}>"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|