fuse_client 0.3.1 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/{fuse-ruby-openapi/Gemfile → Gemfile} +0 -0
  3. data/Gemfile.lock +70 -0
  4. data/LICENSE +21 -0
  5. data/README.md +1 -0
  6. data/{fuse-ruby-openapi/Rakefile → Rakefile} +0 -0
  7. data/docs/Aggregator.md +15 -0
  8. data/{fuse-ruby-openapi/docs → docs}/CreateAssetReportRequest.md +3 -1
  9. data/{fuse-ruby-openapi/docs → docs}/CreateAssetReportResponse.md +0 -0
  10. data/docs/CreateEntityRequest.md +24 -0
  11. data/docs/CreateEntityResponse.md +24 -0
  12. data/{fuse-ruby-openapi/docs → docs}/CreateLinkTokenRequest.md +5 -5
  13. data/{fuse-ruby-openapi/docs → docs}/CreateLinkTokenRequestMx.md +1 -1
  14. data/docs/CreateLinkTokenRequestPlaid.md +18 -0
  15. data/{fuse-ruby-openapi/docs → docs}/CreateLinkTokenResponse.md +0 -0
  16. data/docs/CreateSessionRequest.md +20 -0
  17. data/{fuse-ruby-openapi/docs → docs}/CreateSessionResponse.md +0 -0
  18. data/{fuse-ruby-openapi/docs → docs}/ExchangeFinancialConnectionsPublicTokenRequest.md +0 -0
  19. data/{fuse-ruby-openapi/docs → docs}/ExchangeFinancialConnectionsPublicTokenResponse.md +0 -0
  20. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsAccount.md +0 -0
  21. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsAccountBalance.md +0 -0
  22. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsAccountDetails.md +1 -3
  23. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsAccountDetailsAch.md +0 -0
  24. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsAccountInstitution.md +0 -0
  25. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsAccountLiability.md +0 -0
  26. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsAccountLiabilityAllOf.md +0 -0
  27. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsAccountLiabilityAllOfAprs.md +0 -0
  28. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsHolding.md +2 -0
  29. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsInvestmentAccount.md +0 -0
  30. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsInvestmentSecurity.md +0 -0
  31. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsInvestmentTransaction.md +0 -0
  32. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsInvestmentTransactionDataInner.md +0 -0
  33. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsOwner.md +0 -0
  34. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsOwnerAddressesInner.md +0 -0
  35. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsOwnerAddressesInnerData.md +0 -0
  36. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsOwnerEmailsInner.md +0 -0
  37. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsOwnerNamesInner.md +0 -0
  38. data/{fuse-ruby-openapi/docs → docs}/FinancialConnectionsOwnerPhoneNumbersInner.md +0 -0
  39. data/{fuse-ruby-openapi/docs → docs}/FuseApi.md +307 -1
  40. data/{fuse-ruby-openapi/docs → docs}/FuseApiError.md +0 -0
  41. data/{fuse-ruby-openapi/docs → docs}/FuseApiErrorData.md +0 -0
  42. data/{fuse-ruby-openapi/docs → docs}/FuseApiWarning.md +0 -0
  43. data/{fuse-ruby-openapi/docs → docs}/FuseApiWarningData.md +0 -0
  44. data/{fuse-ruby-openapi/docs → docs}/GetAssetReportRequest.md +0 -0
  45. data/{fuse-ruby-openapi/docs → docs}/GetAssetReportResponse.md +0 -0
  46. data/{fuse-ruby-openapi/docs → docs}/GetAssetReportResponseReport.md +0 -0
  47. data/{fuse-ruby-openapi/docs → docs}/GetAssetReportResponseReportAccountsInner.md +0 -0
  48. data/{fuse-ruby-openapi/docs → docs}/GetAssetReportResponseReportAccountsInnerBalances.md +0 -0
  49. data/{fuse-ruby-openapi/docs → docs}/GetAssetReportResponseReportAccountsInnerHistoricalBalancesInner.md +0 -0
  50. data/docs/GetEntityResponse.md +24 -0
  51. data/{fuse-ruby-openapi/docs → docs}/GetFinancialConnectionsAccountBalanceResponse.md +0 -0
  52. data/{fuse-ruby-openapi/docs → docs}/GetFinancialConnectionsAccountDetailsRequest.md +0 -0
  53. data/{fuse-ruby-openapi/docs → docs}/GetFinancialConnectionsAccountDetailsResponse.md +0 -0
  54. data/{fuse-ruby-openapi/docs → docs}/GetFinancialConnectionsAccountsRequest.md +0 -0
  55. data/{fuse-ruby-openapi/docs → docs}/GetFinancialConnectionsAccountsResponse.md +0 -0
  56. data/{fuse-ruby-openapi/docs → docs}/GetFinancialConnectionsBalanceRequest.md +0 -0
  57. data/{fuse-ruby-openapi/docs → docs}/GetFinancialConnectionsOwnersRequest.md +0 -0
  58. data/{fuse-ruby-openapi/docs → docs}/GetFinancialConnectionsOwnersResponse.md +0 -0
  59. data/{fuse-ruby-openapi/docs → docs}/GetFinancialConnectionsOwnersResponseAccountsInner.md +0 -0
  60. data/{fuse-ruby-openapi/docs → docs}/GetInvestmentHoldingsRequest.md +3 -1
  61. data/{fuse-ruby-openapi/docs → docs}/GetInvestmentHoldingsResponse.md +1 -3
  62. data/{fuse-ruby-openapi/docs → docs}/GetInvestmentTransactionsRequest.md +0 -0
  63. data/{fuse-ruby-openapi/docs → docs}/GetInvestmentTransactionsResponse.md +1 -3
  64. data/{fuse-ruby-openapi/docs → docs}/GetLiabilitiesRequest.md +0 -0
  65. data/{fuse-ruby-openapi/docs → docs}/GetLiabilitiesResponse.md +1 -3
  66. data/{fuse-ruby-openapi/docs → docs}/GetTransactionsRequest.md +0 -0
  67. data/{fuse-ruby-openapi/docs → docs}/GetTransactionsResponse.md +0 -0
  68. data/{fuse-ruby-openapi/docs → docs}/GetTransactionsResponseDataInner.md +1 -3
  69. data/{fuse-ruby-openapi/docs → docs}/GetTransactionsResponseDataInnerMerchant.md +0 -0
  70. data/docs/Product.md +15 -0
  71. data/docs/RefreshAssetReportRequest.md +22 -0
  72. data/{fuse-ruby-openapi/docs → docs}/SyncFinancialConnectionsDataResponse.md +0 -0
  73. data/{fuse-ruby-openapi/docs → docs}/SyncTransactionsRequest.md +0 -0
  74. data/{fuse-ruby-openapi/docs → docs}/SyncTransactionsResponse.md +0 -0
  75. data/{fuse-ruby-openapi/docs → docs}/SyncTransactionsResponseRemovedInner.md +0 -0
  76. data/{fuse-ruby-openapi/docs → docs}/TransactionCommonModel.md +0 -0
  77. data/docs/UpdateEntityRequest.md +22 -0
  78. data/docs/UpdateEntityResponse.md +24 -0
  79. data/{fuse-ruby-openapi/fuse_client.gemspec → fuse_client.gemspec} +0 -0
  80. data/{fuse-ruby-openapi/git_push.sh → git_push.sh} +0 -0
  81. data/{fuse-ruby-openapi/lib → lib}/fuse_client/api/fuse_api.rb +261 -0
  82. data/{fuse-ruby-openapi/lib → lib}/fuse_client/api_client.rb +0 -0
  83. data/{fuse-ruby-openapi/lib → lib}/fuse_client/api_error.rb +0 -0
  84. data/{fuse-ruby-openapi/lib → lib}/fuse_client/configuration.rb +2 -2
  85. data/lib/fuse_client/models/aggregator.rb +42 -0
  86. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/create_asset_report_request.rb +16 -4
  87. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/create_asset_report_response.rb +0 -0
  88. data/lib/fuse_client/models/create_entity_request.rb +268 -0
  89. data/lib/fuse_client/models/create_entity_response.rb +268 -0
  90. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/create_link_token_request.rb +21 -20
  91. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/create_link_token_request_mx.rb +1 -1
  92. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/create_link_token_request_plaid.rb +3 -2
  93. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/create_link_token_response.rb +0 -0
  94. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/create_session_request.rb +36 -39
  95. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/create_session_response.rb +0 -0
  96. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/exchange_financial_connections_public_token_request.rb +0 -0
  97. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/exchange_financial_connections_public_token_response.rb +0 -0
  98. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_account.rb +0 -0
  99. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_account_balance.rb +0 -0
  100. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_account_details.rb +4 -14
  101. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_account_details_ach.rb +0 -0
  102. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_account_institution.rb +0 -0
  103. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_account_liability.rb +0 -0
  104. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_account_liability_all_of.rb +0 -0
  105. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_account_liability_all_of_aprs.rb +0 -0
  106. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_holding.rb +11 -1
  107. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_investment_account.rb +0 -0
  108. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_investment_security.rb +0 -0
  109. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_investment_transaction.rb +0 -0
  110. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_investment_transaction_data_inner.rb +0 -0
  111. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_owner.rb +0 -0
  112. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_owner_addresses_inner.rb +0 -0
  113. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_owner_addresses_inner_data.rb +0 -0
  114. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_owner_emails_inner.rb +0 -0
  115. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_owner_names_inner.rb +0 -0
  116. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/financial_connections_owner_phone_numbers_inner.rb +0 -0
  117. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/fuse_api_error.rb +0 -0
  118. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/fuse_api_error_data.rb +0 -0
  119. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/fuse_api_warning.rb +0 -0
  120. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/fuse_api_warning_data.rb +0 -0
  121. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_asset_report_request.rb +0 -0
  122. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_asset_report_response.rb +0 -0
  123. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_asset_report_response_report.rb +0 -0
  124. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_asset_report_response_report_accounts_inner.rb +0 -0
  125. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_asset_report_response_report_accounts_inner_balances.rb +0 -0
  126. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_asset_report_response_report_accounts_inner_historical_balances_inner.rb +0 -0
  127. data/lib/fuse_client/models/get_entity_response.rb +268 -0
  128. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_financial_connections_account_balance_response.rb +0 -0
  129. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_financial_connections_account_details_request.rb +0 -0
  130. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_financial_connections_account_details_response.rb +0 -0
  131. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_financial_connections_accounts_request.rb +0 -0
  132. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_financial_connections_accounts_response.rb +0 -0
  133. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_financial_connections_balance_request.rb +0 -0
  134. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_financial_connections_owners_request.rb +0 -0
  135. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_financial_connections_owners_response.rb +0 -0
  136. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_financial_connections_owners_response_accounts_inner.rb +0 -0
  137. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_investment_holdings_request.rb +14 -4
  138. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_investment_holdings_response.rb +4 -14
  139. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_investment_transactions_request.rb +0 -0
  140. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_investment_transactions_response.rb +4 -14
  141. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_liabilities_request.rb +0 -0
  142. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_liabilities_response.rb +4 -14
  143. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_transactions_request.rb +0 -0
  144. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_transactions_response.rb +0 -0
  145. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_transactions_response_data_inner.rb +4 -14
  146. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/get_transactions_response_data_inner_merchant.rb +0 -0
  147. data/lib/fuse_client/models/product.rb +44 -0
  148. data/lib/fuse_client/models/refresh_asset_report_request.rb +275 -0
  149. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/sync_financial_connections_data_response.rb +0 -0
  150. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/sync_transactions_request.rb +0 -0
  151. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/sync_transactions_response.rb +0 -0
  152. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/sync_transactions_response_removed_inner.rb +0 -0
  153. data/{fuse-ruby-openapi/lib → lib}/fuse_client/models/transaction_common_model.rb +0 -0
  154. data/{fuse-ruby-openapi/lib/fuse_client/models/create_session_request_plaid.rb → lib/fuse_client/models/update_entity_request.rb} +41 -21
  155. data/lib/fuse_client/models/update_entity_response.rb +268 -0
  156. data/{fuse-ruby-openapi/lib → lib}/fuse_client/version.rb +1 -1
  157. data/{fuse-ruby-openapi/lib → lib}/fuse_client.rb +8 -3
  158. data/{fuse-ruby-openapi/spec → spec}/api/fuse_api_spec.rb +45 -0
  159. data/{fuse-ruby-openapi/spec → spec}/api_client_spec.rb +0 -0
  160. data/{fuse-ruby-openapi/spec → spec}/configuration_spec.rb +3 -3
  161. data/spec/models/aggregator_spec.rb +28 -0
  162. data/{fuse-ruby-openapi/spec → spec}/models/create_asset_report_request_spec.rb +6 -0
  163. data/{fuse-ruby-openapi/spec → spec}/models/create_asset_report_response_spec.rb +0 -0
  164. data/{fuse-ruby-openapi/spec/models/create_session_request_mx_spec.rb → spec/models/create_entity_request_spec.rb} +10 -10
  165. data/spec/models/create_entity_response_spec.rb +52 -0
  166. data/{fuse-ruby-openapi/spec → spec}/models/create_link_token_request_mx_spec.rb +0 -0
  167. data/{fuse-ruby-openapi/spec → spec}/models/create_link_token_request_plaid_spec.rb +0 -0
  168. data/{fuse-ruby-openapi/spec → spec}/models/create_link_token_request_spec.rb +5 -5
  169. data/{fuse-ruby-openapi/spec → spec}/models/create_link_token_response_spec.rb +0 -0
  170. data/{fuse-ruby-openapi/spec → spec}/models/create_session_request_spec.rb +1 -11
  171. data/{fuse-ruby-openapi/spec → spec}/models/create_session_response_spec.rb +0 -0
  172. data/{fuse-ruby-openapi/spec → spec}/models/exchange_financial_connections_public_token_request_spec.rb +0 -0
  173. data/{fuse-ruby-openapi/spec → spec}/models/exchange_financial_connections_public_token_response_spec.rb +0 -0
  174. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_account_balance_spec.rb +0 -0
  175. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_account_details_ach_spec.rb +0 -0
  176. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_account_details_spec.rb +0 -6
  177. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_account_institution_spec.rb +0 -0
  178. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_account_liability_all_of_aprs_spec.rb +0 -0
  179. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_account_liability_all_of_spec.rb +0 -0
  180. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_account_liability_spec.rb +0 -0
  181. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_account_spec.rb +0 -0
  182. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_holding_spec.rb +6 -0
  183. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_investment_account_spec.rb +0 -0
  184. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_investment_security_spec.rb +0 -0
  185. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_investment_transaction_data_inner_spec.rb +0 -0
  186. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_investment_transaction_spec.rb +0 -0
  187. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_owner_addresses_inner_data_spec.rb +0 -0
  188. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_owner_addresses_inner_spec.rb +0 -0
  189. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_owner_emails_inner_spec.rb +0 -0
  190. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_owner_names_inner_spec.rb +0 -0
  191. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_owner_phone_numbers_inner_spec.rb +0 -0
  192. data/{fuse-ruby-openapi/spec → spec}/models/financial_connections_owner_spec.rb +0 -0
  193. data/{fuse-ruby-openapi/spec → spec}/models/fuse_api_error_data_spec.rb +0 -0
  194. data/{fuse-ruby-openapi/spec → spec}/models/fuse_api_error_spec.rb +0 -0
  195. data/{fuse-ruby-openapi/spec → spec}/models/fuse_api_warning_data_spec.rb +0 -0
  196. data/{fuse-ruby-openapi/spec → spec}/models/fuse_api_warning_spec.rb +0 -0
  197. data/{fuse-ruby-openapi/spec → spec}/models/get_asset_report_request_spec.rb +0 -0
  198. data/{fuse-ruby-openapi/spec → spec}/models/get_asset_report_response_report_accounts_inner_balances_spec.rb +0 -0
  199. data/{fuse-ruby-openapi/spec → spec}/models/get_asset_report_response_report_accounts_inner_historical_balances_inner_spec.rb +0 -0
  200. data/{fuse-ruby-openapi/spec → spec}/models/get_asset_report_response_report_accounts_inner_spec.rb +0 -0
  201. data/{fuse-ruby-openapi/spec → spec}/models/get_asset_report_response_report_spec.rb +0 -0
  202. data/{fuse-ruby-openapi/spec → spec}/models/get_asset_report_response_spec.rb +0 -0
  203. data/spec/models/get_entity_response_spec.rb +52 -0
  204. data/{fuse-ruby-openapi/spec → spec}/models/get_financial_connections_account_balance_response_spec.rb +0 -0
  205. data/{fuse-ruby-openapi/spec → spec}/models/get_financial_connections_account_details_request_spec.rb +0 -0
  206. data/{fuse-ruby-openapi/spec → spec}/models/get_financial_connections_account_details_response_spec.rb +0 -0
  207. data/{fuse-ruby-openapi/spec → spec}/models/get_financial_connections_accounts_request_spec.rb +0 -0
  208. data/{fuse-ruby-openapi/spec → spec}/models/get_financial_connections_accounts_response_spec.rb +0 -0
  209. data/{fuse-ruby-openapi/spec → spec}/models/get_financial_connections_balance_request_spec.rb +0 -0
  210. data/{fuse-ruby-openapi/spec → spec}/models/get_financial_connections_owners_request_spec.rb +0 -0
  211. data/{fuse-ruby-openapi/spec → spec}/models/get_financial_connections_owners_response_accounts_inner_spec.rb +0 -0
  212. data/{fuse-ruby-openapi/spec → spec}/models/get_financial_connections_owners_response_spec.rb +0 -0
  213. data/{fuse-ruby-openapi/spec → spec}/models/get_investment_holdings_request_spec.rb +6 -0
  214. data/{fuse-ruby-openapi/spec → spec}/models/get_investment_holdings_response_spec.rb +0 -6
  215. data/{fuse-ruby-openapi/spec → spec}/models/get_investment_transactions_request_spec.rb +0 -0
  216. data/{fuse-ruby-openapi/spec → spec}/models/get_investment_transactions_response_spec.rb +0 -6
  217. data/{fuse-ruby-openapi/spec → spec}/models/get_liabilities_request_spec.rb +0 -0
  218. data/{fuse-ruby-openapi/spec → spec}/models/get_liabilities_response_spec.rb +0 -6
  219. data/{fuse-ruby-openapi/spec → spec}/models/get_transactions_request_spec.rb +0 -0
  220. data/{fuse-ruby-openapi/spec → spec}/models/get_transactions_response_data_inner_merchant_spec.rb +0 -0
  221. data/{fuse-ruby-openapi/spec → spec}/models/get_transactions_response_data_inner_spec.rb +0 -6
  222. data/{fuse-ruby-openapi/spec → spec}/models/get_transactions_response_spec.rb +0 -0
  223. data/spec/models/product_spec.rb +28 -0
  224. data/spec/models/refresh_asset_report_request_spec.rb +46 -0
  225. data/{fuse-ruby-openapi/spec → spec}/models/sync_financial_connections_data_response_spec.rb +0 -0
  226. data/{fuse-ruby-openapi/spec → spec}/models/sync_transactions_request_spec.rb +0 -0
  227. data/{fuse-ruby-openapi/spec → spec}/models/sync_transactions_response_removed_inner_spec.rb +0 -0
  228. data/{fuse-ruby-openapi/spec → spec}/models/sync_transactions_response_spec.rb +0 -0
  229. data/{fuse-ruby-openapi/spec → spec}/models/transaction_common_model_spec.rb +0 -0
  230. data/spec/models/update_entity_request_spec.rb +46 -0
  231. data/spec/models/update_entity_response_spec.rb +52 -0
  232. data/{fuse-ruby-openapi/spec → spec}/spec_helper.rb +0 -0
  233. metadata +309 -228
  234. data/2023-01-25.json +0 -1736
  235. data/fuse-ruby-openapi/.gitignore +0 -39
  236. data/fuse-ruby-openapi/.gitlab-ci.yml +0 -26
  237. data/fuse-ruby-openapi/.openapi-generator/FILES +0 -220
  238. data/fuse-ruby-openapi/.openapi-generator/VERSION +0 -1
  239. data/fuse-ruby-openapi/.openapi-generator-ignore +0 -23
  240. data/fuse-ruby-openapi/.rspec +0 -2
  241. data/fuse-ruby-openapi/.rubocop.yml +0 -148
  242. data/fuse-ruby-openapi/.travis.yml +0 -14
  243. data/fuse-ruby-openapi/README.md +0 -258
  244. data/fuse-ruby-openapi/docs/CreateLinkTokenRequestPlaid.md +0 -18
  245. data/fuse-ruby-openapi/docs/CreateLinkTokenRequestPlaidConfig.md +0 -18
  246. data/fuse-ruby-openapi/docs/CreateSessionRequest.md +0 -22
  247. data/fuse-ruby-openapi/docs/CreateSessionRequestMx.md +0 -24
  248. data/fuse-ruby-openapi/docs/CreateSessionRequestPlaid.md +0 -18
  249. data/fuse-ruby-openapi/lib/fuse_client/models/create_link_token_request_plaid_config.rb +0 -225
  250. data/fuse-ruby-openapi/lib/fuse_client/models/create_session_request_mx.rb +0 -247
  251. data/fuse-ruby-openapi/spec/models/create_link_token_request_plaid_config_spec.rb +0 -34
  252. data/fuse-ruby-openapi/spec/models/create_session_request_plaid_spec.rb +0 -34
  253. data/fuse_client-0.3.0.gem +0 -0
  254. data/generate-fuse-openapi-spec.js +0 -136
