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,146 @@
|
|
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
|
+
# BalancesController
|
8
|
+
class BalancesController < BaseController
|
9
|
+
# Get Balances
|
10
|
+
# @param [String] x_fapi_auth_date Optional parameter: The time when the
|
11
|
+
# Customer last logged in with the Third Party. All dates in the HTTP
|
12
|
+
# headers are represented as RFC 7231 Full Dates. An example is below: Sun,
|
13
|
+
# 10 Sep 2017 19:43:31 UTC
|
14
|
+
# @param [String] x_fapi_customer_ip_address Optional parameter: The
|
15
|
+
# Customer's IP address if the Customer is currently logged in with the
|
16
|
+
# Third Party.
|
17
|
+
# @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
|
18
|
+
# used as a correlation id.
|
19
|
+
# @param [String] x_merchant_ip_address Optional parameter: The IP address
|
20
|
+
# of the merchant when making account information requests through a Third
|
21
|
+
# Party.
|
22
|
+
# @param [String] x_customer_user_agent Optional parameter: The User-Agent
|
23
|
+
# of the application on the customer device that is used to make the account
|
24
|
+
# information request
|
25
|
+
# @return [BalancesResponse] response from the API call.
|
26
|
+
def get_balances(x_fapi_auth_date: nil,
|
27
|
+
x_fapi_customer_ip_address: nil,
|
28
|
+
x_fapi_interaction_id: nil,
|
29
|
+
x_merchant_ip_address: nil,
|
30
|
+
x_customer_user_agent: nil)
|
31
|
+
new_api_call_builder
|
32
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
33
|
+
'/balances',
|
34
|
+
Server::DEFAULT)
|
35
|
+
.header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
|
36
|
+
.header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
|
37
|
+
.header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
|
38
|
+
.header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
|
39
|
+
.header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
|
40
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
41
|
+
.auth(Single.new('HTTPBearerAuthentication')))
|
42
|
+
.response(new_response_handler
|
43
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
44
|
+
.deserialize_into(BalancesResponse.method(:from_hash))
|
45
|
+
.local_error('400',
|
46
|
+
'Bad Request',
|
47
|
+
Balances400ErrorException)
|
48
|
+
.local_error('401',
|
49
|
+
'Unauthorized',
|
50
|
+
APIException)
|
51
|
+
.local_error('403',
|
52
|
+
'Forbidden',
|
53
|
+
Balances403ErrorException)
|
54
|
+
.local_error('405',
|
55
|
+
'Method Not Allowed',
|
56
|
+
APIException)
|
57
|
+
.local_error('406',
|
58
|
+
'Not Acceptable',
|
59
|
+
APIException)
|
60
|
+
.local_error('429',
|
61
|
+
'Too Many Requests',
|
62
|
+
APIException)
|
63
|
+
.local_error('500',
|
64
|
+
'Internal Server Error',
|
65
|
+
Balances500ErrorException)
|
66
|
+
.local_error('501',
|
67
|
+
'Not Implemented',
|
68
|
+
APIException)
|
69
|
+
.local_error('503',
|
70
|
+
'Service Unavailable',
|
71
|
+
Balances503ErrorException))
|
72
|
+
.execute
|
73
|
+
end
|
74
|
+
|
75
|
+
# Get Balances related to an account
|
76
|
+
# @param [String] account_id Required parameter: A unique identifier used to
|
77
|
+
# identify the account resource.
|
78
|
+
# @param [String] x_fapi_auth_date Optional parameter: The time when the
|
79
|
+
# Customer last logged in with the Third Party. All dates in the HTTP
|
80
|
+
# headers are represented as RFC 7231 Full Dates. An example is below: Sun,
|
81
|
+
# 10 Sep 2017 19:43:31 UTC
|
82
|
+
# @param [String] x_fapi_customer_ip_address Optional parameter: The
|
83
|
+
# Customer's IP address if the Customer is currently logged in with the
|
84
|
+
# Third Party.
|
85
|
+
# @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
|
86
|
+
# used as a correlation id.
|
87
|
+
# @param [String] x_merchant_ip_address Optional parameter: The IP address
|
88
|
+
# of the merchant when making account information requests through a Third
|
89
|
+
# Party.
|
90
|
+
# @param [String] x_customer_user_agent Optional parameter: The User-Agent
|
91
|
+
# of the application on the customer device that is used to make the account
|
92
|
+
# information request
|
93
|
+
# @return [BalancesResponse] response from the API call.
|
94
|
+
def get_account_balances(account_id,
|
95
|
+
x_fapi_auth_date: nil,
|
96
|
+
x_fapi_customer_ip_address: nil,
|
97
|
+
x_fapi_interaction_id: nil,
|
98
|
+
x_merchant_ip_address: nil,
|
99
|
+
x_customer_user_agent: nil)
|
100
|
+
new_api_call_builder
|
101
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
102
|
+
'/accounts/{AccountId}/balances',
|
103
|
+
Server::DEFAULT)
|
104
|
+
.template_param(new_parameter(account_id, key: 'AccountId')
|
105
|
+
.should_encode(true))
|
106
|
+
.header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
|
107
|
+
.header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
|
108
|
+
.header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
|
109
|
+
.header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
|
110
|
+
.header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
|
111
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
112
|
+
.auth(Single.new('HTTPBearerAuthentication')))
|
113
|
+
.response(new_response_handler
|
114
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
115
|
+
.deserialize_into(BalancesResponse.method(:from_hash))
|
116
|
+
.local_error('400',
|
117
|
+
'Bad Request',
|
118
|
+
AccountsBalances400ErrorException)
|
119
|
+
.local_error('401',
|
120
|
+
'Unauthorized',
|
121
|
+
APIException)
|
122
|
+
.local_error('403',
|
123
|
+
'Forbidden',
|
124
|
+
AccountsBalances403ErrorException)
|
125
|
+
.local_error('405',
|
126
|
+
'Method Not Allowed',
|
127
|
+
APIException)
|
128
|
+
.local_error('406',
|
129
|
+
'Not Acceptable',
|
130
|
+
APIException)
|
131
|
+
.local_error('429',
|
132
|
+
'Too Many Requests',
|
133
|
+
APIException)
|
134
|
+
.local_error('500',
|
135
|
+
'Internal Server Error',
|
136
|
+
AccountsBalances500ErrorException)
|
137
|
+
.local_error('501',
|
138
|
+
'Not Implemented',
|
139
|
+
APIException)
|
140
|
+
.local_error('503',
|
141
|
+
'Service Unavailable',
|
142
|
+
AccountsBalances503ErrorException))
|
143
|
+
.execute
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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
|
+
# BaseController.
|
8
|
+
class BaseController
|
9
|
+
include CoreLibrary
|
10
|
+
attr_accessor :config, :http_call_back
|
11
|
+
|
12
|
+
def self.user_agent
|
13
|
+
'APIMATIC 3.0'
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
GLOBAL_ERRORS = {
|
18
|
+
'default' => ErrorCase.new
|
19
|
+
.error_message('HTTP response not OK.')
|
20
|
+
.exception_type(APIException)
|
21
|
+
}.freeze
|
22
|
+
|
23
|
+
# Initialization constructor.
|
24
|
+
# @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
|
25
|
+
def initialize(global_configuration)
|
26
|
+
@global_configuration = global_configuration
|
27
|
+
@config = @global_configuration.client_configuration
|
28
|
+
@http_call_back = @config.http_callback
|
29
|
+
@api_call = ApiCall.new(@global_configuration)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Creates a new builder for the Api Call instance.
|
33
|
+
# @return [ApiCall] The instance of ApiCall.
|
34
|
+
def new_api_call_builder
|
35
|
+
@api_call.new_builder
|
36
|
+
end
|
37
|
+
|
38
|
+
# Creates a new instance of the request builder.
|
39
|
+
# @param [String] http_method The HTTP method to use in the request.
|
40
|
+
# @param [String] path The endpoint path to use in the request.
|
41
|
+
# @param [String] server The server to extract the base uri for the request.
|
42
|
+
# @return [RequestBuilder] The instance of RequestBuilder.
|
43
|
+
def new_request_builder(http_method, path, server)
|
44
|
+
RequestBuilder.new
|
45
|
+
.http_method(http_method)
|
46
|
+
.path(path)
|
47
|
+
.server(server)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Creates a new instance of the response handler.
|
51
|
+
# @return [ResponseHandler] The instance of ResponseHandler.
|
52
|
+
def new_response_handler
|
53
|
+
ResponseHandler.new
|
54
|
+
end
|
55
|
+
|
56
|
+
# Creates a new instance of the parameter.
|
57
|
+
# @param [String|optional] key The key of the parameter.
|
58
|
+
# @param [Object] value The value of the parameter.
|
59
|
+
# @return [Parameter] The instance of Parameter.
|
60
|
+
def new_parameter(value, key: nil)
|
61
|
+
Parameter.new
|
62
|
+
.key(key)
|
63
|
+
.value(value)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,146 @@
|
|
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
|
+
# BeneficiariesController
|
8
|
+
class BeneficiariesController < BaseController
|
9
|
+
# Get Beneficiaries related to an account
|
10
|
+
# @param [String] account_id Required parameter: A unique identifier used to
|
11
|
+
# identify the account resource.
|
12
|
+
# @param [String] x_fapi_auth_date Optional parameter: The time when the
|
13
|
+
# Customer last logged in with the Third Party. All dates in the HTTP
|
14
|
+
# headers are represented as RFC 7231 Full Dates. An example is below: Sun,
|
15
|
+
# 10 Sep 2017 19:43:31 UTC
|
16
|
+
# @param [String] x_fapi_customer_ip_address Optional parameter: The
|
17
|
+
# Customer's IP address if the Customer is currently logged in with the
|
18
|
+
# Third Party.
|
19
|
+
# @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
|
20
|
+
# used as a correlation id.
|
21
|
+
# @param [String] x_merchant_ip_address Optional parameter: The IP address
|
22
|
+
# of the merchant when making account information requests through a Third
|
23
|
+
# Party.
|
24
|
+
# @param [String] x_customer_user_agent Optional parameter: The User-Agent
|
25
|
+
# of the application on the customer device that is used to make the account
|
26
|
+
# information request
|
27
|
+
# @return [BeneficiariesResponse] response from the API call.
|
28
|
+
def get_account_beneficiaries(account_id,
|
29
|
+
x_fapi_auth_date: nil,
|
30
|
+
x_fapi_customer_ip_address: nil,
|
31
|
+
x_fapi_interaction_id: nil,
|
32
|
+
x_merchant_ip_address: nil,
|
33
|
+
x_customer_user_agent: nil)
|
34
|
+
new_api_call_builder
|
35
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
36
|
+
'/accounts/{AccountId}/beneficiaries',
|
37
|
+
Server::DEFAULT)
|
38
|
+
.template_param(new_parameter(account_id, key: 'AccountId')
|
39
|
+
.should_encode(true))
|
40
|
+
.header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
|
41
|
+
.header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
|
42
|
+
.header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
|
43
|
+
.header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
|
44
|
+
.header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
|
45
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
46
|
+
.auth(Single.new('HTTPBearerAuthentication')))
|
47
|
+
.response(new_response_handler
|
48
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
49
|
+
.deserialize_into(BeneficiariesResponse.method(:from_hash))
|
50
|
+
.local_error('400',
|
51
|
+
'Bad Request',
|
52
|
+
AccountsBeneficiaries400ErrorException)
|
53
|
+
.local_error('401',
|
54
|
+
'Unauthorized',
|
55
|
+
APIException)
|
56
|
+
.local_error('403',
|
57
|
+
'Forbidden',
|
58
|
+
AccountsBeneficiaries403ErrorException)
|
59
|
+
.local_error('405',
|
60
|
+
'Method Not Allowed',
|
61
|
+
APIException)
|
62
|
+
.local_error('406',
|
63
|
+
'Not Acceptable',
|
64
|
+
APIException)
|
65
|
+
.local_error('429',
|
66
|
+
'Too Many Requests',
|
67
|
+
APIException)
|
68
|
+
.local_error('500',
|
69
|
+
'Internal Server Error',
|
70
|
+
AccountsBeneficiaries500ErrorException)
|
71
|
+
.local_error('501',
|
72
|
+
'Not Implemented',
|
73
|
+
APIException)
|
74
|
+
.local_error('503',
|
75
|
+
'Service Unavailable',
|
76
|
+
AccountsBeneficiaries503ErrorException))
|
77
|
+
.execute
|
78
|
+
end
|
79
|
+
|
80
|
+
# Get Beneficiaries
|
81
|
+
# @param [String] x_fapi_auth_date Optional parameter: The time when the
|
82
|
+
# Customer last logged in with the Third Party. All dates in the HTTP
|
83
|
+
# headers are represented as RFC 7231 Full Dates. An example is below: Sun,
|
84
|
+
# 10 Sep 2017 19:43:31 UTC
|
85
|
+
# @param [String] x_fapi_customer_ip_address Optional parameter: The
|
86
|
+
# Customer's IP address if the Customer is currently logged in with the
|
87
|
+
# Third Party.
|
88
|
+
# @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
|
89
|
+
# used as a correlation id.
|
90
|
+
# @param [String] x_merchant_ip_address Optional parameter: The IP address
|
91
|
+
# of the merchant when making account information requests through a Third
|
92
|
+
# Party.
|
93
|
+
# @param [String] x_customer_user_agent Optional parameter: The User-Agent
|
94
|
+
# of the application on the customer device that is used to make the account
|
95
|
+
# information request
|
96
|
+
# @return [BeneficiariesResponse] response from the API call.
|
97
|
+
def get_beneficiaries(x_fapi_auth_date: nil,
|
98
|
+
x_fapi_customer_ip_address: nil,
|
99
|
+
x_fapi_interaction_id: nil,
|
100
|
+
x_merchant_ip_address: nil,
|
101
|
+
x_customer_user_agent: nil)
|
102
|
+
new_api_call_builder
|
103
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
104
|
+
'/beneficiaries',
|
105
|
+
Server::DEFAULT)
|
106
|
+
.header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
|
107
|
+
.header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
|
108
|
+
.header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
|
109
|
+
.header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
|
110
|
+
.header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
|
111
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
112
|
+
.auth(Single.new('HTTPBearerAuthentication')))
|
113
|
+
.response(new_response_handler
|
114
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
115
|
+
.deserialize_into(BeneficiariesResponse.method(:from_hash))
|
116
|
+
.local_error('400',
|
117
|
+
'Bad Request',
|
118
|
+
Beneficiaries400ErrorException)
|
119
|
+
.local_error('401',
|
120
|
+
'Unauthorized',
|
121
|
+
APIException)
|
122
|
+
.local_error('403',
|
123
|
+
'Forbidden',
|
124
|
+
Beneficiaries403ErrorException)
|
125
|
+
.local_error('405',
|
126
|
+
'Method Not Allowed',
|
127
|
+
APIException)
|
128
|
+
.local_error('406',
|
129
|
+
'Not Acceptable',
|
130
|
+
APIException)
|
131
|
+
.local_error('429',
|
132
|
+
'Too Many Requests',
|
133
|
+
APIException)
|
134
|
+
.local_error('500',
|
135
|
+
'Internal Server Error',
|
136
|
+
Beneficiaries500ErrorException)
|
137
|
+
.local_error('501',
|
138
|
+
'Not Implemented',
|
139
|
+
APIException)
|
140
|
+
.local_error('503',
|
141
|
+
'Service Unavailable',
|
142
|
+
Beneficiaries503ErrorException))
|
143
|
+
.execute
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,146 @@
|
|
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
|
+
# DirectDebitsController
|
8
|
+
class DirectDebitsController < BaseController
|
9
|
+
# Get Direct Debits related to an account
|
10
|
+
# @param [String] account_id Required parameter: A unique identifier used to
|
11
|
+
# identify the account resource.
|
12
|
+
# @param [String] x_fapi_auth_date Optional parameter: The time when the
|
13
|
+
# Customer last logged in with the Third Party. All dates in the HTTP
|
14
|
+
# headers are represented as RFC 7231 Full Dates. An example is below: Sun,
|
15
|
+
# 10 Sep 2017 19:43:31 UTC
|
16
|
+
# @param [String] x_fapi_customer_ip_address Optional parameter: The
|
17
|
+
# Customer's IP address if the Customer is currently logged in with the
|
18
|
+
# Third Party.
|
19
|
+
# @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
|
20
|
+
# used as a correlation id.
|
21
|
+
# @param [String] x_merchant_ip_address Optional parameter: The IP address
|
22
|
+
# of the merchant when making account information requests through a Third
|
23
|
+
# Party.
|
24
|
+
# @param [String] x_customer_user_agent Optional parameter: The User-Agent
|
25
|
+
# of the application on the customer device that is used to make the account
|
26
|
+
# information request
|
27
|
+
# @return [DirectDebitResponse] response from the API call.
|
28
|
+
def get_account_direct_debits(account_id,
|
29
|
+
x_fapi_auth_date: nil,
|
30
|
+
x_fapi_customer_ip_address: nil,
|
31
|
+
x_fapi_interaction_id: nil,
|
32
|
+
x_merchant_ip_address: nil,
|
33
|
+
x_customer_user_agent: nil)
|
34
|
+
new_api_call_builder
|
35
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
36
|
+
'/accounts/{AccountId}/direct-debits',
|
37
|
+
Server::DEFAULT)
|
38
|
+
.template_param(new_parameter(account_id, key: 'AccountId')
|
39
|
+
.should_encode(true))
|
40
|
+
.header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
|
41
|
+
.header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
|
42
|
+
.header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
|
43
|
+
.header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
|
44
|
+
.header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
|
45
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
46
|
+
.auth(Single.new('HTTPBearerAuthentication')))
|
47
|
+
.response(new_response_handler
|
48
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
49
|
+
.deserialize_into(DirectDebitResponse.method(:from_hash))
|
50
|
+
.local_error('400',
|
51
|
+
'Bad Request',
|
52
|
+
AccountsDirectDebits400ErrorException)
|
53
|
+
.local_error('401',
|
54
|
+
'Unauthorized',
|
55
|
+
APIException)
|
56
|
+
.local_error('403',
|
57
|
+
'Forbidden',
|
58
|
+
AccountsDirectDebits403ErrorException)
|
59
|
+
.local_error('405',
|
60
|
+
'Method Not Allowed',
|
61
|
+
APIException)
|
62
|
+
.local_error('406',
|
63
|
+
'Not Acceptable',
|
64
|
+
APIException)
|
65
|
+
.local_error('429',
|
66
|
+
'Too Many Requests',
|
67
|
+
APIException)
|
68
|
+
.local_error('500',
|
69
|
+
'Internal Server Error',
|
70
|
+
AccountsDirectDebits500ErrorException)
|
71
|
+
.local_error('501',
|
72
|
+
'Not Implemented',
|
73
|
+
APIException)
|
74
|
+
.local_error('503',
|
75
|
+
'Service Unavailable',
|
76
|
+
AccountsDirectDebits503ErrorException))
|
77
|
+
.execute
|
78
|
+
end
|
79
|
+
|
80
|
+
# Get Direct Debits
|
81
|
+
# @param [String] x_fapi_auth_date Optional parameter: The time when the
|
82
|
+
# Customer last logged in with the Third Party. All dates in the HTTP
|
83
|
+
# headers are represented as RFC 7231 Full Dates. An example is below: Sun,
|
84
|
+
# 10 Sep 2017 19:43:31 UTC
|
85
|
+
# @param [String] x_fapi_customer_ip_address Optional parameter: The
|
86
|
+
# Customer's IP address if the Customer is currently logged in with the
|
87
|
+
# Third Party.
|
88
|
+
# @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
|
89
|
+
# used as a correlation id.
|
90
|
+
# @param [String] x_merchant_ip_address Optional parameter: The IP address
|
91
|
+
# of the merchant when making account information requests through a Third
|
92
|
+
# Party.
|
93
|
+
# @param [String] x_customer_user_agent Optional parameter: The User-Agent
|
94
|
+
# of the application on the customer device that is used to make the account
|
95
|
+
# information request
|
96
|
+
# @return [DirectDebitResponse] response from the API call.
|
97
|
+
def get_direct_debits(x_fapi_auth_date: nil,
|
98
|
+
x_fapi_customer_ip_address: nil,
|
99
|
+
x_fapi_interaction_id: nil,
|
100
|
+
x_merchant_ip_address: nil,
|
101
|
+
x_customer_user_agent: nil)
|
102
|
+
new_api_call_builder
|
103
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
104
|
+
'/direct-debits',
|
105
|
+
Server::DEFAULT)
|
106
|
+
.header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
|
107
|
+
.header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
|
108
|
+
.header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
|
109
|
+
.header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
|
110
|
+
.header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
|
111
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
112
|
+
.auth(Single.new('HTTPBearerAuthentication')))
|
113
|
+
.response(new_response_handler
|
114
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
115
|
+
.deserialize_into(DirectDebitResponse.method(:from_hash))
|
116
|
+
.local_error('400',
|
117
|
+
'Bad Request',
|
118
|
+
DirectDebits400ErrorException)
|
119
|
+
.local_error('401',
|
120
|
+
'Unauthorized',
|
121
|
+
APIException)
|
122
|
+
.local_error('403',
|
123
|
+
'Forbidden',
|
124
|
+
DirectDebits403ErrorException)
|
125
|
+
.local_error('405',
|
126
|
+
'Method Not Allowed',
|
127
|
+
APIException)
|
128
|
+
.local_error('406',
|
129
|
+
'Not Acceptable',
|
130
|
+
APIException)
|
131
|
+
.local_error('429',
|
132
|
+
'Too Many Requests',
|
133
|
+
APIException)
|
134
|
+
.local_error('500',
|
135
|
+
'Internal Server Error',
|
136
|
+
DirectDebits500ErrorException)
|
137
|
+
.local_error('501',
|
138
|
+
'Not Implemented',
|
139
|
+
APIException)
|
140
|
+
.local_error('503',
|
141
|
+
'Service Unavailable',
|
142
|
+
DirectDebits503ErrorException))
|
143
|
+
.execute
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,146 @@
|
|
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
|
+
# OffersController
|
8
|
+
class OffersController < BaseController
|
9
|
+
# Get Offers related to an account
|
10
|
+
# @param [String] account_id Required parameter: A unique identifier used to
|
11
|
+
# identify the account resource.
|
12
|
+
# @param [String] x_fapi_auth_date Optional parameter: The time when the
|
13
|
+
# Customer last logged in with the Third Party. All dates in the HTTP
|
14
|
+
# headers are represented as RFC 7231 Full Dates. An example is below: Sun,
|
15
|
+
# 10 Sep 2017 19:43:31 UTC
|
16
|
+
# @param [String] x_fapi_customer_ip_address Optional parameter: The
|
17
|
+
# Customer's IP address if the Customer is currently logged in with the
|
18
|
+
# Third Party.
|
19
|
+
# @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
|
20
|
+
# used as a correlation id.
|
21
|
+
# @param [String] x_merchant_ip_address Optional parameter: The IP address
|
22
|
+
# of the merchant when making account information requests through a Third
|
23
|
+
# Party.
|
24
|
+
# @param [String] x_customer_user_agent Optional parameter: The User-Agent
|
25
|
+
# of the application on the customer device that is used to make the account
|
26
|
+
# information request
|
27
|
+
# @return [GetAccountOffersResponse] response from the API call.
|
28
|
+
def get_account_offers(account_id,
|
29
|
+
x_fapi_auth_date: nil,
|
30
|
+
x_fapi_customer_ip_address: nil,
|
31
|
+
x_fapi_interaction_id: nil,
|
32
|
+
x_merchant_ip_address: nil,
|
33
|
+
x_customer_user_agent: nil)
|
34
|
+
new_api_call_builder
|
35
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
36
|
+
'/accounts/{AccountId}/offers',
|
37
|
+
Server::DEFAULT)
|
38
|
+
.template_param(new_parameter(account_id, key: 'AccountId')
|
39
|
+
.should_encode(true))
|
40
|
+
.header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
|
41
|
+
.header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
|
42
|
+
.header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
|
43
|
+
.header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
|
44
|
+
.header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
|
45
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
46
|
+
.auth(Single.new('HTTPBearerAuthentication')))
|
47
|
+
.response(new_response_handler
|
48
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
49
|
+
.deserialize_into(GetAccountOffersResponse.method(:from_hash))
|
50
|
+
.local_error('400',
|
51
|
+
'Bad Request',
|
52
|
+
AccountsOffers400ErrorException)
|
53
|
+
.local_error('401',
|
54
|
+
'Unauthorized',
|
55
|
+
APIException)
|
56
|
+
.local_error('403',
|
57
|
+
'Forbidden',
|
58
|
+
AccountsOffers403ErrorException)
|
59
|
+
.local_error('405',
|
60
|
+
'Method Not Allowed',
|
61
|
+
APIException)
|
62
|
+
.local_error('406',
|
63
|
+
'Not Acceptable',
|
64
|
+
APIException)
|
65
|
+
.local_error('429',
|
66
|
+
'Too Many Requests',
|
67
|
+
APIException)
|
68
|
+
.local_error('500',
|
69
|
+
'Internal Server Error',
|
70
|
+
AccountsOffers500ErrorException)
|
71
|
+
.local_error('501',
|
72
|
+
'Not Implemented',
|
73
|
+
APIException)
|
74
|
+
.local_error('503',
|
75
|
+
'Service Unavailable',
|
76
|
+
AccountsOffers503ErrorException))
|
77
|
+
.execute
|
78
|
+
end
|
79
|
+
|
80
|
+
# Get Offers
|
81
|
+
# @param [String] x_fapi_auth_date Optional parameter: The time when the
|
82
|
+
# Customer last logged in with the Third Party. All dates in the HTTP
|
83
|
+
# headers are represented as RFC 7231 Full Dates. An example is below: Sun,
|
84
|
+
# 10 Sep 2017 19:43:31 UTC
|
85
|
+
# @param [String] x_fapi_customer_ip_address Optional parameter: The
|
86
|
+
# Customer's IP address if the Customer is currently logged in with the
|
87
|
+
# Third Party.
|
88
|
+
# @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
|
89
|
+
# used as a correlation id.
|
90
|
+
# @param [String] x_merchant_ip_address Optional parameter: The IP address
|
91
|
+
# of the merchant when making account information requests through a Third
|
92
|
+
# Party.
|
93
|
+
# @param [String] x_customer_user_agent Optional parameter: The User-Agent
|
94
|
+
# of the application on the customer device that is used to make the account
|
95
|
+
# information request
|
96
|
+
# @return [GetOffersResponse] response from the API call.
|
97
|
+
def get_offers(x_fapi_auth_date: nil,
|
98
|
+
x_fapi_customer_ip_address: nil,
|
99
|
+
x_fapi_interaction_id: nil,
|
100
|
+
x_merchant_ip_address: nil,
|
101
|
+
x_customer_user_agent: nil)
|
102
|
+
new_api_call_builder
|
103
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
104
|
+
'/offers',
|
105
|
+
Server::DEFAULT)
|
106
|
+
.header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
|
107
|
+
.header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
|
108
|
+
.header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
|
109
|
+
.header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
|
110
|
+
.header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
|
111
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
112
|
+
.auth(Single.new('HTTPBearerAuthentication')))
|
113
|
+
.response(new_response_handler
|
114
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
115
|
+
.deserialize_into(GetOffersResponse.method(:from_hash))
|
116
|
+
.local_error('400',
|
117
|
+
'Bad Request',
|
118
|
+
Offers400ErrorException)
|
119
|
+
.local_error('401',
|
120
|
+
'Unauthorized',
|
121
|
+
APIException)
|
122
|
+
.local_error('403',
|
123
|
+
'Forbidden',
|
124
|
+
Offers403ErrorException)
|
125
|
+
.local_error('405',
|
126
|
+
'Method Not Allowed',
|
127
|
+
APIException)
|
128
|
+
.local_error('406',
|
129
|
+
'Not Acceptable',
|
130
|
+
APIException)
|
131
|
+
.local_error('429',
|
132
|
+
'Too Many Requests',
|
133
|
+
APIException)
|
134
|
+
.local_error('500',
|
135
|
+
'Internal Server Error',
|
136
|
+
Offers500ErrorException)
|
137
|
+
.local_error('501',
|
138
|
+
'Not Implemented',
|
139
|
+
APIException)
|
140
|
+
.local_error('503',
|
141
|
+
'Service Unavailable',
|
142
|
+
Offers503ErrorException))
|
143
|
+
.execute
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|