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,41 @@
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
+ # Date time type, in a coded form.
8
+ class StatementDateTimeTypeEnum
9
+ STATEMENT_DATE_TIME_TYPE_ENUM = [
10
+ # TODO: Write general description for BALANCETRANSFERPROMOEND
11
+ BALANCETRANSFERPROMOEND = 'BalanceTransferPromoEnd'.freeze,
12
+
13
+ # TODO: Write general description for DIRECTDEBITDUE
14
+ DIRECTDEBITDUE = 'DirectDebitDue'.freeze,
15
+
16
+ # TODO: Write general description for LASTPAYMENT
17
+ LASTPAYMENT = 'LastPayment'.freeze,
18
+
19
+ # TODO: Write general description for LASTSTATEMENT
20
+ LASTSTATEMENT = 'LastStatement'.freeze,
21
+
22
+ # TODO: Write general description for NEXTSTATEMENT
23
+ NEXTSTATEMENT = 'NextStatement'.freeze,
24
+
25
+ # TODO: Write general description for PAYMENTDUE
26
+ PAYMENTDUE = 'PaymentDue'.freeze,
27
+
28
+ # TODO: Write general description for PURCHASEPROMOEND
29
+ PURCHASEPROMOEND = 'PurchasePromoEnd'.freeze,
30
+
31
+ # TODO: Write general description for STATEMENTAVAILABLE
32
+ STATEMENTAVAILABLE = 'StatementAvailable'.freeze
33
+ ].freeze
34
+
35
+ def self.validate(value)
36
+ return false if value.nil?
37
+
38
+ STATEMENT_DATE_TIME_TYPE_ENUM.include?(value)
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,80 @@
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 used to provide details of a fee for the statement resource.
8
+ class StatementFee < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Amount of money of the cash balance.
13
+ # @return [Amount]
14
+ attr_accessor :amount
15
+
16
+ # Indicates whether the balance is a credit or a debit balance. Usage: A
17
+ # zero balance is considered to be a credit balance.
18
+ # @return [CreditDebitIndicatorEnum]
19
+ attr_accessor :credit_debit_indicator
20
+
21
+ # Fee type, in a coded form.
22
+ # @return [StatementFeeTypeEnum]
23
+ attr_accessor :type
24
+
25
+ # A mapping from model property names to API property names.
26
+ def self.names
27
+ @_hash = {} if @_hash.nil?
28
+ @_hash['amount'] = 'Amount'
29
+ @_hash['credit_debit_indicator'] = 'CreditDebitIndicator'
30
+ @_hash['type'] = 'Type'
31
+ @_hash
32
+ end
33
+
34
+ # An array for optional fields
35
+ def self.optionals
36
+ []
37
+ end
38
+
39
+ # An array for nullable fields
40
+ def self.nullables
41
+ []
42
+ end
43
+
44
+ def initialize(amount = nil, credit_debit_indicator = nil, type = nil)
45
+ @amount = amount
46
+ @credit_debit_indicator = credit_debit_indicator
47
+ @type = type
48
+ end
49
+
50
+ # Creates an instance of the object from a hash.
51
+ def self.from_hash(hash)
52
+ return nil unless hash
53
+
54
+ # Extract variables from the hash.
55
+ amount = Amount.from_hash(hash['Amount']) if hash['Amount']
56
+ credit_debit_indicator =
57
+ hash.key?('CreditDebitIndicator') ? hash['CreditDebitIndicator'] : nil
58
+ type = hash.key?('Type') ? hash['Type'] : nil
59
+
60
+ # Create object from extracted values.
61
+ StatementFee.new(amount,
62
+ credit_debit_indicator,
63
+ type)
64
+ end
65
+
66
+ # Provides a human-readable string representation of the object.
67
+ def to_s
68
+ class_name = self.class.name.split('::').last
69
+ "<#{class_name} amount: #{@amount}, credit_debit_indicator: #{@credit_debit_indicator},"\
70
+ " type: #{@type}>"
71
+ end
72
+
73
+ # Provides a debugging-friendly string with detailed object information.
74
+ def inspect
75
+ class_name = self.class.name.split('::').last
76
+ "<#{class_name} amount: #{@amount.inspect}, credit_debit_indicator:"\
77
+ " #{@credit_debit_indicator.inspect}, type: #{@type.inspect}>"
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,59 @@
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
+ # Fee type, in a coded form.
8
+ class StatementFeeTypeEnum
9
+ STATEMENT_FEE_TYPE_ENUM = [
10
+ # TODO: Write general description for ANNUAL
11
+ ANNUAL = 'Annual'.freeze,
12
+
13
+ # TODO: Write general description for BALANCETRANSFER
14
+ BALANCETRANSFER = 'BalanceTransfer'.freeze,
15
+
16
+ # TODO: Write general description for CASHADVANCE
17
+ CASHADVANCE = 'CashAdvance'.freeze,
18
+
19
+ # TODO: Write general description for CASHTRANSACTION
20
+ CASHTRANSACTION = 'CashTransaction'.freeze,
21
+
22
+ # TODO: Write general description for FOREIGNTRANSACTION
23
+ FOREIGNTRANSACTION = 'ForeignTransaction'.freeze,
24
+
25
+ # TODO: Write general description for GAMBLING
26
+ GAMBLING = 'Gambling'.freeze,
27
+
28
+ # TODO: Write general description for LATEPAYMENT
29
+ LATEPAYMENT = 'LatePayment'.freeze,
30
+
31
+ # TODO: Write general description for MONEYTRANSFER
32
+ MONEYTRANSFER = 'MoneyTransfer'.freeze,
33
+
34
+ # TODO: Write general description for MONTHLY
35
+ MONTHLY = 'Monthly'.freeze,
36
+
37
+ # TODO: Write general description for OVERLIMIT
38
+ OVERLIMIT = 'Overlimit'.freeze,
39
+
40
+ # TODO: Write general description for POSTALORDER
41
+ POSTALORDER = 'PostalOrder'.freeze,
42
+
43
+ # TODO: Write general description for PRIZEENTRY
44
+ PRIZEENTRY = 'PrizeEntry'.freeze,
45
+
46
+ # TODO: Write general description for STATEMENTCOPY
47
+ STATEMENTCOPY = 'StatementCopy'.freeze,
48
+
49
+ # TODO: Write general description for TOTAL
50
+ TOTAL = 'Total'.freeze
51
+ ].freeze
52
+
53
+ def self.validate(value)
54
+ return false if value.nil?
55
+
56
+ STATEMENT_FEE_TYPE_ENUM.include?(value)
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,81 @@
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 used to provide details of a generic interest amount related
8
+ # to the statement resource.
9
+ class StatementInterest < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Amount of money of the cash balance.
14
+ # @return [Amount]
15
+ attr_accessor :amount
16
+
17
+ # Indicates whether the balance is a credit or a debit balance. Usage: A
18
+ # zero balance is considered to be a credit balance.
19
+ # @return [CreditDebitIndicatorEnum]
20
+ attr_accessor :credit_debit_indicator
21
+
22
+ # Interest amount type, in a coded form.
23
+ # @return [StatementInterestTypeEnum]
24
+ attr_accessor :type
25
+
26
+ # A mapping from model property names to API property names.
27
+ def self.names
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['amount'] = 'Amount'
30
+ @_hash['credit_debit_indicator'] = 'CreditDebitIndicator'
31
+ @_hash['type'] = 'Type'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ []
38
+ end
39
+
40
+ # An array for nullable fields
41
+ def self.nullables
42
+ []
43
+ end
44
+
45
+ def initialize(amount = nil, credit_debit_indicator = nil, type = nil)
46
+ @amount = amount
47
+ @credit_debit_indicator = credit_debit_indicator
48
+ @type = type
49
+ end
50
+
51
+ # Creates an instance of the object from a hash.
52
+ def self.from_hash(hash)
53
+ return nil unless hash
54
+
55
+ # Extract variables from the hash.
56
+ amount = Amount.from_hash(hash['Amount']) if hash['Amount']
57
+ credit_debit_indicator =
58
+ hash.key?('CreditDebitIndicator') ? hash['CreditDebitIndicator'] : nil
59
+ type = hash.key?('Type') ? hash['Type'] : nil
60
+
61
+ # Create object from extracted values.
62
+ StatementInterest.new(amount,
63
+ credit_debit_indicator,
64
+ type)
65
+ end
66
+
67
+ # Provides a human-readable string representation of the object.
68
+ def to_s
69
+ class_name = self.class.name.split('::').last
70
+ "<#{class_name} amount: #{@amount}, credit_debit_indicator: #{@credit_debit_indicator},"\
71
+ " type: #{@type}>"
72
+ end
73
+
74
+ # Provides a debugging-friendly string with detailed object information.
75
+ def inspect
76
+ class_name = self.class.name.split('::').last
77
+ "<#{class_name} amount: #{@amount.inspect}, credit_debit_indicator:"\
78
+ " #{@credit_debit_indicator.inspect}, type: #{@type.inspect}>"
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,32 @@
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
+ # Interest amount type, in a coded form.
8
+ class StatementInterestTypeEnum
9
+ STATEMENT_INTEREST_TYPE_ENUM = [
10
+ # TODO: Write general description for BALANCETRANSFER
11
+ BALANCETRANSFER = 'BalanceTransfer'.freeze,
12
+
13
+ # TODO: Write general description for CASH
14
+ CASH = 'Cash'.freeze,
15
+
16
+ # TODO: Write general description for ESTIMATEDNEXT
17
+ ESTIMATEDNEXT = 'EstimatedNext'.freeze,
18
+
19
+ # TODO: Write general description for PURCHASE
20
+ PURCHASE = 'Purchase'.freeze,
21
+
22
+ # TODO: Write general description for TOTAL
23
+ TOTAL = 'Total'.freeze
24
+ ].freeze
25
+
26
+ def self.validate(value)
27
+ return false if value.nil?
28
+
29
+ STATEMENT_INTEREST_TYPE_ENUM.include?(value)
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,313 @@
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
+ # Provides further details on a statement resource.
9
+ class StatementModel < 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
+ # Unique identifier for the statement resource within an servicing
19
+ # institution. This identifier is both unique and immutable.
20
+ # @return [String]
21
+ attr_accessor :statement_id
22
+
23
+ # Unique reference for the statement. This reference may be optionally
24
+ # populated if available.
25
+ # @return [String]
26
+ attr_accessor :statement_reference
27
+
28
+ # Statement type, in a coded form.
29
+ # @return [StatementTypeEnum]
30
+ attr_accessor :type
31
+
32
+ # Date and time at which the statement period starts.
33
+ # All dates in the JSON payloads are represented in ISO 8601 date-time
34
+ # format.
35
+ # All date-time fields in responses must include the timezone. An example is
36
+ # below:
37
+ # 2017-04-05T10:43:07+00:00
38
+ # @return [DateTime]
39
+ attr_accessor :start_date_time
40
+
41
+ # Date and time at which the statement period ends.
42
+ # All dates in the JSON payloads are represented in ISO 8601 date-time
43
+ # format.
44
+ # All date-time fields in responses must include the timezone. An example is
45
+ # below:
46
+ # 2017-04-05T10:43:07+00:00
47
+ # @return [DateTime]
48
+ attr_accessor :end_date_time
49
+
50
+ # Date and time at which the resource was created.
51
+ # All dates in the JSON payloads are represented in ISO 8601 date-time
52
+ # format.
53
+ # All date-time fields in responses must include the timezone. An example is
54
+ # below:
55
+ # 2017-04-05T10:43:07+00:00
56
+ # @return [DateTime]
57
+ attr_accessor :creation_date_time
58
+
59
+ # Other descriptions that may be available for the statement resource.
60
+ # @return [Array[String]]
61
+ attr_accessor :statement_description
62
+
63
+ # Set of elements used to provide details of a benefit or reward amount for
64
+ # the statement resource.
65
+ # @return [Array[StatementBenefit]]
66
+ attr_accessor :statement_benefit
67
+
68
+ # Set of elements used to provide details of a fee for the statement
69
+ # resource.
70
+ # @return [Array[StatementFee]]
71
+ attr_accessor :statement_fee
72
+
73
+ # Set of elements used to provide details of a generic interest amount
74
+ # related to the statement resource.
75
+ # @return [Array[StatementInterest]]
76
+ attr_accessor :statement_interest
77
+
78
+ # Set of elements used to provide details of a generic date time for the
79
+ # statement resource.
80
+ # @return [Array[StatementDateTime]]
81
+ attr_accessor :statement_date_time
82
+
83
+ # Set of elements used to provide details of a generic rate related to the
84
+ # statement resource.
85
+ # @return [Array[StatementRate]]
86
+ attr_accessor :statement_rate
87
+
88
+ # Set of elements used to provide details of a generic number value related
89
+ # to the statement resource.
90
+ # @return [Array[StatementValue]]
91
+ attr_accessor :statement_value
92
+
93
+ # Set of elements used to provide details of a generic amount for the
94
+ # statement resource.
95
+ # @return [Array[StatementAmount]]
96
+ attr_accessor :statement_amount
97
+
98
+ # A mapping from model property names to API property names.
99
+ def self.names
100
+ @_hash = {} if @_hash.nil?
101
+ @_hash['account_id'] = 'AccountId'
102
+ @_hash['statement_id'] = 'StatementId'
103
+ @_hash['statement_reference'] = 'StatementReference'
104
+ @_hash['type'] = 'Type'
105
+ @_hash['start_date_time'] = 'StartDateTime'
106
+ @_hash['end_date_time'] = 'EndDateTime'
107
+ @_hash['creation_date_time'] = 'CreationDateTime'
108
+ @_hash['statement_description'] = 'StatementDescription'
109
+ @_hash['statement_benefit'] = 'StatementBenefit'
110
+ @_hash['statement_fee'] = 'StatementFee'
111
+ @_hash['statement_interest'] = 'StatementInterest'
112
+ @_hash['statement_date_time'] = 'StatementDateTime'
113
+ @_hash['statement_rate'] = 'StatementRate'
114
+ @_hash['statement_value'] = 'StatementValue'
115
+ @_hash['statement_amount'] = 'StatementAmount'
116
+ @_hash
117
+ end
118
+
119
+ # An array for optional fields
120
+ def self.optionals
121
+ %w[
122
+ statement_id
123
+ statement_reference
124
+ statement_description
125
+ statement_benefit
126
+ statement_fee
127
+ statement_interest
128
+ statement_date_time
129
+ statement_rate
130
+ statement_value
131
+ statement_amount
132
+ ]
133
+ end
134
+
135
+ # An array for nullable fields
136
+ def self.nullables
137
+ []
138
+ end
139
+
140
+ def initialize(account_id = nil, type = nil, start_date_time = nil,
141
+ end_date_time = nil, creation_date_time = nil,
142
+ statement_id = SKIP, statement_reference = SKIP,
143
+ statement_description = SKIP, statement_benefit = SKIP,
144
+ statement_fee = SKIP, statement_interest = SKIP,
145
+ statement_date_time = SKIP, statement_rate = SKIP,
146
+ statement_value = SKIP, statement_amount = SKIP)
147
+ @account_id = account_id
148
+ @statement_id = statement_id unless statement_id == SKIP
149
+ @statement_reference = statement_reference unless statement_reference == SKIP
150
+ @type = type
151
+ @start_date_time = start_date_time
152
+ @end_date_time = end_date_time
153
+ @creation_date_time = creation_date_time
154
+ @statement_description = statement_description unless statement_description == SKIP
155
+ @statement_benefit = statement_benefit unless statement_benefit == SKIP
156
+ @statement_fee = statement_fee unless statement_fee == SKIP
157
+ @statement_interest = statement_interest unless statement_interest == SKIP
158
+ @statement_date_time = statement_date_time unless statement_date_time == SKIP
159
+ @statement_rate = statement_rate unless statement_rate == SKIP
160
+ @statement_value = statement_value unless statement_value == SKIP
161
+ @statement_amount = statement_amount unless statement_amount == SKIP
162
+ end
163
+
164
+ # Creates an instance of the object from a hash.
165
+ def self.from_hash(hash)
166
+ return nil unless hash
167
+
168
+ # Extract variables from the hash.
169
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : nil
170
+ type = hash.key?('Type') ? hash['Type'] : nil
171
+ start_date_time = if hash.key?('StartDateTime')
172
+ (DateTimeHelper.from_rfc3339(hash['StartDateTime']) if hash['StartDateTime'])
173
+ end
174
+ end_date_time = if hash.key?('EndDateTime')
175
+ (DateTimeHelper.from_rfc3339(hash['EndDateTime']) if hash['EndDateTime'])
176
+ end
177
+ creation_date_time = if hash.key?('CreationDateTime')
178
+ (DateTimeHelper.from_rfc3339(hash['CreationDateTime']) if hash['CreationDateTime'])
179
+ end
180
+ statement_id = hash.key?('StatementId') ? hash['StatementId'] : SKIP
181
+ statement_reference =
182
+ hash.key?('StatementReference') ? hash['StatementReference'] : SKIP
183
+ statement_description =
184
+ hash.key?('StatementDescription') ? hash['StatementDescription'] : SKIP
185
+ # Parameter is an array, so we need to iterate through it
186
+ statement_benefit = nil
187
+ unless hash['StatementBenefit'].nil?
188
+ statement_benefit = []
189
+ hash['StatementBenefit'].each do |structure|
190
+ statement_benefit << (StatementBenefit.from_hash(structure) if structure)
191
+ end
192
+ end
193
+
194
+ statement_benefit = SKIP unless hash.key?('StatementBenefit')
195
+ # Parameter is an array, so we need to iterate through it
196
+ statement_fee = nil
197
+ unless hash['StatementFee'].nil?
198
+ statement_fee = []
199
+ hash['StatementFee'].each do |structure|
200
+ statement_fee << (StatementFee.from_hash(structure) if structure)
201
+ end
202
+ end
203
+
204
+ statement_fee = SKIP unless hash.key?('StatementFee')
205
+ # Parameter is an array, so we need to iterate through it
206
+ statement_interest = nil
207
+ unless hash['StatementInterest'].nil?
208
+ statement_interest = []
209
+ hash['StatementInterest'].each do |structure|
210
+ statement_interest << (StatementInterest.from_hash(structure) if structure)
211
+ end
212
+ end
213
+
214
+ statement_interest = SKIP unless hash.key?('StatementInterest')
215
+ # Parameter is an array, so we need to iterate through it
216
+ statement_date_time = nil
217
+ unless hash['StatementDateTime'].nil?
218
+ statement_date_time = []
219
+ hash['StatementDateTime'].each do |structure|
220
+ statement_date_time << (StatementDateTime.from_hash(structure) if structure)
221
+ end
222
+ end
223
+
224
+ statement_date_time = SKIP unless hash.key?('StatementDateTime')
225
+ # Parameter is an array, so we need to iterate through it
226
+ statement_rate = nil
227
+ unless hash['StatementRate'].nil?
228
+ statement_rate = []
229
+ hash['StatementRate'].each do |structure|
230
+ statement_rate << (StatementRate.from_hash(structure) if structure)
231
+ end
232
+ end
233
+
234
+ statement_rate = SKIP unless hash.key?('StatementRate')
235
+ # Parameter is an array, so we need to iterate through it
236
+ statement_value = nil
237
+ unless hash['StatementValue'].nil?
238
+ statement_value = []
239
+ hash['StatementValue'].each do |structure|
240
+ statement_value << (StatementValue.from_hash(structure) if structure)
241
+ end
242
+ end
243
+
244
+ statement_value = SKIP unless hash.key?('StatementValue')
245
+ # Parameter is an array, so we need to iterate through it
246
+ statement_amount = nil
247
+ unless hash['StatementAmount'].nil?
248
+ statement_amount = []
249
+ hash['StatementAmount'].each do |structure|
250
+ statement_amount << (StatementAmount.from_hash(structure) if structure)
251
+ end
252
+ end
253
+
254
+ statement_amount = SKIP unless hash.key?('StatementAmount')
255
+
256
+ # Create object from extracted values.
257
+ StatementModel.new(account_id,
258
+ type,
259
+ start_date_time,
260
+ end_date_time,
261
+ creation_date_time,
262
+ statement_id,
263
+ statement_reference,
264
+ statement_description,
265
+ statement_benefit,
266
+ statement_fee,
267
+ statement_interest,
268
+ statement_date_time,
269
+ statement_rate,
270
+ statement_value,
271
+ statement_amount)
272
+ end
273
+
274
+ def to_custom_start_date_time
275
+ DateTimeHelper.to_rfc3339(start_date_time)
276
+ end
277
+
278
+ def to_custom_end_date_time
279
+ DateTimeHelper.to_rfc3339(end_date_time)
280
+ end
281
+
282
+ def to_custom_creation_date_time
283
+ DateTimeHelper.to_rfc3339(creation_date_time)
284
+ end
285
+
286
+ # Provides a human-readable string representation of the object.
287
+ def to_s
288
+ class_name = self.class.name.split('::').last
289
+ "<#{class_name} account_id: #{@account_id}, statement_id: #{@statement_id},"\
290
+ " statement_reference: #{@statement_reference}, type: #{@type}, start_date_time:"\
291
+ " #{@start_date_time}, end_date_time: #{@end_date_time}, creation_date_time:"\
292
+ " #{@creation_date_time}, statement_description: #{@statement_description},"\
293
+ " statement_benefit: #{@statement_benefit}, statement_fee: #{@statement_fee},"\
294
+ " statement_interest: #{@statement_interest}, statement_date_time: #{@statement_date_time},"\
295
+ " statement_rate: #{@statement_rate}, statement_value: #{@statement_value},"\
296
+ " statement_amount: #{@statement_amount}>"
297
+ end
298
+
299
+ # Provides a debugging-friendly string with detailed object information.
300
+ def inspect
301
+ class_name = self.class.name.split('::').last
302
+ "<#{class_name} account_id: #{@account_id.inspect}, statement_id: #{@statement_id.inspect},"\
303
+ " statement_reference: #{@statement_reference.inspect}, type: #{@type.inspect},"\
304
+ " start_date_time: #{@start_date_time.inspect}, end_date_time: #{@end_date_time.inspect},"\
305
+ " creation_date_time: #{@creation_date_time.inspect}, statement_description:"\
306
+ " #{@statement_description.inspect}, statement_benefit: #{@statement_benefit.inspect},"\
307
+ " statement_fee: #{@statement_fee.inspect}, statement_interest:"\
308
+ " #{@statement_interest.inspect}, statement_date_time: #{@statement_date_time.inspect},"\
309
+ " statement_rate: #{@statement_rate.inspect}, statement_value: #{@statement_value.inspect},"\
310
+ " statement_amount: #{@statement_amount.inspect}>"
311
+ end
312
+ end
313
+ 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
+ # Set of elements used to provide details of a generic rate related to the
8
+ # statement resource.
9
+ class StatementRate < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Rate associated with the statement rate type.
14
+ # @return [String]
15
+ attr_accessor :rate
16
+
17
+ # Statement rate type, in a coded form.
18
+ # @return [StatementRateTypeEnum]
19
+ attr_accessor :type
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['rate'] = 'Rate'
25
+ @_hash['type'] = 'Type'
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(rate = nil, type = nil)
40
+ @rate = rate
41
+ @type = type
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
+ rate = hash.key?('Rate') ? hash['Rate'] : nil
50
+ type = hash.key?('Type') ? hash['Type'] : nil
51
+
52
+ # Create object from extracted values.
53
+ StatementRate.new(rate,
54
+ type)
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} rate: #{@rate}, type: #{@type}>"
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} rate: #{@rate.inspect}, type: #{@type.inspect}>"
67
+ end
68
+ end
69
+ end