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,138 @@
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
+ # Information that locates and identifies a specific address, as defined by
8
+ # postal services.
9
+ class PostalAddress < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Identifies the nature of the postal address.
14
+ # @return [AddressTypeOptionEnum]
15
+ attr_accessor :address_type
16
+
17
+ # Information that locates and identifies a specific address, as defined by
18
+ # postal services, that is presented in free format text.
19
+ # @return [Array[String]]
20
+ attr_accessor :address_line
21
+
22
+ # Name of a street or thoroughfare.
23
+ # @return [String]
24
+ attr_accessor :street_name
25
+
26
+ # Number that identifies the position of a building on a street.
27
+ # @return [String]
28
+ attr_accessor :building_number
29
+
30
+ # Identifier consisting of a group of letters and/or numbers that is added
31
+ # to a postal address to assist the sorting of mail.
32
+ # @return [String]
33
+ attr_accessor :post_code
34
+
35
+ # Name of a built-up area, with defined boundaries, and a local government.
36
+ # @return [String]
37
+ attr_accessor :town_name
38
+
39
+ # Identifies a subdivision of a country such as state, region, county.
40
+ # @return [String]
41
+ attr_accessor :country_sub_division
42
+
43
+ # Nation with its own government.
44
+ # @return [String]
45
+ attr_accessor :country
46
+
47
+ # A mapping from model property names to API property names.
48
+ def self.names
49
+ @_hash = {} if @_hash.nil?
50
+ @_hash['address_type'] = 'AddressType'
51
+ @_hash['address_line'] = 'AddressLine'
52
+ @_hash['street_name'] = 'StreetName'
53
+ @_hash['building_number'] = 'BuildingNumber'
54
+ @_hash['post_code'] = 'PostCode'
55
+ @_hash['town_name'] = 'TownName'
56
+ @_hash['country_sub_division'] = 'CountrySubDivision'
57
+ @_hash['country'] = 'Country'
58
+ @_hash
59
+ end
60
+
61
+ # An array for optional fields
62
+ def self.optionals
63
+ %w[
64
+ address_type
65
+ address_line
66
+ street_name
67
+ building_number
68
+ post_code
69
+ town_name
70
+ country_sub_division
71
+ ]
72
+ end
73
+
74
+ # An array for nullable fields
75
+ def self.nullables
76
+ []
77
+ end
78
+
79
+ def initialize(country = nil, address_type = SKIP, address_line = SKIP,
80
+ street_name = SKIP, building_number = SKIP, post_code = SKIP,
81
+ town_name = SKIP, country_sub_division = SKIP)
82
+ @address_type = address_type unless address_type == SKIP
83
+ @address_line = address_line unless address_line == SKIP
84
+ @street_name = street_name unless street_name == SKIP
85
+ @building_number = building_number unless building_number == SKIP
86
+ @post_code = post_code unless post_code == SKIP
87
+ @town_name = town_name unless town_name == SKIP
88
+ @country_sub_division = country_sub_division unless country_sub_division == SKIP
89
+ @country = country
90
+ end
91
+
92
+ # Creates an instance of the object from a hash.
93
+ def self.from_hash(hash)
94
+ return nil unless hash
95
+
96
+ # Extract variables from the hash.
97
+ country = hash.key?('Country') ? hash['Country'] : nil
98
+ address_type = hash.key?('AddressType') ? hash['AddressType'] : SKIP
99
+ address_line = hash.key?('AddressLine') ? hash['AddressLine'] : SKIP
100
+ street_name = hash.key?('StreetName') ? hash['StreetName'] : SKIP
101
+ building_number =
102
+ hash.key?('BuildingNumber') ? hash['BuildingNumber'] : SKIP
103
+ post_code = hash.key?('PostCode') ? hash['PostCode'] : SKIP
104
+ town_name = hash.key?('TownName') ? hash['TownName'] : SKIP
105
+ country_sub_division =
106
+ hash.key?('CountrySubDivision') ? hash['CountrySubDivision'] : SKIP
107
+
108
+ # Create object from extracted values.
109
+ PostalAddress.new(country,
110
+ address_type,
111
+ address_line,
112
+ street_name,
113
+ building_number,
114
+ post_code,
115
+ town_name,
116
+ country_sub_division)
117
+ end
118
+
119
+ # Provides a human-readable string representation of the object.
120
+ def to_s
121
+ class_name = self.class.name.split('::').last
122
+ "<#{class_name} address_type: #{@address_type}, address_line: #{@address_line},"\
123
+ " street_name: #{@street_name}, building_number: #{@building_number}, post_code:"\
124
+ " #{@post_code}, town_name: #{@town_name}, country_sub_division: #{@country_sub_division},"\
125
+ " country: #{@country}>"
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} address_type: #{@address_type.inspect}, address_line:"\
132
+ " #{@address_line.inspect}, street_name: #{@street_name.inspect}, building_number:"\
133
+ " #{@building_number.inspect}, post_code: #{@post_code.inspect}, town_name:"\
134
+ " #{@town_name.inspect}, country_sub_division: #{@country_sub_division.inspect}, country:"\
135
+ " #{@country.inspect}>"
136
+ end
137
+ end
138
+ end
@@ -0,0 +1,71 @@
1
+ # account_and_transaction_api_specification
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module AccountAndTransactionApiSpecification
7
+ # The amount of the most recent direct debit collection.
8
+ class PreviousPaymentAmount < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :amount
15
+
16
+ # A code allocated to a currency by a Maintenance Agency under an
17
+ # international identification scheme, as described in the latest edition of
18
+ # the international standard ISO 4217 'Codes for the representation of
19
+ # currencies and funds'
20
+ # @return [String]
21
+ attr_accessor :currency
22
+
23
+ # A mapping from model property names to API property names.
24
+ def self.names
25
+ @_hash = {} if @_hash.nil?
26
+ @_hash['amount'] = 'Amount'
27
+ @_hash['currency'] = 'Currency'
28
+ @_hash
29
+ end
30
+
31
+ # An array for optional fields
32
+ def self.optionals
33
+ []
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(amount = nil, currency = nil)
42
+ @amount = amount
43
+ @currency = currency
44
+ end
45
+
46
+ # Creates an instance of the object from a hash.
47
+ def self.from_hash(hash)
48
+ return nil unless hash
49
+
50
+ # Extract variables from the hash.
51
+ amount = hash.key?('Amount') ? hash['Amount'] : nil
52
+ currency = hash.key?('Currency') ? hash['Currency'] : nil
53
+
54
+ # Create object from extracted values.
55
+ PreviousPaymentAmount.new(amount,
56
+ currency)
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} amount: #{@amount}, currency: #{@currency}>"
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} amount: #{@amount.inspect}, currency: #{@currency.inspect}>"
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,70 @@
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
+ # Set of elements to fully identify a proprietary bank transaction code.
8
+ class ProprietaryBankTransactionCode < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Proprietary bank transaction code to identify the underlying transaction.
13
+ # @return [String]
14
+ attr_accessor :code
15
+
16
+ # Identification of the issuer of the proprietary bank transaction code.
17
+ # @return [String]
18
+ attr_accessor :issuer
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['code'] = 'Code'
24
+ @_hash['issuer'] = 'Issuer'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ issuer
32
+ ]
33
+ end
34
+
35
+ # An array for nullable fields
36
+ def self.nullables
37
+ []
38
+ end
39
+
40
+ def initialize(code = nil, issuer = SKIP)
41
+ @code = code
42
+ @issuer = issuer unless issuer == SKIP
43
+ end
44
+
45
+ # Creates an instance of the object from a hash.
46
+ def self.from_hash(hash)
47
+ return nil unless hash
48
+
49
+ # Extract variables from the hash.
50
+ code = hash.key?('Code') ? hash['Code'] : nil
51
+ issuer = hash.key?('Issuer') ? hash['Issuer'] : SKIP
52
+
53
+ # Create object from extracted values.
54
+ ProprietaryBankTransactionCode.new(code,
55
+ issuer)
56
+ end
57
+
58
+ # Provides a human-readable string representation of the object.
59
+ def to_s
60
+ class_name = self.class.name.split('::').last
61
+ "<#{class_name} code: #{@code}, issuer: #{@issuer}>"
62
+ end
63
+
64
+ # Provides a debugging-friendly string with detailed object information.
65
+ def inspect
66
+ class_name = self.class.name.split('::').last
67
+ "<#{class_name} code: #{@code.inspect}, issuer: #{@issuer.inspect}>"
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,95 @@
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
+ # Reference Model.
8
+ class Reference < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :creditor_name
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [CreditorReference]
18
+ attr_accessor :creditor_reference
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :debtor_name
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [CreditorReference]
26
+ attr_accessor :debtor_reference
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['creditor_name'] = 'CreditorName'
32
+ @_hash['creditor_reference'] = 'CreditorReference'
33
+ @_hash['debtor_name'] = 'DebtorName'
34
+ @_hash['debtor_reference'] = 'DebtorReference'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ creditor_reference
42
+ debtor_name
43
+ debtor_reference
44
+ ]
45
+ end
46
+
47
+ # An array for nullable fields
48
+ def self.nullables
49
+ []
50
+ end
51
+
52
+ def initialize(creditor_name = nil, creditor_reference = SKIP,
53
+ debtor_name = SKIP, debtor_reference = SKIP)
54
+ @creditor_name = creditor_name
55
+ @creditor_reference = creditor_reference unless creditor_reference == SKIP
56
+ @debtor_name = debtor_name unless debtor_name == SKIP
57
+ @debtor_reference = debtor_reference unless debtor_reference == SKIP
58
+ end
59
+
60
+ # Creates an instance of the object from a hash.
61
+ def self.from_hash(hash)
62
+ return nil unless hash
63
+
64
+ # Extract variables from the hash.
65
+ creditor_name = hash.key?('CreditorName') ? hash['CreditorName'] : nil
66
+ creditor_reference = CreditorReference.from_hash(hash['CreditorReference']) if
67
+ hash['CreditorReference']
68
+ debtor_name = hash.key?('DebtorName') ? hash['DebtorName'] : SKIP
69
+ debtor_reference = CreditorReference.from_hash(hash['DebtorReference']) if
70
+ hash['DebtorReference']
71
+
72
+ # Create object from extracted values.
73
+ Reference.new(creditor_name,
74
+ creditor_reference,
75
+ debtor_name,
76
+ debtor_reference)
77
+ end
78
+
79
+ # Provides a human-readable string representation of the object.
80
+ def to_s
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} creditor_name: #{@creditor_name}, creditor_reference:"\
83
+ " #{@creditor_reference}, debtor_name: #{@debtor_name}, debtor_reference:"\
84
+ " #{@debtor_reference}>"
85
+ end
86
+
87
+ # Provides a debugging-friendly string with detailed object information.
88
+ def inspect
89
+ class_name = self.class.name.split('::').last
90
+ "<#{class_name} creditor_name: #{@creditor_name.inspect}, creditor_reference:"\
91
+ " #{@creditor_reference.inspect}, debtor_name: #{@debtor_name.inspect}, debtor_reference:"\
92
+ " #{@debtor_reference.inspect}>"
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,164 @@
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
+ # The Risk section is sent by the initiating party to the API Provider. It is
8
+ # used to specify additional details for risk scoring.
9
+ class Risk < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Location of the end-user on the earth specified by two numbers
14
+ # representing vertical and horizontal position
15
+ # @return [GeoLocation]
16
+ attr_accessor :geo_location
17
+
18
+ # Specifies the payment context
19
+ # @return [PaymentContextCodeEnum]
20
+ attr_accessor :payment_context_code
21
+
22
+ # Category code conforms to ISO 18245, related to the type of services or
23
+ # goods the merchant provides for the transaction
24
+ # @return [String]
25
+ attr_accessor :merchant_category_code
26
+
27
+ # The unique customer identifier of the Customer with the merchant.
28
+ # @return [String]
29
+ attr_accessor :merchant_customer_identification
30
+
31
+ # Information that locates and identifies a specific address, as defined by
32
+ # postal services or in free format text.
33
+ # @return [DeliveryAddress]
34
+ attr_accessor :delivery_address
35
+
36
+ # Name of the end user facing application
37
+ # @return [String]
38
+ attr_accessor :end_user_app_name
39
+
40
+ # Version of the end user facing application
41
+ # @return [String]
42
+ attr_accessor :end_user_app_version
43
+
44
+ # Name of the merchant
45
+ # @return [String]
46
+ attr_accessor :merchant_name
47
+
48
+ # NZ business number for the merchant
49
+ # @return [String]
50
+ attr_accessor :merchant_nzbn
51
+
52
+ # A mapping from model property names to API property names.
53
+ def self.names
54
+ @_hash = {} if @_hash.nil?
55
+ @_hash['geo_location'] = 'GeoLocation'
56
+ @_hash['payment_context_code'] = 'PaymentContextCode'
57
+ @_hash['merchant_category_code'] = 'MerchantCategoryCode'
58
+ @_hash['merchant_customer_identification'] =
59
+ 'MerchantCustomerIdentification'
60
+ @_hash['delivery_address'] = 'DeliveryAddress'
61
+ @_hash['end_user_app_name'] = 'EndUserAppName'
62
+ @_hash['end_user_app_version'] = 'EndUserAppVersion'
63
+ @_hash['merchant_name'] = 'MerchantName'
64
+ @_hash['merchant_nzbn'] = 'MerchantNZBN'
65
+ @_hash
66
+ end
67
+
68
+ # An array for optional fields
69
+ def self.optionals
70
+ %w[
71
+ geo_location
72
+ payment_context_code
73
+ merchant_category_code
74
+ merchant_customer_identification
75
+ delivery_address
76
+ end_user_app_name
77
+ end_user_app_version
78
+ merchant_name
79
+ merchant_nzbn
80
+ ]
81
+ end
82
+
83
+ # An array for nullable fields
84
+ def self.nullables
85
+ []
86
+ end
87
+
88
+ def initialize(geo_location = SKIP, payment_context_code = SKIP,
89
+ merchant_category_code = SKIP,
90
+ merchant_customer_identification = SKIP,
91
+ delivery_address = SKIP, end_user_app_name = SKIP,
92
+ end_user_app_version = SKIP, merchant_name = SKIP,
93
+ merchant_nzbn = SKIP)
94
+ @geo_location = geo_location unless geo_location == SKIP
95
+ @payment_context_code = payment_context_code unless payment_context_code == SKIP
96
+ @merchant_category_code = merchant_category_code unless merchant_category_code == SKIP
97
+ unless merchant_customer_identification == SKIP
98
+ @merchant_customer_identification =
99
+ merchant_customer_identification
100
+ end
101
+ @delivery_address = delivery_address unless delivery_address == SKIP
102
+ @end_user_app_name = end_user_app_name unless end_user_app_name == SKIP
103
+ @end_user_app_version = end_user_app_version unless end_user_app_version == SKIP
104
+ @merchant_name = merchant_name unless merchant_name == SKIP
105
+ @merchant_nzbn = merchant_nzbn unless merchant_nzbn == SKIP
106
+ end
107
+
108
+ # Creates an instance of the object from a hash.
109
+ def self.from_hash(hash)
110
+ return nil unless hash
111
+
112
+ # Extract variables from the hash.
113
+ geo_location = GeoLocation.from_hash(hash['GeoLocation']) if hash['GeoLocation']
114
+ payment_context_code =
115
+ hash.key?('PaymentContextCode') ? hash['PaymentContextCode'] : SKIP
116
+ merchant_category_code =
117
+ hash.key?('MerchantCategoryCode') ? hash['MerchantCategoryCode'] : SKIP
118
+ merchant_customer_identification =
119
+ hash.key?('MerchantCustomerIdentification') ? hash['MerchantCustomerIdentification'] : SKIP
120
+ delivery_address = DeliveryAddress.from_hash(hash['DeliveryAddress']) if
121
+ hash['DeliveryAddress']
122
+ end_user_app_name =
123
+ hash.key?('EndUserAppName') ? hash['EndUserAppName'] : SKIP
124
+ end_user_app_version =
125
+ hash.key?('EndUserAppVersion') ? hash['EndUserAppVersion'] : SKIP
126
+ merchant_name = hash.key?('MerchantName') ? hash['MerchantName'] : SKIP
127
+ merchant_nzbn = hash.key?('MerchantNZBN') ? hash['MerchantNZBN'] : SKIP
128
+
129
+ # Create object from extracted values.
130
+ Risk.new(geo_location,
131
+ payment_context_code,
132
+ merchant_category_code,
133
+ merchant_customer_identification,
134
+ delivery_address,
135
+ end_user_app_name,
136
+ end_user_app_version,
137
+ merchant_name,
138
+ merchant_nzbn)
139
+ end
140
+
141
+ # Provides a human-readable string representation of the object.
142
+ def to_s
143
+ class_name = self.class.name.split('::').last
144
+ "<#{class_name} geo_location: #{@geo_location}, payment_context_code:"\
145
+ " #{@payment_context_code}, merchant_category_code: #{@merchant_category_code},"\
146
+ " merchant_customer_identification: #{@merchant_customer_identification}, delivery_address:"\
147
+ " #{@delivery_address}, end_user_app_name: #{@end_user_app_name}, end_user_app_version:"\
148
+ " #{@end_user_app_version}, merchant_name: #{@merchant_name}, merchant_nzbn:"\
149
+ " #{@merchant_nzbn}>"
150
+ end
151
+
152
+ # Provides a debugging-friendly string with detailed object information.
153
+ def inspect
154
+ class_name = self.class.name.split('::').last
155
+ "<#{class_name} geo_location: #{@geo_location.inspect}, payment_context_code:"\
156
+ " #{@payment_context_code.inspect}, merchant_category_code:"\
157
+ " #{@merchant_category_code.inspect}, merchant_customer_identification:"\
158
+ " #{@merchant_customer_identification.inspect}, delivery_address:"\
159
+ " #{@delivery_address.inspect}, end_user_app_name: #{@end_user_app_name.inspect},"\
160
+ " end_user_app_version: #{@end_user_app_version.inspect}, merchant_name:"\
161
+ " #{@merchant_name.inspect}, merchant_nzbn: #{@merchant_nzbn.inspect}>"
162
+ end
163
+ end
164
+ end
@@ -0,0 +1,155 @@
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
+ # ScheduledPaymentModel Model.
9
+ class ScheduledPaymentModel < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # A unique and immutable identifier used to identify the account resource.
14
+ # This identifier has no meaning to the account owner.
15
+ # @return [String]
16
+ attr_accessor :account_id
17
+
18
+ # A unique and immutable identifier used to identify the scheduled payment
19
+ # resource. This identifier has no meaning to the account owner.
20
+ # @return [String]
21
+ attr_accessor :scheduled_payment_id
22
+
23
+ # The date on which the scheduled payment will be made.
24
+ # All dates in the JSON payloads are represented in ISO 8601 date-time
25
+ # format.
26
+ # All date-time fields in responses must include the timezone. An example is
27
+ # below:
28
+ # 2017-04-05T10:43:07+00:00
29
+ # @return [DateTime]
30
+ attr_accessor :scheduled_payment_date_time
31
+
32
+ # Specifies the scheduled payment date type requested
33
+ # @return [ScheduledTypeEnum]
34
+ attr_accessor :scheduled_type
35
+
36
+ # Amount of money of the cash balance after a transaction entry is applied
37
+ # to the account..
38
+ # @return [InstructedAmount]
39
+ attr_accessor :instructed_amount
40
+
41
+ # Amount of money of the cash balance after a transaction entry is applied
42
+ # to the account..
43
+ # @return [Reference]
44
+ attr_accessor :reference
45
+
46
+ # Party that manages the account on behalf of the account owner, that is
47
+ # manages the registration and booking of entries on the account, calculates
48
+ # balances on the account and provides information about the account.
49
+ # This is the servicer of the beneficiary account.
50
+ # @return [CreditorAgent]
51
+ attr_accessor :creditor_agent
52
+
53
+ # Unambiguous identification of the account of the creditor, in the case of
54
+ # a debit transaction.
55
+ # @return [CreditorAccount]
56
+ attr_accessor :creditor_account
57
+
58
+ # A mapping from model property names to API property names.
59
+ def self.names
60
+ @_hash = {} if @_hash.nil?
61
+ @_hash['account_id'] = 'AccountId'
62
+ @_hash['scheduled_payment_id'] = 'ScheduledPaymentId'
63
+ @_hash['scheduled_payment_date_time'] = 'ScheduledPaymentDateTime'
64
+ @_hash['scheduled_type'] = 'ScheduledType'
65
+ @_hash['instructed_amount'] = 'InstructedAmount'
66
+ @_hash['reference'] = 'Reference'
67
+ @_hash['creditor_agent'] = 'CreditorAgent'
68
+ @_hash['creditor_account'] = 'CreditorAccount'
69
+ @_hash
70
+ end
71
+
72
+ # An array for optional fields
73
+ def self.optionals
74
+ %w[
75
+ scheduled_payment_id
76
+ reference
77
+ creditor_agent
78
+ creditor_account
79
+ ]
80
+ end
81
+
82
+ # An array for nullable fields
83
+ def self.nullables
84
+ []
85
+ end
86
+
87
+ def initialize(account_id = nil, scheduled_payment_date_time = nil,
88
+ scheduled_type = nil, instructed_amount = nil,
89
+ scheduled_payment_id = SKIP, reference = SKIP,
90
+ creditor_agent = SKIP, creditor_account = SKIP)
91
+ @account_id = account_id
92
+ @scheduled_payment_id = scheduled_payment_id unless scheduled_payment_id == SKIP
93
+ @scheduled_payment_date_time = scheduled_payment_date_time
94
+ @scheduled_type = scheduled_type
95
+ @instructed_amount = instructed_amount
96
+ @reference = reference unless reference == SKIP
97
+ @creditor_agent = creditor_agent unless creditor_agent == SKIP
98
+ @creditor_account = creditor_account unless creditor_account == SKIP
99
+ end
100
+
101
+ # Creates an instance of the object from a hash.
102
+ def self.from_hash(hash)
103
+ return nil unless hash
104
+
105
+ # Extract variables from the hash.
106
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : nil
107
+ scheduled_payment_date_time = if hash.key?('ScheduledPaymentDateTime')
108
+ (DateTimeHelper.from_rfc3339(hash['ScheduledPaymentDateTime']) if hash['ScheduledPaymentDateTime'])
109
+ end
110
+ scheduled_type = hash.key?('ScheduledType') ? hash['ScheduledType'] : nil
111
+ instructed_amount = InstructedAmount.from_hash(hash['InstructedAmount']) if
112
+ hash['InstructedAmount']
113
+ scheduled_payment_id =
114
+ hash.key?('ScheduledPaymentId') ? hash['ScheduledPaymentId'] : SKIP
115
+ reference = Reference.from_hash(hash['Reference']) if hash['Reference']
116
+ creditor_agent = CreditorAgent.from_hash(hash['CreditorAgent']) if hash['CreditorAgent']
117
+ creditor_account = CreditorAccount.from_hash(hash['CreditorAccount']) if
118
+ hash['CreditorAccount']
119
+
120
+ # Create object from extracted values.
121
+ ScheduledPaymentModel.new(account_id,
122
+ scheduled_payment_date_time,
123
+ scheduled_type,
124
+ instructed_amount,
125
+ scheduled_payment_id,
126
+ reference,
127
+ creditor_agent,
128
+ creditor_account)
129
+ end
130
+
131
+ def to_custom_scheduled_payment_date_time
132
+ DateTimeHelper.to_rfc3339(scheduled_payment_date_time)
133
+ end
134
+
135
+ # Provides a human-readable string representation of the object.
136
+ def to_s
137
+ class_name = self.class.name.split('::').last
138
+ "<#{class_name} account_id: #{@account_id}, scheduled_payment_id: #{@scheduled_payment_id},"\
139
+ " scheduled_payment_date_time: #{@scheduled_payment_date_time}, scheduled_type:"\
140
+ " #{@scheduled_type}, instructed_amount: #{@instructed_amount}, reference: #{@reference},"\
141
+ " creditor_agent: #{@creditor_agent}, creditor_account: #{@creditor_account}>"
142
+ end
143
+
144
+ # Provides a debugging-friendly string with detailed object information.
145
+ def inspect
146
+ class_name = self.class.name.split('::').last
147
+ "<#{class_name} account_id: #{@account_id.inspect}, scheduled_payment_id:"\
148
+ " #{@scheduled_payment_id.inspect}, scheduled_payment_date_time:"\
149
+ " #{@scheduled_payment_date_time.inspect}, scheduled_type: #{@scheduled_type.inspect},"\
150
+ " instructed_amount: #{@instructed_amount.inspect}, reference: #{@reference.inspect},"\
151
+ " creditor_agent: #{@creditor_agent.inspect}, creditor_account:"\
152
+ " #{@creditor_account.inspect}>"
153
+ end
154
+ end
155
+ end