@@ -81,6 +81,72 @@ module FuseClient
81
81
  return data, status_code, headers
82
82
  end
83
83
 
84
+ # Create entity
85
+ # @param create_entity_request [CreateEntityRequest]
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [CreateEntityResponse]
88
+ def create_entity(create_entity_request, opts = {})
89
+ data, _status_code, _headers = create_entity_with_http_info(create_entity_request, opts)
90
+ data
91
+ end
92
+
93
+ # Create entity
94
+ # @param create_entity_request [CreateEntityRequest]
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [Array<(CreateEntityResponse, Integer, Hash)>] CreateEntityResponse data, response status code and response headers
97
+ def create_entity_with_http_info(create_entity_request, opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: FuseApi.create_entity ...'
100
+ end
101
+ # verify the required parameter 'create_entity_request' is set
102
+ if @api_client.config.client_side_validation && create_entity_request.nil?
103
+ fail ArgumentError, "Missing the required parameter 'create_entity_request' when calling FuseApi.create_entity"
104
+ end
105
+ # resource path
106
+ local_var_path = '/v1/entities'
107
+
108
+ # query parameters
109
+ query_params = opts[:query_params] || {}
110
+
111
+ # header parameters
112
+ header_params = opts[:header_params] || {}
113
+ # HTTP header 'Accept' (if needed)
114
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
115
+ # HTTP header 'Content-Type'
116
+ content_type = @api_client.select_header_content_type(['application/json'])
117
+ if !content_type.nil?
118
+ header_params['Content-Type'] = content_type
119
+ end
120
+
121
+ # form parameters
122
+ form_params = opts[:form_params] || {}
123
+
124
+ # http body (model)
125
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_entity_request)
126
+
127
+ # return_type
128
+ return_type = opts[:debug_return_type] || 'CreateEntityResponse'
129
+
130
+ # auth_names
131
+ auth_names = opts[:debug_auth_names] || ['fuseApiKey', 'fuseClientId']
132
+
133
+ new_options = opts.merge(
134
+ :operation => :"FuseApi.create_entity",
135
+ :header_params => header_params,
136
+ :query_params => query_params,
137
+ :form_params => form_params,
138
+ :body => post_body,
139
+ :auth_names => auth_names,
140
+ :return_type => return_type
141
+ )
142
+
143
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
144
+ if @api_client.config.debugging
145
+ @api_client.config.logger.debug "API called: FuseApi#create_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
+ end
147
+ return data, status_code, headers
148
+ end
149
+
84
150
  # Create a link token to start the process of a user connecting to a specific financial institution.
