fuse_client 1.0.7 → 1.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (360) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +9 -9
  3. data/README.md +4 -1
  4. data/docs/AccountSubType.md +15 -0
  5. data/docs/AccountType.md +15 -0
  6. data/docs/AddSpendPowerTransactionRequest.md +22 -0
  7. data/docs/AddSpendPowerTransactionResponse.md +20 -0
  8. data/docs/AssetReport.md +26 -0
  9. data/docs/AssetReportAccountsInner.md +24 -0
  10. data/docs/{GetAssetReportResponseReportAccountsInnerBalances.md → AssetReportAccountsInnerBalance.md} +2 -2
  11. data/docs/{GetAssetReportResponseReportAccountsInnerHistoricalBalancesInner.md → AssetReportAccountsInnerHistoricalBalancesInner.md} +2 -2
  12. data/docs/{GetAssetReportResponse.md → AssetReportResponse.md} +3 -3
  13. data/docs/AssetReportTransaction.md +36 -0
  14. data/docs/CountryCode.md +15 -0
  15. data/docs/CreateAssetReportRequest.md +2 -4
  16. data/docs/CreateAssetReportResponse.md +2 -2
  17. data/docs/CreateLinkTokenRequest.md +6 -4
  18. data/docs/CreateLinkTokenRequestPlaid.md +1 -1
  19. data/docs/CreateLinkTokenRequestTeller.md +18 -0
  20. data/docs/CreateLinkTokenRequestTellerConfig.md +18 -0
  21. data/docs/CreateLinkTokenResponse.md +2 -2
  22. data/docs/CreateSessionRequest.md +11 -3
  23. data/docs/CreateSessionResponse.md +3 -3
  24. data/docs/CreateSpendPowerCustomizationResponse.md +20 -0
  25. data/docs/CreateSpendPowerRequest.md +22 -0
  26. data/docs/CreateSpendPowerResponse.md +20 -0
  27. data/docs/Currency.md +20 -0
  28. data/docs/DeleteFinancialConnectionResponse.md +22 -0
  29. data/docs/DeleteSpendPowerResponse.md +20 -0
  30. data/docs/Entity.md +1 -1
  31. data/docs/ExchangeFinancialConnectionsPublicTokenRequest.md +1 -1
  32. data/docs/ExchangeFinancialConnectionsPublicTokenResponse.md +3 -3
  33. data/docs/FinancialConnectionData.md +2 -2
  34. data/docs/FinancialConnectionDetails.md +32 -0
  35. data/docs/FinancialConnectionDetailsMx.md +20 -0
  36. data/docs/FinancialConnectionDetailsPlaid.md +20 -0
  37. data/docs/FinancialConnectionDetailsTeller.md +20 -0
  38. data/docs/FinancialConnectionsAccount.md +8 -8
  39. data/docs/FinancialConnectionsAccountBalance.md +5 -3
  40. data/docs/FinancialConnectionsAccountCachedBalance.md +24 -0
  41. data/docs/FinancialConnectionsAccountDetails.md +2 -2
  42. data/docs/FinancialConnectionsAccountLiability.md +8 -8
  43. data/docs/FinancialConnectionsHolding.md +8 -8
  44. data/docs/FinancialConnectionsInvestmentSecurity.md +17 -7
  45. data/docs/FinancialConnectionsInvestmentSecurityExchange.md +18 -0
  46. data/docs/FinancialConnectionsInvestmentSecurityType.md +15 -0
  47. data/docs/FinancialConnectionsInvestmentTransaction.md +24 -2
  48. data/docs/FinancialConnectionsOwner.md +4 -4
  49. data/docs/FinancialConnectionsOwnerEmailsInner.md +1 -1
  50. data/docs/FinancialConnectionsOwnerNamesInner.md +1 -1
  51. data/docs/FinancialConnectionsOwnerPhoneNumbersInner.md +1 -1
  52. data/docs/FinancialInstitution.md +3 -1
  53. data/docs/FuseApi.md +588 -118
  54. data/docs/FuseApiAggregatorError.md +28 -0
  55. data/docs/FuseApiError.md +7 -5
  56. data/docs/FuseApiErrorCode.md +15 -0
  57. data/docs/FuseApiErrorData.md +2 -2
  58. data/docs/FuseApiErrorType.md +15 -0
  59. data/docs/FuseApiWarningData.md +1 -1
  60. data/docs/GetAssetReportRequest.md +2 -0
  61. data/docs/GetEntityResponse.md +4 -2
  62. data/docs/GetFinancialConnectionResponse.md +20 -0
  63. data/docs/GetFinancialConnectionsAccountDetailsResponse.md +3 -3
  64. data/docs/GetFinancialConnectionsAccountStatementRequest.md +22 -0
  65. data/docs/GetFinancialConnectionsAccountStatementResponse.md +20 -0
  66. data/docs/GetFinancialConnectionsAccountsResponse.md +3 -3
  67. data/docs/GetFinancialConnectionsBalanceRequest.md +3 -1
  68. data/docs/GetFinancialConnectionsBalanceRequestOptions.md +18 -0
  69. data/docs/{GetFinancialConnectionsAccountBalanceResponse.md → GetFinancialConnectionsBalanceResponse.md} +4 -4
  70. data/docs/GetFinancialConnectionsOwnersResponse.md +1 -1
  71. data/docs/GetFinancialConnectionsOwnersResponseAccountsInner.md +3 -3
  72. data/docs/GetFinancialConnectionsTransactionsRequest.md +26 -0
  73. data/docs/GetFinancialConnectionsTransactionsResponse.md +22 -0
  74. data/docs/GetFinancialInstitutionResponse.md +2 -2
  75. data/docs/GetInvestmentHoldingsRequest.md +3 -3
  76. data/docs/GetInvestmentHoldingsRequestOptions.md +18 -0
  77. data/docs/GetInvestmentHoldingsResponse.md +3 -5
  78. data/docs/GetInvestmentTransactionsRequest.md +11 -1
  79. data/docs/GetInvestmentTransactionsRequestOptions.md +18 -0
  80. data/docs/GetInvestmentTransactionsResponse.md +5 -5
  81. data/docs/GetSpendPowerResponse.md +20 -0
  82. data/docs/MigrateFinancialConnectionsAggregatorConnectionData.md +22 -0
  83. data/docs/MigrateFinancialConnectionsAggregatorConnectionDataMx.md +20 -0
  84. data/docs/MigrateFinancialConnectionsAggregatorConnectionDataPlaid.md +20 -0
  85. data/docs/MigrateFinancialConnectionsAggregatorConnectionDataTeller.md +18 -0
  86. data/docs/MigrateFinancialConnectionsTokenRequest.md +24 -0
  87. data/docs/MigrateFinancialConnectionsTokenRequestEntity.md +18 -0
  88. data/docs/MigrateFinancialConnectionsTokenResponse.md +24 -0
  89. data/docs/RefreshAssetReportRequest.md +5 -5
  90. data/docs/RefreshAssetReportResponse.md +22 -0
  91. data/docs/SpendPower.md +30 -0
  92. data/docs/SpendPowerApi.md +122 -0
  93. data/docs/SpendPowerCustomization.md +22 -0
  94. data/docs/SyncTransactionsResponse.md +2 -2
  95. data/docs/Transaction.md +38 -0
  96. data/docs/{GetTransactionsResponseDataInnerMerchant.md → TransactionMerchant.md} +2 -2
  97. data/docs/UpdateSpendPowerCustomizationResponse.md +20 -0
  98. data/docs/WebhookEvent.md +34 -0
  99. data/docs/WebhookSource.md +15 -0
  100. data/docs/WebhookType.md +15 -0
  101. data/fuse_client.gemspec +1 -1
  102. data/lib/fuse_client/api/fuse_api.rb +489 -136
  103. data/lib/fuse_client/api/spend_power_api.rb +146 -0
  104. data/lib/fuse_client/api_client.rb +1 -1
  105. data/lib/fuse_client/api_error.rb +1 -1
  106. data/lib/fuse_client/configuration.rb +86 -18
  107. data/lib/fuse_client/models/account_subtype.rb +178 -0
  108. data/lib/fuse_client/models/account_type.rb +46 -0
  109. data/lib/fuse_client/models/{get_transactions_response_data_inner.rb → add_spend_power_transaction_request.rb} +56 -83
  110. data/lib/fuse_client/models/{get_transactions_response.rb → add_spend_power_transaction_response.rb} +22 -33
  111. data/lib/fuse_client/models/aggregator.rb +4 -2
  112. data/lib/fuse_client/models/{get_asset_report_response_report.rb → asset_report.rb} +15 -27
  113. data/lib/fuse_client/models/{get_asset_report_response_report_accounts_inner.rb → asset_report_accounts_inner.rb} +27 -26
  114. data/lib/fuse_client/models/{get_asset_report_response_report_accounts_inner_balances.rb → asset_report_accounts_inner_balance.rb} +4 -4
  115. data/lib/fuse_client/models/{get_asset_report_response_report_accounts_inner_historical_balances_inner.rb → asset_report_accounts_inner_historical_balances_inner.rb} +4 -4
  116. data/lib/fuse_client/models/{get_asset_report_response.rb → asset_report_response.rb} +5 -5
  117. data/lib/fuse_client/models/asset_report_transaction.rb +385 -0
  118. data/lib/fuse_client/models/country_code.rb +40 -0
  119. data/lib/fuse_client/models/create_asset_report_request.rb +11 -23
  120. data/lib/fuse_client/models/create_asset_report_response.rb +3 -3
  121. data/lib/fuse_client/models/create_entity_request.rb +1 -1
  122. data/lib/fuse_client/models/create_entity_response.rb +1 -1
  123. data/lib/fuse_client/models/create_link_token_request.rb +25 -16
  124. data/lib/fuse_client/models/create_link_token_request_mx.rb +1 -1
  125. data/lib/fuse_client/models/create_link_token_request_plaid.rb +2 -2
  126. data/lib/fuse_client/models/create_link_token_request_teller.rb +220 -0
  127. data/lib/fuse_client/models/create_link_token_request_teller_config.rb +254 -0
  128. data/lib/fuse_client/models/create_link_token_response.rb +11 -1
  129. data/lib/fuse_client/models/create_session_request.rb +75 -11
  130. data/lib/fuse_client/models/create_session_response.rb +16 -1
  131. data/lib/fuse_client/models/create_spend_power_customization_response.rb +240 -0
  132. data/lib/fuse_client/models/create_spend_power_request.rb +255 -0
  133. data/lib/fuse_client/models/create_spend_power_response.rb +240 -0
  134. data/lib/fuse_client/models/currency.rb +235 -0
  135. data/lib/fuse_client/models/delete_financial_connection_response.rb +255 -0
  136. data/lib/fuse_client/models/delete_spend_power_response.rb +239 -0
  137. data/lib/fuse_client/models/entity.rb +2 -2
  138. data/lib/fuse_client/models/exchange_financial_connections_public_token_request.rb +6 -1
  139. data/lib/fuse_client/models/exchange_financial_connections_public_token_response.rb +18 -3
  140. data/lib/fuse_client/models/financial_connection_data.rb +11 -1
  141. data/lib/fuse_client/models/financial_connection_details.rb +345 -0
  142. data/lib/fuse_client/models/financial_connection_details_mx.rb +241 -0
  143. data/lib/fuse_client/models/{get_transactions_request.rb → financial_connection_details_plaid.rb} +19 -23
  144. data/lib/fuse_client/models/financial_connection_details_teller.rb +241 -0
  145. data/lib/fuse_client/models/financial_connections_account.rb +59 -14
  146. data/lib/fuse_client/models/financial_connections_account_balance.rb +21 -6
  147. data/lib/fuse_client/models/financial_connections_account_cached_balance.rb +250 -0
  148. data/lib/fuse_client/models/financial_connections_account_details.rb +11 -1
  149. data/lib/fuse_client/models/financial_connections_account_details_ach.rb +1 -1
  150. data/lib/fuse_client/models/financial_connections_account_institution.rb +1 -1
  151. data/lib/fuse_client/models/financial_connections_account_liability.rb +59 -14
  152. data/lib/fuse_client/models/financial_connections_account_liability_all_of.rb +1 -1
  153. data/lib/fuse_client/models/financial_connections_account_liability_all_of_aprs.rb +1 -1
  154. data/lib/fuse_client/models/financial_connections_holding.rb +52 -23
  155. data/lib/fuse_client/models/financial_connections_investment_security.rb +108 -24
  156. data/lib/fuse_client/models/financial_connections_investment_security_exchange.rb +220 -0
  157. data/lib/fuse_client/models/financial_connections_investment_security_type.rb +64 -0
  158. data/lib/fuse_client/models/financial_connections_investment_transaction.rb +206 -10
  159. data/lib/fuse_client/models/financial_connections_owner.rb +21 -1
  160. data/lib/fuse_client/models/financial_connections_owner_addresses_inner.rb +1 -1
  161. data/lib/fuse_client/models/financial_connections_owner_addresses_inner_data.rb +1 -1
  162. data/lib/fuse_client/models/financial_connections_owner_emails_inner.rb +6 -1
  163. data/lib/fuse_client/models/financial_connections_owner_names_inner.rb +6 -1
  164. data/lib/fuse_client/models/financial_connections_owner_phone_numbers_inner.rb +6 -1
  165. data/lib/fuse_client/models/financial_institution.rb +22 -5
  166. data/lib/fuse_client/models/financial_institution_logo.rb +1 -1
  167. data/lib/fuse_client/models/fuse_api_aggregator_error.rb +264 -0
  168. data/lib/fuse_client/models/fuse_api_error.rb +43 -4
  169. data/lib/fuse_client/models/fuse_api_error_code.rb +76 -0
  170. data/lib/fuse_client/models/fuse_api_error_data.rb +25 -3
  171. data/lib/fuse_client/models/fuse_api_error_type.rb +42 -0
  172. data/lib/fuse_client/models/fuse_api_warning.rb +1 -1
  173. data/lib/fuse_client/models/fuse_api_warning_data.rb +24 -2
  174. data/lib/fuse_client/models/fuse_api_warning_data_warnings_inner.rb +1 -1
  175. data/lib/fuse_client/models/get_asset_report_request.rb +17 -2
  176. data/lib/fuse_client/models/get_entity_response.rb +29 -2
  177. data/lib/fuse_client/models/get_financial_connection_response.rb +239 -0
  178. data/lib/fuse_client/models/get_financial_connections_account_details_request.rb +1 -1
  179. data/lib/fuse_client/models/get_financial_connections_account_details_response.rb +16 -1
  180. data/lib/fuse_client/models/get_financial_connections_account_statement_request.rb +250 -0
  181. data/lib/fuse_client/models/get_financial_connections_account_statement_response.rb +240 -0
  182. data/lib/fuse_client/models/get_financial_connections_accounts_request.rb +1 -1
  183. data/lib/fuse_client/models/get_financial_connections_accounts_response.rb +16 -1
  184. data/lib/fuse_client/models/get_financial_connections_balance_request.rb +14 -5
  185. data/lib/fuse_client/models/get_financial_connections_balance_request_options.rb +222 -0
  186. data/lib/fuse_client/models/{get_financial_connections_account_balance_response.rb → get_financial_connections_balance_response.rb} +14 -4
  187. data/lib/fuse_client/models/get_financial_connections_owners_request.rb +1 -1
  188. data/lib/fuse_client/models/get_financial_connections_owners_response.rb +6 -1
  189. data/lib/fuse_client/models/get_financial_connections_owners_response_accounts_inner.rb +16 -1
  190. data/lib/fuse_client/models/get_financial_connections_transactions_request.rb +334 -0
  191. data/lib/fuse_client/models/get_financial_connections_transactions_response.rb +256 -0
  192. data/lib/fuse_client/models/get_financial_institution_response.rb +11 -1
  193. data/lib/fuse_client/models/get_investment_holdings_request.rb +9 -10
  194. data/lib/fuse_client/models/get_investment_holdings_request_options.rb +222 -0
  195. data/lib/fuse_client/models/get_investment_holdings_response.rb +18 -14
  196. data/lib/fuse_client/models/get_investment_transactions_request.rb +95 -5
  197. data/lib/fuse_client/models/get_investment_transactions_request_options.rb +222 -0
  198. data/lib/fuse_client/models/get_investment_transactions_response.rb +25 -11
  199. data/lib/fuse_client/models/get_liabilities_request.rb +1 -1
  200. data/lib/fuse_client/models/get_liabilities_response.rb +1 -1
  201. data/lib/fuse_client/models/get_spend_power_response.rb +239 -0
  202. data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data.rb +238 -0
  203. data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data_mx.rb +236 -0
  204. data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data_plaid.rb +236 -0
  205. data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data_teller.rb +226 -0
  206. data/lib/fuse_client/models/migrate_financial_connections_token_request.rb +323 -0
  207. data/lib/fuse_client/models/{transaction_common_model.rb → migrate_financial_connections_token_request_entity.rb} +12 -13
  208. data/lib/fuse_client/models/migrate_financial_connections_token_response.rb +264 -0
  209. data/lib/fuse_client/models/product.rb +3 -3
  210. data/lib/fuse_client/models/refresh_asset_report_request.rb +32 -33
  211. data/lib/fuse_client/models/refresh_asset_report_response.rb +240 -0
  212. data/lib/fuse_client/models/{financial_connections_investment_transaction_data_inner.rb → spend_power.rb} +83 -58
  213. data/lib/fuse_client/models/{financial_connections_investment_account.rb → spend_power_customization.rb} +75 -74
  214. data/lib/fuse_client/models/sync_financial_connections_data_response.rb +1 -1
  215. data/lib/fuse_client/models/sync_transactions_request.rb +1 -1
  216. data/lib/fuse_client/models/sync_transactions_response.rb +3 -3
  217. data/lib/fuse_client/models/sync_transactions_response_removed_inner.rb +1 -1
  218. data/lib/fuse_client/models/transaction.rb +412 -0
  219. data/lib/fuse_client/models/{get_transactions_response_data_inner_merchant.rb → transaction_merchant.rb} +4 -4
  220. data/lib/fuse_client/models/update_entity_request.rb +1 -1
  221. data/lib/fuse_client/models/update_entity_response.rb +1 -1
  222. data/lib/fuse_client/models/update_spend_power_customization_response.rb +240 -0
  223. data/lib/fuse_client/models/webhook_event.rb +353 -0
  224. data/lib/fuse_client/models/webhook_source.rb +43 -0
  225. data/lib/fuse_client/models/webhook_type.rb +43 -0
  226. data/lib/fuse_client/version.rb +2 -2
  227. data/lib/fuse_client.rb +57 -14
  228. data/spec/api/fuse_api_spec.rb +100 -36
  229. data/spec/api/spend_power_api_spec.rb +64 -0
  230. data/spec/api_client_spec.rb +3 -1
  231. data/spec/configuration_spec.rb +1 -1
  232. data/spec/models/account_subtype_spec.rb +28 -0
  233. data/spec/models/account_type_spec.rb +28 -0
  234. data/spec/models/add_spend_power_transaction_request_spec.rb +50 -0
  235. data/spec/models/add_spend_power_transaction_response_spec.rb +40 -0
  236. data/spec/models/aggregator_spec.rb +1 -1
  237. data/spec/models/{get_asset_report_response_report_accounts_inner_balances_spec.rb → asset_report_accounts_inner_balance_spec.rb} +7 -7
  238. data/spec/models/{get_asset_report_response_report_accounts_inner_historical_balances_inner_spec.rb → asset_report_accounts_inner_historical_balances_inner_spec.rb} +7 -7
  239. data/spec/models/{get_transactions_response_spec.rb → asset_report_accounts_inner_spec.rb} +11 -11
  240. data/spec/models/{get_asset_report_response_spec.rb → asset_report_response_spec.rb} +7 -7
  241. data/spec/models/{get_asset_report_response_report_spec.rb → asset_report_spec.rb} +8 -14
  242. data/spec/models/asset_report_transaction_spec.rb +96 -0
  243. data/spec/models/country_code_spec.rb +28 -0
  244. data/spec/models/create_asset_report_request_spec.rb +1 -7
  245. data/spec/models/create_asset_report_response_spec.rb +1 -1
  246. data/spec/models/create_entity_request_spec.rb +1 -1
  247. data/spec/models/create_entity_response_spec.rb +1 -1
  248. data/spec/models/create_link_token_request_mx_spec.rb +1 -1
  249. data/spec/models/create_link_token_request_plaid_spec.rb +1 -1
  250. data/spec/models/create_link_token_request_spec.rb +10 -4
  251. data/spec/models/create_link_token_request_teller_config_spec.rb +38 -0
  252. data/spec/models/create_link_token_request_teller_spec.rb +34 -0
  253. data/spec/models/create_link_token_response_spec.rb +1 -1
  254. data/spec/models/create_session_request_spec.rb +25 -1
  255. data/spec/models/create_session_response_spec.rb +1 -1
  256. data/spec/models/create_spend_power_customization_response_spec.rb +40 -0
  257. data/spec/models/{get_transactions_request_spec.rb → create_spend_power_request_spec.rb} +9 -9
  258. data/spec/models/create_spend_power_response_spec.rb +40 -0
  259. data/spec/models/{get_transactions_response_data_inner_merchant_spec.rb → currency_spec.rb} +13 -7
  260. data/spec/models/delete_financial_connection_response_spec.rb +46 -0
  261. data/spec/models/delete_spend_power_response_spec.rb +40 -0
  262. data/spec/models/entity_spec.rb +1 -1
  263. data/spec/models/exchange_financial_connections_public_token_request_spec.rb +1 -1
  264. data/spec/models/exchange_financial_connections_public_token_response_spec.rb +1 -1
  265. data/spec/models/financial_connection_data_spec.rb +1 -1
  266. data/spec/models/financial_connection_details_mx_spec.rb +40 -0
  267. data/spec/models/financial_connection_details_plaid_spec.rb +40 -0
  268. data/spec/models/{financial_connections_investment_transaction_data_inner_spec.rb → financial_connection_details_spec.rb} +18 -14
  269. data/spec/models/financial_connection_details_teller_spec.rb +40 -0
  270. data/spec/models/financial_connections_account_balance_spec.rb +7 -1
  271. data/spec/models/{get_asset_report_response_report_accounts_inner_spec.rb → financial_connections_account_cached_balance_spec.rb} +11 -11
  272. data/spec/models/financial_connections_account_details_ach_spec.rb +1 -1
  273. data/spec/models/financial_connections_account_details_spec.rb +1 -1
  274. data/spec/models/financial_connections_account_institution_spec.rb +1 -1
  275. data/spec/models/financial_connections_account_liability_all_of_aprs_spec.rb +1 -1
  276. data/spec/models/financial_connections_account_liability_all_of_spec.rb +1 -1
  277. data/spec/models/financial_connections_account_liability_spec.rb +2 -2
  278. data/spec/models/financial_connections_account_spec.rb +2 -2
  279. data/spec/models/financial_connections_holding_spec.rb +4 -4
  280. data/spec/models/financial_connections_investment_security_exchange_spec.rb +34 -0
  281. data/spec/models/financial_connections_investment_security_spec.rb +34 -4
  282. data/spec/models/financial_connections_investment_security_type_spec.rb +28 -0
  283. data/spec/models/financial_connections_investment_transaction_spec.rb +72 -2
  284. data/spec/models/financial_connections_owner_addresses_inner_data_spec.rb +1 -1
  285. data/spec/models/financial_connections_owner_addresses_inner_spec.rb +1 -1
  286. data/spec/models/financial_connections_owner_emails_inner_spec.rb +1 -1
  287. data/spec/models/financial_connections_owner_names_inner_spec.rb +1 -1
  288. data/spec/models/financial_connections_owner_phone_numbers_inner_spec.rb +1 -1
  289. data/spec/models/financial_connections_owner_spec.rb +1 -1
  290. data/spec/models/financial_institution_logo_spec.rb +1 -1
  291. data/spec/models/financial_institution_spec.rb +7 -1
  292. data/spec/models/fuse_api_aggregator_error_spec.rb +64 -0
  293. data/spec/models/fuse_api_error_code_spec.rb +28 -0
  294. data/spec/models/fuse_api_error_data_spec.rb +1 -1
  295. data/spec/models/fuse_api_error_spec.rb +7 -1
  296. data/spec/models/fuse_api_error_type_spec.rb +28 -0
  297. data/spec/models/fuse_api_warning_data_spec.rb +1 -1
  298. data/spec/models/fuse_api_warning_data_warnings_inner_spec.rb +1 -1
  299. data/spec/models/fuse_api_warning_spec.rb +1 -1
  300. data/spec/models/get_asset_report_request_spec.rb +7 -1
  301. data/spec/models/get_entity_response_spec.rb +7 -1
  302. data/spec/models/get_financial_connection_response_spec.rb +40 -0
  303. data/spec/models/get_financial_connections_account_details_request_spec.rb +1 -1
  304. data/spec/models/get_financial_connections_account_details_response_spec.rb +1 -1
  305. data/spec/models/get_financial_connections_account_statement_request_spec.rb +46 -0
  306. data/spec/models/{get_financial_connections_account_balance_response_spec.rb → get_financial_connections_account_statement_response_spec.rb} +8 -8
  307. data/spec/models/get_financial_connections_accounts_request_spec.rb +1 -1
  308. data/spec/models/get_financial_connections_accounts_response_spec.rb +1 -1
  309. data/spec/models/get_financial_connections_balance_request_options_spec.rb +34 -0
  310. data/spec/models/get_financial_connections_balance_request_spec.rb +7 -1
  311. data/spec/models/get_financial_connections_balance_response_spec.rb +40 -0
  312. data/spec/models/get_financial_connections_owners_request_spec.rb +1 -1
  313. data/spec/models/get_financial_connections_owners_response_accounts_inner_spec.rb +1 -1
  314. data/spec/models/get_financial_connections_owners_response_spec.rb +1 -1
  315. data/spec/models/get_financial_connections_transactions_request_spec.rb +58 -0
  316. data/spec/models/get_financial_connections_transactions_response_spec.rb +46 -0
  317. data/spec/models/get_financial_institution_response_spec.rb +1 -1
  318. data/spec/models/get_investment_holdings_request_options_spec.rb +34 -0
  319. data/spec/models/get_investment_holdings_request_spec.rb +2 -2
  320. data/spec/models/get_investment_holdings_response_spec.rb +1 -7
  321. data/spec/models/get_investment_transactions_request_options_spec.rb +34 -0
  322. data/spec/models/get_investment_transactions_request_spec.rb +31 -1
  323. data/spec/models/get_investment_transactions_response_spec.rb +2 -2
  324. data/spec/models/get_liabilities_request_spec.rb +1 -1
  325. data/spec/models/get_liabilities_response_spec.rb +1 -1
  326. data/spec/models/get_spend_power_response_spec.rb +40 -0
  327. data/spec/models/migrate_financial_connections_aggregator_connection_data_mx_spec.rb +40 -0
  328. data/spec/models/migrate_financial_connections_aggregator_connection_data_plaid_spec.rb +40 -0
  329. data/spec/models/migrate_financial_connections_aggregator_connection_data_spec.rb +46 -0
  330. data/spec/models/migrate_financial_connections_aggregator_connection_data_teller_spec.rb +34 -0
  331. data/spec/models/migrate_financial_connections_token_request_entity_spec.rb +34 -0
  332. data/spec/models/migrate_financial_connections_token_request_spec.rb +56 -0
  333. data/spec/models/migrate_financial_connections_token_response_spec.rb +52 -0
  334. data/spec/models/product_spec.rb +1 -1
  335. data/spec/models/refresh_asset_report_request_spec.rb +3 -3
  336. data/spec/models/refresh_asset_report_response_spec.rb +46 -0
  337. data/spec/models/spend_power_customization_spec.rb +50 -0
  338. data/spec/models/{financial_connections_investment_account_spec.rb → spend_power_spec.rb} +14 -20
  339. data/spec/models/sync_financial_connections_data_response_spec.rb +1 -1
  340. data/spec/models/sync_transactions_request_spec.rb +1 -1
  341. data/spec/models/sync_transactions_response_removed_inner_spec.rb +1 -1
  342. data/spec/models/sync_transactions_response_spec.rb +1 -1
  343. data/spec/models/{transaction_common_model_spec.rb → transaction_merchant_spec.rb} +8 -8
  344. data/spec/models/transaction_spec.rb +106 -0
  345. data/spec/models/update_entity_request_spec.rb +1 -1
  346. data/spec/models/update_entity_response_spec.rb +1 -1
  347. data/spec/models/update_spend_power_customization_response_spec.rb +40 -0
  348. data/spec/models/{get_transactions_response_data_inner_spec.rb → webhook_event_spec.rb} +20 -22
  349. data/spec/models/webhook_source_spec.rb +28 -0
  350. data/spec/models/webhook_type_spec.rb +28 -0
  351. data/spec/spec_helper.rb +1 -1
  352. metadata +226 -54
  353. data/docs/FinancialConnectionsInvestmentAccount.md +0 -32
  354. data/docs/FinancialConnectionsInvestmentTransactionDataInner.md +0 -32
  355. data/docs/GetAssetReportResponseReport.md +0 -28
  356. data/docs/GetAssetReportResponseReportAccountsInner.md +0 -24
  357. data/docs/GetTransactionsRequest.md +0 -22
  358. data/docs/GetTransactionsResponse.md +0 -24
  359. data/docs/GetTransactionsResponseDataInner.md +0 -36
  360. data/docs/TransactionCommonModel.md +0 -18
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.3.0
9
+ OpenAPI Generator version: 6.5.0
10
10
 
