fuse_client 1.0.31 → 1.0.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -9
- data/README.md +10 -2
- data/docs/AddAccountEventsRequest.md +18 -0
- data/docs/AddAccountEventsRequestEventsInner.md +51 -0
- data/docs/AddAccountEventsResponse.md +20 -0
- data/docs/AssetReport.md +26 -0
- data/docs/AssetReportAccountsInner.md +24 -0
- data/docs/{GetAssetReportResponseReportAccountsInnerBalances.md → AssetReportAccountsInnerBalance.md} +2 -2
- data/docs/{GetAssetReportResponseReportAccountsInnerHistoricalBalancesInner.md → AssetReportAccountsInnerHistoricalBalancesInner.md} +2 -2
- data/docs/{GetAssetReportResponse.md → AssetReportResponse.md} +3 -3
- data/docs/AssetReportTransaction.md +36 -0
- data/docs/CreateAssetReportRequest.md +2 -4
- data/docs/CreateAssetReportResponse.md +2 -2
- data/docs/CreateLinkTokenRequest.md +6 -2
- data/docs/CreateLinkTokenRequestPlaid.md +1 -1
- data/docs/CreateLinkTokenRequestTeller.md +18 -0
- data/docs/CreateLinkTokenRequestTellerConfig.md +18 -0
- data/docs/CreateSessionRequest.md +5 -5
- data/docs/CreateSpendPowerCustomizationRequest.md +22 -0
- data/docs/CreateSpendPowerCustomizationResponse.md +20 -0
- data/docs/CreateSpendPowerRequest.md +22 -0
- data/docs/CreateSpendPowerResponse.md +20 -0
- data/docs/DeleteSpendPowerResponse.md +20 -0
- data/docs/EnrichTransactionsRequest.md +18 -0
- data/docs/EnrichTransactionsResponse.md +18 -0
- data/docs/EnrichedTransaction.md +46 -0
- data/docs/EnrichedTransactionLogo.md +18 -0
- data/docs/Entity.md +1 -1
- data/docs/EvalSpendPowerRequest.md +22 -0
- data/docs/EvalSpendPowerRequestEventsInner.md +20 -0
- data/docs/EvalSpendPowerResponse.md +20 -0
- data/docs/ExchangeFinancialConnectionsPublicTokenRequest.md +1 -1
- data/docs/ExchangeFinancialConnectionsPublicTokenResponse.md +2 -2
- data/docs/ExternalTransactionEvent.md +36 -0
- data/docs/ExternalTransactionEventStatus.md +15 -0
- data/docs/FinancialConnectionsAccountBalance.md +2 -2
- data/docs/FinancialConnectionsAccountCachedBalance.md +2 -2
- data/docs/FinancialConnectionsHolding.md +3 -3
- data/docs/FinancialConnectionsInvestmentSecurity.md +2 -2
- data/docs/FinancialConnectionsInvestmentSecurityType.md +15 -0
- data/docs/FinancialConnectionsInvestmentTransaction.md +7 -3
- data/docs/FinancialConnectionsInvestmentTransactionSubtype.md +15 -0
- data/docs/FuseApi.md +643 -19
- data/docs/FuseApiAggregatorError.md +28 -0
- data/docs/FuseApiError.md +7 -5
- data/docs/FuseApiErrorCode.md +15 -0
- data/docs/FuseApiErrorData.md +1 -1
- data/docs/FuseApiErrorType.md +15 -0
- data/docs/GetAssetReportRequest.md +2 -0
- data/docs/GetFinanceScoreResponse.md +20 -0
- data/docs/GetFinancialConnectionsAccountStatementRequest.md +22 -0
- data/docs/GetFinancialConnectionsAccountStatementResponse.md +20 -0
- data/docs/GetInvestmentTransactionsRequest.md +4 -4
- data/docs/GetInvestmentTransactionsResponse.md +2 -0
- data/docs/GetSpendPowerCustomizationResponse.md +20 -0
- data/docs/GetSpendPowerResponse.md +20 -0
- data/docs/InAppTransactionEvent.md +34 -0
- data/docs/InAppTransactionEventStatus.md +15 -0
- data/docs/MigrateFinancialConnectionsAggregatorConnectionData.md +3 -1
- data/docs/MigrateFinancialConnectionsAggregatorConnectionDataPlaid.md +3 -1
- data/docs/MigrateFinancialConnectionsAggregatorConnectionDataTeller.md +18 -0
- data/docs/MigrateFinancialConnectionsTokenRequest.md +1 -1
- data/docs/RefreshAssetReportRequest.md +5 -5
- data/docs/RefreshAssetReportResponse.md +22 -0
- data/docs/SpendPower.md +30 -0
- data/docs/SpendPowerApi.md +165 -0
- data/docs/SpendPowerCustomization.md +24 -0
- data/docs/SpendPowerTimeFrame.md +15 -0
- data/docs/Transaction.md +2 -2
- data/docs/TransactionCategory.md +20 -0
- data/docs/TransactionCategoryDetailed.md +15 -0
- data/docs/TransactionCategoryPrimary.md +15 -0
- data/docs/TransactionEventType.md +15 -0
- data/docs/TransactionToEnrich.md +26 -0
- data/docs/UpdateSpendPowerCustomizationRequest.md +22 -0
- data/docs/UpdateSpendPowerCustomizationResponse.md +20 -0
- data/docs/UpdatedBalanceEvent.md +26 -0
- data/docs/WebhookEvent.md +6 -0
- data/fuse_client.gemspec +1 -1
- data/lib/fuse_client/api/fuse_api.rb +530 -16
- data/lib/fuse_client/api/spend_power_api.rb +172 -0
- data/lib/fuse_client/api_client.rb +1 -1
- data/lib/fuse_client/api_error.rb +1 -1
- data/lib/fuse_client/configuration.rb +51 -4
- data/lib/fuse_client/models/account_subtype.rb +1 -1
- data/lib/fuse_client/models/account_type.rb +3 -2
- data/lib/fuse_client/models/add_account_events_request.rb +254 -0
- data/lib/fuse_client/models/add_account_events_request_events_inner.rb +106 -0
- data/lib/fuse_client/models/add_account_events_response.rb +240 -0
- data/lib/fuse_client/models/aggregator.rb +4 -2
- data/lib/fuse_client/models/{get_asset_report_response_report.rb → asset_report.rb} +15 -27
- data/lib/fuse_client/models/{get_asset_report_response_report_accounts_inner.rb → asset_report_accounts_inner.rb} +27 -26
- data/lib/fuse_client/models/{get_asset_report_response_report_accounts_inner_balances.rb → asset_report_accounts_inner_balance.rb} +4 -4
- 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
- data/lib/fuse_client/models/{get_asset_report_response.rb → asset_report_response.rb} +5 -5
- data/lib/fuse_client/models/asset_report_transaction.rb +385 -0
- data/lib/fuse_client/models/country_code.rb +3 -2
- data/lib/fuse_client/models/create_asset_report_request.rb +11 -23
- data/lib/fuse_client/models/create_asset_report_response.rb +3 -3
- data/lib/fuse_client/models/create_entity_request.rb +1 -1
- data/lib/fuse_client/models/create_entity_response.rb +1 -1
- data/lib/fuse_client/models/create_link_token_request.rb +25 -6
- data/lib/fuse_client/models/create_link_token_request_mx.rb +1 -1
- data/lib/fuse_client/models/create_link_token_request_plaid.rb +2 -2
- data/lib/fuse_client/models/create_link_token_request_teller.rb +220 -0
- data/lib/fuse_client/models/create_link_token_request_teller_config.rb +254 -0
- data/lib/fuse_client/models/create_link_token_response.rb +1 -1
- data/lib/fuse_client/models/create_session_request.rb +32 -9
- data/lib/fuse_client/models/create_session_response.rb +1 -1
- data/lib/fuse_client/models/create_spend_power_customization_request.rb +314 -0
- data/lib/fuse_client/models/create_spend_power_customization_response.rb +240 -0
- data/lib/fuse_client/models/create_spend_power_request.rb +255 -0
- data/lib/fuse_client/models/create_spend_power_response.rb +240 -0
- data/lib/fuse_client/models/currency.rb +1 -1
- data/lib/fuse_client/models/delete_financial_connection_response.rb +1 -1
- data/lib/fuse_client/models/delete_spend_power_response.rb +240 -0
- data/lib/fuse_client/models/enrich_transactions_request.rb +226 -0
- data/lib/fuse_client/models/enrich_transactions_response.rb +222 -0
- data/lib/fuse_client/models/enriched_transaction.rb +397 -0
- data/lib/fuse_client/models/enriched_transaction_logo.rb +220 -0
- data/lib/fuse_client/models/entity.rb +2 -2
- data/lib/fuse_client/models/eval_spend_power_request.rb +296 -0
- data/lib/fuse_client/models/eval_spend_power_request_events_inner.rb +239 -0
- data/lib/fuse_client/models/eval_spend_power_response.rb +230 -0
- data/lib/fuse_client/models/exchange_financial_connections_public_token_request.rb +6 -1
- data/lib/fuse_client/models/exchange_financial_connections_public_token_response.rb +3 -3
- data/lib/fuse_client/models/external_transaction_event.rb +384 -0
- data/lib/fuse_client/models/external_transaction_event_status.rb +40 -0
- data/lib/fuse_client/models/financial_connection_data.rb +1 -1
- data/lib/fuse_client/models/financial_connection_details.rb +1 -1
- data/lib/fuse_client/models/financial_connection_details_mx.rb +1 -1
- data/lib/fuse_client/models/financial_connection_details_plaid.rb +1 -1
- data/lib/fuse_client/models/financial_connection_details_teller.rb +1 -1
- data/lib/fuse_client/models/financial_connections_account.rb +1 -1
- data/lib/fuse_client/models/financial_connections_account_balance.rb +3 -3
- data/lib/fuse_client/models/financial_connections_account_cached_balance.rb +3 -3
- data/lib/fuse_client/models/financial_connections_account_details.rb +1 -1
- data/lib/fuse_client/models/financial_connections_account_details_ach.rb +1 -1
- data/lib/fuse_client/models/financial_connections_account_institution.rb +1 -1
- data/lib/fuse_client/models/financial_connections_account_liability.rb +1 -1
- data/lib/fuse_client/models/financial_connections_account_liability_all_of.rb +1 -1
- data/lib/fuse_client/models/financial_connections_account_liability_all_of_aprs.rb +1 -1
- data/lib/fuse_client/models/financial_connections_holding.rb +4 -4
- data/lib/fuse_client/models/financial_connections_investment_security.rb +25 -9
- data/lib/fuse_client/models/financial_connections_investment_security_exchange.rb +1 -1
- data/lib/fuse_client/models/financial_connections_investment_security_type.rb +64 -0
- data/lib/fuse_client/models/financial_connections_investment_transaction.rb +62 -5
- data/lib/fuse_client/models/financial_connections_investment_transaction_subtype.rb +87 -0
- data/lib/fuse_client/models/financial_connections_owner.rb +1 -1
- data/lib/fuse_client/models/financial_connections_owner_addresses_inner.rb +1 -1
- data/lib/fuse_client/models/financial_connections_owner_addresses_inner_data.rb +1 -1
- data/lib/fuse_client/models/financial_connections_owner_emails_inner.rb +1 -1
- data/lib/fuse_client/models/financial_connections_owner_names_inner.rb +1 -1
- data/lib/fuse_client/models/financial_connections_owner_phone_numbers_inner.rb +1 -1
- data/lib/fuse_client/models/financial_institution.rb +1 -1
- data/lib/fuse_client/models/financial_institution_logo.rb +1 -1
- data/lib/fuse_client/models/fuse_api_aggregator_error.rb +264 -0
- data/lib/fuse_client/models/fuse_api_error.rb +43 -28
- data/lib/fuse_client/models/fuse_api_error_code.rb +78 -0
- data/lib/fuse_client/models/fuse_api_error_data.rb +2 -2
- data/lib/fuse_client/models/fuse_api_error_type.rb +42 -0
- data/lib/fuse_client/models/fuse_api_warning.rb +1 -1
- data/lib/fuse_client/models/fuse_api_warning_data.rb +1 -1
- data/lib/fuse_client/models/fuse_api_warning_data_warnings_inner.rb +1 -1
- data/lib/fuse_client/models/get_asset_report_request.rb +17 -2
- data/lib/fuse_client/models/get_entity_response.rb +1 -1
- data/lib/fuse_client/models/get_finance_score_response.rb +240 -0
- data/lib/fuse_client/models/get_financial_connection_response.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_account_details_request.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_account_details_response.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_account_statement_request.rb +250 -0
- data/lib/fuse_client/models/get_financial_connections_account_statement_response.rb +240 -0
- data/lib/fuse_client/models/get_financial_connections_accounts_request.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_accounts_response.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_balance_request.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_balance_request_options.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_balance_response.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_owners_request.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_owners_response.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_owners_response_accounts_inner.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_transactions_request.rb +1 -1
- data/lib/fuse_client/models/get_financial_connections_transactions_response.rb +1 -1
- data/lib/fuse_client/models/get_financial_institution_response.rb +1 -1
- data/lib/fuse_client/models/get_investment_holdings_request.rb +1 -1
- data/lib/fuse_client/models/get_investment_holdings_request_options.rb +1 -1
- data/lib/fuse_client/models/get_investment_holdings_response.rb +1 -1
- data/lib/fuse_client/models/get_investment_transactions_request.rb +38 -10
- data/lib/fuse_client/models/get_investment_transactions_request_options.rb +1 -1
- data/lib/fuse_client/models/get_investment_transactions_response.rb +12 -2
- data/lib/fuse_client/models/get_liabilities_request.rb +1 -1
- data/lib/fuse_client/models/get_liabilities_response.rb +1 -1
- data/lib/fuse_client/models/get_spend_power_customization_response.rb +239 -0
- data/lib/fuse_client/models/get_spend_power_response.rb +239 -0
- data/lib/fuse_client/models/in_app_transaction_event.rb +364 -0
- data/lib/fuse_client/models/in_app_transaction_event_status.rb +41 -0
- data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data.rb +14 -5
- data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data_mx.rb +1 -1
- data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data_plaid.rb +15 -5
- data/lib/fuse_client/models/migrate_financial_connections_aggregator_connection_data_teller.rb +226 -0
- data/lib/fuse_client/models/migrate_financial_connections_token_request.rb +23 -4
- data/lib/fuse_client/models/migrate_financial_connections_token_request_entity.rb +1 -1
- data/lib/fuse_client/models/migrate_financial_connections_token_response.rb +1 -1
- data/lib/fuse_client/models/product.rb +3 -3
- data/lib/fuse_client/models/refresh_asset_report_request.rb +32 -33
- data/lib/fuse_client/models/refresh_asset_report_response.rb +240 -0
- data/lib/fuse_client/models/spend_power.rb +315 -0
- data/lib/fuse_client/models/spend_power_customization.rb +329 -0
- data/lib/fuse_client/models/spend_power_time_frame.rb +41 -0
- data/lib/fuse_client/models/sync_financial_connections_data_response.rb +1 -1
- data/lib/fuse_client/models/sync_transactions_request.rb +1 -1
- data/lib/fuse_client/models/sync_transactions_response.rb +1 -1
- data/lib/fuse_client/models/sync_transactions_response_removed_inner.rb +1 -1
- data/lib/fuse_client/models/transaction.rb +15 -3
- data/lib/fuse_client/models/transaction_category.rb +260 -0
- data/lib/fuse_client/models/transaction_category_detailed.rb +135 -0
- data/lib/fuse_client/models/transaction_category_primary.rb +59 -0
- data/lib/fuse_client/models/transaction_event_type.rb +65 -0
- data/lib/fuse_client/models/transaction_merchant.rb +1 -1
- data/lib/fuse_client/models/transaction_to_enrich.rb +304 -0
- data/lib/fuse_client/models/update_entity_request.rb +1 -1
- data/lib/fuse_client/models/update_entity_response.rb +1 -1
- data/lib/fuse_client/models/update_spend_power_customization_request.rb +291 -0
- data/lib/fuse_client/models/update_spend_power_customization_response.rb +240 -0
- data/lib/fuse_client/models/updated_balance_event.rb +308 -0
- data/lib/fuse_client/models/webhook_event.rb +34 -2
- data/lib/fuse_client/models/webhook_source.rb +1 -1
- data/lib/fuse_client/models/webhook_type.rb +4 -3
- data/lib/fuse_client/version.rb +2 -2
- data/lib/fuse_client.rb +52 -6
- data/spec/api/fuse_api_spec.rb +95 -6
- data/spec/api/spend_power_api_spec.rb +61 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/account_subtype_spec.rb +1 -1
- data/spec/models/account_type_spec.rb +1 -1
- data/spec/models/add_account_events_request_events_inner_spec.rb +31 -0
- data/spec/models/add_account_events_request_spec.rb +34 -0
- data/spec/models/add_account_events_response_spec.rb +40 -0
- data/spec/models/aggregator_spec.rb +1 -1
- data/spec/models/{get_asset_report_response_report_accounts_inner_balances_spec.rb → asset_report_accounts_inner_balance_spec.rb} +7 -7
- 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
- data/spec/models/{get_asset_report_response_report_accounts_inner_spec.rb → asset_report_accounts_inner_spec.rb} +10 -10
- data/spec/models/{get_asset_report_response_spec.rb → asset_report_response_spec.rb} +7 -7
- data/spec/models/{get_asset_report_response_report_spec.rb → asset_report_spec.rb} +8 -14
- data/spec/models/asset_report_transaction_spec.rb +96 -0
- data/spec/models/country_code_spec.rb +1 -1
- data/spec/models/create_asset_report_request_spec.rb +1 -7
- data/spec/models/create_asset_report_response_spec.rb +1 -1
- data/spec/models/create_entity_request_spec.rb +1 -1
- data/spec/models/create_entity_response_spec.rb +1 -1
- data/spec/models/create_link_token_request_mx_spec.rb +1 -1
- data/spec/models/create_link_token_request_plaid_spec.rb +1 -1
- data/spec/models/create_link_token_request_spec.rb +13 -1
- data/spec/models/create_link_token_request_teller_config_spec.rb +38 -0
- data/spec/models/create_link_token_request_teller_spec.rb +34 -0
- data/spec/models/create_link_token_response_spec.rb +1 -1
- data/spec/models/create_session_request_spec.rb +1 -1
- data/spec/models/create_session_response_spec.rb +1 -1
- data/spec/models/create_spend_power_customization_request_spec.rb +46 -0
- data/spec/models/create_spend_power_customization_response_spec.rb +40 -0
- data/spec/models/create_spend_power_request_spec.rb +46 -0
- data/spec/models/create_spend_power_response_spec.rb +40 -0
- data/spec/models/currency_spec.rb +1 -1
- data/spec/models/delete_financial_connection_response_spec.rb +1 -1
- data/spec/models/delete_spend_power_response_spec.rb +40 -0
- data/spec/models/enrich_transactions_request_spec.rb +34 -0
- data/spec/models/enrich_transactions_response_spec.rb +34 -0
- data/spec/models/enriched_transaction_logo_spec.rb +34 -0
- data/spec/models/enriched_transaction_spec.rb +122 -0
- data/spec/models/entity_spec.rb +1 -1
- data/spec/models/eval_spend_power_request_events_inner_spec.rb +40 -0
- data/spec/models/eval_spend_power_request_spec.rb +46 -0
- data/spec/models/eval_spend_power_response_spec.rb +40 -0
- data/spec/models/exchange_financial_connections_public_token_request_spec.rb +1 -1
- data/spec/models/exchange_financial_connections_public_token_response_spec.rb +1 -1
- data/spec/models/external_transaction_event_spec.rb +92 -0
- data/spec/models/external_transaction_event_status_spec.rb +28 -0
- data/spec/models/financial_connection_data_spec.rb +1 -1
- data/spec/models/financial_connection_details_mx_spec.rb +1 -1
- data/spec/models/financial_connection_details_plaid_spec.rb +1 -1
- data/spec/models/financial_connection_details_spec.rb +1 -1
- data/spec/models/financial_connection_details_teller_spec.rb +1 -1
- data/spec/models/financial_connections_account_balance_spec.rb +1 -1
- data/spec/models/financial_connections_account_cached_balance_spec.rb +1 -1
- data/spec/models/financial_connections_account_details_ach_spec.rb +1 -1
- data/spec/models/financial_connections_account_details_spec.rb +1 -1
- data/spec/models/financial_connections_account_institution_spec.rb +1 -1
- data/spec/models/financial_connections_account_liability_all_of_aprs_spec.rb +1 -1
- data/spec/models/financial_connections_account_liability_all_of_spec.rb +1 -1
- data/spec/models/financial_connections_account_liability_spec.rb +1 -1
- data/spec/models/financial_connections_account_spec.rb +1 -1
- data/spec/models/financial_connections_holding_spec.rb +1 -1
- data/spec/models/financial_connections_investment_security_exchange_spec.rb +1 -1
- data/spec/models/financial_connections_investment_security_spec.rb +1 -1
- data/spec/models/financial_connections_investment_security_type_spec.rb +28 -0
- data/spec/models/financial_connections_investment_transaction_spec.rb +17 -1
- data/spec/models/financial_connections_investment_transaction_subtype_spec.rb +28 -0
- data/spec/models/financial_connections_owner_addresses_inner_data_spec.rb +1 -1
- data/spec/models/financial_connections_owner_addresses_inner_spec.rb +1 -1
- data/spec/models/financial_connections_owner_emails_inner_spec.rb +1 -1
- data/spec/models/financial_connections_owner_names_inner_spec.rb +1 -1
- data/spec/models/financial_connections_owner_phone_numbers_inner_spec.rb +1 -1
- data/spec/models/financial_connections_owner_spec.rb +1 -1
- data/spec/models/financial_institution_logo_spec.rb +1 -1
- data/spec/models/financial_institution_spec.rb +1 -1
- data/spec/models/fuse_api_aggregator_error_spec.rb +64 -0
- data/spec/models/fuse_api_error_code_spec.rb +28 -0
- data/spec/models/fuse_api_error_data_spec.rb +1 -1
- data/spec/models/fuse_api_error_spec.rb +7 -9
- data/spec/models/fuse_api_error_type_spec.rb +28 -0
- data/spec/models/fuse_api_warning_data_spec.rb +1 -1
- data/spec/models/fuse_api_warning_data_warnings_inner_spec.rb +1 -1
- data/spec/models/fuse_api_warning_spec.rb +1 -1
- data/spec/models/get_asset_report_request_spec.rb +7 -1
- data/spec/models/get_entity_response_spec.rb +1 -1
- data/spec/models/get_finance_score_response_spec.rb +40 -0
- data/spec/models/get_financial_connection_response_spec.rb +1 -1
- data/spec/models/get_financial_connections_account_details_request_spec.rb +1 -1
- data/spec/models/get_financial_connections_account_details_response_spec.rb +1 -1
- data/spec/models/get_financial_connections_account_statement_request_spec.rb +46 -0
- data/spec/models/get_financial_connections_account_statement_response_spec.rb +40 -0
- data/spec/models/get_financial_connections_accounts_request_spec.rb +1 -1
- data/spec/models/get_financial_connections_accounts_response_spec.rb +1 -1
- data/spec/models/get_financial_connections_balance_request_options_spec.rb +1 -1
- data/spec/models/get_financial_connections_balance_request_spec.rb +1 -1
- data/spec/models/get_financial_connections_balance_response_spec.rb +1 -1
- data/spec/models/get_financial_connections_owners_request_spec.rb +1 -1
- data/spec/models/get_financial_connections_owners_response_accounts_inner_spec.rb +1 -1
- data/spec/models/get_financial_connections_owners_response_spec.rb +1 -1
- data/spec/models/get_financial_connections_transactions_request_spec.rb +1 -1
- data/spec/models/get_financial_connections_transactions_response_spec.rb +1 -1
- data/spec/models/get_financial_institution_response_spec.rb +1 -1
- data/spec/models/get_investment_holdings_request_options_spec.rb +1 -1
- data/spec/models/get_investment_holdings_request_spec.rb +1 -1
- data/spec/models/get_investment_holdings_response_spec.rb +1 -1
- data/spec/models/get_investment_transactions_request_options_spec.rb +1 -1
- data/spec/models/get_investment_transactions_request_spec.rb +1 -1
- data/spec/models/get_investment_transactions_response_spec.rb +7 -1
- data/spec/models/get_liabilities_request_spec.rb +1 -1
- data/spec/models/get_liabilities_response_spec.rb +1 -1
- data/spec/models/get_spend_power_customization_response_spec.rb +40 -0
- data/spec/models/get_spend_power_response_spec.rb +40 -0
- data/spec/models/in_app_transaction_event_spec.rb +86 -0
- data/spec/models/in_app_transaction_event_status_spec.rb +28 -0
- data/spec/models/migrate_financial_connections_aggregator_connection_data_mx_spec.rb +1 -1
- data/spec/models/migrate_financial_connections_aggregator_connection_data_plaid_spec.rb +7 -1
- data/spec/models/migrate_financial_connections_aggregator_connection_data_spec.rb +7 -1
- data/spec/models/migrate_financial_connections_aggregator_connection_data_teller_spec.rb +34 -0
- data/spec/models/migrate_financial_connections_token_request_entity_spec.rb +1 -1
- data/spec/models/migrate_financial_connections_token_request_spec.rb +2 -2
- data/spec/models/migrate_financial_connections_token_response_spec.rb +1 -1
- data/spec/models/product_spec.rb +1 -1
- data/spec/models/refresh_asset_report_request_spec.rb +3 -3
- data/spec/models/refresh_asset_report_response_spec.rb +46 -0
- data/spec/models/spend_power_customization_spec.rb +52 -0
- data/spec/models/spend_power_spec.rb +70 -0
- data/spec/models/spend_power_time_frame_spec.rb +28 -0
- data/spec/models/sync_financial_connections_data_response_spec.rb +1 -1
- data/spec/models/sync_transactions_request_spec.rb +1 -1
- data/spec/models/sync_transactions_response_removed_inner_spec.rb +1 -1
- data/spec/models/sync_transactions_response_spec.rb +1 -1
- data/spec/models/transaction_category_detailed_spec.rb +28 -0
- data/spec/models/transaction_category_primary_spec.rb +28 -0
- data/spec/models/transaction_category_spec.rb +40 -0
- data/spec/models/transaction_event_type_spec.rb +28 -0
- data/spec/models/transaction_merchant_spec.rb +1 -1
- data/spec/models/transaction_spec.rb +9 -1
- data/spec/models/transaction_to_enrich_spec.rb +62 -0
- data/spec/models/update_entity_request_spec.rb +1 -1
- data/spec/models/update_entity_response_spec.rb +1 -1
- data/spec/models/update_spend_power_customization_request_spec.rb +46 -0
- data/spec/models/update_spend_power_customization_response_spec.rb +40 -0
- data/spec/models/updated_balance_event_spec.rb +62 -0
- data/spec/models/webhook_event_spec.rb +19 -1
- data/spec/models/webhook_source_spec.rb +1 -1
- data/spec/models/webhook_type_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +206 -22
- data/docs/GetAssetReportResponseReport.md +0 -28
- data/docs/GetAssetReportResponseReportAccountsInner.md +0 -24
@@ -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 RefreshAssetReportResponse
|
18
|
+
# A token that can be provided to endpoints such as /asset_report to fetch an asset report.
|
19
|
+
attr_accessor :asset_report_token
|
20
|
+
|
21
|
+
# A unique ID identifying an Asset Report.
|
22
|
+
attr_accessor :asset_report_id
|
23
|
+
|
24
|
+
# An identifier that is exclusive to the request and can serve as a means for investigating and resolving issues.
|
25
|
+
attr_accessor :request_id
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'asset_report_token' => :'asset_report_token',
|
31
|
+
:'asset_report_id' => :'asset_report_id',
|
32
|
+
:'request_id' => :'request_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
|
+
:'asset_report_token' => :'String',
|
45
|
+
:'asset_report_id' => :'String',
|
46
|
+
:'request_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::RefreshAssetReportResponse` 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::RefreshAssetReportResponse`. 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?(:'asset_report_token')
|
72
|
+
self.asset_report_token = attributes[:'asset_report_token']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.key?(:'asset_report_id')
|
76
|
+
self.asset_report_id = attributes[:'asset_report_id']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'request_id')
|
80
|
+
self.request_id = attributes[:'request_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
|
+
invalid_properties
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check to see if the all the properties in the model are valid
|
92
|
+
# @return true if the model is valid
|
93
|
+
def valid?
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
asset_report_token == o.asset_report_token &&
|
103
|
+
asset_report_id == o.asset_report_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
|
+
[asset_report_token, asset_report_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,315 @@
|
|
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 SpendPower
|
18
|
+
# The id of the spend power
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# The customization id of the spend power.
|
22
|
+
attr_accessor :customization_id
|
23
|
+
|
24
|
+
# The total limit for the current timeframe, in cents.
|
25
|
+
attr_accessor :spend_limit
|
26
|
+
|
27
|
+
# The total current spend in the current timeframe, in cents, without factoring in pending payments.
|
28
|
+
attr_accessor :current_spend
|
29
|
+
|
30
|
+
# The total unpaid amount, in cents, from all timeframes.
|
31
|
+
attr_accessor :pending_payments_amount
|
32
|
+
|
33
|
+
# The ISO-4217 currency code of the transaction
|
34
|
+
attr_accessor :iso_currency_code
|
35
|
+
|
36
|
+
# The datetime of when the spend power was most recently updated, in ISO-8601 format.
|
37
|
+
attr_accessor :last_updated
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'id' => :'id',
|
43
|
+
:'customization_id' => :'customization_id',
|
44
|
+
:'spend_limit' => :'spend_limit',
|
45
|
+
:'current_spend' => :'current_spend',
|
46
|
+
:'pending_payments_amount' => :'pending_payments_amount',
|
47
|
+
:'iso_currency_code' => :'iso_currency_code',
|
48
|
+
:'last_updated' => :'last_updated'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
def self.acceptable_attributes
|
54
|
+
attribute_map.values
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.openapi_types
|
59
|
+
{
|
60
|
+
:'id' => :'String',
|
61
|
+
:'customization_id' => :'String',
|
62
|
+
:'spend_limit' => :'Float',
|
63
|
+
:'current_spend' => :'Float',
|
64
|
+
:'pending_payments_amount' => :'Float',
|
65
|
+
:'iso_currency_code' => :'String',
|
66
|
+
:'last_updated' => :'String'
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
# List of attributes with nullable: true
|
71
|
+
def self.openapi_nullable
|
72
|
+
Set.new([
|
73
|
+
])
|
74
|
+
end
|
75
|
+
|
76
|
+
# Initializes the object
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
78
|
+
def initialize(attributes = {})
|
79
|
+
if (!attributes.is_a?(Hash))
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::SpendPower` initialize method"
|
81
|
+
end
|
82
|
+
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::SpendPower`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
87
|
+
end
|
88
|
+
h[k.to_sym] = v
|
89
|
+
}
|
90
|
+
|
91
|
+
if attributes.key?(:'id')
|
92
|
+
self.id = attributes[:'id']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'customization_id')
|
96
|
+
self.customization_id = attributes[:'customization_id']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'spend_limit')
|
100
|
+
self.spend_limit = attributes[:'spend_limit']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'current_spend')
|
104
|
+
self.current_spend = attributes[:'current_spend']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'pending_payments_amount')
|
108
|
+
self.pending_payments_amount = attributes[:'pending_payments_amount']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'iso_currency_code')
|
112
|
+
self.iso_currency_code = attributes[:'iso_currency_code']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'last_updated')
|
116
|
+
self.last_updated = attributes[:'last_updated']
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
121
|
+
# @return Array for valid properties with the reasons
|
122
|
+
def list_invalid_properties
|
123
|
+
invalid_properties = Array.new
|
124
|
+
if @id.nil?
|
125
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if @customization_id.nil?
|
129
|
+
invalid_properties.push('invalid value for "customization_id", customization_id cannot be nil.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if @spend_limit.nil?
|
133
|
+
invalid_properties.push('invalid value for "spend_limit", spend_limit cannot be nil.')
|
134
|
+
end
|
135
|
+
|
136
|
+
if @current_spend.nil?
|
137
|
+
invalid_properties.push('invalid value for "current_spend", current_spend cannot be nil.')
|
138
|
+
end
|
139
|
+
|
140
|
+
if @pending_payments_amount.nil?
|
141
|
+
invalid_properties.push('invalid value for "pending_payments_amount", pending_payments_amount cannot be nil.')
|
142
|
+
end
|
143
|
+
|
144
|
+
if @iso_currency_code.nil?
|
145
|
+
invalid_properties.push('invalid value for "iso_currency_code", iso_currency_code cannot be nil.')
|
146
|
+
end
|
147
|
+
|
148
|
+
if @last_updated.nil?
|
149
|
+
invalid_properties.push('invalid value for "last_updated", last_updated cannot be nil.')
|
150
|
+
end
|
151
|
+
|
152
|
+
invalid_properties
|
153
|
+
end
|
154
|
+
|
155
|
+
# Check to see if the all the properties in the model are valid
|
156
|
+
# @return true if the model is valid
|
157
|
+
def valid?
|
158
|
+
return false if @id.nil?
|
159
|
+
return false if @customization_id.nil?
|
160
|
+
return false if @spend_limit.nil?
|
161
|
+
return false if @current_spend.nil?
|
162
|
+
return false if @pending_payments_amount.nil?
|
163
|
+
return false if @iso_currency_code.nil?
|
164
|
+
return false if @last_updated.nil?
|
165
|
+
true
|
166
|
+
end
|
167
|
+
|
168
|
+
# Checks equality by comparing each attribute.
|
169
|
+
# @param [Object] Object to be compared
|
170
|
+
def ==(o)
|
171
|
+
return true if self.equal?(o)
|
172
|
+
self.class == o.class &&
|
173
|
+
id == o.id &&
|
174
|
+
customization_id == o.customization_id &&
|
175
|
+
spend_limit == o.spend_limit &&
|
176
|
+
current_spend == o.current_spend &&
|
177
|
+
pending_payments_amount == o.pending_payments_amount &&
|
178
|
+
iso_currency_code == o.iso_currency_code &&
|
179
|
+
last_updated == o.last_updated
|
180
|
+
end
|
181
|
+
|
182
|
+
# @see the `==` method
|
183
|
+
# @param [Object] Object to be compared
|
184
|
+
def eql?(o)
|
185
|
+
self == o
|
186
|
+
end
|
187
|
+
|
188
|
+
# Calculates hash code according to all attributes.
|
189
|
+
# @return [Integer] Hash code
|
190
|
+
def hash
|
191
|
+
[id, customization_id, spend_limit, current_spend, pending_payments_amount, iso_currency_code, last_updated].hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Builds the object from hash
|
195
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
196
|
+
# @return [Object] Returns the model itself
|
197
|
+
def self.build_from_hash(attributes)
|
198
|
+
new.build_from_hash(attributes)
|
199
|
+
end
|
200
|
+
|
201
|
+
# Builds the object from hash
|
202
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
203
|
+
# @return [Object] Returns the model itself
|
204
|
+
def build_from_hash(attributes)
|
205
|
+
return nil unless attributes.is_a?(Hash)
|
206
|
+
attributes = attributes.transform_keys(&:to_sym)
|
207
|
+
self.class.openapi_types.each_pair do |key, type|
|
208
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
209
|
+
self.send("#{key}=", nil)
|
210
|
+
elsif type =~ /\AArray<(.*)>/i
|
211
|
+
# check to ensure the input is an array given that the attribute
|
212
|
+
# is documented as an array but the input is not
|
213
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
214
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
215
|
+
end
|
216
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
217
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
self
|
222
|
+
end
|
223
|
+
|
224
|
+
# Deserializes the data based on type
|
225
|
+
# @param string type Data type
|
226
|
+
# @param string value Value to be deserialized
|
227
|
+
# @return [Object] Deserialized data
|
228
|
+
def _deserialize(type, value)
|
229
|
+
case type.to_sym
|
230
|
+
when :Time
|
231
|
+
Time.parse(value)
|
232
|
+
when :Date
|
233
|
+
Date.parse(value)
|
234
|
+
when :String
|
235
|
+
value.to_s
|
236
|
+
when :Integer
|
237
|
+
value.to_i
|
238
|
+
when :Float
|
239
|
+
value.to_f
|
240
|
+
when :Boolean
|
241
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
242
|
+
true
|
243
|
+
else
|
244
|
+
false
|
245
|
+
end
|
246
|
+
when :Object
|
247
|
+
# generic object (usually a Hash), return directly
|
248
|
+
value
|
249
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
250
|
+
inner_type = Regexp.last_match[:inner_type]
|
251
|
+
value.map { |v| _deserialize(inner_type, v) }
|
252
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
253
|
+
k_type = Regexp.last_match[:k_type]
|
254
|
+
v_type = Regexp.last_match[:v_type]
|
255
|
+
{}.tap do |hash|
|
256
|
+
value.each do |k, v|
|
257
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
258
|
+
end
|
259
|
+
end
|
260
|
+
else # model
|
261
|
+
# models (e.g. Pet) or oneOf
|
262
|
+
klass = FuseClient.const_get(type)
|
263
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
# Returns the string representation of the object
|
268
|
+
# @return [String] String presentation of the object
|
269
|
+
def to_s
|
270
|
+
to_hash.to_s
|
271
|
+
end
|
272
|
+
|
273
|
+
# to_body is an alias to to_hash (backward compatibility)
|
274
|
+
# @return [Hash] Returns the object in the form of hash
|
275
|
+
def to_body
|
276
|
+
to_hash
|
277
|
+
end
|
278
|
+
|
279
|
+
# Returns the object in the form of hash
|
280
|
+
# @return [Hash] Returns the object in the form of hash
|
281
|
+
def to_hash
|
282
|
+
hash = {}
|
283
|
+
self.class.attribute_map.each_pair do |attr, param|
|
284
|
+
value = self.send(attr)
|
285
|
+
if value.nil?
|
286
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
287
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
288
|
+
end
|
289
|
+
|
290
|
+
hash[param] = _to_hash(value)
|
291
|
+
end
|
292
|
+
hash
|
293
|
+
end
|
294
|
+
|
295
|
+
# Outputs non-array value in the form of hash
|
296
|
+
# For object, use to_hash. Otherwise, just return the value
|
297
|
+
# @param [Object] value Any valid value
|
298
|
+
# @return [Hash] Returns the value in the form of hash
|
299
|
+
def _to_hash(value)
|
300
|
+
if value.is_a?(Array)
|
301
|
+
value.compact.map { |v| _to_hash(v) }
|
302
|
+
elsif value.is_a?(Hash)
|
303
|
+
{}.tap do |hash|
|
304
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
305
|
+
end
|
306
|
+
elsif value.respond_to? :to_hash
|
307
|
+
value.to_hash
|
308
|
+
else
|
309
|
+
value
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
313
|
+
end
|
314
|
+
|
315
|
+
end
|