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.
Files changed (238) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +98 -0
  4. data/lib/account_and_transaction_api_specification/api_helper.rb +10 -0
  5. data/lib/account_and_transaction_api_specification/client.rb +114 -0
  6. data/lib/account_and_transaction_api_specification/configuration.rb +127 -0
  7. data/lib/account_and_transaction_api_specification/controllers/accounts_controller.rb +146 -0
  8. data/lib/account_and_transaction_api_specification/controllers/balances_controller.rb +146 -0
  9. data/lib/account_and_transaction_api_specification/controllers/base_controller.rb +66 -0
  10. data/lib/account_and_transaction_api_specification/controllers/beneficiaries_controller.rb +146 -0
  11. data/lib/account_and_transaction_api_specification/controllers/direct_debits_controller.rb +146 -0
  12. data/lib/account_and_transaction_api_specification/controllers/offers_controller.rb +146 -0
  13. data/lib/account_and_transaction_api_specification/controllers/party_controller.rb +146 -0
  14. data/lib/account_and_transaction_api_specification/controllers/scheduled_payments_controller.rb +146 -0
  15. data/lib/account_and_transaction_api_specification/controllers/standing_orders_controller.rb +146 -0
  16. data/lib/account_and_transaction_api_specification/controllers/statements_controller.rb +421 -0
  17. data/lib/account_and_transaction_api_specification/controllers/transactions_controller.rb +170 -0
  18. data/lib/account_and_transaction_api_specification/exceptions/accounts400_error_exception.rb +72 -0
  19. data/lib/account_and_transaction_api_specification/exceptions/accounts403_error_exception.rb +72 -0
  20. data/lib/account_and_transaction_api_specification/exceptions/accounts500_error_exception.rb +72 -0
  21. data/lib/account_and_transaction_api_specification/exceptions/accounts503_error_exception.rb +72 -0
  22. data/lib/account_and_transaction_api_specification/exceptions/accounts_balances400_error_exception.rb +72 -0
  23. data/lib/account_and_transaction_api_specification/exceptions/accounts_balances403_error_exception.rb +72 -0
  24. data/lib/account_and_transaction_api_specification/exceptions/accounts_balances500_error_exception.rb +72 -0
  25. data/lib/account_and_transaction_api_specification/exceptions/accounts_balances503_error_exception.rb +72 -0
  26. data/lib/account_and_transaction_api_specification/exceptions/accounts_beneficiaries400_error_exception.rb +72 -0
  27. data/lib/account_and_transaction_api_specification/exceptions/accounts_beneficiaries403_error_exception.rb +72 -0
  28. data/lib/account_and_transaction_api_specification/exceptions/accounts_beneficiaries500_error_exception.rb +72 -0
  29. data/lib/account_and_transaction_api_specification/exceptions/accounts_beneficiaries503_error_exception.rb +72 -0
  30. data/lib/account_and_transaction_api_specification/exceptions/accounts_direct_debits400_error_exception.rb +72 -0
  31. data/lib/account_and_transaction_api_specification/exceptions/accounts_direct_debits403_error_exception.rb +72 -0
  32. data/lib/account_and_transaction_api_specification/exceptions/accounts_direct_debits500_error_exception.rb +72 -0
  33. data/lib/account_and_transaction_api_specification/exceptions/accounts_direct_debits503_error_exception.rb +72 -0
  34. data/lib/account_and_transaction_api_specification/exceptions/accounts_offers400_error_exception.rb +72 -0
  35. data/lib/account_and_transaction_api_specification/exceptions/accounts_offers403_error_exception.rb +72 -0
  36. data/lib/account_and_transaction_api_specification/exceptions/accounts_offers500_error_exception.rb +72 -0
  37. data/lib/account_and_transaction_api_specification/exceptions/accounts_offers503_error_exception.rb +72 -0
  38. data/lib/account_and_transaction_api_specification/exceptions/accounts_party400_error_exception.rb +72 -0
  39. data/lib/account_and_transaction_api_specification/exceptions/accounts_party403_error_exception.rb +72 -0
  40. data/lib/account_and_transaction_api_specification/exceptions/accounts_party500_error_exception.rb +72 -0
  41. data/lib/account_and_transaction_api_specification/exceptions/accounts_party503_error_exception.rb +72 -0
  42. data/lib/account_and_transaction_api_specification/exceptions/accounts_scheduled_payments400_error_exception.rb +72 -0
  43. data/lib/account_and_transaction_api_specification/exceptions/accounts_scheduled_payments403_error_exception.rb +72 -0
  44. data/lib/account_and_transaction_api_specification/exceptions/accounts_scheduled_payments500_error_exception.rb +72 -0
  45. data/lib/account_and_transaction_api_specification/exceptions/accounts_scheduled_payments503_error_exception.rb +72 -0
  46. data/lib/account_and_transaction_api_specification/exceptions/accounts_standing_orders400_error_exception.rb +72 -0
  47. data/lib/account_and_transaction_api_specification/exceptions/accounts_standing_orders403_error_exception.rb +72 -0
  48. data/lib/account_and_transaction_api_specification/exceptions/accounts_standing_orders500_error_exception.rb +72 -0
  49. data/lib/account_and_transaction_api_specification/exceptions/accounts_standing_orders503_error_exception.rb +72 -0
  50. data/lib/account_and_transaction_api_specification/exceptions/accounts_statements400_error_exception.rb +72 -0
  51. data/lib/account_and_transaction_api_specification/exceptions/accounts_statements403_error_exception.rb +72 -0
  52. data/lib/account_and_transaction_api_specification/exceptions/accounts_statements500_error_exception.rb +72 -0
  53. data/lib/account_and_transaction_api_specification/exceptions/accounts_statements503_error_exception.rb +72 -0
  54. data/lib/account_and_transaction_api_specification/exceptions/accounts_statements_transactions400_error_exception.rb +72 -0
  55. data/lib/account_and_transaction_api_specification/exceptions/accounts_statements_transactions403_error_exception.rb +72 -0
  56. data/lib/account_and_transaction_api_specification/exceptions/accounts_statements_transactions500_error_exception.rb +72 -0
  57. data/lib/account_and_transaction_api_specification/exceptions/accounts_statements_transactions503_error_exception.rb +72 -0
  58. data/lib/account_and_transaction_api_specification/exceptions/accounts_transactions400_error_exception.rb +72 -0
  59. data/lib/account_and_transaction_api_specification/exceptions/accounts_transactions403_error_exception.rb +72 -0
  60. data/lib/account_and_transaction_api_specification/exceptions/accounts_transactions500_error_exception.rb +72 -0
  61. data/lib/account_and_transaction_api_specification/exceptions/accounts_transactions503_error_exception.rb +72 -0
  62. data/lib/account_and_transaction_api_specification/exceptions/api_exception.rb +21 -0
  63. data/lib/account_and_transaction_api_specification/exceptions/balances400_error_exception.rb +72 -0
  64. data/lib/account_and_transaction_api_specification/exceptions/balances403_error_exception.rb +72 -0
  65. data/lib/account_and_transaction_api_specification/exceptions/balances500_error_exception.rb +72 -0
  66. data/lib/account_and_transaction_api_specification/exceptions/balances503_error_exception.rb +72 -0
  67. data/lib/account_and_transaction_api_specification/exceptions/beneficiaries400_error_exception.rb +72 -0
  68. data/lib/account_and_transaction_api_specification/exceptions/beneficiaries403_error_exception.rb +72 -0
  69. data/lib/account_and_transaction_api_specification/exceptions/beneficiaries500_error_exception.rb +72 -0
  70. data/lib/account_and_transaction_api_specification/exceptions/beneficiaries503_error_exception.rb +72 -0
  71. data/lib/account_and_transaction_api_specification/exceptions/direct_debits400_error_exception.rb +72 -0
  72. data/lib/account_and_transaction_api_specification/exceptions/direct_debits403_error_exception.rb +72 -0
  73. data/lib/account_and_transaction_api_specification/exceptions/direct_debits500_error_exception.rb +72 -0
  74. data/lib/account_and_transaction_api_specification/exceptions/direct_debits503_error_exception.rb +72 -0
  75. data/lib/account_and_transaction_api_specification/exceptions/offers400_error_exception.rb +72 -0
  76. data/lib/account_and_transaction_api_specification/exceptions/offers403_error_exception.rb +72 -0
  77. data/lib/account_and_transaction_api_specification/exceptions/offers500_error_exception.rb +72 -0
  78. data/lib/account_and_transaction_api_specification/exceptions/offers503_error_exception.rb +72 -0
  79. data/lib/account_and_transaction_api_specification/exceptions/party400_error_exception.rb +72 -0
  80. data/lib/account_and_transaction_api_specification/exceptions/party403_error_exception.rb +72 -0
  81. data/lib/account_and_transaction_api_specification/exceptions/party500_error_exception.rb +72 -0
  82. data/lib/account_and_transaction_api_specification/exceptions/party503_error_exception.rb +72 -0
  83. data/lib/account_and_transaction_api_specification/exceptions/scheduled_payments400_error_exception.rb +72 -0
  84. data/lib/account_and_transaction_api_specification/exceptions/scheduled_payments403_error_exception.rb +72 -0
  85. data/lib/account_and_transaction_api_specification/exceptions/scheduled_payments500_error_exception.rb +72 -0
  86. data/lib/account_and_transaction_api_specification/exceptions/scheduled_payments503_error_exception.rb +72 -0
  87. data/lib/account_and_transaction_api_specification/exceptions/standing_orders400_error_exception.rb +72 -0
  88. data/lib/account_and_transaction_api_specification/exceptions/standing_orders403_error_exception.rb +72 -0
  89. data/lib/account_and_transaction_api_specification/exceptions/standing_orders500_error_exception.rb +72 -0
  90. data/lib/account_and_transaction_api_specification/exceptions/standing_orders503_error_exception.rb +72 -0
  91. data/lib/account_and_transaction_api_specification/exceptions/statements400_error_exception.rb +72 -0
  92. data/lib/account_and_transaction_api_specification/exceptions/statements403_error_exception.rb +72 -0
  93. data/lib/account_and_transaction_api_specification/exceptions/statements500_error_exception.rb +72 -0
  94. data/lib/account_and_transaction_api_specification/exceptions/statements503_error_exception.rb +72 -0
  95. data/lib/account_and_transaction_api_specification/exceptions/transactions400_error_exception.rb +72 -0
  96. data/lib/account_and_transaction_api_specification/exceptions/transactions403_error_exception.rb +72 -0
  97. data/lib/account_and_transaction_api_specification/exceptions/transactions500_error_exception.rb +72 -0
  98. data/lib/account_and_transaction_api_specification/exceptions/transactions503_error_exception.rb +72 -0
  99. data/lib/account_and_transaction_api_specification/http/auth/o_auth2.rb +43 -0
  100. data/lib/account_and_transaction_api_specification/http/http_call_back.rb +10 -0
  101. data/lib/account_and_transaction_api_specification/http/http_method_enum.rb +10 -0
  102. data/lib/account_and_transaction_api_specification/http/http_request.rb +10 -0
  103. data/lib/account_and_transaction_api_specification/http/http_response.rb +10 -0
  104. data/lib/account_and_transaction_api_specification/models/account.rb +100 -0
  105. data/lib/account_and_transaction_api_specification/models/account_access_consent.rb +69 -0
  106. data/lib/account_and_transaction_api_specification/models/account_access_consent_model.rb +60 -0
  107. data/lib/account_and_transaction_api_specification/models/account_access_consent_pos_tresponse.rb +86 -0
  108. data/lib/account_and_transaction_api_specification/models/account_access_consent_response.rb +86 -0
  109. data/lib/account_and_transaction_api_specification/models/account_access_consent_response_model.rb +120 -0
  110. data/lib/account_and_transaction_api_specification/models/account_access_status_enum.rb +29 -0
  111. data/lib/account_and_transaction_api_specification/models/account_model.rb +137 -0
  112. data/lib/account_and_transaction_api_specification/models/account_response.rb +76 -0
  113. data/lib/account_and_transaction_api_specification/models/account_response_data.rb +71 -0
  114. data/lib/account_and_transaction_api_specification/models/account_scheme_model_enum.rb +23 -0
  115. data/lib/account_and_transaction_api_specification/models/account_sub_type_enum.rb +41 -0
  116. data/lib/account_and_transaction_api_specification/models/account_type_enum.rb +23 -0
  117. data/lib/account_and_transaction_api_specification/models/address.rb +137 -0
  118. data/lib/account_and_transaction_api_specification/models/address_type_enum.rb +20 -0
  119. data/lib/account_and_transaction_api_specification/models/address_type_option_enum.rb +41 -0
  120. data/lib/account_and_transaction_api_specification/models/amount.rb +71 -0
  121. data/lib/account_and_transaction_api_specification/models/authorisation_type_enum.rb +26 -0
  122. data/lib/account_and_transaction_api_specification/models/balance.rb +82 -0
  123. data/lib/account_and_transaction_api_specification/models/balance_model.rb +136 -0
  124. data/lib/account_and_transaction_api_specification/models/balance_model_type_enum.rb +47 -0
  125. data/lib/account_and_transaction_api_specification/models/balances_response.rb +76 -0
  126. data/lib/account_and_transaction_api_specification/models/balances_response_data.rb +69 -0
  127. data/lib/account_and_transaction_api_specification/models/bank_transaction_code.rb +69 -0
  128. data/lib/account_and_transaction_api_specification/models/base_model.rb +110 -0
  129. data/lib/account_and_transaction_api_specification/models/becs_remittance.rb +109 -0
  130. data/lib/account_and_transaction_api_specification/models/beneficiaries_response.rb +76 -0
  131. data/lib/account_and_transaction_api_specification/models/beneficiaries_response_data.rb +71 -0
  132. data/lib/account_and_transaction_api_specification/models/beneficiary_model.rb +110 -0
  133. data/lib/account_and_transaction_api_specification/models/card_instrument.rb +97 -0
  134. data/lib/account_and_transaction_api_specification/models/card_scheme_name_enum.rb +32 -0
  135. data/lib/account_and_transaction_api_specification/models/consent.rb +145 -0
  136. data/lib/account_and_transaction_api_specification/models/credit_debit_indicator_enum.rb +24 -0
  137. data/lib/account_and_transaction_api_specification/models/credit_line.rb +82 -0
  138. data/lib/account_and_transaction_api_specification/models/credit_line_type_enum.rb +26 -0
  139. data/lib/account_and_transaction_api_specification/models/creditor_account.rb +102 -0
  140. data/lib/account_and_transaction_api_specification/models/creditor_agent.rb +100 -0
  141. data/lib/account_and_transaction_api_specification/models/creditor_reference.rb +81 -0
  142. data/lib/account_and_transaction_api_specification/models/currency_exchange.rb +147 -0
  143. data/lib/account_and_transaction_api_specification/models/data.rb +71 -0
  144. data/lib/account_and_transaction_api_specification/models/debtor_account.rb +102 -0
  145. data/lib/account_and_transaction_api_specification/models/debtor_agent.rb +70 -0
  146. data/lib/account_and_transaction_api_specification/models/debtor_reference.rb +81 -0
  147. data/lib/account_and_transaction_api_specification/models/delivery_address.rb +138 -0
  148. data/lib/account_and_transaction_api_specification/models/direct_debit_model.rb +146 -0
  149. data/lib/account_and_transaction_api_specification/models/direct_debit_response.rb +76 -0
  150. data/lib/account_and_transaction_api_specification/models/direct_debit_response_data.rb +71 -0
  151. data/lib/account_and_transaction_api_specification/models/direct_debit_status_code_enum.rb +23 -0
  152. data/lib/account_and_transaction_api_specification/models/error.rb +92 -0
  153. data/lib/account_and_transaction_api_specification/models/error_code_enum.rb +100 -0
  154. data/lib/account_and_transaction_api_specification/models/error_response.rb +100 -0
  155. data/lib/account_and_transaction_api_specification/models/fee.rb +71 -0
  156. data/lib/account_and_transaction_api_specification/models/final_payment_amount.rb +71 -0
  157. data/lib/account_and_transaction_api_specification/models/first_payment_amount.rb +71 -0
  158. data/lib/account_and_transaction_api_specification/models/geo_location.rb +72 -0
  159. data/lib/account_and_transaction_api_specification/models/get_account_offers_response.rb +76 -0
  160. data/lib/account_and_transaction_api_specification/models/get_account_party_response.rb +76 -0
  161. data/lib/account_and_transaction_api_specification/models/get_account_party_response_data.rb +62 -0
  162. data/lib/account_and_transaction_api_specification/models/get_account_scheduled_payments_response.rb +76 -0
  163. data/lib/account_and_transaction_api_specification/models/get_account_statement_response.rb +76 -0
  164. data/lib/account_and_transaction_api_specification/models/get_account_statement_response_data.rb +62 -0
  165. data/lib/account_and_transaction_api_specification/models/get_account_statement_transactions_response.rb +76 -0
  166. data/lib/account_and_transaction_api_specification/models/get_account_statement_transactions_response_data.rb +71 -0
  167. data/lib/account_and_transaction_api_specification/models/get_account_statements_response.rb +76 -0
  168. data/lib/account_and_transaction_api_specification/models/get_account_statements_response_data.rb +71 -0
  169. data/lib/account_and_transaction_api_specification/models/get_offers_response.rb +76 -0
  170. data/lib/account_and_transaction_api_specification/models/get_offers_response_data.rb +71 -0
  171. data/lib/account_and_transaction_api_specification/models/get_party_response.rb +76 -0
  172. data/lib/account_and_transaction_api_specification/models/get_scheduled_payments_response.rb +76 -0
  173. data/lib/account_and_transaction_api_specification/models/get_scheduled_payments_response_data.rb +71 -0
  174. data/lib/account_and_transaction_api_specification/models/get_statements_response.rb +76 -0
  175. data/lib/account_and_transaction_api_specification/models/get_statements_response_data.rb +71 -0
  176. data/lib/account_and_transaction_api_specification/models/instructed_amount.rb +73 -0
  177. data/lib/account_and_transaction_api_specification/models/links.rb +100 -0
  178. data/lib/account_and_transaction_api_specification/models/merchant_details.rb +75 -0
  179. data/lib/account_and_transaction_api_specification/models/meta.rb +112 -0
  180. data/lib/account_and_transaction_api_specification/models/meta_data.rb +112 -0
  181. data/lib/account_and_transaction_api_specification/models/next_payment_amount.rb +71 -0
  182. data/lib/account_and_transaction_api_specification/models/offer_model.rb +199 -0
  183. data/lib/account_and_transaction_api_specification/models/offer_type_enum.rb +32 -0
  184. data/lib/account_and_transaction_api_specification/models/party_model.rb +144 -0
  185. data/lib/account_and_transaction_api_specification/models/party_type_enum.rb +26 -0
  186. data/lib/account_and_transaction_api_specification/models/payment_context_code_enum.rb +32 -0
  187. data/lib/account_and_transaction_api_specification/models/permission_enum.rb +76 -0
  188. data/lib/account_and_transaction_api_specification/models/postal_address.rb +138 -0
  189. data/lib/account_and_transaction_api_specification/models/previous_payment_amount.rb +71 -0
  190. data/lib/account_and_transaction_api_specification/models/proprietary_bank_transaction_code.rb +70 -0
  191. data/lib/account_and_transaction_api_specification/models/reference.rb +95 -0
  192. data/lib/account_and_transaction_api_specification/models/risk.rb +164 -0
  193. data/lib/account_and_transaction_api_specification/models/scheduled_payment_model.rb +155 -0
  194. data/lib/account_and_transaction_api_specification/models/scheduled_type_enum.rb +23 -0
  195. data/lib/account_and_transaction_api_specification/models/scheme_name_enum.rb +21 -0
  196. data/lib/account_and_transaction_api_specification/models/servicer.rb +71 -0
  197. data/lib/account_and_transaction_api_specification/models/standing_order_model.rb +289 -0
  198. data/lib/account_and_transaction_api_specification/models/standing_order_status_code_enum.rb +23 -0
  199. data/lib/account_and_transaction_api_specification/models/standing_orders_response.rb +76 -0
  200. data/lib/account_and_transaction_api_specification/models/standing_orders_response_data.rb +71 -0
  201. data/lib/account_and_transaction_api_specification/models/statement.rb +313 -0
  202. data/lib/account_and_transaction_api_specification/models/statement_amount.rb +81 -0
  203. data/lib/account_and_transaction_api_specification/models/statement_amount_type_enum.rb +83 -0
  204. data/lib/account_and_transaction_api_specification/models/statement_benefit.rb +69 -0
  205. data/lib/account_and_transaction_api_specification/models/statement_benefit_type_enum.rb +29 -0
  206. data/lib/account_and_transaction_api_specification/models/statement_date_time.rb +81 -0
  207. data/lib/account_and_transaction_api_specification/models/statement_date_time_type_enum.rb +41 -0
  208. data/lib/account_and_transaction_api_specification/models/statement_fee.rb +80 -0
  209. data/lib/account_and_transaction_api_specification/models/statement_fee_type_enum.rb +59 -0
  210. data/lib/account_and_transaction_api_specification/models/statement_interest.rb +81 -0
  211. data/lib/account_and_transaction_api_specification/models/statement_interest_type_enum.rb +32 -0
  212. data/lib/account_and_transaction_api_specification/models/statement_model.rb +313 -0
  213. data/lib/account_and_transaction_api_specification/models/statement_rate.rb +69 -0
  214. data/lib/account_and_transaction_api_specification/models/statement_rate_type_enum.rb +47 -0
  215. data/lib/account_and_transaction_api_specification/models/statement_type_enum.rb +32 -0
  216. data/lib/account_and_transaction_api_specification/models/statement_value.rb +69 -0
  217. data/lib/account_and_transaction_api_specification/models/statement_value_type_enum.rb +41 -0
  218. data/lib/account_and_transaction_api_specification/models/transaction_model.rb +333 -0
  219. data/lib/account_and_transaction_api_specification/models/transaction_reference.rb +95 -0
  220. data/lib/account_and_transaction_api_specification/models/transaction_status_enum.rb +23 -0
  221. data/lib/account_and_transaction_api_specification/models/transactions_response.rb +76 -0
  222. data/lib/account_and_transaction_api_specification/models/transactions_response_data.rb +71 -0
  223. data/lib/account_and_transaction_api_specification/utilities/date_time_helper.rb +11 -0
  224. data/lib/account_and_transaction_api_specification/utilities/file_wrapper.rb +28 -0
  225. data/lib/account_and_transaction_api_specification.rb +439 -0
  226. data/test/controllers/controller_test_base.rb +29 -0
  227. data/test/controllers/test_accounts_controller.rb +45 -0
  228. data/test/controllers/test_balances_controller.rb +45 -0
  229. data/test/controllers/test_beneficiaries_controller.rb +45 -0
  230. data/test/controllers/test_direct_debits_controller.rb +45 -0
  231. data/test/controllers/test_offers_controller.rb +45 -0
  232. data/test/controllers/test_party_controller.rb +45 -0
  233. data/test/controllers/test_scheduled_payments_controller.rb +45 -0
  234. data/test/controllers/test_standing_orders_controller.rb +45 -0
  235. data/test/controllers/test_statements_controller.rb +49 -0
  236. data/test/controllers/test_transactions_controller.rb +49 -0
  237. data/test/http_response_catcher.rb +19 -0
  238. metadata +349 -0