85
151
  # @param [Hash] opts the optional parameters
86
152
  # @option opts [CreateLinkTokenRequest] :create_link_token_request
@@ -329,6 +395,67 @@ module FuseClient
329
395
  return data, status_code, headers
330
396
  end
331
397
 
398
+ # Get entity
399
+ # @param entity_id [String]
400
+ # @param [Hash] opts the optional parameters
401
+ # @return [GetEntityResponse]
402
+ def get_entity(entity_id, opts = {})
403
+ data, _status_code, _headers = get_entity_with_http_info(entity_id, opts)
404
+ data
405
+ end
406
+
407
+ # Get entity
408
+ # @param entity_id [String]
409
+ # @param [Hash] opts the optional parameters
410
+ # @return [Array<(GetEntityResponse, Integer, Hash)>] GetEntityResponse data, response status code and response headers
411
+ def get_entity_with_http_info(entity_id, opts = {})
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug 'Calling API: FuseApi.get_entity ...'
414
+ end
415
+ # verify the required parameter 'entity_id' is set
416
+ if @api_client.config.client_side_validation && entity_id.nil?
417
+ fail ArgumentError, "Missing the required parameter 'entity_id' when calling FuseApi.get_entity"
418
+ end
419
+ # resource path
420
+ local_var_path = '/v1/entities/{entity_id}'.sub('{' + 'entity_id' + '}', CGI.escape(entity_id.to_s))
421
+
422
+ # query parameters
423
+ query_params = opts[:query_params] || {}
424
+
425
+ # header parameters
426
+ header_params = opts[:header_params] || {}
427
+ # HTTP header 'Accept' (if needed)
428
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
429
+
430
+ # form parameters
431
+ form_params = opts[:form_params] || {}
432
+
433
+ # http body (model)
434
+ post_body = opts[:debug_body]
435
+
436
+ # return_type
437
+ return_type = opts[:debug_return_type] || 'GetEntityResponse'
438
+
439
+ # auth_names
440
+ auth_names = opts[:debug_auth_names] || ['fuseApiKey', 'fuseClientId']
441
+
442
+ new_options = opts.merge(
443
+ :operation => :"FuseApi.get_entity",
444
+ :header_params => header_params,
445
+ :query_params => query_params,
446
+ :form_params => form_params,
447
+ :body => post_body,
448
+ :auth_names => auth_names,
449
+ :return_type => return_type
450
+ )
451
+
452
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
453
+ if @api_client.config.debugging
454
+ @api_client.config.logger.debug "API called: FuseApi#get_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
455
+ end
456
+ return data, status_code, headers
457
+ end
458
+
332
459
  # Get account details