11
11
  =end
12
12
 
@@ -20,11 +20,26 @@ module FuseClient
20
20
  # List of products that you would like the institutions to support
21
21
  attr_accessor :products
22
22
 
23
+ # List of country codes that you would like the institutions to support
24
+ attr_accessor :country_codes
25
+
26
+ attr_accessor :entity
27
+
28
+ # The fuse access token for an existing account integration. This will perform the process to reconnect an existing disconnected account.
29
+ attr_accessor :access_token
30
+
31
+ # Set to false for web SDKs (e.g., React), and true for mobile SDKs (e.g., React Native, Flutter, iOS, Android).
32
+ attr_accessor :is_web_view
33
+
23
34
  # Attribute mapping from ruby-style variable name to JSON key.
24
35
  def self.attribute_map
25
36
  {
26
37
  :'supported_financial_institution_aggregators' => :'supported_financial_institution_aggregators',
27
- :'products' => :'products'
38
+ :'products' => :'products',
39
+ :'country_codes' => :'country_codes',
40
+ :'entity' => :'entity',
41
+ :'access_token' => :'access_token',
42
+ :'is_web_view' => :'is_web_view'
28
43
  }
29
44
  end
30
45
 
@@ -37,7 +52,11 @@ module FuseClient
37
52
  def self.openapi_types
