fuse_client 1.0.33 → 1.0.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (443) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +7 -1
  4. data/docs/AddAccountEventsRequest.md +18 -0
  5. data/docs/AddAccountEventsRequestEventsInner.md +51 -0
  6. data/docs/{AddSpendPowerTransactionResponse.md → AddAccountEventsResponse.md} +2 -2
  7. data/docs/AssetReportTransaction.md +1 -1
  8. data/docs/CreateLinkTokenRequestTellerConfig.md +3 -1
  9. data/docs/CreateLinkTokenRequestTellerConfigAccountFilter.md +20 -0
  10. data/docs/CreateLinkTokenRequestTellerConfigAccountFilterCredit.md +49 -0
  11. data/docs/CreateLinkTokenRequestTellerConfigAccountFilterCreditOneOf.md +18 -0
  12. data/docs/CreateLinkTokenRequestTellerConfigAccountFilterDepository.md +49 -0
  13. data/docs/CreateLinkTokenRequestTellerConfigAccountFilterDepositoryOneOf.md +18 -0
  14. data/docs/CreateSessionRequest.md +1 -1
  15. data/docs/CreateSpendPowerCustomizationRequest.md +24 -0
  16. data/docs/CreateSpendPowerRequest.md +5 -5
  17. data/docs/CreateSpendPowerResponse.md +1 -1
  18. data/docs/DeleteSpendPowerResponse.md +2 -2
  19. data/docs/EnrichTransactionsRequest.md +18 -0
  20. data/docs/EnrichTransactionsResponse.md +18 -0
  21. data/docs/EnrichedTransaction.md +48 -0
  22. data/docs/EvalSpendPowerRequest.md +22 -0
  23. data/docs/EvalSpendPowerRequestEventsInner.md +20 -0
  24. data/docs/EvalSpendPowerResponse.md +24 -0
  25. data/docs/ExternalTransactionEvent.md +34 -0
  26. data/docs/ExternalTransactionEventStatus.md +15 -0
  27. data/docs/FinQLComparisonFeature.md +26 -0
  28. data/docs/FinQLFeature.md +61 -0
  29. data/docs/FinQLFeatureOneOf.md +18 -0
  30. data/docs/FinQLFeatureOneOf1.md +18 -0
  31. data/docs/FinQLFeatureOneOf2.md +18 -0
  32. data/docs/FinQLFeatureOneOf3.md +18 -0
  33. data/docs/FinQLFeatureOneOf4.md +18 -0
  34. data/docs/FinQLFeatureOneOf5.md +18 -0
  35. data/docs/FinQLFeatureOneOf6.md +18 -0
  36. data/docs/FinQLFeatureOneOf7.md +18 -0
  37. data/docs/FinQLFeatureRequest.md +15 -0
  38. data/docs/FinQLFrequencyFeature.md +20 -0
  39. data/docs/FinQLIndividualMerchantFeature.md +20 -0
  40. data/docs/FinQLInterestFeature.md +18 -0
  41. data/docs/FinQLMerchantCategoriesFeatureInner.md +20 -0
  42. data/docs/FinQLMerchantCategoriesFeatureInnerResultInner.md +20 -0
  43. data/docs/FinQLPromptRequest.md +22 -0
  44. data/docs/FinQLPromptResponse.md +20 -0
  45. data/docs/FinQLTimeBasedFeatureInner.md +20 -0
  46. data/docs/FinQLTopMerchantsFeatureInner.md +22 -0
  47. data/docs/FinanceScore.md +30 -0
  48. data/docs/FinancialConnectionDetails.md +7 -1
  49. data/docs/FinancialConnectionDetailsFlinks.md +18 -0
  50. data/docs/FinancialConnectionDetailsMono.md +18 -0
  51. data/docs/FinancialConnectionDetailsSnaptrade.md +22 -0
  52. data/docs/FinancialConnectionsAccount.md +4 -2
  53. data/docs/FinancialConnectionsAccountBalance.md +2 -2
  54. data/docs/FinancialConnectionsAccountCachedBalance.md +2 -2
  55. data/docs/FinancialConnectionsAccountDetails.md +3 -1
  56. data/docs/FinancialConnectionsAccountLiability.md +3 -1
  57. data/docs/FinancialConnectionsHolding.md +3 -3
  58. data/docs/FinancialConnectionsInvestmentSecurity.md +1 -1
  59. data/docs/FinancialConnectionsInvestmentTransaction.md +5 -3
  60. data/docs/FinancialConnectionsInvestmentTransactionSubtype.md +15 -0
  61. data/docs/FuseApi.md +272 -35
  62. data/docs/GetFinanceScoreResponse.md +20 -0
  63. data/docs/GetInvestmentTransactionsRequest.md +4 -4
  64. data/docs/GetSpendPowerCustomizationResponse.md +20 -0
  65. data/docs/InAppTransactionEvent.md +34 -0
  66. data/docs/InAppTransactionEventStatus.md +15 -0
  67. data/docs/Merchant.md +22 -0
  68. data/docs/MerchantLogo.md +18 -0
  69. data/docs/SpendPower.md +11 -7
  70. data/docs/SpendPowerApi.md +87 -44
  71. data/docs/SpendPowerCustomization.md +8 -4
  72. data/docs/SpendPowerTimeFrame.md +15 -0
  73. data/docs/Transaction.md +3 -1
  74. data/docs/TransactionCategory.md +20 -0
  75. data/docs/TransactionCategoryDetailed.md +15 -0
  76. data/docs/TransactionCategoryPrimary.md +15 -0
  77. data/docs/TransactionEventType.md +15 -0
  78. data/docs/TransactionToEnrich.md +26 -0
  79. data/docs/UpdateSpendPowerCustomizationRequest.md +24 -0
  80. data/docs/UpdatedBalanceEvent.md +26 -0
  81. data/fuse_client.gemspec +1 -1
  82. data/lib/fuse_client/api/fuse_api.rb +241 -32
  83. data/lib/fuse_client/api/spend_power_api.rb +79 -53
  84. data/lib/fuse_client/api_client.rb +1 -1
  85. data/lib/fuse_client/api_error.rb +1 -1
  86. data/lib/fuse_client/configuration.rb +11 -11
  87. data/lib/fuse_client/models/account_subtype.rb +1 -1
  88. data/lib/fuse_client/models/account_type.rb +1 -1
  89. data/lib/fuse_client/models/add_account_events_request.rb +254 -0
  90. data/lib/fuse_client/models/add_account_events_request_events_inner.rb +106 -0
  91. data/lib/fuse_client/models/{add_spend_power_transaction_response.rb → add_account_events_response.rb} +4 -4
  92. data/lib/fuse_client/models/aggregator.rb +3 -3
  93. data/lib/fuse_client/models/asset_report.rb +1 -1
  94. data/lib/fuse_client/models/asset_report_accounts_inner.rb +1 -1
  95. data/lib/fuse_client/models/asset_report_accounts_inner_balance.rb +1 -1
  96. data/lib/fuse_client/models/asset_report_accounts_inner_historical_balances_inner.rb +1 -1
  97. data/lib/fuse_client/models/asset_report_response.rb +1 -1
  98. data/lib/fuse_client/models/asset_report_transaction.rb +2 -2
  99. data/lib/fuse_client/models/country_code.rb +7 -2
  100. data/lib/fuse_client/models/create_asset_report_request.rb +1 -1
  101. data/lib/fuse_client/models/create_asset_report_response.rb +1 -1
  102. data/lib/fuse_client/models/create_entity_request.rb +1 -1
  103. data/lib/fuse_client/models/create_entity_response.rb +1 -1
  104. data/lib/fuse_client/models/create_link_token_request.rb +1 -1
  105. data/lib/fuse_client/models/create_link_token_request_mx.rb +1 -1
  106. data/lib/fuse_client/models/create_link_token_request_plaid.rb +1 -1
  107. data/lib/fuse_client/models/create_link_token_request_teller.rb +1 -1
  108. data/lib/fuse_client/models/create_link_token_request_teller_config.rb +14 -5
  109. data/lib/fuse_client/models/create_link_token_request_teller_config_account_filter.rb +229 -0
  110. data/lib/fuse_client/models/create_link_token_request_teller_config_account_filter_credit.rb +105 -0
  111. data/lib/fuse_client/models/create_link_token_request_teller_config_account_filter_credit_one_of.rb +243 -0
  112. data/lib/fuse_client/models/create_link_token_request_teller_config_account_filter_depository.rb +105 -0
  113. data/lib/fuse_client/models/create_link_token_request_teller_config_account_filter_depository_one_of.rb +243 -0
  114. data/lib/fuse_client/models/create_link_token_response.rb +1 -1
  115. data/lib/fuse_client/models/create_session_request.rb +2 -2
  116. data/lib/fuse_client/models/create_session_response.rb +1 -1
  117. data/lib/fuse_client/models/create_spend_power_customization_request.rb +357 -0
  118. data/lib/fuse_client/models/create_spend_power_customization_response.rb +1 -1
  119. data/lib/fuse_client/models/create_spend_power_request.rb +23 -23
  120. data/lib/fuse_client/models/create_spend_power_response.rb +2 -2
  121. data/lib/fuse_client/models/currency.rb +1 -1
  122. data/lib/fuse_client/models/delete_financial_connection_response.rb +1 -1
  123. data/lib/fuse_client/models/delete_spend_power_response.rb +12 -11
  124. data/lib/fuse_client/models/enrich_transactions_request.rb +226 -0
  125. data/lib/fuse_client/models/enrich_transactions_response.rb +222 -0
  126. data/lib/fuse_client/models/enriched_transaction.rb +407 -0
  127. data/lib/fuse_client/models/entity.rb +1 -1
  128. data/lib/fuse_client/models/eval_spend_power_request.rb +296 -0
  129. data/lib/fuse_client/models/eval_spend_power_request_events_inner.rb +239 -0
  130. data/lib/fuse_client/models/eval_spend_power_response.rb +250 -0
  131. data/lib/fuse_client/models/exchange_financial_connections_public_token_request.rb +1 -1
  132. data/lib/fuse_client/models/exchange_financial_connections_public_token_response.rb +1 -1
  133. data/lib/fuse_client/models/external_transaction_event.rb +370 -0
  134. data/lib/fuse_client/models/external_transaction_event_status.rb +40 -0
  135. data/lib/fuse_client/models/fin_ql_comparison_feature.rb +255 -0
  136. data/lib/fuse_client/models/fin_ql_feature.rb +111 -0
  137. data/lib/fuse_client/models/fin_ql_feature_one_of.rb +219 -0
  138. data/lib/fuse_client/models/fin_ql_feature_one_of1.rb +219 -0
  139. data/lib/fuse_client/models/fin_ql_feature_one_of2.rb +221 -0
  140. data/lib/fuse_client/models/fin_ql_feature_one_of3.rb +219 -0
  141. data/lib/fuse_client/models/fin_ql_feature_one_of4.rb +219 -0
  142. data/lib/fuse_client/models/fin_ql_feature_one_of5.rb +221 -0
  143. data/lib/fuse_client/models/fin_ql_feature_one_of6.rb +219 -0
  144. data/lib/fuse_client/models/fin_ql_feature_one_of7.rb +221 -0
  145. data/lib/fuse_client/models/fin_ql_feature_request.rb +46 -0
  146. data/lib/fuse_client/models/fin_ql_frequency_feature.rb +262 -0
  147. data/lib/fuse_client/models/fin_ql_individual_merchant_feature.rb +228 -0
  148. data/lib/fuse_client/models/fin_ql_interest_feature.rb +219 -0
  149. data/lib/fuse_client/models/fin_ql_merchant_categories_feature_inner.rb +230 -0
  150. data/lib/fuse_client/models/fin_ql_merchant_categories_feature_inner_result_inner.rb +228 -0
  151. data/lib/fuse_client/models/fin_ql_prompt_request.rb +276 -0
  152. data/lib/fuse_client/models/fin_ql_prompt_response.rb +234 -0
  153. data/lib/fuse_client/models/fin_ql_time_based_feature_inner.rb +228 -0
  154. data/lib/fuse_client/models/fin_ql_top_merchants_feature_inner.rb +237 -0
  155. data/lib/fuse_client/models/finance_score.rb +315 -0
  156. data/lib/fuse_client/models/financial_connection_data.rb +1 -1
  157. data/lib/fuse_client/models/financial_connection_details.rb +32 -5
  158. data/lib/fuse_client/models/financial_connection_details_flinks.rb +226 -0
  159. data/lib/fuse_client/models/financial_connection_details_mono.rb +226 -0
  160. data/lib/fuse_client/models/financial_connection_details_mx.rb +1 -1
  161. data/lib/fuse_client/models/financial_connection_details_plaid.rb +1 -1
  162. data/lib/fuse_client/models/financial_connection_details_snaptrade.rb +256 -0
  163. data/lib/fuse_client/models/financial_connection_details_teller.rb +1 -1
  164. data/lib/fuse_client/models/financial_connections_account.rb +16 -6
  165. data/lib/fuse_client/models/financial_connections_account_balance.rb +3 -3
  166. data/lib/fuse_client/models/financial_connections_account_cached_balance.rb +3 -3
  167. data/lib/fuse_client/models/financial_connections_account_details.rb +15 -5
  168. data/lib/fuse_client/models/financial_connections_account_details_ach.rb +1 -1
  169. data/lib/fuse_client/models/financial_connections_account_institution.rb +1 -1
  170. data/lib/fuse_client/models/financial_connections_account_liability.rb +13 -3
  171. data/lib/fuse_client/models/financial_connections_account_liability_all_of.rb +1 -1
  172. data/lib/fuse_client/models/financial_connections_account_liability_all_of_aprs.rb +1 -1
  173. data/lib/fuse_client/models/financial_connections_holding.rb +4 -4
  174. data/lib/fuse_client/models/financial_connections_investment_security.rb +2 -2
  175. data/lib/fuse_client/models/financial_connections_investment_security_exchange.rb +1 -1
  176. data/lib/fuse_client/models/financial_connections_investment_security_type.rb +1 -1
  177. data/lib/fuse_client/models/financial_connections_investment_transaction.rb +14 -5
  178. data/lib/fuse_client/models/financial_connections_investment_transaction_subtype.rb +87 -0
  179. data/lib/fuse_client/models/financial_connections_owner.rb +1 -1
  180. data/lib/fuse_client/models/financial_connections_owner_addresses_inner.rb +1 -1
  181. data/lib/fuse_client/models/financial_connections_owner_addresses_inner_data.rb +1 -1
  182. data/lib/fuse_client/models/financial_connections_owner_emails_inner.rb +1 -1
  183. data/lib/fuse_client/models/financial_connections_owner_names_inner.rb +1 -1
  184. data/lib/fuse_client/models/financial_connections_owner_phone_numbers_inner.rb +1 -1
  185. data/lib/fuse_client/models/financial_institution.rb +1 -1
  186. data/lib/fuse_client/models/financial_institution_logo.rb +1 -1
  187. data/lib/fuse_client/models/fuse_api_aggregator_error.rb +1 -1
  188. data/lib/fuse_client/models/fuse_api_error.rb +1 -1
  189. data/lib/fuse_client/models/fuse_api_error_code.rb +7 -2
  190. data/lib/fuse_client/models/fuse_api_error_data.rb +1 -1
  191. data/lib/fuse_client/models/fuse_api_error_type.rb +1 -1
  192. data/lib/fuse_client/models/fuse_api_warning.rb +1 -1
  193. data/lib/fuse_client/models/fuse_api_warning_data.rb +1 -1
  194. data/lib/fuse_client/models/fuse_api_warning_data_warnings_inner.rb +1 -1
  195. data/lib/fuse_client/models/get_asset_report_request.rb +1 -1
  196. data/lib/fuse_client/models/get_entity_response.rb +1 -1
  197. data/lib/fuse_client/models/get_finance_score_response.rb +239 -0
  198. data/lib/fuse_client/models/get_financial_connection_response.rb +1 -1
  199. data/lib/fuse_client/models/get_financial_connections_account_details_request.rb +1 -1
  200. data/lib/fuse_client/models/get_financial_connections_account_details_response.rb +1 -1
  201. data/lib/fuse_client/models/get_financial_connections_account_statement_request.rb +1 -1
  202. data/lib/fuse_client/models/get_financial_connections_account_statement_response.rb +1 -1
  203. data/lib/fuse_client/models/get_financial_connections_accounts_request.rb +1 -1
  204. data/lib/fuse_client/models/get_financial_connections_accounts_response.rb +1 -1
  205. data/lib/fuse_client/models/get_financial_connections_balance_request.rb +1 -1
  206. data/lib/fuse_client/models/get_financial_connections_balance_request_options.rb +1 -1
  207. data/lib/fuse_client/models/get_financial_connections_balance_response.rb +1 -1
  208. data/lib/fuse_client/models/get_financial_connections_owners_request.rb +1 -1
  209. data/lib/fuse_client/models/get_financial_connections_owners_response.rb +1 -1
  210. data/lib/fuse_client/models/get_financial_connections_owners_response_accounts_inner.rb +1 -1
  211. data/lib/fuse_client/models/get_financial_connections_transactions_request.rb +1 -1
  212. data/lib/fuse_client/models/get_financial_connections_transactions_response.rb +1 -1
  213. data/lib/fuse_client/models/get_financial_institution_response.rb +1 -1
  214. data/lib/fuse_client/models/get_investment_holdings_request.rb +1 -1
  215. data/lib/fuse_client/models/get_investment_holdings_request_options.rb +1 -1
  216. data/lib/fuse_client/models/get_investment_holdings_response.rb +1 -1
  217. data/lib/fuse_client/models/get_investment_transactions_request.rb +38 -10
  218. data/lib/fuse_client/models/get_investment_transactions_request_options.rb +1 -1
  219. data/lib/fuse_client/models/get_investment_transactions_response.rb +1 -1
  220. data/lib/fuse_client/models/get_liabilities_request.rb +1 -1
  221. data/lib/fuse_client/models/get_liabilities_response.rb +1 -1
  222. data/lib/fuse_client/models/get_spend_power_customization_response.rb +239 -0
  223. data/lib/fuse_client/models/get_spend_power_response.rb +1 -1
  224. data/lib/fuse_client/models/in_app_transaction_event.rb +369 -0
  225. data/lib/fuse_client/models/in_app_transaction_event_status.rb +41 -0
  226. data/lib/fuse_client/models/merchant.rb +249 -0
  227. data/lib/fuse_client/models/merchant_logo.rb +220 -0
  228. data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data.rb +1 -1
  229. data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data_mx.rb +1 -1
  230. data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data_plaid.rb +1 -1
  231. data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data_teller.rb +1 -1
  232. data/lib/fuse_client/models/migrate_financial_connections_token_request.rb +1 -1
  233. data/lib/fuse_client/models/migrate_financial_connections_token_request_entity.rb +1 -1
  234. data/lib/fuse_client/models/migrate_financial_connections_token_response.rb +1 -1
  235. data/lib/fuse_client/models/product.rb +1 -1
  236. data/lib/fuse_client/models/refresh_asset_report_request.rb +1 -1
  237. data/lib/fuse_client/models/refresh_asset_report_response.rb +1 -1
  238. data/lib/fuse_client/models/spend_power.rb +51 -22
  239. data/lib/fuse_client/models/spend_power_customization.rb +91 -17
  240. data/lib/fuse_client/models/spend_power_time_frame.rb +41 -0
  241. data/lib/fuse_client/models/sync_financial_connections_data_response.rb +1 -1
  242. data/lib/fuse_client/models/sync_transactions_request.rb +1 -1
  243. data/lib/fuse_client/models/sync_transactions_response.rb +1 -1
  244. data/lib/fuse_client/models/sync_transactions_response_removed_inner.rb +1 -1
  245. data/lib/fuse_client/models/transaction.rb +13 -3
  246. data/lib/fuse_client/models/transaction_category.rb +260 -0
  247. data/lib/fuse_client/models/transaction_category_detailed.rb +156 -0
  248. data/lib/fuse_client/models/transaction_category_primary.rb +59 -0
  249. data/lib/fuse_client/models/transaction_event_type.rb +65 -0
  250. data/lib/fuse_client/models/transaction_merchant.rb +1 -1
  251. data/lib/fuse_client/models/{add_spend_power_transaction_request.rb → transaction_to_enrich.rb} +48 -28
  252. data/lib/fuse_client/models/update_entity_request.rb +1 -1
  253. data/lib/fuse_client/models/update_entity_response.rb +1 -1
  254. data/lib/fuse_client/models/update_spend_power_customization_request.rb +325 -0
  255. data/lib/fuse_client/models/update_spend_power_customization_response.rb +1 -1
  256. data/lib/fuse_client/models/updated_balance_event.rb +308 -0
  257. data/lib/fuse_client/models/webhook_event.rb +1 -1
  258. data/lib/fuse_client/models/webhook_source.rb +3 -2
  259. data/lib/fuse_client/models/webhook_type.rb +1 -1
  260. data/lib/fuse_client/version.rb +2 -2
  261. data/lib/fuse_client.rb +57 -3
  262. data/spec/api/fuse_api_spec.rb +72 -34
  263. data/spec/api/spend_power_api_spec.rb +16 -19
  264. data/spec/api_client_spec.rb +1 -1
  265. data/spec/configuration_spec.rb +1 -1
  266. data/spec/models/account_subtype_spec.rb +1 -1
  267. data/spec/models/account_type_spec.rb +1 -1
  268. data/spec/models/add_account_events_request_events_inner_spec.rb +31 -0
  269. data/spec/models/add_account_events_request_spec.rb +34 -0
  270. data/spec/models/add_account_events_response_spec.rb +40 -0
  271. data/spec/models/aggregator_spec.rb +1 -1
  272. data/spec/models/asset_report_accounts_inner_balance_spec.rb +4 -4
  273. data/spec/models/asset_report_accounts_inner_historical_balances_inner_spec.rb +4 -4
  274. data/spec/models/asset_report_accounts_inner_spec.rb +5 -5
  275. data/spec/models/asset_report_response_spec.rb +3 -3
  276. data/spec/models/asset_report_spec.rb +6 -6
  277. data/spec/models/asset_report_transaction_spec.rb +11 -11
  278. data/spec/models/country_code_spec.rb +1 -1
  279. data/spec/models/create_asset_report_request_spec.rb +3 -3
  280. data/spec/models/create_asset_report_response_spec.rb +4 -4
  281. data/spec/models/create_entity_request_spec.rb +5 -5
  282. data/spec/models/create_entity_response_spec.rb +6 -6
  283. data/spec/models/create_link_token_request_mx_spec.rb +2 -2
  284. data/spec/models/create_link_token_request_plaid_spec.rb +2 -2
  285. data/spec/models/create_link_token_request_spec.rb +9 -9
  286. data/spec/models/create_link_token_request_teller_config_account_filter_credit_one_of_spec.rb +38 -0
  287. data/spec/models/create_link_token_request_teller_config_account_filter_credit_spec.rb +31 -0
  288. data/spec/models/create_link_token_request_teller_config_account_filter_depository_one_of_spec.rb +38 -0
  289. data/spec/models/create_link_token_request_teller_config_account_filter_depository_spec.rb +31 -0
  290. data/spec/models/create_link_token_request_teller_config_account_filter_spec.rb +40 -0
  291. data/spec/models/create_link_token_request_teller_config_spec.rb +8 -2
  292. data/spec/models/create_link_token_request_teller_spec.rb +2 -2
  293. data/spec/models/create_link_token_response_spec.rb +3 -3
  294. data/spec/models/create_session_request_spec.rb +7 -7
  295. data/spec/models/create_session_response_spec.rb +4 -4
  296. data/spec/models/create_spend_power_customization_request_spec.rb +52 -0
  297. data/spec/models/create_spend_power_customization_response_spec.rb +3 -3
  298. data/spec/models/create_spend_power_request_spec.rb +6 -6
  299. data/spec/models/create_spend_power_response_spec.rb +3 -3
  300. data/spec/models/currency_spec.rb +3 -3
  301. data/spec/models/delete_financial_connection_response_spec.rb +4 -4
  302. data/spec/models/delete_spend_power_response_spec.rb +4 -4
  303. data/spec/models/enrich_transactions_request_spec.rb +34 -0
  304. data/spec/models/enrich_transactions_response_spec.rb +34 -0
  305. data/spec/models/enriched_transaction_spec.rb +128 -0
  306. data/spec/models/entity_spec.rb +4 -4
  307. data/spec/models/eval_spend_power_request_events_inner_spec.rb +40 -0
  308. data/spec/models/eval_spend_power_request_spec.rb +46 -0
  309. data/spec/models/eval_spend_power_response_spec.rb +52 -0
  310. data/spec/models/exchange_financial_connections_public_token_request_spec.rb +2 -2
  311. data/spec/models/exchange_financial_connections_public_token_response_spec.rb +4 -4
  312. data/spec/models/external_transaction_event_spec.rb +86 -0
  313. data/spec/models/external_transaction_event_status_spec.rb +28 -0
  314. data/spec/models/fin_ql_comparison_feature_spec.rb +58 -0
  315. data/spec/models/fin_ql_feature_one_of1_spec.rb +34 -0
  316. data/spec/models/fin_ql_feature_one_of2_spec.rb +34 -0
  317. data/spec/models/fin_ql_feature_one_of3_spec.rb +34 -0
  318. data/spec/models/fin_ql_feature_one_of4_spec.rb +34 -0
  319. data/spec/models/fin_ql_feature_one_of5_spec.rb +34 -0
  320. data/spec/models/fin_ql_feature_one_of6_spec.rb +34 -0
  321. data/spec/models/fin_ql_feature_one_of7_spec.rb +34 -0
  322. data/spec/models/fin_ql_feature_one_of_spec.rb +34 -0
  323. data/spec/models/fin_ql_feature_request_spec.rb +28 -0
  324. data/spec/models/fin_ql_feature_spec.rb +31 -0
  325. data/spec/models/fin_ql_frequency_feature_spec.rb +44 -0
  326. data/spec/models/fin_ql_individual_merchant_feature_spec.rb +40 -0
  327. data/spec/models/fin_ql_interest_feature_spec.rb +34 -0
  328. data/spec/models/fin_ql_merchant_categories_feature_inner_result_inner_spec.rb +40 -0
  329. data/spec/models/fin_ql_merchant_categories_feature_inner_spec.rb +40 -0
  330. data/spec/models/fin_ql_prompt_request_spec.rb +46 -0
  331. data/spec/models/fin_ql_prompt_response_spec.rb +40 -0
  332. data/spec/models/fin_ql_time_based_feature_inner_spec.rb +40 -0
  333. data/spec/models/fin_ql_top_merchants_feature_inner_spec.rb +46 -0
  334. data/spec/models/finance_score_spec.rb +70 -0
  335. data/spec/models/financial_connection_data_spec.rb +3 -3
  336. data/spec/models/financial_connection_details_flinks_spec.rb +34 -0
  337. data/spec/models/financial_connection_details_mono_spec.rb +34 -0
  338. data/spec/models/financial_connection_details_mx_spec.rb +3 -3
  339. data/spec/models/financial_connection_details_plaid_spec.rb +3 -3
  340. data/spec/models/financial_connection_details_snaptrade_spec.rb +46 -0
  341. data/spec/models/financial_connection_details_spec.rb +27 -9
  342. data/spec/models/financial_connection_details_teller_spec.rb +3 -3
  343. data/spec/models/financial_connections_account_balance_spec.rb +6 -6
  344. data/spec/models/financial_connections_account_cached_balance_spec.rb +5 -5
  345. data/spec/models/financial_connections_account_details_ach_spec.rb +5 -5
  346. data/spec/models/financial_connections_account_details_spec.rb +9 -3
  347. data/spec/models/financial_connections_account_institution_spec.rb +2 -2
  348. data/spec/models/financial_connections_account_liability_all_of_aprs_spec.rb +3 -3
  349. data/spec/models/financial_connections_account_liability_all_of_spec.rb +8 -8
  350. data/spec/models/financial_connections_account_liability_spec.rb +22 -16
  351. data/spec/models/financial_connections_account_spec.rb +15 -9
  352. data/spec/models/financial_connections_holding_spec.rb +7 -7
  353. data/spec/models/financial_connections_investment_security_exchange_spec.rb +2 -2
  354. data/spec/models/financial_connections_investment_security_spec.rb +11 -11
  355. data/spec/models/financial_connections_investment_security_type_spec.rb +1 -1
  356. data/spec/models/financial_connections_investment_transaction_spec.rb +19 -13
  357. data/spec/models/financial_connections_investment_transaction_subtype_spec.rb +28 -0
  358. data/spec/models/financial_connections_owner_addresses_inner_data_spec.rb +6 -6
  359. data/spec/models/financial_connections_owner_addresses_inner_spec.rb +3 -3
  360. data/spec/models/financial_connections_owner_emails_inner_spec.rb +4 -4
  361. data/spec/models/financial_connections_owner_names_inner_spec.rb +3 -3
  362. data/spec/models/financial_connections_owner_phone_numbers_inner_spec.rb +4 -4
  363. data/spec/models/financial_connections_owner_spec.rb +5 -5
  364. data/spec/models/financial_institution_logo_spec.rb +4 -4
  365. data/spec/models/financial_institution_spec.rb +6 -6
  366. data/spec/models/fuse_api_aggregator_error_spec.rb +7 -7
  367. data/spec/models/fuse_api_error_code_spec.rb +1 -1
  368. data/spec/models/fuse_api_error_data_spec.rb +3 -3
  369. data/spec/models/fuse_api_error_spec.rb +8 -8
  370. data/spec/models/fuse_api_error_type_spec.rb +1 -1
  371. data/spec/models/fuse_api_warning_data_spec.rb +3 -3
  372. data/spec/models/fuse_api_warning_data_warnings_inner_spec.rb +6 -6
  373. data/spec/models/fuse_api_warning_spec.rb +7 -7
  374. data/spec/models/get_asset_report_request_spec.rb +3 -3
  375. data/spec/models/get_entity_response_spec.rb +7 -7
  376. data/spec/models/get_finance_score_response_spec.rb +40 -0
  377. data/spec/models/get_financial_connection_response_spec.rb +3 -3
  378. data/spec/models/get_financial_connections_account_details_request_spec.rb +2 -2
  379. data/spec/models/get_financial_connections_account_details_response_spec.rb +4 -4
  380. data/spec/models/get_financial_connections_account_statement_request_spec.rb +4 -4
  381. data/spec/models/get_financial_connections_account_statement_response_spec.rb +3 -3
  382. data/spec/models/get_financial_connections_accounts_request_spec.rb +2 -2
  383. data/spec/models/get_financial_connections_accounts_response_spec.rb +4 -4
  384. data/spec/models/get_financial_connections_balance_request_options_spec.rb +2 -2
  385. data/spec/models/get_financial_connections_balance_request_spec.rb +3 -3
  386. data/spec/models/get_financial_connections_balance_response_spec.rb +3 -3
  387. data/spec/models/get_financial_connections_owners_request_spec.rb +2 -2
  388. data/spec/models/get_financial_connections_owners_response_accounts_inner_spec.rb +4 -4
  389. data/spec/models/get_financial_connections_owners_response_spec.rb +2 -2
  390. data/spec/models/get_financial_connections_transactions_request_spec.rb +6 -6
  391. data/spec/models/get_financial_connections_transactions_response_spec.rb +4 -4
  392. data/spec/models/get_financial_institution_response_spec.rb +3 -3
  393. data/spec/models/get_investment_holdings_request_options_spec.rb +2 -2
  394. data/spec/models/get_investment_holdings_request_spec.rb +3 -3
  395. data/spec/models/get_investment_holdings_response_spec.rb +4 -4
  396. data/spec/models/get_investment_transactions_request_options_spec.rb +2 -2
  397. data/spec/models/get_investment_transactions_request_spec.rb +7 -7
  398. data/spec/models/get_investment_transactions_response_spec.rb +5 -5
  399. data/spec/models/get_liabilities_request_spec.rb +2 -2
  400. data/spec/models/get_liabilities_response_spec.rb +3 -3
  401. data/spec/models/get_spend_power_customization_response_spec.rb +40 -0
  402. data/spec/models/get_spend_power_response_spec.rb +3 -3
  403. data/spec/models/in_app_transaction_event_spec.rb +86 -0
  404. data/spec/models/in_app_transaction_event_status_spec.rb +28 -0
  405. data/spec/models/merchant_logo_spec.rb +34 -0
  406. data/spec/models/merchant_spec.rb +46 -0
  407. data/spec/models/migrate_financial_connections_aggregator_connection_data_mx_spec.rb +3 -3
  408. data/spec/models/migrate_financial_connections_aggregator_connection_data_plaid_spec.rb +3 -3
  409. data/spec/models/migrate_financial_connections_aggregator_connection_data_spec.rb +4 -4
  410. data/spec/models/migrate_financial_connections_aggregator_connection_data_teller_spec.rb +2 -2
  411. data/spec/models/migrate_financial_connections_token_request_entity_spec.rb +2 -2
  412. data/spec/models/migrate_financial_connections_token_request_spec.rb +5 -5
  413. data/spec/models/migrate_financial_connections_token_response_spec.rb +5 -5
  414. data/spec/models/product_spec.rb +1 -1
  415. data/spec/models/refresh_asset_report_request_spec.rb +4 -4
  416. data/spec/models/refresh_asset_report_response_spec.rb +4 -4
  417. data/spec/models/spend_power_customization_spec.rb +16 -8
  418. data/spec/models/spend_power_spec.rb +21 -9
  419. data/spec/models/spend_power_time_frame_spec.rb +28 -0
  420. data/spec/models/sync_financial_connections_data_response_spec.rb +3 -3
  421. data/spec/models/sync_transactions_request_spec.rb +4 -4
  422. data/spec/models/sync_transactions_response_removed_inner_spec.rb +2 -2
  423. data/spec/models/sync_transactions_response_spec.rb +7 -7
  424. data/spec/models/transaction_category_detailed_spec.rb +28 -0
  425. data/spec/models/transaction_category_primary_spec.rb +28 -0
  426. data/spec/models/transaction_category_spec.rb +40 -0
  427. data/spec/models/transaction_event_type_spec.rb +28 -0
  428. data/spec/models/transaction_merchant_spec.rb +2 -2
  429. data/spec/models/transaction_spec.rb +18 -12
  430. data/spec/models/transaction_to_enrich_spec.rb +62 -0
  431. data/spec/models/update_entity_request_spec.rb +4 -4
  432. data/spec/models/update_entity_response_spec.rb +6 -6
  433. data/spec/models/update_spend_power_customization_request_spec.rb +52 -0
  434. data/spec/models/update_spend_power_customization_response_spec.rb +3 -3
  435. data/spec/models/updated_balance_event_spec.rb +62 -0
  436. data/spec/models/webhook_event_spec.rb +10 -10
  437. data/spec/models/webhook_source_spec.rb +1 -1
  438. data/spec/models/webhook_type_spec.rb +1 -1
  439. data/spec/spec_helper.rb +1 -1
  440. metadata +226 -10
  441. data/docs/AddSpendPowerTransactionRequest.md +0 -22
  442. data/spec/models/add_spend_power_transaction_request_spec.rb +0 -50
  443. data/spec/models/add_spend_power_transaction_response_spec.rb +0 -40