@@ -0,0 +1,45 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class AccountsControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.accounts
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get a list of accounts
17
+ def test_get_accounts
18
+ # Parameters for the API call
19
+ x_fapi_auth_date = nil
20
+ x_fapi_customer_ip_address = nil
21
+ x_fapi_interaction_id = nil
22
+ x_merchant_ip_address = nil
23
+ x_customer_user_agent = nil
24
+
25
+ # Perform the API call through the SDK function
26
+ result = @controller.get_accounts(
27
+ x_fapi_auth_date: x_fapi_auth_date,
28
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
29
+ x_fapi_interaction_id: x_fapi_interaction_id,
30
+ x_merchant_ip_address: x_merchant_ip_address,
31
+ x_customer_user_agent: x_customer_user_agent
32
+ )
33
+
34
+ # Test response code
35
+ assert_equal(200, @response_catcher.response.status_code)
36
+
37
+ # Test headers
38
+ expected_headers = {}
39
+ expected_headers['x-fapi-interaction-id'] = nil
40
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
41
+
42
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
43
+ end
44
+
45
+ end
@@ -0,0 +1,45 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class BalancesControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.balances
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get Balances
17
+ def test_get_balances
18
+ # Parameters for the API call
19
+ x_fapi_auth_date = nil
20
+ x_fapi_customer_ip_address = nil
21
+ x_fapi_interaction_id = nil
22
+ x_merchant_ip_address = nil
23
+ x_customer_user_agent = nil
24
+
25
+ # Perform the API call through the SDK function
26
+ result = @controller.get_balances(
27
+ x_fapi_auth_date: x_fapi_auth_date,
28
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
29
+ x_fapi_interaction_id: x_fapi_interaction_id,
30
+ x_merchant_ip_address: x_merchant_ip_address,
31
+ x_customer_user_agent: x_customer_user_agent
32
+ )
33
+
34
+ # Test response code
35
+ assert_equal(200, @response_catcher.response.status_code)
36
+
37
+ # Test headers
38
+ expected_headers = {}
39
+ expected_headers['x-fapi-interaction-id'] = nil
40
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
41
+
42
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
43
+ end
44
+
45
+ end
@@ -0,0 +1,45 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class BeneficiariesControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.beneficiaries
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get Beneficiaries
17
+ def test_get_beneficiaries
18
+ # Parameters for the API call
19
+ x_fapi_auth_date = nil
20
+ x_fapi_customer_ip_address = nil
21
+ x_fapi_interaction_id = nil
22
+ x_merchant_ip_address = nil
23
+ x_customer_user_agent = nil
24
+
25
+ # Perform the API call through the SDK function
26
+ result = @controller.get_beneficiaries(
27
+ x_fapi_auth_date: x_fapi_auth_date,
28
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
29
+ x_fapi_interaction_id: x_fapi_interaction_id,
30
+ x_merchant_ip_address: x_merchant_ip_address,
31
+ x_customer_user_agent: x_customer_user_agent
32
+ )
33
+
34
+ # Test response code
35
+ assert_equal(200, @response_catcher.response.status_code)
36
+
37
+ # Test headers
38
+ expected_headers = {}
39
+ expected_headers['x-fapi-interaction-id'] = nil
40
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
41
+
42
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
43
+ end
44
+
45
+ end
@@ -0,0 +1,45 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class DirectDebitsControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.direct_debits
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get Direct Debits
17
+ def test_get_direct_debits
18
+ # Parameters for the API call
19
+ x_fapi_auth_date = nil
20
+ x_fapi_customer_ip_address = nil
21
+ x_fapi_interaction_id = nil
22
+ x_merchant_ip_address = nil
23
+ x_customer_user_agent = nil
24
+
25
+ # Perform the API call through the SDK function
26
+ result = @controller.get_direct_debits(
27
+ x_fapi_auth_date: x_fapi_auth_date,
28
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
29
+ x_fapi_interaction_id: x_fapi_interaction_id,
30
+ x_merchant_ip_address: x_merchant_ip_address,
31
+ x_customer_user_agent: x_customer_user_agent
32
+ )
33
+
34
+ # Test response code
35
+ assert_equal(200, @response_catcher.response.status_code)
36
+
37
+ # Test headers
38
+ expected_headers = {}
39
+ expected_headers['x-fapi-interaction-id'] = nil
40
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
41
+
42
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
43
+ end
44
+
45
+ end
@@ -0,0 +1,45 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class OffersControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.offers
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get Offers
17
+ def test_get_offers
18
+ # Parameters for the API call
19
+ x_fapi_auth_date = nil
20
+ x_fapi_customer_ip_address = nil
21
+ x_fapi_interaction_id = nil
22
+ x_merchant_ip_address = nil
23
+ x_customer_user_agent = nil
24
+
25
+ # Perform the API call through the SDK function
26
+ result = @controller.get_offers(
27
+ x_fapi_auth_date: x_fapi_auth_date,
28
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
29
+ x_fapi_interaction_id: x_fapi_interaction_id,
30
+ x_merchant_ip_address: x_merchant_ip_address,
31
+ x_customer_user_agent: x_customer_user_agent
32
+ )
33
+
34
+ # Test response code
35
+ assert_equal(200, @response_catcher.response.status_code)
36
+
37
+ # Test headers
38
+ expected_headers = {}
39
+ expected_headers['x-fapi-interaction-id'] = nil
40
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
41
+
42
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
43
+ end
44
+
45
+ end
@@ -0,0 +1,45 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class PartyControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.party
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get Party of logged in Customer
17
+ def test_get_party
18
+ # Parameters for the API call
19
+ x_fapi_auth_date = nil
20
+ x_fapi_customer_ip_address = nil
21
+ x_fapi_interaction_id = nil
22
+ x_merchant_ip_address = nil
23
+ x_customer_user_agent = nil
24
+
25
+ # Perform the API call through the SDK function
26
+ result = @controller.get_party(
27
+ x_fapi_auth_date: x_fapi_auth_date,
28
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
29
+ x_fapi_interaction_id: x_fapi_interaction_id,
30
+ x_merchant_ip_address: x_merchant_ip_address,
31
+ x_customer_user_agent: x_customer_user_agent
32
+ )
33
+
34
+ # Test response code
35
+ assert_equal(200, @response_catcher.response.status_code)
36
+
37
+ # Test headers
38
+ expected_headers = {}
39
+ expected_headers['x-fapi-interaction-id'] = nil
40
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
41
+
42
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
43
+ end
44
+
45
+ end
@@ -0,0 +1,45 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class ScheduledPaymentsControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.scheduled_payments
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get Scheduled Payments
17
+ def test_get_scheduled_payments
18
+ # Parameters for the API call
19
+ x_fapi_auth_date = nil
20
+ x_fapi_customer_ip_address = nil
21
+ x_fapi_interaction_id = nil
22
+ x_merchant_ip_address = nil
23
+ x_customer_user_agent = nil
24
+
25
+ # Perform the API call through the SDK function
26
+ result = @controller.get_scheduled_payments(
27
+ x_fapi_auth_date: x_fapi_auth_date,
28
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
29
+ x_fapi_interaction_id: x_fapi_interaction_id,
30
+ x_merchant_ip_address: x_merchant_ip_address,
31
+ x_customer_user_agent: x_customer_user_agent
32
+ )
33
+
34
+ # Test response code
35
+ assert_equal(200, @response_catcher.response.status_code)
36
+
37
+ # Test headers
38
+ expected_headers = {}
39
+ expected_headers['x-fapi-interaction-id'] = nil
40
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
41
+
42
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
43
+ end
44
+
45
+ end
@@ -0,0 +1,45 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class StandingOrdersControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.standing_orders
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get Standing Orders
17
+ def test_get_standing_orders
18
+ # Parameters for the API call
19
+ x_fapi_auth_date = nil
20
+ x_fapi_customer_ip_address = nil
21
+ x_fapi_interaction_id = nil
22
+ x_merchant_ip_address = nil
23
+ x_customer_user_agent = nil
24
+
25
+ # Perform the API call through the SDK function
26
+ result = @controller.get_standing_orders(
27
+ x_fapi_auth_date: x_fapi_auth_date,
28
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
29
+ x_fapi_interaction_id: x_fapi_interaction_id,
30
+ x_merchant_ip_address: x_merchant_ip_address,
31
+ x_customer_user_agent: x_customer_user_agent
32
+ )
33
+
34
+ # Test response code
35
+ assert_equal(200, @response_catcher.response.status_code)
36
+
37
+ # Test headers
38
+ expected_headers = {}
39
+ expected_headers['x-fapi-interaction-id'] = nil
40
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
41
+
42
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
43
+ end
44
+
45
+ end
@@ -0,0 +1,49 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class StatementsControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.statements
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get Statements
17
+ def test_get_statements
18
+ # Parameters for the API call
19
+ from_statement_date_time = nil
20
+ to_statement_date_time = nil
21
+ x_fapi_auth_date = nil
22
+ x_fapi_customer_ip_address = nil
23
+ x_fapi_interaction_id = nil
24
+ x_merchant_ip_address = nil
25
+ x_customer_user_agent = nil
26
+
27
+ # Perform the API call through the SDK function
28
+ result = @controller.get_statements(
29
+ from_statement_date_time: from_statement_date_time,
30
+ to_statement_date_time: to_statement_date_time,
31
+ x_fapi_auth_date: x_fapi_auth_date,
32
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
33
+ x_fapi_interaction_id: x_fapi_interaction_id,
34
+ x_merchant_ip_address: x_merchant_ip_address,
35
+ x_customer_user_agent: x_customer_user_agent
36
+ )
37
+
38
+ # Test response code
39
+ assert_equal(200, @response_catcher.response.status_code)
40
+
41
+ # Test headers
42
+ expected_headers = {}
43
+ expected_headers['x-fapi-interaction-id'] = nil
44
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
45
+
46
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
47
+ end
48
+
49
+ end
@@ -0,0 +1,49 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class TransactionsControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.transactions
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # Get Transactions
17
+ def test_get_transactions
18
+ # Parameters for the API call
19
+ from_booking_date_time = nil
20
+ to_booking_date_time = nil
21
+ x_fapi_auth_date = nil
22
+ x_fapi_customer_ip_address = nil
23
+ x_fapi_interaction_id = nil
24
+ x_merchant_ip_address = nil
25
+ x_customer_user_agent = nil
26
+
27
+ # Perform the API call through the SDK function
28
+ result = @controller.get_transactions(
29
+ from_booking_date_time: from_booking_date_time,
30
+ to_booking_date_time: to_booking_date_time,
31
+ x_fapi_auth_date: x_fapi_auth_date,
32
+ x_fapi_customer_ip_address: x_fapi_customer_ip_address,
33
+ x_fapi_interaction_id: x_fapi_interaction_id,
34
+ x_merchant_ip_address: x_merchant_ip_address,
35
+ x_customer_user_agent: x_customer_user_agent
36
+ )
37
+
38
+ # Test response code
39
+ assert_equal(200, @response_catcher.response.status_code)
40
+
41
+ # Test headers
42
+ expected_headers = {}
43
+ expected_headers['x-fapi-interaction-id'] = nil
44
+ expected_headers['content-type'] = 'application/json; charset=utf-8'
45
+
46
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
47
+ end
48
+
49
+ end
@@ -0,0 +1,19 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ class HttpResponseCatcher < AccountAndTransactionApiSpecification::HttpCallBack
7
+ attr_accessor :response
8
+
9
+ def on_before_request(request)
10
+ end
11
+
12
+ # Catching the response
13
+ def on_after_response(response)
14
+ @response = response
15
+ end
16
+ end
17
+
18
+
19
+