cybrid_api_bank_ruby 0.57.49 → 0.58.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 (239) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +44 -33
  4. data/cybrid_api_bank_ruby.gemspec +2 -2
  5. data/docs/DepositAddressBankModel.md +36 -0
  6. data/docs/DepositAddressListBankModel.md +24 -0
  7. data/docs/DepositAddressesBankApi.md +236 -0
  8. data/docs/PostDepositAddressBankModel.md +18 -0
  9. data/lib/cybrid_api_bank_ruby/api/accounts_bank_api.rb +2 -2
  10. data/lib/cybrid_api_bank_ruby/api/assets_bank_api.rb +2 -2
  11. data/lib/cybrid_api_bank_ruby/api/banks_bank_api.rb +2 -2
  12. data/lib/cybrid_api_bank_ruby/api/customers_bank_api.rb +2 -2
  13. data/lib/cybrid_api_bank_ruby/api/deposit_addresses_bank_api.rb +237 -0
  14. data/lib/cybrid_api_bank_ruby/api/external_bank_accounts_bank_api.rb +2 -2
  15. data/lib/cybrid_api_bank_ruby/api/fee_configurations_bank_api.rb +2 -2
  16. data/lib/cybrid_api_bank_ruby/api/identity_records_bank_api.rb +2 -2
  17. data/lib/cybrid_api_bank_ruby/api/identity_verifications_bank_api.rb +2 -2
  18. data/lib/cybrid_api_bank_ruby/api/prices_bank_api.rb +2 -2
  19. data/lib/cybrid_api_bank_ruby/api/quotes_bank_api.rb +2 -2
  20. data/lib/cybrid_api_bank_ruby/api/rewards_bank_api.rb +2 -2
  21. data/lib/cybrid_api_bank_ruby/api/symbols_bank_api.rb +2 -2
  22. data/lib/cybrid_api_bank_ruby/api/trades_bank_api.rb +2 -2
  23. data/lib/cybrid_api_bank_ruby/api/transfers_bank_api.rb +2 -2
  24. data/lib/cybrid_api_bank_ruby/api/verification_keys_bank_api.rb +2 -2
  25. data/lib/cybrid_api_bank_ruby/api/workflows_bank_api.rb +2 -2
  26. data/lib/cybrid_api_bank_ruby/api_client.rb +2 -2
  27. data/lib/cybrid_api_bank_ruby/api_error.rb +2 -2
  28. data/lib/cybrid_api_bank_ruby/configuration.rb +2 -2
  29. data/lib/cybrid_api_bank_ruby/models/account_bank_model.rb +2 -2
  30. data/lib/cybrid_api_bank_ruby/models/account_list_bank_model.rb +2 -2
  31. data/lib/cybrid_api_bank_ruby/models/asset_bank_model.rb +2 -2
  32. data/lib/cybrid_api_bank_ruby/models/asset_list_bank_model.rb +2 -2
  33. data/lib/cybrid_api_bank_ruby/models/attestation_details_bank_model.rb +2 -2
  34. data/lib/cybrid_api_bank_ruby/models/bank_bank_model.rb +2 -2
  35. data/lib/cybrid_api_bank_ruby/models/bank_list_bank_model.rb +2 -2
  36. data/lib/cybrid_api_bank_ruby/models/customer_bank_model.rb +2 -2
  37. data/lib/cybrid_api_bank_ruby/models/customer_list_bank_model.rb +2 -2
  38. data/lib/cybrid_api_bank_ruby/models/deposit_address_bank_model.rb +503 -0
  39. data/lib/cybrid_api_bank_ruby/models/deposit_address_list_bank_model.rb +328 -0
  40. data/lib/cybrid_api_bank_ruby/models/error_response_bank_model.rb +2 -2
  41. data/lib/cybrid_api_bank_ruby/models/external_bank_account_bank_model.rb +2 -2
  42. data/lib/cybrid_api_bank_ruby/models/external_bank_account_list_bank_model.rb +2 -2
  43. data/lib/cybrid_api_bank_ruby/models/fee_bank_model.rb +2 -2
  44. data/lib/cybrid_api_bank_ruby/models/fee_configuration_bank_model.rb +2 -2
  45. data/lib/cybrid_api_bank_ruby/models/fee_configuration_list_bank_model.rb +2 -2
  46. data/lib/cybrid_api_bank_ruby/models/identity_record_bank_model.rb +2 -2
  47. data/lib/cybrid_api_bank_ruby/models/identity_record_list_bank_model.rb +2 -2
  48. data/lib/cybrid_api_bank_ruby/models/identity_verification_bank_model.rb +2 -2
  49. data/lib/cybrid_api_bank_ruby/models/identity_verification_list_bank_model.rb +2 -2
  50. data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_all_of_bank_model.rb +2 -2
  51. data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_bank_model.rb +2 -2
  52. data/lib/cybrid_api_bank_ruby/models/patch_bank_bank_model.rb +2 -2
  53. data/lib/cybrid_api_bank_ruby/models/post_account_bank_model.rb +2 -2
  54. data/lib/cybrid_api_bank_ruby/models/post_bank_bank_model.rb +2 -2
  55. data/lib/cybrid_api_bank_ruby/models/post_customer_bank_model.rb +2 -2
  56. data/lib/cybrid_api_bank_ruby/models/post_deposit_address_bank_model.rb +253 -0
  57. data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_bank_model.rb +2 -2
  58. data/lib/cybrid_api_bank_ruby/models/post_fee_bank_model.rb +2 -2
  59. data/lib/cybrid_api_bank_ruby/models/post_fee_configuration_bank_model.rb +2 -2
  60. data/lib/cybrid_api_bank_ruby/models/post_identity_record_attestation_details_bank_model.rb +2 -2
  61. data/lib/cybrid_api_bank_ruby/models/post_identity_record_bank_model.rb +2 -2
  62. data/lib/cybrid_api_bank_ruby/models/post_identity_verification_bank_model.rb +2 -2
  63. data/lib/cybrid_api_bank_ruby/models/post_quote_bank_model.rb +2 -2
  64. data/lib/cybrid_api_bank_ruby/models/post_reward_bank_model.rb +2 -2
  65. data/lib/cybrid_api_bank_ruby/models/post_trade_bank_model.rb +2 -2
  66. data/lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb +2 -2
  67. data/lib/cybrid_api_bank_ruby/models/post_verification_key_bank_model.rb +2 -2
  68. data/lib/cybrid_api_bank_ruby/models/post_workflow_bank_model.rb +2 -2
  69. data/lib/cybrid_api_bank_ruby/models/quote_bank_model.rb +2 -2
  70. data/lib/cybrid_api_bank_ruby/models/quote_list_bank_model.rb +2 -2
  71. data/lib/cybrid_api_bank_ruby/models/reward_bank_model.rb +2 -2
  72. data/lib/cybrid_api_bank_ruby/models/reward_list_bank_model.rb +2 -2
  73. data/lib/cybrid_api_bank_ruby/models/symbol_price_bank_model.rb +2 -2
  74. data/lib/cybrid_api_bank_ruby/models/trade_bank_model.rb +2 -2
  75. data/lib/cybrid_api_bank_ruby/models/trade_list_bank_model.rb +2 -2
  76. data/lib/cybrid_api_bank_ruby/models/transfer_bank_model.rb +2 -2
  77. data/lib/cybrid_api_bank_ruby/models/transfer_list_bank_model.rb +2 -2
  78. data/lib/cybrid_api_bank_ruby/models/verification_key_bank_model.rb +2 -2
  79. data/lib/cybrid_api_bank_ruby/models/verification_key_list_bank_model.rb +2 -2
  80. data/lib/cybrid_api_bank_ruby/models/workflow_bank_model.rb +2 -2
  81. data/lib/cybrid_api_bank_ruby/models/workflow_with_details_all_of_bank_model.rb +2 -2
  82. data/lib/cybrid_api_bank_ruby/models/workflow_with_details_bank_model.rb +2 -2
  83. data/lib/cybrid_api_bank_ruby/models/workflows_list_bank_model.rb +2 -2
  84. data/lib/cybrid_api_bank_ruby/version.rb +3 -3
  85. data/lib/cybrid_api_bank_ruby.rb +6 -2
  86. data/spec/api/accounts_bank_api_spec.rb +2 -2
  87. data/spec/api/assets_bank_api_spec.rb +2 -2
  88. data/spec/api/banks_bank_api_spec.rb +2 -2
  89. data/spec/api/customers_bank_api_spec.rb +2 -2
  90. data/spec/api/deposit_addresses_bank_api_spec.rb +75 -0
  91. data/spec/api/external_bank_accounts_bank_api_spec.rb +2 -2
  92. data/spec/api/fee_configurations_bank_api_spec.rb +2 -2
  93. data/spec/api/identity_records_bank_api_spec.rb +2 -2
  94. data/spec/api/identity_verifications_bank_api_spec.rb +2 -2
  95. data/spec/api/prices_bank_api_spec.rb +2 -2
  96. data/spec/api/quotes_bank_api_spec.rb +2 -2
  97. data/spec/api/rewards_bank_api_spec.rb +2 -2
  98. data/spec/api/symbols_bank_api_spec.rb +2 -2
  99. data/spec/api/trades_bank_api_spec.rb +2 -2
  100. data/spec/api/transfers_bank_api_spec.rb +2 -2
  101. data/spec/api/verification_keys_bank_api_spec.rb +2 -2
  102. data/spec/api/workflows_bank_api_spec.rb +2 -2
  103. data/spec/api_client_spec.rb +2 -2
  104. data/spec/configuration_spec.rb +2 -2
  105. data/spec/models/account_bank_model_spec.rb +2 -2
  106. data/spec/models/account_list_bank_model_spec.rb +2 -2
  107. data/spec/models/asset_bank_model_spec.rb +2 -2
  108. data/spec/models/asset_list_bank_model_spec.rb +2 -2
  109. data/spec/models/attestation_details_bank_model_spec.rb +2 -2
  110. data/spec/models/bank_bank_model_spec.rb +2 -2
  111. data/spec/models/bank_list_bank_model_spec.rb +2 -2
  112. data/spec/models/customer_bank_model_spec.rb +2 -2
  113. data/spec/models/customer_list_bank_model_spec.rb +2 -2
  114. data/spec/models/deposit_address_bank_model_spec.rb +96 -0
  115. data/spec/models/deposit_address_list_bank_model_spec.rb +52 -0
  116. data/spec/models/error_response_bank_model_spec.rb +2 -2
  117. data/spec/models/external_bank_account_bank_model_spec.rb +2 -2
  118. data/spec/models/external_bank_account_list_bank_model_spec.rb +2 -2
  119. data/spec/models/fee_bank_model_spec.rb +2 -2
  120. data/spec/models/fee_configuration_bank_model_spec.rb +2 -2
  121. data/spec/models/fee_configuration_list_bank_model_spec.rb +2 -2
  122. data/spec/models/identity_record_bank_model_spec.rb +2 -2
  123. data/spec/models/identity_record_list_bank_model_spec.rb +2 -2
  124. data/spec/models/identity_verification_bank_model_spec.rb +2 -2
  125. data/spec/models/identity_verification_list_bank_model_spec.rb +2 -2
  126. data/spec/models/identity_verification_with_details_all_of_bank_model_spec.rb +2 -2
  127. data/spec/models/identity_verification_with_details_bank_model_spec.rb +2 -2
  128. data/spec/models/patch_bank_bank_model_spec.rb +2 -2
  129. data/spec/models/post_account_bank_model_spec.rb +2 -2
  130. data/spec/models/post_bank_bank_model_spec.rb +2 -2
  131. data/spec/models/post_customer_bank_model_spec.rb +2 -2
  132. data/spec/models/post_deposit_address_bank_model_spec.rb +34 -0
  133. data/spec/models/post_external_bank_account_bank_model_spec.rb +2 -2
  134. data/spec/models/post_fee_bank_model_spec.rb +2 -2
  135. data/spec/models/post_fee_configuration_bank_model_spec.rb +2 -2
  136. data/spec/models/post_identity_record_attestation_details_bank_model_spec.rb +2 -2
  137. data/spec/models/post_identity_record_bank_model_spec.rb +2 -2
  138. data/spec/models/post_identity_verification_bank_model_spec.rb +2 -2
  139. data/spec/models/post_quote_bank_model_spec.rb +2 -2
  140. data/spec/models/post_reward_bank_model_spec.rb +2 -2
  141. data/spec/models/post_trade_bank_model_spec.rb +2 -2
  142. data/spec/models/post_transfer_bank_model_spec.rb +2 -2
  143. data/spec/models/post_verification_key_bank_model_spec.rb +2 -2
  144. data/spec/models/post_workflow_bank_model_spec.rb +2 -2
  145. data/spec/models/quote_bank_model_spec.rb +2 -2
  146. data/spec/models/quote_list_bank_model_spec.rb +2 -2
  147. data/spec/models/reward_bank_model_spec.rb +2 -2
  148. data/spec/models/reward_list_bank_model_spec.rb +2 -2
  149. data/spec/models/symbol_price_bank_model_spec.rb +2 -2
  150. data/spec/models/trade_bank_model_spec.rb +2 -2
  151. data/spec/models/trade_list_bank_model_spec.rb +2 -2
  152. data/spec/models/transfer_bank_model_spec.rb +2 -2
  153. data/spec/models/transfer_list_bank_model_spec.rb +2 -2
  154. data/spec/models/verification_key_bank_model_spec.rb +2 -2
  155. data/spec/models/verification_key_list_bank_model_spec.rb +2 -2
  156. data/spec/models/workflow_bank_model_spec.rb +2 -2
  157. data/spec/models/workflow_with_details_all_of_bank_model_spec.rb +2 -2
  158. data/spec/models/workflow_with_details_bank_model_spec.rb +2 -2
  159. data/spec/models/workflows_list_bank_model_spec.rb +2 -2
  160. data/spec/spec_helper.rb +2 -2
  161. data/vendor/bundle/ruby/3.1.0/cache/psych-5.0.2.gem +0 -0
  162. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/byebug-11.1.3/gem_make.out +4 -4
  163. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/ffi-1.15.5/gem_make.out +4 -4
  164. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/jaro_winkler-1.5.4/gem_make.out +4 -4
  165. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/{psych-5.0.1 → psych-5.0.2}/gem.build_complete +0 -0
  166. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/{psych-5.0.1 → psych-5.0.2}/gem_make.out +14 -14
  167. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/{psych-5.0.1 → psych-5.0.2}/mkmf.log +0 -0
  168. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/{psych-5.0.1 → psych-5.0.2}/psych.so +0 -0
  169. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/stringio-3.0.4/gem_make.out +4 -4
  170. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/.gitignore +0 -0
  171. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/Gemfile +0 -0
  172. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/LICENSE +0 -0
  173. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/Mavenfile +0 -0
  174. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/README.md +0 -0
  175. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/Rakefile +2 -2
  176. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/bin/console +0 -0
  177. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/bin/setup +0 -0
  178. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/.sitearchdir.time +0 -0
  179. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/Makefile +0 -0
  180. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/depend +0 -0
  181. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/extconf.rb +1 -1
  182. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych.c +0 -0
  183. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych.h +0 -0
  184. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych.o +0 -0
  185. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych.so +0 -0
  186. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_emitter.c +0 -0
  187. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_emitter.h +0 -0
  188. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_emitter.o +0 -0
  189. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_parser.c +0 -0
  190. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_parser.h +0 -0
  191. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_parser.o +0 -0
  192. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_to_ruby.c +0 -0
  193. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_to_ruby.h +0 -0
  194. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_to_ruby.o +0 -0
  195. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_yaml_tree.c +0 -0
  196. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_yaml_tree.h +0 -0
  197. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/ext/psych/psych_yaml_tree.o +0 -0
  198. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/class_loader.rb +1 -1
  199. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/coder.rb +0 -0
  200. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/core_ext.rb +0 -0
  201. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/exception.rb +0 -0
  202. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/handler.rb +0 -0
  203. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/handlers/document_stream.rb +0 -0
  204. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/handlers/recorder.rb +0 -0
  205. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/json/ruby_events.rb +0 -0
  206. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/json/stream.rb +0 -0
  207. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/json/tree_builder.rb +0 -0
  208. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/json/yaml_events.rb +0 -0
  209. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/nodes/alias.rb +0 -0
  210. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/nodes/document.rb +0 -0
  211. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/nodes/mapping.rb +0 -0
  212. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/nodes/node.rb +0 -0
  213. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/nodes/scalar.rb +0 -0
  214. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/nodes/sequence.rb +0 -0
  215. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/nodes/stream.rb +0 -0
  216. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/nodes.rb +0 -0
  217. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/omap.rb +0 -0
  218. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/parser.rb +0 -0
  219. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/scalar_scanner.rb +0 -0
  220. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/set.rb +0 -0
  221. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/stream.rb +0 -0
  222. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/streaming.rb +0 -0
  223. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/syntax_error.rb +0 -0
  224. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/tree_builder.rb +2 -2
  225. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/versions.rb +1 -1
  226. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/visitors/depth_first.rb +0 -0
  227. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/visitors/emitter.rb +0 -0
  228. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/visitors/json_tree.rb +0 -0
  229. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/visitors/to_ruby.rb +0 -0
  230. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/visitors/visitor.rb +0 -0
  231. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/visitors/yaml_tree.rb +0 -0
  232. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/visitors.rb +0 -0
  233. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych/y.rb +0 -0
  234. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych.rb +0 -0
  235. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/lib/psych.so +0 -0
  236. data/vendor/bundle/ruby/3.1.0/gems/{psych-5.0.1 → psych-5.0.2}/psych.gemspec +2 -1
  237. data/vendor/bundle/ruby/3.1.0/specifications/{psych-5.0.1.gemspec → psych-5.0.2.gemspec} +4 -3
  238. metadata +91 -75
  239. data/vendor/bundle/ruby/3.1.0/cache/psych-5.0.1.gem +0 -0