38
53
  {
39
54
  :'supported_financial_institution_aggregators' => :'Array<Aggregator>',
40
- :'products' => :'Array<Product>'
55
+ :'products' => :'Array<Product>',
56
+ :'country_codes' => :'Array<CountryCode>',
57
+ :'entity' => :'Entity',
58
+ :'access_token' => :'String',
59
+ :'is_web_view' => :'Boolean'
41
60
  }
42
61
  end
43
62
 
@@ -73,35 +92,72 @@ module FuseClient
73
92
  self.products = value
74
93
  end
75
94
  end
95
+
96
+ if attributes.key?(:'country_codes')
97
+ if (value = attributes[:'country_codes']).is_a?(Array)
98
+ self.country_codes = value
99
+ end
100
+ end
101
+
102
+ if attributes.key?(:'entity')
103
+ self.entity = attributes[:'entity']
104
+ end
105
+
106
+ if attributes.key?(:'access_token')
107
+ self.access_token = attributes[:'access_token']
108
+ end
109
+
110
+ if attributes.key?(:'is_web_view')
111
+ self.is_web_view = attributes[:'is_web_view']
112
+ end
76
113
  end
77
114
 
78
115
  # Show invalid properties with the reasons. Usually used together with valid?
79
116
  # @return Array for valid properties with the reasons