@@ -0,0 +1,370 @@
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.6.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class ExternalTransactionEvent
18
+ # ID of the transaction
19
+ attr_accessor :id
20
+
21
+ attr_accessor :event_type
22
+
23
+ attr_accessor :status
24
+
25
+ # Use positive values to represent money going out and negative to represent money going in.
26
+ attr_accessor :amount
27
+
28
+ # The ISO-4217 currency code.
29
+ attr_accessor :iso_currency_code
30
+
31
+ attr_accessor :transaction_type
32
+
33
+ attr_accessor :merchant_name
34
+
35
+ # Datetime of the transaction In ISO-8601 format
36
+ attr_accessor :timestamp
37
+
38
+ # The running balance of the account after the transaction has occurred, in cents
39
+ attr_accessor :balance
40
+
41
+ class EnumAttributeValidator
42
+ attr_reader :datatype
43
+ attr_reader :allowable_values
44
+
45
+ def initialize(datatype, allowable_values)
46
+ @allowable_values = allowable_values.map do |value|
47
+ case datatype.to_s
48
+ when /Integer/i
49
+ value.to_i
50
+ when /Float/i
51
+ value.to_f
52
+ else
53
+ value
54
+ end
55
+ end
56
+ end
57
+
58
+ def valid?(value)
59
+ !value || allowable_values.include?(value)
60
+ end
61
+ end
62
+
63
+ # Attribute mapping from ruby-style variable name to JSON key.
64
+ def self.attribute_map
65
+ {
66
+ :'id' => :'id',
67
+ :'event_type' => :'event_type',
68
+ :'status' => :'status',
69
+ :'amount' => :'amount',
70
+ :'iso_currency_code' => :'iso_currency_code',
71
+ :'transaction_type' => :'transaction_type',
72
+ :'merchant_name' => :'merchant_name',
73
+ :'timestamp' => :'timestamp',
74
+ :'balance' => :'balance'
75
+ }
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'id' => :'String',
87
+ :'event_type' => :'String',
88
+ :'status' => :'ExternalTransactionEventStatus',
89
+ :'amount' => :'Float',
90
+ :'iso_currency_code' => :'String',
91
+ :'transaction_type' => :'TransactionEventType',
92
+ :'merchant_name' => :'String',
93
+ :'timestamp' => :'String',
94
+ :'balance' => :'Float'
95
+ }
96
+ end
97
+
98
+ # List of attributes with nullable: true
99
+ def self.openapi_nullable
100
+ Set.new([
101
+ ])
102
+ end
103
+
104
+ # Initializes the object
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ def initialize(attributes = {})
107
+ if (!attributes.is_a?(Hash))
108
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::ExternalTransactionEvent` initialize method"
109
+ end
110
+
111
+ # check to see if the attribute exists and convert string to symbol for hash key
112
+ attributes = attributes.each_with_object({}) { |(k, v), h|
113
+ if (!self.class.attribute_map.key?(k.to_sym))
114
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::ExternalTransactionEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
115
+ end
116
+ h[k.to_sym] = v
117
+ }
118
+
119
+ if attributes.key?(:'id')
120
+ self.id = attributes[:'id']
121
+ end
122
+
123
+ if attributes.key?(:'event_type')
124
+ self.event_type = attributes[:'event_type']
125
+ end
126
+
127
+ if attributes.key?(:'status')
128
+ self.status = attributes[:'status']
129
+ end
130
+
131
+ if attributes.key?(:'amount')
132
+ self.amount = attributes[:'amount']
133
+ end
134
+
135
+ if attributes.key?(:'iso_currency_code')
136
+ self.iso_currency_code = attributes[:'iso_currency_code']
137
+ end
138
+
139
+ if attributes.key?(:'transaction_type')
140
+ self.transaction_type = attributes[:'transaction_type']
141
+ end
142
+
143
+ if attributes.key?(:'merchant_name')
144
+ self.merchant_name = attributes[:'merchant_name']
145
+ end
146
+
147
+ if attributes.key?(:'timestamp')
148
+ self.timestamp = attributes[:'timestamp']
149
+ end
150
+
151
+ if attributes.key?(:'balance')
152
+ self.balance = attributes[:'balance']
153
+ end
154
+ end
155
+
156
+ # Show invalid properties with the reasons. Usually used together with valid?
157
+ # @return Array for valid properties with the reasons
158
+ def list_invalid_properties
159
+ invalid_properties = Array.new
160
+ if @id.nil?
161
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
162
+ end
163
+
164
+ if @event_type.nil?
165
+ invalid_properties.push('invalid value for "event_type", event_type cannot be nil.')
166
+ end
167
+
168
+ if @status.nil?
169
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
170
+ end
171
+
172
+ if @amount.nil?
173
+ invalid_properties.push('invalid value for "amount", amount cannot be nil.')
174
+ end
175
+
176
+ if @iso_currency_code.nil?
177
+ invalid_properties.push('invalid value for "iso_currency_code", iso_currency_code cannot be nil.')
178
+ end
179
+
180
+ if @transaction_type.nil?
181
+ invalid_properties.push('invalid value for "transaction_type", transaction_type cannot be nil.')
182
+ end
183
+
184
+ if @merchant_name.nil?
185
+ invalid_properties.push('invalid value for "merchant_name", merchant_name cannot be nil.')
186
+ end
187
+
188
+ if @timestamp.nil?
189
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
190
+ end
191
+
192
+ invalid_properties
193
+ end
194
+
195
+ # Check to see if the all the properties in the model are valid
196
+ # @return true if the model is valid
197
+ def valid?
198
+ return false if @id.nil?
199
+ return false if @event_type.nil?
200
+ event_type_validator = EnumAttributeValidator.new('String', ["external_transaction"])
201
+ return false unless event_type_validator.valid?(@event_type)
202
+ return false if @status.nil?
203
+ return false if @amount.nil?
204
+ return false if @iso_currency_code.nil?
205
+ return false if @transaction_type.nil?
206
+ return false if @merchant_name.nil?
207
+ return false if @timestamp.nil?
208
+ true
209
+ end
210
+
211
+ # Custom attribute writer method checking allowed values (enum).
212
+ # @param [Object] event_type Object to be assigned
213
+ def event_type=(event_type)
214
+ validator = EnumAttributeValidator.new('String', ["external_transaction"])
215
+ unless validator.valid?(event_type)
216
+ fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
217
+ end
218
+ @event_type = event_type
219
+ end
220
+
221
+ # Checks equality by comparing each attribute.
222
+ # @param [Object] Object to be compared
223
+ def ==(o)
224
+ return true if self.equal?(o)
225
+ self.class == o.class &&
226
+ id == o.id &&
227
+ event_type == o.event_type &&
228
+ status == o.status &&
229
+ amount == o.amount &&
230
+ iso_currency_code == o.iso_currency_code &&
231
+ transaction_type == o.transaction_type &&
232
+ merchant_name == o.merchant_name &&
233
+ timestamp == o.timestamp &&
234
+ balance == o.balance
235
+ end
236
+
237
+ # @see the `==` method
238
+ # @param [Object] Object to be compared
239
+ def eql?(o)
240
+ self == o
241
+ end
242
+
243
+ # Calculates hash code according to all attributes.
244
+ # @return [Integer] Hash code
245
+ def hash
246
+ [id, event_type, status, amount, iso_currency_code, transaction_type, merchant_name, timestamp, balance].hash
247
+ end
248
+
249
+ # Builds the object from hash
250
+ # @param [Hash] attributes Model attributes in the form of hash
251
+ # @return [Object] Returns the model itself
252
+ def self.build_from_hash(attributes)
253
+ new.build_from_hash(attributes)
254
+ end
255
+
256
+ # Builds the object from hash
257
+ # @param [Hash] attributes Model attributes in the form of hash
258
+ # @return [Object] Returns the model itself
259
+ def build_from_hash(attributes)
260
+ return nil unless attributes.is_a?(Hash)
261
+ attributes = attributes.transform_keys(&:to_sym)
262
+ self.class.openapi_types.each_pair do |key, type|
263
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
264
+ self.send("#{key}=", nil)
265
+ elsif type =~ /\AArray<(.*)>/i
266
+ # check to ensure the input is an array given that the attribute
267
+ # is documented as an array but the input is not
268
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
269
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
270
+ end
271
+ elsif !attributes[self.class.attribute_map[key]].nil?
272
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
273
+ end
274
+ end
275
+
276
+ self
277
+ end
278
+
279
+ # Deserializes the data based on type
280
+ # @param string type Data type
281
+ # @param string value Value to be deserialized
282
+ # @return [Object] Deserialized data
283
+ def _deserialize(type, value)
284
+ case type.to_sym
285
+ when :Time
286
+ Time.parse(value)
287
+ when :Date
288
+ Date.parse(value)
289
+ when :String
290
+ value.to_s
291
+ when :Integer
292
+ value.to_i
293
+ when :Float
294
+ value.to_f
295
+ when :Boolean
296
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
297
+ true
298
+ else
299
+ false
300
+ end
301
+ when :Object
302
+ # generic object (usually a Hash), return directly
303
+ value
304
+ when /\AArray<(?<inner_type>.+)>\z/
305
+ inner_type = Regexp.last_match[:inner_type]
306
+ value.map { |v| _deserialize(inner_type, v) }
307
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
308
+ k_type = Regexp.last_match[:k_type]
309
+ v_type = Regexp.last_match[:v_type]
310
+ {}.tap do |hash|
311
+ value.each do |k, v|
312
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
313
+ end
314
+ end
315
+ else # model
316
+ # models (e.g. Pet) or oneOf
317
+ klass = FuseClient.const_get(type)
318
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
319
+ end
320
+ end
321
+
322
+ # Returns the string representation of the object
323
+ # @return [String] String presentation of the object
324
+ def to_s
325
+ to_hash.to_s
326
+ end
327
+
328
+ # to_body is an alias to to_hash (backward compatibility)
329
+ # @return [Hash] Returns the object in the form of hash
330
+ def to_body
331
+ to_hash
332
+ end
333
+
334
+ # Returns the object in the form of hash
335
+ # @return [Hash] Returns the object in the form of hash
336
+ def to_hash
337
+ hash = {}
338
+ self.class.attribute_map.each_pair do |attr, param|
339
+ value = self.send(attr)
340
+ if value.nil?
341
+ is_nullable = self.class.openapi_nullable.include?(attr)
342
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
343
+ end
344
+
345
+ hash[param] = _to_hash(value)
346
+ end
347
+ hash
348
+ end
349
+
350
+ # Outputs non-array value in the form of hash
351
+ # For object, use to_hash. Otherwise, just return the value
352
+ # @param [Object] value Any valid value
353
+ # @return [Hash] Returns the value in the form of hash
354
+ def _to_hash(value)
355
+ if value.is_a?(Array)
356
+ value.compact.map { |v| _to_hash(v) }
357
+ elsif value.is_a?(Hash)
358
+ {}.tap do |hash|
359
+ value.each { |k, v| hash[k] = _to_hash(v) }
360
+ end
361
+ elsif value.respond_to? :to_hash
362
+ value.to_hash
363
+ else
364
+ value
365
+ end
366
+ end
367
+
368
+ end
369
+
370
+ end
@@ -0,0 +1,40 @@
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.6.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class ExternalTransactionEventStatus
18
+ PENDING = "pending".freeze
19
+ POSTED = "posted".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [PENDING, POSTED].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if ExternalTransactionEventStatus.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #ExternalTransactionEventStatus"
38
+ end
39
+ end
40
+ 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.6.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class FinQLComparisonFeature
18
+ attr_accessor :merchant_a
19
+
20
+ attr_accessor :merchant_b
21
+
22
+ attr_accessor :comparison_metric
23
+
24
+ attr_accessor :value_a
25
+
26
+ attr_accessor :value_b
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'merchant_a' => :'merchant_a',
32
+ :'merchant_b' => :'merchant_b',
33
+ :'comparison_metric' => :'comparison_metric',
34
+ :'value_a' => :'value_a',
35
+ :'value_b' => :'value_b'
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
+ :'merchant_a' => :'Merchant',
48
+ :'merchant_b' => :'Merchant',
49
+ :'comparison_metric' => :'String',
50
+ :'value_a' => :'String',
51
+ :'value_b' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::FinQLComparisonFeature` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::FinQLComparisonFeature`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'merchant_a')
77
+ self.merchant_a = attributes[:'merchant_a']
78
+ end
79
+
80
+ if attributes.key?(:'merchant_b')
81
+ self.merchant_b = attributes[:'merchant_b']
82
+ end
83
+
84
+ if attributes.key?(:'comparison_metric')
85
+ self.comparison_metric = attributes[:'comparison_metric']
86
+ end
87
+
88
+ if attributes.key?(:'value_a')
89
+ self.value_a = attributes[:'value_a']
90
+ end
91
+
92
+ if attributes.key?(:'value_b')
93
+ self.value_b = attributes[:'value_b']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ merchant_a == o.merchant_a &&
116
+ merchant_b == o.merchant_b &&
117
+ comparison_metric == o.comparison_metric &&
118
+ value_a == o.value_a &&
119
+ value_b == o.value_b
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
+ [merchant_a, merchant_b, comparison_metric, value_a, value_b].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