333
460
  # @param get_financial_connections_account_details_request [GetFinancialConnectionsAccountDetailsRequest]
334
461
  # @param [Hash] opts the optional parameters
@@ -791,6 +918,68 @@ module FuseClient
791
918
  return data, status_code, headers
792
919
  end
793
920
 
921
+ # Refreshes the Asset Report in JSON format.
922
+ # @param [Hash] opts the optional parameters
923
+ # @option opts [RefreshAssetReportRequest] :refresh_asset_report_request
924
+ # @return [CreateAssetReportResponse]
925
+ def refresh_asset_report(opts = {})
926
+ data, _status_code, _headers = refresh_asset_report_with_http_info(opts)
927
+ data
928
+ end
929
+
930
+ # Refreshes the Asset Report in JSON format.
931
+ # @param [Hash] opts the optional parameters
932
+ # @option opts [RefreshAssetReportRequest] :refresh_asset_report_request
933
+ # @return [Array<(CreateAssetReportResponse, Integer, Hash)>] CreateAssetReportResponse data, response status code and response headers
934
+ def refresh_asset_report_with_http_info(opts = {})
935
+ if @api_client.config.debugging
936
+ @api_client.config.logger.debug 'Calling API: FuseApi.refresh_asset_report ...'
937
+ end
938
+ # resource path
939
+ local_var_path = '/v1/asset_report/refresh'
940
+
941
+ # query parameters
942
+ query_params = opts[:query_params] || {}
943
+
944
+ # header parameters
945
+ header_params = opts[:header_params] || {}
946
+ # HTTP header 'Accept' (if needed)
947
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
948
+ # HTTP header 'Content-Type'
949
+ content_type = @api_client.select_header_content_type(['application/json'])
950
+ if !content_type.nil?
951
+ header_params['Content-Type'] = content_type
952
+ end
953
+
954
+ # form parameters
955
+ form_params = opts[:form_params] || {}
956
+
957
+ # http body (model)
958
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'refresh_asset_report_request'])
959
+
960
+ # return_type
961
+ return_type = opts[:debug_return_type] || 'CreateAssetReportResponse'
962
+
963
+ # auth_names
964
+ auth_names = opts[:debug_auth_names] || ['fuseApiKey', 'fuseClientId']
965
+
966
+ new_options = opts.merge(
967
+ :operation => :"FuseApi.refresh_asset_report",
968
+ :header_params => header_params,
969
+ :query_params => query_params,
970
+ :form_params => form_params,
971
+ :body => post_body,
972
+ :auth_names => auth_names,
973
+ :return_type => return_type
974
+ )
975
+
976
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
977
+ if @api_client.config.debugging
978
+ @api_client.config.logger.debug "API called: FuseApi#refresh_asset_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
979
+ end
980
+ return data, status_code, headers
981
+ end
982
+
794
983
  # Sync financial connections data