80
117
  def list_invalid_properties
81
118
  invalid_properties = Array.new
82
- if !@supported_financial_institution_aggregators.nil? && @supported_financial_institution_aggregators.length < 1
119
+ if @supported_financial_institution_aggregators.nil?
120
+ invalid_properties.push('invalid value for "supported_financial_institution_aggregators", supported_financial_institution_aggregators cannot be nil.')
121
+ end
122
+
123
+ if @supported_financial_institution_aggregators.length < 1
83
124
  invalid_properties.push('invalid value for "supported_financial_institution_aggregators", number of items must be greater than or equal to 1.')
84
125
  end
85
126
 
86
- if !@products.nil? && @products.length < 1
127
+ if @products.nil?
128
+ invalid_properties.push('invalid value for "products", products cannot be nil.')
129
+ end
130
+
131
+ if @products.length < 1
87
132
  invalid_properties.push('invalid value for "products", number of items must be greater than or equal to 1.')
88
133
  end
89
134
 
135
+ if @entity.nil?
136
+ invalid_properties.push('invalid value for "entity", entity cannot be nil.')
137
+ end
138
+
90
139
  invalid_properties
91
140
  end
92
141
 
93
142
  # Check to see if the all the properties in the model are valid
94
143
  # @return true if the model is valid