@@ -0,0 +1,503 @@
1
+ =begin
2
+ #Cybrid Bank API
3
+
4
+ ## Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you'll find details on how our REST API operates and generally how our platform functions. If you're looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid's public interactive API documentation, which allows you to fully test our APIs. If you'd like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.demo.cybrid.app/api/schema/v1/swagger.yaml) for import. If you're new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Getting Started in the Cybrid Sandbox](https://www.cybrid.xyz/guides/getting-started) 2. [Getting Ready for Trading](https://www.cybrid.xyz/guides/getting-ready-for-trading) 3. [Running the Web Demo App](https://www.cybrid.xyz/guides/running-the-cybrid-web-demo-crypto-app) (or, alternatively, [Testing with Hosted Web Demo App](https://www.cybrid.xyz/guides/testing-with-the-web-demo-crypo-app)) In [Getting Started in the Cybrid Sandbox](https://www.cybrid.xyz/guides/getting-started), we walk you through how to use the [Cybrid Sandbox](https://id.demo.cybrid.app/) to create a test bank, generate API keys, and set banks fees. In [Getting Ready for Trading](https://www.cybrid.xyz/guides/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. If you've already run through the first two guides, you can follow the [Running the Web Demo App](https://www.cybrid.xyz/guides/running-the-cybrid-web-demo-crypto-app) guide to test our web SDK with your sandbox `bank` and `customer`. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you'll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.demo.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.demo.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.demo.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.demo.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.demo.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.demo.cybrid.app/api/schema/swagger-ui). <font color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.demo.cybrid.app/oauth/token -d '{ \"grant_type\": \"client_credentials\", \"client_id\": \"<Your Client ID>\", \"client_secret\": \"<Your Secret>\", \"scope\": \"banks:read banks:write accounts:read accounts:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read rewards:execute rewards:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute\" }' -H \"Content-Type: application/json\" # When using Organization credentials set `scope` to 'organizations:read organizations:write banks:read banks:write banks:execute customers:read accounts:read quotes:read trades:read transfers:read external_bank_accounts:read workflows:read deposit_addresses:read' ``` <font color=\"orange\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you'd like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|-------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Bank, Customer) | | Reward | rewards:read (Bank, Customer) | | rewards:execute (Bank) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.demo.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.demo.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.demo.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | BankVerificationKey | /api/bank_verification_keys | Create, list and retrive verification keys, used for signing identities | | Bank | Customer | /api/customers | Create and list customers | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | FeeConfiguration | /api/fee_configurations | Create and list bank fees (spread or fixed) | | Bank | IdentityRecord | /api/identity_records | Create and list identity records, which are attached to customers for KYC | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Reward | /api/rewards | Create a new reward (automates quote/trade for simplicity) | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC'd) in our system before they can play any part on the platform, which means they must have an associated and valid `Identity Record`. See the Identity Records section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer.
5
+
6
+ The version of the OpenAPI document: v0.58.0
7
+ Contact: support@cybrid.app
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module CybridApiBank
17
+ class DepositAddressBankModel
18
+ # Auto-generated unique identifier for the identity verification.
19
+ attr_accessor :guid
20
+
21
+ # The address' bank identifier.
22
+ attr_accessor :bank_guid
23
+
24
+ # The address' customer identifier.
25
+ attr_accessor :customer_guid
26
+
27
+ # The address' account identifier.
28
+ attr_accessor :account_guid
29
+
30
+ # ISO8601 datetime the address was created at.
31
+ attr_accessor :created_at
32
+
33
+ # The asset the transfer is related to, e.g., USD.
34
+ attr_accessor :asset
35
+
36
+ # The state of the address.
37
+ attr_accessor :state
38
+
39
+ # The blockchain address.
40
+ attr_accessor :address
41
+
42
+ # The blockchain address format.
43
+ attr_accessor :format
44
+
45
+ # The blockchain address tag.
46
+ attr_accessor :tag
47
+
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'guid' => :'guid',
74
+ :'bank_guid' => :'bank_guid',
75
+ :'customer_guid' => :'customer_guid',
76
+ :'account_guid' => :'account_guid',
77
+ :'created_at' => :'created_at',
78
+ :'asset' => :'asset',
79
+ :'state' => :'state',
80
+ :'address' => :'address',
81
+ :'format' => :'format',
82
+ :'tag' => :'tag'
83
+ }
84
+ end
85
+
86
+ # Returns all the JSON keys this model knows about
87
+ def self.acceptable_attributes
88
+ attribute_map.values
89
+ end
90
+
91
+ # Attribute type mapping.
92
+ def self.openapi_types
93
+ {
94
+ :'guid' => :'String',
95
+ :'bank_guid' => :'String',
96
+ :'customer_guid' => :'String',
97
+ :'account_guid' => :'String',
98
+ :'created_at' => :'Time',
99
+ :'asset' => :'String',
100
+ :'state' => :'String',
101
+ :'address' => :'String',
102
+ :'format' => :'String',
103
+ :'tag' => :'String'
104
+ }
105
+ end
106
+
107
+ # List of attributes with nullable: true
108
+ def self.openapi_nullable
109
+ Set.new([
110
+ ])
111
+ end
112
+
113
+ # Initializes the object
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ def initialize(attributes = {})
116
+ if (!attributes.is_a?(Hash))
117
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CybridApiBank::DepositAddressBankModel` initialize method"
118
+ end
119
+
120
+ # check to see if the attribute exists and convert string to symbol for hash key
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!self.class.attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CybridApiBank::DepositAddressBankModel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'guid')
129
+ self.guid = attributes[:'guid']
130
+ end
131
+
132
+ if attributes.key?(:'bank_guid')
133
+ self.bank_guid = attributes[:'bank_guid']
134
+ end
135
+
136
+ if attributes.key?(:'customer_guid')
137
+ self.customer_guid = attributes[:'customer_guid']
138
+ end
139
+
140
+ if attributes.key?(:'account_guid')
141
+ self.account_guid = attributes[:'account_guid']
142
+ end
143
+
144
+ if attributes.key?(:'created_at')
145
+ self.created_at = attributes[:'created_at']
146
+ end
147
+
148
+ if attributes.key?(:'asset')
149
+ self.asset = attributes[:'asset']
150
+ end
151
+
152
+ if attributes.key?(:'state')
153
+ self.state = attributes[:'state']
154
+ end
155
+
156
+ if attributes.key?(:'address')
157
+ self.address = attributes[:'address']
158
+ end
159
+
160
+ if attributes.key?(:'format')
161
+ self.format = attributes[:'format']
162
+ end
163
+
164
+ if attributes.key?(:'tag')
165
+ self.tag = attributes[:'tag']
166
+ end
167
+ end
168
+
169
+ # Show invalid properties with the reasons. Usually used together with valid?
170
+ # @return Array for valid properties with the reasons
171
+ def list_invalid_properties
172
+ invalid_properties = Array.new
173
+ if @guid.nil?
174
+ invalid_properties.push('invalid value for "guid", guid cannot be nil.')
175
+ end
176
+
177
+ if @guid.to_s.length > 32
178
+ invalid_properties.push('invalid value for "guid", the character length must be smaller than or equal to 32.')
179
+ end
180
+
181
+ if @guid.to_s.length < 32
182
+ invalid_properties.push('invalid value for "guid", the character length must be great than or equal to 32.')
183
+ end
184
+
185
+ if @bank_guid.nil?
186
+ invalid_properties.push('invalid value for "bank_guid", bank_guid cannot be nil.')
187
+ end
188
+
189
+ if @bank_guid.to_s.length > 32
190
+ invalid_properties.push('invalid value for "bank_guid", the character length must be smaller than or equal to 32.')
191
+ end
192
+
193
+ if @bank_guid.to_s.length < 32
194
+ invalid_properties.push('invalid value for "bank_guid", the character length must be great than or equal to 32.')
195
+ end
196
+
197
+ if @customer_guid.nil?
198
+ invalid_properties.push('invalid value for "customer_guid", customer_guid cannot be nil.')
199
+ end
200
+
201
+ if @customer_guid.to_s.length > 32
202
+ invalid_properties.push('invalid value for "customer_guid", the character length must be smaller than or equal to 32.')
203
+ end
204
+
205
+ if @customer_guid.to_s.length < 32
206
+ invalid_properties.push('invalid value for "customer_guid", the character length must be great than or equal to 32.')
207
+ end
208
+
209
+ if @account_guid.nil?
210
+ invalid_properties.push('invalid value for "account_guid", account_guid cannot be nil.')
211
+ end
212
+
213
+ if @account_guid.to_s.length > 32
214
+ invalid_properties.push('invalid value for "account_guid", the character length must be smaller than or equal to 32.')
215
+ end
216
+
217
+ if @account_guid.to_s.length < 32
218
+ invalid_properties.push('invalid value for "account_guid", the character length must be great than or equal to 32.')
219
+ end
220
+
221
+ if @created_at.nil?
222
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
223
+ end
224
+
225
+ if @asset.nil?
226
+ invalid_properties.push('invalid value for "asset", asset cannot be nil.')
227
+ end
228
+
229
+ if @state.nil?
230
+ invalid_properties.push('invalid value for "state", state cannot be nil.')
231
+ end
232
+
233
+ invalid_properties
234
+ end
235
+
236
+ # Check to see if the all the properties in the model are valid
237
+ # @return true if the model is valid
238
+ def valid?
239
+ return false if @guid.nil?
240
+ return false if @guid.to_s.length > 32
241
+ return false if @guid.to_s.length < 32
242
+ return false if @bank_guid.nil?
243
+ return false if @bank_guid.to_s.length > 32
244
+ return false if @bank_guid.to_s.length < 32
245
+ return false if @customer_guid.nil?
246
+ return false if @customer_guid.to_s.length > 32
247
+ return false if @customer_guid.to_s.length < 32
248
+ return false if @account_guid.nil?
249
+ return false if @account_guid.to_s.length > 32
250
+ return false if @account_guid.to_s.length < 32
251
+ return false if @created_at.nil?
252
+ return false if @asset.nil?
253
+ return false if @state.nil?
254
+ state_validator = EnumAttributeValidator.new('String', ["storing", "created"])
255
+ return false unless state_validator.valid?(@state)
256
+ format_validator = EnumAttributeValidator.new('String', ["standard", "legacy"])
257
+ return false unless format_validator.valid?(@format)
258
+ true
259
+ end
260
+
261
+ # Custom attribute writer method with validation
262
+ # @param [Object] guid Value to be assigned
263
+ def guid=(guid)
264
+ if guid.nil?
265
+ fail ArgumentError, 'guid cannot be nil'
266
+ end
267
+
268
+ if guid.to_s.length > 32
269
+ fail ArgumentError, 'invalid value for "guid", the character length must be smaller than or equal to 32.'
270
+ end
271
+
272
+ if guid.to_s.length < 32
273
+ fail ArgumentError, 'invalid value for "guid", the character length must be great than or equal to 32.'
274
+ end
275
+
276
+ @guid = guid
277
+ end
278
+
279
+ # Custom attribute writer method with validation
280
+ # @param [Object] bank_guid Value to be assigned
281
+ def bank_guid=(bank_guid)
282
+ if bank_guid.nil?
283
+ fail ArgumentError, 'bank_guid cannot be nil'
284
+ end
285
+
286
+ if bank_guid.to_s.length > 32
287
+ fail ArgumentError, 'invalid value for "bank_guid", the character length must be smaller than or equal to 32.'
288
+ end
289
+
290
+ if bank_guid.to_s.length < 32
291
+ fail ArgumentError, 'invalid value for "bank_guid", the character length must be great than or equal to 32.'
292
+ end
293
+
294
+ @bank_guid = bank_guid
295
+ end
296
+
297
+ # Custom attribute writer method with validation
298
+ # @param [Object] customer_guid Value to be assigned
299
+ def customer_guid=(customer_guid)
300
+ if customer_guid.nil?
301
+ fail ArgumentError, 'customer_guid cannot be nil'
302
+ end
303
+
304
+ if customer_guid.to_s.length > 32
305
+ fail ArgumentError, 'invalid value for "customer_guid", the character length must be smaller than or equal to 32.'
306
+ end
307
+
308
+ if customer_guid.to_s.length < 32
309
+ fail ArgumentError, 'invalid value for "customer_guid", the character length must be great than or equal to 32.'
310
+ end
311
+
312
+ @customer_guid = customer_guid
313
+ end
314
+
315
+ # Custom attribute writer method with validation
316
+ # @param [Object] account_guid Value to be assigned
317
+ def account_guid=(account_guid)
318
+ if account_guid.nil?
319
+ fail ArgumentError, 'account_guid cannot be nil'
320
+ end
321
+
322
+ if account_guid.to_s.length > 32
323
+ fail ArgumentError, 'invalid value for "account_guid", the character length must be smaller than or equal to 32.'
324
+ end
325
+
326
+ if account_guid.to_s.length < 32
327
+ fail ArgumentError, 'invalid value for "account_guid", the character length must be great than or equal to 32.'
328
+ end
329
+
330
+ @account_guid = account_guid
331
+ end
332
+
333
+ # Custom attribute writer method checking allowed values (enum).
334
+ # @param [Object] state Object to be assigned
335
+ def state=(state)
336
+ validator = EnumAttributeValidator.new('String', ["storing", "created"])
337
+ unless validator.valid?(state)
338
+ fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
339
+ end
340
+ @state = state
341
+ end
342
+
343
+ # Custom attribute writer method checking allowed values (enum).
344
+ # @param [Object] format Object to be assigned
345
+ def format=(format)
346
+ validator = EnumAttributeValidator.new('String', ["standard", "legacy"])
347
+ unless validator.valid?(format)
348
+ fail ArgumentError, "invalid value for \"format\", must be one of #{validator.allowable_values}."
349
+ end
350
+ @format = format
351
+ end
352
+
353
+ # Checks equality by comparing each attribute.
354
+ # @param [Object] Object to be compared
355
+ def ==(o)
356
+ return true if self.equal?(o)
357
+ self.class == o.class &&
358
+ guid == o.guid &&
359
+ bank_guid == o.bank_guid &&
360
+ customer_guid == o.customer_guid &&
361
+ account_guid == o.account_guid &&
362
+ created_at == o.created_at &&
363
+ asset == o.asset &&
364
+ state == o.state &&
365
+ address == o.address &&
366
+ format == o.format &&
367
+ tag == o.tag
368
+ end
369
+
370
+ # @see the `==` method
371
+ # @param [Object] Object to be compared
372
+ def eql?(o)
373
+ self == o
374
+ end
375
+
376
+ # Calculates hash code according to all attributes.
377
+ # @return [Integer] Hash code
378
+ def hash
379
+ [guid, bank_guid, customer_guid, account_guid, created_at, asset, state, address, format, tag].hash
380
+ end
381
+
382
+ # Builds the object from hash
383
+ # @param [Hash] attributes Model attributes in the form of hash
384
+ # @return [Object] Returns the model itself
385
+ def self.build_from_hash(attributes)
386
+ new.build_from_hash(attributes)
387
+ end
388
+
389
+ # Builds the object from hash
390
+ # @param [Hash] attributes Model attributes in the form of hash
391
+ # @return [Object] Returns the model itself
392
+ def build_from_hash(attributes)
393
+ return nil unless attributes.is_a?(Hash)
394
+ attributes = attributes.transform_keys(&:to_sym)
395
+ self.class.openapi_types.each_pair do |key, type|
396
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
397
+ self.send("#{key}=", nil)
398
+ elsif type =~ /\AArray<(.*)>/i
399
+ # check to ensure the input is an array given that the attribute
400
+ # is documented as an array but the input is not
401
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
402
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
403
+ end
404
+ elsif !attributes[self.class.attribute_map[key]].nil?
405
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
406
+ end
407
+ end
408
+
409
+ self
410
+ end
411
+
412
+ # Deserializes the data based on type
413
+ # @param string type Data type
414
+ # @param string value Value to be deserialized
415
+ # @return [Object] Deserialized data
416
+ def _deserialize(type, value)
417
+ case type.to_sym
418
+ when :Time
419
+ Time.parse(value)
420
+ when :Date
421
+ Date.parse(value)
422
+ when :String
423
+ value.to_s
424
+ when :Integer
425
+ value.to_i
426
+ when :Float
427
+ value.to_f
428
+ when :Boolean
429
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
430
+ true
431
+ else
432
+ false
433
+ end
434
+ when :Object
435
+ # generic object (usually a Hash), return directly
436
+ value
437
+ when /\AArray<(?<inner_type>.+)>\z/
438
+ inner_type = Regexp.last_match[:inner_type]
439
+ value.map { |v| _deserialize(inner_type, v) }
440
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
441
+ k_type = Regexp.last_match[:k_type]
442
+ v_type = Regexp.last_match[:v_type]
443
+ {}.tap do |hash|
444
+ value.each do |k, v|
445
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
446
+ end
447
+ end
448
+ else # model
449
+ # models (e.g. Pet) or oneOf
450
+ klass = CybridApiBank.const_get(type)
451
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
452
+ end
453
+ end
454
+
455
+ # Returns the string representation of the object
456
+ # @return [String] String presentation of the object
457
+ def to_s
458
+ to_hash.to_s
459
+ end
460
+
461
+ # to_body is an alias to to_hash (backward compatibility)
462
+ # @return [Hash] Returns the object in the form of hash
463
+ def to_body
464
+ to_hash
465
+ end
466
+
467
+ # Returns the object in the form of hash
468
+ # @return [Hash] Returns the object in the form of hash
469
+ def to_hash
470
+ hash = {}
471
+ self.class.attribute_map.each_pair do |attr, param|
472
+ value = self.send(attr)
473
+ if value.nil?
474
+ is_nullable = self.class.openapi_nullable.include?(attr)
475
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
476
+ end
477
+
478
+ hash[param] = _to_hash(value)
479
+ end
480
+ hash
481
+ end
482
+
483
+ # Outputs non-array value in the form of hash
484
+ # For object, use to_hash. Otherwise, just return the value
485
+ # @param [Object] value Any valid value
486
+ # @return [Hash] Returns the value in the form of hash
487
+ def _to_hash(value)
488
+ if value.is_a?(Array)
489
+ value.compact.map { |v| _to_hash(v) }
490
+ elsif value.is_a?(Hash)
491
+ {}.tap do |hash|
492
+ value.each { |k, v| hash[k] = _to_hash(v) }
493
+ end
494
+ elsif value.respond_to? :to_hash
495
+ value.to_hash
496
+ else
497
+ value
498
+ end
499
+ end
500
+
501
+ end
502
+
503
+ end