795
984
  # Call this endpoint upon receiving a SYNC_REQUIRED webhook. This will keep the financial connections data up to date.
796
985
  # @param body [Object]
@@ -925,6 +1114,78 @@ module FuseClient
925
1114
  return data, status_code, headers
926
1115
  end
927
1116
 
1117
+ # Update entity
1118
+ # @param entity_id_to_update [String]
1119
+ # @param update_entity_request [UpdateEntityRequest]
1120
+ # @param [Hash] opts the optional parameters
1121
+ # @return [UpdateEntityResponse]
1122
+ def update_entity(entity_id_to_update, update_entity_request, opts = {})
1123
+ data, _status_code, _headers = update_entity_with_http_info(entity_id_to_update, update_entity_request, opts)
1124
+ data
1125
+ end
1126
+
1127
+ # Update entity
1128
+ # @param entity_id_to_update [String]
1129
+ # @param update_entity_request [UpdateEntityRequest]
1130
+ # @param [Hash] opts the optional parameters
1131
+ # @return [Array<(UpdateEntityResponse, Integer, Hash)>] UpdateEntityResponse data, response status code and response headers
1132
+ def update_entity_with_http_info(entity_id_to_update, update_entity_request, opts = {})
1133
+ if @api_client.config.debugging
1134
+ @api_client.config.logger.debug 'Calling API: FuseApi.update_entity ...'
1135
+ end
1136
+ # verify the required parameter 'entity_id_to_update' is set
1137
+ if @api_client.config.client_side_validation && entity_id_to_update.nil?
1138
+ fail ArgumentError, "Missing the required parameter 'entity_id_to_update' when calling FuseApi.update_entity"
1139
+ end
1140
+ # verify the required parameter 'update_entity_request' is set
1141
+ if @api_client.config.client_side_validation && update_entity_request.nil?
1142
+ fail ArgumentError, "Missing the required parameter 'update_entity_request' when calling FuseApi.update_entity"
1143
+ end
1144
+ # resource path
1145
+ local_var_path = '/v1/entities/{entity_id_to_update}'.sub('{' + 'entity_id_to_update' + '}', CGI.escape(entity_id_to_update.to_s))
1146
+
1147
+ # query parameters
1148
+ query_params = opts[:query_params] || {}
1149
+
1150
+ # header parameters
1151
+ header_params = opts[:header_params] || {}
1152
+ # HTTP header 'Accept' (if needed)
1153
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1154
+ # HTTP header 'Content-Type'
1155
+ content_type = @api_client.select_header_content_type(['application/json'])
1156
+ if !content_type.nil?
1157
+ header_params['Content-Type'] = content_type
1158
+ end
1159
+
1160
+ # form parameters
1161
+ form_params = opts[:form_params] || {}
1162
+
1163
+ # http body (model)
1164
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_entity_request)
1165
+
1166
+ # return_type
1167
+ return_type = opts[:debug_return_type] || 'UpdateEntityResponse'
1168
+
1169
+ # auth_names
1170
+ auth_names = opts[:debug_auth_names] || ['fuseApiKey', 'fuseClientId']
1171
+
1172
+ new_options = opts.merge(
1173
+ :operation => :"FuseApi.update_entity",
1174
+ :header_params => header_params,
1175
+ :query_params => query_params,
1176
+ :form_params => form_params,
1177
+ :body => post_body,
1178
+ :auth_names => auth_names,
1179
+ :return_type => return_type
1180
+ )
1181
+
1182
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1183
+ if @api_client.config.debugging
1184
+ @api_client.config.logger.debug "API called: FuseApi#update_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1185
+ end
1186
+ return data, status_code, headers
1187
+ end
1188
+
928
1189
  # Get liabilities