95
144
  def valid?
96
- return false if !@supported_financial_institution_aggregators.nil? && @supported_financial_institution_aggregators.length < 1
97
- return false if !@products.nil? && @products.length < 1
145
+ return false if @supported_financial_institution_aggregators.nil?
146
+ return false if @supported_financial_institution_aggregators.length < 1
147
+ return false if @products.nil?
148
+ return false if @products.length < 1
149
+ return false if @entity.nil?
98
150
  true
99
151
  end
100
152
 
101
153
  # Custom attribute writer method with validation
102
154
  # @param [Object] supported_financial_institution_aggregators Value to be assigned
103
155
  def supported_financial_institution_aggregators=(supported_financial_institution_aggregators)
104
- if !supported_financial_institution_aggregators.nil? && supported_financial_institution_aggregators.length < 1
156
+ if supported_financial_institution_aggregators.nil?
157
+ fail ArgumentError, 'supported_financial_institution_aggregators cannot be nil'
158
+ end
159
+
160
+ if supported_financial_institution_aggregators.length < 1
105
161
  fail ArgumentError, 'invalid value for "supported_financial_institution_aggregators", number of items must be greater than or equal to 1.'
106
162
  end
107
163
 
@@ -111,7 +167,11 @@ module FuseClient
111
167
  # Custom attribute writer method with validation
