hydrogen-integration-api 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (449) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +87 -0
  4. data/Rakefile +8 -0
  5. data/git_push.sh +55 -0
  6. data/integration_api.gemspec +46 -0
  7. data/lib/integration_api.rb +257 -0
  8. data/lib/integration_api/api/accounting_api.rb +870 -0
  9. data/lib/integration_api/api/ach_api.rb +1109 -0
  10. data/lib/integration_api/api/aggregation_api.rb +616 -0
  11. data/lib/integration_api/api/async_api.rb +263 -0
  12. data/lib/integration_api/api/baas_api.rb +518 -0
  13. data/lib/integration_api/api/brokerage_api.rb +1091 -0
  14. data/lib/integration_api/api/card_api.rb +1651 -0
  15. data/lib/integration_api/api/iav_api.rb +186 -0
  16. data/lib/integration_api/api/kms_api.rb +301 -0
  17. data/lib/integration_api/api/kyc_api.rb +138 -0
  18. data/lib/integration_api/api/market_data_api.rb +127 -0
  19. data/lib/integration_api/api/rtp_api.rb +479 -0
  20. data/lib/integration_api/api/sms_api.rb +129 -0
  21. data/lib/integration_api/api/smtp_api.rb +129 -0
  22. data/lib/integration_api/api/utils_api.rb +296 -0
  23. data/lib/integration_api/api/webhook_api.rb +301 -0
  24. data/lib/integration_api/api/wire_api.rb +479 -0
  25. data/lib/integration_api/api_client.rb +392 -0
  26. data/lib/integration_api/api_error.rb +38 -0
  27. data/lib/integration_api/auth_configuration.rb +181 -0
  28. data/lib/integration_api/configuration.rb +209 -0
  29. data/lib/integration_api/environment.rb +26 -0
  30. data/lib/integration_api/models/accounting_customer_response_vo.rb +200 -0
  31. data/lib/integration_api/models/accounting_customer_revenue_response_vo.rb +199 -0
  32. data/lib/integration_api/models/accounting_final_response_vo.rb +252 -0
  33. data/lib/integration_api/models/accounting_invoice_payment_response_vo.rb +199 -0
  34. data/lib/integration_api/models/accounting_invoice_response_vo.rb +199 -0
  35. data/lib/integration_api/models/accounting_stats_response_vo.rb +199 -0
  36. data/lib/integration_api/models/ach_balance_response_vo.rb +230 -0
  37. data/lib/integration_api/models/ach_bank_link_request_co.rb +199 -0
  38. data/lib/integration_api/models/ach_bank_link_response_vo.rb +235 -0
  39. data/lib/integration_api/models/ach_beneficial_owner_request_co.rb +190 -0
  40. data/lib/integration_api/models/ach_beneficial_owner_response_vo.rb +208 -0
  41. data/lib/integration_api/models/ach_business_balance_response_vo.rb +226 -0
  42. data/lib/integration_api/models/ach_business_request_co.rb +199 -0
  43. data/lib/integration_api/models/ach_business_response_vo.rb +217 -0
  44. data/lib/integration_api/models/ach_card_link_request_co.rb +190 -0
  45. data/lib/integration_api/models/ach_card_link_response_vo.rb +217 -0
  46. data/lib/integration_api/models/ach_card_load_response_vo.rb +190 -0
  47. data/lib/integration_api/models/ach_card_request_co.rb +182 -0
  48. data/lib/integration_api/models/ach_card_reserve_request_co.rb +181 -0
  49. data/lib/integration_api/models/ach_card_reserve_response_vo.rb +217 -0
  50. data/lib/integration_api/models/ach_card_response_vo.rb +218 -0
  51. data/lib/integration_api/models/ach_client_request_co.rb +199 -0
  52. data/lib/integration_api/models/ach_client_response_vo.rb +217 -0
  53. data/lib/integration_api/models/ach_reserve_link_request_co.rb +181 -0
  54. data/lib/integration_api/models/ach_reserve_link_response_vo.rb +219 -0
  55. data/lib/integration_api/models/ach_status_response_vo.rb +260 -0
  56. data/lib/integration_api/models/ach_transfer_request_co.rb +199 -0
  57. data/lib/integration_api/models/ach_transfer_response_vo.rb +244 -0
  58. data/lib/integration_api/models/acquiree.rb +199 -0
  59. data/lib/integration_api/models/acquirer.rb +199 -0
  60. data/lib/integration_api/models/address.rb +278 -0
  61. data/lib/integration_api/models/aggregation_account.rb +495 -0
  62. data/lib/integration_api/models/aggregation_account_balance.rb +292 -0
  63. data/lib/integration_api/models/aggregation_account_balance_response_vo.rb +208 -0
  64. data/lib/integration_api/models/aggregation_account_holding.rb +370 -0
  65. data/lib/integration_api/models/aggregation_account_holding_response_internal_object_vo.rb +199 -0
  66. data/lib/integration_api/models/aggregation_account_holding_response_vo.rb +210 -0
  67. data/lib/integration_api/models/aggregation_account_response_internal_object_vo.rb +199 -0
  68. data/lib/integration_api/models/aggregation_account_response_vo.rb +208 -0
  69. data/lib/integration_api/models/aggregation_account_transaction.rb +329 -0
  70. data/lib/integration_api/models/aggregation_account_transaction_response_internal_object_vo.rb +199 -0
  71. data/lib/integration_api/models/aggregation_account_transaction_response_vo.rb +221 -0
  72. data/lib/integration_api/models/aggregation_accounts_response_vo.rb +210 -0
  73. data/lib/integration_api/models/aggregation_request_object.rb +226 -0
  74. data/lib/integration_api/models/aggregation_vendor_request_co.rb +199 -0
  75. data/lib/integration_api/models/apple_payload.rb +199 -0
  76. data/lib/integration_api/models/async_transaction.rb +217 -0
  77. data/lib/integration_api/models/async_transaction_vo.rb +199 -0
  78. data/lib/integration_api/models/attachment_vo.rb +199 -0
  79. data/lib/integration_api/models/baas_account_co.rb +190 -0
  80. data/lib/integration_api/models/baas_account_vo.rb +253 -0
  81. data/lib/integration_api/models/baas_balance_vo.rb +221 -0
  82. data/lib/integration_api/models/baas_business_vo.rb +237 -0
  83. data/lib/integration_api/models/baas_client_vo.rb +237 -0
  84. data/lib/integration_api/models/baas_statement_vo.rb +226 -0
  85. data/lib/integration_api/models/baas_statements_vo.rb +201 -0
  86. data/lib/integration_api/models/baas_sub_account_co.rb +181 -0
  87. data/lib/integration_api/models/baas_sub_account_vo.rb +244 -0
  88. data/lib/integration_api/models/baas_transactions_vo.rb +221 -0
  89. data/lib/integration_api/models/balances.rb +223 -0
  90. data/lib/integration_api/models/bank_credit.rb +282 -0
  91. data/lib/integration_api/models/bank_link.rb +431 -0
  92. data/lib/integration_api/models/bank_link_response_internal_object_vo.rb +199 -0
  93. data/lib/integration_api/models/bank_link_vendor_data_vo.rb +190 -0
  94. data/lib/integration_api/models/base_response_vo.rb +199 -0
  95. data/lib/integration_api/models/brokerage_account_co.rb +192 -0
  96. data/lib/integration_api/models/brokerage_account_vo.rb +217 -0
  97. data/lib/integration_api/models/brokerage_balance_vo.rb +228 -0
  98. data/lib/integration_api/models/brokerage_bank_link_co.rb +181 -0
  99. data/lib/integration_api/models/brokerage_bank_link_vo.rb +226 -0
  100. data/lib/integration_api/models/brokerage_create_client_co.rb +192 -0
  101. data/lib/integration_api/models/brokerage_create_client_vo.rb +217 -0
  102. data/lib/integration_api/models/brokerage_deposit_co.rb +181 -0
  103. data/lib/integration_api/models/brokerage_deposit_vo.rb +217 -0
  104. data/lib/integration_api/models/brokerage_document_co.rb +190 -0
  105. data/lib/integration_api/models/brokerage_document_vo.rb +226 -0
  106. data/lib/integration_api/models/brokerage_holding_vo.rb +226 -0
  107. data/lib/integration_api/models/brokerage_order_co.rb +181 -0
  108. data/lib/integration_api/models/brokerage_order_vo.rb +226 -0
  109. data/lib/integration_api/models/brokerage_performance_vo.rb +226 -0
  110. data/lib/integration_api/models/brokerage_securities_vo.rb +217 -0
  111. data/lib/integration_api/models/brokerage_statement_vo.rb +199 -0
  112. data/lib/integration_api/models/brokerage_transaction_vo.rb +226 -0
  113. data/lib/integration_api/models/brokerage_update_client_co.rb +183 -0
  114. data/lib/integration_api/models/brokerage_update_client_vo.rb +237 -0
  115. data/lib/integration_api/models/brokerage_withdrawal_co.rb +181 -0
  116. data/lib/integration_api/models/brokerage_withdrawal_vo.rb +217 -0
  117. data/lib/integration_api/models/business_address.rb +253 -0
  118. data/lib/integration_api/models/business_status_response_vo.rb +217 -0
  119. data/lib/integration_api/models/business_vendor_request_data_vo.rb +313 -0
  120. data/lib/integration_api/models/card_auto_reload_request_co.rb +208 -0
  121. data/lib/integration_api/models/card_auto_reload_response_vo.rb +226 -0
  122. data/lib/integration_api/models/card_balance_response_vo.rb +230 -0
  123. data/lib/integration_api/models/card_base_request_co.rb +199 -0
  124. data/lib/integration_api/models/card_business_request_co.rb +181 -0
  125. data/lib/integration_api/models/card_client_request_co.rb +192 -0
  126. data/lib/integration_api/models/card_load_request_co.rb +190 -0
  127. data/lib/integration_api/models/card_load_unload_response_vo.rb +235 -0
  128. data/lib/integration_api/models/card_pin_request_co.rb +208 -0
  129. data/lib/integration_api/models/card_replace_response_vo.rb +235 -0
  130. data/lib/integration_api/models/card_reserve_account_response_vo.rb +235 -0
  131. data/lib/integration_api/models/card_reserve_transfer_request_co.rb +181 -0
  132. data/lib/integration_api/models/card_reserve_transfer_response_vo.rb +217 -0
  133. data/lib/integration_api/models/card_spending_control_request_co.rb +181 -0
  134. data/lib/integration_api/models/card_spending_control_response_vo.rb +217 -0
  135. data/lib/integration_api/models/card_token_request_co.rb +242 -0
  136. data/lib/integration_api/models/card_token_response_vo.rb +278 -0
  137. data/lib/integration_api/models/card_transaction_response_vo.rb +230 -0
  138. data/lib/integration_api/models/card_unload_request_co.rb +190 -0
  139. data/lib/integration_api/models/card_update_pin_request_co.rb +208 -0
  140. data/lib/integration_api/models/cash.rb +213 -0
  141. data/lib/integration_api/models/client_address.rb +283 -0
  142. data/lib/integration_api/models/client_vendor_request_data_vo.rb +340 -0
  143. data/lib/integration_api/models/contact.rb +356 -0
  144. data/lib/integration_api/models/contact_address.rb +268 -0
  145. data/lib/integration_api/models/create_baas_business_co.rb +192 -0
  146. data/lib/integration_api/models/create_baas_client_co.rb +192 -0
  147. data/lib/integration_api/models/create_business_response_vo.rb +217 -0
  148. data/lib/integration_api/models/create_card_client_response_vo.rb +217 -0
  149. data/lib/integration_api/models/create_user_request.rb +235 -0
  150. data/lib/integration_api/models/customer_revenue.rb +296 -0
  151. data/lib/integration_api/models/dividend.rb +199 -0
  152. data/lib/integration_api/models/dividend_tax.rb +190 -0
  153. data/lib/integration_api/models/email.rb +359 -0
  154. data/lib/integration_api/models/email_click.rb +220 -0
  155. data/lib/integration_api/models/email_open.rb +205 -0
  156. data/lib/integration_api/models/exchange_public_token_vo.rb +227 -0
  157. data/lib/integration_api/models/exchange_token_co.rb +235 -0
  158. data/lib/integration_api/models/financial_statement.rb +362 -0
  159. data/lib/integration_api/models/get_card_image_response_vo.rb +217 -0
  160. data/lib/integration_api/models/get_card_pci_details_response_vo.rb +235 -0
  161. data/lib/integration_api/models/get_card_statement_response_vo.rb +282 -0
  162. data/lib/integration_api/models/get_card_token_response_vo.rb +278 -0
  163. data/lib/integration_api/models/get_transactions_response.rb +183 -0
  164. data/lib/integration_api/models/google_payload.rb +181 -0
  165. data/lib/integration_api/models/iav_aggregation_response_vo.rb +190 -0
  166. data/lib/integration_api/models/iav_bank_link_response_vo.rb +192 -0
  167. data/lib/integration_api/models/iav_request_co.rb +244 -0
  168. data/lib/integration_api/models/iav_response_vo.rb +199 -0
  169. data/lib/integration_api/models/iav_token_exchange_vendor_response_vo.rb +172 -0
  170. data/lib/integration_api/models/iav_vendor_request_co.rb +199 -0
  171. data/lib/integration_api/models/identification.rb +235 -0
  172. data/lib/integration_api/models/instrument.rb +199 -0
  173. data/lib/integration_api/models/investment.rb +283 -0
  174. data/lib/integration_api/models/invoice.rb +472 -0
  175. data/lib/integration_api/models/invoice_payment.rb +269 -0
  176. data/lib/integration_api/models/json_node.rb +172 -0
  177. data/lib/integration_api/models/kms_config.rb +307 -0
  178. data/lib/integration_api/models/kyc_request_co.rb +255 -0
  179. data/lib/integration_api/models/kyc_response_vo.rb +271 -0
  180. data/lib/integration_api/models/kyc_vendor_request_data_vo.rb +385 -0
  181. data/lib/integration_api/models/line_items.rb +278 -0
  182. data/lib/integration_api/models/location.rb +253 -0
  183. data/lib/integration_api/models/mapstringobject.rb +172 -0
  184. data/lib/integration_api/models/md_history_item_vo.rb +235 -0
  185. data/lib/integration_api/models/md_history_request_co.rb +221 -0
  186. data/lib/integration_api/models/md_history_response_vo.rb +183 -0
  187. data/lib/integration_api/models/md_quote_item_vo.rb +352 -0
  188. data/lib/integration_api/models/md_quote_request_co.rb +246 -0
  189. data/lib/integration_api/models/md_quote_response_vo.rb +183 -0
  190. data/lib/integration_api/models/merger_acquisition.rb +199 -0
  191. data/lib/integration_api/models/nucleus_transfer_fields_co.rb +190 -0
  192. data/lib/integration_api/models/ownership.rb +190 -0
  193. data/lib/integration_api/models/page_ach_transfer_response_vo.rb +258 -0
  194. data/lib/integration_api/models/page_kms_config.rb +258 -0
  195. data/lib/integration_api/models/page_webhook.rb +258 -0
  196. data/lib/integration_api/models/pageobject.rb +258 -0
  197. data/lib/integration_api/models/politically_exposed_person_dto.rb +208 -0
  198. data/lib/integration_api/models/portfolio_asset_size_log.rb +329 -0
  199. data/lib/integration_api/models/property_value_response_vo.rb +226 -0
  200. data/lib/integration_api/models/response_entity.rb +233 -0
  201. data/lib/integration_api/models/rtp_bank_link_request_co.rb +190 -0
  202. data/lib/integration_api/models/rtp_bank_link_response_vo.rb +235 -0
  203. data/lib/integration_api/models/rtp_transfer_request_co.rb +190 -0
  204. data/lib/integration_api/models/rtp_transfer_response_vo.rb +226 -0
  205. data/lib/integration_api/models/samsung_payload.rb +181 -0
  206. data/lib/integration_api/models/sms.rb +335 -0
  207. data/lib/integration_api/models/sms_response_vo.rb +226 -0
  208. data/lib/integration_api/models/smsvo.rb +217 -0
  209. data/lib/integration_api/models/smtp_response_vo.rb +226 -0
  210. data/lib/integration_api/models/smtp_vo.rb +273 -0
  211. data/lib/integration_api/models/sort.rb +233 -0
  212. data/lib/integration_api/models/spending_control_vendor_request_data_vo.rb +255 -0
  213. data/lib/integration_api/models/stat.rb +203 -0
  214. data/lib/integration_api/models/transaction.rb +370 -0
  215. data/lib/integration_api/models/update_baas_business_co.rb +183 -0
  216. data/lib/integration_api/models/update_baas_client_co.rb +183 -0
  217. data/lib/integration_api/models/update_business_response_vo.rb +217 -0
  218. data/lib/integration_api/models/update_card_client_response_vo.rb +217 -0
  219. data/lib/integration_api/models/user_response_interface.rb +172 -0
  220. data/lib/integration_api/models/user_response_vo.rb +235 -0
  221. data/lib/integration_api/models/vendor_access_config_vo.rb +202 -0
  222. data/lib/integration_api/models/webhook.rb +277 -0
  223. data/lib/integration_api/models/widget_url_vo.rb +190 -0
  224. data/lib/integration_api/models/wire_bank_link_request_co.rb +190 -0
  225. data/lib/integration_api/models/wire_bank_link_response_vo.rb +235 -0
  226. data/lib/integration_api/models/wire_transfer_request_co.rb +190 -0
  227. data/lib/integration_api/models/wire_transfer_response_vo.rb +226 -0
  228. data/lib/integration_api/models/zillow_property_vendor_response_vo.rb +217 -0
  229. data/lib/integration_api/version.rb +15 -0
  230. data/spec/api/accounting_api_spec.rb +234 -0
  231. data/spec/api/ach_api_spec.rb +259 -0
  232. data/spec/api/aggregation_api_spec.rb +172 -0
  233. data/spec/api/async_api_spec.rb +88 -0
  234. data/spec/api/baas_api_spec.rb +143 -0
  235. data/spec/api/brokerage_api_spec.rb +264 -0
  236. data/spec/api/card_api_spec.rb +385 -0
  237. data/spec/api/iav_api_spec.rb +73 -0
  238. data/spec/api/kms_api_spec.rb +100 -0
  239. data/spec/api/kyc_api_spec.rb +63 -0
  240. data/spec/api/market_data_api_spec.rb +57 -0
  241. data/spec/api/rtp_api_spec.rb +134 -0
  242. data/spec/api/sms_api_spec.rb +59 -0
  243. data/spec/api/smtp_api_spec.rb +59 -0
  244. data/spec/api/utils_api_spec.rb +104 -0
  245. data/spec/api/webhook_api_spec.rb +100 -0
  246. data/spec/api/wire_api_spec.rb +134 -0
  247. data/spec/api_client_spec.rb +243 -0
  248. data/spec/configuration_spec.rb +42 -0
  249. data/spec/models/accounting_customer_response_vo_spec.rb +53 -0
  250. data/spec/models/accounting_customer_revenue_response_vo_spec.rb +53 -0
  251. data/spec/models/accounting_final_response_vo_spec.rb +83 -0
  252. data/spec/models/accounting_invoice_payment_response_vo_spec.rb +53 -0
  253. data/spec/models/accounting_invoice_response_vo_spec.rb +53 -0
  254. data/spec/models/accounting_stats_response_vo_spec.rb +53 -0
  255. data/spec/models/ach_balance_response_vo_spec.rb +71 -0
  256. data/spec/models/ach_bank_link_request_co_spec.rb +53 -0
  257. data/spec/models/ach_bank_link_response_vo_spec.rb +77 -0
  258. data/spec/models/ach_beneficial_owner_request_co_spec.rb +47 -0
  259. data/spec/models/ach_beneficial_owner_response_vo_spec.rb +59 -0
  260. data/spec/models/ach_business_balance_response_vo_spec.rb +71 -0
  261. data/spec/models/ach_business_request_co_spec.rb +53 -0
  262. data/spec/models/ach_business_response_vo_spec.rb +65 -0
  263. data/spec/models/ach_card_link_request_co_spec.rb +47 -0
  264. data/spec/models/ach_card_link_response_vo_spec.rb +65 -0
  265. data/spec/models/ach_card_load_response_vo_spec.rb +47 -0
  266. data/spec/models/ach_card_request_co_spec.rb +41 -0
  267. data/spec/models/ach_card_reserve_request_co_spec.rb +41 -0
  268. data/spec/models/ach_card_reserve_response_vo_spec.rb +65 -0
  269. data/spec/models/ach_card_response_vo_spec.rb +65 -0
  270. data/spec/models/ach_client_request_co_spec.rb +53 -0
  271. data/spec/models/ach_client_response_vo_spec.rb +65 -0
  272. data/spec/models/ach_reserve_link_request_co_spec.rb +41 -0
  273. data/spec/models/ach_reserve_link_response_vo_spec.rb +65 -0
  274. data/spec/models/ach_status_response_vo_spec.rb +75 -0
  275. data/spec/models/ach_transfer_request_co_spec.rb +53 -0
  276. data/spec/models/ach_transfer_response_vo_spec.rb +83 -0
  277. data/spec/models/acquiree_spec.rb +53 -0
  278. data/spec/models/acquirer_spec.rb +53 -0
  279. data/spec/models/address_spec.rb +87 -0
  280. data/spec/models/aggregation_account_balance_response_vo_spec.rb +59 -0
  281. data/spec/models/aggregation_account_balance_spec.rb +101 -0
  282. data/spec/models/aggregation_account_holding_response_internal_object_vo_spec.rb +53 -0
  283. data/spec/models/aggregation_account_holding_response_vo_spec.rb +59 -0
  284. data/spec/models/aggregation_account_holding_spec.rb +155 -0
  285. data/spec/models/aggregation_account_response_internal_object_vo_spec.rb +53 -0
  286. data/spec/models/aggregation_account_response_vo_spec.rb +59 -0
  287. data/spec/models/aggregation_account_spec.rb +221 -0
  288. data/spec/models/aggregation_account_transaction_response_internal_object_vo_spec.rb +53 -0
  289. data/spec/models/aggregation_account_transaction_response_vo_spec.rb +65 -0
  290. data/spec/models/aggregation_account_transaction_spec.rb +125 -0
  291. data/spec/models/aggregation_accounts_response_vo_spec.rb +59 -0
  292. data/spec/models/aggregation_request_object_spec.rb +71 -0
  293. data/spec/models/aggregation_vendor_request_co_spec.rb +53 -0
  294. data/spec/models/apple_payload_spec.rb +53 -0
  295. data/spec/models/async_transaction_spec.rb +65 -0
  296. data/spec/models/async_transaction_vo_spec.rb +53 -0
  297. data/spec/models/attachment_vo_spec.rb +53 -0
  298. data/spec/models/baas_account_co_spec.rb +47 -0
  299. data/spec/models/baas_account_vo_spec.rb +89 -0
  300. data/spec/models/baas_balance_vo_spec.rb +65 -0
  301. data/spec/models/baas_business_vo_spec.rb +77 -0
  302. data/spec/models/baas_client_vo_spec.rb +77 -0
  303. data/spec/models/baas_statement_vo_spec.rb +71 -0
  304. data/spec/models/baas_statements_vo_spec.rb +53 -0
  305. data/spec/models/baas_sub_account_co_spec.rb +41 -0
  306. data/spec/models/baas_sub_account_vo_spec.rb +83 -0
  307. data/spec/models/baas_transactions_vo_spec.rb +65 -0
  308. data/spec/models/balances_spec.rb +65 -0
  309. data/spec/models/bank_credit_spec.rb +95 -0
  310. data/spec/models/bank_link_response_internal_object_vo_spec.rb +53 -0
  311. data/spec/models/bank_link_spec.rb +179 -0
  312. data/spec/models/bank_link_vendor_data_vo_spec.rb +47 -0
  313. data/spec/models/base_response_vo_spec.rb +53 -0
  314. data/spec/models/brokerage_account_co_spec.rb +47 -0
  315. data/spec/models/brokerage_account_vo_spec.rb +65 -0
  316. data/spec/models/brokerage_balance_vo_spec.rb +71 -0
  317. data/spec/models/brokerage_bank_link_co_spec.rb +41 -0
  318. data/spec/models/brokerage_bank_link_vo_spec.rb +71 -0
  319. data/spec/models/brokerage_create_client_co_spec.rb +47 -0
  320. data/spec/models/brokerage_create_client_vo_spec.rb +65 -0
  321. data/spec/models/brokerage_deposit_co_spec.rb +41 -0
  322. data/spec/models/brokerage_deposit_vo_spec.rb +65 -0
  323. data/spec/models/brokerage_document_co_spec.rb +47 -0
  324. data/spec/models/brokerage_document_vo_spec.rb +71 -0
  325. data/spec/models/brokerage_holding_vo_spec.rb +71 -0
  326. data/spec/models/brokerage_order_co_spec.rb +41 -0
  327. data/spec/models/brokerage_order_vo_spec.rb +71 -0
  328. data/spec/models/brokerage_performance_vo_spec.rb +71 -0
  329. data/spec/models/brokerage_securities_vo_spec.rb +65 -0
  330. data/spec/models/brokerage_statement_vo_spec.rb +53 -0
  331. data/spec/models/brokerage_transaction_vo_spec.rb +71 -0
  332. data/spec/models/brokerage_update_client_co_spec.rb +41 -0
  333. data/spec/models/brokerage_update_client_vo_spec.rb +77 -0
  334. data/spec/models/brokerage_withdrawal_co_spec.rb +41 -0
  335. data/spec/models/brokerage_withdrawal_vo_spec.rb +65 -0
  336. data/spec/models/business_address_spec.rb +83 -0
  337. data/spec/models/business_status_response_vo_spec.rb +65 -0
  338. data/spec/models/business_vendor_request_data_vo_spec.rb +125 -0
  339. data/spec/models/card_auto_reload_request_co_spec.rb +59 -0
  340. data/spec/models/card_auto_reload_response_vo_spec.rb +71 -0
  341. data/spec/models/card_balance_response_vo_spec.rb +71 -0
  342. data/spec/models/card_base_request_co_spec.rb +53 -0
  343. data/spec/models/card_business_request_co_spec.rb +41 -0
  344. data/spec/models/card_client_request_co_spec.rb +47 -0
  345. data/spec/models/card_load_request_co_spec.rb +47 -0
  346. data/spec/models/card_load_unload_response_vo_spec.rb +77 -0
  347. data/spec/models/card_pin_request_co_spec.rb +59 -0
  348. data/spec/models/card_replace_response_vo_spec.rb +77 -0
  349. data/spec/models/card_reserve_account_response_vo_spec.rb +77 -0
  350. data/spec/models/card_reserve_transfer_request_co_spec.rb +41 -0
  351. data/spec/models/card_reserve_transfer_response_vo_spec.rb +65 -0
  352. data/spec/models/card_spending_control_request_co_spec.rb +41 -0
  353. data/spec/models/card_spending_control_response_vo_spec.rb +65 -0
  354. data/spec/models/card_token_request_co_spec.rb +63 -0
  355. data/spec/models/card_token_response_vo_spec.rb +87 -0
  356. data/spec/models/card_transaction_response_vo_spec.rb +71 -0
  357. data/spec/models/card_unload_request_co_spec.rb +47 -0
  358. data/spec/models/card_update_pin_request_co_spec.rb +59 -0
  359. data/spec/models/cash_spec.rb +53 -0
  360. data/spec/models/client_address_spec.rb +87 -0
  361. data/spec/models/client_vendor_request_data_vo_spec.rb +143 -0
  362. data/spec/models/contact_address_spec.rb +77 -0
  363. data/spec/models/contact_spec.rb +143 -0
  364. data/spec/models/create_baas_business_co_spec.rb +47 -0
  365. data/spec/models/create_baas_client_co_spec.rb +47 -0
  366. data/spec/models/create_business_response_vo_spec.rb +65 -0
  367. data/spec/models/create_card_client_response_vo_spec.rb +65 -0
  368. data/spec/models/create_user_request_spec.rb +77 -0
  369. data/spec/models/customer_revenue_spec.rb +95 -0
  370. data/spec/models/dividend_spec.rb +53 -0
  371. data/spec/models/dividend_tax_spec.rb +47 -0
  372. data/spec/models/email_click_spec.rb +59 -0
  373. data/spec/models/email_open_spec.rb +53 -0
  374. data/spec/models/email_spec.rb +149 -0
  375. data/spec/models/exchange_public_token_vo_spec.rb +71 -0
  376. data/spec/models/exchange_token_co_spec.rb +77 -0
  377. data/spec/models/financial_statement_spec.rb +137 -0
  378. data/spec/models/get_card_image_response_vo_spec.rb +65 -0
  379. data/spec/models/get_card_pci_details_response_vo_spec.rb +77 -0
  380. data/spec/models/get_card_statement_response_vo_spec.rb +107 -0
  381. data/spec/models/get_card_token_response_vo_spec.rb +87 -0
  382. data/spec/models/get_transactions_response_spec.rb +41 -0
  383. data/spec/models/google_payload_spec.rb +41 -0
  384. data/spec/models/iav_aggregation_response_vo_spec.rb +47 -0
  385. data/spec/models/iav_bank_link_response_vo_spec.rb +47 -0
  386. data/spec/models/iav_request_co_spec.rb +83 -0
  387. data/spec/models/iav_response_vo_spec.rb +53 -0
  388. data/spec/models/iav_token_exchange_vendor_response_vo_spec.rb +35 -0
  389. data/spec/models/iav_vendor_request_co_spec.rb +53 -0
  390. data/spec/models/identification_spec.rb +77 -0
  391. data/spec/models/instrument_spec.rb +53 -0
  392. data/spec/models/investment_spec.rb +89 -0
  393. data/spec/models/invoice_payment_spec.rb +83 -0
  394. data/spec/models/invoice_spec.rb +197 -0
  395. data/spec/models/json_node_spec.rb +35 -0
  396. data/spec/models/kms_config_spec.rb +107 -0
  397. data/spec/models/kyc_request_co_spec.rb +89 -0
  398. data/spec/models/kyc_response_vo_spec.rb +101 -0
  399. data/spec/models/kyc_vendor_request_data_vo_spec.rb +173 -0
  400. data/spec/models/line_items_spec.rb +83 -0
  401. data/spec/models/location_spec.rb +83 -0
  402. data/spec/models/mapstringobject_spec.rb +35 -0
  403. data/spec/models/md_history_item_vo_spec.rb +77 -0
  404. data/spec/models/md_history_request_co_spec.rb +65 -0
  405. data/spec/models/md_history_response_vo_spec.rb +41 -0
  406. data/spec/models/md_quote_item_vo_spec.rb +155 -0
  407. data/spec/models/md_quote_request_co_spec.rb +63 -0
  408. data/spec/models/md_quote_response_vo_spec.rb +41 -0
  409. data/spec/models/merger_acquisition_spec.rb +53 -0
  410. data/spec/models/nucleus_transfer_fields_co_spec.rb +47 -0
  411. data/spec/models/ownership_spec.rb +47 -0
  412. data/spec/models/page_ach_transfer_response_vo_spec.rb +89 -0
  413. data/spec/models/page_kms_config_spec.rb +89 -0
  414. data/spec/models/page_webhook_spec.rb +89 -0
  415. data/spec/models/pageobject_spec.rb +89 -0
  416. data/spec/models/politically_exposed_person_dto_spec.rb +59 -0
  417. data/spec/models/portfolio_asset_size_log_spec.rb +113 -0
  418. data/spec/models/property_value_response_vo_spec.rb +71 -0
  419. data/spec/models/response_entity_spec.rb +57 -0
  420. data/spec/models/rtp_bank_link_request_co_spec.rb +47 -0
  421. data/spec/models/rtp_bank_link_response_vo_spec.rb +77 -0
  422. data/spec/models/rtp_transfer_request_co_spec.rb +47 -0
  423. data/spec/models/rtp_transfer_response_vo_spec.rb +71 -0
  424. data/spec/models/samsung_payload_spec.rb +41 -0
  425. data/spec/models/sms_response_vo_spec.rb +71 -0
  426. data/spec/models/sms_spec.rb +137 -0
  427. data/spec/models/smsvo_spec.rb +65 -0
  428. data/spec/models/smtp_response_vo_spec.rb +71 -0
  429. data/spec/models/smtp_vo_spec.rb +101 -0
  430. data/spec/models/sort_spec.rb +71 -0
  431. data/spec/models/spending_control_vendor_request_data_vo_spec.rb +89 -0
  432. data/spec/models/stat_spec.rb +47 -0
  433. data/spec/models/transaction_spec.rb +167 -0
  434. data/spec/models/update_baas_business_co_spec.rb +41 -0
  435. data/spec/models/update_baas_client_co_spec.rb +41 -0
  436. data/spec/models/update_business_response_vo_spec.rb +65 -0
  437. data/spec/models/update_card_client_response_vo_spec.rb +65 -0
  438. data/spec/models/user_response_interface_spec.rb +35 -0
  439. data/spec/models/user_response_vo_spec.rb +77 -0
  440. data/spec/models/vendor_access_config_vo_spec.rb +53 -0
  441. data/spec/models/webhook_spec.rb +87 -0
  442. data/spec/models/widget_url_vo_spec.rb +47 -0
  443. data/spec/models/wire_bank_link_request_co_spec.rb +47 -0
  444. data/spec/models/wire_bank_link_response_vo_spec.rb +77 -0
  445. data/spec/models/wire_transfer_request_co_spec.rb +47 -0
  446. data/spec/models/wire_transfer_response_vo_spec.rb +71 -0
  447. data/spec/models/zillow_property_vendor_response_vo_spec.rb +65 -0
  448. data/spec/spec_helper.rb +111 -0
  449. metadata +909 -0
