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,421 @@
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
+ # StatementsController
8
+ class StatementsController < BaseController
9
+ # Get Statement related to an account
10
+ # @param [String] account_id Required parameter: A unique identifier used to
11
+ # identify the account resource.
12
+ # @param [String] statement_id Required parameter: A unique identifier used
13
+ # to identify the statement resource.
14
+ # @param [DateTime] from_statement_date_time Optional parameter: The UTC ISO
15
+ # 8601 Date Time to filter statements FROM NB Time component is optional -
16
+ # set to 00:00:00 for just Date. If the Date Time contains a timezone, the
17
+ # API Provider must ignore the timezone component.
18
+ # @param [DateTime] to_statement_date_time Optional parameter: The UTC ISO
19
+ # 8601 Date Time to filter statements TO NB Time component is optional - set
20
+ # to 00:00:00 for just Date. If the Date Time contains a timezone, the API
21
+ # Provider must ignore the timezone component.
22
+ # @param [String] x_fapi_auth_date Optional parameter: The time when the
23
+ # Customer last logged in with the Third Party. All dates in the HTTP
24
+ # headers are represented as RFC 7231 Full Dates. An example is below: Sun,
25
+ # 10 Sep 2017 19:43:31 UTC
26
+ # @param [String] x_fapi_customer_ip_address Optional parameter: The
27
+ # Customer's IP address if the Customer is currently logged in with the
28
+ # Third Party.
29
+ # @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
30
+ # used as a correlation id.
31
+ # @param [String] x_merchant_ip_address Optional parameter: The IP address
32
+ # of the merchant when making account information requests through a Third
33
+ # Party.
34
+ # @param [String] x_customer_user_agent Optional parameter: The User-Agent
35
+ # of the application on the customer device that is used to make the account
36
+ # information request
37
+ # @return [GetAccountStatementResponse] response from the API call.
38
+ def get_account_statement(account_id,
39
+ statement_id,
40
+ from_statement_date_time: nil,
41
+ to_statement_date_time: nil,
42
+ x_fapi_auth_date: nil,
43
+ x_fapi_customer_ip_address: nil,
44
+ x_fapi_interaction_id: nil,
45
+ x_merchant_ip_address: nil,
46
+ x_customer_user_agent: nil)
47
+ new_api_call_builder
48
+ .request(new_request_builder(HttpMethodEnum::GET,
49
+ '/accounts/{AccountId}/statements/{StatementId}',
50
+ Server::DEFAULT)
51
+ .template_param(new_parameter(account_id, key: 'AccountId')
52
+ .should_encode(true))
53
+ .template_param(new_parameter(statement_id, key: 'StatementId')
54
+ .should_encode(true))
55
+ .query_param(new_parameter(from_statement_date_time, key: 'fromStatementDateTime'))
56
+ .query_param(new_parameter(to_statement_date_time, key: 'toStatementDateTime'))
57
+ .header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
58
+ .header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
59
+ .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
60
+ .header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
61
+ .header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
62
+ .header_param(new_parameter('application/json', key: 'accept'))
63
+ .auth(Single.new('HTTPBearerAuthentication')))
64
+ .response(new_response_handler
65
+ .deserializer(APIHelper.method(:custom_type_deserializer))
66
+ .deserialize_into(GetAccountStatementResponse.method(:from_hash))
67
+ .local_error('400',
68
+ 'Bad Request',
69
+ AccountsStatements400ErrorException)
70
+ .local_error('401',
71
+ 'Unauthorized',
72
+ APIException)
73
+ .local_error('403',
74
+ 'Forbidden',
75
+ AccountsStatements403ErrorException)
76
+ .local_error('405',
77
+ 'Method Not Allowed',
78
+ APIException)
79
+ .local_error('406',
80
+ 'Not Acceptable',
81
+ APIException)
82
+ .local_error('429',
83
+ 'Too Many Requests',
84
+ APIException)
85
+ .local_error('500',
86
+ 'Internal Server Error',
87
+ AccountsStatements500ErrorException)
88
+ .local_error('501',
89
+ 'Not Implemented',
90
+ APIException)
91
+ .local_error('503',
92
+ 'Service Unavailable',
93
+ AccountsStatements503ErrorException))
94
+ .execute
95
+ end
96
+
97
+ # Get Statement related to an account
98
+ # @param [String] account_id Required parameter: A unique identifier used to
99
+ # identify the account resource.
100
+ # @param [String] statement_id Required parameter: A unique identifier used
101
+ # to identify the statement resource.
102
+ # @param [String] x_fapi_auth_date Optional parameter: The time when the
103
+ # Customer last logged in with the Third Party. All dates in the HTTP
104
+ # headers are represented as RFC 7231 Full Dates. An example is below: Sun,
105
+ # 10 Sep 2017 19:43:31 UTC
106
+ # @param [String] x_fapi_customer_ip_address Optional parameter: The
107
+ # Customer's IP address if the Customer is currently logged in with the
108
+ # Third Party.
109
+ # @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
110
+ # used as a correlation id.
111
+ # @param [String] x_merchant_ip_address Optional parameter: The IP address
112
+ # of the merchant when making account information requests through a Third
113
+ # Party.
114
+ # @param [String] x_customer_user_agent Optional parameter: The User-Agent
115
+ # of the application on the customer device that is used to make the account
116
+ # information request
117
+ # @return [Object] response from the API call.
118
+ def get_account_statement_file(account_id,
119
+ statement_id,
120
+ x_fapi_auth_date: nil,
121
+ x_fapi_customer_ip_address: nil,
122
+ x_fapi_interaction_id: nil,
123
+ x_merchant_ip_address: nil,
124
+ x_customer_user_agent: nil)
125
+ new_api_call_builder
126
+ .request(new_request_builder(HttpMethodEnum::GET,
127
+ '/accounts/{AccountId}/statements/{StatementId}/file',
128
+ Server::DEFAULT)
129
+ .template_param(new_parameter(account_id, key: 'AccountId')
130
+ .should_encode(true))
131
+ .template_param(new_parameter(statement_id, key: 'StatementId')
132
+ .should_encode(true))
133
+ .header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
134
+ .header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
135
+ .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
136
+ .header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
137
+ .header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
138
+ .header_param(new_parameter('application/json', key: 'accept'))
139
+ .auth(Single.new('HTTPBearerAuthentication')))
140
+ .response(new_response_handler
141
+ .deserializer(APIHelper.method(:json_deserialize))
142
+ .local_error('400',
143
+ 'Bad Request',
144
+ APIException)
145
+ .local_error('401',
146
+ 'Unauthorized',
147
+ APIException)
148
+ .local_error('403',
149
+ 'Forbidden',
150
+ APIException)
151
+ .local_error('405',
152
+ 'Method Not Allowed',
153
+ APIException)
154
+ .local_error('406',
155
+ 'Not Acceptable',
156
+ APIException)
157
+ .local_error('429',
158
+ 'Too Many Requests',
159
+ APIException)
160
+ .local_error('500',
161
+ 'Internal Server Error',
162
+ APIException)
163
+ .local_error('501',
164
+ 'Not Implemented',
165
+ APIException)
166
+ .local_error('503',
167
+ 'Service Unavailable',
168
+ APIException))
169
+ .execute
170
+ end
171
+
172
+ # Get Statement Transactions related to an account
173
+ # @param [String] account_id Required parameter: A unique identifier used to
174
+ # identify the account resource.
175
+ # @param [String] statement_id Required parameter: A unique identifier used
176
+ # to identify the statement resource.
177
+ # @param [DateTime] from_booking_date_time Optional parameter: The UTC ISO
178
+ # 8601 Date Time to filter transactions FROM NB Time component is optional -
179
+ # set to 00:00:00 for just Date. If the Date Time contains a timezone, the
180
+ # API Provider must ignore the timezone component.
181
+ # @param [DateTime] to_booking_date_time Optional parameter: The UTC ISO
182
+ # 8601 Date Time to filter transactions TO NB Time component is optional -
183
+ # set to 00:00:00 for just Date. If the Date Time contains a timezone, the
184
+ # API Provider must ignore the timezone component.
185
+ # @param [String] x_fapi_auth_date Optional parameter: The time when the
186
+ # Customer last logged in with the Third Party. All dates in the HTTP
187
+ # headers are represented as RFC 7231 Full Dates. An example is below: Sun,
188
+ # 10 Sep 2017 19:43:31 UTC
189
+ # @param [String] x_fapi_customer_ip_address Optional parameter: The
190
+ # Customer's IP address if the Customer is currently logged in with the
191
+ # Third Party.
192
+ # @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
193
+ # used as a correlation id.
194
+ # @param [String] x_merchant_ip_address Optional parameter: The IP address
195
+ # of the merchant when making account information requests through a Third
196
+ # Party.
197
+ # @param [String] x_customer_user_agent Optional parameter: The User-Agent
198
+ # of the application on the customer device that is used to make the account
199
+ # information request
200
+ # @return [GetAccountStatementTransactionsResponse] response from the API call.
201
+ def get_account_statement_transactions(account_id,
202
+ statement_id,
203
+ from_booking_date_time: nil,
204
+ to_booking_date_time: nil,
205
+ x_fapi_auth_date: nil,
206
+ x_fapi_customer_ip_address: nil,
207
+ x_fapi_interaction_id: nil,
208
+ x_merchant_ip_address: nil,
209
+ x_customer_user_agent: nil)
210
+ new_api_call_builder
211
+ .request(new_request_builder(HttpMethodEnum::GET,
212
+ '/accounts/{AccountId}/statements/{StatementId}/transactions',
213
+ Server::DEFAULT)
214
+ .template_param(new_parameter(account_id, key: 'AccountId')
215
+ .should_encode(true))
216
+ .template_param(new_parameter(statement_id, key: 'StatementId')
217
+ .should_encode(true))
218
+ .query_param(new_parameter(from_booking_date_time, key: 'fromBookingDateTime'))
219
+ .query_param(new_parameter(to_booking_date_time, key: 'toBookingDateTime'))
220
+ .header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
221
+ .header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
222
+ .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
223
+ .header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
224
+ .header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
225
+ .header_param(new_parameter('application/json', key: 'accept'))
226
+ .auth(Single.new('HTTPBearerAuthentication')))
227
+ .response(new_response_handler
228
+ .deserializer(APIHelper.method(:custom_type_deserializer))
229
+ .deserialize_into(GetAccountStatementTransactionsResponse.method(:from_hash))
230
+ .local_error('400',
231
+ 'Bad Request',
232
+ AccountsStatementsTransactions400ErrorException)
233
+ .local_error('401',
234
+ 'Unauthorized',
235
+ APIException)
236
+ .local_error('403',
237
+ 'Forbidden',
238
+ AccountsStatementsTransactions403ErrorException)
239
+ .local_error('405',
240
+ 'Method Not Allowed',
241
+ APIException)
242
+ .local_error('406',
243
+ 'Not Acceptable',
244
+ APIException)
245
+ .local_error('429',
246
+ 'Too Many Requests',
247
+ APIException)
248
+ .local_error('500',
249
+ 'Internal Server Error',
250
+ AccountsStatementsTransactions500ErrorException)
251
+ .local_error('501',
252
+ 'Not Implemented',
253
+ APIException)
254
+ .local_error('503',
255
+ 'Service Unavailable',
256
+ AccountsStatementsTransactions503ErrorException))
257
+ .execute
258
+ end
259
+
260
+ # Get Statements related to an account
261
+ # @param [String] account_id Required parameter: A unique identifier used to
262
+ # identify the account resource.
263
+ # @param [DateTime] from_statement_date_time Optional parameter: The UTC ISO
264
+ # 8601 Date Time to filter statements FROM NB Time component is optional -
265
+ # set to 00:00:00 for just Date. If the Date Time contains a timezone, the
266
+ # API Provider must ignore the timezone component.
267
+ # @param [DateTime] to_statement_date_time Optional parameter: The UTC ISO
268
+ # 8601 Date Time to filter statements TO NB Time component is optional - set
269
+ # to 00:00:00 for just Date. If the Date Time contains a timezone, the API
270
+ # Provider must ignore the timezone component.
271
+ # @param [String] x_fapi_auth_date Optional parameter: The time when the
272
+ # Customer last logged in with the Third Party. All dates in the HTTP
273
+ # headers are represented as RFC 7231 Full Dates. An example is below: Sun,
274
+ # 10 Sep 2017 19:43:31 UTC
275
+ # @param [String] x_fapi_customer_ip_address Optional parameter: The
276
+ # Customer's IP address if the Customer is currently logged in with the
277
+ # Third Party.
278
+ # @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
279
+ # used as a correlation id.
280
+ # @param [String] x_merchant_ip_address Optional parameter: The IP address
281
+ # of the merchant when making account information requests through a Third
282
+ # Party.
283
+ # @param [String] x_customer_user_agent Optional parameter: The User-Agent
284
+ # of the application on the customer device that is used to make the account
285
+ # information request
286
+ # @return [GetAccountStatementsResponse] response from the API call.
287
+ def get_account_statements(account_id,
288
+ from_statement_date_time: nil,
289
+ to_statement_date_time: nil,
290
+ x_fapi_auth_date: nil,
291
+ x_fapi_customer_ip_address: nil,
292
+ x_fapi_interaction_id: nil,
293
+ x_merchant_ip_address: nil,
294
+ x_customer_user_agent: nil)
295
+ new_api_call_builder
296
+ .request(new_request_builder(HttpMethodEnum::GET,
297
+ '/accounts/{AccountId}/statements',
298
+ Server::DEFAULT)
299
+ .template_param(new_parameter(account_id, key: 'AccountId')
300
+ .should_encode(true))
301
+ .query_param(new_parameter(from_statement_date_time, key: 'fromStatementDateTime'))
302
+ .query_param(new_parameter(to_statement_date_time, key: 'toStatementDateTime'))
303
+ .header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
304
+ .header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
305
+ .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
306
+ .header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
307
+ .header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
308
+ .header_param(new_parameter('application/json', key: 'accept'))
309
+ .auth(Single.new('HTTPBearerAuthentication')))
310
+ .response(new_response_handler
311
+ .deserializer(APIHelper.method(:custom_type_deserializer))
312
+ .deserialize_into(GetAccountStatementsResponse.method(:from_hash))
313
+ .local_error('400',
314
+ 'Bad Request',
315
+ AccountsStatements400ErrorException)
316
+ .local_error('401',
317
+ 'Unauthorized',
318
+ APIException)
319
+ .local_error('403',
320
+ 'Forbidden',
321
+ AccountsStatements403ErrorException)
322
+ .local_error('405',
323
+ 'Method Not Allowed',
324
+ APIException)
325
+ .local_error('406',
326
+ 'Not Acceptable',
327
+ APIException)
328
+ .local_error('429',
329
+ 'Too Many Requests',
330
+ APIException)
331
+ .local_error('500',
332
+ 'Internal Server Error',
333
+ AccountsStatements500ErrorException)
334
+ .local_error('501',
335
+ 'Not Implemented',
336
+ APIException)
337
+ .local_error('503',
338
+ 'Service Unavailable',
339
+ AccountsStatements503ErrorException))
340
+ .execute
341
+ end
342
+
343
+ # Get Statements
344
+ # @param [DateTime] from_statement_date_time Optional parameter: The UTC ISO
345
+ # 8601 Date Time to filter statements FROM NB Time component is optional -
346
+ # set to 00:00:00 for just Date. If the Date Time contains a timezone, the
347
+ # API Provider must ignore the timezone component.
348
+ # @param [DateTime] to_statement_date_time Optional parameter: The UTC ISO
349
+ # 8601 Date Time to filter statements TO NB Time component is optional - set
350
+ # to 00:00:00 for just Date. If the Date Time contains a timezone, the API
351
+ # Provider must ignore the timezone component.
352
+ # @param [String] x_fapi_auth_date Optional parameter: The time when the
353
+ # Customer last logged in with the Third Party. All dates in the HTTP
354
+ # headers are represented as RFC 7231 Full Dates. An example is below: Sun,
355
+ # 10 Sep 2017 19:43:31 UTC
356
+ # @param [String] x_fapi_customer_ip_address Optional parameter: The
357
+ # Customer's IP address if the Customer is currently logged in with the
358
+ # Third Party.
359
+ # @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
360
+ # used as a correlation id.
361
+ # @param [String] x_merchant_ip_address Optional parameter: The IP address
362
+ # of the merchant when making account information requests through a Third
363
+ # Party.
364
+ # @param [String] x_customer_user_agent Optional parameter: The User-Agent
365
+ # of the application on the customer device that is used to make the account
366
+ # information request
367
+ # @return [GetStatementsResponse] response from the API call.
368
+ def get_statements(from_statement_date_time: nil,
369
+ to_statement_date_time: nil,
370
+ x_fapi_auth_date: nil,
371
+ x_fapi_customer_ip_address: nil,
372
+ x_fapi_interaction_id: nil,
373
+ x_merchant_ip_address: nil,
374
+ x_customer_user_agent: nil)
375
+ new_api_call_builder
376
+ .request(new_request_builder(HttpMethodEnum::GET,
377
+ '/statements',
378
+ Server::DEFAULT)
379
+ .query_param(new_parameter(from_statement_date_time, key: 'fromStatementDateTime'))
380
+ .query_param(new_parameter(to_statement_date_time, key: 'toStatementDateTime'))
381
+ .header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
382
+ .header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
383
+ .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
384
+ .header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
385
+ .header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
386
+ .header_param(new_parameter('application/json', key: 'accept'))
387
+ .auth(Single.new('HTTPBearerAuthentication')))
388
+ .response(new_response_handler
389
+ .deserializer(APIHelper.method(:custom_type_deserializer))
390
+ .deserialize_into(GetStatementsResponse.method(:from_hash))
391
+ .local_error('400',
392
+ 'Bad Request',
393
+ Statements400ErrorException)
394
+ .local_error('401',
395
+ 'Unauthorized',
396
+ APIException)
397
+ .local_error('403',
398
+ 'Forbidden',
399
+ Statements403ErrorException)
400
+ .local_error('405',
401
+ 'Method Not Allowed',
402
+ APIException)
403
+ .local_error('406',
404
+ 'Not Acceptable',
405
+ APIException)
406
+ .local_error('429',
407
+ 'Too Many Requests',
408
+ APIException)
409
+ .local_error('500',
410
+ 'Internal Server Error',
411
+ Statements500ErrorException)
412
+ .local_error('501',
413
+ 'Not Implemented',
414
+ APIException)
415
+ .local_error('503',
416
+ 'Service Unavailable',
417
+ Statements503ErrorException))
418
+ .execute
419
+ end
420
+ end
421
+ end
@@ -0,0 +1,170 @@
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
+ # TransactionsController
8
+ class TransactionsController < BaseController
9
+ # Get transactions related to an account
10
+ # @param [String] account_id Required parameter: A unique identifier used to
11
+ # identify the account resource.
12
+ # @param [DateTime] from_booking_date_time Optional parameter: The UTC ISO
13
+ # 8601 Date Time to filter transactions FROM NB Time component is optional -
14
+ # set to 00:00:00 for just Date. If the Date Time contains a timezone, the
15
+ # API Provider must ignore the timezone component.
16
+ # @param [DateTime] to_booking_date_time Optional parameter: The UTC ISO
17
+ # 8601 Date Time to filter transactions TO NB Time component is optional -
18
+ # set to 00:00:00 for just Date. If the Date Time contains a timezone, the
19
+ # API Provider must ignore the timezone component.
20
+ # @param [String] x_fapi_auth_date Optional parameter: The time when the
21
+ # Customer last logged in with the Third Party. All dates in the HTTP
22
+ # headers are represented as RFC 7231 Full Dates. An example is below: Sun,
23
+ # 10 Sep 2017 19:43:31 UTC
24
+ # @param [String] x_fapi_customer_ip_address Optional parameter: The
25
+ # Customer's IP address if the Customer is currently logged in with the
26
+ # Third Party.
27
+ # @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
28
+ # used as a correlation id.
29
+ # @param [String] x_merchant_ip_address Optional parameter: The IP address
30
+ # of the merchant when making account information requests through a Third
31
+ # Party.
32
+ # @param [String] x_customer_user_agent Optional parameter: The User-Agent
33
+ # of the application on the customer device that is used to make the account
34
+ # information request
35
+ # @return [TransactionsResponse] response from the API call.
36
+ def get_account_transactions(account_id,
37
+ from_booking_date_time: nil,
38
+ to_booking_date_time: nil,
39
+ x_fapi_auth_date: nil,
40
+ x_fapi_customer_ip_address: nil,
41
+ x_fapi_interaction_id: nil,
42
+ x_merchant_ip_address: nil,
43
+ x_customer_user_agent: nil)
44
+ new_api_call_builder
45
+ .request(new_request_builder(HttpMethodEnum::GET,
46
+ '/accounts/{AccountId}/transactions',
47
+ Server::DEFAULT)
48
+ .template_param(new_parameter(account_id, key: 'AccountId')
49
+ .should_encode(true))
50
+ .query_param(new_parameter(from_booking_date_time, key: 'fromBookingDateTime'))
51
+ .query_param(new_parameter(to_booking_date_time, key: 'toBookingDateTime'))
52
+ .header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
53
+ .header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
54
+ .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
55
+ .header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
56
+ .header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
57
+ .header_param(new_parameter('application/json', key: 'accept'))
58
+ .auth(Single.new('HTTPBearerAuthentication')))
59
+ .response(new_response_handler
60
+ .deserializer(APIHelper.method(:custom_type_deserializer))
61
+ .deserialize_into(TransactionsResponse.method(:from_hash))
62
+ .local_error('400',
63
+ 'Bad Request',
64
+ AccountsTransactions400ErrorException)
65
+ .local_error('401',
66
+ 'Unauthorized',
67
+ APIException)
68
+ .local_error('403',
69
+ 'Forbidden',
70
+ AccountsTransactions403ErrorException)
71
+ .local_error('405',
72
+ 'Method Not Allowed',
73
+ APIException)
74
+ .local_error('406',
75
+ 'Not Acceptable',
76
+ APIException)
77
+ .local_error('429',
78
+ 'Too Many Requests',
79
+ APIException)
80
+ .local_error('500',
81
+ 'Internal Server Error',
82
+ AccountsTransactions500ErrorException)
83
+ .local_error('501',
84
+ 'Not Implemented',
85
+ APIException)
86
+ .local_error('503',
87
+ 'Service Unavailable',
88
+ AccountsTransactions503ErrorException))
89
+ .execute
90
+ end
91
+
92
+ # Get Transactions
93
+ # @param [DateTime] from_booking_date_time Optional parameter: The UTC ISO
94
+ # 8601 Date Time to filter transactions FROM NB Time component is optional -
95
+ # set to 00:00:00 for just Date. If the Date Time contains a timezone, the
96
+ # API Provider must ignore the timezone component.
97
+ # @param [DateTime] to_booking_date_time Optional parameter: The UTC ISO
98
+ # 8601 Date Time to filter transactions TO NB Time component is optional -
99
+ # set to 00:00:00 for just Date. If the Date Time contains a timezone, the
100
+ # API Provider must ignore the timezone component.
101
+ # @param [String] x_fapi_auth_date Optional parameter: The time when the
102
+ # Customer last logged in with the Third Party. All dates in the HTTP
103
+ # headers are represented as RFC 7231 Full Dates. An example is below: Sun,
104
+ # 10 Sep 2017 19:43:31 UTC
105
+ # @param [String] x_fapi_customer_ip_address Optional parameter: The
106
+ # Customer's IP address if the Customer is currently logged in with the
107
+ # Third Party.
108
+ # @param [String] x_fapi_interaction_id Optional parameter: An RFC4122 UID
109
+ # used as a correlation id.
110
+ # @param [String] x_merchant_ip_address Optional parameter: The IP address
111
+ # of the merchant when making account information requests through a Third
112
+ # Party.
113
+ # @param [String] x_customer_user_agent Optional parameter: The User-Agent
114
+ # of the application on the customer device that is used to make the account
115
+ # information request
116
+ # @return [TransactionsResponse] response from the API call.
117
+ def get_transactions(from_booking_date_time: nil,
118
+ to_booking_date_time: nil,
119
+ x_fapi_auth_date: nil,
120
+ x_fapi_customer_ip_address: nil,
121
+ x_fapi_interaction_id: nil,
122
+ x_merchant_ip_address: nil,
123
+ x_customer_user_agent: nil)
124
+ new_api_call_builder
125
+ .request(new_request_builder(HttpMethodEnum::GET,
126
+ '/transactions',
127
+ Server::DEFAULT)
128
+ .query_param(new_parameter(from_booking_date_time, key: 'fromBookingDateTime'))
129
+ .query_param(new_parameter(to_booking_date_time, key: 'toBookingDateTime'))
130
+ .header_param(new_parameter(x_fapi_auth_date, key: 'x-fapi-auth-date'))
131
+ .header_param(new_parameter(x_fapi_customer_ip_address, key: 'x-fapi-customer-ip-address'))
132
+ .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id'))
133
+ .header_param(new_parameter(x_merchant_ip_address, key: 'x-merchant-ip-address'))
134
+ .header_param(new_parameter(x_customer_user_agent, key: 'x-customer-user-agent'))
135
+ .header_param(new_parameter('application/json', key: 'accept'))
136
+ .auth(Single.new('HTTPBearerAuthentication')))
137
+ .response(new_response_handler
138
+ .deserializer(APIHelper.method(:custom_type_deserializer))
139
+ .deserialize_into(TransactionsResponse.method(:from_hash))
140
+ .local_error('400',
141
+ 'Bad Request',
142
+ Transactions400ErrorException)
143
+ .local_error('401',
144
+ 'Unauthorized',
145
+ APIException)
146
+ .local_error('403',
147
+ 'Forbidden',
148
+ Transactions403ErrorException)
149
+ .local_error('405',
150
+ 'Method Not Allowed',
151
+ APIException)
152
+ .local_error('406',
153
+ 'Not Acceptable',
154
+ APIException)
155
+ .local_error('429',
156
+ 'Too Many Requests',
157
+ APIException)
158
+ .local_error('500',
159
+ 'Internal Server Error',
160
+ Transactions500ErrorException)
161
+ .local_error('501',
162
+ 'Not Implemented',
163
+ APIException)
164
+ .local_error('503',
165
+ 'Service Unavailable',
166
+ Transactions503ErrorException))
167
+ .execute
168
+ end
169
+ end
170
+ end
@@ -0,0 +1,72 @@
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
+ # Accounts 400 Error class.
8
+ class Accounts400ErrorException < APIException
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # High level textual error code to help categorise the errors.
13
+ # @return [String]
14
+ attr_accessor :code
15
+
16
+ # A unique reference for the error instance, for audit purposes, in case of
17
+ # unknown/unclassified errors.
18
+ # @return [String]
19
+ attr_accessor :id
20
+
21
+ # Brief Error message. E.g., 'There is something wrong with the request
22
+ # parameters provided'
23
+ # @return [String]
24
+ attr_accessor :message
25
+
26
+ # Brief Error message. E.g., 'There is something wrong with the request
27
+ # parameters provided'
28
+ # @return [Array[Error]]
29
+ attr_accessor :errors
30
+
31
+ # The constructor.
32
+ # @param [String] The reason for raising an exception.
33
+ # @param [HttpResponse] The HttpReponse of the API call.
34
+ def initialize(reason, response)
35
+ super(reason, response)
36
+ hash = APIHelper.json_deserialize(@response.raw_body)
37
+ unbox(hash)
38
+ end
39
+
40
+ # Populates this object by extracting properties from a hash.
41
+ # @param [Hash] The deserialized response sent by the server in the
42
+ # response body.
43
+ def unbox(hash)
44
+ @code = hash.key?('Code') ? hash['Code'] : nil
45
+ @id = hash.key?('Id') ? hash['Id'] : SKIP
46
+ @message = hash.key?('Message') ? hash['Message'] : nil
47
+ # Parameter is an array, so we need to iterate through it
48
+ @errors = nil
49
+ unless hash['Errors'].nil?
50
+ @errors = []
51
+ hash['Errors'].each do |structure|
52
+ @errors << (Error.from_hash(structure) if structure)
53
+ end
54
+ end
55
+
56
+ @errors = nil unless hash.key?('Errors')
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} code: #{@code}, id: #{@id}, message: #{@message}, errors: #{@errors}>"
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} code: #{@code.inspect}, id: #{@id.inspect}, message: #{@message.inspect},"\
69
+ " errors: #{@errors.inspect}>"
70
+ end
71
+ end
72
+ end