112
168
  # @param [Object] products Value to be assigned
113
169
  def products=(products)
114
- if !products.nil? && products.length < 1
170
+ if products.nil?
171
+ fail ArgumentError, 'products cannot be nil'
172
+ end
173
+
174
+ if products.length < 1
115
175
  fail ArgumentError, 'invalid value for "products", number of items must be greater than or equal to 1.'
116
176
  end
117
177
 
@@ -124,7 +184,11 @@ module FuseClient
124
184
  return true if self.equal?(o)
125
185
  self.class == o.class &&
126
186
  supported_financial_institution_aggregators == o.supported_financial_institution_aggregators &&
127
- products == o.products
187
+ products == o.products &&
188
+ country_codes == o.country_codes &&
189
+ entity == o.entity &&
190
+ access_token == o.access_token &&
191
+ is_web_view == o.is_web_view
128
192
  end
129
193
 
130
194
  # @see the `==` method
@@ -136,7 +200,7 @@ module FuseClient
136
200
  # Calculates hash code according to all attributes.
137
201
  # @return [Integer] Hash code
138
202
  def hash
139
- [supported_financial_institution_aggregators, products].hash
203
+ [supported_financial_institution_aggregators, products, country_codes, entity, access_token, is_web_view].hash
140
204
  end
141
205
 