929
1190
  # @param get_liabilities_request [GetLiabilitiesRequest]
930
1191
  # @param [Hash] opts the optional parameters
@@ -140,7 +140,7 @@ module FuseClient
140
140
 
141
141
  def initialize
142
142
  @scheme = 'https'
143
- @host = 'yz9sph5c42.execute-api.us-east-1.amazonaws.com'
143
+ @host = 'sandbox-api.letsfuse.com'
144
144
  @base_path = ''
145
145
  @server_index = 0
146
146
  @server_operation_index = {}
@@ -300,7 +300,7 @@ module FuseClient
300
300
  def server_settings
301
301
  [
302
302
  {
303
- url: "https://yz9sph5c42.execute-api.us-east-1.amazonaws.com",
303
+ url: "https://sandbox-api.letsfuse.com",
304
304
  description: "sandbox",
305
305
  }
306
306
  ]
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #Fuse
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class Aggregator
18
+ PLAID = "plaid".freeze
19
+ TELLER = "teller".freeze
20
+ MX = "mx".freeze
21
+ FINICITY = "finicity".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [PLAID, TELLER, MX, FINICITY].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ return value if Aggregator.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #Aggregator"
40
+ end
41
+ end
42
+ end
@@ -21,11 +21,15 @@ module FuseClient
21
21
  # The maximum integer number of days of history to include in the Asset Report