@@ -0,0 +1,209 @@
1
+ =begin
2
+ #Hydrogen Integration API
3
+
4
+ #The Hydrogen Integration API
5
+
6
+ OpenAPI spec version: 1.3.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.21
10
+
11
+ =end
12
+
13
+ require 'addressable/uri'
14
+
15
+ module IntegrationApi
16
+ class Configuration
17
+ # Defines url scheme
18
+ attr_accessor :scheme
19
+
20
+ # Defines url host
21
+ attr_accessor :host
22
+
23
+ # Defines url base path
24
+ attr_accessor :base_path
25
+
26
+ # Defines API keys used with API Key authentications.
27
+ #
28
+ # @return [Hash] key: parameter name, value: parameter value (API key)
29
+ #
30
+ # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
31
+ # config.api_key['api_key'] = 'xxx'
32
+ attr_accessor :api_key
33
+
34
+ # Defines API key prefixes used with API Key authentications.
35
+ #
36
+ # @return [Hash] key: parameter name, value: API key prefix
37
+ #
38
+ # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
39
+ # config.api_key_prefix['api_key'] = 'Token'
40
+ attr_accessor :api_key_prefix
41
+
42
+ # Defines the username used with HTTP basic authentication.
43
+ #
44
+ # @return [String]
45
+ attr_accessor :username
46
+
47
+ # Defines the password used with HTTP basic authentication.
48
+ #
49
+ # @return [String]
50
+ attr_accessor :password
51
+
52
+ # Defines the access token (Bearer) used with OAuth2.
53
+ attr_accessor :access_token
54
+
55
+ # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
56
+ # details will be logged with `logger.debug` (see the `logger` attribute).
57
+ # Default to false.
58
+ #
59
+ # @return [true, false]
60
+ attr_accessor :debugging
61
+
62
+ # Defines the logger used for debugging.
63
+ # Default to `Rails.logger` (when in Rails) or logging to STDOUT.
64
+ #
65
+ # @return [#debug]
66
+ attr_accessor :logger
67
+
68
+ # Defines the temporary folder to store downloaded files
69
+ # (for API endpoints that have file response).
70
+ # Default to use `Tempfile`.
71
+ #
72
+ # @return [String]
73
+ attr_accessor :temp_folder_path
74
+
75
+ # The time limit for HTTP request in seconds.
76
+ # Default to 0 (never times out).
77
+ attr_accessor :timeout
78
+
79
+ # Set this to false to skip client side validation in the operation.
80
+ # Default to true.
81
+ # @return [true, false]
82
+ attr_accessor :client_side_validation
83
+
84
+ ### TLS/SSL setting
85
+ # Set this to false to skip verifying SSL certificate when calling API from https server.
86
+ # Default to true.
87
+ #
88
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
89
+ #
90
+ # @return [true, false]
91
+ attr_accessor :verify_ssl
92
+
93
+ ### TLS/SSL setting
94
+ # Set this to false to skip verifying SSL host name
95
+ # Default to true.
96
+ #
97
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
98
+ #
99
+ # @return [true, false]
100
+ attr_accessor :verify_ssl_host
101
+
102
+ ### TLS/SSL setting
103
+ # Set this to customize the certificate file to verify the peer.
104
+ #
105
+ # @return [String] the path to the certificate file
106
+ #
107
+ # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
108
+ # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
109
+ attr_accessor :ssl_ca_cert
110
+
111
+ ### TLS/SSL setting
112
+ # Client certificate file (for client certificate)
113
+ attr_accessor :cert_file
114
+
115
+ ### TLS/SSL setting
116
+ # Client private key file (for client certificate)
117
+ attr_accessor :key_file
118
+
119
+ # Set this to customize parameters encoding of array parameter with multi collectionFormat.
120
+ # Default to nil.
121
+ #
122
+ # @see The params_encoding option of Ethon. Related source code:
123
+ # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
124
+ attr_accessor :params_encoding
125
+
126
+ attr_accessor :inject_format
127
+
128
+ attr_accessor :force_ending_format
129
+
130
+ def initialize
131
+ @scheme = 'https'
132
+ @host = 'api.hydrogenplatform.com'
133
+ @base_path = '/integration/v1'
134
+ @api_key = {}
135
+ @api_key_prefix = {}
136
+ @timeout = 0
137
+ @client_side_validation = true
138
+ @verify_ssl = true
139
+ @verify_ssl_host = true
140
+ @params_encoding = nil
141
+ @cert_file = nil
142
+ @key_file = nil
143
+ @debugging = false
144
+ @inject_format = false
145
+ @force_ending_format = false
146
+ @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
147
+
148
+ yield(self) if block_given?
149
+ end
150
+
151
+ # The default Configuration object.
152
+ def self.default
153
+ @@default ||= Configuration.new
154
+ end
155
+
156
+ def configure
157
+ yield(self) if block_given?
158
+ end
159
+
160
+ def scheme=(scheme)
161
+ # remove :// from scheme
162
+ @scheme = scheme.sub(/:\/\//, '')
163
+ end
164
+
165
+ def host=(host)
166
+ # remove http(s):// and anything after a slash
167
+ @host = host.sub(/https?:\/\//, '').split('/').first
168
+ end
169
+
170
+ def base_path=(base_path)
171
+ # Add leading and trailing slashes to base_path
172
+ @base_path = "/#{base_path}".gsub(/\/+/, '/')
173
+ @base_path = '' if @base_path == '/'
174
+ end
175
+
176
+ def base_url
177
+ url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
178
+ Addressable::URI.encode(url)
179
+ end
180
+
181
+ # Gets API key (with prefix if set).
182
+ # @param [String] param_name the parameter name of API key auth
183
+ def api_key_with_prefix(param_name)
184
+ if @api_key_prefix[param_name]
185
+ "#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
186
+ else
187
+ @api_key[param_name]
188
+ end
189
+ end
190
+
191
+ # Gets Basic Auth token string
192
+ def basic_auth_token
193
+ 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
194
+ end
195
+
196
+ # Returns Auth Settings hash for api client.
197
+ def auth_settings
198
+ {
199
+ 'oauth2' =>
200
+ {
201
+ type: 'oauth2',
202
+ in: 'header',
203
+ key: 'Authorization',
204
+ value: "Bearer #{access_token}"
205
+ },
206
+ }
207
+ end
208
+ end
209
+ end
@@ -0,0 +1,26 @@
1
+
2
+ require 'uri'
3
+
4
+ module IntegrationApi
5
+ class Environment
6
+ attr_accessor :api_client
7
+ attr_accessor :auth_config
8
+ attr_accessor :SANDBOX
9
+ attr_accessor :PRODUCTION
10
+ def initialize(api_client = ApiClient.default, config = Configuration.default, auth_config = AuthConfiguration.default)
11
+ @api_client = api_client
12
+ @config = config
13
+ @auth_config = auth_config
14
+ @SANDBOX = 'sandbox.hydrogenplatform.com'
15
+ @PRODUCTION = 'api.hydrogenplatform.com'
16
+ end
17
+
18
+ def set_environment(host)
19
+ if (host)
20
+ @config.config.host=host
21
+ @api_client.config.host=host
22
+ @auth_config.set_base_url(host)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,200 @@
1
+ =begin
2
+ #Hydrogen Integration API
3
+
4
+ #The Hydrogen Integration API
5
+
6
+ OpenAPI spec version: 1.3.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.21
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module IntegrationApi
16
+ class AccountingCustomerResponseVO
17
+ attr_accessor :body
18
+
19
+ attr_accessor :message
20
+
21
+ attr_accessor :status_code
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'body' => :'body',
27
+ :'message' => :'message',
28
+ :'status_code' => :'status_code'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'body' => :'Contact',
36
+ :'message' => :'String',
37
+ :'status_code' => :'Integer'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
+
49
+ if attributes.has_key?(:'body')
50
+ self.body = attributes[:'body']
51
+ end
52
+
53
+ if attributes.has_key?(:'message')
54
+ self.message = attributes[:'message']
55
+ end
56
+
57
+ if attributes.has_key?(:'status_code')
58
+ self.status_code = attributes[:'status_code']
59
+ end
60
+ end
61
+
62
+ # Show invalid properties with the reasons. Usually used together with valid?
63
+ # @return Array for valid properties with the reasons
64
+ def list_invalid_properties
65
+ invalid_properties = Array.new
66
+ invalid_properties
67
+ end
68
+
69
+ # Check to see if the all the properties in the model are valid
70
+ # @return true if the model is valid
71
+ def valid?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ body == o.body &&
81
+ message == o.message &&
82
+ status_code == o.status_code
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Fixnum] Hash code
93
+ def hash
94
+ [body, message, status_code].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def build_from_hash(attributes)
101
+ self.class.swagger_types.each_pair do |key, type|
102
+ if type =~ /\AArray<(.*)>/i
103
+ # check to ensure the input is an array given that the attribute
104
+ # is documented as an array but the input is not
105
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
106
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
107
+ end
108
+ elsif !attributes[self.class.attribute_map[key]].nil?
109
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
110
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ # Deserializes the data based on type
117
+ # @param string type Data type
118
+ # @param string value Value to be deserialized
119
+ # @return [Object] Deserialized data
120
+ def _deserialize(type, value)
121
+ case type.to_sym
122
+ when :DateTime
123
+ value
124
+ when :Date
125
+ value
126
+ when :String
127
+ value.to_s
128
+ when :Integer
129
+ value.to_i
130
+ when :Float
131
+ value.to_f
132
+ when :BOOLEAN
133
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
134
+ true
135
+ else
136
+ false
137
+ end
138
+ when :Object
139
+ # generic object (usually a Hash), return directly
140
+ value
141
+ when /\AArray<(?<inner_type>.+)>\z/
142
+ inner_type = Regexp.last_match[:inner_type]
143
+ value.map { |v| _deserialize(inner_type, v) }
144
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
145
+ k_type = Regexp.last_match[:k_type]
146
+ v_type = Regexp.last_match[:v_type]
147
+ {}.tap do |hash|
148
+ value.each do |k, v|
149
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
150
+ end
151
+ end
152
+ else # model
153
+ temp_model = IntegrationApi.const_get(type).new
154
+ temp_model.build_from_hash(value)
155
+ end
156
+ end
157
+
158
+ # Returns the string representation of the object
159
+ # @return [String] String presentation of the object
160
+ def to_s
161
+ to_hash.to_s
162
+ end
163
+
164
+ # to_body is an alias to to_hash (backward compatibility)
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_body
167
+ to_hash
168
+ end
169
+
170
+ # Returns the object in the form of hash
171
+ # @return [Hash] Returns the object in the form of hash
172
+ def to_hash
173
+ hash = {}
174
+ self.class.attribute_map.each_pair do |attr, param|
175
+ value = self.send(attr)
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ # Outputs non-array value in the form of hash
182
+ # For object, use to_hash. Otherwise, just return the value
183
+ # @param [Object] value Any valid value
184
+ # @return [Hash] Returns the value in the form of hash
185
+ def _to_hash(value)
186
+ if value.is_a?(Array)
187
+ value.compact.map { |v| _to_hash(v) }
188
+ elsif value.is_a?(Hash)
189
+ {}.tap do |hash|
190
+ value.each { |k, v| hash[k] = _to_hash(v) }
191
+ end
192
+ elsif value.respond_to? :to_hash
193
+ value.to_hash
194
+ else
195
+ value
196
+ end
197
+ end
198
+
199
+ end
200
+ end
@@ -0,0 +1,199 @@
1
+ =begin
2
+ #Hydrogen Integration API
3
+
4
+ #The Hydrogen Integration API
5
+
6
+ OpenAPI spec version: 1.3.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.21
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module IntegrationApi
16
+ class AccountingCustomerRevenueResponseVO
17
+ attr_accessor :body
18
+
19
+ attr_accessor :message
20
+
21
+ attr_accessor :status_code
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'body' => :'body',
27
+ :'message' => :'message',
28
+ :'status_code' => :'status_code'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'body' => :'CustomerRevenue',
36
+ :'message' => :'String',
37
+ :'status_code' => :'Integer'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
+
49
+ if attributes.has_key?(:'body')
50
+ self.body = attributes[:'body']
51
+ end
52
+
53
+ if attributes.has_key?(:'message')
54
+ self.message = attributes[:'message']
55
+ end
56
+
57
+ if attributes.has_key?(:'status_code')
58
+ self.status_code = attributes[:'status_code']
59
+ end
60
+ end
61
+
62
+ # Show invalid properties with the reasons. Usually used together with valid?
63
+ # @return Array for valid properties with the reasons
64
+ def list_invalid_properties
65
+ invalid_properties = Array.new
66
+ invalid_properties
67
+ end
68
+
69
+ # Check to see if the all the properties in the model are valid
70
+ # @return true if the model is valid
71
+ def valid?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ body == o.body &&
81
+ message == o.message &&
82
+ status_code == o.status_code
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Fixnum] Hash code
93
+ def hash
94
+ [body, message, status_code].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def build_from_hash(attributes)
101
+ self.class.swagger_types.each_pair do |key, type|
102
+ if type =~ /\AArray<(.*)>/i
103
+ # check to ensure the input is an array given that the attribute
104
+ # is documented as an array but the input is not
105
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
106
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
107
+ end
108
+ elsif !attributes[self.class.attribute_map[key]].nil?
109
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
110
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ # Deserializes the data based on type
117
+ # @param string type Data type
118
+ # @param string value Value to be deserialized
119
+ # @return [Object] Deserialized data
120
+ def _deserialize(type, value)
121
+ case type.to_sym
122
+ when :DateTime
123
+ value
124
+ when :Date
125
+ value
126
+ when :String
127
+ value.to_s
128
+ when :Integer
129
+ value.to_i
130
+ when :Float
131
+ value.to_f
132
+ when :BOOLEAN
133
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
134
+ true
135
+ else
136
+ false
137
+ end
138
+ when :Object
139
+ # generic object (usually a Hash), return directly
140
+ value
141
+ when /\AArray<(?<inner_type>.+)>\z/
142
+ inner_type = Regexp.last_match[:inner_type]
143
+ value.map { |v| _deserialize(inner_type, v) }
144
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
145
+ k_type = Regexp.last_match[:k_type]
146
+ v_type = Regexp.last_match[:v_type]
147
+ {}.tap do |hash|
148
+ value.each do |k, v|
149
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
150
+ end
151
+ end
152
+ else # model
153
+ temp_model = IntegrationApi.const_get(type).new
154
+ temp_model.build_from_hash(value)
155
+ end
156
+ end
157
+ # Returns the string representation of the object
158
+ # @return [String] String presentation of the object
159
+ def to_s
160
+ to_hash.to_s
161
+ end
162
+
163
+ # to_body is an alias to to_hash (backward compatibility)
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_body
166
+ to_hash
167
+ end
168
+
169
+ # Returns the object in the form of hash
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_hash
172
+ hash = {}
173
+ self.class.attribute_map.each_pair do |attr, param|
174
+ value = self.send(attr)
175
+ hash[param] = _to_hash(value)
176
+ end
177
+ hash
178
+ end
179
+
180
+ # Outputs non-array value in the form of hash
181
+ # For object, use to_hash. Otherwise, just return the value
182
+ # @param [Object] value Any valid value
183
+ # @return [Hash] Returns the value in the form of hash
184
+ def _to_hash(value)
185
+ if value.is_a?(Array)
186
+ value.compact.map { |v| _to_hash(v) }
187
+ elsif value.is_a?(Hash)
188
+ {}.tap do |hash|
189
+ value.each { |k, v| hash[k] = _to_hash(v) }
190
+ end
191
+ elsif value.respond_to? :to_hash
192
+ value.to_hash
193
+ else
194
+ value
195
+ end
196
+ end
197
+
198
+ end
199
+ end