142
206
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.3.0
9
+ OpenAPI Generator version: 6.5.0
10
10
 
11
11
  =end
12
12
 
@@ -85,12 +85,27 @@ module FuseClient
85
85
  # @return Array for valid properties with the reasons
86
86
  def list_invalid_properties
87
87
  invalid_properties = Array.new
88
+ if @expiration.nil?
89
+ invalid_properties.push('invalid value for "expiration", expiration cannot be nil.')
90
+ end
91
+
92
+ if @client_secret.nil?
93
+ invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.')
94
+ end
95
+
96
+ if @request_id.nil?
97
+ invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
98
+ end
99
+
88
100
  invalid_properties
89
101
  end
90
102
 
91
103
  # Check to see if the all the properties in the model are valid
92
104
  # @return true if the model is valid
93
105
  def valid?
106
+ return false if @expiration.nil?
107
+ return false if @client_secret.nil?
108
+ return false if @request_id.nil?
94
109
  true
95
110
  end
96
111
 
@@ -0,0 +1,240 @@
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.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class CreateSpendPowerCustomizationResponse
18
+ # The id of the created customization.
19
+ attr_accessor :id
20
+
21
+ # An identifier that is exclusive to the request and can serve as a means for investigating and resolving issues.
22
+ attr_accessor :request_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'id' => :'id',
28
+ :'request_id' => :'request_id'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'id' => :'String',
41
+ :'request_id' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::CreateSpendPowerCustomizationResponse` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::CreateSpendPowerCustomizationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'id')
67
+ self.id = attributes[:'id']
68
+ end
69
+
70
+ if attributes.key?(:'request_id')
71
+ self.request_id = attributes[:'request_id']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ if @id.nil?
80
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
81
+ end
82
+
83
+ if @request_id.nil?
84
+ invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
85
+ end
86
+
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return false if @id.nil?
94
+ return false if @request_id.nil?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ id == o.id &&
104
+ request_id == o.request_id
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [id, request_id].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = FuseClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -0,0 +1,255 @@
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.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class CreateSpendPowerRequest
18
+ # Access token for authentication
19
+ attr_accessor :access_token
20
+
21
+ # The remote account id to create the spend power for.
22
+ attr_accessor :remote_account_id
23
+
24
+ # The spend power customization id.
25
+ attr_accessor :customization_id
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'access_token' => :'access_token',
31
+ :'remote_account_id' => :'remote_account_id',
32
+ :'customization_id' => :'customization_id'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'access_token' => :'String',
45
+ :'remote_account_id' => :'String',
46
+ :'customization_id' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::CreateSpendPowerRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::CreateSpendPowerRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'access_token')
72
+ self.access_token = attributes[:'access_token']
73
+ end
74
+
75
+ if attributes.key?(:'remote_account_id')
76
+ self.remote_account_id = attributes[:'remote_account_id']
77
+ end
78
+
79
+ if attributes.key?(:'customization_id')
80
+ self.customization_id = attributes[:'customization_id']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ if @access_token.nil?
89
+ invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
90
+ end
91
+
92
+ if @remote_account_id.nil?
93
+ invalid_properties.push('invalid value for "remote_account_id", remote_account_id cannot be nil.')
94
+ end
95
+
96
+ if @customization_id.nil?
97
+ invalid_properties.push('invalid value for "customization_id", customization_id cannot be nil.')
98
+ end
99
+
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ return false if @access_token.nil?
107
+ return false if @remote_account_id.nil?
108
+ return false if @customization_id.nil?
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ access_token == o.access_token &&
118
+ remote_account_id == o.remote_account_id &&
119
+ customization_id == o.customization_id
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [access_token, remote_account_id, customization_id].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ new.build_from_hash(attributes)
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ self.class.openapi_types.each_pair do |key, type|
148
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
+ self.send("#{key}=", nil)
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
154
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
155
+ end
156
+ elsif !attributes[self.class.attribute_map[key]].nil?
157
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
+ end
159
+ end
160
+
161
+ self
162
+ end
163
+
164
+ # Deserializes the data based on type
165
+ # @param string type Data type
166
+ # @param string value Value to be deserialized
167
+ # @return [Object] Deserialized data
168
+ def _deserialize(type, value)
169
+ case type.to_sym
170
+ when :Time
171
+ Time.parse(value)
172
+ when :Date
173
+ Date.parse(value)
174
+ when :String
175
+ value.to_s
176
+ when :Integer
177
+ value.to_i
178
+ when :Float
179
+ value.to_f
180
+ when :Boolean
181
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
+ true
183
+ else
184
+ false
185
+ end
186
+ when :Object
187
+ # generic object (usually a Hash), return directly
188
+ value
189
+ when /\AArray<(?<inner_type>.+)>\z/
190
+ inner_type = Regexp.last_match[:inner_type]
191
+ value.map { |v| _deserialize(inner_type, v) }
192
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
+ k_type = Regexp.last_match[:k_type]
194
+ v_type = Regexp.last_match[:v_type]
195
+ {}.tap do |hash|
196
+ value.each do |k, v|
197
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
198
+ end
199
+ end
200
+ else # model
201
+ # models (e.g. Pet) or oneOf
202
+ klass = FuseClient.const_get(type)
203
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
+ end
205
+ end
206
+
207
+ # Returns the string representation of the object
208
+ # @return [String] String presentation of the object
209
+ def to_s
210
+ to_hash.to_s
211
+ end
212
+
213
+ # to_body is an alias to to_hash (backward compatibility)
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_body
216
+ to_hash
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ if value.nil?
226
+ is_nullable = self.class.openapi_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+
253
+ end
254
+
255
+ end