22
22
  attr_accessor :days_requested
23
23
 
24
+ # Indicates whether to include identity data in the Asset Report
25
+ attr_accessor :include_identity
26
+
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'access_token' => :'access_token',
28
- :'days_requested' => :'days_requested'
31
+ :'days_requested' => :'days_requested',
32
+ :'include_identity' => :'include_identity'
29
33
  }
30
34
  end
31
35
 
@@ -38,7 +42,8 @@ module FuseClient
38
42
  def self.openapi_types
39
43
  {
40
44
  :'access_token' => :'String',
41
- :'days_requested' => :'Float'
45
+ :'days_requested' => :'Float',
46
+ :'include_identity' => :'Boolean'
42
47
  }
43
48
  end
44
49
 
@@ -70,6 +75,12 @@ module FuseClient
70
75
  if attributes.key?(:'days_requested')
71
76
  self.days_requested = attributes[:'days_requested']
72
77
  end
78
+
79
+ if attributes.key?(:'include_identity')
80
+ self.include_identity = attributes[:'include_identity']
81
+ else
82
+ self.include_identity = true
83
+ end
73
84
  end
74
85
 
75
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -129,7 +140,8 @@ module FuseClient
129
140
  return true if self.equal?(o)
130
141
  self.class == o.class &&
131
142
  access_token == o.access_token &&
132
- days_requested == o.days_requested
143
+ days_requested == o.days_requested &&
144
+ include_identity == o.include_identity
133
145
  end
134
146
 
135
147
  # @see the `==` method
@@ -141,7 +153,7 @@ module FuseClient
141
153
  # Calculates hash code according to all attributes.
142
154
  # @return [Integer] Hash code
143
155
  def hash
144
- [access_token, days_requested].hash
156
+ [access_token, days_requested, include_identity].hash
145
157
  end
146
158
 
147
159
  # Builds the object from hash
