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,100 @@
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
+ # Provides the details to identify an account.
8
+ class Account < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [AccountSchemeModelEnum]
14
+ attr_accessor :scheme_name
15
+
16
+ # Identification assigned by an institution to identify an account. This
17
+ # identification is known by the account owner.
18
+ # @return [String]
19
+ attr_accessor :identification
20
+
21
+ # Name of the account, as assigned by the account servicing institution, in
22
+ # agreement with the account owner in order to provide an additional means
23
+ # of identification of the account. Usage: The account name is different
24
+ # from the account owner name. The account name is used in certain user
25
+ # communities to provide a means of identifying the account, in addition to
26
+ # the account owner's identity and the account number.
27
+ # @return [String]
28
+ attr_accessor :name
29
+
30
+ # This is secondary identification of the account, as assigned by the
31
+ # account servicing institution.
32
+ # @return [String]
33
+ attr_accessor :secondary_identification
34
+
35
+ # A mapping from model property names to API property names.
36
+ def self.names
37
+ @_hash = {} if @_hash.nil?
38
+ @_hash['scheme_name'] = 'SchemeName'
39
+ @_hash['identification'] = 'Identification'
40
+ @_hash['name'] = 'Name'
41
+ @_hash['secondary_identification'] = 'SecondaryIdentification'
42
+ @_hash
43
+ end
44
+
45
+ # An array for optional fields
46
+ def self.optionals
47
+ %w[
48
+ name
49
+ secondary_identification
50
+ ]
51
+ end
52
+
53
+ # An array for nullable fields
54
+ def self.nullables
55
+ []
56
+ end
57
+
58
+ def initialize(scheme_name = nil, identification = nil, name = SKIP,
59
+ secondary_identification = SKIP)
60
+ @scheme_name = scheme_name
61
+ @identification = identification
62
+ @name = name unless name == SKIP
63
+ @secondary_identification = secondary_identification unless secondary_identification == SKIP
64
+ end
65
+
66
+ # Creates an instance of the object from a hash.
67
+ def self.from_hash(hash)
68
+ return nil unless hash
69
+
70
+ # Extract variables from the hash.
71
+ scheme_name = hash.key?('SchemeName') ? hash['SchemeName'] : nil
72
+ identification =
73
+ hash.key?('Identification') ? hash['Identification'] : nil
74
+ name = hash.key?('Name') ? hash['Name'] : SKIP
75
+ secondary_identification =
76
+ hash.key?('SecondaryIdentification') ? hash['SecondaryIdentification'] : SKIP
77
+
78
+ # Create object from extracted values.
79
+ Account.new(scheme_name,
80
+ identification,
81
+ name,
82
+ secondary_identification)
83
+ end
84
+
85
+ # Provides a human-readable string representation of the object.
86
+ def to_s
87
+ class_name = self.class.name.split('::').last
88
+ "<#{class_name} scheme_name: #{@scheme_name}, identification: #{@identification}, name:"\
89
+ " #{@name}, secondary_identification: #{@secondary_identification}>"
90
+ end
91
+
92
+ # Provides a debugging-friendly string with detailed object information.
93
+ def inspect
94
+ class_name = self.class.name.split('::').last
95
+ "<#{class_name} scheme_name: #{@scheme_name.inspect}, identification:"\
96
+ " #{@identification.inspect}, name: #{@name.inspect}, secondary_identification:"\
97
+ " #{@secondary_identification.inspect}>"
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,69 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module AccountAndTransactionApiSpecification
7
+ # AccountAccessConsent Model.
8
+ class AccountAccessConsent < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [AccountAccessConsentModel]
14
+ attr_accessor :data
15
+
16
+ # The Risk section is sent by the initiating party to the API Provider. It
17
+ # is used to specify additional details for risk scoring.
18
+ # @return [Risk]
19
+ attr_accessor :risk
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['data'] = 'Data'
25
+ @_hash['risk'] = 'Risk'
26
+ @_hash
27
+ end
28
+
29
+ # An array for optional fields
30
+ def self.optionals
31
+ []
32
+ end
33
+
34
+ # An array for nullable fields
35
+ def self.nullables
36
+ []
37
+ end
38
+
39
+ def initialize(data = nil, risk = nil)
40
+ @data = data
41
+ @risk = risk
42
+ end
43
+
44
+ # Creates an instance of the object from a hash.
45
+ def self.from_hash(hash)
46
+ return nil unless hash
47
+
48
+ # Extract variables from the hash.
49
+ data = AccountAccessConsentModel.from_hash(hash['Data']) if hash['Data']
50
+ risk = Risk.from_hash(hash['Risk']) if hash['Risk']
51
+
52
+ # Create object from extracted values.
53
+ AccountAccessConsent.new(data,
54
+ risk)
55
+ end
56
+
57
+ # Provides a human-readable string representation of the object.
58
+ def to_s
59
+ class_name = self.class.name.split('::').last
60
+ "<#{class_name} data: #{@data}, risk: #{@risk}>"
61
+ end
62
+
63
+ # Provides a debugging-friendly string with detailed object information.
64
+ def inspect
65
+ class_name = self.class.name.split('::').last
66
+ "<#{class_name} data: #{@data.inspect}, risk: #{@risk.inspect}>"
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,60 @@
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
+ # AccountAccessConsentModel Model.
8
+ class AccountAccessConsentModel < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Contains the requested consent
13
+ # @return [Consent]
14
+ attr_accessor :consent
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['consent'] = 'Consent'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ []
26
+ end
27
+
28
+ # An array for nullable fields
29
+ def self.nullables
30
+ []
31
+ end
32
+
33
+ def initialize(consent = nil)
34
+ @consent = consent
35
+ end
36
+
37
+ # Creates an instance of the object from a hash.
38
+ def self.from_hash(hash)
39
+ return nil unless hash
40
+
41
+ # Extract variables from the hash.
42
+ consent = Consent.from_hash(hash['Consent']) if hash['Consent']
43
+
44
+ # Create object from extracted values.
45
+ AccountAccessConsentModel.new(consent)
46
+ end
47
+
48
+ # Provides a human-readable string representation of the object.
49
+ def to_s
50
+ class_name = self.class.name.split('::').last
51
+ "<#{class_name} consent: #{@consent}>"
52
+ end
53
+
54
+ # Provides a debugging-friendly string with detailed object information.
55
+ def inspect
56
+ class_name = self.class.name.split('::').last
57
+ "<#{class_name} consent: #{@consent.inspect}>"
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,86 @@
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
+ # AccountAccessConsentPOSTresponse Model.
8
+ class AccountAccessConsentPOSTresponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [AccountAccessConsentResponseModel]
14
+ attr_accessor :data
15
+
16
+ # The Risk section is sent by the initiating party to the API Provider. It
17
+ # is used to specify additional details for risk scoring.
18
+ # @return [Risk]
19
+ attr_accessor :risk
20
+
21
+ # Links relevant to the payload
22
+ # @return [Links]
23
+ attr_accessor :links
24
+
25
+ # Links relevant to the payload
26
+ # @return [Meta]
27
+ attr_accessor :meta
28
+
29
+ # A mapping from model property names to API property names.
30
+ def self.names
31
+ @_hash = {} if @_hash.nil?
32
+ @_hash['data'] = 'Data'
33
+ @_hash['risk'] = 'Risk'
34
+ @_hash['links'] = 'Links'
35
+ @_hash['meta'] = 'Meta'
36
+ @_hash
37
+ end
38
+
39
+ # An array for optional fields
40
+ def self.optionals
41
+ []
42
+ end
43
+
44
+ # An array for nullable fields
45
+ def self.nullables
46
+ []
47
+ end
48
+
49
+ def initialize(data = nil, risk = nil, links = nil, meta = nil)
50
+ @data = data
51
+ @risk = risk
52
+ @links = links
53
+ @meta = meta
54
+ end
55
+
56
+ # Creates an instance of the object from a hash.
57
+ def self.from_hash(hash)
58
+ return nil unless hash
59
+
60
+ # Extract variables from the hash.
61
+ data = AccountAccessConsentResponseModel.from_hash(hash['Data']) if hash['Data']
62
+ risk = Risk.from_hash(hash['Risk']) if hash['Risk']
63
+ links = Links.from_hash(hash['Links']) if hash['Links']
64
+ meta = Meta.from_hash(hash['Meta']) if hash['Meta']
65
+
66
+ # Create object from extracted values.
67
+ AccountAccessConsentPOSTresponse.new(data,
68
+ risk,
69
+ links,
70
+ meta)
71
+ end
72
+
73
+ # Provides a human-readable string representation of the object.
74
+ def to_s
75
+ class_name = self.class.name.split('::').last
76
+ "<#{class_name} data: #{@data}, risk: #{@risk}, links: #{@links}, meta: #{@meta}>"
77
+ end
78
+
79
+ # Provides a debugging-friendly string with detailed object information.
80
+ def inspect
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} data: #{@data.inspect}, risk: #{@risk.inspect}, links: #{@links.inspect},"\
83
+ " meta: #{@meta.inspect}>"
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,86 @@
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
+ # AccountAccessConsentResponse Model.
8
+ class AccountAccessConsentResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [AccountAccessConsentResponseModel]
14
+ attr_accessor :data
15
+
16
+ # The Risk section is sent by the initiating party to the API Provider. It
17
+ # is used to specify additional details for risk scoring.
18
+ # @return [Risk]
19
+ attr_accessor :risk
20
+
21
+ # Links relevant to the payload
22
+ # @return [Links]
23
+ attr_accessor :links
24
+
25
+ # Links relevant to the payload
26
+ # @return [Meta]
27
+ attr_accessor :meta
28
+
29
+ # A mapping from model property names to API property names.
30
+ def self.names
31
+ @_hash = {} if @_hash.nil?
32
+ @_hash['data'] = 'Data'
33
+ @_hash['risk'] = 'Risk'
34
+ @_hash['links'] = 'Links'
35
+ @_hash['meta'] = 'Meta'
36
+ @_hash
37
+ end
38
+
39
+ # An array for optional fields
40
+ def self.optionals
41
+ []
42
+ end
43
+
44
+ # An array for nullable fields
45
+ def self.nullables
46
+ []
47
+ end
48
+
49
+ def initialize(data = nil, risk = nil, links = nil, meta = nil)
50
+ @data = data
51
+ @risk = risk
52
+ @links = links
53
+ @meta = meta
54
+ end
55
+
56
+ # Creates an instance of the object from a hash.
57
+ def self.from_hash(hash)
58
+ return nil unless hash
59
+
60
+ # Extract variables from the hash.
61
+ data = AccountAccessConsentResponseModel.from_hash(hash['Data']) if hash['Data']
62
+ risk = Risk.from_hash(hash['Risk']) if hash['Risk']
63
+ links = Links.from_hash(hash['Links']) if hash['Links']
64
+ meta = Meta.from_hash(hash['Meta']) if hash['Meta']
65
+
66
+ # Create object from extracted values.
67
+ AccountAccessConsentResponse.new(data,
68
+ risk,
69
+ links,
70
+ meta)
71
+ end
72
+
73
+ # Provides a human-readable string representation of the object.
74
+ def to_s
75
+ class_name = self.class.name.split('::').last
76
+ "<#{class_name} data: #{@data}, risk: #{@risk}, links: #{@links}, meta: #{@meta}>"
77
+ end
78
+
79
+ # Provides a debugging-friendly string with detailed object information.
80
+ def inspect
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} data: #{@data.inspect}, risk: #{@risk.inspect}, links: #{@links.inspect},"\
83
+ " meta: #{@meta.inspect}>"
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,120 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require 'date'
7
+ module AccountAndTransactionApiSpecification
8
+ # AccountAccessConsentResponseModel Model.
9
+ class AccountAccessConsentResponseModel < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Unique identification as assigned to identify the account access consent.
14
+ # @return [String]
15
+ attr_accessor :consent_id
16
+
17
+ # Specifies the status of the account access consent.
18
+ # @return [AccountAccessStatusEnum]
19
+ attr_accessor :status
20
+
21
+ # Date and time at which the consent was created.
22
+ # All dates in the JSON payloads are represented in ISO 8601 date-time
23
+ # format.
24
+ # All date-time fields in responses must include the timezone. An example is
25
+ # below:
26
+ # 2017-04-05T10:43:07+00:00
27
+ # @return [DateTime]
28
+ attr_accessor :creation_date_time
29
+
30
+ # Date and time at which the consent status was updated.
31
+ # All dates in the JSON payloads are represented in ISO 8601 date-time
32
+ # format.
33
+ # All date-time fields in responses must include the timezone. An example is
34
+ # below:
35
+ # 2017-04-05T10:43:07+00:00
36
+ # @return [DateTime]
37
+ attr_accessor :status_update_date_time
38
+
39
+ # Contains the requested consent
40
+ # @return [Consent]
41
+ attr_accessor :consent
42
+
43
+ # A mapping from model property names to API property names.
44
+ def self.names
45
+ @_hash = {} if @_hash.nil?
46
+ @_hash['consent_id'] = 'ConsentId'
47
+ @_hash['status'] = 'Status'
48
+ @_hash['creation_date_time'] = 'CreationDateTime'
49
+ @_hash['status_update_date_time'] = 'StatusUpdateDateTime'
50
+ @_hash['consent'] = 'Consent'
51
+ @_hash
52
+ end
53
+
54
+ # An array for optional fields
55
+ def self.optionals
56
+ []
57
+ end
58
+
59
+ # An array for nullable fields
60
+ def self.nullables
61
+ []
62
+ end
63
+
64
+ def initialize(consent_id = nil, status = nil, creation_date_time = nil,
65
+ status_update_date_time = nil, consent = nil)
66
+ @consent_id = consent_id
67
+ @status = status
68
+ @creation_date_time = creation_date_time
69
+ @status_update_date_time = status_update_date_time
70
+ @consent = consent
71
+ end
72
+
73
+ # Creates an instance of the object from a hash.
74
+ def self.from_hash(hash)
75
+ return nil unless hash
76
+
77
+ # Extract variables from the hash.
78
+ consent_id = hash.key?('ConsentId') ? hash['ConsentId'] : nil
79
+ status = hash.key?('Status') ? hash['Status'] : nil
80
+ creation_date_time = if hash.key?('CreationDateTime')
81
+ (DateTimeHelper.from_rfc3339(hash['CreationDateTime']) if hash['CreationDateTime'])
82
+ end
83
+ status_update_date_time = if hash.key?('StatusUpdateDateTime')
84
+ (DateTimeHelper.from_rfc3339(hash['StatusUpdateDateTime']) if hash['StatusUpdateDateTime'])
85
+ end
86
+ consent = Consent.from_hash(hash['Consent']) if hash['Consent']
87
+
88
+ # Create object from extracted values.
89
+ AccountAccessConsentResponseModel.new(consent_id,
90
+ status,
91
+ creation_date_time,
92
+ status_update_date_time,
93
+ consent)
94
+ end
95
+
96
+ def to_custom_creation_date_time
97
+ DateTimeHelper.to_rfc3339(creation_date_time)
98
+ end
99
+
100
+ def to_custom_status_update_date_time
101
+ DateTimeHelper.to_rfc3339(status_update_date_time)
102
+ end
103
+
104
+ # Provides a human-readable string representation of the object.
105
+ def to_s
106
+ class_name = self.class.name.split('::').last
107
+ "<#{class_name} consent_id: #{@consent_id}, status: #{@status}, creation_date_time:"\
108
+ " #{@creation_date_time}, status_update_date_time: #{@status_update_date_time}, consent:"\
109
+ " #{@consent}>"
110
+ end
111
+
112
+ # Provides a debugging-friendly string with detailed object information.
113
+ def inspect
114
+ class_name = self.class.name.split('::').last
115
+ "<#{class_name} consent_id: #{@consent_id.inspect}, status: #{@status.inspect},"\
116
+ " creation_date_time: #{@creation_date_time.inspect}, status_update_date_time:"\
117
+ " #{@status_update_date_time.inspect}, consent: #{@consent.inspect}>"
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,29 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module AccountAndTransactionApiSpecification
7
+ # Specifies the status of the account access consent.
8
+ class AccountAccessStatusEnum
9
+ ACCOUNT_ACCESS_STATUS_ENUM = [
10
+ # TODO: Write general description for AUTHORISED
11
+ AUTHORISED = 'Authorised'.freeze,
12
+
13
+ # TODO: Write general description for AWAITINGAUTHORISATION
14
+ AWAITINGAUTHORISATION = 'AwaitingAuthorisation'.freeze,
15
+
16
+ # TODO: Write general description for REJECTED
17
+ REJECTED = 'Rejected'.freeze,
18
+
19
+ # TODO: Write general description for REVOKED
20
+ REVOKED = 'Revoked'.freeze
21
+ ].freeze
22
+
23
+ def self.validate(value)
24
+ return false if value.nil?
25
+
26
+ ACCOUNT_ACCESS_STATUS_ENUM.include?(value)
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,137 @@
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
+ # AccountModel Model.
8
+ class AccountModel < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # A unique and immutable identifier used to identify the account resource.
13
+ # This identifier has no meaning to the account owner.
14
+ # @return [String]
15
+ attr_accessor :account_id
16
+
17
+ # Identification of the currency in which the account is held. Usage:
18
+ # Currency should only be used in case one and the same account number
19
+ # covers several currencies and the initiating party needs to identify which
20
+ # currency needs to be used for settlement on the account.
21
+ # @return [String]
22
+ attr_accessor :currency
23
+
24
+ # Specifies the type of account (personal or business).
25
+ # @return [AccountTypeEnum]
26
+ attr_accessor :account_type
27
+
28
+ # Specifies the sub type of account (product family group).
29
+ # @return [AccountSubTypeEnum]
30
+ attr_accessor :account_sub_type
31
+
32
+ # Specifies the description of the account type.
33
+ # @return [String]
34
+ attr_accessor :description
35
+
36
+ # The nickname of the account, assigned by the account owner in order to
37
+ # provide an additional means of identification of the account.
38
+ # @return [String]
39
+ attr_accessor :nickname
40
+
41
+ # Provides the details to identify an account.
42
+ # @return [Account]
43
+ attr_accessor :account
44
+
45
+ # Party that manages the account on behalf of the account owner, that is
46
+ # manages the registration and booking of entries on the account, calculates
47
+ # balances on the account and provides information about the account.
48
+ # @return [Servicer]
49
+ attr_accessor :servicer
50
+
51
+ # A mapping from model property names to API property names.
52
+ def self.names
53
+ @_hash = {} if @_hash.nil?
54
+ @_hash['account_id'] = 'AccountId'
55
+ @_hash['currency'] = 'Currency'
56
+ @_hash['account_type'] = 'AccountType'
57
+ @_hash['account_sub_type'] = 'AccountSubType'
58
+ @_hash['description'] = 'Description'
59
+ @_hash['nickname'] = 'Nickname'
60
+ @_hash['account'] = 'Account'
61
+ @_hash['servicer'] = 'Servicer'
62
+ @_hash
63
+ end
64
+
65
+ # An array for optional fields
66
+ def self.optionals
67
+ %w[
68
+ account_type
69
+ account_sub_type
70
+ description
71
+ account
72
+ servicer
73
+ ]
74
+ end
75
+
76
+ # An array for nullable fields
77
+ def self.nullables
78
+ []
79
+ end
80
+
81
+ def initialize(account_id = nil, currency = nil, nickname = nil,
82
+ account_type = SKIP, account_sub_type = SKIP,
83
+ description = SKIP, account = SKIP, servicer = SKIP)
84
+ @account_id = account_id
85
+ @currency = currency
86
+ @account_type = account_type unless account_type == SKIP
87
+ @account_sub_type = account_sub_type unless account_sub_type == SKIP
88
+ @description = description unless description == SKIP
89
+ @nickname = nickname
90
+ @account = account unless account == SKIP
91
+ @servicer = servicer unless servicer == SKIP
92
+ end
93
+
94
+ # Creates an instance of the object from a hash.
95
+ def self.from_hash(hash)
96
+ return nil unless hash
97
+
98
+ # Extract variables from the hash.
99
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : nil
100
+ currency = hash.key?('Currency') ? hash['Currency'] : nil
101
+ nickname = hash.key?('Nickname') ? hash['Nickname'] : nil
102
+ account_type = hash.key?('AccountType') ? hash['AccountType'] : SKIP
103
+ account_sub_type =
104
+ hash.key?('AccountSubType') ? hash['AccountSubType'] : SKIP
105
+ description = hash.key?('Description') ? hash['Description'] : SKIP
106
+ account = Account.from_hash(hash['Account']) if hash['Account']
107
+ servicer = Servicer.from_hash(hash['Servicer']) if hash['Servicer']
108
+
109
+ # Create object from extracted values.
110
+ AccountModel.new(account_id,
111
+ currency,
112
+ nickname,
113
+ account_type,
114
+ account_sub_type,
115
+ description,
116
+ account,
117
+ servicer)
118
+ end
119
+
120
+ # Provides a human-readable string representation of the object.
121
+ def to_s
122
+ class_name = self.class.name.split('::').last
123
+ "<#{class_name} account_id: #{@account_id}, currency: #{@currency}, account_type:"\
124
+ " #{@account_type}, account_sub_type: #{@account_sub_type}, description: #{@description},"\
125
+ " nickname: #{@nickname}, account: #{@account}, servicer: #{@servicer}>"
126
+ end
127
+
128
+ # Provides a debugging-friendly string with detailed object information.
129
+ def inspect
130
+ class_name = self.class.name.split('::').last
131
+ "<#{class_name} account_id: #{@account_id.inspect}, currency: #{@currency.inspect},"\
132
+ " account_type: #{@account_type.inspect}, account_sub_type: #{@account_sub_type.inspect},"\
133
+ " description: #{@description.inspect}, nickname: #{@nickname.inspect}, account:"\
134
+ " #{@account.inspect}, servicer: #{@servicer.inspect}>"
135
+ end
136
+ end
137
+ end