@@ -0,0 +1,268 @@
1
+ =begin
2
+ #Fuse
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class CreateEntityRequest
18
+ # Id of the entity
19
+ attr_accessor :id
20
+
21
+ # Email of the entity
22
+ attr_accessor :email
23
+
24
+ # These will force the user to connect through all of these aggregators
25
+ attr_accessor :aggregators
26
+
27
+ attr_accessor :institution_ids
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'id' => :'id',
33
+ :'email' => :'email',
34
+ :'aggregators' => :'aggregators',
35
+ :'institution_ids' => :'institution_ids'
36
+ }
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'id' => :'String',
48
+ :'email' => :'String',
49
+ :'aggregators' => :'Array<Aggregator>',
50
+ :'institution_ids' => :'Array<String>'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::CreateEntityRequest` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::CreateEntityRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'id')
76
+ self.id = attributes[:'id']
77
+ end
78
+
79
+ if attributes.key?(:'email')
80
+ self.email = attributes[:'email']
81
+ end
82
+
83
+ if attributes.key?(:'aggregators')
84
+ if (value = attributes[:'aggregators']).is_a?(Array)
85
+ self.aggregators = value
86
+ end
87
+ end
88
+
89
+ if attributes.key?(:'institution_ids')
90
+ if (value = attributes[:'institution_ids']).is_a?(Array)
91
+ self.institution_ids = value
92
+ end
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ invalid_properties = Array.new
100
+ if !@aggregators.nil? && @aggregators.length < 1
101
+ invalid_properties.push('invalid value for "aggregators", number of items must be greater than or equal to 1.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ return false if !@aggregators.nil? && @aggregators.length < 1
111
+ true
112
+ end
113
+
114
+ # Custom attribute writer method with validation
115
+ # @param [Object] aggregators Value to be assigned
116
+ def aggregators=(aggregators)
117
+ if !aggregators.nil? && aggregators.length < 1
118
+ fail ArgumentError, 'invalid value for "aggregators", number of items must be greater than or equal to 1.'
119
+ end
120
+
121
+ @aggregators = aggregators
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param [Object] Object to be compared
126
+ def ==(o)
127
+ return true if self.equal?(o)
128
+ self.class == o.class &&
129
+ id == o.id &&
130
+ email == o.email &&
131
+ aggregators == o.aggregators &&
132
+ institution_ids == o.institution_ids
133
+ end
134
+
135
+ # @see the `==` method
136
+ # @param [Object] Object to be compared
137
+ def eql?(o)
138
+ self == o
139
+ end
140
+
141
+ # Calculates hash code according to all attributes.
142
+ # @return [Integer] Hash code
143
+ def hash
144
+ [id, email, aggregators, institution_ids].hash
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def self.build_from_hash(attributes)
151
+ new.build_from_hash(attributes)
152
+ end
153
+
154
+ # Builds the object from hash
155
+ # @param [Hash] attributes Model attributes in the form of hash
156
+ # @return [Object] Returns the model itself
157
+ def build_from_hash(attributes)
158
+ return nil unless attributes.is_a?(Hash)
159
+ attributes = attributes.transform_keys(&:to_sym)
160
+ self.class.openapi_types.each_pair do |key, type|
161
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
162
+ self.send("#{key}=", nil)
163
+ elsif type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the attribute
165
+ # is documented as an array but the input is not
166
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
167
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
168
+ end
169
+ elsif !attributes[self.class.attribute_map[key]].nil?
170
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
171
+ end
172
+ end
173
+
174
+ self
175
+ end
176
+
177
+ # Deserializes the data based on type
178
+ # @param string type Data type
179
+ # @param string value Value to be deserialized
180
+ # @return [Object] Deserialized data
181
+ def _deserialize(type, value)
182
+ case type.to_sym
183
+ when :Time
184
+ Time.parse(value)
185
+ when :Date
186
+ Date.parse(value)
187
+ when :String
188
+ value.to_s
189
+ when :Integer
190
+ value.to_i
191
+ when :Float
192
+ value.to_f
193
+ when :Boolean
194
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
195
+ true
196
+ else
197
+ false
198
+ end
199
+ when :Object
200
+ # generic object (usually a Hash), return directly
201
+ value
202
+ when /\AArray<(?<inner_type>.+)>\z/
203
+ inner_type = Regexp.last_match[:inner_type]
204
+ value.map { |v| _deserialize(inner_type, v) }
205
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
206
+ k_type = Regexp.last_match[:k_type]
207
+ v_type = Regexp.last_match[:v_type]
208
+ {}.tap do |hash|
209
+ value.each do |k, v|
210
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
211
+ end
212
+ end
213
+ else # model
214
+ # models (e.g. Pet) or oneOf
215
+ klass = FuseClient.const_get(type)
216
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
217
+ end
218
+ end
219
+
220
+ # Returns the string representation of the object
221
+ # @return [String] String presentation of the object
222
+ def to_s
223
+ to_hash.to_s
224
+ end
225
+
226
+ # to_body is an alias to to_hash (backward compatibility)
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_body
229
+ to_hash
230
+ end
231
+
232
+ # Returns the object in the form of hash
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_hash
235
+ hash = {}
236
+ self.class.attribute_map.each_pair do |attr, param|
237
+ value = self.send(attr)
238
+ if value.nil?
239
+ is_nullable = self.class.openapi_nullable.include?(attr)
240
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
241
+ end
242
+
243
+ hash[param] = _to_hash(value)
244
+ end
245
+ hash
246
+ end
247
+
248
+ # Outputs non-array value in the form of hash
249
+ # For object, use to_hash. Otherwise, just return the value
250
+ # @param [Object] value Any valid value
251
+ # @return [Hash] Returns the value in the form of hash
252
+ def _to_hash(value)
253
+ if value.is_a?(Array)
254
+ value.compact.map { |v| _to_hash(v) }
255
+ elsif value.is_a?(Hash)
256
+ {}.tap do |hash|
257
+ value.each { |k, v| hash[k] = _to_hash(v) }
258
+ end
259
+ elsif value.respond_to? :to_hash
260
+ value.to_hash
261
+ else
262
+ value
263
+ end
264
+ end
265
+
266
+ end
267
+
268
+ end